pax_global_header00006660000000000000000000000064127427755330014531gustar00rootroot0000000000000052 comment=5e106f64c726edf2849f0babc9096ce6664b7368 core-js-2.4.1/000077500000000000000000000000001274277553300130775ustar00rootroot00000000000000core-js-2.4.1/.eslintrc000066400000000000000000000017761274277553300147360ustar00rootroot00000000000000{ "env": { "browser": true, "node": true }, "rules": { "indent": [2, 2, {"VariableDeclarator": 2, "SwitchCase": 1}], "max-len": [2, 120, 2], "eol-last": 0, "camelcase": 2, "brace-style": [2, "1tbs", { "allowSingleLine": true }], "quote-props": [2, "as-needed", {"keywords": true}], "dot-notation": [2, {"allowKeywords": false}], "quotes": [2, "single", "avoid-escape"], "new-parens": 0, "new-cap": [2, {"newIsCap": true, "capIsNew": false}], "no-wrap-func": 0, "no-use-before-define": 0, "no-cond-assign": 0, "no-underscore-dangle": 0, "no-native-reassign": 0, "no-shadow-restricted-names": 0, "no-fallthrough": 0, "eqeqeq": 0, "comma-spacing": 0, "no-multi-spaces": 0, "key-spacing": 0, "strict": 0, "no-mixed-requires": 0, "no-loop-func": 0, "no-unused-expressions": 0, "no-unused-vars": [2, {"args": "none"}], "curly": 0, "max-nested-callbacks": [2, 4], "no-multiple-empty-lines": 2 } }core-js-2.4.1/.gitattributes000066400000000000000000000000151274277553300157660ustar00rootroot00000000000000* text eol=lfcore-js-2.4.1/.gitignore000066400000000000000000000000751274277553300150710ustar00rootroot00000000000000node_modules/ *.tmp *.log *.bak *.swp Thumbs.db Desktop.inicore-js-2.4.1/.npmignore000066400000000000000000000000641274277553300150760ustar00rootroot00000000000000node_modules/ build/core-js-builder/ tests/ *.log .*core-js-2.4.1/.travis.yml000066400000000000000000000000621274277553300152060ustar00rootroot00000000000000language: node_js node_js: - "5.7" sudo: false core-js-2.4.1/CHANGELOG.md000066400000000000000000001107341274277553300147160ustar00rootroot00000000000000## Changelog ##### 2.4.1 - 2016.07.18 - fixed `script` tag for some parsers, [#204](https://github.com/zloirock/core-js/issues/204), [#216](https://github.com/zloirock/core-js/issues/216) - removed some unused variables, [#217](https://github.com/zloirock/core-js/issues/217), [#218](https://github.com/zloirock/core-js/issues/218) - fixed MS Edge `Reflect.construct` and `Reflect.apply` - they should not allow primitive as `argumentsList` argument ##### 1.2.7 [LEGACY] - 2016.07.18 - some fixes for issues like [#159](https://github.com/zloirock/core-js/issues/159), [#186](https://github.com/zloirock/core-js/issues/186), [#194](https://github.com/zloirock/core-js/issues/194), [#207](https://github.com/zloirock/core-js/issues/207) ##### 2.4.0 - 2016.05.08 - Added `Observable`, [stage 1 proposal](https://github.com/zenparsing/es-observable) - Fixed behavior `Object.{getOwnPropertySymbols, getOwnPropertyDescriptor}` and `Object#propertyIsEnumerable` on `Object.prototype` - `Reflect.construct` and `Reflect.apply` should throw an error if `argumentsList` argument is not an object, [#194](https://github.com/zloirock/core-js/issues/194) ##### 2.3.0 - 2016.04.24 - Added `asap` for enqueuing microtasks, [stage 0 proposal](https://github.com/rwaldron/tc39-notes/blob/master/es6/2014-09/sept-25.md#510-globalasap-for-enqueuing-a-microtask) - Added well-known symbol `Symbol.asyncIterator` for [stage 2 async iteration proposal](https://github.com/tc39/proposal-async-iteration) - Added well-known symbol `Symbol.observable` for [stage 1 observables proposal](https://github.com/zenparsing/es-observable) - `String#{padStart, padEnd}` returns original string if filler is empty string, [TC39 meeting notes](https://github.com/rwaldron/tc39-notes/blob/master/es7/2016-03/march-29.md#stringprototypepadstartpadend) - `Object.values` and `Object.entries` moved to stage 4 from 3, [TC39 meeting notes](https://github.com/rwaldron/tc39-notes/blob/master/es7/2016-03/march-29.md#objectvalues--objectentries) - `System.global` moved to stage 2 from 1, [TC39 meeting notes](https://github.com/rwaldron/tc39-notes/blob/master/es7/2016-03/march-29.md#systemglobal) - `Map#toJSON` and `Set#toJSON` rejected and will be removed from the next major release, [TC39 meeting notes](https://github.com/rwaldron/tc39-notes/blob/master/es7/2016-03/march-31.md#mapprototypetojsonsetprototypetojson) - `Error.isError` withdrawn and will be removed from the next major release, [TC39 meeting notes](https://github.com/rwaldron/tc39-notes/blob/master/es7/2016-03/march-29.md#erroriserror) - Added fallback for `Function#name` on non-extensible functions and functions with broken `toString` conversion, [#193](https://github.com/zloirock/core-js/issues/193) ##### 2.2.2 - 2016.04.06 - Added conversion `-0` to `+0` to `Array#{indexOf, lastIndexOf}`, [ES2016 fix](https://github.com/tc39/ecma262/pull/316) - Added fixes for some `Math` methods in Tor Browser - `Array.{from, of}` no longer calls prototype setters - Added workaround over Chrome DevTools strange behavior, [#186](https://github.com/zloirock/core-js/issues/186) ##### 2.2.1 - 2016.03.19 - Fixed `Object.getOwnPropertyNames(window)` `2.1+` versions bug, [#181](https://github.com/zloirock/core-js/issues/181) ##### 2.2.0 - 2016.03.15 - Added `String#matchAll`, [proposal](https://github.com/tc39/String.prototype.matchAll) - Added `Object#__(define|lookup)[GS]etter__`, [annex B ES2017](https://github.com/tc39/ecma262/pull/381) - Added `@@toPrimitive` methods to `Date` and `Symbol` - Fixed `%TypedArray%#slice` in Edge ~ 13 (throws with `@@species` and wrapped / inherited constructor) - Some other minor fixes ##### 2.1.5 - 2016.03.12 - Improved support NodeJS domains in `Promise#then`, [#180](https://github.com/zloirock/core-js/issues/180) - Added fallback for `Date#toJSON` bug in Qt Script, [#173](https://github.com/zloirock/core-js/issues/173#issuecomment-193972502) ##### 2.1.4 - 2016.03.08 - Added fallback for `Symbol` polyfill in Qt Script, [#173](https://github.com/zloirock/core-js/issues/173) - Added one more fallback for IE11 `Script Access Denied` error with iframes, [#165](https://github.com/zloirock/core-js/issues/165) ##### 2.1.3 - 2016.02.29 - Added fallback for [`es6-promise` package bug](https://github.com/stefanpenner/es6-promise/issues/169), [#176](https://github.com/zloirock/core-js/issues/176) ##### 2.1.2 - 2016.02.29 - Some minor `Promise` fixes: - Browsers `rejectionhandled` event better HTML spec complaint - Errors in unhandled rejection handlers should not cause any problems - Fixed typo in feature detection ##### 2.1.1 - 2016.02.22 - Some `Promise` improvements: - Feature detection: - **Added detection unhandled rejection tracking support - now it's available everywhere**, [#140](https://github.com/zloirock/core-js/issues/140) - Added detection `@@species` pattern support for completely correct subclassing - Removed usage `Object.setPrototypeOf` from feature detection and noisy console message about it in FF - `Promise.all` fixed for some very specific cases ##### 2.1.0 - 2016.02.09 - **API**: - ES5 polyfills are split and logic, used in other polyfills, moved to internal modules - **All entry point works in ES3 environment like IE8- without `core-js/(library/)es5`** - **Added all missed single entry points for ES5 polyfills** - Separated ES5 polyfills moved to the ES6 namespace. Why? - Mainly, for prevent duplication features in different namespaces - logic of most required ES5 polyfills changed in ES6+: - Already added changes for: `Object` statics - should accept primitives, new whitespaces lists in `String#trim`, `parse(Int|float)`, `RegExp#toString` logic, `String#split`, etc - Should be changed in the future: `@@species` and `ToLength` logic in `Array` methods, `Date` parsing, `Function#bind`, etc - Should not be changed only several features like `Array.isArray` and `Date.now` - Some ES5 polyfills required for modern engines - All old entry points should work fine, but in the next major release API can be changed - `Object.getOwnPropertyDescriptors` moved to the stage 3, [January TC39 meeting](https://github.com/rwaldron/tc39-notes/blob/master/es7/2016-01/2016-01-28.md#objectgetownpropertydescriptors-to-stage-3-jordan-harband-low-priority-but-super-quick) - Added `umd` option for [custom build process](https://github.com/zloirock/core-js#custom-build-from-external-scripts), [#169](https://github.com/zloirock/core-js/issues/169) - Returned entry points for `Array` statics, removed in `2.0`, for compatibility with `babel` `6` and for future fixes - **Deprecated**: - `Reflect.enumerate` deprecated and will be removed from the next major release, [January TC39 meeting](https://github.com/rwaldron/tc39-notes/blob/master/es7/2016-01/2016-01-28.md#5xix-revisit-proxy-enumerate---revisit-decision-to-exhaust-iterator) - **New Features**: - Added [`Reflect` metadata API](https://github.com/jonathandturner/decorators/blob/master/specs/metadata.md) as a pre-strawman feature, [#152](https://github.com/zloirock/core-js/issues/152): - `Reflect.defineMetadata` - `Reflect.deleteMetadata` - `Reflect.getMetadata` - `Reflect.getMetadataKeys` - `Reflect.getOwnMetadata` - `Reflect.getOwnMetadataKeys` - `Reflect.hasMetadata` - `Reflect.hasOwnMetadata` - `Reflect.metadata` - Implementation / fixes `Date#toJSON` - Fixes for `parseInt` and `Number.parseInt` - Fixes for `parseFloat` and `Number.parseFloat` - Fixes for `RegExp#toString` - Fixes for `Array#sort` - Fixes for `Number#toFixed` - Fixes for `Number#toPrecision` - Additional fixes for `String#split` (`RegExp#@@split`) - **Improvements**: - Correct subclassing wrapped collections, `Number` and `RegExp` constructors with native class syntax - Correct support `SharedArrayBuffer` and buffers from other realms in typed arrays wrappers - Additional validations for `Object.{defineProperty, getOwnPropertyDescriptor}` and `Reflect.defineProperty` - **Bug Fixes**: - Fixed some cases `Array#lastIndexOf` with negative second argument ##### 2.0.3 - 2016.01.11 - Added fallback for V8 ~ Chrome 49 `Promise` subclassing bug causes unhandled rejection on feature detection, [#159](https://github.com/zloirock/core-js/issues/159) - Added fix for very specific environments with global `window === null` ##### 2.0.2 - 2016.01.04 - Temporarily removed `length` validation from `Uint8Array` constructor wrapper. Reason - [bug in `ws` module](https://github.com/websockets/ws/pull/645) (-> `socket.io`) which passes to `Buffer` constructor -> `Uint8Array` float and uses [the `V8` bug](https://code.google.com/p/v8/issues/detail?id=4552) for conversion to int (by the spec should be thrown an error). [It creates problems for many people.](https://github.com/karma-runner/karma/issues/1768) I hope, it will be returned after fixing this bug in `V8`. ##### 2.0.1 - 2015.12.31 - forced usage `Promise.resolve` polyfill in the `library` version for correct work with wrapper - `Object.assign` should be defined in the strict mode -> throw an error on extension non-extensible objects, [#154](https://github.com/zloirock/core-js/issues/154) ##### 2.0.0 - 2015.12.24 - added implementations and fixes [Typed Arrays](https://github.com/zloirock/core-js#ecmascript-6-typed-arrays)-related features - `ArrayBuffer`, `ArrayBuffer.isView`, `ArrayBuffer#slice` - `DataView` with all getter / setter methods - `Int8Array`, `Uint8Array`, `Uint8ClampedArray`, `Int16Array`, `Uint16Array`, `Int32Array`, `Uint32Array`, `Float32Array` and `Float64Array` constructors - `%TypedArray%.{for, of}`, `%TypedArray%#{copyWithin, every, fill, filter, find, findIndex, forEach, indexOf, includes, join, lastIndexOf, map, reduce, reduceRight, reverse, set, slice, some, sort, subarray, values, keys, entries, @@iterator, ...}` - added [`System.global`](https://github.com/zloirock/core-js#ecmascript-7-proposals), [proposal](https://github.com/tc39/proposal-global), [November TC39 meeting](https://github.com/rwaldron/tc39-notes/tree/master/es7/2015-11/nov-19.md#systemglobal-jhd) - added [`Error.isError`](https://github.com/zloirock/core-js#ecmascript-7-proposals), [proposal](https://github.com/ljharb/proposal-is-error), [November TC39 meeting](https://github.com/rwaldron/tc39-notes/tree/master/es7/2015-11/nov-19.md#jhd-erroriserror) - added [`Math.{iaddh, isubh, imulh, umulh}`](https://github.com/zloirock/core-js#ecmascript-7-proposals), [proposal](https://gist.github.com/BrendanEich/4294d5c212a6d2254703) - `RegExp.escape` moved from the `es7` to the non-standard `core` namespace, [July TC39 meeting](https://github.com/rwaldron/tc39-notes/blob/master/es7/2015-07/july-28.md#62-regexpescape) - too slow, but it's condition of stability, [#116](https://github.com/zloirock/core-js/issues/116) - [`Promise`](https://github.com/zloirock/core-js#ecmascript-6-promise) - some performance optimisations - added basic support [`rejectionHandled` event / `onrejectionhandled` handler](https://github.com/zloirock/core-js#unhandled-rejection-tracking) to the polyfill - removed usage `@@species` from `Promise.{all, race}`, [November TC39 meeting](https://github.com/rwaldron/tc39-notes/tree/master/es7/2015-11/nov-18.md#conclusionresolution-2) - some improvements [collections polyfills](https://github.com/zloirock/core-js#ecmascript-6-collections) - `O(1)` and preventing possible leaks with frozen keys, [#134](https://github.com/zloirock/core-js/issues/134) - correct observable state object keys - renamed `String#{padLeft, padRight}` -> [`String#{padStart, padEnd}`](https://github.com/zloirock/core-js#ecmascript-7-proposals), [proposal](https://github.com/tc39/proposal-string-pad-start-end), [November TC39 meeting](https://github.com/rwaldron/tc39-notes/tree/master/es7/2015-11/nov-17.md#conclusionresolution-2) (they want to rename it on each meeting?O_o), [#132](https://github.com/zloirock/core-js/issues/132) - added [`String#{trimStart, trimEnd}` as aliases for `String#{trimLeft, trimRight}`](https://github.com/zloirock/core-js#ecmascript-7-proposals), [proposal](https://github.com/sebmarkbage/ecmascript-string-left-right-trim), [November TC39 meeting](https://github.com/rwaldron/tc39-notes/tree/master/es7/2015-11/nov-17.md#conclusionresolution-2) - added [annex B HTML methods](https://github.com/zloirock/core-js#ecmascript-6-string) - ugly, but also [the part of the spec](http://www.ecma-international.org/ecma-262/6.0/#sec-string.prototype.anchor) - added little fix for [`Date#toString`](https://github.com/zloirock/core-js#ecmascript-6-date) - `new Date(NaN).toString()` [should be `'Invalid Date'`](http://www.ecma-international.org/ecma-262/6.0/#sec-todatestring) - added [`{keys, values, entries, @@iterator}` methods to DOM collections](https://github.com/zloirock/core-js#iterable-dom-collections) which should have [iterable interface](https://heycam.github.io/webidl/#idl-iterable) or should be [inherited from `Array`](https://heycam.github.io/webidl/#LegacyArrayClass) - `NodeList`, `DOMTokenList`, `MediaList`, `StyleSheetList`, `CSSRuleList`. - removed Mozilla `Array` generics - [deprecated and will be removed from FF](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array#Array_generic_methods), [looks like strawman is dead](http://wiki.ecmascript.org/doku.php?id=strawman:array_statics), available [alternative shim](https://github.com/plusdude/array-generics) - removed `core.log` module - CommonJS API - added entry points for [virtual methods](https://github.com/zloirock/core-js#commonjs-and-prototype-methods-without-global-namespace-pollution) - added entry points for [stages proposals](https://github.com/zloirock/core-js#ecmascript-7-proposals) - some other minor changes - [custom build from external scripts](https://github.com/zloirock/core-js#custom-build-from-external-scripts) moved to the separate package for preventing problems with dependencies - changed `$` prefix for internal modules file names because Team Foundation Server does not support it, [#129](https://github.com/zloirock/core-js/issues/129) - additional fix for `SameValueZero` in V8 ~ Chromium 39-42 collections - additional fix for FF27 `Array` iterator - removed usage shortcuts for `arguments` object - old WebKit bug, [#150](https://github.com/zloirock/core-js/issues/150) - `{Map, Set}#forEach` non-generic, [#144](https://github.com/zloirock/core-js/issues/144) - many other improvements ##### 1.2.6 - 2015.11.09 * reject with `TypeError` on attempt resolve promise itself * correct behavior with broken `Promise` subclass constructors / methods * added `Promise`-based fallback for microtask * fixed V8 and FF `Array#{values, @@iterator}.name` * fixed IE7- `[1, 2].join(undefined) -> '1,2'` * some other fixes / improvements / optimizations ##### 1.2.5 - 2015.11.02 * some more `Number` constructor fixes: * fixed V8 ~ Node 0.8 bug: `Number('+0x1')` should be `NaN` * fixed `Number(' 0b1\n')` case, should be `1` * fixed `Number()` case, should be `0` ##### 1.2.4 - 2015.11.01 * fixed `Number('0b12') -> NaN` case in the shim * fixed V8 ~ Chromium 40- bug - `Weak(Map|Set)#{delete, get, has}` should not throw errors [#124](https://github.com/zloirock/core-js/issues/124) * some other fixes and optimizations ##### 1.2.3 - 2015.10.23 * fixed some problems related old V8 bug `Object('a').propertyIsEnumerable(0) // => false`, for example, `Object.assign({}, 'qwe')` from the last release * fixed `.name` property and `Function#toString` conversion some polyfilled methods * fixed `Math.imul` arity in Safari 8- ##### 1.2.2 - 2015.10.18 * improved optimisations for V8 * fixed build process from external packages, [#120](https://github.com/zloirock/core-js/pull/120) * one more `Object.{assign, values, entries}` fix for [**very** specific case](https://github.com/ljharb/proposal-object-values-entries/issues/5) ##### 1.2.1 - 2015.10.02 * replaced fix `JSON.stringify` + `Symbol` behavior from `.toJSON` method to wrapping `JSON.stringify` - little more correct, [compat-table/642](https://github.com/kangax/compat-table/pull/642) * fixed typo which broke tasks scheduler in WebWorkers in old FF, [#114](https://github.com/zloirock/core-js/pull/114) ##### 1.2.0 - 2015.09.27 * added browser [`Promise` rejection hook](#unhandled-rejection-tracking), [#106](https://github.com/zloirock/core-js/issues/106) * added correct [`IsRegExp`](http://www.ecma-international.org/ecma-262/6.0/#sec-isregexp) logic to [`String#{includes, startsWith, endsWith}`](https://github.com/zloirock/core-js/#ecmascript-6-string) and [`RegExp` constructor](https://github.com/zloirock/core-js/#ecmascript-6-regexp), `@@match` case, [example](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Symbol/match#Disabling_the_isRegExp_check) * updated [`String#leftPad`](https://github.com/zloirock/core-js/#ecmascript-7-proposals) [with proposal](https://github.com/ljharb/proposal-string-pad-left-right/issues/6): string filler truncated from the right side * replaced V8 [`Object.assign`](https://github.com/zloirock/core-js/#ecmascript-6-object) - its properties order not only [incorrect](https://github.com/sindresorhus/object-assign/issues/22), it is non-deterministic and it causes some problems * fixed behavior with deleted in getters properties for `Object.{`[`assign`](https://github.com/zloirock/core-js/#ecmascript-6-object)`, `[`entries, values`](https://github.com/zloirock/core-js/#ecmascript-7-proposals)`}`, [example](http://goo.gl/iQE01c) * fixed [`Math.sinh`](https://github.com/zloirock/core-js/#ecmascript-6-math) with very small numbers in V8 near Chromium 38 * some other fixes and optimizations ##### 1.1.4 - 2015.09.05 * fixed support symbols in FF34-35 [`Object.assign`](https://github.com/zloirock/core-js/#ecmascript-6-object) * fixed [collections iterators](https://github.com/zloirock/core-js/#ecmascript-6-iterators) in FF25-26 * fixed non-generic WebKit [`Array.of`](https://github.com/zloirock/core-js/#ecmascript-6-array) * some other fixes and optimizations ##### 1.1.3 - 2015.08.29 * fixed support Node.js domains in [`Promise`](https://github.com/zloirock/core-js/#ecmascript-6-promise), [#103](https://github.com/zloirock/core-js/issues/103) ##### 1.1.2 - 2015.08.28 * added `toJSON` method to [`Symbol`](https://github.com/zloirock/core-js/#ecmascript-6-symbol) polyfill and to MS Edge implementation for expected `JSON.stringify` result w/o patching this method * replaced [`Reflect.construct`](https://github.com/zloirock/core-js/#ecmascript-6-reflect) implementations w/o correct support third argument * fixed `global` detection with changed `document.domain` in ~IE8, [#100](https://github.com/zloirock/core-js/issues/100) ##### 1.1.1 - 2015.08.20 * added more correct microtask implementation for [`Promise`](#ecmascript-6-promise) ##### 1.1.0 - 2015.08.17 * updated [string padding](https://github.com/zloirock/core-js/#ecmascript-7-proposals) to [actual proposal](https://github.com/ljharb/proposal-string-pad-left-right) - renamed, minor internal changes: * `String#lpad` -> `String#padLeft` * `String#rpad` -> `String#padRight` * added [string trim functions](#ecmascript-7-proposals) - [proposal](https://github.com/sebmarkbage/ecmascript-string-left-right-trim), defacto standard - required only for IE11- and fixed for some old engines: * `String#trimLeft` * `String#trimRight` * [`String#trim`](https://github.com/zloirock/core-js/#ecmascript-6-string) fixed for some engines by es6 spec and moved from `es5` to single `es6` module * splitted [`es6.object.statics-accept-primitives`](https://github.com/zloirock/core-js/#ecmascript-6-object) * caps for `freeze`-family `Object` methods moved from `es5` to `es6` namespace and joined with [es6 wrappers](https://github.com/zloirock/core-js/#ecmascript-6-object) * `es5` [namespace](https://github.com/zloirock/core-js/#commonjs) also includes modules, moved to `es6` namespace - you can use it as before * increased `MessageChannel` priority in `$.task`, [#95](https://github.com/zloirock/core-js/issues/95) * does not get `global.Symbol` on each getting iterator, if you wanna use alternative `Symbol` shim - add it before `core-js` * [`Reflect.construct`](https://github.com/zloirock/core-js/#ecmascript-6-reflect) optimized and fixed for some cases * simplified [`Reflect.enumerate`](https://github.com/zloirock/core-js/#ecmascript-6-reflect), see [this question](https://esdiscuss.org/topic/question-about-enumerate-and-property-decision-timing) * some corrections in [`Math.acosh`](https://github.com/zloirock/core-js/#ecmascript-6-math) * fixed [`Math.imul`](https://github.com/zloirock/core-js/#ecmascript-6-math) for old WebKit * some fixes in string / RegExp [well-known symbols](https://github.com/zloirock/core-js/#ecmascript-6-regexp) logic * some other fixes and optimizations ##### 1.0.1 - 2015.07.31 * some fixes for final MS Edge, replaced broken native `Reflect.defineProperty` * some minor fixes and optimizations * changed compression `client/*.min.js` options for safe `Function#name` and `Function#length`, should be fixed [#92](https://github.com/zloirock/core-js/issues/92) ##### 1.0.0 - 2015.07.22 * added logic for [well-known symbols](https://github.com/zloirock/core-js/#ecmascript-6-regexp): * `Symbol.match` * `Symbol.replace` * `Symbol.split` * `Symbol.search` * actualized and optimized work with iterables: * optimized [`Map`, `Set`, `WeakMap`, `WeakSet` constructors](https://github.com/zloirock/core-js/#ecmascript-6-collections), [`Promise.all`, `Promise.race`](https://github.com/zloirock/core-js/#ecmascript-6-promise) for default `Array Iterator` * optimized [`Array.from`](https://github.com/zloirock/core-js/#ecmascript-6-array) for default `Array Iterator` * added [`core.getIteratorMethod`](https://github.com/zloirock/core-js/#ecmascript-6-iterators) helper * uses enumerable properties in shimmed instances - collections, iterators, etc for optimize performance * added support native constructors to [`Reflect.construct`](https://github.com/zloirock/core-js/#ecmascript-6-reflect) with 2 arguments * added support native constructors to [`Function#bind`](https://github.com/zloirock/core-js/#ecmascript-5) shim with `new` * removed obsolete `.clear` methods native [`Weak`-collections](https://github.com/zloirock/core-js/#ecmascript-6-collections) * maximum modularity, reduced minimal custom build size, separated into submodules: * [`es6.reflect`](https://github.com/zloirock/core-js/#ecmascript-6-reflect) * [`es6.regexp`](https://github.com/zloirock/core-js/#ecmascript-6-regexp) * [`es6.math`](https://github.com/zloirock/core-js/#ecmascript-6-math) * [`es6.number`](https://github.com/zloirock/core-js/#ecmascript-6-number) * [`es7.object.to-array`](https://github.com/zloirock/core-js/#ecmascript-7-proposals) * [`core.object`](https://github.com/zloirock/core-js/#object) * [`core.string`](https://github.com/zloirock/core-js/#escaping-strings) * [`core.iter-helpers`](https://github.com/zloirock/core-js/#ecmascript-6-iterators) * internal modules (`$`, `$.iter`, etc) * many other optimizations * final cleaning non-standard features * moved `$for` to [separate library](https://github.com/zloirock/forof). This work for syntax - `for-of` loop and comprehensions * moved `Date#{format, formatUTC}` to [separate library](https://github.com/zloirock/dtf). Standard way for this - `ECMA-402` * removed `Math` methods from `Number.prototype`. Slight sugar for simple `Math` methods calling * removed `{Array#, Array, Dict}.turn` * removed `core.global` * uses `ToNumber` instead of `ToLength` in [`Number Iterator`](https://github.com/zloirock/core-js/#number-iterator), `Array.from(2.5)` will be `[0, 1, 2]` instead of `[0, 1]` * fixed [#85](https://github.com/zloirock/core-js/issues/85) - invalid `Promise` unhandled rejection message in nested `setTimeout` * fixed [#86](https://github.com/zloirock/core-js/issues/86) - support FF extensions * fixed [#89](https://github.com/zloirock/core-js/issues/89) - behavior `Number` constructor in strange case ##### 0.9.18 - 2015.06.17 * removed `/` from [`RegExp.escape`](https://github.com/zloirock/core-js/#ecmascript-7-proposals) escaped characters ##### 0.9.17 - 2015.06.14 * updated [`RegExp.escape`](https://github.com/zloirock/core-js/#ecmascript-7-proposals) to the [latest proposal](https://github.com/benjamingr/RexExp.escape) * fixed conflict with webpack dev server + IE buggy behavior ##### 0.9.16 - 2015.06.11 * more correct order resolving thenable in [`Promise`](https://github.com/zloirock/core-js/#ecmascript-6-promise) polyfill * uses polyfill instead of [buggy V8 `Promise`](https://github.com/zloirock/core-js/issues/78) ##### 0.9.15 - 2015.06.09 * [collections](https://github.com/zloirock/core-js/#ecmascript-6-collections) from `library` version return wrapped native instances * fixed collections prototype methods in `library` version * optimized [`Math.hypot`](https://github.com/zloirock/core-js/#ecmascript-6-math) ##### 0.9.14 - 2015.06.04 * updated [`Promise.resolve` behavior](https://esdiscuss.org/topic/fixing-promise-resolve) * added fallback for IE11 buggy `Object.getOwnPropertyNames` + iframe * some other fixes ##### 0.9.13 - 2015.05.25 * added fallback for [`Symbol` polyfill](https://github.com/zloirock/core-js/#ecmascript-6-symbol) for old Android * some other fixes ##### 0.9.12 - 2015.05.24 * different instances `core-js` should use / recognize the same symbols * some fixes ##### 0.9.11 - 2015.05.18 * simplified [custom build](https://github.com/zloirock/core-js/#custom-build) * add custom build js api * added `grunt-cli` to `devDependencies` for `npm run grunt` * some fixes ##### 0.9.10 - 2015.05.16 * wrapped `Function#toString` for correct work wrapped methods / constructors with methods similar to the [`lodash` `isNative`](https://github.com/lodash/lodash/issues/1197) * added proto versions of methods to export object in `default` version for consistency with `library` version ##### 0.9.9 - 2015.05.14 * wrapped `Object#propertyIsEnumerable` for [`Symbol` polyfill](https://github.com/zloirock/core-js/#ecmascript-6-symbol) * [added proto versions of methods to `library` for ES7 bind syntax](https://github.com/zloirock/core-js/issues/65) * some other fixes ##### 0.9.8 - 2015.05.12 * fixed [`Math.hypot`](https://github.com/zloirock/core-js/#ecmascript-6-math) with negative arguments * added `Object#toString.toString` as fallback for [`lodash` `isNative`](https://github.com/lodash/lodash/issues/1197) ##### 0.9.7 - 2015.05.07 * added [support DOM collections](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/slice#Streamlining_cross-browser_behavior) to IE8- `Array#slice` ##### 0.9.6 - 2015.05.01 * added [`String#lpad`, `String#rpad`](https://github.com/zloirock/core-js/#ecmascript-7-proposals) ##### 0.9.5 - 2015.04.30 * added cap for `Function#@@hasInstance` * some fixes and optimizations ##### 0.9.4 - 2015.04.27 * fixed `RegExp` constructor ##### 0.9.3 - 2015.04.26 * some fixes and optimizations ##### 0.9.2 - 2015.04.25 * more correct [`Promise`](https://github.com/zloirock/core-js/#ecmascript-6-promise) unhandled rejection tracking and resolving / rejection priority ##### 0.9.1 - 2015.04.25 * fixed `__proto__`-based [`Promise`](https://github.com/zloirock/core-js/#ecmascript-6-promise) subclassing in some environments ##### 0.9.0 - 2015.04.24 * added correct [symbols](https://github.com/zloirock/core-js/#ecmascript-6-symbol) descriptors * fixed behavior `Object.{assign, create, defineProperty, defineProperties, getOwnPropertyDescriptor, getOwnPropertyDescriptors}` with symbols * added [single entry points](https://github.com/zloirock/core-js/#commonjs) for `Object.{create, defineProperty, defineProperties}` * added [`Map#toJSON`](https://github.com/zloirock/core-js/#ecmascript-7-proposals) * removed non-standard methods `Object#[_]` and `Function#only` - they solves syntax problems, but now in compilers available arrows and ~~in near future will be available~~ [available](http://babeljs.io/blog/2015/05/14/function-bind/) [bind syntax](https://github.com/zenparsing/es-function-bind) * removed non-standard undocumented methods `Symbol.{pure, set}` * some fixes and internal changes ##### 0.8.4 - 2015.04.18 * uses `webpack` instead of `browserify` for browser builds - more compression-friendly result ##### 0.8.3 - 2015.04.14 * fixed `Array` statics with single entry points ##### 0.8.2 - 2015.04.13 * [`Math.fround`](https://github.com/zloirock/core-js/#ecmascript-6-math) now also works in IE9- * added [`Set#toJSON`](https://github.com/zloirock/core-js/#ecmascript-7-proposals) * some optimizations and fixes ##### 0.8.1 - 2015.04.03 * fixed `Symbol.keyFor` ##### 0.8.0 - 2015.04.02 * changed [CommonJS API](https://github.com/zloirock/core-js/#commonjs) * splitted and renamed some modules * added support ES3 environment (ES5 polyfill) to **all** default versions - size increases slightly (+ ~4kb w/o gzip), many issues disappear, if you don't need it - [simply include only required namespaces / features / modules](https://github.com/zloirock/core-js/#commonjs) * removed [abstract references](https://github.com/zenparsing/es-abstract-refs) support - proposal has been superseded =\ * [`$for.isIterable` -> `core.isIterable`, `$for.getIterator` -> `core.getIterator`](https://github.com/zloirock/core-js/#ecmascript-6-iterators), temporary available in old namespace * fixed iterators support in v8 `Promise.all` and `Promise.race` * many other fixes ##### 0.7.2 - 2015.03.09 * some fixes ##### 0.7.1 - 2015.03.07 * some fixes ##### 0.7.0 - 2015.03.06 * rewritten and splitted into [CommonJS modules](https://github.com/zloirock/core-js/#commonjs) ##### 0.6.1 - 2015.02.24 * fixed support [`Object.defineProperty`](https://github.com/zloirock/core-js/#ecmascript-5) with accessors on DOM elements on IE8 ##### 0.6.0 - 2015.02.23 * added support safe closing iteration - calling `iterator.return` on abort iteration, if it exists * added basic support [`Promise`](https://github.com/zloirock/core-js/#ecmascript-6-promise) unhandled rejection tracking in shim * added [`Object.getOwnPropertyDescriptors`](https://github.com/zloirock/core-js/#ecmascript-7-proposals) * removed `console` cap - creates too many problems * restructuring [namespaces](https://github.com/zloirock/core-js/#custom-build) * some fixes ##### 0.5.4 - 2015.02.15 * some fixes ##### 0.5.3 - 2015.02.14 * added [support binary and octal literals](https://github.com/zloirock/core-js/#ecmascript-6-number) to `Number` constructor * added [`Date#toISOString`](https://github.com/zloirock/core-js/#ecmascript-5) ##### 0.5.2 - 2015.02.10 * some fixes ##### 0.5.1 - 2015.02.09 * some fixes ##### 0.5.0 - 2015.02.08 * systematization of modules * splitted [`es6` module](https://github.com/zloirock/core-js/#ecmascript-6) * splitted `console` module: `web.console` - only cap for missing methods, `core.log` - bound methods & additional features * added [`delay` method](https://github.com/zloirock/core-js/#delay) * some fixes ##### 0.4.10 - 2015.01.28 * [`Object.getOwnPropertySymbols`](https://github.com/zloirock/core-js/#ecmascript-6-symbol) polyfill returns array of wrapped keys ##### 0.4.9 - 2015.01.27 * FF20-24 fix ##### 0.4.8 - 2015.01.25 * some [collections](https://github.com/zloirock/core-js/#ecmascript-6-collections) fixes ##### 0.4.7 - 2015.01.25 * added support frozen objects as [collections](https://github.com/zloirock/core-js/#ecmascript-6-collections) keys ##### 0.4.6 - 2015.01.21 * added [`Object.getOwnPropertySymbols`](https://github.com/zloirock/core-js/#ecmascript-6-symbol) * added [`NodeList.prototype[@@iterator]`](https://github.com/zloirock/core-js/#ecmascript-6-iterators) * added basic `@@species` logic - getter in native constructors * removed `Function#by` * some fixes ##### 0.4.5 - 2015.01.16 * some fixes ##### 0.4.4 - 2015.01.11 * enabled CSP support ##### 0.4.3 - 2015.01.10 * added `Function` instances `name` property for IE9+ ##### 0.4.2 - 2015.01.10 * `Object` static methods accept primitives * `RegExp` constructor can alter flags (IE9+) * added `Array.prototype[Symbol.unscopables]` ##### 0.4.1 - 2015.01.05 * some fixes ##### 0.4.0 - 2015.01.03 * added [`es6.reflect`](https://github.com/zloirock/core-js/#ecmascript-6-reflect) module: * added `Reflect.apply` * added `Reflect.construct` * added `Reflect.defineProperty` * added `Reflect.deleteProperty` * added `Reflect.enumerate` * added `Reflect.get` * added `Reflect.getOwnPropertyDescriptor` * added `Reflect.getPrototypeOf` * added `Reflect.has` * added `Reflect.isExtensible` * added `Reflect.preventExtensions` * added `Reflect.set` * added `Reflect.setPrototypeOf` * `core-js` methods now can use external `Symbol.iterator` polyfill * some fixes ##### 0.3.3 - 2014.12.28 * [console cap](https://github.com/zloirock/core-js/#console) excluded from node.js default builds ##### 0.3.2 - 2014.12.25 * added cap for [ES5](https://github.com/zloirock/core-js/#ecmascript-5) freeze-family methods * fixed `console` bug ##### 0.3.1 - 2014.12.23 * some fixes ##### 0.3.0 - 2014.12.23 * Optimize [`Map` & `Set`](https://github.com/zloirock/core-js/#ecmascript-6-collections): * use entries chain on hash table * fast & correct iteration * iterators moved to [`es6`](https://github.com/zloirock/core-js/#ecmascript-6) and [`es6.collections`](https://github.com/zloirock/core-js/#ecmascript-6-collections) modules ##### 0.2.5 - 2014.12.20 * `console` no longer shortcut for `console.log` (compatibility problems) * some fixes ##### 0.2.4 - 2014.12.17 * better compliance of ES6 * added [`Math.fround`](https://github.com/zloirock/core-js/#ecmascript-6-math) (IE10+) * some fixes ##### 0.2.3 - 2014.12.15 * [Symbols](https://github.com/zloirock/core-js/#ecmascript-6-symbol): * added option to disable addition setter to `Object.prototype` for Symbol polyfill: * added `Symbol.useSimple` * added `Symbol.useSetter` * added cap for well-known Symbols: * added `Symbol.hasInstance` * added `Symbol.isConcatSpreadable` * added `Symbol.match` * added `Symbol.replace` * added `Symbol.search` * added `Symbol.species` * added `Symbol.split` * added `Symbol.toPrimitive` * added `Symbol.unscopables` ##### 0.2.2 - 2014.12.13 * added [`RegExp#flags`](https://github.com/zloirock/core-js/#ecmascript-6-regexp) ([December 2014 Draft Rev 29](http://wiki.ecmascript.org/doku.php?id=harmony:specification_drafts#december_6_2014_draft_rev_29)) * added [`String.raw`](https://github.com/zloirock/core-js/#ecmascript-6-string) ##### 0.2.1 - 2014.12.12 * repair converting -0 to +0 in [native collections](https://github.com/zloirock/core-js/#ecmascript-6-collections) ##### 0.2.0 - 2014.12.06 * added [`es7.proposals`](https://github.com/zloirock/core-js/#ecmascript-7-proposals) and [`es7.abstract-refs`](https://github.com/zenparsing/es-abstract-refs) modules * added [`String#at`](https://github.com/zloirock/core-js/#ecmascript-7-proposals) * added real [`String Iterator`](https://github.com/zloirock/core-js/#ecmascript-6-iterators), older versions used Array Iterator * added abstract references support: * added `Symbol.referenceGet` * added `Symbol.referenceSet` * added `Symbol.referenceDelete` * added `Function#@@referenceGet` * added `Map#@@referenceGet` * added `Map#@@referenceSet` * added `Map#@@referenceDelete` * added `WeakMap#@@referenceGet` * added `WeakMap#@@referenceSet` * added `WeakMap#@@referenceDelete` * added `Dict.{...methods}[@@referenceGet]` * removed deprecated `.contains` methods * some fixes ##### 0.1.5 - 2014.12.01 * added [`Array#copyWithin`](https://github.com/zloirock/core-js/#ecmascript-6-array) * added [`String#codePointAt`](https://github.com/zloirock/core-js/#ecmascript-6-string) * added [`String.fromCodePoint`](https://github.com/zloirock/core-js/#ecmascript-6-string) ##### 0.1.4 - 2014.11.27 * added [`Dict.mapPairs`](https://github.com/zloirock/core-js/#dict) ##### 0.1.3 - 2014.11.20 * [TC39 November meeting](https://github.com/rwaldron/tc39-notes/tree/master/es6/2014-11): * [`.contains` -> `.includes`](https://github.com/rwaldron/tc39-notes/blob/master/es6/2014-11/nov-18.md#51--44-arrayprototypecontains-and-stringprototypecontains) * `String#contains` -> [`String#includes`](https://github.com/zloirock/core-js/#ecmascript-6-string) * `Array#contains` -> [`Array#includes`](https://github.com/zloirock/core-js/#ecmascript-7-proposals) * `Dict.contains` -> [`Dict.includes`](https://github.com/zloirock/core-js/#dict) * [removed `WeakMap#clear`](https://github.com/rwaldron/tc39-notes/blob/master/es6/2014-11/nov-19.md#412-should-weakmapweakset-have-a-clear-method-markm) * [removed `WeakSet#clear`](https://github.com/rwaldron/tc39-notes/blob/master/es6/2014-11/nov-19.md#412-should-weakmapweakset-have-a-clear-method-markm) ##### 0.1.2 - 2014.11.19 * `Map` & `Set` bug fix ##### 0.1.1 - 2014.11.18 * public releasecore-js-2.4.1/Gruntfile.js000066400000000000000000000001051274277553300153700ustar00rootroot00000000000000require('LiveScript'); module.exports = require('./build/Gruntfile');core-js-2.4.1/LICENSE000066400000000000000000000020501274277553300141010ustar00rootroot00000000000000Copyright (c) 2014-2016 Denis Pushkarev Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. core-js-2.4.1/README.md000066400000000000000000002623611274277553300143700ustar00rootroot00000000000000# core-js [![Gitter](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/zloirock/core-js?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge) [![version](https://img.shields.io/npm/v/core-js.svg)](https://www.npmjs.com/package/core-js) [![npm downloads](https://img.shields.io/npm/dm/core-js.svg)](http://npm-stat.com/charts.html?package=core-js&author=&from=2014-11-18&to=2114-11-18) [![Build Status](https://travis-ci.org/zloirock/core-js.svg)](https://travis-ci.org/zloirock/core-js) [![devDependency status](https://david-dm.org/zloirock/core-js/dev-status.svg)](https://david-dm.org/zloirock/core-js#info=devDependencies) #### As advertising: the author is looking for a good job :) Modular standard library for JavaScript. Includes polyfills for [ECMAScript 5](#ecmascript-5), [ECMAScript 6](#ecmascript-6): [promises](#ecmascript-6-promise), [symbols](#ecmascript-6-symbol), [collections](#ecmascript-6-collections), iterators, [typed arrays](#ecmascript-6-typed-arrays), [ECMAScript 7+ proposals](#ecmascript-7-proposals), [setImmediate](#setimmediate), etc. Some additional features such as [dictionaries](#dict) or [extended partial application](#partial-application). You can require only needed features or use it without global namespace pollution. [*Example*](http://goo.gl/a2xexl): ```js Array.from(new Set([1, 2, 3, 2, 1])); // => [1, 2, 3] '*'.repeat(10); // => '**********' Promise.resolve(32).then(x => console.log(x)); // => 32 setImmediate(x => console.log(x), 42); // => 42 ``` [*Without global namespace pollution*](http://goo.gl/paOHb0): ```js var core = require('core-js/library'); // With a modular system, otherwise use global `core` core.Array.from(new core.Set([1, 2, 3, 2, 1])); // => [1, 2, 3] core.String.repeat('*', 10); // => '**********' core.Promise.resolve(32).then(x => console.log(x)); // => 32 core.setImmediate(x => console.log(x), 42); // => 42 ``` ### Index - [Usage](#usage) - [Basic](#basic) - [CommonJS](#commonjs) - [Custom build](#custom-build-from-the-command-line) - [Supported engines](#supported-engines) - [Features](#features) - [ECMAScript 5](#ecmascript-5) - [ECMAScript 6](#ecmascript-6) - [ECMAScript 6: Object](#ecmascript-6-object) - [ECMAScript 6: Function](#ecmascript-6-function) - [ECMAScript 6: Array](#ecmascript-6-array) - [ECMAScript 6: String](#ecmascript-6-string) - [ECMAScript 6: RegExp](#ecmascript-6-regexp) - [ECMAScript 6: Number](#ecmascript-6-number) - [ECMAScript 6: Math](#ecmascript-6-math) - [ECMAScript 6: Date](#ecmascript-6-date) - [ECMAScript 6: Promise](#ecmascript-6-promise) - [ECMAScript 6: Symbol](#ecmascript-6-symbol) - [ECMAScript 6: Collections](#ecmascript-6-collections) - [ECMAScript 6: Typed Arrays](#ecmascript-6-typed-arrays) - [ECMAScript 6: Reflect](#ecmascript-6-reflect) - [ECMAScript 7+ proposals](#ecmascript-7-proposals) - [stage 4 proposals](#stage-4-proposals) - [stage 3 proposals](#stage-3-proposals) - [stage 2 proposals](#stage-2-proposals) - [stage 1 proposals](#stage-1-proposals) - [stage 0 proposals](#stage-0-proposals) - [pre-stage 0 proposals](#pre-stage-0-proposals) - [Web standards](#web-standards) - [setTimeout / setInterval](#settimeout--setinterval) - [setImmediate](#setimmediate) - [iterable DOM collections](#iterable-dom-collections) - [Non-standard](#non-standard) - [Object](#object) - [Dict](#dict) - [partial application](#partial-application) - [Number Iterator](#number-iterator) - [escaping strings](#escaping-strings) - [delay](#delay) - [helpers for iterators](#helpers-for-iterators) - [Missing polyfills](#missing-polyfills) - [Changelog](./CHANGELOG.md) ## Usage ### Basic ``` npm i core-js bower install core.js ``` ```js // Default require('core-js'); // Without global namespace pollution var core = require('core-js/library'); // Shim only require('core-js/shim'); ``` If you need complete build for browser, use builds from `core-js/client` path: * [default](https://raw.githack.com/zloirock/core-js/v2.4.1/client/core.min.js): Includes all features, standard and non-standard. * [as a library](https://raw.githack.com/zloirock/core-js/v2.4.1/client/library.min.js): Like "default", but does not pollute the global namespace (see [2nd example at the top](#core-js)). * [shim only](https://raw.githack.com/zloirock/core-js/v2.4.1/client/shim.min.js): Only includes the standard methods. Warning: if you use `core-js` with the extension of native objects, require all needed `core-js` modules at the beginning of entry point of your application, otherwise, conflicts may occur. ### CommonJS You can require only needed modules. ```js require('core-js/fn/set'); require('core-js/fn/array/from'); require('core-js/fn/array/find-index'); Array.from(new Set([1, 2, 3, 2, 1])); // => [1, 2, 3] [1, 2, NaN, 3, 4].findIndex(isNaN); // => 2 // or, w/o global namespace pollution: var Set = require('core-js/library/fn/set'); var from = require('core-js/library/fn/array/from'); var findIndex = require('core-js/library/fn/array/find-index'); from(new Set([1, 2, 3, 2, 1])); // => [1, 2, 3] findIndex([1, 2, NaN, 3, 4], isNaN); // => 2 ``` Available entry points for methods / constructors, as above examples, and namespaces: for example, `core-js/es6/array` (`core-js/library/es6/array`) contains all [ES6 `Array` features](#ecmascript-6-array), `core-js/es6` (`core-js/library/es6`) contains all ES6 features. ##### Caveats when using CommonJS API: * `modules` path is internal API, does not inject all required dependencies and can be changed in minor or patch releases. Use it only for a custom build and / or if you know what are you doing. * `core-js` is extremely modular and uses a lot of very tiny modules, because of that for usage in browsers bundle up `core-js` instead of usage loader for each file, otherwise, you will have hundreds of requests. #### CommonJS and prototype methods without global namespace pollution In the `library` version, we can't pollute prototypes of native constructors. Because of that, prototype methods transformed to static methods like in examples above. `babel` `runtime` transformer also can't transform them. But with transpilers we can use one more trick - [bind operator and virtual methods](https://github.com/zenparsing/es-function-bind). Special for that, available `/virtual/` entry points. Example: ```js import fill from 'core-js/library/fn/array/virtual/fill'; import findIndex from 'core-js/library/fn/array/virtual/find-index'; Array(10)::fill(0).map((a, b) => b * b)::findIndex(it => it && !(it % 8)); // => 4 // or import {fill, findIndex} from 'core-js/library/fn/array/virtual'; Array(10)::fill(0).map((a, b) => b * b)::findIndex(it => it && !(it % 8)); // => 4 ``` ### Custom build (from the command-line) ``` npm i core-js && cd node_modules/core-js && npm i npm run grunt build:core.dict,es6 -- --blacklist=es6.promise,es6.math --library=on --path=custom uglify ``` Where `core.dict` and `es6` are modules (namespaces) names, which will be added to the build, `es6.promise` and `es6.math` are modules (namespaces) names, which will be excluded from the build, `--library=on` is flag for build without global namespace pollution and `custom` is target file name. Available namespaces: for example, `es6.array` contains [ES6 `Array` features](#ecmascript-6-array), `es6` contains all modules whose names start with `es6`. ### Custom build (from external scripts) [`core-js-builder`](https://www.npmjs.com/package/core-js-builder) package exports a function that takes the same parameters as the `build` target from the previous section. This will conditionally include or exclude certain parts of `core-js`: ```js require('core-js-builder')({ modules: ['es6', 'core.dict'], // modules / namespaces blacklist: ['es6.reflect'], // blacklist of modules / namespaces, by default - empty list library: false, // flag for build without global namespace pollution, by default - false umd: true // use UMD wrapper for export `core` object, by default - true }).then(code => { // ... }).catch(error => { // ... }); ``` ## Supported engines **Tested in:** - Chrome 26+ - Firefox 4+ - Safari 5+ - Opera 12+ - Internet Explorer 6+ (sure, IE8- with ES3 limitations) - Edge - Android Browser 2.3+ - iOS Safari 5.1+ - PhantomJS 1.9 / 2.1 - NodeJS 0.8+ ...and it doesn't mean `core-js` will not work in other engines, they just have not been tested. ## Features: [*CommonJS entry points:*](#commonjs) ``` core-js(/library) <- all features core-js(/library)/shim <- only polyfills ``` ### ECMAScript 5 All features moved to the [`es6` namespace](#ecmascript-6), here just a list of features: ```js Object .create(proto | null, descriptors?) -> object .getPrototypeOf(object) -> proto | null .defineProperty(target, key, desc) -> target, cap for ie8- .defineProperties(target, descriptors) -> target, cap for ie8- .getOwnPropertyDescriptor(object, key) -> desc .getOwnPropertyNames(object) -> array .keys(object) -> array .seal(object) -> object, cap for ie8- .freeze(object) -> object, cap for ie8- .preventExtensions(object) -> object, cap for ie8- .isSealed(object) -> bool, cap for ie8- .isFrozen(object) -> bool, cap for ie8- .isExtensible(object) -> bool, cap for ie8- Array .isArray(var) -> bool #slice(start?, end?) -> array, fix for ie7- #join(string = ',') -> string, fix for ie7- #indexOf(var, from?) -> int #lastIndexOf(var, from?) -> int #every(fn(val, index, @), that) -> bool #some(fn(val, index, @), that) -> bool #forEach(fn(val, index, @), that) -> void #map(fn(val, index, @), that) -> array #filter(fn(val, index, @), that) -> array #reduce(fn(memo, val, index, @), memo?) -> var #reduceRight(fn(memo, val, index, @), memo?) -> var #sort(fn?) -> @, fixes for some engines Function #bind(object, ...args) -> boundFn(...args) String #split(separator, limit) -> array #trim() -> str RegExp #toString() -> str Number #toFixed(digits) -> string #toPrecision(precision) -> string parseInt(str, radix) -> int parseFloat(str) -> num Date .now() -> int #toISOString() -> string #toJSON() -> string ``` [*CommonJS entry points:*](#commonjs) ``` core-js(/library)/es5 ``` ### ECMAScript 6 [*CommonJS entry points:*](#commonjs) ``` core-js(/library)/es6 ``` #### ECMAScript 6: Object Modules [`es6.object.assign`](https://github.com/zloirock/core-js/blob/v2.4.1/modules/es6.object.assign.js), [`es6.object.is`](https://github.com/zloirock/core-js/blob/v2.4.1/modules/es6.object.is.js), [`es6.object.set-prototype-of`](https://github.com/zloirock/core-js/blob/v2.4.1/modules/es6.object.set-prototype-of.js) and [`es6.object.to-string`](https://github.com/zloirock/core-js/blob/v2.4.1/modules/es6.object.to-string.js). In ES6 most `Object` static methods should work with primitives. Modules [`es6.object.freeze`](https://github.com/zloirock/core-js/blob/v2.4.1/modules/es6.object.freeze.js), [`es6.object.seal`](https://github.com/zloirock/core-js/blob/v2.4.1/modules/es6.object.seal.js), [`es6.object.prevent-extensions`](https://github.com/zloirock/core-js/blob/v2.4.1/modules/es6.object.prevent-extensions.js), [`es6.object.is-frozen`](https://github.com/zloirock/core-js/blob/v2.4.1/modules/es6.object.is-frozen.js), [`es6.object.is-sealed`](https://github.com/zloirock/core-js/blob/v2.4.1/modules/es6.object.is-sealed.js), [`es6.object.is-extensible`](https://github.com/zloirock/core-js/blob/v2.4.1/modules/es6.object.is-extensible.js), [`es6.object.get-own-property-descriptor`](https://github.com/zloirock/core-js/blob/v2.4.1/modules/es6.object.get-own-property-descriptor.js), [`es6.object.get-prototype-of`](https://github.com/zloirock/core-js/blob/v2.4.1/modules/es6.object.get-prototype-of.js), [`es6.object.keys`](https://github.com/zloirock/core-js/blob/v2.4.1/modules/es6.object.keys.js) and [`es6.object.get-own-property-names`](https://github.com/zloirock/core-js/blob/v2.4.1/modules/es6.object.get-own-property-names.js). Just ES5 features: [`es6.object.create`](https://github.com/zloirock/core-js/blob/v2.4.1/modules/es6.object.create.js), [`es6.object.define-property`](https://github.com/zloirock/core-js/blob/v2.4.1/modules/es6.object.define-property.js) and [`es6.object.define-properties`](https://github.com/zloirock/core-js/blob/v2.4.1/modules/es6.object.es6.object.define-properties.js). ```js Object .assign(target, ...src) -> target .is(a, b) -> bool .setPrototypeOf(target, proto | null) -> target (required __proto__ - IE11+) .create(object | null, descriptors?) -> object .getPrototypeOf(var) -> object | null .defineProperty(object, key, desc) -> target .defineProperties(object, descriptors) -> target .getOwnPropertyDescriptor(var, key) -> desc | undefined .keys(var) -> array .getOwnPropertyNames(var) -> array .freeze(var) -> var .seal(var) -> var .preventExtensions(var) -> var .isFrozen(var) -> bool .isSealed(var) -> bool .isExtensible(var) -> bool #toString() -> string, ES6 fix: @@toStringTag support ``` [*CommonJS entry points:*](#commonjs) ``` core-js(/library)/es6/object core-js(/library)/fn/object/assign core-js(/library)/fn/object/is core-js(/library)/fn/object/set-prototype-of core-js(/library)/fn/object/get-prototype-of core-js(/library)/fn/object/create core-js(/library)/fn/object/define-property core-js(/library)/fn/object/define-properties core-js(/library)/fn/object/get-own-property-descriptor core-js(/library)/fn/object/keys core-js(/library)/fn/object/get-own-property-names core-js(/library)/fn/object/freeze core-js(/library)/fn/object/seal core-js(/library)/fn/object/prevent-extensions core-js(/library)/fn/object/is-frozen core-js(/library)/fn/object/is-sealed core-js(/library)/fn/object/is-extensible core-js/fn/object/to-string ``` [*Examples*](http://goo.gl/ywdwPz): ```js var foo = {q: 1, w: 2} , bar = {e: 3, r: 4} , baz = {t: 5, y: 6}; Object.assign(foo, bar, baz); // => foo = {q: 1, w: 2, e: 3, r: 4, t: 5, y: 6} Object.is(NaN, NaN); // => true Object.is(0, -0); // => false Object.is(42, 42); // => true Object.is(42, '42'); // => false function Parent(){} function Child(){} Object.setPrototypeOf(Child.prototype, Parent.prototype); new Child instanceof Child; // => true new Child instanceof Parent; // => true var O = {}; O[Symbol.toStringTag] = 'Foo'; '' + O; // => '[object Foo]' Object.keys('qwe'); // => ['0', '1', '2'] Object.getPrototypeOf('qwe') === String.prototype; // => true ``` #### ECMAScript 6: Function Modules [`es6.function.name`](https://github.com/zloirock/core-js/blob/v2.4.1/modules/es6.function.name.js), [`es6.function.has-instance`](https://github.com/zloirock/core-js/blob/v2.4.1/modules/es6.function.has-instance.js). Just ES5: [`es6.function.bind`](https://github.com/zloirock/core-js/blob/v2.4.1/modules/es6.function.bind.js). ```js Function #bind(object, ...args) -> boundFn(...args) #name -> string (IE9+) #@@hasInstance(var) -> bool ``` [*CommonJS entry points:*](#commonjs) ``` core-js/es6/function core-js/fn/function/name core-js/fn/function/has-instance core-js/fn/function/bind core-js/fn/function/virtual/bind ``` [*Example*](http://goo.gl/zqu3Wp): ```js (function foo(){}).name // => 'foo' console.log.bind(console, 42)(43); // => 42 43 ``` #### ECMAScript 6: Array Modules [`es6.array.from`](https://github.com/zloirock/core-js/blob/v2.4.1/modules/es6.array.from.js), [`es6.array.of`](https://github.com/zloirock/core-js/blob/v2.4.1/modules/es6.array.of.js), [`es6.array.copy-within`](https://github.com/zloirock/core-js/blob/v2.4.1/modules/es6.array.copy-within.js), [`es6.array.fill`](https://github.com/zloirock/core-js/blob/v2.4.1/modules/es6.array.fill.js), [`es6.array.find`](https://github.com/zloirock/core-js/blob/v2.4.1/modules/es6.array.find.js), [`es6.array.find-index`](https://github.com/zloirock/core-js/blob/v2.4.1/modules/es6.array.find-index.js), [`es6.array.iterator`](https://github.com/zloirock/core-js/blob/v2.4.1/modules/es6.array.iterator.js). ES5 features with fixes: [`es6.array.is-array`](https://github.com/zloirock/core-js/blob/v2.4.1/modules/es6.array.is-array.js), [`es6.array.slice`](https://github.com/zloirock/core-js/blob/v2.4.1/modules/es6.array.slice.js), [`es6.array.join`](https://github.com/zloirock/core-js/blob/v2.4.1/modules/es6.array.join.js), [`es6.array.index-of`](https://github.com/zloirock/core-js/blob/v2.4.1/modules/es6.array.index-of.js), [`es6.array.last-index-of`](https://github.com/zloirock/core-js/blob/v2.4.1/modules/es6.array.last-index-of.js), [`es6.array.every`](https://github.com/zloirock/core-js/blob/v2.4.1/modules/es6.array.every.js), [`es6.array.some`](https://github.com/zloirock/core-js/blob/v2.4.1/modules/es6.array.some.js), [`es6.array.for-each`](https://github.com/zloirock/core-js/blob/v2.4.1/modules/es6.array.for-each.js), [`es6.array.map`](https://github.com/zloirock/core-js/blob/v2.4.1/modules/es6.array.map.js), [`es6.array.filter`](https://github.com/zloirock/core-js/blob/v2.4.1/modules/es6.array.filter.js), [`es6.array.reduce`](https://github.com/zloirock/core-js/blob/v2.4.1/modules/es6.array.reduce.js), [`es6.array.reduce-right`](https://github.com/zloirock/core-js/blob/v2.4.1/modules/es6.array.reduce-right.js), [`es6.array.sort`](https://github.com/zloirock/core-js/blob/v2.4.1/modules/es6.array.sort.js). ```js Array .from(iterable | array-like, mapFn(val, index)?, that) -> array .of(...args) -> array .isArray(var) -> bool #copyWithin(target = 0, start = 0, end = @length) -> @ #fill(val, start = 0, end = @length) -> @ #find(fn(val, index, @), that) -> val #findIndex(fn(val, index, @), that) -> index | -1 #values() -> iterator #keys() -> iterator #entries() -> iterator #join(string = ',') -> string, fix for ie7- #slice(start?, end?) -> array, fix for ie7- #indexOf(var, from?) -> index | -1 #lastIndexOf(var, from?) -> index | -1 #every(fn(val, index, @), that) -> bool #some(fn(val, index, @), that) -> bool #forEach(fn(val, index, @), that) -> void #map(fn(val, index, @), that) -> array #filter(fn(val, index, @), that) -> array #reduce(fn(memo, val, index, @), memo?) -> var #reduceRight(fn(memo, val, index, @), memo?) -> var #sort(fn?) -> @, invalid arguments fix #@@iterator() -> iterator (values) #@@unscopables -> object (cap) Arguments #@@iterator() -> iterator (values, available only in core-js methods) ``` [*CommonJS entry points:*](#commonjs) ``` core-js(/library)/es6/array core-js(/library)/fn/array/from core-js(/library)/fn/array/of core-js(/library)/fn/array/is-array core-js(/library)/fn/array/iterator core-js(/library)/fn/array/copy-within core-js(/library)/fn/array/fill core-js(/library)/fn/array/find core-js(/library)/fn/array/find-index core-js(/library)/fn/array/values core-js(/library)/fn/array/keys core-js(/library)/fn/array/entries core-js(/library)/fn/array/slice core-js(/library)/fn/array/join core-js(/library)/fn/array/index-of core-js(/library)/fn/array/last-index-of core-js(/library)/fn/array/every core-js(/library)/fn/array/some core-js(/library)/fn/array/for-each core-js(/library)/fn/array/map core-js(/library)/fn/array/filter core-js(/library)/fn/array/reduce core-js(/library)/fn/array/reduce-right core-js(/library)/fn/array/sort core-js(/library)/fn/array/virtual/iterator core-js(/library)/fn/array/virtual/copy-within core-js(/library)/fn/array/virtual/fill core-js(/library)/fn/array/virtual/find core-js(/library)/fn/array/virtual/find-index core-js(/library)/fn/array/virtual/values core-js(/library)/fn/array/virtual/keys core-js(/library)/fn/array/virtual/entries core-js(/library)/fn/array/virtual/slice core-js(/library)/fn/array/virtual/join core-js(/library)/fn/array/virtual/index-of core-js(/library)/fn/array/virtual/last-index-of core-js(/library)/fn/array/virtual/every core-js(/library)/fn/array/virtual/some core-js(/library)/fn/array/virtual/for-each core-js(/library)/fn/array/virtual/map core-js(/library)/fn/array/virtual/filter core-js(/library)/fn/array/virtual/reduce core-js(/library)/fn/array/virtual/reduce-right core-js(/library)/fn/array/virtual/sort ``` [*Examples*](http://goo.gl/oaUFUf): ```js Array.from(new Set([1, 2, 3, 2, 1])); // => [1, 2, 3] Array.from({0: 1, 1: 2, 2: 3, length: 3}); // => [1, 2, 3] Array.from('123', Number); // => [1, 2, 3] Array.from('123', function(it){ return it * it; }); // => [1, 4, 9] Array.of(1); // => [1] Array.of(1, 2, 3); // => [1, 2, 3] var array = ['a', 'b', 'c']; for(var val of array)console.log(val); // => 'a', 'b', 'c' for(var val of array.values())console.log(val); // => 'a', 'b', 'c' for(var key of array.keys())console.log(key); // => 0, 1, 2 for(var [key, val] of array.entries()){ console.log(key); // => 0, 1, 2 console.log(val); // => 'a', 'b', 'c' } function isOdd(val){ return val % 2; } [4, 8, 15, 16, 23, 42].find(isOdd); // => 15 [4, 8, 15, 16, 23, 42].findIndex(isOdd); // => 2 [4, 8, 15, 16, 23, 42].find(isNaN); // => undefined [4, 8, 15, 16, 23, 42].findIndex(isNaN); // => -1 Array(5).fill(42); // => [42, 42, 42, 42, 42] [1, 2, 3, 4, 5].copyWithin(0, 3); // => [4, 5, 3, 4, 5] ``` #### ECMAScript 6: String Modules [`es6.string.from-code-point`](https://github.com/zloirock/core-js/blob/v2.4.1/modules/es6.string.from-code-point.js), [`es6.string.raw`](https://github.com/zloirock/core-js/blob/v2.4.1/modules/es6.string.raw.js), [`es6.string.iterator`](https://github.com/zloirock/core-js/blob/v2.4.1/modules/es6.string.iterator.js), [`es6.string.code-point-at`](https://github.com/zloirock/core-js/blob/v2.4.1/modules/es6.string.code-point-at.js), [`es6.string.ends-with`](https://github.com/zloirock/core-js/blob/v2.4.1/modules/es6.string.ends-with.js), [`es6.string.includes`](https://github.com/zloirock/core-js/blob/v2.4.1/modules/es6.string.includes.js), [`es6.string.repeat`](https://github.com/zloirock/core-js/blob/v2.4.1/modules/es6.string.repeat.js), [`es6.string.starts-with`](https://github.com/zloirock/core-js/blob/v2.4.1/modules/es6.string.starts-with.js) and [`es6.string.trim`](https://github.com/zloirock/core-js/blob/v2.4.1/modules/es6.string.trim.js). Annex B HTML methods. Ugly, but it's also the part of the spec. Modules [`es6.string.anchor`](https://github.com/zloirock/core-js/blob/v2.4.1/modules/es6.string.anchor.js), [`es6.string.big`](https://github.com/zloirock/core-js/blob/v2.4.1/modules/es6.string.big.js), [`es6.string.blink`](https://github.com/zloirock/core-js/blob/v2.4.1/modules/es6.string.blink.js), [`es6.string.bold`](https://github.com/zloirock/core-js/blob/v2.4.1/modules/es6.string.bold.js), [`es6.string.fixed`](https://github.com/zloirock/core-js/blob/v2.4.1/modules/es6.string.fixed.js), [`es6.string.fontcolor`](https://github.com/zloirock/core-js/blob/v2.4.1/modules/es6.string.fontcolor.js), [`es6.string.fontsize`](https://github.com/zloirock/core-js/blob/v2.4.1/modules/es6.string.fontsize.js), [`es6.string.italics`](https://github.com/zloirock/core-js/blob/v2.4.1/modules/es6.string.italics.js), [`es6.string.link`](https://github.com/zloirock/core-js/blob/v2.4.1/modules/es6.string.link.js), [`es6.string.small`](https://github.com/zloirock/core-js/blob/v2.4.1/modules/es6.string.small.js), [`es6.string.strike`](https://github.com/zloirock/core-js/blob/v2.4.1/modules/es6.string.strike.js), [`es6.string.sub`](https://github.com/zloirock/core-js/blob/v2.4.1/modules/es6.string.sub.js) and [`es6.string.sup`](https://github.com/zloirock/core-js/blob/v2.4.1/modules/es6.string.sup.js). ```js String .fromCodePoint(...codePoints) -> str .raw({raw}, ...substitutions) -> str #includes(str, from?) -> bool #startsWith(str, from?) -> bool #endsWith(str, from?) -> bool #repeat(num) -> str #codePointAt(pos) -> uint #trim() -> str, ES6 fix #anchor(name) -> str #big() -> str #blink() -> str #bold() -> str #fixed() -> str #fontcolor(color) -> str #fontsize(size) -> str #italics() -> str #link(url) -> str #small() -> str #strike() -> str #sub() -> str #sup() -> str #@@iterator() -> iterator (code points) ``` [*CommonJS entry points:*](#commonjs) ``` core-js(/library)/es6/string core-js(/library)/fn/string/from-code-point core-js(/library)/fn/string/raw core-js(/library)/fn/string/includes core-js(/library)/fn/string/starts-with core-js(/library)/fn/string/ends-with core-js(/library)/fn/string/repeat core-js(/library)/fn/string/code-point-at core-js(/library)/fn/string/trim core-js(/library)/fn/string/anchor core-js(/library)/fn/string/big core-js(/library)/fn/string/blink core-js(/library)/fn/string/bold core-js(/library)/fn/string/fixed core-js(/library)/fn/string/fontcolor core-js(/library)/fn/string/fontsize core-js(/library)/fn/string/italics core-js(/library)/fn/string/link core-js(/library)/fn/string/small core-js(/library)/fn/string/strike core-js(/library)/fn/string/sub core-js(/library)/fn/string/sup core-js(/library)/fn/string/iterator core-js(/library)/fn/string/virtual/includes core-js(/library)/fn/string/virtual/starts-with core-js(/library)/fn/string/virtual/ends-with core-js(/library)/fn/string/virtual/repeat core-js(/library)/fn/string/virtual/code-point-at core-js(/library)/fn/string/virtual/trim core-js(/library)/fn/string/virtual/anchor core-js(/library)/fn/string/virtual/big core-js(/library)/fn/string/virtual/blink core-js(/library)/fn/string/virtual/bold core-js(/library)/fn/string/virtual/fixed core-js(/library)/fn/string/virtual/fontcolor core-js(/library)/fn/string/virtual/fontsize core-js(/library)/fn/string/virtual/italics core-js(/library)/fn/string/virtual/link core-js(/library)/fn/string/virtual/small core-js(/library)/fn/string/virtual/strike core-js(/library)/fn/string/virtual/sub core-js(/library)/fn/string/virtual/sup core-js(/library)/fn/string/virtual/iterator ``` [*Examples*](http://goo.gl/3UaQ93): ```js for(var val of 'a𠮷b'){ console.log(val); // => 'a', '𠮷', 'b' } 'foobarbaz'.includes('bar'); // => true 'foobarbaz'.includes('bar', 4); // => false 'foobarbaz'.startsWith('foo'); // => true 'foobarbaz'.startsWith('bar', 3); // => true 'foobarbaz'.endsWith('baz'); // => true 'foobarbaz'.endsWith('bar', 6); // => true 'string'.repeat(3); // => 'stringstringstring' '𠮷'.codePointAt(0); // => 134071 String.fromCodePoint(97, 134071, 98); // => 'a𠮷b' var name = 'Bob'; String.raw`Hi\n${name}!`; // => 'Hi\\nBob!' (ES6 template string syntax) String.raw({raw: 'test'}, 0, 1, 2); // => 't0e1s2t' 'foo'.bold(); // => 'foo' 'bar'.anchor('a"b'); // => 'bar' 'baz'.link('http://example.com'); // => 'baz' ``` #### ECMAScript 6: RegExp Modules [`es6.regexp.constructor`](https://github.com/zloirock/core-js/blob/v2.4.1/modules/es6.regexp.constructor.js) and [`es6.regexp.flags`](https://github.com/zloirock/core-js/blob/v2.4.1/modules/es6.regexp.flags.js). Support well-known [symbols](#ecmascript-6-symbol) `@@match`, `@@replace`, `@@search` and `@@split`, modules [`es6.regexp.match`](https://github.com/zloirock/core-js/blob/v2.4.1/modules/es6.regexp.match.js), [`es6.regexp.replace`](https://github.com/zloirock/core-js/blob/v2.4.1/modules/es6.regexp.replace.js), [`es6.regexp.search`](https://github.com/zloirock/core-js/blob/v2.4.1/modules/es6.regexp.search.js) and [`es6.regexp.split`](https://github.com/zloirock/core-js/blob/v2.4.1/modules/es6.regexp.split.js). ``` [new] RegExp(pattern, flags?) -> regexp, ES6 fix: can alter flags (IE9+) #flags -> str (IE9+) #toString() -> str, ES6 fixes #@@match(str) -> array | null #@@replace(str, replacer) -> string #@@search(str) -> index #@@split(str, limit) -> array String #match(tpl) -> var, ES6 fix for support @@match #replace(tpl, replacer) -> var, ES6 fix for support @@replace #search(tpl) -> var, ES6 fix for support @@search #split(tpl, limit) -> var, ES6 fix for support @@split, some fixes for old engines ``` [*CommonJS entry points:*](#commonjs) ``` core-js/es6/regexp core-js/fn/regexp/constructor core-js(/library)/fn/regexp/flags core-js/fn/regexp/to-string core-js/fn/regexp/match core-js/fn/regexp/replace core-js/fn/regexp/search core-js/fn/regexp/split ``` [*Examples*](http://goo.gl/PiJxBD): ```js RegExp(/./g, 'm'); // => /./m /foo/.flags; // => '' /foo/gim.flags; // => 'gim' 'foo'.match({[Symbol.match]: _ => 1}); // => 1 'foo'.replace({[Symbol.replace]: _ => 2}); // => 2 'foo'.search({[Symbol.search]: _ => 3}); // => 3 'foo'.split({[Symbol.split]: _ => 4}); // => 4 RegExp.prototype.toString.call({source: 'foo', flags: 'bar'}); // => '/foo/bar' ``` #### ECMAScript 6: Number Module [`es6.number.constructor`](https://github.com/zloirock/core-js/blob/v2.4.1/modules/es6.number.constructor.js). `Number` constructor support binary and octal literals, [*example*](http://goo.gl/jRd6b3): ```js Number('0b1010101'); // => 85 Number('0o7654321'); // => 2054353 ``` Modules [`es6.number.epsilon`](https://github.com/zloirock/core-js/blob/v2.4.1/modules/es6.number.epsilon.js), [`es6.number.is-finite`](https://github.com/zloirock/core-js/blob/v2.4.1/modules/es6.number.is-finite.js), [`es6.number.is-integer`](https://github.com/zloirock/core-js/blob/v2.4.1/modules/es6.number.is-integer.js), [`es6.number.is-nan`](https://github.com/zloirock/core-js/blob/v2.4.1/modules/es6.number.is-nan.js), [`es6.number.is-safe-integer`](https://github.com/zloirock/core-js/blob/v2.4.1/modules/es6.number.is-safe-integer.js), [`es6.number.max-safe-integer`](https://github.com/zloirock/core-js/blob/v2.4.1/modules/es6.number.max-safe-integer.js), [`es6.number.min-safe-integer`](https://github.com/zloirock/core-js/blob/v2.4.1/modules/es6.number.min-safe-integer.js), [`es6.number.parse-float`](https://github.com/zloirock/core-js/blob/v2.4.1/modules/es6.number.parse-float.js), [`es6.number.parse-int`](https://github.com/zloirock/core-js/blob/v2.4.1/modules/es6.number.parse-int.js), [`es6.number.to-fixed`](https://github.com/zloirock/core-js/blob/v2.4.1/modules/es6.number.to-fixed.js), [`es6.number.to-precision`](https://github.com/zloirock/core-js/blob/v2.4.1/modules/es6.number.to-precision.js), [`es6.parse-int`](https://github.com/zloirock/core-js/blob/v2.4.1/modules/es6.parse-int.js), [`es6.parse-float`](https://github.com/zloirock/core-js/blob/v2.4.1/modules/es6.parse-float.js). ```js [new] Number(var) -> number | number object .isFinite(num) -> bool .isNaN(num) -> bool .isInteger(num) -> bool .isSafeInteger(num) -> bool .parseFloat(str) -> num .parseInt(str) -> int .EPSILON -> num .MAX_SAFE_INTEGER -> int .MIN_SAFE_INTEGER -> int #toFixed(digits) -> string, fixes #toPrecision(precision) -> string, fixes parseFloat(str) -> num, fixes parseInt(str) -> int, fixes ``` [*CommonJS entry points:*](#commonjs) ``` core-js(/library)/es6/number core-js/es6/number/constructor core-js(/library)/fn/number/is-finite core-js(/library)/fn/number/is-nan core-js(/library)/fn/number/is-integer core-js(/library)/fn/number/is-safe-integer core-js(/library)/fn/number/parse-float core-js(/library)/fn/number/parse-int core-js(/library)/fn/number/epsilon core-js(/library)/fn/number/max-safe-integer core-js(/library)/fn/number/min-safe-integer core-js(/library)/fn/number/to-fixed core-js(/library)/fn/number/to-precision core-js(/library)/fn/parse-float core-js(/library)/fn/parse-int ``` #### ECMAScript 6: Math Modules [`es6.math.acosh`](https://github.com/zloirock/core-js/blob/v2.4.1/modules/es6.math.acosh.js), [`es6.math.asinh`](https://github.com/zloirock/core-js/blob/v2.4.1/modules/es6.math.asinh.js), [`es6.math.atanh`](https://github.com/zloirock/core-js/blob/v2.4.1/modules/es6.math.atanh.js), [`es6.math.cbrt`](https://github.com/zloirock/core-js/blob/v2.4.1/modules/es6.math.cbrt.js), [`es6.math.clz32`](https://github.com/zloirock/core-js/blob/v2.4.1/modules/es6.math.clz32.js), [`es6.math.cosh`](https://github.com/zloirock/core-js/blob/v2.4.1/modules/es6.math.cosh.js), [`es6.math.expm1`](https://github.com/zloirock/core-js/blob/v2.4.1/modules/es6.math.expm1.js), [`es6.math.fround`](https://github.com/zloirock/core-js/blob/v2.4.1/modules/es6.math.fround.js), [`es6.math.hypot`](https://github.com/zloirock/core-js/blob/v2.4.1/modules/es6.math.hypot.js), [`es6.math.imul`](https://github.com/zloirock/core-js/blob/v2.4.1/modules/es6.math.imul.js), [`es6.math.log10`](https://github.com/zloirock/core-js/blob/v2.4.1/modules/es6.math.log10.js), [`es6.math.log1p`](https://github.com/zloirock/core-js/blob/v2.4.1/modules/es6.math.log1p.js), [`es6.math.log2`](https://github.com/zloirock/core-js/blob/v2.4.1/modules/es6.math.log2.js), [`es6.math.sign`](https://github.com/zloirock/core-js/blob/v2.4.1/modules/es6.math.sign.js), [`es6.math.sinh`](https://github.com/zloirock/core-js/blob/v2.4.1/modules/es6.math.sinh.js), [`es6.math.tanh`](https://github.com/zloirock/core-js/blob/v2.4.1/modules/es6.math.tanh.js), [`es6.math.trunc`](https://github.com/zloirock/core-js/blob/v2.4.1/modules/es6.math.trunc.js). ```js Math .acosh(num) -> num .asinh(num) -> num .atanh(num) -> num .cbrt(num) -> num .clz32(num) -> uint .cosh(num) -> num .expm1(num) -> num .fround(num) -> num .hypot(...args) -> num .imul(num, num) -> int .log1p(num) -> num .log10(num) -> num .log2(num) -> num .sign(num) -> 1 | -1 | 0 | -0 | NaN .sinh(num) -> num .tanh(num) -> num .trunc(num) -> num ``` [*CommonJS entry points:*](#commonjs) ``` core-js(/library)/es6/math core-js(/library)/fn/math/acosh core-js(/library)/fn/math/asinh core-js(/library)/fn/math/atanh core-js(/library)/fn/math/cbrt core-js(/library)/fn/math/clz32 core-js(/library)/fn/math/cosh core-js(/library)/fn/math/expm1 core-js(/library)/fn/math/fround core-js(/library)/fn/math/hypot core-js(/library)/fn/math/imul core-js(/library)/fn/math/log1p core-js(/library)/fn/math/log10 core-js(/library)/fn/math/log2 core-js(/library)/fn/math/sign core-js(/library)/fn/math/sinh core-js(/library)/fn/math/tanh core-js(/library)/fn/math/trunc ``` #### ECMAScript 6: Date Modules [`es6.date.to-string`](https://github.com/zloirock/core-js/blob/v2.4.1/modules/es6.date.to-string.js), ES5 features with fixes: [`es6.date.now`](https://github.com/zloirock/core-js/blob/v2.4.1/modules/es6.date.now.js), [`es6.date.to-iso-string`](https://github.com/zloirock/core-js/blob/v2.4.1/modules/es6.date.to-iso-string.js), [`es6.date.to-json`](https://github.com/zloirock/core-js/blob/v2.4.1/modules/es6.date.to-json.js) and [`es6.date.to-primitive`](https://github.com/zloirock/core-js/blob/v2.4.1/modules/es6.date.to-primitive.js). ```js Date .now() -> int #toISOString() -> string #toJSON() -> string #toString() -> string #@@toPrimitive(hint) -> primitive ``` [*CommonJS entry points:*](#commonjs) ``` core-js/es6/date core-js/fn/date/to-string core-js(/library)/fn/date/now core-js(/library)/fn/date/to-iso-string core-js(/library)/fn/date/to-json core-js(/library)/fn/date/to-primitive ``` [*Example*](http://goo.gl/haeHLR): ```js new Date(NaN).toString(); // => 'Invalid Date' ``` #### ECMAScript 6: Promise Module [`es6.promise`](https://github.com/zloirock/core-js/blob/v2.4.1/modules/es6.promise.js). ```js new Promise(executor(resolve(var), reject(var))) -> promise #then(resolved(var), rejected(var)) -> promise #catch(rejected(var)) -> promise .resolve(promise | var) -> promise .reject(var) -> promise .all(iterable) -> promise .race(iterable) -> promise ``` [*CommonJS entry points:*](#commonjs) ``` core-js(/library)/es6/promise core-js(/library)/fn/promise ``` Basic [*example*](http://goo.gl/vGrtUC): ```js function sleepRandom(time){ return new Promise(function(resolve, reject){ setTimeout(resolve, time * 1e3, 0 | Math.random() * 1e3); }); } console.log('Run'); // => Run sleepRandom(5).then(function(result){ console.log(result); // => 869, after 5 sec. return sleepRandom(10); }).then(function(result){ console.log(result); // => 202, after 10 sec. }).then(function(){ console.log('immediately after'); // => immediately after throw Error('Irror!'); }).then(function(){ console.log('will not be displayed'); }).catch(x => console.log(x)); // => => Error: Irror! ``` `Promise.resolve` and `Promise.reject` [*example*](http://goo.gl/vr8TN3): ```js Promise.resolve(42).then(x => console.log(x)); // => 42 Promise.reject(42).catch(x => console.log(x)); // => 42 Promise.resolve($.getJSON('/data.json')); // => ES6 promise ``` `Promise.all` [*example*](http://goo.gl/RdoDBZ): ```js Promise.all([ 'foo', sleepRandom(5), sleepRandom(15), sleepRandom(10) // after 15 sec: ]).then(x => console.log(x)); // => ['foo', 956, 85, 382] ``` `Promise.race` [*example*](http://goo.gl/L8ovkJ): ```js function timeLimit(promise, time){ return Promise.race([promise, new Promise(function(resolve, reject){ setTimeout(reject, time * 1e3, Error('Await > ' + time + ' sec')); })]); } timeLimit(sleepRandom(5), 10).then(x => console.log(x)); // => 853, after 5 sec. timeLimit(sleepRandom(15), 10).catch(x => console.log(x)); // Error: Await > 10 sec ``` ECMAScript 7 [async functions](https://tc39.github.io/ecmascript-asyncawait) [example](http://goo.gl/wnQS4j): ```js var delay = time => new Promise(resolve => setTimeout(resolve, time)) async function sleepRandom(time){ await delay(time * 1e3); return 0 | Math.random() * 1e3; }; async function sleepError(time, msg){ await delay(time * 1e3); throw Error(msg); }; (async () => { try { console.log('Run'); // => Run console.log(await sleepRandom(5)); // => 936, after 5 sec. var [a, b, c] = await Promise.all([ sleepRandom(5), sleepRandom(15), sleepRandom(10) ]); console.log(a, b, c); // => 210 445 71, after 15 sec. await sleepError(5, 'Irror!'); console.log('Will not be displayed'); } catch(e){ console.log(e); // => Error: 'Irror!', after 5 sec. } })(); ``` ##### Unhandled rejection tracking In Node.js, like in native implementation, available events [`unhandledRejection`](https://nodejs.org/api/process.html#process_event_unhandledrejection) and [`rejectionHandled`](https://nodejs.org/api/process.html#process_event_rejectionhandled): ```js process.on('unhandledRejection', (reason, promise) => console.log('unhandled', reason, promise)); process.on('rejectionHandled', (promise) => console.log('handled', promise)); var p = Promise.reject(42); // unhandled 42 [object Promise] setTimeout(() => p.catch(_ => _), 1e3); // handled [object Promise] ``` In a browser on rejection, by default, you will see notify in the console, or you can add a custom handler and a handler on handling unhandled, [*example*](http://goo.gl/Wozskl): ```js window.onunhandledrejection = e => console.log('unhandled', e.reason, e.promise); window.onrejectionhandled = e => console.log('handled', e.reason, e.promise); var p = Promise.reject(42); // unhandled 42 [object Promise] setTimeout(() => p.catch(_ => _), 1e3); // handled 42 [object Promise] ``` #### ECMAScript 6: Symbol Module [`es6.symbol`](https://github.com/zloirock/core-js/blob/v2.4.1/modules/es6.symbol.js). ```js Symbol(description?) -> symbol .hasInstance -> @@hasInstance .isConcatSpreadable -> @@isConcatSpreadable .iterator -> @@iterator .match -> @@match .replace -> @@replace .search -> @@search .species -> @@species .split -> @@split .toPrimitive -> @@toPrimitive .toStringTag -> @@toStringTag .unscopables -> @@unscopables .for(key) -> symbol .keyFor(symbol) -> key .useSimple() -> void .useSetter() -> void Object .getOwnPropertySymbols(object) -> array ``` Also wrapped some methods for correct work with `Symbol` polyfill. ```js Object .create(proto | null, descriptors?) -> object .defineProperty(target, key, desc) -> target .defineProperties(target, descriptors) -> target .getOwnPropertyDescriptor(var, key) -> desc | undefined .getOwnPropertyNames(var) -> array #propertyIsEnumerable(key) -> bool JSON .stringify(target, replacer?, space?) -> string | undefined ``` [*CommonJS entry points:*](#commonjs) ``` core-js(/library)/es6/symbol core-js(/library)/fn/symbol core-js(/library)/fn/symbol/has-instance core-js(/library)/fn/symbol/is-concat-spreadable core-js(/library)/fn/symbol/iterator core-js(/library)/fn/symbol/match core-js(/library)/fn/symbol/replace core-js(/library)/fn/symbol/search core-js(/library)/fn/symbol/species core-js(/library)/fn/symbol/split core-js(/library)/fn/symbol/to-primitive core-js(/library)/fn/symbol/to-string-tag core-js(/library)/fn/symbol/unscopables core-js(/library)/fn/symbol/for core-js(/library)/fn/symbol/key-for ``` [*Basic example*](http://goo.gl/BbvWFc): ```js var Person = (function(){ var NAME = Symbol('name'); function Person(name){ this[NAME] = name; } Person.prototype.getName = function(){ return this[NAME]; }; return Person; })(); var person = new Person('Vasya'); console.log(person.getName()); // => 'Vasya' console.log(person['name']); // => undefined console.log(person[Symbol('name')]); // => undefined, symbols are uniq for(var key in person)console.log(key); // => only 'getName', symbols are not enumerable ``` `Symbol.for` & `Symbol.keyFor` [*example*](http://goo.gl/0pdJjX): ```js var symbol = Symbol.for('key'); symbol === Symbol.for('key'); // true Symbol.keyFor(symbol); // 'key' ``` [*Example*](http://goo.gl/mKVOQJ) with methods for getting own object keys: ```js var O = {a: 1}; Object.defineProperty(O, 'b', {value: 2}); O[Symbol('c')] = 3; Object.keys(O); // => ['a'] Object.getOwnPropertyNames(O); // => ['a', 'b'] Object.getOwnPropertySymbols(O); // => [Symbol(c)] Reflect.ownKeys(O); // => ['a', 'b', Symbol(c)] ``` ##### Caveats when using `Symbol` polyfill: * We can't add new primitive type, `Symbol` returns object. * `Symbol.for` and `Symbol.keyFor` can't be shimmed cross-realm. * By default, to hide the keys, `Symbol` polyfill defines setter in `Object.prototype`. For this reason, uncontrolled creation of symbols can cause memory leak and the `in` operator is not working correctly with `Symbol` polyfill: `Symbol() in {} // => true`. You can disable defining setters in `Object.prototype`. [Example](http://goo.gl/N5UD7J): ```js Symbol.useSimple(); var s1 = Symbol('s1') , o1 = {}; o1[s1] = true; for(var key in o1)console.log(key); // => 'Symbol(s1)_t.qamkg9f3q', w/o native Symbol Symbol.useSetter(); var s2 = Symbol('s2') , o2 = {}; o2[s2] = true; for(var key in o2)console.log(key); // nothing ``` * Currently, `core-js` not adds setters to `Object.prototype` for well-known symbols for correct work something like `Symbol.iterator in foo`. It can cause problems with their enumerability. * Some problems possible with environment exotic objects (for example, IE `localStorage`). #### ECMAScript 6: Collections `core-js` uses native collections in most case, just fixes methods / constructor, if it's required, and in old environment uses fast polyfill (O(1) lookup). #### Map Module [`es6.map`](https://github.com/zloirock/core-js/blob/v2.4.1/modules/es6.map.js). ```js new Map(iterable (entries) ?) -> map #clear() -> void #delete(key) -> bool #forEach(fn(val, key, @), that) -> void #get(key) -> val #has(key) -> bool #set(key, val) -> @ #size -> uint #values() -> iterator #keys() -> iterator #entries() -> iterator #@@iterator() -> iterator (entries) ``` [*CommonJS entry points:*](#commonjs) ``` core-js(/library)/es6/map core-js(/library)/fn/map ``` [*Examples*](http://goo.gl/GWR7NI): ```js var a = [1]; var map = new Map([['a', 1], [42, 2]]); map.set(a, 3).set(true, 4); console.log(map.size); // => 4 console.log(map.has(a)); // => true console.log(map.has([1])); // => false console.log(map.get(a)); // => 3 map.forEach(function(val, key){ console.log(val); // => 1, 2, 3, 4 console.log(key); // => 'a', 42, [1], true }); map.delete(a); console.log(map.size); // => 3 console.log(map.get(a)); // => undefined console.log(Array.from(map)); // => [['a', 1], [42, 2], [true, 4]] var map = new Map([['a', 1], ['b', 2], ['c', 3]]); for(var [key, val] of map){ console.log(key); // => 'a', 'b', 'c' console.log(val); // => 1, 2, 3 } for(var val of map.values())console.log(val); // => 1, 2, 3 for(var key of map.keys())console.log(key); // => 'a', 'b', 'c' for(var [key, val] of map.entries()){ console.log(key); // => 'a', 'b', 'c' console.log(val); // => 1, 2, 3 } ``` #### Set Module [`es6.set`](https://github.com/zloirock/core-js/blob/v2.4.1/modules/es6.set.js). ```js new Set(iterable?) -> set #add(key) -> @ #clear() -> void #delete(key) -> bool #forEach(fn(el, el, @), that) -> void #has(key) -> bool #size -> uint #values() -> iterator #keys() -> iterator #entries() -> iterator #@@iterator() -> iterator (values) ``` [*CommonJS entry points:*](#commonjs) ``` core-js(/library)/es6/set core-js(/library)/fn/set ``` [*Examples*](http://goo.gl/bmhLwg): ```js var set = new Set(['a', 'b', 'a', 'c']); set.add('d').add('b').add('e'); console.log(set.size); // => 5 console.log(set.has('b')); // => true set.forEach(function(it){ console.log(it); // => 'a', 'b', 'c', 'd', 'e' }); set.delete('b'); console.log(set.size); // => 4 console.log(set.has('b')); // => false console.log(Array.from(set)); // => ['a', 'c', 'd', 'e'] var set = new Set([1, 2, 3, 2, 1]); for(var val of set)console.log(val); // => 1, 2, 3 for(var val of set.values())console.log(val); // => 1, 2, 3 for(var key of set.keys())console.log(key); // => 1, 2, 3 for(var [key, val] of set.entries()){ console.log(key); // => 1, 2, 3 console.log(val); // => 1, 2, 3 } ``` #### WeakMap Module [`es6.weak-map`](https://github.com/zloirock/core-js/blob/v2.4.1/modules/es6.weak-map.js). ```js new WeakMap(iterable (entries) ?) -> weakmap #delete(key) -> bool #get(key) -> val #has(key) -> bool #set(key, val) -> @ ``` [*CommonJS entry points:*](#commonjs) ``` core-js(/library)/es6/weak-map core-js(/library)/fn/weak-map ``` [*Examples*](http://goo.gl/SILXyw): ```js var a = [1] , b = [2] , c = [3]; var wmap = new WeakMap([[a, 1], [b, 2]]); wmap.set(c, 3).set(b, 4); console.log(wmap.has(a)); // => true console.log(wmap.has([1])); // => false console.log(wmap.get(a)); // => 1 wmap.delete(a); console.log(wmap.get(a)); // => undefined // Private properties store: var Person = (function(){ var names = new WeakMap; function Person(name){ names.set(this, name); } Person.prototype.getName = function(){ return names.get(this); }; return Person; })(); var person = new Person('Vasya'); console.log(person.getName()); // => 'Vasya' for(var key in person)console.log(key); // => only 'getName' ``` #### WeakSet Module [`es6.weak-set`](https://github.com/zloirock/core-js/blob/v2.4.1/modules/es6.weak-set.js). ```js new WeakSet(iterable?) -> weakset #add(key) -> @ #delete(key) -> bool #has(key) -> bool ``` [*CommonJS entry points:*](#commonjs) ``` core-js(/library)/es6/weak-set core-js(/library)/fn/weak-set ``` [*Examples*](http://goo.gl/TdFbEx): ```js var a = [1] , b = [2] , c = [3]; var wset = new WeakSet([a, b, a]); wset.add(c).add(b).add(c); console.log(wset.has(b)); // => true console.log(wset.has([2])); // => false wset.delete(b); console.log(wset.has(b)); // => false ``` ##### Caveats when using collections polyfill: * Weak-collections polyfill stores values as hidden properties of keys. It works correct and not leak in most cases. However, it is desirable to store a collection longer than its keys. #### ECMAScript 6: Typed Arrays Implementations and fixes `ArrayBuffer`, `DataView`, typed arrays constructors, static and prototype methods. Typed Arrays work only in environments with support descriptors (IE9+), `ArrayBuffer` and `DataView` should work anywhere. Modules [`es6.typed.array-buffer`](https://github.com/zloirock/core-js/blob/v2.4.1/modules/es6.typed.array-buffer.js), [`es6.typed.data-view`](https://github.com/zloirock/core-js/blob/v2.4.1/modules/es6.typed.data-view.js), [`es6.typed.int8-array`](https://github.com/zloirock/core-js/blob/v2.4.1/modules/es6.typed.int8-array.js), [`es6.typed.uint8-array`](https://github.com/zloirock/core-js/blob/v2.4.1/modules/es6.typed.uint8-array.js), [`es6.typed.uint8-clamped-array`](https://github.com/zloirock/core-js/blob/v2.4.1/modules/es6.typed.uint8-clamped-array.js), [`es6.typed.int16-array`](https://github.com/zloirock/core-js/blob/v2.4.1/modules/es6.typed.int16-array.js), [`es6.typed.uint16-array`](https://github.com/zloirock/core-js/blob/v2.4.1/modules/es6.typed.uint16-array.js), [`es6.typed.int32-array`](https://github.com/zloirock/core-js/blob/v2.4.1/modules/es6.typed.int32-array.js), [`es6.typed.uint32-array`](https://github.com/zloirock/core-js/blob/v2.4.1/modules/es6.typed.uint32-array.js), [`es6.typed.float32-array`](https://github.com/zloirock/core-js/blob/v2.4.1/modules/es6.typed.float32-array.js) and [`es6.typed.float64-array`](https://github.com/zloirock/core-js/blob/v2.4.1/modules/es6.typed.float64-array.js). ```js new ArrayBuffer(length) -> buffer .isView(var) -> bool #slice(start = 0, end = @length) -> buffer #byteLength -> uint new DataView(buffer, byteOffset = 0, byteLength = buffer.byteLength - byteOffset) -> view #getInt8(offset) -> int8 #getUint8(offset) -> uint8 #getInt16(offset, littleEndian = false) -> int16 #getUint16(offset, littleEndian = false) -> uint16 #getInt32(offset, littleEndian = false) -> int32 #getUint32(offset, littleEndian = false) -> uint32 #getFloat32(offset, littleEndian = false) -> float32 #getFloat64(offset, littleEndian = false) -> float64 #setInt8(offset, value) -> void #setUint8(offset, value) -> void #setInt16(offset, value, littleEndian = false) -> void #setUint16(offset, value, littleEndian = false) -> void #setInt32(offset, value, littleEndian = false) -> void #setUint32(offset, value, littleEndian = false) -> void #setFloat32(offset, value, littleEndian = false) -> void #setFloat64(offset, value, littleEndian = false) -> void #buffer -> buffer #byteLength -> uint #byteOffset -> uint { Int8Array, Uint8Array, Uint8ClampedArray, Int16Array, Uint16Array, Int32Array, Uint32Array, Float32Array, Float64Array } new %TypedArray%(length) -> typed new %TypedArray%(typed) -> typed new %TypedArray%(arrayLike) -> typed new %TypedArray%(iterable) -> typed new %TypedArray%(buffer, byteOffset = 0, length = (buffer.byteLength - byteOffset) / @BYTES_PER_ELEMENT) -> typed .BYTES_PER_ELEMENT -> uint .from(arrayLike | iterable, mapFn(val, index)?, that) -> typed .of(...args) -> typed #BYTES_PER_ELEMENT -> uint #copyWithin(target = 0, start = 0, end = @length) -> @ #every(fn(val, index, @), that) -> bool #fill(val, start = 0, end = @length) -> @ #filter(fn(val, index, @), that) -> typed #find(fn(val, index, @), that) -> val #findIndex(fn(val, index, @), that) -> index #forEach(fn(val, index, @), that) -> void #indexOf(var, from?) -> int #join(string = ',') -> string #lastIndexOf(var, from?) -> int #map(fn(val, index, @), that) -> typed #reduce(fn(memo, val, index, @), memo?) -> var #reduceRight(fn(memo, val, index, @), memo?) -> var #reverse() -> @ #set(arrayLike, offset = 0) -> void #slice(start = 0, end = @length) -> typed #some(fn(val, index, @), that) -> bool #sort(fn(a, b)?) -> @ #subarray(start = 0, end = @length) -> typed #toString() -> string #toLocaleString() -> string #values() -> iterator #keys() -> iterator #entries() -> iterator #@@iterator() -> iterator (values) #buffer -> buffer #byteLength -> uint #byteOffset -> uint #length -> uint ``` [*CommonJS entry points:*](#commonjs) ``` core-js(/library)/es6/typed core-js(/library)/fn/typed core-js(/library)/fn/typed/array-buffer core-js(/library)/fn/typed/data-view core-js(/library)/fn/typed/int8-array core-js(/library)/fn/typed/uint8-array core-js(/library)/fn/typed/uint8-clamped-array core-js(/library)/fn/typed/int16-array core-js(/library)/fn/typed/uint16-array core-js(/library)/fn/typed/int32-array core-js(/library)/fn/typed/uint32-array core-js(/library)/fn/typed/float32-array core-js(/library)/fn/typed/float64-array ``` [*Examples*](http://goo.gl/yla75z): ```js new Int32Array(4); // => [0, 0, 0, 0] new Uint8ClampedArray([1, 2, 3, 666]); // => [1, 2, 3, 255] new Float32Array(new Set([1, 2, 3, 2, 1])); // => [1, 2, 3] var buffer = new ArrayBuffer(8); var view = new DataView(buffer); view.setFloat64(0, 123.456, true); new Uint8Array(buffer.slice(4)); // => [47, 221, 94, 64] Int8Array.of(1, 1.5, 5.7, 745); // => [1, 1, 5, -23] Uint8Array.from([1, 1.5, 5.7, 745]); // => [1, 1, 5, 233] var typed = new Uint8Array([1, 2, 3]); var a = typed.slice(1); // => [2, 3] typed.buffer === a.buffer; // => false var b = typed.subarray(1); // => [2, 3] typed.buffer === b.buffer; // => true typed.filter(it => it % 2); // => [1, 3] typed.map(it => it * 1.5); // => [1, 3, 4] for(var val of typed)console.log(val); // => 1, 2, 3 for(var val of typed.values())console.log(val); // => 1, 2, 3 for(var key of typed.keys())console.log(key); // => 0, 1, 2 for(var [key, val] of typed.entries()){ console.log(key); // => 0, 1, 2 console.log(val); // => 1, 2, 3 } ``` ##### Caveats when using typed arrays: * Typed Arrays polyfills works completely how should work by the spec, but because of internal use getter / setters on each instance, is slow and consumes significant memory. However, typed arrays polyfills required mainly for IE9 (and for `Uint8ClampedArray` in IE10 and early IE11), all modern engines have native typed arrays and requires only constructors fixes and methods. * The current version hasn't special entry points for methods, they can be added only with constructors. It can be added in the future. * In the `library` version we can't pollute native prototypes, so prototype methods available as constructors static. #### ECMAScript 6: Reflect Modules [`es6.reflect.apply`](https://github.com/zloirock/core-js/blob/v2.4.1/modules/es6.reflect.apply.js), [`es6.reflect.construct`](https://github.com/zloirock/core-js/blob/v2.4.1/modules/es6.reflect.construct.js), [`es6.reflect.define-property`](https://github.com/zloirock/core-js/blob/v2.4.1/modules/es6.reflect.define-property.js), [`es6.reflect.delete-property`](https://github.com/zloirock/core-js/blob/v2.4.1/modules/es6.reflect.delete-property.js), [`es6.reflect.enumerate`](https://github.com/zloirock/core-js/blob/v2.4.1/modules/es6.reflect.enumerate.js), [`es6.reflect.get`](https://github.com/zloirock/core-js/blob/v2.4.1/modules/es6.reflect.get.js), [`es6.reflect.get-own-property-descriptor`](https://github.com/zloirock/core-js/blob/v2.4.1/modules/es6.reflect.get-own-property-descriptor.js), [`es6.reflect.get-prototype-of`](https://github.com/zloirock/core-js/blob/v2.4.1/modules/es6.reflect.get-prototype-of.js), [`es6.reflect.has`](https://github.com/zloirock/core-js/blob/v2.4.1/modules/es6.reflect.has.js), [`es6.reflect.is-extensible`](https://github.com/zloirock/core-js/blob/v2.4.1/modules/es6.reflect.is-extensible.js), [`es6.reflect.own-keys`](https://github.com/zloirock/core-js/blob/v2.4.1/modules/es6.reflect.own-keys.js), [`es6.reflect.prevent-extensions`](https://github.com/zloirock/core-js/blob/v2.4.1/modules/es6.reflect.prevent-extensions.js), [`es6.reflect.set`](https://github.com/zloirock/core-js/blob/v2.4.1/modules/es6.reflect.set.js), [`es6.reflect.set-prototype-of`](https://github.com/zloirock/core-js/blob/v2.4.1/modules/es6.reflect.set-prototype-of.js). ```js Reflect .apply(target, thisArgument, argumentsList) -> var .construct(target, argumentsList, newTarget?) -> object .defineProperty(target, propertyKey, attributes) -> bool .deleteProperty(target, propertyKey) -> bool .enumerate(target) -> iterator (removed from the spec and will be removed from core-js@3) .get(target, propertyKey, receiver?) -> var .getOwnPropertyDescriptor(target, propertyKey) -> desc .getPrototypeOf(target) -> object | null .has(target, propertyKey) -> bool .isExtensible(target) -> bool .ownKeys(target) -> array .preventExtensions(target) -> bool .set(target, propertyKey, V, receiver?) -> bool .setPrototypeOf(target, proto) -> bool (required __proto__ - IE11+) ``` [*CommonJS entry points:*](#commonjs) ``` core-js(/library)/es6/reflect core-js(/library)/fn/reflect core-js(/library)/fn/reflect/apply core-js(/library)/fn/reflect/construct core-js(/library)/fn/reflect/define-property core-js(/library)/fn/reflect/delete-property core-js(/library)/fn/reflect/enumerate (deprecated and will be removed from the next major release) core-js(/library)/fn/reflect/get core-js(/library)/fn/reflect/get-own-property-descriptor core-js(/library)/fn/reflect/get-prototype-of core-js(/library)/fn/reflect/has core-js(/library)/fn/reflect/is-extensible core-js(/library)/fn/reflect/own-keys core-js(/library)/fn/reflect/prevent-extensions core-js(/library)/fn/reflect/set core-js(/library)/fn/reflect/set-prototype-of ``` [*Examples*](http://goo.gl/gVT0cH): ```js var O = {a: 1}; Object.defineProperty(O, 'b', {value: 2}); O[Symbol('c')] = 3; Reflect.ownKeys(O); // => ['a', 'b', Symbol(c)] function C(a, b){ this.c = a + b; } var instance = Reflect.construct(C, [20, 22]); instance.c; // => 42 ``` ### ECMAScript 7+ proposals [The TC39 process.](https://tc39.github.io/process-document/) [*CommonJS entry points:*](#commonjs) ``` core-js(/library)/es7 core-js(/library)/es7/array core-js(/library)/es7/string core-js(/library)/es7/map core-js(/library)/es7/set core-js(/library)/es7/error core-js(/library)/es7/math core-js(/library)/es7/system core-js(/library)/es7/symbol core-js(/library)/es7/reflect core-js(/library)/es7/observable ``` `core-js/stage/4` entry point contains only stage 4 proposals, `core-js/stage/3` - stage 3 and stage 4, etc. #### Stage 4 proposals [*CommonJS entry points:*](#commonjs) ```js core-js(/library)/stage/4 ``` * `{Array, %TypedArray%}#includes` [proposal](https://github.com/tc39/Array.prototype.includes) - module [`es7.array.includes`](https://github.com/zloirock/core-js/blob/v2.4.1/modules/es7.array.includes.js), `%TypedArray%` version in modules from [this section](#ecmascript-6-typed-arrays). ```js Array #includes(var, from?) -> bool { Int8Array, Uint8Array, Uint8ClampedArray, Int16Array, Uint16Array, Int32Array, Uint32Array, Float32Array, Float64Array } #includes(var, from?) -> bool ``` [*CommonJS entry points:*](#commonjs) ```js core-js(/library)/fn/array/includes ``` [*Examples*](http://goo.gl/2Gq4ma): ```js [1, 2, 3].includes(2); // => true [1, 2, 3].includes(4); // => false [1, 2, 3].includes(2, 2); // => false [NaN].indexOf(NaN); // => -1 [NaN].includes(NaN); // => true Array(1).indexOf(undefined); // => -1 Array(1).includes(undefined); // => true ``` * `Object.values`, `Object.entries` [proposal](https://github.com/tc39/proposal-object-values-entries) - modules [`es7.object.values`](https://github.com/zloirock/core-js/blob/v2.4.1/modules/es7.object.values.js), [`es7.object.entries`](https://github.com/zloirock/core-js/blob/v2.4.1/modules/es7.object.entries.js) ```js Object .values(object) -> array .entries(object) -> array ``` [*CommonJS entry points:*](#commonjs) ```js core-js(/library)/fn/object/values core-js(/library)/fn/object/entries ``` [*Examples*](http://goo.gl/6kuGOn): ```js Object.values({a: 1, b: 2, c: 3}); // => [1, 2, 3] Object.entries({a: 1, b: 2, c: 3}); // => [['a', 1], ['b', 2], ['c', 3]] for(let [key, value] of Object.entries({a: 1, b: 2, c: 3})){ console.log(key); // => 'a', 'b', 'c' console.log(value); // => 1, 2, 3 } ``` * `Object#__(define|lookup)[GS]etter__`, [annex B ES2017](https://github.com/tc39/ecma262/pull/381), but we haven't special namespace for that - modules [`es7.object.define-setter`](https://github.com/zloirock/core-js/blob/v2.4.1/modules/es7.object.define-setter.js), [`es7.object.define-getter`](https://github.com/zloirock/core-js/blob/v2.4.1/modules/es7.object.define-getter.js), [`es7.object.lookup-setter`](https://github.com/zloirock/core-js/blob/v2.4.1/modules/es7.object.lookup-setter.js) and [`es7.object.lookup-getter`](https://github.com/zloirock/core-js/blob/v2.4.1/modules/es7.object.lookup-getter.js). ```js Object #__defineSetter__(key, fn) -> void #__defineGetter__(key, fn) -> void #__lookupSetter__(key) -> fn | void #__lookupGetter__(key) -> fn | void ``` [*CommonJS entry points:*](#commonjs) ```js core-js(/library)/fn/object/define-getter core-js(/library)/fn/object/define-setter core-js(/library)/fn/object/lookup-getter core-js(/library)/fn/object/lookup-setter ``` #### Stage 3 proposals [*CommonJS entry points:*](#commonjs) ```js core-js(/library)/stage/3 ``` * `Object.getOwnPropertyDescriptors` [proposal](https://github.com/tc39/proposal-object-getownpropertydescriptors) - module [`es7.object.get-own-property-descriptors`](https://github.com/zloirock/core-js/blob/v2.4.1/modules/es7.object.get-own-property-descriptors.js) ```js Object .getOwnPropertyDescriptors(object) -> object ``` [*CommonJS entry points:*](#commonjs) ```js core-js(/library)/fn/object/get-own-property-descriptors ``` *Examples*: ```js // Shallow object cloning with prototype and descriptors: var copy = Object.create(Object.getPrototypeOf(O), Object.getOwnPropertyDescriptors(O)); // Mixin: Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); ``` * `String#padStart`, `String#padEnd` [proposal](https://github.com/tc39/proposal-string-pad-start-end) - modules [`es7.string.pad-left`](https://github.com/zloirock/core-js/blob/v2.4.1/modules/es7.string.pad-left.js), [`es7.string.pad-right`](https://github.com/zloirock/core-js/blob/v2.4.1/modules/es7.string.pad-right.js) ```js String #padStart(length, fillStr = ' ') -> string #padEnd(length, fillStr = ' ') -> string ``` [*CommonJS entry points:*](#commonjs) ```js core-js(/library)/fn/string/pad-start core-js(/library)/fn/string/pad-end core-js(/library)/fn/string/virtual/pad-start core-js(/library)/fn/string/virtual/pad-end ``` [*Examples*](http://goo.gl/hK5ccv): ```js 'hello'.padStart(10); // => ' hello' 'hello'.padStart(10, '1234'); // => '12341hello' 'hello'.padEnd(10); // => 'hello ' 'hello'.padEnd(10, '1234'); // => 'hello12341' ``` #### Stage 2 proposals [*CommonJS entry points:*](#commonjs) ```js core-js(/library)/stage/2 ``` * `System.global` [proposal](https://github.com/tc39/proposal-global) - module [`es7.system.global`](https://github.com/zloirock/core-js/blob/v2.4.1/modules/es7.system.global.js) ```js System .global -> object ``` [*CommonJS entry points:*](#commonjs) ```js core-js(/library)/fn/system/global ``` [*Examples*](http://goo.gl/gEqMl7): ```js System.global.Array === Array; // => true ``` * `Symbol.asyncIterator` for [async iteration proposal](https://github.com/tc39/proposal-async-iteration) - module [`es7.symbol.async-iterator`](https://github.com/zloirock/core-js/blob/v2.4.1/modules/es7.symbol.async-iterator.js) ```js Symbol .asyncIterator -> @@asyncIterator ``` [*CommonJS entry points:*](#commonjs) ```js core-js(/library)/fn/symbol/async-iterator ``` #### Stage 1 proposals [*CommonJS entry points:*](#commonjs) ```js core-js(/library)/stage/1 ``` * `String#trimLeft`, `String#trimRight` / `String#trimStart`, `String#trimEnd` [proposal](https://github.com/sebmarkbage/ecmascript-string-left-right-trim) - modules [`es7.string.trim-left`](https://github.com/zloirock/core-js/blob/v2.4.1/modules/es7.string.trim-right.js), [`es7.string.trim-right`](https://github.com/zloirock/core-js/blob/v2.4.1/modules/es7.string.trim-right.js) ```js String #trimLeft() -> string #trimRight() -> string #trimStart() -> string #trimEnd() -> string ``` [*CommonJS entry points:*](#commonjs) ```js core-js(/library)/fn/string/trim-start core-js(/library)/fn/string/trim-end core-js(/library)/fn/string/trim-left core-js(/library)/fn/string/trim-right core-js(/library)/fn/string/virtual/trim-start core-js(/library)/fn/string/virtual/trim-end core-js(/library)/fn/string/virtual/trim-left core-js(/library)/fn/string/virtual/trim-right ``` [*Examples*](http://goo.gl/Er5lMJ): ```js ' hello '.trimLeft(); // => 'hello ' ' hello '.trimRight(); // => ' hello' ``` * `String#matchAll` [proposal](https://github.com/tc39/String.prototype.matchAll) - module [`es7.string.match-all`](https://github.com/zloirock/core-js/blob/v2.4.1/modules/es7.string.match-all.js) ```js String #marchAll(regexp) -> iterator ``` [*CommonJS entry points:*](#commonjs) ```js core-js(/library)/fn/string/match-all core-js(/library)/fn/string/virtual/match-all ``` [*Examples*](http://goo.gl/6kp9EB): ```js for(let [_, d, D] of '1111a2b3cccc'.matchAll(/(\d)(\D)/)){ console.log(d, D); // => 1 a, 2 b, 3 c } ``` * `Observable` [proposal](https://github.com/zenparsing/es-observable) - modules [`es7.observable`](https://github.com/zloirock/core-js/blob/v2.4.1/modules/es7.observable.js) and [`es7.symbol.observable`](https://github.com/zloirock/core-js/blob/v2.4.1/modules/es7.symbol.observable.js) ```js new Observable(fn) -> observable #subscribe(observer) -> subscription #forEach(fn) -> promise #@@observable() -> @ .of(...items) -> observable .from(observable | iterable) -> observable .@@species -> @ Symbol .observable -> @@observable ``` [*CommonJS entry points:*](#commonjs) ```js core-js(/library)/fn/observable core-js(/library)/fn/symbol/observable ``` [*Examples*](http://goo.gl/1LDywi): ```js new Observable(observer => { observer.next('hello'); observer.next('world'); observer.complete(); }).forEach(it => console.log(it)) .then(_ => console.log('!')); ``` #### Stage 0 proposals [*CommonJS entry points:*](#commonjs) ```js core-js(/library)/stage/0 ``` * `String#at` [proposal](https://github.com/mathiasbynens/String.prototype.at) - module [`es7.string.at`](https://github.com/zloirock/core-js/blob/v2.4.1/modules/es7.string.at.js) ```js String #at(index) -> string ``` [*CommonJS entry points:*](#commonjs) ```js core-js(/library)/fn/string/at core-js(/library)/fn/string/virtual/at ``` [*Examples*](http://goo.gl/XluXI8): ```js 'a𠮷b'.at(1); // => '𠮷' 'a𠮷b'.at(1).length; // => 2 ``` * `Map#toJSON`, `Set#toJSON` [proposal](https://github.com/DavidBruant/Map-Set.prototype.toJSON) - modules [`es7.map.to-json`](https://github.com/zloirock/core-js/blob/v2.4.1/modules/es7.map.to-json.js), [`es7.set.to-json`](https://github.com/zloirock/core-js/blob/v2.4.1/modules/es7.set.to-json.js) (rejected and will be removed from `core-js@3`) ```js Map #toJSON() -> array (rejected and will be removed from core-js@3) Set #toJSON() -> array (rejected and will be removed from core-js@3) ``` [*CommonJS entry points:*](#commonjs) ```js core-js(/library)/fn/map core-js(/library)/fn/set ``` * `Error.isError` [proposal](https://github.com/ljharb/proposal-is-error) - module [`es7.error.is-error`](https://github.com/zloirock/core-js/blob/v2.4.1/modules/es7.error.is-error.js) (withdrawn and will be removed from `core-js@3`) ```js Error .isError(it) -> bool (withdrawn and will be removed from core-js@3) ``` [*CommonJS entry points:*](#commonjs) ```js core-js(/library)/fn/error/is-error ``` * `Math.{iaddh, isubh, imulh, umulh}` [proposal](https://gist.github.com/BrendanEich/4294d5c212a6d2254703) - modules [`es7.math.iaddh`](https://github.com/zloirock/core-js/blob/v2.4.1/modules/es7.math.iaddh.js), [`es7.math.isubh`](https://github.com/zloirock/core-js/blob/v2.4.1/modules/es7.math.isubh.js), [`es7.math.imulh`](https://github.com/zloirock/core-js/blob/v2.4.1/modules/es7.math.imulh.js) and [`es7.math.umulh`](https://github.com/zloirock/core-js/blob/v2.4.1/modules/es7.math.umulh.js) ```js Math .iaddh(lo0, hi0, lo1, hi1) -> int32 .isubh(lo0, hi0, lo1, hi1) -> int32 .imulh(a, b) -> int32 .umulh(a, b) -> uint32 ``` [*CommonJS entry points:*](#commonjs) ```js core-js(/library)/fn/math/iaddh core-js(/library)/fn/math/isubh core-js(/library)/fn/math/imulh core-js(/library)/fn/math/umulh ``` * `glogal.asap`, [TC39 discussion](https://github.com/rwaldron/tc39-notes/blob/master/es6/2014-09/sept-25.md#510-globalasap-for-enqueuing-a-microtask), module [`es7.asap`](https://github.com/zloirock/core-js/blob/v2.4.1/modules/es7.asap.js) ```js asap(fn) -> void ``` [*CommonJS entry points:*](#commonjs) ```js core-js(/library)/fn/asap ``` [*Examples*](http://goo.gl/tx3SRK): ```js asap(() => console.log('called as microtask')); ``` #### Pre-stage 0 proposals [*CommonJS entry points:*](#commonjs) ```js core-js(/library)/stage/pre ``` * `Reflect` metadata [proposal](https://github.com/jonathandturner/decorators/blob/master/specs/metadata.md) - modules [`es7.reflect.define-metadata`](https://github.com/zloirock/core-js/blob/v2.4.1/modules/es7.reflect.define-metadata.js), [`es7.reflect.delete-metadata`](https://github.com/zloirock/core-js/blob/v2.4.1/modules/es7.reflect.delete-metadata.js), [`es7.reflect.get-metadata`](https://github.com/zloirock/core-js/blob/v2.4.1/modules/es7.reflect.get-metadata.js), [`es7.reflect.get-metadata-keys`](https://github.com/zloirock/core-js/blob/v2.4.1/modules/es7.reflect.get-metadata-keys.js), [`es7.reflect.get-own-metadata`](https://github.com/zloirock/core-js/blob/v2.4.1/modules/es7.reflect.get-own-metadata.js), [`es7.reflect.get-own-metadata-keys`](https://github.com/zloirock/core-js/blob/v2.4.1/modules/es7.reflect.get-own-metadata-keys.js), [`es7.reflect.has-metadata`](https://github.com/zloirock/core-js/blob/v2.4.1/modules/es7.reflect.has-metadata.js), [`es7.reflect.has-own-metadata`](https://github.com/zloirock/core-js/blob/v2.4.1/modules/es7.reflect.has-own-metadata.js) and [`es7.reflect.metadata`](https://github.com/zloirock/core-js/blob/v2.4.1/modules/es7.reflect.metadata.js). ```js Reflect .defineMetadata(metadataKey, metadataValue, target, propertyKey?) -> void .getMetadata(metadataKey, target, propertyKey?) -> var .getOwnMetadata(metadataKey, target, propertyKey?) -> var .hasMetadata(metadataKey, target, propertyKey?) -> bool .hasOwnMetadata(metadataKey, target, propertyKey?) -> bool .deleteMetadata(metadataKey, target, propertyKey?) -> bool .getMetadataKeys(target, propertyKey?) -> array .getOwnMetadataKeys(target, propertyKey?) -> array .metadata(metadataKey, metadataValue) -> decorator(target, targetKey?) -> void ``` [*CommonJS entry points:*](#commonjs) ```js core-js(/library)/fn/reflect/define-metadata core-js(/library)/fn/reflect/delete-metadata core-js(/library)/fn/reflect/get-metadata core-js(/library)/fn/reflect/get-metadata-keys core-js(/library)/fn/reflect/get-own-metadata core-js(/library)/fn/reflect/get-own-metadata-keys core-js(/library)/fn/reflect/has-metadata core-js(/library)/fn/reflect/has-own-metadata core-js(/library)/fn/reflect/metadata ``` [*Examples*](http://goo.gl/KCo3PS): ```js var O = {}; Reflect.defineMetadata('foo', 'bar', O); Reflect.ownKeys(O); // => [] Reflect.getOwnMetadataKeys(O); // => ['foo'] Reflect.getOwnMetadata('foo', O); // => 'bar' ``` ### Web standards [*CommonJS entry points:*](#commonjs) ```js core-js(/library)/web ``` #### setTimeout / setInterval Module [`web.timers`](https://github.com/zloirock/core-js/blob/v2.4.1/modules/web.timers.js). Additional arguments fix for IE9-. ```js setTimeout(fn(...args), time, ...args) -> id setInterval(fn(...args), time, ...args) -> id ``` [*CommonJS entry points:*](#commonjs) ```js core-js(/library)/web/timers core-js(/library)/fn/set-timeout core-js(/library)/fn/set-interval ``` ```js // Before: setTimeout(log.bind(null, 42), 1000); // After: setTimeout(log, 1000, 42); ``` #### setImmediate Module [`web.immediate`](https://github.com/zloirock/core-js/blob/v2.4.1/modules/web.immediate.js). [`setImmediate` proposal](https://developer.mozilla.org/en-US/docs/Web/API/Window.setImmediate) polyfill. ```js setImmediate(fn(...args), ...args) -> id clearImmediate(id) -> void ``` [*CommonJS entry points:*](#commonjs) ```js core-js(/library)/web/immediate core-js(/library)/fn/set-immediate core-js(/library)/fn/clear-immediate ``` [*Examples*](http://goo.gl/6nXGrx): ```js setImmediate(function(arg1, arg2){ console.log(arg1, arg2); // => Message will be displayed with minimum delay }, 'Message will be displayed', 'with minimum delay'); clearImmediate(setImmediate(function(){ console.log('Message will not be displayed'); })); ``` #### Iterable DOM collections Some DOM collections should have [iterable interface](https://heycam.github.io/webidl/#idl-iterable) or should be [inherited from `Array`](https://heycam.github.io/webidl/#LegacyArrayClass). That mean they should have `keys`, `values`, `entries` and `@@iterator` methods for iteration. So add them. Module [`web.dom.iterable`](https://github.com/zloirock/core-js/blob/v2.4.1/modules/web.dom.iterable.js): ```js { NodeList, DOMTokenList, MediaList, StyleSheetList, CSSRuleList } #values() -> iterator #keys() -> iterator #entries() -> iterator #@@iterator() -> iterator (values) ``` [*CommonJS entry points:*](#commonjs) ```js core-js(/library)/web/dom-collections core-js(/library)/fn/dom-collections/iterator ``` [*Examples*](http://goo.gl/lfXVFl): ```js for(var {id} of document.querySelectorAll('*')){ if(id)console.log(id); } for(var [index, {id}] of document.querySelectorAll('*').entries()){ if(id)console.log(index, id); } ``` ### Non-standard [*CommonJS entry points:*](#commonjs) ```js core-js(/library)/core ``` #### Object Modules [`core.object.is-object`](https://github.com/zloirock/core-js/blob/v2.4.1/modules/core.object.is-object.js), [`core.object.classof`](https://github.com/zloirock/core-js/blob/v2.4.1/modules/core.object.classof.js), [`core.object.define`](https://github.com/zloirock/core-js/blob/v2.4.1/modules/core.object.define.js), [`core.object.make`](https://github.com/zloirock/core-js/blob/v2.4.1/modules/core.object.make.js). ```js Object .isObject(var) -> bool .classof(var) -> string .define(target, mixin) -> target .make(proto | null, mixin?) -> object ``` [*CommonJS entry points:*](#commonjs) ```js core-js(/library)/core/object core-js(/library)/fn/object/is-object core-js(/library)/fn/object/define core-js(/library)/fn/object/make ``` Object classify [*examples*](http://goo.gl/YZQmGo): ```js Object.isObject({}); // => true Object.isObject(isNaN); // => true Object.isObject(null); // => false var classof = Object.classof; classof(null); // => 'Null' classof(undefined); // => 'Undefined' classof(1); // => 'Number' classof(true); // => 'Boolean' classof('string'); // => 'String' classof(Symbol()); // => 'Symbol' classof(new Number(1)); // => 'Number' classof(new Boolean(true)); // => 'Boolean' classof(new String('string')); // => 'String' var fn = function(){} , list = (function(){return arguments})(1, 2, 3); classof({}); // => 'Object' classof(fn); // => 'Function' classof([]); // => 'Array' classof(list); // => 'Arguments' classof(/./); // => 'RegExp' classof(new TypeError); // => 'Error' classof(new Set); // => 'Set' classof(new Map); // => 'Map' classof(new WeakSet); // => 'WeakSet' classof(new WeakMap); // => 'WeakMap' classof(new Promise(fn)); // => 'Promise' classof([].values()); // => 'Array Iterator' classof(new Set().values()); // => 'Set Iterator' classof(new Map().values()); // => 'Map Iterator' classof(Math); // => 'Math' classof(JSON); // => 'JSON' function Example(){} Example.prototype[Symbol.toStringTag] = 'Example'; classof(new Example); // => 'Example' ``` `Object.define` and `Object.make` [*examples*](http://goo.gl/rtpD5Z): ```js // Before: Object.defineProperty(target, 'c', { enumerable: true, configurable: true, get: function(){ return this.a + this.b; } }); // After: Object.define(target, { get c(){ return this.a + this.b; } }); // Shallow object cloning with prototype and descriptors: var copy = Object.make(Object.getPrototypeOf(src), src); // Simple inheritance: function Vector2D(x, y){ this.x = x; this.y = y; } Object.define(Vector2D.prototype, { get xy(){ return Math.hypot(this.x, this.y); } }); function Vector3D(x, y, z){ Vector2D.apply(this, arguments); this.z = z; } Vector3D.prototype = Object.make(Vector2D.prototype, { constructor: Vector3D, get xyz(){ return Math.hypot(this.x, this.y, this.z); } }); var vector = new Vector3D(9, 12, 20); console.log(vector.xy); // => 15 console.log(vector.xyz); // => 25 vector.y++; console.log(vector.xy); // => 15.811388300841896 console.log(vector.xyz); // => 25.495097567963924 ``` #### Dict Module [`core.dict`](https://github.com/zloirock/core-js/blob/v2.4.1/modules/core.dict.js). Based on [TC39 discuss](https://github.com/rwaldron/tc39-notes/blob/master/es6/2012-11/nov-29.md#collection-apis-review) / [strawman](http://wiki.ecmascript.org/doku.php?id=harmony:modules_standard#dictionaries). ```js [new] Dict(iterable (entries) | object ?) -> dict .isDict(var) -> bool .values(object) -> iterator .keys(object) -> iterator .entries(object) -> iterator (entries) .has(object, key) -> bool .get(object, key) -> val .set(object, key, value) -> object .forEach(object, fn(val, key, @), that) -> void .map(object, fn(val, key, @), that) -> new @ .mapPairs(object, fn(val, key, @), that) -> new @ .filter(object, fn(val, key, @), that) -> new @ .some(object, fn(val, key, @), that) -> bool .every(object, fn(val, key, @), that) -> bool .find(object, fn(val, key, @), that) -> val .findKey(object, fn(val, key, @), that) -> key .keyOf(object, var) -> key .includes(object, var) -> bool .reduce(object, fn(memo, val, key, @), memo?) -> var ``` [*CommonJS entry points:*](#commonjs) ```js core-js(/library)/core/dict core-js(/library)/fn/dict ``` `Dict` create object without prototype from iterable or simple object. [*Examples*](http://goo.gl/pnp8Vr): ```js var map = new Map([['a', 1], ['b', 2], ['c', 3]]); Dict(); // => {__proto__: null} Dict({a: 1, b: 2, c: 3}); // => {__proto__: null, a: 1, b: 2, c: 3} Dict(map); // => {__proto__: null, a: 1, b: 2, c: 3} Dict([1, 2, 3].entries()); // => {__proto__: null, 0: 1, 1: 2, 2: 3} var dict = Dict({a: 42}); dict instanceof Object; // => false dict.a; // => 42 dict.toString; // => undefined 'a' in dict; // => true 'hasOwnProperty' in dict; // => false Dict.isDict({}); // => false Dict.isDict(Dict()); // => true ``` `Dict.keys`, `Dict.values` and `Dict.entries` returns iterators for objects. [*Examples*](http://goo.gl/xAvECH): ```js var dict = {a: 1, b: 2, c: 3}; for(var key of Dict.keys(dict))console.log(key); // => 'a', 'b', 'c' for(var val of Dict.values(dict))console.log(val); // => 1, 2, 3 for(var [key, val] of Dict.entries(dict)){ console.log(key); // => 'a', 'b', 'c' console.log(val); // => 1, 2, 3 } new Map(Dict.entries(dict)); // => Map {a: 1, b: 2, c: 3} ``` Basic dict operations for objects with prototype [*examples*](http://goo.gl/B28UnG): ```js 'q' in {q: 1}; // => true 'toString' in {}; // => true Dict.has({q: 1}, 'q'); // => true Dict.has({}, 'toString'); // => false ({q: 1})['q']; // => 1 ({}).toString; // => function toString(){ [native code] } Dict.get({q: 1}, 'q'); // => 1 Dict.get({}, 'toString'); // => undefined var O = {}; O['q'] = 1; O['q']; // => 1 O['__proto__'] = {w: 2}; O['__proto__']; // => {w: 2} O['w']; // => 2 var O = {}; Dict.set(O, 'q', 1); O['q']; // => 1 Dict.set(O, '__proto__', {w: 2}); O['__proto__']; // => {w: 2} O['w']; // => undefined ``` Other methods of `Dict` module are static equialents of `Array.prototype` methods for dictionaries. [*Examples*](http://goo.gl/xFi1RH): ```js var dict = {a: 1, b: 2, c: 3}; Dict.forEach(dict, console.log, console); // => 1, 'a', {a: 1, b: 2, c: 3} // => 2, 'b', {a: 1, b: 2, c: 3} // => 3, 'c', {a: 1, b: 2, c: 3} Dict.map(dict, function(it){ return it * it; }); // => {a: 1, b: 4, c: 9} Dict.mapPairs(dict, function(val, key){ if(key != 'b')return [key + key, val * val]; }); // => {aa: 1, cc: 9} Dict.filter(dict, function(it){ return it % 2; }); // => {a: 1, c: 3} Dict.some(dict, function(it){ return it === 2; }); // => true Dict.every(dict, function(it){ return it === 2; }); // => false Dict.find(dict, function(it){ return it > 2; }); // => 3 Dict.find(dict, function(it){ return it > 4; }); // => undefined Dict.findKey(dict, function(it){ return it > 2; }); // => 'c' Dict.findKey(dict, function(it){ return it > 4; }); // => undefined Dict.keyOf(dict, 2); // => 'b' Dict.keyOf(dict, 4); // => undefined Dict.includes(dict, 2); // => true Dict.includes(dict, 4); // => false Dict.reduce(dict, function(memo, it){ return memo + it; }); // => 6 Dict.reduce(dict, function(memo, it){ return memo + it; }, ''); // => '123' ``` #### Partial application Module [`core.function.part`](https://github.com/zloirock/core-js/blob/v2.4.1/modules/core.function.part.js). ```js Function #part(...args | _) -> fn(...args) ``` [*CommonJS entry points:*](#commonjs) ```js core-js/core/function core-js(/library)/fn/function/part core-js(/library)/fn/function/virtual/part core-js(/library)/fn/_ ``` `Function#part` partial apply function without `this` binding. Uses global variable `_` (`core._` for builds without global namespace pollution) as placeholder and not conflict with `Underscore` / `LoDash`. [*Examples*](http://goo.gl/p9ZJ8K): ```js var fn1 = log.part(1, 2); fn1(3, 4); // => 1, 2, 3, 4 var fn2 = log.part(_, 2, _, 4); fn2(1, 3); // => 1, 2, 3, 4 var fn3 = log.part(1, _, _, 4); fn3(2, 3); // => 1, 2, 3, 4 fn2(1, 3, 5); // => 1, 2, 3, 4, 5 fn2(1); // => 1, 2, undefined, 4 ``` #### Number Iterator Module [`core.number.iterator`](https://github.com/zloirock/core-js/blob/v2.4.1/modules/core.number.iterator.js). ```js Number #@@iterator() -> iterator ``` [*CommonJS entry points:*](#commonjs) ```js core-js(/library)/core/number core-js(/library)/fn/number/iterator core-js(/library)/fn/number/virtual/iterator ``` [*Examples*](http://goo.gl/o45pCN): ```js for(var i of 3)console.log(i); // => 0, 1, 2 [...10]; // => [0, 1, 2, 3, 4, 5, 6, 7, 8, 9] Array.from(10, Math.random); // => [0.9817775336559862, 0.02720663254149258, ...] Array.from(10, function(it){ return this + it * it; }, .42); // => [0.42, 1.42, 4.42, 9.42, 16.42, 25.42, 36.42, 49.42, 64.42, 81.42] ``` #### Escaping strings Modules [`core.regexp.escape`](https://github.com/zloirock/core-js/blob/v2.4.1/modules/core.regexp.escape.js), [`core.string.escape-html`](https://github.com/zloirock/core-js/blob/v2.4.1/modules/core.string.escape-html.js) and [`core.string.unescape-html`](https://github.com/zloirock/core-js/blob/v2.4.1/modules/core.string.unescape-html.js). ```js RegExp .escape(str) -> str String #escapeHTML() -> str #unescapeHTML() -> str ``` [*CommonJS entry points:*](#commonjs) ```js core-js(/library)/core/regexp core-js(/library)/core/string core-js(/library)/fn/regexp/escape core-js(/library)/fn/string/escape-html core-js(/library)/fn/string/unescape-html core-js(/library)/fn/string/virtual/escape-html core-js(/library)/fn/string/virtual/unescape-html ``` [*Examples*](http://goo.gl/6bOvsQ): ```js RegExp.escape('Hello, []{}()*+?.\\^$|!'); // => 'Hello, \[\]\{\}\(\)\*\+\?\.\\\^\$\|!' ''.escapeHTML(); // => '<script>doSomething();</script>' '<script>doSomething();</script>'.unescapeHTML(); // => '' ``` #### delay Module [`core.delay`](https://github.com/zloirock/core-js/blob/v2.4.1/modules/core.delay.js). [Promise](#ecmascript-6-promise)-returning delay function, [esdiscuss](https://esdiscuss.org/topic/promise-returning-delay-function). ```js delay(ms) -> promise ``` [*CommonJS entry points:*](#commonjs) ```js core-js(/library)/core/delay core-js(/library)/fn/delay ``` [*Examples*](http://goo.gl/lbucba): ```js delay(1e3).then(() => console.log('after 1 sec')); (async () => { await delay(3e3); console.log('after 3 sec'); while(await delay(3e3))console.log('each 3 sec'); })(); ``` #### Helpers for iterators Modules [`core.is-iterable`](https://github.com/zloirock/core-js/blob/v2.4.1/modules/core.is-iterable.js), [`core.get-iterator`](https://github.com/zloirock/core-js/blob/v2.4.1/modules/core.get-iterator.js), [`core.get-iterator-method`](https://github.com/zloirock/core-js/blob/v2.4.1/modules/core.get-iterator-method.js) - helpers for check iterability / get iterator in the `library` version or, for example, for `arguments` object: ```js core .isIterable(var) -> bool .getIterator(iterable) -> iterator .getIteratorMethod(var) -> function | undefined ``` [*CommonJS entry points:*](#commonjs) ```js core-js(/library)/fn/is-iterable core-js(/library)/fn/get-iterator core-js(/library)/fn/get-iterator-method ``` [*Examples*](http://goo.gl/SXsM6D): ```js var list = (function(){ return arguments; })(1, 2, 3); console.log(core.isIterable(list)); // true; var iter = core.getIterator(list); console.log(iter.next().value); // 1 console.log(iter.next().value); // 2 console.log(iter.next().value); // 3 console.log(iter.next().value); // undefined core.getIterator({}); // TypeError: [object Object] is not iterable! var iterFn = core.getIteratorMethod(list); console.log(typeof iterFn); // 'function' var iter = iterFn.call(list); console.log(iter.next().value); // 1 console.log(iter.next().value); // 2 console.log(iter.next().value); // 3 console.log(iter.next().value); // undefined console.log(core.getIteratorMethod({})); // undefined ``` ## Missing polyfills - ES5 `JSON` is missing now only in IE7- and never will it be added to `core-js`, if you need it in these old browsers, many implementations are available, for example, [json3](https://github.com/bestiejs/json3). - ES6 `String#normalize` is not a very useful feature, but this polyfill will be very large. If you need it, you can use [unorm](https://github.com/walling/unorm/). - ES6 `Proxy` can't be polyfilled, but for Node.js / Chromium with additional flags you can try [harmony-reflect](https://github.com/tvcutsem/harmony-reflect) for adapt old style `Proxy` API to final ES6 version. - ES6 logic for `@@isConcatSpreadable` and `@@species` (in most places) can be polyfilled without problems, but it will cause a serious slowdown in popular cases in some engines. It will be polyfilled when it will be implemented in modern engines. - ES7 `SIMD`. `core-js` doesn't add polyfill of this feature because of large size and some other reasons. You can use [this polyfill](https://github.com/tc39/ecmascript_simd/blob/master/src/ecmascript_simd.js). - `window.fetch` is not a cross-platform feature, in some environments it makes no sense. For this reason, I don't think it should be in `core-js`. Looking at a large number of requests it *may be* added in the future. Now you can use, for example, [this polyfill](https://github.com/github/fetch). - ECMA-402 `Intl` is missed because of size. You can use [this polyfill](https://github.com/andyearnshaw/Intl.js/). core-js-2.4.1/bower.json000066400000000000000000000015061274277553300151120ustar00rootroot00000000000000{ "name": "core.js", "main": "client/core.js", "version": "2.4.1", "description": "Standard Library", "keywords": [ "ES3", "ECMAScript 3", "ES5", "ECMAScript 5", "ES6", "ES2015", "ECMAScript 6", "ECMAScript 2015", "ES7", "ES2016", "ECMAScript 7", "ECMAScript 2016", "Harmony", "Strawman", "Map", "Set", "WeakMap", "WeakSet", "Promise", "Symbol", "TypedArray", "setImmediate", "Dict", "polyfill", "shim" ], "authors": [ "Denis Pushkarev (http://zloirock.ru/)" ], "license": "MIT", "homepage": "https://github.com/zloirock/core-js", "repository": { "type": "git", "url": "https://github.com/zloirock/core-js.git" }, "ignore": [ "build", "node_modules", "tests" ] } core-js-2.4.1/build/000077500000000000000000000000001274277553300141765ustar00rootroot00000000000000core-js-2.4.1/build/Gruntfile.ls000066400000000000000000000056301274277553300165010ustar00rootroot00000000000000require! <[./build fs ./config]> module.exports = (grunt)-> grunt.loadNpmTasks \grunt-contrib-clean grunt.loadNpmTasks \grunt-contrib-copy grunt.loadNpmTasks \grunt-contrib-uglify grunt.loadNpmTasks \grunt-contrib-watch grunt.loadNpmTasks \grunt-livescript grunt.loadNpmTasks \grunt-karma grunt.initConfig do pkg: grunt.file.readJSON './package.json' uglify: build: files: '<%=grunt.option("path")%>.min.js': '<%=grunt.option("path")%>.js' options: mangle: {+sort, +keep_fnames} compress: {+pure_getters, +keep_fargs, +keep_fnames} sourceMap: on banner: config.banner livescript: src: files: './tests/helpers.js': './tests/helpers/*' './tests/tests.js': './tests/tests/*' './tests/library.js': './tests/library/*' './tests/es.js': './tests/tests/es*' './tests/experimental.js': './tests/experimental/*' './build/index.js': './build/build.ls*' clean: <[./library]> copy: lib: files: * expand: on cwd: './' src: <[es5/** es6/** es7/** stage/** web/** core/** fn/** index.js shim.js]> dest: './library/' * expand: on cwd: './' src: <[modules/*]> dest: './library/' filter: \isFile * expand: on cwd: './modules/library/' src: '*' dest: './library/modules/' watch: core: files: './modules/*' tasks: \default tests: files: './tests/tests/*' tasks: \livescript karma: 'options': configFile: './tests/karma.conf.js' browsers: <[PhantomJS]> singleRun: on 'default': {} 'library': files: <[client/library.js tests/helpers.js tests/library.js]>map -> src: it grunt.registerTask \build (options)-> done = @async! build { modules: (options || 'es5,es6,es7,js,web,core')split \, blacklist: (grunt.option(\blacklist) || '')split \, library: grunt.option(\library) in <[yes on true]> umd: grunt.option(\umd) not in <[no off false]> } .then !-> grunt.option(\path) || grunt.option(\path, './custom') fs.writeFile grunt.option(\path) + '.js', it, done .catch !-> console.error it process.exit 1 grunt.registerTask \client -> grunt.option \library '' grunt.option \path './client/core' grunt.task.run <[build:es5,es6,es7,js,web,core uglify]> grunt.registerTask \library -> grunt.option \library 'true' grunt.option \path './client/library' grunt.task.run <[build:es5,es6,es7,js,web,core uglify]> grunt.registerTask \shim -> grunt.option \library '' grunt.option \path './client/shim' grunt.task.run <[build:es5,es6,es7,js,web uglify]> grunt.registerTask \e -> grunt.option \library ''> grunt.option \path './client/core' grunt.task.run <[build:es5,es6,es7,js,web,core,exp uglify]> grunt.registerTask \default <[clean copy client library shim]>core-js-2.4.1/build/build.ls000066400000000000000000000033231274277553300156360ustar00rootroot00000000000000require! { '../library/fn/promise': Promise './config': {list, experimental, libraryBlacklist, es5SpecialCase, banner} fs: {readFile, writeFile, unlink} path: {join} webpack, temp } module.exports = ({modules = [], blacklist = [], library = no, umd = on})-> resolve, reject <~! new Promise _ let @ = modules.reduce ((memo, it)-> memo[it] = on; memo), {} if @exp => for experimental => @[..] = on if @es5 => for es5SpecialCase => @[..] = on for ns of @ if @[ns] for name in list if name.indexOf("#ns.") is 0 and name not in experimental @[name] = on if library => blacklist ++= libraryBlacklist for ns in blacklist for name in list if name is ns or name.indexOf("#ns.") is 0 @[name] = no TARGET = temp.path {suffix: '.js'} err, info <~! webpack do entry: list.filter(~> @[it]).map ~> if library => join __dirname, '..', 'library', 'modules', it else join __dirname, '..', 'modules', it output: path: '' filename: TARGET if err => return reject err err, script <~! readFile TARGET if err => return reject err err <~! unlink TARGET if err => return reject err if umd exportScript = """ // CommonJS export if(typeof module != 'undefined' && module.exports)module.exports = __e; // RequireJS export else if(typeof define == 'function' && define.amd)define(function(){return __e}); // Export to global object else __g.core = __e; """ else exportScript = "" resolve """ #banner !function(__e, __g, undefined){ 'use strict'; #script #exportScript }(1, 1); """core-js-2.4.1/build/config.js000066400000000000000000000155161274277553300160110ustar00rootroot00000000000000module.exports = { list: [ 'es6.symbol', 'es6.object.define-property', 'es6.object.define-properties', 'es6.object.get-own-property-descriptor', 'es6.object.create', 'es6.object.get-prototype-of', 'es6.object.keys', 'es6.object.get-own-property-names', 'es6.object.freeze', 'es6.object.seal', 'es6.object.prevent-extensions', 'es6.object.is-frozen', 'es6.object.is-sealed', 'es6.object.is-extensible', 'es6.object.assign', 'es6.object.is', 'es6.object.set-prototype-of', 'es6.object.to-string', 'es6.function.bind', 'es6.function.name', 'es6.function.has-instance', 'es6.number.constructor', 'es6.number.to-fixed', 'es6.number.to-precision', 'es6.number.epsilon', 'es6.number.is-finite', 'es6.number.is-integer', 'es6.number.is-nan', 'es6.number.is-safe-integer', 'es6.number.max-safe-integer', 'es6.number.min-safe-integer', 'es6.number.parse-float', 'es6.number.parse-int', 'es6.parse-int', 'es6.parse-float', 'es6.math.acosh', 'es6.math.asinh', 'es6.math.atanh', 'es6.math.cbrt', 'es6.math.clz32', 'es6.math.cosh', 'es6.math.expm1', 'es6.math.fround', 'es6.math.hypot', 'es6.math.imul', 'es6.math.log10', 'es6.math.log1p', 'es6.math.log2', 'es6.math.sign', 'es6.math.sinh', 'es6.math.tanh', 'es6.math.trunc', 'es6.string.from-code-point', 'es6.string.raw', 'es6.string.trim', 'es6.string.code-point-at', 'es6.string.ends-with', 'es6.string.includes', 'es6.string.repeat', 'es6.string.starts-with', 'es6.string.iterator', 'es6.string.anchor', 'es6.string.big', 'es6.string.blink', 'es6.string.bold', 'es6.string.fixed', 'es6.string.fontcolor', 'es6.string.fontsize', 'es6.string.italics', 'es6.string.link', 'es6.string.small', 'es6.string.strike', 'es6.string.sub', 'es6.string.sup', 'es6.array.is-array', 'es6.array.from', 'es6.array.of', 'es6.array.join', 'es6.array.slice', 'es6.array.sort', 'es6.array.for-each', 'es6.array.map', 'es6.array.filter', 'es6.array.some', 'es6.array.every', 'es6.array.reduce', 'es6.array.reduce-right', 'es6.array.index-of', 'es6.array.last-index-of', 'es6.array.copy-within', 'es6.array.fill', 'es6.array.find', 'es6.array.find-index', 'es6.array.iterator', 'es6.array.species', 'es6.regexp.constructor', 'es6.regexp.to-string', 'es6.regexp.flags', 'es6.regexp.match', 'es6.regexp.replace', 'es6.regexp.search', 'es6.regexp.split', 'es6.promise', 'es6.map', 'es6.set', 'es6.weak-map', 'es6.weak-set', 'es6.reflect.apply', 'es6.reflect.construct', 'es6.reflect.define-property', 'es6.reflect.delete-property', 'es6.reflect.enumerate', 'es6.reflect.get', 'es6.reflect.get-own-property-descriptor', 'es6.reflect.get-prototype-of', 'es6.reflect.has', 'es6.reflect.is-extensible', 'es6.reflect.own-keys', 'es6.reflect.prevent-extensions', 'es6.reflect.set', 'es6.reflect.set-prototype-of', 'es6.date.now', 'es6.date.to-json', 'es6.date.to-iso-string', 'es6.date.to-string', 'es6.date.to-primitive', 'es6.typed.array-buffer', 'es6.typed.data-view', 'es6.typed.int8-array', 'es6.typed.uint8-array', 'es6.typed.uint8-clamped-array', 'es6.typed.int16-array', 'es6.typed.uint16-array', 'es6.typed.int32-array', 'es6.typed.uint32-array', 'es6.typed.float32-array', 'es6.typed.float64-array', 'es7.array.includes', 'es7.string.at', 'es7.string.pad-start', 'es7.string.pad-end', 'es7.string.trim-left', 'es7.string.trim-right', 'es7.string.match-all', 'es7.symbol.async-iterator', 'es7.symbol.observable', 'es7.object.get-own-property-descriptors', 'es7.object.values', 'es7.object.entries', 'es7.object.enumerable-keys', 'es7.object.enumerable-values', 'es7.object.enumerable-entries', 'es7.object.define-getter', 'es7.object.define-setter', 'es7.object.lookup-getter', 'es7.object.lookup-setter', 'es7.map.to-json', 'es7.set.to-json', 'es7.system.global', 'es7.error.is-error', 'es7.math.iaddh', 'es7.math.isubh', 'es7.math.imulh', 'es7.math.umulh', 'es7.reflect.define-metadata', 'es7.reflect.delete-metadata', 'es7.reflect.get-metadata', 'es7.reflect.get-metadata-keys', 'es7.reflect.get-own-metadata', 'es7.reflect.get-own-metadata-keys', 'es7.reflect.has-metadata', 'es7.reflect.has-own-metadata', 'es7.reflect.metadata', 'es7.asap', 'es7.observable', 'web.immediate', 'web.dom.iterable', 'web.timers', 'core.dict', 'core.get-iterator-method', 'core.get-iterator', 'core.is-iterable', 'core.delay', 'core.function.part', 'core.object.is-object', 'core.object.classof', 'core.object.define', 'core.object.make', 'core.number.iterator', 'core.regexp.escape', 'core.string.escape-html', 'core.string.unescape-html', ], experimental: [ 'es7.object.enumerable-keys', 'es7.object.enumerable-values', 'es7.object.enumerable-entries', ], libraryBlacklist: [ 'es6.object.to-string', 'es6.function.name', 'es6.regexp.constructor', 'es6.regexp.to-string', 'es6.regexp.flags', 'es6.regexp.match', 'es6.regexp.replace', 'es6.regexp.search', 'es6.regexp.split', 'es6.number.constructor', 'es6.date.to-string', 'es6.date.to-primitive', ], es5SpecialCase: [ 'es6.object.create', 'es6.object.define-property', 'es6.object.define-properties', 'es6.object.get-own-property-descriptor', 'es6.object.get-prototype-of', 'es6.object.keys', 'es6.object.get-own-property-names', 'es6.object.freeze', 'es6.object.seal', 'es6.object.prevent-extensions', 'es6.object.is-frozen', 'es6.object.is-sealed', 'es6.object.is-extensible', 'es6.function.bind', 'es6.array.is-array', 'es6.array.join', 'es6.array.slice', 'es6.array.sort', 'es6.array.for-each', 'es6.array.map', 'es6.array.filter', 'es6.array.some', 'es6.array.every', 'es6.array.reduce', 'es6.array.reduce-right', 'es6.array.index-of', 'es6.array.last-index-of', 'es6.number.to-fixed', 'es6.number.to-precision', 'es6.date.now', 'es6.date.to-iso-string', 'es6.date.to-json', 'es6.string.trim', 'es6.regexp.to-string', 'es6.parse-int', 'es6.parse-float', ], banner: '/**\n' + ' * core-js ' + require('../package').version + '\n' + ' * https://github.com/zloirock/core-js\n' + ' * License: http://rock.mit-license.org\n' + ' * © ' + new Date().getFullYear() + ' Denis Pushkarev\n' + ' */' };core-js-2.4.1/build/core-js-builder/000077500000000000000000000000001274277553300171645ustar00rootroot00000000000000core-js-2.4.1/build/core-js-builder/.gitignore000066400000000000000000000000751274277553300211560ustar00rootroot00000000000000node_modules/ *.tmp *.log *.bak *.swp Thumbs.db Desktop.inicore-js-2.4.1/build/core-js-builder/.npmignore000066400000000000000000000000261274277553300211610ustar00rootroot00000000000000node_modules/ *.log .*core-js-2.4.1/build/core-js-builder/LICENSE000066400000000000000000000020431274277553300201700ustar00rootroot00000000000000Copyright (c) 2015 Denis Pushkarev Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. core-js-2.4.1/build/core-js-builder/README.md000066400000000000000000000001371274277553300204440ustar00rootroot00000000000000[See `core-js` readme](https://github.com/zloirock/core-js#custom-build-from-external-scripts).core-js-2.4.1/build/core-js-builder/index.js000066400000000000000000000000521274277553300206260ustar00rootroot00000000000000module.exports = require('core-js/build');core-js-2.4.1/build/core-js-builder/package.json000066400000000000000000000005001274277553300214450ustar00rootroot00000000000000{ "name": "core-js-builder", "description": "core-js builder", "version": "2.4.1", "repository": { "type": "git", "url": "https://github.com/zloirock/core-js.git" }, "main": "index.js", "dependencies": { "core-js": "2.4.1", "webpack": "1.13.x", "temp": "0.8.x" }, "license": "MIT" }core-js-2.4.1/build/index.js000066400000000000000000000074271274277553300156550ustar00rootroot00000000000000// Generated by LiveScript 1.4.0 (function(){ var Promise, ref$, list, experimental, libraryBlacklist, es5SpecialCase, banner, readFile, writeFile, unlink, join, webpack, temp; Promise = require('../library/fn/promise'); ref$ = require('./config'), list = ref$.list, experimental = ref$.experimental, libraryBlacklist = ref$.libraryBlacklist, es5SpecialCase = ref$.es5SpecialCase, banner = ref$.banner; ref$ = require('fs'), readFile = ref$.readFile, writeFile = ref$.writeFile, unlink = ref$.unlink; join = require('path').join; webpack = require('webpack'); temp = require('temp'); module.exports = function(arg$){ var modules, ref$, blacklist, library, umd, this$ = this; modules = (ref$ = arg$.modules) != null ? ref$ : [], blacklist = (ref$ = arg$.blacklist) != null ? ref$ : [], library = (ref$ = arg$.library) != null ? ref$ : false, umd = (ref$ = arg$.umd) != null ? ref$ : true; return new Promise(function(resolve, reject){ (function(){ var i$, x$, ref$, len$, y$, ns, name, j$, len1$, TARGET, this$ = this; if (this.exp) { for (i$ = 0, len$ = (ref$ = experimental).length; i$ < len$; ++i$) { x$ = ref$[i$]; this[x$] = true; } } if (this.es5) { for (i$ = 0, len$ = (ref$ = es5SpecialCase).length; i$ < len$; ++i$) { y$ = ref$[i$]; this[y$] = true; } } for (ns in this) { if (this[ns]) { for (i$ = 0, len$ = (ref$ = list).length; i$ < len$; ++i$) { name = ref$[i$]; if (name.indexOf(ns + ".") === 0 && !in$(name, experimental)) { this[name] = true; } } } } if (library) { blacklist = blacklist.concat(libraryBlacklist); } for (i$ = 0, len$ = blacklist.length; i$ < len$; ++i$) { ns = blacklist[i$]; for (j$ = 0, len1$ = (ref$ = list).length; j$ < len1$; ++j$) { name = ref$[j$]; if (name === ns || name.indexOf(ns + ".") === 0) { this[name] = false; } } } TARGET = temp.path({ suffix: '.js' }); webpack({ entry: list.filter(function(it){ return this$[it]; }).map(function(it){ if (library) { return join(__dirname, '..', 'library', 'modules', it); } else { return join(__dirname, '..', 'modules', it); } }), output: { path: '', filename: TARGET } }, function(err, info){ if (err) { return reject(err); } readFile(TARGET, function(err, script){ if (err) { return reject(err); } unlink(TARGET, function(err){ var exportScript; if (err) { return reject(err); } if (umd) { exportScript = "// CommonJS export\nif(typeof module != 'undefined' && module.exports)module.exports = __e;\n// RequireJS export\nelse if(typeof define == 'function' && define.amd)define(function(){return __e});\n// Export to global object\nelse __g.core = __e;"; } else { exportScript = ""; } resolve("" + banner + "\n!function(__e, __g, undefined){\n'use strict';\n" + script + "\n" + exportScript + "\n}(1, 1);"); }); }); }); }.call(modules.reduce(function(memo, it){ memo[it] = true; return memo; }, {}))); }); }; function in$(x, xs){ var i = -1, l = xs.length >>> 0; while (++i < l) if (x === xs[i]) return true; return false; } }).call(this); core-js-2.4.1/client/000077500000000000000000000000001274277553300143555ustar00rootroot00000000000000core-js-2.4.1/client/core.js000066400000000000000000007207421274277553300156570ustar00rootroot00000000000000/** * core-js 2.4.1 * https://github.com/zloirock/core-js * License: http://rock.mit-license.org * © 2016 Denis Pushkarev */ !function(__e, __g, undefined){ 'use strict'; /******/ (function(modules) { // webpackBootstrap /******/ // The module cache /******/ var installedModules = {}; /******/ // The require function /******/ function __webpack_require__(moduleId) { /******/ // Check if module is in cache /******/ if(installedModules[moduleId]) /******/ return installedModules[moduleId].exports; /******/ // Create a new module (and put it into the cache) /******/ var module = installedModules[moduleId] = { /******/ exports: {}, /******/ id: moduleId, /******/ loaded: false /******/ }; /******/ // Execute the module function /******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__); /******/ // Flag the module as loaded /******/ module.loaded = true; /******/ // Return the exports of the module /******/ return module.exports; /******/ } /******/ // expose the modules object (__webpack_modules__) /******/ __webpack_require__.m = modules; /******/ // expose the module cache /******/ __webpack_require__.c = installedModules; /******/ // __webpack_public_path__ /******/ __webpack_require__.p = ""; /******/ // Load entry module and return exports /******/ return __webpack_require__(0); /******/ }) /************************************************************************/ /******/ ([ /* 0 */ /***/ function(module, exports, __webpack_require__) { __webpack_require__(1); __webpack_require__(50); __webpack_require__(51); __webpack_require__(52); __webpack_require__(54); __webpack_require__(55); __webpack_require__(58); __webpack_require__(59); __webpack_require__(60); __webpack_require__(61); __webpack_require__(62); __webpack_require__(63); __webpack_require__(64); __webpack_require__(65); __webpack_require__(66); __webpack_require__(68); __webpack_require__(70); __webpack_require__(72); __webpack_require__(74); __webpack_require__(77); __webpack_require__(78); __webpack_require__(79); __webpack_require__(83); __webpack_require__(86); __webpack_require__(87); __webpack_require__(88); __webpack_require__(89); __webpack_require__(91); __webpack_require__(92); __webpack_require__(93); __webpack_require__(94); __webpack_require__(95); __webpack_require__(97); __webpack_require__(99); __webpack_require__(100); __webpack_require__(101); __webpack_require__(103); __webpack_require__(104); __webpack_require__(105); __webpack_require__(107); __webpack_require__(108); __webpack_require__(109); __webpack_require__(111); __webpack_require__(112); __webpack_require__(113); __webpack_require__(114); __webpack_require__(115); __webpack_require__(116); __webpack_require__(117); __webpack_require__(118); __webpack_require__(119); __webpack_require__(120); __webpack_require__(121); __webpack_require__(122); __webpack_require__(123); __webpack_require__(124); __webpack_require__(126); __webpack_require__(130); __webpack_require__(131); __webpack_require__(132); __webpack_require__(133); __webpack_require__(137); __webpack_require__(139); __webpack_require__(140); __webpack_require__(141); __webpack_require__(142); __webpack_require__(143); __webpack_require__(144); __webpack_require__(145); __webpack_require__(146); __webpack_require__(147); __webpack_require__(148); __webpack_require__(149); __webpack_require__(150); __webpack_require__(151); __webpack_require__(152); __webpack_require__(158); __webpack_require__(159); __webpack_require__(161); __webpack_require__(162); __webpack_require__(163); __webpack_require__(167); __webpack_require__(168); __webpack_require__(169); __webpack_require__(170); __webpack_require__(171); __webpack_require__(173); __webpack_require__(174); __webpack_require__(175); __webpack_require__(176); __webpack_require__(179); __webpack_require__(181); __webpack_require__(182); __webpack_require__(183); __webpack_require__(185); __webpack_require__(187); __webpack_require__(189); __webpack_require__(190); __webpack_require__(191); __webpack_require__(193); __webpack_require__(194); __webpack_require__(195); __webpack_require__(196); __webpack_require__(203); __webpack_require__(206); __webpack_require__(207); __webpack_require__(209); __webpack_require__(210); __webpack_require__(211); __webpack_require__(212); __webpack_require__(213); __webpack_require__(214); __webpack_require__(215); __webpack_require__(216); __webpack_require__(217); __webpack_require__(218); __webpack_require__(219); __webpack_require__(220); __webpack_require__(222); __webpack_require__(223); __webpack_require__(224); __webpack_require__(225); __webpack_require__(226); __webpack_require__(227); __webpack_require__(228); __webpack_require__(229); __webpack_require__(231); __webpack_require__(234); __webpack_require__(235); __webpack_require__(237); __webpack_require__(238); __webpack_require__(239); __webpack_require__(240); __webpack_require__(241); __webpack_require__(242); __webpack_require__(243); __webpack_require__(244); __webpack_require__(245); __webpack_require__(246); __webpack_require__(247); __webpack_require__(249); __webpack_require__(250); __webpack_require__(251); __webpack_require__(252); __webpack_require__(253); __webpack_require__(254); __webpack_require__(255); __webpack_require__(256); __webpack_require__(258); __webpack_require__(259); __webpack_require__(261); __webpack_require__(262); __webpack_require__(263); __webpack_require__(264); __webpack_require__(267); __webpack_require__(268); __webpack_require__(269); __webpack_require__(270); __webpack_require__(271); __webpack_require__(272); __webpack_require__(273); __webpack_require__(274); __webpack_require__(276); __webpack_require__(277); __webpack_require__(278); __webpack_require__(279); __webpack_require__(280); __webpack_require__(281); __webpack_require__(282); __webpack_require__(283); __webpack_require__(284); __webpack_require__(285); __webpack_require__(286); __webpack_require__(287); __webpack_require__(288); __webpack_require__(291); __webpack_require__(156); __webpack_require__(293); __webpack_require__(292); __webpack_require__(294); __webpack_require__(295); __webpack_require__(296); __webpack_require__(297); __webpack_require__(298); __webpack_require__(300); __webpack_require__(301); __webpack_require__(302); __webpack_require__(304); module.exports = __webpack_require__(305); /***/ }, /* 1 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; // ECMAScript 6 symbols shim var global = __webpack_require__(2) , has = __webpack_require__(3) , DESCRIPTORS = __webpack_require__(4) , $export = __webpack_require__(6) , redefine = __webpack_require__(16) , META = __webpack_require__(20).KEY , $fails = __webpack_require__(5) , shared = __webpack_require__(21) , setToStringTag = __webpack_require__(22) , uid = __webpack_require__(17) , wks = __webpack_require__(23) , wksExt = __webpack_require__(24) , wksDefine = __webpack_require__(25) , keyOf = __webpack_require__(27) , enumKeys = __webpack_require__(40) , isArray = __webpack_require__(43) , anObject = __webpack_require__(10) , toIObject = __webpack_require__(30) , toPrimitive = __webpack_require__(14) , createDesc = __webpack_require__(15) , _create = __webpack_require__(44) , gOPNExt = __webpack_require__(47) , $GOPD = __webpack_require__(49) , $DP = __webpack_require__(9) , $keys = __webpack_require__(28) , gOPD = $GOPD.f , dP = $DP.f , gOPN = gOPNExt.f , $Symbol = global.Symbol , $JSON = global.JSON , _stringify = $JSON && $JSON.stringify , PROTOTYPE = 'prototype' , HIDDEN = wks('_hidden') , TO_PRIMITIVE = wks('toPrimitive') , isEnum = {}.propertyIsEnumerable , SymbolRegistry = shared('symbol-registry') , AllSymbols = shared('symbols') , OPSymbols = shared('op-symbols') , ObjectProto = Object[PROTOTYPE] , USE_NATIVE = typeof $Symbol == 'function' , QObject = global.QObject; // Don't use setters in Qt Script, https://github.com/zloirock/core-js/issues/173 var setter = !QObject || !QObject[PROTOTYPE] || !QObject[PROTOTYPE].findChild; // fallback for old Android, https://code.google.com/p/v8/issues/detail?id=687 var setSymbolDesc = DESCRIPTORS && $fails(function(){ return _create(dP({}, 'a', { get: function(){ return dP(this, 'a', {value: 7}).a; } })).a != 7; }) ? function(it, key, D){ var protoDesc = gOPD(ObjectProto, key); if(protoDesc)delete ObjectProto[key]; dP(it, key, D); if(protoDesc && it !== ObjectProto)dP(ObjectProto, key, protoDesc); } : dP; var wrap = function(tag){ var sym = AllSymbols[tag] = _create($Symbol[PROTOTYPE]); sym._k = tag; return sym; }; var isSymbol = USE_NATIVE && typeof $Symbol.iterator == 'symbol' ? function(it){ return typeof it == 'symbol'; } : function(it){ return it instanceof $Symbol; }; var $defineProperty = function defineProperty(it, key, D){ if(it === ObjectProto)$defineProperty(OPSymbols, key, D); anObject(it); key = toPrimitive(key, true); anObject(D); if(has(AllSymbols, key)){ if(!D.enumerable){ if(!has(it, HIDDEN))dP(it, HIDDEN, createDesc(1, {})); it[HIDDEN][key] = true; } else { if(has(it, HIDDEN) && it[HIDDEN][key])it[HIDDEN][key] = false; D = _create(D, {enumerable: createDesc(0, false)}); } return setSymbolDesc(it, key, D); } return dP(it, key, D); }; var $defineProperties = function defineProperties(it, P){ anObject(it); var keys = enumKeys(P = toIObject(P)) , i = 0 , l = keys.length , key; while(l > i)$defineProperty(it, key = keys[i++], P[key]); return it; }; var $create = function create(it, P){ return P === undefined ? _create(it) : $defineProperties(_create(it), P); }; var $propertyIsEnumerable = function propertyIsEnumerable(key){ var E = isEnum.call(this, key = toPrimitive(key, true)); if(this === ObjectProto && has(AllSymbols, key) && !has(OPSymbols, key))return false; return E || !has(this, key) || !has(AllSymbols, key) || has(this, HIDDEN) && this[HIDDEN][key] ? E : true; }; var $getOwnPropertyDescriptor = function getOwnPropertyDescriptor(it, key){ it = toIObject(it); key = toPrimitive(key, true); if(it === ObjectProto && has(AllSymbols, key) && !has(OPSymbols, key))return; var D = gOPD(it, key); if(D && has(AllSymbols, key) && !(has(it, HIDDEN) && it[HIDDEN][key]))D.enumerable = true; return D; }; var $getOwnPropertyNames = function getOwnPropertyNames(it){ var names = gOPN(toIObject(it)) , result = [] , i = 0 , key; while(names.length > i){ if(!has(AllSymbols, key = names[i++]) && key != HIDDEN && key != META)result.push(key); } return result; }; var $getOwnPropertySymbols = function getOwnPropertySymbols(it){ var IS_OP = it === ObjectProto , names = gOPN(IS_OP ? OPSymbols : toIObject(it)) , result = [] , i = 0 , key; while(names.length > i){ if(has(AllSymbols, key = names[i++]) && (IS_OP ? has(ObjectProto, key) : true))result.push(AllSymbols[key]); } return result; }; // 19.4.1.1 Symbol([description]) if(!USE_NATIVE){ $Symbol = function Symbol(){ if(this instanceof $Symbol)throw TypeError('Symbol is not a constructor!'); var tag = uid(arguments.length > 0 ? arguments[0] : undefined); var $set = function(value){ if(this === ObjectProto)$set.call(OPSymbols, value); if(has(this, HIDDEN) && has(this[HIDDEN], tag))this[HIDDEN][tag] = false; setSymbolDesc(this, tag, createDesc(1, value)); }; if(DESCRIPTORS && setter)setSymbolDesc(ObjectProto, tag, {configurable: true, set: $set}); return wrap(tag); }; redefine($Symbol[PROTOTYPE], 'toString', function toString(){ return this._k; }); $GOPD.f = $getOwnPropertyDescriptor; $DP.f = $defineProperty; __webpack_require__(48).f = gOPNExt.f = $getOwnPropertyNames; __webpack_require__(42).f = $propertyIsEnumerable; __webpack_require__(41).f = $getOwnPropertySymbols; if(DESCRIPTORS && !__webpack_require__(26)){ redefine(ObjectProto, 'propertyIsEnumerable', $propertyIsEnumerable, true); } wksExt.f = function(name){ return wrap(wks(name)); } } $export($export.G + $export.W + $export.F * !USE_NATIVE, {Symbol: $Symbol}); for(var symbols = ( // 19.4.2.2, 19.4.2.3, 19.4.2.4, 19.4.2.6, 19.4.2.8, 19.4.2.9, 19.4.2.10, 19.4.2.11, 19.4.2.12, 19.4.2.13, 19.4.2.14 'hasInstance,isConcatSpreadable,iterator,match,replace,search,species,split,toPrimitive,toStringTag,unscopables' ).split(','), i = 0; symbols.length > i; )wks(symbols[i++]); for(var symbols = $keys(wks.store), i = 0; symbols.length > i; )wksDefine(symbols[i++]); $export($export.S + $export.F * !USE_NATIVE, 'Symbol', { // 19.4.2.1 Symbol.for(key) 'for': function(key){ return has(SymbolRegistry, key += '') ? SymbolRegistry[key] : SymbolRegistry[key] = $Symbol(key); }, // 19.4.2.5 Symbol.keyFor(sym) keyFor: function keyFor(key){ if(isSymbol(key))return keyOf(SymbolRegistry, key); throw TypeError(key + ' is not a symbol!'); }, useSetter: function(){ setter = true; }, useSimple: function(){ setter = false; } }); $export($export.S + $export.F * !USE_NATIVE, 'Object', { // 19.1.2.2 Object.create(O [, Properties]) create: $create, // 19.1.2.4 Object.defineProperty(O, P, Attributes) defineProperty: $defineProperty, // 19.1.2.3 Object.defineProperties(O, Properties) defineProperties: $defineProperties, // 19.1.2.6 Object.getOwnPropertyDescriptor(O, P) getOwnPropertyDescriptor: $getOwnPropertyDescriptor, // 19.1.2.7 Object.getOwnPropertyNames(O) getOwnPropertyNames: $getOwnPropertyNames, // 19.1.2.8 Object.getOwnPropertySymbols(O) getOwnPropertySymbols: $getOwnPropertySymbols }); // 24.3.2 JSON.stringify(value [, replacer [, space]]) $JSON && $export($export.S + $export.F * (!USE_NATIVE || $fails(function(){ var S = $Symbol(); // MS Edge converts symbol values to JSON as {} // WebKit converts symbol values to JSON as null // V8 throws on boxed symbols return _stringify([S]) != '[null]' || _stringify({a: S}) != '{}' || _stringify(Object(S)) != '{}'; })), 'JSON', { stringify: function stringify(it){ if(it === undefined || isSymbol(it))return; // IE8 returns string on undefined var args = [it] , i = 1 , replacer, $replacer; while(arguments.length > i)args.push(arguments[i++]); replacer = args[1]; if(typeof replacer == 'function')$replacer = replacer; if($replacer || !isArray(replacer))replacer = function(key, value){ if($replacer)value = $replacer.call(this, key, value); if(!isSymbol(value))return value; }; args[1] = replacer; return _stringify.apply($JSON, args); } }); // 19.4.3.4 Symbol.prototype[@@toPrimitive](hint) $Symbol[PROTOTYPE][TO_PRIMITIVE] || __webpack_require__(8)($Symbol[PROTOTYPE], TO_PRIMITIVE, $Symbol[PROTOTYPE].valueOf); // 19.4.3.5 Symbol.prototype[@@toStringTag] setToStringTag($Symbol, 'Symbol'); // 20.2.1.9 Math[@@toStringTag] setToStringTag(Math, 'Math', true); // 24.3.3 JSON[@@toStringTag] setToStringTag(global.JSON, 'JSON', true); /***/ }, /* 2 */ /***/ function(module, exports) { // https://github.com/zloirock/core-js/issues/86#issuecomment-115759028 var global = module.exports = typeof window != 'undefined' && window.Math == Math ? window : typeof self != 'undefined' && self.Math == Math ? self : Function('return this')(); if(typeof __g == 'number')__g = global; // eslint-disable-line no-undef /***/ }, /* 3 */ /***/ function(module, exports) { var hasOwnProperty = {}.hasOwnProperty; module.exports = function(it, key){ return hasOwnProperty.call(it, key); }; /***/ }, /* 4 */ /***/ function(module, exports, __webpack_require__) { // Thank's IE8 for his funny defineProperty module.exports = !__webpack_require__(5)(function(){ return Object.defineProperty({}, 'a', {get: function(){ return 7; }}).a != 7; }); /***/ }, /* 5 */ /***/ function(module, exports) { module.exports = function(exec){ try { return !!exec(); } catch(e){ return true; } }; /***/ }, /* 6 */ /***/ function(module, exports, __webpack_require__) { var global = __webpack_require__(2) , core = __webpack_require__(7) , hide = __webpack_require__(8) , redefine = __webpack_require__(16) , ctx = __webpack_require__(18) , PROTOTYPE = 'prototype'; var $export = function(type, name, source){ var IS_FORCED = type & $export.F , IS_GLOBAL = type & $export.G , IS_STATIC = type & $export.S , IS_PROTO = type & $export.P , IS_BIND = type & $export.B , target = IS_GLOBAL ? global : IS_STATIC ? global[name] || (global[name] = {}) : (global[name] || {})[PROTOTYPE] , exports = IS_GLOBAL ? core : core[name] || (core[name] = {}) , expProto = exports[PROTOTYPE] || (exports[PROTOTYPE] = {}) , key, own, out, exp; if(IS_GLOBAL)source = name; for(key in source){ // contains in native own = !IS_FORCED && target && target[key] !== undefined; // export native or passed out = (own ? target : source)[key]; // bind timers to global for call from export context exp = IS_BIND && own ? ctx(out, global) : IS_PROTO && typeof out == 'function' ? ctx(Function.call, out) : out; // extend global if(target)redefine(target, key, out, type & $export.U); // export if(exports[key] != out)hide(exports, key, exp); if(IS_PROTO && expProto[key] != out)expProto[key] = out; } }; global.core = core; // type bitmap $export.F = 1; // forced $export.G = 2; // global $export.S = 4; // static $export.P = 8; // proto $export.B = 16; // bind $export.W = 32; // wrap $export.U = 64; // safe $export.R = 128; // real proto method for `library` module.exports = $export; /***/ }, /* 7 */ /***/ function(module, exports) { var core = module.exports = {version: '2.4.0'}; if(typeof __e == 'number')__e = core; // eslint-disable-line no-undef /***/ }, /* 8 */ /***/ function(module, exports, __webpack_require__) { var dP = __webpack_require__(9) , createDesc = __webpack_require__(15); module.exports = __webpack_require__(4) ? function(object, key, value){ return dP.f(object, key, createDesc(1, value)); } : function(object, key, value){ object[key] = value; return object; }; /***/ }, /* 9 */ /***/ function(module, exports, __webpack_require__) { var anObject = __webpack_require__(10) , IE8_DOM_DEFINE = __webpack_require__(12) , toPrimitive = __webpack_require__(14) , dP = Object.defineProperty; exports.f = __webpack_require__(4) ? Object.defineProperty : function defineProperty(O, P, Attributes){ anObject(O); P = toPrimitive(P, true); anObject(Attributes); if(IE8_DOM_DEFINE)try { return dP(O, P, Attributes); } catch(e){ /* empty */ } if('get' in Attributes || 'set' in Attributes)throw TypeError('Accessors not supported!'); if('value' in Attributes)O[P] = Attributes.value; return O; }; /***/ }, /* 10 */ /***/ function(module, exports, __webpack_require__) { var isObject = __webpack_require__(11); module.exports = function(it){ if(!isObject(it))throw TypeError(it + ' is not an object!'); return it; }; /***/ }, /* 11 */ /***/ function(module, exports) { module.exports = function(it){ return typeof it === 'object' ? it !== null : typeof it === 'function'; }; /***/ }, /* 12 */ /***/ function(module, exports, __webpack_require__) { module.exports = !__webpack_require__(4) && !__webpack_require__(5)(function(){ return Object.defineProperty(__webpack_require__(13)('div'), 'a', {get: function(){ return 7; }}).a != 7; }); /***/ }, /* 13 */ /***/ function(module, exports, __webpack_require__) { var isObject = __webpack_require__(11) , document = __webpack_require__(2).document // in old IE typeof document.createElement is 'object' , is = isObject(document) && isObject(document.createElement); module.exports = function(it){ return is ? document.createElement(it) : {}; }; /***/ }, /* 14 */ /***/ function(module, exports, __webpack_require__) { // 7.1.1 ToPrimitive(input [, PreferredType]) var isObject = __webpack_require__(11); // instead of the ES6 spec version, we didn't implement @@toPrimitive case // and the second argument - flag - preferred type is a string module.exports = function(it, S){ if(!isObject(it))return it; var fn, val; if(S && typeof (fn = it.toString) == 'function' && !isObject(val = fn.call(it)))return val; if(typeof (fn = it.valueOf) == 'function' && !isObject(val = fn.call(it)))return val; if(!S && typeof (fn = it.toString) == 'function' && !isObject(val = fn.call(it)))return val; throw TypeError("Can't convert object to primitive value"); }; /***/ }, /* 15 */ /***/ function(module, exports) { module.exports = function(bitmap, value){ return { enumerable : !(bitmap & 1), configurable: !(bitmap & 2), writable : !(bitmap & 4), value : value }; }; /***/ }, /* 16 */ /***/ function(module, exports, __webpack_require__) { var global = __webpack_require__(2) , hide = __webpack_require__(8) , has = __webpack_require__(3) , SRC = __webpack_require__(17)('src') , TO_STRING = 'toString' , $toString = Function[TO_STRING] , TPL = ('' + $toString).split(TO_STRING); __webpack_require__(7).inspectSource = function(it){ return $toString.call(it); }; (module.exports = function(O, key, val, safe){ var isFunction = typeof val == 'function'; if(isFunction)has(val, 'name') || hide(val, 'name', key); if(O[key] === val)return; if(isFunction)has(val, SRC) || hide(val, SRC, O[key] ? '' + O[key] : TPL.join(String(key))); if(O === global){ O[key] = val; } else { if(!safe){ delete O[key]; hide(O, key, val); } else { if(O[key])O[key] = val; else hide(O, key, val); } } // add fake Function#toString for correct work wrapped methods / constructors with methods like LoDash isNative })(Function.prototype, TO_STRING, function toString(){ return typeof this == 'function' && this[SRC] || $toString.call(this); }); /***/ }, /* 17 */ /***/ function(module, exports) { var id = 0 , px = Math.random(); module.exports = function(key){ return 'Symbol('.concat(key === undefined ? '' : key, ')_', (++id + px).toString(36)); }; /***/ }, /* 18 */ /***/ function(module, exports, __webpack_require__) { // optional / simple context binding var aFunction = __webpack_require__(19); module.exports = function(fn, that, length){ aFunction(fn); if(that === undefined)return fn; switch(length){ case 1: return function(a){ return fn.call(that, a); }; case 2: return function(a, b){ return fn.call(that, a, b); }; case 3: return function(a, b, c){ return fn.call(that, a, b, c); }; } return function(/* ...args */){ return fn.apply(that, arguments); }; }; /***/ }, /* 19 */ /***/ function(module, exports) { module.exports = function(it){ if(typeof it != 'function')throw TypeError(it + ' is not a function!'); return it; }; /***/ }, /* 20 */ /***/ function(module, exports, __webpack_require__) { var META = __webpack_require__(17)('meta') , isObject = __webpack_require__(11) , has = __webpack_require__(3) , setDesc = __webpack_require__(9).f , id = 0; var isExtensible = Object.isExtensible || function(){ return true; }; var FREEZE = !__webpack_require__(5)(function(){ return isExtensible(Object.preventExtensions({})); }); var setMeta = function(it){ setDesc(it, META, {value: { i: 'O' + ++id, // object ID w: {} // weak collections IDs }}); }; var fastKey = function(it, create){ // return primitive with prefix if(!isObject(it))return typeof it == 'symbol' ? it : (typeof it == 'string' ? 'S' : 'P') + it; if(!has(it, META)){ // can't set metadata to uncaught frozen object if(!isExtensible(it))return 'F'; // not necessary to add metadata if(!create)return 'E'; // add missing metadata setMeta(it); // return object ID } return it[META].i; }; var getWeak = function(it, create){ if(!has(it, META)){ // can't set metadata to uncaught frozen object if(!isExtensible(it))return true; // not necessary to add metadata if(!create)return false; // add missing metadata setMeta(it); // return hash weak collections IDs } return it[META].w; }; // add metadata on freeze-family methods calling var onFreeze = function(it){ if(FREEZE && meta.NEED && isExtensible(it) && !has(it, META))setMeta(it); return it; }; var meta = module.exports = { KEY: META, NEED: false, fastKey: fastKey, getWeak: getWeak, onFreeze: onFreeze }; /***/ }, /* 21 */ /***/ function(module, exports, __webpack_require__) { var global = __webpack_require__(2) , SHARED = '__core-js_shared__' , store = global[SHARED] || (global[SHARED] = {}); module.exports = function(key){ return store[key] || (store[key] = {}); }; /***/ }, /* 22 */ /***/ function(module, exports, __webpack_require__) { var def = __webpack_require__(9).f , has = __webpack_require__(3) , TAG = __webpack_require__(23)('toStringTag'); module.exports = function(it, tag, stat){ if(it && !has(it = stat ? it : it.prototype, TAG))def(it, TAG, {configurable: true, value: tag}); }; /***/ }, /* 23 */ /***/ function(module, exports, __webpack_require__) { var store = __webpack_require__(21)('wks') , uid = __webpack_require__(17) , Symbol = __webpack_require__(2).Symbol , USE_SYMBOL = typeof Symbol == 'function'; var $exports = module.exports = function(name){ return store[name] || (store[name] = USE_SYMBOL && Symbol[name] || (USE_SYMBOL ? Symbol : uid)('Symbol.' + name)); }; $exports.store = store; /***/ }, /* 24 */ /***/ function(module, exports, __webpack_require__) { exports.f = __webpack_require__(23); /***/ }, /* 25 */ /***/ function(module, exports, __webpack_require__) { var global = __webpack_require__(2) , core = __webpack_require__(7) , LIBRARY = __webpack_require__(26) , wksExt = __webpack_require__(24) , defineProperty = __webpack_require__(9).f; module.exports = function(name){ var $Symbol = core.Symbol || (core.Symbol = LIBRARY ? {} : global.Symbol || {}); if(name.charAt(0) != '_' && !(name in $Symbol))defineProperty($Symbol, name, {value: wksExt.f(name)}); }; /***/ }, /* 26 */ /***/ function(module, exports) { module.exports = false; /***/ }, /* 27 */ /***/ function(module, exports, __webpack_require__) { var getKeys = __webpack_require__(28) , toIObject = __webpack_require__(30); module.exports = function(object, el){ var O = toIObject(object) , keys = getKeys(O) , length = keys.length , index = 0 , key; while(length > index)if(O[key = keys[index++]] === el)return key; }; /***/ }, /* 28 */ /***/ function(module, exports, __webpack_require__) { // 19.1.2.14 / 15.2.3.14 Object.keys(O) var $keys = __webpack_require__(29) , enumBugKeys = __webpack_require__(39); module.exports = Object.keys || function keys(O){ return $keys(O, enumBugKeys); }; /***/ }, /* 29 */ /***/ function(module, exports, __webpack_require__) { var has = __webpack_require__(3) , toIObject = __webpack_require__(30) , arrayIndexOf = __webpack_require__(34)(false) , IE_PROTO = __webpack_require__(38)('IE_PROTO'); module.exports = function(object, names){ var O = toIObject(object) , i = 0 , result = [] , key; for(key in O)if(key != IE_PROTO)has(O, key) && result.push(key); // Don't enum bug & hidden keys while(names.length > i)if(has(O, key = names[i++])){ ~arrayIndexOf(result, key) || result.push(key); } return result; }; /***/ }, /* 30 */ /***/ function(module, exports, __webpack_require__) { // to indexed object, toObject with fallback for non-array-like ES3 strings var IObject = __webpack_require__(31) , defined = __webpack_require__(33); module.exports = function(it){ return IObject(defined(it)); }; /***/ }, /* 31 */ /***/ function(module, exports, __webpack_require__) { // fallback for non-array-like ES3 and non-enumerable old V8 strings var cof = __webpack_require__(32); module.exports = Object('z').propertyIsEnumerable(0) ? Object : function(it){ return cof(it) == 'String' ? it.split('') : Object(it); }; /***/ }, /* 32 */ /***/ function(module, exports) { var toString = {}.toString; module.exports = function(it){ return toString.call(it).slice(8, -1); }; /***/ }, /* 33 */ /***/ function(module, exports) { // 7.2.1 RequireObjectCoercible(argument) module.exports = function(it){ if(it == undefined)throw TypeError("Can't call method on " + it); return it; }; /***/ }, /* 34 */ /***/ function(module, exports, __webpack_require__) { // false -> Array#indexOf // true -> Array#includes var toIObject = __webpack_require__(30) , toLength = __webpack_require__(35) , toIndex = __webpack_require__(37); module.exports = function(IS_INCLUDES){ return function($this, el, fromIndex){ var O = toIObject($this) , length = toLength(O.length) , index = toIndex(fromIndex, length) , value; // Array#includes uses SameValueZero equality algorithm if(IS_INCLUDES && el != el)while(length > index){ value = O[index++]; if(value != value)return true; // Array#toIndex ignores holes, Array#includes - not } else for(;length > index; index++)if(IS_INCLUDES || index in O){ if(O[index] === el)return IS_INCLUDES || index || 0; } return !IS_INCLUDES && -1; }; }; /***/ }, /* 35 */ /***/ function(module, exports, __webpack_require__) { // 7.1.15 ToLength var toInteger = __webpack_require__(36) , min = Math.min; module.exports = function(it){ return it > 0 ? min(toInteger(it), 0x1fffffffffffff) : 0; // pow(2, 53) - 1 == 9007199254740991 }; /***/ }, /* 36 */ /***/ function(module, exports) { // 7.1.4 ToInteger var ceil = Math.ceil , floor = Math.floor; module.exports = function(it){ return isNaN(it = +it) ? 0 : (it > 0 ? floor : ceil)(it); }; /***/ }, /* 37 */ /***/ function(module, exports, __webpack_require__) { var toInteger = __webpack_require__(36) , max = Math.max , min = Math.min; module.exports = function(index, length){ index = toInteger(index); return index < 0 ? max(index + length, 0) : min(index, length); }; /***/ }, /* 38 */ /***/ function(module, exports, __webpack_require__) { var shared = __webpack_require__(21)('keys') , uid = __webpack_require__(17); module.exports = function(key){ return shared[key] || (shared[key] = uid(key)); }; /***/ }, /* 39 */ /***/ function(module, exports) { // IE 8- don't enum bug keys module.exports = ( 'constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf' ).split(','); /***/ }, /* 40 */ /***/ function(module, exports, __webpack_require__) { // all enumerable object keys, includes symbols var getKeys = __webpack_require__(28) , gOPS = __webpack_require__(41) , pIE = __webpack_require__(42); module.exports = function(it){ var result = getKeys(it) , getSymbols = gOPS.f; if(getSymbols){ var symbols = getSymbols(it) , isEnum = pIE.f , i = 0 , key; while(symbols.length > i)if(isEnum.call(it, key = symbols[i++]))result.push(key); } return result; }; /***/ }, /* 41 */ /***/ function(module, exports) { exports.f = Object.getOwnPropertySymbols; /***/ }, /* 42 */ /***/ function(module, exports) { exports.f = {}.propertyIsEnumerable; /***/ }, /* 43 */ /***/ function(module, exports, __webpack_require__) { // 7.2.2 IsArray(argument) var cof = __webpack_require__(32); module.exports = Array.isArray || function isArray(arg){ return cof(arg) == 'Array'; }; /***/ }, /* 44 */ /***/ function(module, exports, __webpack_require__) { // 19.1.2.2 / 15.2.3.5 Object.create(O [, Properties]) var anObject = __webpack_require__(10) , dPs = __webpack_require__(45) , enumBugKeys = __webpack_require__(39) , IE_PROTO = __webpack_require__(38)('IE_PROTO') , Empty = function(){ /* empty */ } , PROTOTYPE = 'prototype'; // Create object with fake `null` prototype: use iframe Object with cleared prototype var createDict = function(){ // Thrash, waste and sodomy: IE GC bug var iframe = __webpack_require__(13)('iframe') , i = enumBugKeys.length , lt = '<' , gt = '>' , iframeDocument; iframe.style.display = 'none'; __webpack_require__(46).appendChild(iframe); iframe.src = 'javascript:'; // eslint-disable-line no-script-url // createDict = iframe.contentWindow.Object; // html.removeChild(iframe); iframeDocument = iframe.contentWindow.document; iframeDocument.open(); iframeDocument.write(lt + 'script' + gt + 'document.F=Object' + lt + '/script' + gt); iframeDocument.close(); createDict = iframeDocument.F; while(i--)delete createDict[PROTOTYPE][enumBugKeys[i]]; return createDict(); }; module.exports = Object.create || function create(O, Properties){ var result; if(O !== null){ Empty[PROTOTYPE] = anObject(O); result = new Empty; Empty[PROTOTYPE] = null; // add "__proto__" for Object.getPrototypeOf polyfill result[IE_PROTO] = O; } else result = createDict(); return Properties === undefined ? result : dPs(result, Properties); }; /***/ }, /* 45 */ /***/ function(module, exports, __webpack_require__) { var dP = __webpack_require__(9) , anObject = __webpack_require__(10) , getKeys = __webpack_require__(28); module.exports = __webpack_require__(4) ? Object.defineProperties : function defineProperties(O, Properties){ anObject(O); var keys = getKeys(Properties) , length = keys.length , i = 0 , P; while(length > i)dP.f(O, P = keys[i++], Properties[P]); return O; }; /***/ }, /* 46 */ /***/ function(module, exports, __webpack_require__) { module.exports = __webpack_require__(2).document && document.documentElement; /***/ }, /* 47 */ /***/ function(module, exports, __webpack_require__) { // fallback for IE11 buggy Object.getOwnPropertyNames with iframe and window var toIObject = __webpack_require__(30) , gOPN = __webpack_require__(48).f , toString = {}.toString; var windowNames = typeof window == 'object' && window && Object.getOwnPropertyNames ? Object.getOwnPropertyNames(window) : []; var getWindowNames = function(it){ try { return gOPN(it); } catch(e){ return windowNames.slice(); } }; module.exports.f = function getOwnPropertyNames(it){ return windowNames && toString.call(it) == '[object Window]' ? getWindowNames(it) : gOPN(toIObject(it)); }; /***/ }, /* 48 */ /***/ function(module, exports, __webpack_require__) { // 19.1.2.7 / 15.2.3.4 Object.getOwnPropertyNames(O) var $keys = __webpack_require__(29) , hiddenKeys = __webpack_require__(39).concat('length', 'prototype'); exports.f = Object.getOwnPropertyNames || function getOwnPropertyNames(O){ return $keys(O, hiddenKeys); }; /***/ }, /* 49 */ /***/ function(module, exports, __webpack_require__) { var pIE = __webpack_require__(42) , createDesc = __webpack_require__(15) , toIObject = __webpack_require__(30) , toPrimitive = __webpack_require__(14) , has = __webpack_require__(3) , IE8_DOM_DEFINE = __webpack_require__(12) , gOPD = Object.getOwnPropertyDescriptor; exports.f = __webpack_require__(4) ? gOPD : function getOwnPropertyDescriptor(O, P){ O = toIObject(O); P = toPrimitive(P, true); if(IE8_DOM_DEFINE)try { return gOPD(O, P); } catch(e){ /* empty */ } if(has(O, P))return createDesc(!pIE.f.call(O, P), O[P]); }; /***/ }, /* 50 */ /***/ function(module, exports, __webpack_require__) { var $export = __webpack_require__(6); // 19.1.2.4 / 15.2.3.6 Object.defineProperty(O, P, Attributes) $export($export.S + $export.F * !__webpack_require__(4), 'Object', {defineProperty: __webpack_require__(9).f}); /***/ }, /* 51 */ /***/ function(module, exports, __webpack_require__) { var $export = __webpack_require__(6); // 19.1.2.3 / 15.2.3.7 Object.defineProperties(O, Properties) $export($export.S + $export.F * !__webpack_require__(4), 'Object', {defineProperties: __webpack_require__(45)}); /***/ }, /* 52 */ /***/ function(module, exports, __webpack_require__) { // 19.1.2.6 Object.getOwnPropertyDescriptor(O, P) var toIObject = __webpack_require__(30) , $getOwnPropertyDescriptor = __webpack_require__(49).f; __webpack_require__(53)('getOwnPropertyDescriptor', function(){ return function getOwnPropertyDescriptor(it, key){ return $getOwnPropertyDescriptor(toIObject(it), key); }; }); /***/ }, /* 53 */ /***/ function(module, exports, __webpack_require__) { // most Object methods by ES6 should accept primitives var $export = __webpack_require__(6) , core = __webpack_require__(7) , fails = __webpack_require__(5); module.exports = function(KEY, exec){ var fn = (core.Object || {})[KEY] || Object[KEY] , exp = {}; exp[KEY] = exec(fn); $export($export.S + $export.F * fails(function(){ fn(1); }), 'Object', exp); }; /***/ }, /* 54 */ /***/ function(module, exports, __webpack_require__) { var $export = __webpack_require__(6) // 19.1.2.2 / 15.2.3.5 Object.create(O [, Properties]) $export($export.S, 'Object', {create: __webpack_require__(44)}); /***/ }, /* 55 */ /***/ function(module, exports, __webpack_require__) { // 19.1.2.9 Object.getPrototypeOf(O) var toObject = __webpack_require__(56) , $getPrototypeOf = __webpack_require__(57); __webpack_require__(53)('getPrototypeOf', function(){ return function getPrototypeOf(it){ return $getPrototypeOf(toObject(it)); }; }); /***/ }, /* 56 */ /***/ function(module, exports, __webpack_require__) { // 7.1.13 ToObject(argument) var defined = __webpack_require__(33); module.exports = function(it){ return Object(defined(it)); }; /***/ }, /* 57 */ /***/ function(module, exports, __webpack_require__) { // 19.1.2.9 / 15.2.3.2 Object.getPrototypeOf(O) var has = __webpack_require__(3) , toObject = __webpack_require__(56) , IE_PROTO = __webpack_require__(38)('IE_PROTO') , ObjectProto = Object.prototype; module.exports = Object.getPrototypeOf || function(O){ O = toObject(O); if(has(O, IE_PROTO))return O[IE_PROTO]; if(typeof O.constructor == 'function' && O instanceof O.constructor){ return O.constructor.prototype; } return O instanceof Object ? ObjectProto : null; }; /***/ }, /* 58 */ /***/ function(module, exports, __webpack_require__) { // 19.1.2.14 Object.keys(O) var toObject = __webpack_require__(56) , $keys = __webpack_require__(28); __webpack_require__(53)('keys', function(){ return function keys(it){ return $keys(toObject(it)); }; }); /***/ }, /* 59 */ /***/ function(module, exports, __webpack_require__) { // 19.1.2.7 Object.getOwnPropertyNames(O) __webpack_require__(53)('getOwnPropertyNames', function(){ return __webpack_require__(47).f; }); /***/ }, /* 60 */ /***/ function(module, exports, __webpack_require__) { // 19.1.2.5 Object.freeze(O) var isObject = __webpack_require__(11) , meta = __webpack_require__(20).onFreeze; __webpack_require__(53)('freeze', function($freeze){ return function freeze(it){ return $freeze && isObject(it) ? $freeze(meta(it)) : it; }; }); /***/ }, /* 61 */ /***/ function(module, exports, __webpack_require__) { // 19.1.2.17 Object.seal(O) var isObject = __webpack_require__(11) , meta = __webpack_require__(20).onFreeze; __webpack_require__(53)('seal', function($seal){ return function seal(it){ return $seal && isObject(it) ? $seal(meta(it)) : it; }; }); /***/ }, /* 62 */ /***/ function(module, exports, __webpack_require__) { // 19.1.2.15 Object.preventExtensions(O) var isObject = __webpack_require__(11) , meta = __webpack_require__(20).onFreeze; __webpack_require__(53)('preventExtensions', function($preventExtensions){ return function preventExtensions(it){ return $preventExtensions && isObject(it) ? $preventExtensions(meta(it)) : it; }; }); /***/ }, /* 63 */ /***/ function(module, exports, __webpack_require__) { // 19.1.2.12 Object.isFrozen(O) var isObject = __webpack_require__(11); __webpack_require__(53)('isFrozen', function($isFrozen){ return function isFrozen(it){ return isObject(it) ? $isFrozen ? $isFrozen(it) : false : true; }; }); /***/ }, /* 64 */ /***/ function(module, exports, __webpack_require__) { // 19.1.2.13 Object.isSealed(O) var isObject = __webpack_require__(11); __webpack_require__(53)('isSealed', function($isSealed){ return function isSealed(it){ return isObject(it) ? $isSealed ? $isSealed(it) : false : true; }; }); /***/ }, /* 65 */ /***/ function(module, exports, __webpack_require__) { // 19.1.2.11 Object.isExtensible(O) var isObject = __webpack_require__(11); __webpack_require__(53)('isExtensible', function($isExtensible){ return function isExtensible(it){ return isObject(it) ? $isExtensible ? $isExtensible(it) : true : false; }; }); /***/ }, /* 66 */ /***/ function(module, exports, __webpack_require__) { // 19.1.3.1 Object.assign(target, source) var $export = __webpack_require__(6); $export($export.S + $export.F, 'Object', {assign: __webpack_require__(67)}); /***/ }, /* 67 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; // 19.1.2.1 Object.assign(target, source, ...) var getKeys = __webpack_require__(28) , gOPS = __webpack_require__(41) , pIE = __webpack_require__(42) , toObject = __webpack_require__(56) , IObject = __webpack_require__(31) , $assign = Object.assign; // should work with symbols and should have deterministic property order (V8 bug) module.exports = !$assign || __webpack_require__(5)(function(){ var A = {} , B = {} , S = Symbol() , K = 'abcdefghijklmnopqrst'; A[S] = 7; K.split('').forEach(function(k){ B[k] = k; }); return $assign({}, A)[S] != 7 || Object.keys($assign({}, B)).join('') != K; }) ? function assign(target, source){ // eslint-disable-line no-unused-vars var T = toObject(target) , aLen = arguments.length , index = 1 , getSymbols = gOPS.f , isEnum = pIE.f; while(aLen > index){ var S = IObject(arguments[index++]) , keys = getSymbols ? getKeys(S).concat(getSymbols(S)) : getKeys(S) , length = keys.length , j = 0 , key; while(length > j)if(isEnum.call(S, key = keys[j++]))T[key] = S[key]; } return T; } : $assign; /***/ }, /* 68 */ /***/ function(module, exports, __webpack_require__) { // 19.1.3.10 Object.is(value1, value2) var $export = __webpack_require__(6); $export($export.S, 'Object', {is: __webpack_require__(69)}); /***/ }, /* 69 */ /***/ function(module, exports) { // 7.2.9 SameValue(x, y) module.exports = Object.is || function is(x, y){ return x === y ? x !== 0 || 1 / x === 1 / y : x != x && y != y; }; /***/ }, /* 70 */ /***/ function(module, exports, __webpack_require__) { // 19.1.3.19 Object.setPrototypeOf(O, proto) var $export = __webpack_require__(6); $export($export.S, 'Object', {setPrototypeOf: __webpack_require__(71).set}); /***/ }, /* 71 */ /***/ function(module, exports, __webpack_require__) { // Works with __proto__ only. Old v8 can't work with null proto objects. /* eslint-disable no-proto */ var isObject = __webpack_require__(11) , anObject = __webpack_require__(10); var check = function(O, proto){ anObject(O); if(!isObject(proto) && proto !== null)throw TypeError(proto + ": can't set as prototype!"); }; module.exports = { set: Object.setPrototypeOf || ('__proto__' in {} ? // eslint-disable-line function(test, buggy, set){ try { set = __webpack_require__(18)(Function.call, __webpack_require__(49).f(Object.prototype, '__proto__').set, 2); set(test, []); buggy = !(test instanceof Array); } catch(e){ buggy = true; } return function setPrototypeOf(O, proto){ check(O, proto); if(buggy)O.__proto__ = proto; else set(O, proto); return O; }; }({}, false) : undefined), check: check }; /***/ }, /* 72 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; // 19.1.3.6 Object.prototype.toString() var classof = __webpack_require__(73) , test = {}; test[__webpack_require__(23)('toStringTag')] = 'z'; if(test + '' != '[object z]'){ __webpack_require__(16)(Object.prototype, 'toString', function toString(){ return '[object ' + classof(this) + ']'; }, true); } /***/ }, /* 73 */ /***/ function(module, exports, __webpack_require__) { // getting tag from 19.1.3.6 Object.prototype.toString() var cof = __webpack_require__(32) , TAG = __webpack_require__(23)('toStringTag') // ES3 wrong here , ARG = cof(function(){ return arguments; }()) == 'Arguments'; // fallback for IE11 Script Access Denied error var tryGet = function(it, key){ try { return it[key]; } catch(e){ /* empty */ } }; module.exports = function(it){ var O, T, B; return it === undefined ? 'Undefined' : it === null ? 'Null' // @@toStringTag case : typeof (T = tryGet(O = Object(it), TAG)) == 'string' ? T // builtinTag case : ARG ? cof(O) // ES3 arguments fallback : (B = cof(O)) == 'Object' && typeof O.callee == 'function' ? 'Arguments' : B; }; /***/ }, /* 74 */ /***/ function(module, exports, __webpack_require__) { // 19.2.3.2 / 15.3.4.5 Function.prototype.bind(thisArg, args...) var $export = __webpack_require__(6); $export($export.P, 'Function', {bind: __webpack_require__(75)}); /***/ }, /* 75 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; var aFunction = __webpack_require__(19) , isObject = __webpack_require__(11) , invoke = __webpack_require__(76) , arraySlice = [].slice , factories = {}; var construct = function(F, len, args){ if(!(len in factories)){ for(var n = [], i = 0; i < len; i++)n[i] = 'a[' + i + ']'; factories[len] = Function('F,a', 'return new F(' + n.join(',') + ')'); } return factories[len](F, args); }; module.exports = Function.bind || function bind(that /*, args... */){ var fn = aFunction(this) , partArgs = arraySlice.call(arguments, 1); var bound = function(/* args... */){ var args = partArgs.concat(arraySlice.call(arguments)); return this instanceof bound ? construct(fn, args.length, args) : invoke(fn, args, that); }; if(isObject(fn.prototype))bound.prototype = fn.prototype; return bound; }; /***/ }, /* 76 */ /***/ function(module, exports) { // fast apply, http://jsperf.lnkit.com/fast-apply/5 module.exports = function(fn, args, that){ var un = that === undefined; switch(args.length){ case 0: return un ? fn() : fn.call(that); case 1: return un ? fn(args[0]) : fn.call(that, args[0]); case 2: return un ? fn(args[0], args[1]) : fn.call(that, args[0], args[1]); case 3: return un ? fn(args[0], args[1], args[2]) : fn.call(that, args[0], args[1], args[2]); case 4: return un ? fn(args[0], args[1], args[2], args[3]) : fn.call(that, args[0], args[1], args[2], args[3]); } return fn.apply(that, args); }; /***/ }, /* 77 */ /***/ function(module, exports, __webpack_require__) { var dP = __webpack_require__(9).f , createDesc = __webpack_require__(15) , has = __webpack_require__(3) , FProto = Function.prototype , nameRE = /^\s*function ([^ (]*)/ , NAME = 'name'; var isExtensible = Object.isExtensible || function(){ return true; }; // 19.2.4.2 name NAME in FProto || __webpack_require__(4) && dP(FProto, NAME, { configurable: true, get: function(){ try { var that = this , name = ('' + that).match(nameRE)[1]; has(that, NAME) || !isExtensible(that) || dP(that, NAME, createDesc(5, name)); return name; } catch(e){ return ''; } } }); /***/ }, /* 78 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; var isObject = __webpack_require__(11) , getPrototypeOf = __webpack_require__(57) , HAS_INSTANCE = __webpack_require__(23)('hasInstance') , FunctionProto = Function.prototype; // 19.2.3.6 Function.prototype[@@hasInstance](V) if(!(HAS_INSTANCE in FunctionProto))__webpack_require__(9).f(FunctionProto, HAS_INSTANCE, {value: function(O){ if(typeof this != 'function' || !isObject(O))return false; if(!isObject(this.prototype))return O instanceof this; // for environment w/o native `@@hasInstance` logic enough `instanceof`, but add this: while(O = getPrototypeOf(O))if(this.prototype === O)return true; return false; }}); /***/ }, /* 79 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; var global = __webpack_require__(2) , has = __webpack_require__(3) , cof = __webpack_require__(32) , inheritIfRequired = __webpack_require__(80) , toPrimitive = __webpack_require__(14) , fails = __webpack_require__(5) , gOPN = __webpack_require__(48).f , gOPD = __webpack_require__(49).f , dP = __webpack_require__(9).f , $trim = __webpack_require__(81).trim , NUMBER = 'Number' , $Number = global[NUMBER] , Base = $Number , proto = $Number.prototype // Opera ~12 has broken Object#toString , BROKEN_COF = cof(__webpack_require__(44)(proto)) == NUMBER , TRIM = 'trim' in String.prototype; // 7.1.3 ToNumber(argument) var toNumber = function(argument){ var it = toPrimitive(argument, false); if(typeof it == 'string' && it.length > 2){ it = TRIM ? it.trim() : $trim(it, 3); var first = it.charCodeAt(0) , third, radix, maxCode; if(first === 43 || first === 45){ third = it.charCodeAt(2); if(third === 88 || third === 120)return NaN; // Number('+0x1') should be NaN, old V8 fix } else if(first === 48){ switch(it.charCodeAt(1)){ case 66 : case 98 : radix = 2; maxCode = 49; break; // fast equal /^0b[01]+$/i case 79 : case 111 : radix = 8; maxCode = 55; break; // fast equal /^0o[0-7]+$/i default : return +it; } for(var digits = it.slice(2), i = 0, l = digits.length, code; i < l; i++){ code = digits.charCodeAt(i); // parseInt parses a string to a first unavailable symbol // but ToNumber should return NaN if a string contains unavailable symbols if(code < 48 || code > maxCode)return NaN; } return parseInt(digits, radix); } } return +it; }; if(!$Number(' 0o1') || !$Number('0b1') || $Number('+0x1')){ $Number = function Number(value){ var it = arguments.length < 1 ? 0 : value , that = this; return that instanceof $Number // check on 1..constructor(foo) case && (BROKEN_COF ? fails(function(){ proto.valueOf.call(that); }) : cof(that) != NUMBER) ? inheritIfRequired(new Base(toNumber(it)), that, $Number) : toNumber(it); }; for(var keys = __webpack_require__(4) ? gOPN(Base) : ( // ES3: 'MAX_VALUE,MIN_VALUE,NaN,NEGATIVE_INFINITY,POSITIVE_INFINITY,' + // ES6 (in case, if modules with ES6 Number statics required before): 'EPSILON,isFinite,isInteger,isNaN,isSafeInteger,MAX_SAFE_INTEGER,' + 'MIN_SAFE_INTEGER,parseFloat,parseInt,isInteger' ).split(','), j = 0, key; keys.length > j; j++){ if(has(Base, key = keys[j]) && !has($Number, key)){ dP($Number, key, gOPD(Base, key)); } } $Number.prototype = proto; proto.constructor = $Number; __webpack_require__(16)(global, NUMBER, $Number); } /***/ }, /* 80 */ /***/ function(module, exports, __webpack_require__) { var isObject = __webpack_require__(11) , setPrototypeOf = __webpack_require__(71).set; module.exports = function(that, target, C){ var P, S = target.constructor; if(S !== C && typeof S == 'function' && (P = S.prototype) !== C.prototype && isObject(P) && setPrototypeOf){ setPrototypeOf(that, P); } return that; }; /***/ }, /* 81 */ /***/ function(module, exports, __webpack_require__) { var $export = __webpack_require__(6) , defined = __webpack_require__(33) , fails = __webpack_require__(5) , spaces = __webpack_require__(82) , space = '[' + spaces + ']' , non = '\u200b\u0085' , ltrim = RegExp('^' + space + space + '*') , rtrim = RegExp(space + space + '*$'); var exporter = function(KEY, exec, ALIAS){ var exp = {}; var FORCE = fails(function(){ return !!spaces[KEY]() || non[KEY]() != non; }); var fn = exp[KEY] = FORCE ? exec(trim) : spaces[KEY]; if(ALIAS)exp[ALIAS] = fn; $export($export.P + $export.F * FORCE, 'String', exp); }; // 1 -> String#trimLeft // 2 -> String#trimRight // 3 -> String#trim var trim = exporter.trim = function(string, TYPE){ string = String(defined(string)); if(TYPE & 1)string = string.replace(ltrim, ''); if(TYPE & 2)string = string.replace(rtrim, ''); return string; }; module.exports = exporter; /***/ }, /* 82 */ /***/ function(module, exports) { module.exports = '\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u180E\u2000\u2001\u2002\u2003' + '\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF'; /***/ }, /* 83 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; var $export = __webpack_require__(6) , toInteger = __webpack_require__(36) , aNumberValue = __webpack_require__(84) , repeat = __webpack_require__(85) , $toFixed = 1..toFixed , floor = Math.floor , data = [0, 0, 0, 0, 0, 0] , ERROR = 'Number.toFixed: incorrect invocation!' , ZERO = '0'; var multiply = function(n, c){ var i = -1 , c2 = c; while(++i < 6){ c2 += n * data[i]; data[i] = c2 % 1e7; c2 = floor(c2 / 1e7); } }; var divide = function(n){ var i = 6 , c = 0; while(--i >= 0){ c += data[i]; data[i] = floor(c / n); c = (c % n) * 1e7; } }; var numToString = function(){ var i = 6 , s = ''; while(--i >= 0){ if(s !== '' || i === 0 || data[i] !== 0){ var t = String(data[i]); s = s === '' ? t : s + repeat.call(ZERO, 7 - t.length) + t; } } return s; }; var pow = function(x, n, acc){ return n === 0 ? acc : n % 2 === 1 ? pow(x, n - 1, acc * x) : pow(x * x, n / 2, acc); }; var log = function(x){ var n = 0 , x2 = x; while(x2 >= 4096){ n += 12; x2 /= 4096; } while(x2 >= 2){ n += 1; x2 /= 2; } return n; }; $export($export.P + $export.F * (!!$toFixed && ( 0.00008.toFixed(3) !== '0.000' || 0.9.toFixed(0) !== '1' || 1.255.toFixed(2) !== '1.25' || 1000000000000000128..toFixed(0) !== '1000000000000000128' ) || !__webpack_require__(5)(function(){ // V8 ~ Android 4.3- $toFixed.call({}); })), 'Number', { toFixed: function toFixed(fractionDigits){ var x = aNumberValue(this, ERROR) , f = toInteger(fractionDigits) , s = '' , m = ZERO , e, z, j, k; if(f < 0 || f > 20)throw RangeError(ERROR); if(x != x)return 'NaN'; if(x <= -1e21 || x >= 1e21)return String(x); if(x < 0){ s = '-'; x = -x; } if(x > 1e-21){ e = log(x * pow(2, 69, 1)) - 69; z = e < 0 ? x * pow(2, -e, 1) : x / pow(2, e, 1); z *= 0x10000000000000; e = 52 - e; if(e > 0){ multiply(0, z); j = f; while(j >= 7){ multiply(1e7, 0); j -= 7; } multiply(pow(10, j, 1), 0); j = e - 1; while(j >= 23){ divide(1 << 23); j -= 23; } divide(1 << j); multiply(1, 1); divide(2); m = numToString(); } else { multiply(0, z); multiply(1 << -e, 0); m = numToString() + repeat.call(ZERO, f); } } if(f > 0){ k = m.length; m = s + (k <= f ? '0.' + repeat.call(ZERO, f - k) + m : m.slice(0, k - f) + '.' + m.slice(k - f)); } else { m = s + m; } return m; } }); /***/ }, /* 84 */ /***/ function(module, exports, __webpack_require__) { var cof = __webpack_require__(32); module.exports = function(it, msg){ if(typeof it != 'number' && cof(it) != 'Number')throw TypeError(msg); return +it; }; /***/ }, /* 85 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; var toInteger = __webpack_require__(36) , defined = __webpack_require__(33); module.exports = function repeat(count){ var str = String(defined(this)) , res = '' , n = toInteger(count); if(n < 0 || n == Infinity)throw RangeError("Count can't be negative"); for(;n > 0; (n >>>= 1) && (str += str))if(n & 1)res += str; return res; }; /***/ }, /* 86 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; var $export = __webpack_require__(6) , $fails = __webpack_require__(5) , aNumberValue = __webpack_require__(84) , $toPrecision = 1..toPrecision; $export($export.P + $export.F * ($fails(function(){ // IE7- return $toPrecision.call(1, undefined) !== '1'; }) || !$fails(function(){ // V8 ~ Android 4.3- $toPrecision.call({}); })), 'Number', { toPrecision: function toPrecision(precision){ var that = aNumberValue(this, 'Number#toPrecision: incorrect invocation!'); return precision === undefined ? $toPrecision.call(that) : $toPrecision.call(that, precision); } }); /***/ }, /* 87 */ /***/ function(module, exports, __webpack_require__) { // 20.1.2.1 Number.EPSILON var $export = __webpack_require__(6); $export($export.S, 'Number', {EPSILON: Math.pow(2, -52)}); /***/ }, /* 88 */ /***/ function(module, exports, __webpack_require__) { // 20.1.2.2 Number.isFinite(number) var $export = __webpack_require__(6) , _isFinite = __webpack_require__(2).isFinite; $export($export.S, 'Number', { isFinite: function isFinite(it){ return typeof it == 'number' && _isFinite(it); } }); /***/ }, /* 89 */ /***/ function(module, exports, __webpack_require__) { // 20.1.2.3 Number.isInteger(number) var $export = __webpack_require__(6); $export($export.S, 'Number', {isInteger: __webpack_require__(90)}); /***/ }, /* 90 */ /***/ function(module, exports, __webpack_require__) { // 20.1.2.3 Number.isInteger(number) var isObject = __webpack_require__(11) , floor = Math.floor; module.exports = function isInteger(it){ return !isObject(it) && isFinite(it) && floor(it) === it; }; /***/ }, /* 91 */ /***/ function(module, exports, __webpack_require__) { // 20.1.2.4 Number.isNaN(number) var $export = __webpack_require__(6); $export($export.S, 'Number', { isNaN: function isNaN(number){ return number != number; } }); /***/ }, /* 92 */ /***/ function(module, exports, __webpack_require__) { // 20.1.2.5 Number.isSafeInteger(number) var $export = __webpack_require__(6) , isInteger = __webpack_require__(90) , abs = Math.abs; $export($export.S, 'Number', { isSafeInteger: function isSafeInteger(number){ return isInteger(number) && abs(number) <= 0x1fffffffffffff; } }); /***/ }, /* 93 */ /***/ function(module, exports, __webpack_require__) { // 20.1.2.6 Number.MAX_SAFE_INTEGER var $export = __webpack_require__(6); $export($export.S, 'Number', {MAX_SAFE_INTEGER: 0x1fffffffffffff}); /***/ }, /* 94 */ /***/ function(module, exports, __webpack_require__) { // 20.1.2.10 Number.MIN_SAFE_INTEGER var $export = __webpack_require__(6); $export($export.S, 'Number', {MIN_SAFE_INTEGER: -0x1fffffffffffff}); /***/ }, /* 95 */ /***/ function(module, exports, __webpack_require__) { var $export = __webpack_require__(6) , $parseFloat = __webpack_require__(96); // 20.1.2.12 Number.parseFloat(string) $export($export.S + $export.F * (Number.parseFloat != $parseFloat), 'Number', {parseFloat: $parseFloat}); /***/ }, /* 96 */ /***/ function(module, exports, __webpack_require__) { var $parseFloat = __webpack_require__(2).parseFloat , $trim = __webpack_require__(81).trim; module.exports = 1 / $parseFloat(__webpack_require__(82) + '-0') !== -Infinity ? function parseFloat(str){ var string = $trim(String(str), 3) , result = $parseFloat(string); return result === 0 && string.charAt(0) == '-' ? -0 : result; } : $parseFloat; /***/ }, /* 97 */ /***/ function(module, exports, __webpack_require__) { var $export = __webpack_require__(6) , $parseInt = __webpack_require__(98); // 20.1.2.13 Number.parseInt(string, radix) $export($export.S + $export.F * (Number.parseInt != $parseInt), 'Number', {parseInt: $parseInt}); /***/ }, /* 98 */ /***/ function(module, exports, __webpack_require__) { var $parseInt = __webpack_require__(2).parseInt , $trim = __webpack_require__(81).trim , ws = __webpack_require__(82) , hex = /^[\-+]?0[xX]/; module.exports = $parseInt(ws + '08') !== 8 || $parseInt(ws + '0x16') !== 22 ? function parseInt(str, radix){ var string = $trim(String(str), 3); return $parseInt(string, (radix >>> 0) || (hex.test(string) ? 16 : 10)); } : $parseInt; /***/ }, /* 99 */ /***/ function(module, exports, __webpack_require__) { var $export = __webpack_require__(6) , $parseInt = __webpack_require__(98); // 18.2.5 parseInt(string, radix) $export($export.G + $export.F * (parseInt != $parseInt), {parseInt: $parseInt}); /***/ }, /* 100 */ /***/ function(module, exports, __webpack_require__) { var $export = __webpack_require__(6) , $parseFloat = __webpack_require__(96); // 18.2.4 parseFloat(string) $export($export.G + $export.F * (parseFloat != $parseFloat), {parseFloat: $parseFloat}); /***/ }, /* 101 */ /***/ function(module, exports, __webpack_require__) { // 20.2.2.3 Math.acosh(x) var $export = __webpack_require__(6) , log1p = __webpack_require__(102) , sqrt = Math.sqrt , $acosh = Math.acosh; $export($export.S + $export.F * !($acosh // V8 bug: https://code.google.com/p/v8/issues/detail?id=3509 && Math.floor($acosh(Number.MAX_VALUE)) == 710 // Tor Browser bug: Math.acosh(Infinity) -> NaN && $acosh(Infinity) == Infinity ), 'Math', { acosh: function acosh(x){ return (x = +x) < 1 ? NaN : x > 94906265.62425156 ? Math.log(x) + Math.LN2 : log1p(x - 1 + sqrt(x - 1) * sqrt(x + 1)); } }); /***/ }, /* 102 */ /***/ function(module, exports) { // 20.2.2.20 Math.log1p(x) module.exports = Math.log1p || function log1p(x){ return (x = +x) > -1e-8 && x < 1e-8 ? x - x * x / 2 : Math.log(1 + x); }; /***/ }, /* 103 */ /***/ function(module, exports, __webpack_require__) { // 20.2.2.5 Math.asinh(x) var $export = __webpack_require__(6) , $asinh = Math.asinh; function asinh(x){ return !isFinite(x = +x) || x == 0 ? x : x < 0 ? -asinh(-x) : Math.log(x + Math.sqrt(x * x + 1)); } // Tor Browser bug: Math.asinh(0) -> -0 $export($export.S + $export.F * !($asinh && 1 / $asinh(0) > 0), 'Math', {asinh: asinh}); /***/ }, /* 104 */ /***/ function(module, exports, __webpack_require__) { // 20.2.2.7 Math.atanh(x) var $export = __webpack_require__(6) , $atanh = Math.atanh; // Tor Browser bug: Math.atanh(-0) -> 0 $export($export.S + $export.F * !($atanh && 1 / $atanh(-0) < 0), 'Math', { atanh: function atanh(x){ return (x = +x) == 0 ? x : Math.log((1 + x) / (1 - x)) / 2; } }); /***/ }, /* 105 */ /***/ function(module, exports, __webpack_require__) { // 20.2.2.9 Math.cbrt(x) var $export = __webpack_require__(6) , sign = __webpack_require__(106); $export($export.S, 'Math', { cbrt: function cbrt(x){ return sign(x = +x) * Math.pow(Math.abs(x), 1 / 3); } }); /***/ }, /* 106 */ /***/ function(module, exports) { // 20.2.2.28 Math.sign(x) module.exports = Math.sign || function sign(x){ return (x = +x) == 0 || x != x ? x : x < 0 ? -1 : 1; }; /***/ }, /* 107 */ /***/ function(module, exports, __webpack_require__) { // 20.2.2.11 Math.clz32(x) var $export = __webpack_require__(6); $export($export.S, 'Math', { clz32: function clz32(x){ return (x >>>= 0) ? 31 - Math.floor(Math.log(x + 0.5) * Math.LOG2E) : 32; } }); /***/ }, /* 108 */ /***/ function(module, exports, __webpack_require__) { // 20.2.2.12 Math.cosh(x) var $export = __webpack_require__(6) , exp = Math.exp; $export($export.S, 'Math', { cosh: function cosh(x){ return (exp(x = +x) + exp(-x)) / 2; } }); /***/ }, /* 109 */ /***/ function(module, exports, __webpack_require__) { // 20.2.2.14 Math.expm1(x) var $export = __webpack_require__(6) , $expm1 = __webpack_require__(110); $export($export.S + $export.F * ($expm1 != Math.expm1), 'Math', {expm1: $expm1}); /***/ }, /* 110 */ /***/ function(module, exports) { // 20.2.2.14 Math.expm1(x) var $expm1 = Math.expm1; module.exports = (!$expm1 // Old FF bug || $expm1(10) > 22025.465794806719 || $expm1(10) < 22025.4657948067165168 // Tor Browser bug || $expm1(-2e-17) != -2e-17 ) ? function expm1(x){ return (x = +x) == 0 ? x : x > -1e-6 && x < 1e-6 ? x + x * x / 2 : Math.exp(x) - 1; } : $expm1; /***/ }, /* 111 */ /***/ function(module, exports, __webpack_require__) { // 20.2.2.16 Math.fround(x) var $export = __webpack_require__(6) , sign = __webpack_require__(106) , pow = Math.pow , EPSILON = pow(2, -52) , EPSILON32 = pow(2, -23) , MAX32 = pow(2, 127) * (2 - EPSILON32) , MIN32 = pow(2, -126); var roundTiesToEven = function(n){ return n + 1 / EPSILON - 1 / EPSILON; }; $export($export.S, 'Math', { fround: function fround(x){ var $abs = Math.abs(x) , $sign = sign(x) , a, result; if($abs < MIN32)return $sign * roundTiesToEven($abs / MIN32 / EPSILON32) * MIN32 * EPSILON32; a = (1 + EPSILON32 / EPSILON) * $abs; result = a - (a - $abs); if(result > MAX32 || result != result)return $sign * Infinity; return $sign * result; } }); /***/ }, /* 112 */ /***/ function(module, exports, __webpack_require__) { // 20.2.2.17 Math.hypot([value1[, value2[, … ]]]) var $export = __webpack_require__(6) , abs = Math.abs; $export($export.S, 'Math', { hypot: function hypot(value1, value2){ // eslint-disable-line no-unused-vars var sum = 0 , i = 0 , aLen = arguments.length , larg = 0 , arg, div; while(i < aLen){ arg = abs(arguments[i++]); if(larg < arg){ div = larg / arg; sum = sum * div * div + 1; larg = arg; } else if(arg > 0){ div = arg / larg; sum += div * div; } else sum += arg; } return larg === Infinity ? Infinity : larg * Math.sqrt(sum); } }); /***/ }, /* 113 */ /***/ function(module, exports, __webpack_require__) { // 20.2.2.18 Math.imul(x, y) var $export = __webpack_require__(6) , $imul = Math.imul; // some WebKit versions fails with big numbers, some has wrong arity $export($export.S + $export.F * __webpack_require__(5)(function(){ return $imul(0xffffffff, 5) != -5 || $imul.length != 2; }), 'Math', { imul: function imul(x, y){ var UINT16 = 0xffff , xn = +x , yn = +y , xl = UINT16 & xn , yl = UINT16 & yn; return 0 | xl * yl + ((UINT16 & xn >>> 16) * yl + xl * (UINT16 & yn >>> 16) << 16 >>> 0); } }); /***/ }, /* 114 */ /***/ function(module, exports, __webpack_require__) { // 20.2.2.21 Math.log10(x) var $export = __webpack_require__(6); $export($export.S, 'Math', { log10: function log10(x){ return Math.log(x) / Math.LN10; } }); /***/ }, /* 115 */ /***/ function(module, exports, __webpack_require__) { // 20.2.2.20 Math.log1p(x) var $export = __webpack_require__(6); $export($export.S, 'Math', {log1p: __webpack_require__(102)}); /***/ }, /* 116 */ /***/ function(module, exports, __webpack_require__) { // 20.2.2.22 Math.log2(x) var $export = __webpack_require__(6); $export($export.S, 'Math', { log2: function log2(x){ return Math.log(x) / Math.LN2; } }); /***/ }, /* 117 */ /***/ function(module, exports, __webpack_require__) { // 20.2.2.28 Math.sign(x) var $export = __webpack_require__(6); $export($export.S, 'Math', {sign: __webpack_require__(106)}); /***/ }, /* 118 */ /***/ function(module, exports, __webpack_require__) { // 20.2.2.30 Math.sinh(x) var $export = __webpack_require__(6) , expm1 = __webpack_require__(110) , exp = Math.exp; // V8 near Chromium 38 has a problem with very small numbers $export($export.S + $export.F * __webpack_require__(5)(function(){ return !Math.sinh(-2e-17) != -2e-17; }), 'Math', { sinh: function sinh(x){ return Math.abs(x = +x) < 1 ? (expm1(x) - expm1(-x)) / 2 : (exp(x - 1) - exp(-x - 1)) * (Math.E / 2); } }); /***/ }, /* 119 */ /***/ function(module, exports, __webpack_require__) { // 20.2.2.33 Math.tanh(x) var $export = __webpack_require__(6) , expm1 = __webpack_require__(110) , exp = Math.exp; $export($export.S, 'Math', { tanh: function tanh(x){ var a = expm1(x = +x) , b = expm1(-x); return a == Infinity ? 1 : b == Infinity ? -1 : (a - b) / (exp(x) + exp(-x)); } }); /***/ }, /* 120 */ /***/ function(module, exports, __webpack_require__) { // 20.2.2.34 Math.trunc(x) var $export = __webpack_require__(6); $export($export.S, 'Math', { trunc: function trunc(it){ return (it > 0 ? Math.floor : Math.ceil)(it); } }); /***/ }, /* 121 */ /***/ function(module, exports, __webpack_require__) { var $export = __webpack_require__(6) , toIndex = __webpack_require__(37) , fromCharCode = String.fromCharCode , $fromCodePoint = String.fromCodePoint; // length should be 1, old FF problem $export($export.S + $export.F * (!!$fromCodePoint && $fromCodePoint.length != 1), 'String', { // 21.1.2.2 String.fromCodePoint(...codePoints) fromCodePoint: function fromCodePoint(x){ // eslint-disable-line no-unused-vars var res = [] , aLen = arguments.length , i = 0 , code; while(aLen > i){ code = +arguments[i++]; if(toIndex(code, 0x10ffff) !== code)throw RangeError(code + ' is not a valid code point'); res.push(code < 0x10000 ? fromCharCode(code) : fromCharCode(((code -= 0x10000) >> 10) + 0xd800, code % 0x400 + 0xdc00) ); } return res.join(''); } }); /***/ }, /* 122 */ /***/ function(module, exports, __webpack_require__) { var $export = __webpack_require__(6) , toIObject = __webpack_require__(30) , toLength = __webpack_require__(35); $export($export.S, 'String', { // 21.1.2.4 String.raw(callSite, ...substitutions) raw: function raw(callSite){ var tpl = toIObject(callSite.raw) , len = toLength(tpl.length) , aLen = arguments.length , res = [] , i = 0; while(len > i){ res.push(String(tpl[i++])); if(i < aLen)res.push(String(arguments[i])); } return res.join(''); } }); /***/ }, /* 123 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; // 21.1.3.25 String.prototype.trim() __webpack_require__(81)('trim', function($trim){ return function trim(){ return $trim(this, 3); }; }); /***/ }, /* 124 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; var $export = __webpack_require__(6) , $at = __webpack_require__(125)(false); $export($export.P, 'String', { // 21.1.3.3 String.prototype.codePointAt(pos) codePointAt: function codePointAt(pos){ return $at(this, pos); } }); /***/ }, /* 125 */ /***/ function(module, exports, __webpack_require__) { var toInteger = __webpack_require__(36) , defined = __webpack_require__(33); // true -> String#at // false -> String#codePointAt module.exports = function(TO_STRING){ return function(that, pos){ var s = String(defined(that)) , i = toInteger(pos) , l = s.length , a, b; if(i < 0 || i >= l)return TO_STRING ? '' : undefined; a = s.charCodeAt(i); return a < 0xd800 || a > 0xdbff || i + 1 === l || (b = s.charCodeAt(i + 1)) < 0xdc00 || b > 0xdfff ? TO_STRING ? s.charAt(i) : a : TO_STRING ? s.slice(i, i + 2) : (a - 0xd800 << 10) + (b - 0xdc00) + 0x10000; }; }; /***/ }, /* 126 */ /***/ function(module, exports, __webpack_require__) { // 21.1.3.6 String.prototype.endsWith(searchString [, endPosition]) 'use strict'; var $export = __webpack_require__(6) , toLength = __webpack_require__(35) , context = __webpack_require__(127) , ENDS_WITH = 'endsWith' , $endsWith = ''[ENDS_WITH]; $export($export.P + $export.F * __webpack_require__(129)(ENDS_WITH), 'String', { endsWith: function endsWith(searchString /*, endPosition = @length */){ var that = context(this, searchString, ENDS_WITH) , endPosition = arguments.length > 1 ? arguments[1] : undefined , len = toLength(that.length) , end = endPosition === undefined ? len : Math.min(toLength(endPosition), len) , search = String(searchString); return $endsWith ? $endsWith.call(that, search, end) : that.slice(end - search.length, end) === search; } }); /***/ }, /* 127 */ /***/ function(module, exports, __webpack_require__) { // helper for String#{startsWith, endsWith, includes} var isRegExp = __webpack_require__(128) , defined = __webpack_require__(33); module.exports = function(that, searchString, NAME){ if(isRegExp(searchString))throw TypeError('String#' + NAME + " doesn't accept regex!"); return String(defined(that)); }; /***/ }, /* 128 */ /***/ function(module, exports, __webpack_require__) { // 7.2.8 IsRegExp(argument) var isObject = __webpack_require__(11) , cof = __webpack_require__(32) , MATCH = __webpack_require__(23)('match'); module.exports = function(it){ var isRegExp; return isObject(it) && ((isRegExp = it[MATCH]) !== undefined ? !!isRegExp : cof(it) == 'RegExp'); }; /***/ }, /* 129 */ /***/ function(module, exports, __webpack_require__) { var MATCH = __webpack_require__(23)('match'); module.exports = function(KEY){ var re = /./; try { '/./'[KEY](re); } catch(e){ try { re[MATCH] = false; return !'/./'[KEY](re); } catch(f){ /* empty */ } } return true; }; /***/ }, /* 130 */ /***/ function(module, exports, __webpack_require__) { // 21.1.3.7 String.prototype.includes(searchString, position = 0) 'use strict'; var $export = __webpack_require__(6) , context = __webpack_require__(127) , INCLUDES = 'includes'; $export($export.P + $export.F * __webpack_require__(129)(INCLUDES), 'String', { includes: function includes(searchString /*, position = 0 */){ return !!~context(this, searchString, INCLUDES) .indexOf(searchString, arguments.length > 1 ? arguments[1] : undefined); } }); /***/ }, /* 131 */ /***/ function(module, exports, __webpack_require__) { var $export = __webpack_require__(6); $export($export.P, 'String', { // 21.1.3.13 String.prototype.repeat(count) repeat: __webpack_require__(85) }); /***/ }, /* 132 */ /***/ function(module, exports, __webpack_require__) { // 21.1.3.18 String.prototype.startsWith(searchString [, position ]) 'use strict'; var $export = __webpack_require__(6) , toLength = __webpack_require__(35) , context = __webpack_require__(127) , STARTS_WITH = 'startsWith' , $startsWith = ''[STARTS_WITH]; $export($export.P + $export.F * __webpack_require__(129)(STARTS_WITH), 'String', { startsWith: function startsWith(searchString /*, position = 0 */){ var that = context(this, searchString, STARTS_WITH) , index = toLength(Math.min(arguments.length > 1 ? arguments[1] : undefined, that.length)) , search = String(searchString); return $startsWith ? $startsWith.call(that, search, index) : that.slice(index, index + search.length) === search; } }); /***/ }, /* 133 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; var $at = __webpack_require__(125)(true); // 21.1.3.27 String.prototype[@@iterator]() __webpack_require__(134)(String, 'String', function(iterated){ this._t = String(iterated); // target this._i = 0; // next index // 21.1.5.2.1 %StringIteratorPrototype%.next() }, function(){ var O = this._t , index = this._i , point; if(index >= O.length)return {value: undefined, done: true}; point = $at(O, index); this._i += point.length; return {value: point, done: false}; }); /***/ }, /* 134 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; var LIBRARY = __webpack_require__(26) , $export = __webpack_require__(6) , redefine = __webpack_require__(16) , hide = __webpack_require__(8) , has = __webpack_require__(3) , Iterators = __webpack_require__(135) , $iterCreate = __webpack_require__(136) , setToStringTag = __webpack_require__(22) , getPrototypeOf = __webpack_require__(57) , ITERATOR = __webpack_require__(23)('iterator') , BUGGY = !([].keys && 'next' in [].keys()) // Safari has buggy iterators w/o `next` , FF_ITERATOR = '@@iterator' , KEYS = 'keys' , VALUES = 'values'; var returnThis = function(){ return this; }; module.exports = function(Base, NAME, Constructor, next, DEFAULT, IS_SET, FORCED){ $iterCreate(Constructor, NAME, next); var getMethod = function(kind){ if(!BUGGY && kind in proto)return proto[kind]; switch(kind){ case KEYS: return function keys(){ return new Constructor(this, kind); }; case VALUES: return function values(){ return new Constructor(this, kind); }; } return function entries(){ return new Constructor(this, kind); }; }; var TAG = NAME + ' Iterator' , DEF_VALUES = DEFAULT == VALUES , VALUES_BUG = false , proto = Base.prototype , $native = proto[ITERATOR] || proto[FF_ITERATOR] || DEFAULT && proto[DEFAULT] , $default = $native || getMethod(DEFAULT) , $entries = DEFAULT ? !DEF_VALUES ? $default : getMethod('entries') : undefined , $anyNative = NAME == 'Array' ? proto.entries || $native : $native , methods, key, IteratorPrototype; // Fix native if($anyNative){ IteratorPrototype = getPrototypeOf($anyNative.call(new Base)); if(IteratorPrototype !== Object.prototype){ // Set @@toStringTag to native iterators setToStringTag(IteratorPrototype, TAG, true); // fix for some old engines if(!LIBRARY && !has(IteratorPrototype, ITERATOR))hide(IteratorPrototype, ITERATOR, returnThis); } } // fix Array#{values, @@iterator}.name in V8 / FF if(DEF_VALUES && $native && $native.name !== VALUES){ VALUES_BUG = true; $default = function values(){ return $native.call(this); }; } // Define iterator if((!LIBRARY || FORCED) && (BUGGY || VALUES_BUG || !proto[ITERATOR])){ hide(proto, ITERATOR, $default); } // Plug for library Iterators[NAME] = $default; Iterators[TAG] = returnThis; if(DEFAULT){ methods = { values: DEF_VALUES ? $default : getMethod(VALUES), keys: IS_SET ? $default : getMethod(KEYS), entries: $entries }; if(FORCED)for(key in methods){ if(!(key in proto))redefine(proto, key, methods[key]); } else $export($export.P + $export.F * (BUGGY || VALUES_BUG), NAME, methods); } return methods; }; /***/ }, /* 135 */ /***/ function(module, exports) { module.exports = {}; /***/ }, /* 136 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; var create = __webpack_require__(44) , descriptor = __webpack_require__(15) , setToStringTag = __webpack_require__(22) , IteratorPrototype = {}; // 25.1.2.1.1 %IteratorPrototype%[@@iterator]() __webpack_require__(8)(IteratorPrototype, __webpack_require__(23)('iterator'), function(){ return this; }); module.exports = function(Constructor, NAME, next){ Constructor.prototype = create(IteratorPrototype, {next: descriptor(1, next)}); setToStringTag(Constructor, NAME + ' Iterator'); }; /***/ }, /* 137 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; // B.2.3.2 String.prototype.anchor(name) __webpack_require__(138)('anchor', function(createHTML){ return function anchor(name){ return createHTML(this, 'a', 'name', name); } }); /***/ }, /* 138 */ /***/ function(module, exports, __webpack_require__) { var $export = __webpack_require__(6) , fails = __webpack_require__(5) , defined = __webpack_require__(33) , quot = /"/g; // B.2.3.2.1 CreateHTML(string, tag, attribute, value) var createHTML = function(string, tag, attribute, value) { var S = String(defined(string)) , p1 = '<' + tag; if(attribute !== '')p1 += ' ' + attribute + '="' + String(value).replace(quot, '"') + '"'; return p1 + '>' + S + ''; }; module.exports = function(NAME, exec){ var O = {}; O[NAME] = exec(createHTML); $export($export.P + $export.F * fails(function(){ var test = ''[NAME]('"'); return test !== test.toLowerCase() || test.split('"').length > 3; }), 'String', O); }; /***/ }, /* 139 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; // B.2.3.3 String.prototype.big() __webpack_require__(138)('big', function(createHTML){ return function big(){ return createHTML(this, 'big', '', ''); } }); /***/ }, /* 140 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; // B.2.3.4 String.prototype.blink() __webpack_require__(138)('blink', function(createHTML){ return function blink(){ return createHTML(this, 'blink', '', ''); } }); /***/ }, /* 141 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; // B.2.3.5 String.prototype.bold() __webpack_require__(138)('bold', function(createHTML){ return function bold(){ return createHTML(this, 'b', '', ''); } }); /***/ }, /* 142 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; // B.2.3.6 String.prototype.fixed() __webpack_require__(138)('fixed', function(createHTML){ return function fixed(){ return createHTML(this, 'tt', '', ''); } }); /***/ }, /* 143 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; // B.2.3.7 String.prototype.fontcolor(color) __webpack_require__(138)('fontcolor', function(createHTML){ return function fontcolor(color){ return createHTML(this, 'font', 'color', color); } }); /***/ }, /* 144 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; // B.2.3.8 String.prototype.fontsize(size) __webpack_require__(138)('fontsize', function(createHTML){ return function fontsize(size){ return createHTML(this, 'font', 'size', size); } }); /***/ }, /* 145 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; // B.2.3.9 String.prototype.italics() __webpack_require__(138)('italics', function(createHTML){ return function italics(){ return createHTML(this, 'i', '', ''); } }); /***/ }, /* 146 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; // B.2.3.10 String.prototype.link(url) __webpack_require__(138)('link', function(createHTML){ return function link(url){ return createHTML(this, 'a', 'href', url); } }); /***/ }, /* 147 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; // B.2.3.11 String.prototype.small() __webpack_require__(138)('small', function(createHTML){ return function small(){ return createHTML(this, 'small', '', ''); } }); /***/ }, /* 148 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; // B.2.3.12 String.prototype.strike() __webpack_require__(138)('strike', function(createHTML){ return function strike(){ return createHTML(this, 'strike', '', ''); } }); /***/ }, /* 149 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; // B.2.3.13 String.prototype.sub() __webpack_require__(138)('sub', function(createHTML){ return function sub(){ return createHTML(this, 'sub', '', ''); } }); /***/ }, /* 150 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; // B.2.3.14 String.prototype.sup() __webpack_require__(138)('sup', function(createHTML){ return function sup(){ return createHTML(this, 'sup', '', ''); } }); /***/ }, /* 151 */ /***/ function(module, exports, __webpack_require__) { // 22.1.2.2 / 15.4.3.2 Array.isArray(arg) var $export = __webpack_require__(6); $export($export.S, 'Array', {isArray: __webpack_require__(43)}); /***/ }, /* 152 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; var ctx = __webpack_require__(18) , $export = __webpack_require__(6) , toObject = __webpack_require__(56) , call = __webpack_require__(153) , isArrayIter = __webpack_require__(154) , toLength = __webpack_require__(35) , createProperty = __webpack_require__(155) , getIterFn = __webpack_require__(156); $export($export.S + $export.F * !__webpack_require__(157)(function(iter){ Array.from(iter); }), 'Array', { // 22.1.2.1 Array.from(arrayLike, mapfn = undefined, thisArg = undefined) from: function from(arrayLike/*, mapfn = undefined, thisArg = undefined*/){ var O = toObject(arrayLike) , C = typeof this == 'function' ? this : Array , aLen = arguments.length , mapfn = aLen > 1 ? arguments[1] : undefined , mapping = mapfn !== undefined , index = 0 , iterFn = getIterFn(O) , length, result, step, iterator; if(mapping)mapfn = ctx(mapfn, aLen > 2 ? arguments[2] : undefined, 2); // if object isn't iterable or it's array with default iterator - use simple case if(iterFn != undefined && !(C == Array && isArrayIter(iterFn))){ for(iterator = iterFn.call(O), result = new C; !(step = iterator.next()).done; index++){ createProperty(result, index, mapping ? call(iterator, mapfn, [step.value, index], true) : step.value); } } else { length = toLength(O.length); for(result = new C(length); length > index; index++){ createProperty(result, index, mapping ? mapfn(O[index], index) : O[index]); } } result.length = index; return result; } }); /***/ }, /* 153 */ /***/ function(module, exports, __webpack_require__) { // call something on iterator step with safe closing on error var anObject = __webpack_require__(10); module.exports = function(iterator, fn, value, entries){ try { return entries ? fn(anObject(value)[0], value[1]) : fn(value); // 7.4.6 IteratorClose(iterator, completion) } catch(e){ var ret = iterator['return']; if(ret !== undefined)anObject(ret.call(iterator)); throw e; } }; /***/ }, /* 154 */ /***/ function(module, exports, __webpack_require__) { // check on default Array iterator var Iterators = __webpack_require__(135) , ITERATOR = __webpack_require__(23)('iterator') , ArrayProto = Array.prototype; module.exports = function(it){ return it !== undefined && (Iterators.Array === it || ArrayProto[ITERATOR] === it); }; /***/ }, /* 155 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; var $defineProperty = __webpack_require__(9) , createDesc = __webpack_require__(15); module.exports = function(object, index, value){ if(index in object)$defineProperty.f(object, index, createDesc(0, value)); else object[index] = value; }; /***/ }, /* 156 */ /***/ function(module, exports, __webpack_require__) { var classof = __webpack_require__(73) , ITERATOR = __webpack_require__(23)('iterator') , Iterators = __webpack_require__(135); module.exports = __webpack_require__(7).getIteratorMethod = function(it){ if(it != undefined)return it[ITERATOR] || it['@@iterator'] || Iterators[classof(it)]; }; /***/ }, /* 157 */ /***/ function(module, exports, __webpack_require__) { var ITERATOR = __webpack_require__(23)('iterator') , SAFE_CLOSING = false; try { var riter = [7][ITERATOR](); riter['return'] = function(){ SAFE_CLOSING = true; }; Array.from(riter, function(){ throw 2; }); } catch(e){ /* empty */ } module.exports = function(exec, skipClosing){ if(!skipClosing && !SAFE_CLOSING)return false; var safe = false; try { var arr = [7] , iter = arr[ITERATOR](); iter.next = function(){ return {done: safe = true}; }; arr[ITERATOR] = function(){ return iter; }; exec(arr); } catch(e){ /* empty */ } return safe; }; /***/ }, /* 158 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; var $export = __webpack_require__(6) , createProperty = __webpack_require__(155); // WebKit Array.of isn't generic $export($export.S + $export.F * __webpack_require__(5)(function(){ function F(){} return !(Array.of.call(F) instanceof F); }), 'Array', { // 22.1.2.3 Array.of( ...items) of: function of(/* ...args */){ var index = 0 , aLen = arguments.length , result = new (typeof this == 'function' ? this : Array)(aLen); while(aLen > index)createProperty(result, index, arguments[index++]); result.length = aLen; return result; } }); /***/ }, /* 159 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; // 22.1.3.13 Array.prototype.join(separator) var $export = __webpack_require__(6) , toIObject = __webpack_require__(30) , arrayJoin = [].join; // fallback for not array-like strings $export($export.P + $export.F * (__webpack_require__(31) != Object || !__webpack_require__(160)(arrayJoin)), 'Array', { join: function join(separator){ return arrayJoin.call(toIObject(this), separator === undefined ? ',' : separator); } }); /***/ }, /* 160 */ /***/ function(module, exports, __webpack_require__) { var fails = __webpack_require__(5); module.exports = function(method, arg){ return !!method && fails(function(){ arg ? method.call(null, function(){}, 1) : method.call(null); }); }; /***/ }, /* 161 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; var $export = __webpack_require__(6) , html = __webpack_require__(46) , cof = __webpack_require__(32) , toIndex = __webpack_require__(37) , toLength = __webpack_require__(35) , arraySlice = [].slice; // fallback for not array-like ES3 strings and DOM objects $export($export.P + $export.F * __webpack_require__(5)(function(){ if(html)arraySlice.call(html); }), 'Array', { slice: function slice(begin, end){ var len = toLength(this.length) , klass = cof(this); end = end === undefined ? len : end; if(klass == 'Array')return arraySlice.call(this, begin, end); var start = toIndex(begin, len) , upTo = toIndex(end, len) , size = toLength(upTo - start) , cloned = Array(size) , i = 0; for(; i < size; i++)cloned[i] = klass == 'String' ? this.charAt(start + i) : this[start + i]; return cloned; } }); /***/ }, /* 162 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; var $export = __webpack_require__(6) , aFunction = __webpack_require__(19) , toObject = __webpack_require__(56) , fails = __webpack_require__(5) , $sort = [].sort , test = [1, 2, 3]; $export($export.P + $export.F * (fails(function(){ // IE8- test.sort(undefined); }) || !fails(function(){ // V8 bug test.sort(null); // Old WebKit }) || !__webpack_require__(160)($sort)), 'Array', { // 22.1.3.25 Array.prototype.sort(comparefn) sort: function sort(comparefn){ return comparefn === undefined ? $sort.call(toObject(this)) : $sort.call(toObject(this), aFunction(comparefn)); } }); /***/ }, /* 163 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; var $export = __webpack_require__(6) , $forEach = __webpack_require__(164)(0) , STRICT = __webpack_require__(160)([].forEach, true); $export($export.P + $export.F * !STRICT, 'Array', { // 22.1.3.10 / 15.4.4.18 Array.prototype.forEach(callbackfn [, thisArg]) forEach: function forEach(callbackfn /* , thisArg */){ return $forEach(this, callbackfn, arguments[1]); } }); /***/ }, /* 164 */ /***/ function(module, exports, __webpack_require__) { // 0 -> Array#forEach // 1 -> Array#map // 2 -> Array#filter // 3 -> Array#some // 4 -> Array#every // 5 -> Array#find // 6 -> Array#findIndex var ctx = __webpack_require__(18) , IObject = __webpack_require__(31) , toObject = __webpack_require__(56) , toLength = __webpack_require__(35) , asc = __webpack_require__(165); module.exports = function(TYPE, $create){ var IS_MAP = TYPE == 1 , IS_FILTER = TYPE == 2 , IS_SOME = TYPE == 3 , IS_EVERY = TYPE == 4 , IS_FIND_INDEX = TYPE == 6 , NO_HOLES = TYPE == 5 || IS_FIND_INDEX , create = $create || asc; return function($this, callbackfn, that){ var O = toObject($this) , self = IObject(O) , f = ctx(callbackfn, that, 3) , length = toLength(self.length) , index = 0 , result = IS_MAP ? create($this, length) : IS_FILTER ? create($this, 0) : undefined , val, res; for(;length > index; index++)if(NO_HOLES || index in self){ val = self[index]; res = f(val, index, O); if(TYPE){ if(IS_MAP)result[index] = res; // map else if(res)switch(TYPE){ case 3: return true; // some case 5: return val; // find case 6: return index; // findIndex case 2: result.push(val); // filter } else if(IS_EVERY)return false; // every } } return IS_FIND_INDEX ? -1 : IS_SOME || IS_EVERY ? IS_EVERY : result; }; }; /***/ }, /* 165 */ /***/ function(module, exports, __webpack_require__) { // 9.4.2.3 ArraySpeciesCreate(originalArray, length) var speciesConstructor = __webpack_require__(166); module.exports = function(original, length){ return new (speciesConstructor(original))(length); }; /***/ }, /* 166 */ /***/ function(module, exports, __webpack_require__) { var isObject = __webpack_require__(11) , isArray = __webpack_require__(43) , SPECIES = __webpack_require__(23)('species'); module.exports = function(original){ var C; if(isArray(original)){ C = original.constructor; // cross-realm fallback if(typeof C == 'function' && (C === Array || isArray(C.prototype)))C = undefined; if(isObject(C)){ C = C[SPECIES]; if(C === null)C = undefined; } } return C === undefined ? Array : C; }; /***/ }, /* 167 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; var $export = __webpack_require__(6) , $map = __webpack_require__(164)(1); $export($export.P + $export.F * !__webpack_require__(160)([].map, true), 'Array', { // 22.1.3.15 / 15.4.4.19 Array.prototype.map(callbackfn [, thisArg]) map: function map(callbackfn /* , thisArg */){ return $map(this, callbackfn, arguments[1]); } }); /***/ }, /* 168 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; var $export = __webpack_require__(6) , $filter = __webpack_require__(164)(2); $export($export.P + $export.F * !__webpack_require__(160)([].filter, true), 'Array', { // 22.1.3.7 / 15.4.4.20 Array.prototype.filter(callbackfn [, thisArg]) filter: function filter(callbackfn /* , thisArg */){ return $filter(this, callbackfn, arguments[1]); } }); /***/ }, /* 169 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; var $export = __webpack_require__(6) , $some = __webpack_require__(164)(3); $export($export.P + $export.F * !__webpack_require__(160)([].some, true), 'Array', { // 22.1.3.23 / 15.4.4.17 Array.prototype.some(callbackfn [, thisArg]) some: function some(callbackfn /* , thisArg */){ return $some(this, callbackfn, arguments[1]); } }); /***/ }, /* 170 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; var $export = __webpack_require__(6) , $every = __webpack_require__(164)(4); $export($export.P + $export.F * !__webpack_require__(160)([].every, true), 'Array', { // 22.1.3.5 / 15.4.4.16 Array.prototype.every(callbackfn [, thisArg]) every: function every(callbackfn /* , thisArg */){ return $every(this, callbackfn, arguments[1]); } }); /***/ }, /* 171 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; var $export = __webpack_require__(6) , $reduce = __webpack_require__(172); $export($export.P + $export.F * !__webpack_require__(160)([].reduce, true), 'Array', { // 22.1.3.18 / 15.4.4.21 Array.prototype.reduce(callbackfn [, initialValue]) reduce: function reduce(callbackfn /* , initialValue */){ return $reduce(this, callbackfn, arguments.length, arguments[1], false); } }); /***/ }, /* 172 */ /***/ function(module, exports, __webpack_require__) { var aFunction = __webpack_require__(19) , toObject = __webpack_require__(56) , IObject = __webpack_require__(31) , toLength = __webpack_require__(35); module.exports = function(that, callbackfn, aLen, memo, isRight){ aFunction(callbackfn); var O = toObject(that) , self = IObject(O) , length = toLength(O.length) , index = isRight ? length - 1 : 0 , i = isRight ? -1 : 1; if(aLen < 2)for(;;){ if(index in self){ memo = self[index]; index += i; break; } index += i; if(isRight ? index < 0 : length <= index){ throw TypeError('Reduce of empty array with no initial value'); } } for(;isRight ? index >= 0 : length > index; index += i)if(index in self){ memo = callbackfn(memo, self[index], index, O); } return memo; }; /***/ }, /* 173 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; var $export = __webpack_require__(6) , $reduce = __webpack_require__(172); $export($export.P + $export.F * !__webpack_require__(160)([].reduceRight, true), 'Array', { // 22.1.3.19 / 15.4.4.22 Array.prototype.reduceRight(callbackfn [, initialValue]) reduceRight: function reduceRight(callbackfn /* , initialValue */){ return $reduce(this, callbackfn, arguments.length, arguments[1], true); } }); /***/ }, /* 174 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; var $export = __webpack_require__(6) , $indexOf = __webpack_require__(34)(false) , $native = [].indexOf , NEGATIVE_ZERO = !!$native && 1 / [1].indexOf(1, -0) < 0; $export($export.P + $export.F * (NEGATIVE_ZERO || !__webpack_require__(160)($native)), 'Array', { // 22.1.3.11 / 15.4.4.14 Array.prototype.indexOf(searchElement [, fromIndex]) indexOf: function indexOf(searchElement /*, fromIndex = 0 */){ return NEGATIVE_ZERO // convert -0 to +0 ? $native.apply(this, arguments) || 0 : $indexOf(this, searchElement, arguments[1]); } }); /***/ }, /* 175 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; var $export = __webpack_require__(6) , toIObject = __webpack_require__(30) , toInteger = __webpack_require__(36) , toLength = __webpack_require__(35) , $native = [].lastIndexOf , NEGATIVE_ZERO = !!$native && 1 / [1].lastIndexOf(1, -0) < 0; $export($export.P + $export.F * (NEGATIVE_ZERO || !__webpack_require__(160)($native)), 'Array', { // 22.1.3.14 / 15.4.4.15 Array.prototype.lastIndexOf(searchElement [, fromIndex]) lastIndexOf: function lastIndexOf(searchElement /*, fromIndex = @[*-1] */){ // convert -0 to +0 if(NEGATIVE_ZERO)return $native.apply(this, arguments) || 0; var O = toIObject(this) , length = toLength(O.length) , index = length - 1; if(arguments.length > 1)index = Math.min(index, toInteger(arguments[1])); if(index < 0)index = length + index; for(;index >= 0; index--)if(index in O)if(O[index] === searchElement)return index || 0; return -1; } }); /***/ }, /* 176 */ /***/ function(module, exports, __webpack_require__) { // 22.1.3.3 Array.prototype.copyWithin(target, start, end = this.length) var $export = __webpack_require__(6); $export($export.P, 'Array', {copyWithin: __webpack_require__(177)}); __webpack_require__(178)('copyWithin'); /***/ }, /* 177 */ /***/ function(module, exports, __webpack_require__) { // 22.1.3.3 Array.prototype.copyWithin(target, start, end = this.length) 'use strict'; var toObject = __webpack_require__(56) , toIndex = __webpack_require__(37) , toLength = __webpack_require__(35); module.exports = [].copyWithin || function copyWithin(target/*= 0*/, start/*= 0, end = @length*/){ var O = toObject(this) , len = toLength(O.length) , to = toIndex(target, len) , from = toIndex(start, len) , end = arguments.length > 2 ? arguments[2] : undefined , count = Math.min((end === undefined ? len : toIndex(end, len)) - from, len - to) , inc = 1; if(from < to && to < from + count){ inc = -1; from += count - 1; to += count - 1; } while(count-- > 0){ if(from in O)O[to] = O[from]; else delete O[to]; to += inc; from += inc; } return O; }; /***/ }, /* 178 */ /***/ function(module, exports, __webpack_require__) { // 22.1.3.31 Array.prototype[@@unscopables] var UNSCOPABLES = __webpack_require__(23)('unscopables') , ArrayProto = Array.prototype; if(ArrayProto[UNSCOPABLES] == undefined)__webpack_require__(8)(ArrayProto, UNSCOPABLES, {}); module.exports = function(key){ ArrayProto[UNSCOPABLES][key] = true; }; /***/ }, /* 179 */ /***/ function(module, exports, __webpack_require__) { // 22.1.3.6 Array.prototype.fill(value, start = 0, end = this.length) var $export = __webpack_require__(6); $export($export.P, 'Array', {fill: __webpack_require__(180)}); __webpack_require__(178)('fill'); /***/ }, /* 180 */ /***/ function(module, exports, __webpack_require__) { // 22.1.3.6 Array.prototype.fill(value, start = 0, end = this.length) 'use strict'; var toObject = __webpack_require__(56) , toIndex = __webpack_require__(37) , toLength = __webpack_require__(35); module.exports = function fill(value /*, start = 0, end = @length */){ var O = toObject(this) , length = toLength(O.length) , aLen = arguments.length , index = toIndex(aLen > 1 ? arguments[1] : undefined, length) , end = aLen > 2 ? arguments[2] : undefined , endPos = end === undefined ? length : toIndex(end, length); while(endPos > index)O[index++] = value; return O; }; /***/ }, /* 181 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; // 22.1.3.8 Array.prototype.find(predicate, thisArg = undefined) var $export = __webpack_require__(6) , $find = __webpack_require__(164)(5) , KEY = 'find' , forced = true; // Shouldn't skip holes if(KEY in [])Array(1)[KEY](function(){ forced = false; }); $export($export.P + $export.F * forced, 'Array', { find: function find(callbackfn/*, that = undefined */){ return $find(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined); } }); __webpack_require__(178)(KEY); /***/ }, /* 182 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; // 22.1.3.9 Array.prototype.findIndex(predicate, thisArg = undefined) var $export = __webpack_require__(6) , $find = __webpack_require__(164)(6) , KEY = 'findIndex' , forced = true; // Shouldn't skip holes if(KEY in [])Array(1)[KEY](function(){ forced = false; }); $export($export.P + $export.F * forced, 'Array', { findIndex: function findIndex(callbackfn/*, that = undefined */){ return $find(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined); } }); __webpack_require__(178)(KEY); /***/ }, /* 183 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; var addToUnscopables = __webpack_require__(178) , step = __webpack_require__(184) , Iterators = __webpack_require__(135) , toIObject = __webpack_require__(30); // 22.1.3.4 Array.prototype.entries() // 22.1.3.13 Array.prototype.keys() // 22.1.3.29 Array.prototype.values() // 22.1.3.30 Array.prototype[@@iterator]() module.exports = __webpack_require__(134)(Array, 'Array', function(iterated, kind){ this._t = toIObject(iterated); // target this._i = 0; // next index this._k = kind; // kind // 22.1.5.2.1 %ArrayIteratorPrototype%.next() }, function(){ var O = this._t , kind = this._k , index = this._i++; if(!O || index >= O.length){ this._t = undefined; return step(1); } if(kind == 'keys' )return step(0, index); if(kind == 'values')return step(0, O[index]); return step(0, [index, O[index]]); }, 'values'); // argumentsList[@@iterator] is %ArrayProto_values% (9.4.4.6, 9.4.4.7) Iterators.Arguments = Iterators.Array; addToUnscopables('keys'); addToUnscopables('values'); addToUnscopables('entries'); /***/ }, /* 184 */ /***/ function(module, exports) { module.exports = function(done, value){ return {value: value, done: !!done}; }; /***/ }, /* 185 */ /***/ function(module, exports, __webpack_require__) { __webpack_require__(186)('Array'); /***/ }, /* 186 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; var global = __webpack_require__(2) , dP = __webpack_require__(9) , DESCRIPTORS = __webpack_require__(4) , SPECIES = __webpack_require__(23)('species'); module.exports = function(KEY){ var C = global[KEY]; if(DESCRIPTORS && C && !C[SPECIES])dP.f(C, SPECIES, { configurable: true, get: function(){ return this; } }); }; /***/ }, /* 187 */ /***/ function(module, exports, __webpack_require__) { var global = __webpack_require__(2) , inheritIfRequired = __webpack_require__(80) , dP = __webpack_require__(9).f , gOPN = __webpack_require__(48).f , isRegExp = __webpack_require__(128) , $flags = __webpack_require__(188) , $RegExp = global.RegExp , Base = $RegExp , proto = $RegExp.prototype , re1 = /a/g , re2 = /a/g // "new" creates a new object, old webkit buggy here , CORRECT_NEW = new $RegExp(re1) !== re1; if(__webpack_require__(4) && (!CORRECT_NEW || __webpack_require__(5)(function(){ re2[__webpack_require__(23)('match')] = false; // RegExp constructor can alter flags and IsRegExp works correct with @@match return $RegExp(re1) != re1 || $RegExp(re2) == re2 || $RegExp(re1, 'i') != '/a/i'; }))){ $RegExp = function RegExp(p, f){ var tiRE = this instanceof $RegExp , piRE = isRegExp(p) , fiU = f === undefined; return !tiRE && piRE && p.constructor === $RegExp && fiU ? p : inheritIfRequired(CORRECT_NEW ? new Base(piRE && !fiU ? p.source : p, f) : Base((piRE = p instanceof $RegExp) ? p.source : p, piRE && fiU ? $flags.call(p) : f) , tiRE ? this : proto, $RegExp); }; var proxy = function(key){ key in $RegExp || dP($RegExp, key, { configurable: true, get: function(){ return Base[key]; }, set: function(it){ Base[key] = it; } }); }; for(var keys = gOPN(Base), i = 0; keys.length > i; )proxy(keys[i++]); proto.constructor = $RegExp; $RegExp.prototype = proto; __webpack_require__(16)(global, 'RegExp', $RegExp); } __webpack_require__(186)('RegExp'); /***/ }, /* 188 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; // 21.2.5.3 get RegExp.prototype.flags var anObject = __webpack_require__(10); module.exports = function(){ var that = anObject(this) , result = ''; if(that.global) result += 'g'; if(that.ignoreCase) result += 'i'; if(that.multiline) result += 'm'; if(that.unicode) result += 'u'; if(that.sticky) result += 'y'; return result; }; /***/ }, /* 189 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; __webpack_require__(190); var anObject = __webpack_require__(10) , $flags = __webpack_require__(188) , DESCRIPTORS = __webpack_require__(4) , TO_STRING = 'toString' , $toString = /./[TO_STRING]; var define = function(fn){ __webpack_require__(16)(RegExp.prototype, TO_STRING, fn, true); }; // 21.2.5.14 RegExp.prototype.toString() if(__webpack_require__(5)(function(){ return $toString.call({source: 'a', flags: 'b'}) != '/a/b'; })){ define(function toString(){ var R = anObject(this); return '/'.concat(R.source, '/', 'flags' in R ? R.flags : !DESCRIPTORS && R instanceof RegExp ? $flags.call(R) : undefined); }); // FF44- RegExp#toString has a wrong name } else if($toString.name != TO_STRING){ define(function toString(){ return $toString.call(this); }); } /***/ }, /* 190 */ /***/ function(module, exports, __webpack_require__) { // 21.2.5.3 get RegExp.prototype.flags() if(__webpack_require__(4) && /./g.flags != 'g')__webpack_require__(9).f(RegExp.prototype, 'flags', { configurable: true, get: __webpack_require__(188) }); /***/ }, /* 191 */ /***/ function(module, exports, __webpack_require__) { // @@match logic __webpack_require__(192)('match', 1, function(defined, MATCH, $match){ // 21.1.3.11 String.prototype.match(regexp) return [function match(regexp){ 'use strict'; var O = defined(this) , fn = regexp == undefined ? undefined : regexp[MATCH]; return fn !== undefined ? fn.call(regexp, O) : new RegExp(regexp)[MATCH](String(O)); }, $match]; }); /***/ }, /* 192 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; var hide = __webpack_require__(8) , redefine = __webpack_require__(16) , fails = __webpack_require__(5) , defined = __webpack_require__(33) , wks = __webpack_require__(23); module.exports = function(KEY, length, exec){ var SYMBOL = wks(KEY) , fns = exec(defined, SYMBOL, ''[KEY]) , strfn = fns[0] , rxfn = fns[1]; if(fails(function(){ var O = {}; O[SYMBOL] = function(){ return 7; }; return ''[KEY](O) != 7; })){ redefine(String.prototype, KEY, strfn); hide(RegExp.prototype, SYMBOL, length == 2 // 21.2.5.8 RegExp.prototype[@@replace](string, replaceValue) // 21.2.5.11 RegExp.prototype[@@split](string, limit) ? function(string, arg){ return rxfn.call(string, this, arg); } // 21.2.5.6 RegExp.prototype[@@match](string) // 21.2.5.9 RegExp.prototype[@@search](string) : function(string){ return rxfn.call(string, this); } ); } }; /***/ }, /* 193 */ /***/ function(module, exports, __webpack_require__) { // @@replace logic __webpack_require__(192)('replace', 2, function(defined, REPLACE, $replace){ // 21.1.3.14 String.prototype.replace(searchValue, replaceValue) return [function replace(searchValue, replaceValue){ 'use strict'; var O = defined(this) , fn = searchValue == undefined ? undefined : searchValue[REPLACE]; return fn !== undefined ? fn.call(searchValue, O, replaceValue) : $replace.call(String(O), searchValue, replaceValue); }, $replace]; }); /***/ }, /* 194 */ /***/ function(module, exports, __webpack_require__) { // @@search logic __webpack_require__(192)('search', 1, function(defined, SEARCH, $search){ // 21.1.3.15 String.prototype.search(regexp) return [function search(regexp){ 'use strict'; var O = defined(this) , fn = regexp == undefined ? undefined : regexp[SEARCH]; return fn !== undefined ? fn.call(regexp, O) : new RegExp(regexp)[SEARCH](String(O)); }, $search]; }); /***/ }, /* 195 */ /***/ function(module, exports, __webpack_require__) { // @@split logic __webpack_require__(192)('split', 2, function(defined, SPLIT, $split){ 'use strict'; var isRegExp = __webpack_require__(128) , _split = $split , $push = [].push , $SPLIT = 'split' , LENGTH = 'length' , LAST_INDEX = 'lastIndex'; if( 'abbc'[$SPLIT](/(b)*/)[1] == 'c' || 'test'[$SPLIT](/(?:)/, -1)[LENGTH] != 4 || 'ab'[$SPLIT](/(?:ab)*/)[LENGTH] != 2 || '.'[$SPLIT](/(.?)(.?)/)[LENGTH] != 4 || '.'[$SPLIT](/()()/)[LENGTH] > 1 || ''[$SPLIT](/.?/)[LENGTH] ){ var NPCG = /()??/.exec('')[1] === undefined; // nonparticipating capturing group // based on es5-shim implementation, need to rework it $split = function(separator, limit){ var string = String(this); if(separator === undefined && limit === 0)return []; // If `separator` is not a regex, use native split if(!isRegExp(separator))return _split.call(string, separator, limit); var output = []; var flags = (separator.ignoreCase ? 'i' : '') + (separator.multiline ? 'm' : '') + (separator.unicode ? 'u' : '') + (separator.sticky ? 'y' : ''); var lastLastIndex = 0; var splitLimit = limit === undefined ? 4294967295 : limit >>> 0; // Make `global` and avoid `lastIndex` issues by working with a copy var separatorCopy = new RegExp(separator.source, flags + 'g'); var separator2, match, lastIndex, lastLength, i; // Doesn't need flags gy, but they don't hurt if(!NPCG)separator2 = new RegExp('^' + separatorCopy.source + '$(?!\\s)', flags); while(match = separatorCopy.exec(string)){ // `separatorCopy.lastIndex` is not reliable cross-browser lastIndex = match.index + match[0][LENGTH]; if(lastIndex > lastLastIndex){ output.push(string.slice(lastLastIndex, match.index)); // Fix browsers whose `exec` methods don't consistently return `undefined` for NPCG if(!NPCG && match[LENGTH] > 1)match[0].replace(separator2, function(){ for(i = 1; i < arguments[LENGTH] - 2; i++)if(arguments[i] === undefined)match[i] = undefined; }); if(match[LENGTH] > 1 && match.index < string[LENGTH])$push.apply(output, match.slice(1)); lastLength = match[0][LENGTH]; lastLastIndex = lastIndex; if(output[LENGTH] >= splitLimit)break; } if(separatorCopy[LAST_INDEX] === match.index)separatorCopy[LAST_INDEX]++; // Avoid an infinite loop } if(lastLastIndex === string[LENGTH]){ if(lastLength || !separatorCopy.test(''))output.push(''); } else output.push(string.slice(lastLastIndex)); return output[LENGTH] > splitLimit ? output.slice(0, splitLimit) : output; }; // Chakra, V8 } else if('0'[$SPLIT](undefined, 0)[LENGTH]){ $split = function(separator, limit){ return separator === undefined && limit === 0 ? [] : _split.call(this, separator, limit); }; } // 21.1.3.17 String.prototype.split(separator, limit) return [function split(separator, limit){ var O = defined(this) , fn = separator == undefined ? undefined : separator[SPLIT]; return fn !== undefined ? fn.call(separator, O, limit) : $split.call(String(O), separator, limit); }, $split]; }); /***/ }, /* 196 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; var LIBRARY = __webpack_require__(26) , global = __webpack_require__(2) , ctx = __webpack_require__(18) , classof = __webpack_require__(73) , $export = __webpack_require__(6) , isObject = __webpack_require__(11) , aFunction = __webpack_require__(19) , anInstance = __webpack_require__(197) , forOf = __webpack_require__(198) , speciesConstructor = __webpack_require__(199) , task = __webpack_require__(200).set , microtask = __webpack_require__(201)() , PROMISE = 'Promise' , TypeError = global.TypeError , process = global.process , $Promise = global[PROMISE] , process = global.process , isNode = classof(process) == 'process' , empty = function(){ /* empty */ } , Internal, GenericPromiseCapability, Wrapper; var USE_NATIVE = !!function(){ try { // correct subclassing with @@species support var promise = $Promise.resolve(1) , FakePromise = (promise.constructor = {})[__webpack_require__(23)('species')] = function(exec){ exec(empty, empty); }; // unhandled rejections tracking support, NodeJS Promise without it fails @@species test return (isNode || typeof PromiseRejectionEvent == 'function') && promise.then(empty) instanceof FakePromise; } catch(e){ /* empty */ } }(); // helpers var sameConstructor = function(a, b){ // with library wrapper special case return a === b || a === $Promise && b === Wrapper; }; var isThenable = function(it){ var then; return isObject(it) && typeof (then = it.then) == 'function' ? then : false; }; var newPromiseCapability = function(C){ return sameConstructor($Promise, C) ? new PromiseCapability(C) : new GenericPromiseCapability(C); }; var PromiseCapability = GenericPromiseCapability = function(C){ var resolve, reject; this.promise = new C(function($$resolve, $$reject){ if(resolve !== undefined || reject !== undefined)throw TypeError('Bad Promise constructor'); resolve = $$resolve; reject = $$reject; }); this.resolve = aFunction(resolve); this.reject = aFunction(reject); }; var perform = function(exec){ try { exec(); } catch(e){ return {error: e}; } }; var notify = function(promise, isReject){ if(promise._n)return; promise._n = true; var chain = promise._c; microtask(function(){ var value = promise._v , ok = promise._s == 1 , i = 0; var run = function(reaction){ var handler = ok ? reaction.ok : reaction.fail , resolve = reaction.resolve , reject = reaction.reject , domain = reaction.domain , result, then; try { if(handler){ if(!ok){ if(promise._h == 2)onHandleUnhandled(promise); promise._h = 1; } if(handler === true)result = value; else { if(domain)domain.enter(); result = handler(value); if(domain)domain.exit(); } if(result === reaction.promise){ reject(TypeError('Promise-chain cycle')); } else if(then = isThenable(result)){ then.call(result, resolve, reject); } else resolve(result); } else reject(value); } catch(e){ reject(e); } }; while(chain.length > i)run(chain[i++]); // variable length - can't use forEach promise._c = []; promise._n = false; if(isReject && !promise._h)onUnhandled(promise); }); }; var onUnhandled = function(promise){ task.call(global, function(){ var value = promise._v , abrupt, handler, console; if(isUnhandled(promise)){ abrupt = perform(function(){ if(isNode){ process.emit('unhandledRejection', value, promise); } else if(handler = global.onunhandledrejection){ handler({promise: promise, reason: value}); } else if((console = global.console) && console.error){ console.error('Unhandled promise rejection', value); } }); // Browsers should not trigger `rejectionHandled` event if it was handled here, NodeJS - should promise._h = isNode || isUnhandled(promise) ? 2 : 1; } promise._a = undefined; if(abrupt)throw abrupt.error; }); }; var isUnhandled = function(promise){ if(promise._h == 1)return false; var chain = promise._a || promise._c , i = 0 , reaction; while(chain.length > i){ reaction = chain[i++]; if(reaction.fail || !isUnhandled(reaction.promise))return false; } return true; }; var onHandleUnhandled = function(promise){ task.call(global, function(){ var handler; if(isNode){ process.emit('rejectionHandled', promise); } else if(handler = global.onrejectionhandled){ handler({promise: promise, reason: promise._v}); } }); }; var $reject = function(value){ var promise = this; if(promise._d)return; promise._d = true; promise = promise._w || promise; // unwrap promise._v = value; promise._s = 2; if(!promise._a)promise._a = promise._c.slice(); notify(promise, true); }; var $resolve = function(value){ var promise = this , then; if(promise._d)return; promise._d = true; promise = promise._w || promise; // unwrap try { if(promise === value)throw TypeError("Promise can't be resolved itself"); if(then = isThenable(value)){ microtask(function(){ var wrapper = {_w: promise, _d: false}; // wrap try { then.call(value, ctx($resolve, wrapper, 1), ctx($reject, wrapper, 1)); } catch(e){ $reject.call(wrapper, e); } }); } else { promise._v = value; promise._s = 1; notify(promise, false); } } catch(e){ $reject.call({_w: promise, _d: false}, e); // wrap } }; // constructor polyfill if(!USE_NATIVE){ // 25.4.3.1 Promise(executor) $Promise = function Promise(executor){ anInstance(this, $Promise, PROMISE, '_h'); aFunction(executor); Internal.call(this); try { executor(ctx($resolve, this, 1), ctx($reject, this, 1)); } catch(err){ $reject.call(this, err); } }; Internal = function Promise(executor){ this._c = []; // <- awaiting reactions this._a = undefined; // <- checked in isUnhandled reactions this._s = 0; // <- state this._d = false; // <- done this._v = undefined; // <- value this._h = 0; // <- rejection state, 0 - default, 1 - handled, 2 - unhandled this._n = false; // <- notify }; Internal.prototype = __webpack_require__(202)($Promise.prototype, { // 25.4.5.3 Promise.prototype.then(onFulfilled, onRejected) then: function then(onFulfilled, onRejected){ var reaction = newPromiseCapability(speciesConstructor(this, $Promise)); reaction.ok = typeof onFulfilled == 'function' ? onFulfilled : true; reaction.fail = typeof onRejected == 'function' && onRejected; reaction.domain = isNode ? process.domain : undefined; this._c.push(reaction); if(this._a)this._a.push(reaction); if(this._s)notify(this, false); return reaction.promise; }, // 25.4.5.1 Promise.prototype.catch(onRejected) 'catch': function(onRejected){ return this.then(undefined, onRejected); } }); PromiseCapability = function(){ var promise = new Internal; this.promise = promise; this.resolve = ctx($resolve, promise, 1); this.reject = ctx($reject, promise, 1); }; } $export($export.G + $export.W + $export.F * !USE_NATIVE, {Promise: $Promise}); __webpack_require__(22)($Promise, PROMISE); __webpack_require__(186)(PROMISE); Wrapper = __webpack_require__(7)[PROMISE]; // statics $export($export.S + $export.F * !USE_NATIVE, PROMISE, { // 25.4.4.5 Promise.reject(r) reject: function reject(r){ var capability = newPromiseCapability(this) , $$reject = capability.reject; $$reject(r); return capability.promise; } }); $export($export.S + $export.F * (LIBRARY || !USE_NATIVE), PROMISE, { // 25.4.4.6 Promise.resolve(x) resolve: function resolve(x){ // instanceof instead of internal slot check because we should fix it without replacement native Promise core if(x instanceof $Promise && sameConstructor(x.constructor, this))return x; var capability = newPromiseCapability(this) , $$resolve = capability.resolve; $$resolve(x); return capability.promise; } }); $export($export.S + $export.F * !(USE_NATIVE && __webpack_require__(157)(function(iter){ $Promise.all(iter)['catch'](empty); })), PROMISE, { // 25.4.4.1 Promise.all(iterable) all: function all(iterable){ var C = this , capability = newPromiseCapability(C) , resolve = capability.resolve , reject = capability.reject; var abrupt = perform(function(){ var values = [] , index = 0 , remaining = 1; forOf(iterable, false, function(promise){ var $index = index++ , alreadyCalled = false; values.push(undefined); remaining++; C.resolve(promise).then(function(value){ if(alreadyCalled)return; alreadyCalled = true; values[$index] = value; --remaining || resolve(values); }, reject); }); --remaining || resolve(values); }); if(abrupt)reject(abrupt.error); return capability.promise; }, // 25.4.4.4 Promise.race(iterable) race: function race(iterable){ var C = this , capability = newPromiseCapability(C) , reject = capability.reject; var abrupt = perform(function(){ forOf(iterable, false, function(promise){ C.resolve(promise).then(capability.resolve, reject); }); }); if(abrupt)reject(abrupt.error); return capability.promise; } }); /***/ }, /* 197 */ /***/ function(module, exports) { module.exports = function(it, Constructor, name, forbiddenField){ if(!(it instanceof Constructor) || (forbiddenField !== undefined && forbiddenField in it)){ throw TypeError(name + ': incorrect invocation!'); } return it; }; /***/ }, /* 198 */ /***/ function(module, exports, __webpack_require__) { var ctx = __webpack_require__(18) , call = __webpack_require__(153) , isArrayIter = __webpack_require__(154) , anObject = __webpack_require__(10) , toLength = __webpack_require__(35) , getIterFn = __webpack_require__(156) , BREAK = {} , RETURN = {}; var exports = module.exports = function(iterable, entries, fn, that, ITERATOR){ var iterFn = ITERATOR ? function(){ return iterable; } : getIterFn(iterable) , f = ctx(fn, that, entries ? 2 : 1) , index = 0 , length, step, iterator, result; if(typeof iterFn != 'function')throw TypeError(iterable + ' is not iterable!'); // fast case for arrays with default iterator if(isArrayIter(iterFn))for(length = toLength(iterable.length); length > index; index++){ result = entries ? f(anObject(step = iterable[index])[0], step[1]) : f(iterable[index]); if(result === BREAK || result === RETURN)return result; } else for(iterator = iterFn.call(iterable); !(step = iterator.next()).done; ){ result = call(iterator, f, step.value, entries); if(result === BREAK || result === RETURN)return result; } }; exports.BREAK = BREAK; exports.RETURN = RETURN; /***/ }, /* 199 */ /***/ function(module, exports, __webpack_require__) { // 7.3.20 SpeciesConstructor(O, defaultConstructor) var anObject = __webpack_require__(10) , aFunction = __webpack_require__(19) , SPECIES = __webpack_require__(23)('species'); module.exports = function(O, D){ var C = anObject(O).constructor, S; return C === undefined || (S = anObject(C)[SPECIES]) == undefined ? D : aFunction(S); }; /***/ }, /* 200 */ /***/ function(module, exports, __webpack_require__) { var ctx = __webpack_require__(18) , invoke = __webpack_require__(76) , html = __webpack_require__(46) , cel = __webpack_require__(13) , global = __webpack_require__(2) , process = global.process , setTask = global.setImmediate , clearTask = global.clearImmediate , MessageChannel = global.MessageChannel , counter = 0 , queue = {} , ONREADYSTATECHANGE = 'onreadystatechange' , defer, channel, port; var run = function(){ var id = +this; if(queue.hasOwnProperty(id)){ var fn = queue[id]; delete queue[id]; fn(); } }; var listener = function(event){ run.call(event.data); }; // Node.js 0.9+ & IE10+ has setImmediate, otherwise: if(!setTask || !clearTask){ setTask = function setImmediate(fn){ var args = [], i = 1; while(arguments.length > i)args.push(arguments[i++]); queue[++counter] = function(){ invoke(typeof fn == 'function' ? fn : Function(fn), args); }; defer(counter); return counter; }; clearTask = function clearImmediate(id){ delete queue[id]; }; // Node.js 0.8- if(__webpack_require__(32)(process) == 'process'){ defer = function(id){ process.nextTick(ctx(run, id, 1)); }; // Browsers with MessageChannel, includes WebWorkers } else if(MessageChannel){ channel = new MessageChannel; port = channel.port2; channel.port1.onmessage = listener; defer = ctx(port.postMessage, port, 1); // Browsers with postMessage, skip WebWorkers // IE8 has postMessage, but it's sync & typeof its postMessage is 'object' } else if(global.addEventListener && typeof postMessage == 'function' && !global.importScripts){ defer = function(id){ global.postMessage(id + '', '*'); }; global.addEventListener('message', listener, false); // IE8- } else if(ONREADYSTATECHANGE in cel('script')){ defer = function(id){ html.appendChild(cel('script'))[ONREADYSTATECHANGE] = function(){ html.removeChild(this); run.call(id); }; }; // Rest old browsers } else { defer = function(id){ setTimeout(ctx(run, id, 1), 0); }; } } module.exports = { set: setTask, clear: clearTask }; /***/ }, /* 201 */ /***/ function(module, exports, __webpack_require__) { var global = __webpack_require__(2) , macrotask = __webpack_require__(200).set , Observer = global.MutationObserver || global.WebKitMutationObserver , process = global.process , Promise = global.Promise , isNode = __webpack_require__(32)(process) == 'process'; module.exports = function(){ var head, last, notify; var flush = function(){ var parent, fn; if(isNode && (parent = process.domain))parent.exit(); while(head){ fn = head.fn; head = head.next; try { fn(); } catch(e){ if(head)notify(); else last = undefined; throw e; } } last = undefined; if(parent)parent.enter(); }; // Node.js if(isNode){ notify = function(){ process.nextTick(flush); }; // browsers with MutationObserver } else if(Observer){ var toggle = true , node = document.createTextNode(''); new Observer(flush).observe(node, {characterData: true}); // eslint-disable-line no-new notify = function(){ node.data = toggle = !toggle; }; // environments with maybe non-completely correct, but existent Promise } else if(Promise && Promise.resolve){ var promise = Promise.resolve(); notify = function(){ promise.then(flush); }; // for other environments - macrotask based on: // - setImmediate // - MessageChannel // - window.postMessag // - onreadystatechange // - setTimeout } else { notify = function(){ // strange IE + webpack dev server bug - use .call(global) macrotask.call(global, flush); }; } return function(fn){ var task = {fn: fn, next: undefined}; if(last)last.next = task; if(!head){ head = task; notify(); } last = task; }; }; /***/ }, /* 202 */ /***/ function(module, exports, __webpack_require__) { var redefine = __webpack_require__(16); module.exports = function(target, src, safe){ for(var key in src)redefine(target, key, src[key], safe); return target; }; /***/ }, /* 203 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; var strong = __webpack_require__(204); // 23.1 Map Objects module.exports = __webpack_require__(205)('Map', function(get){ return function Map(){ return get(this, arguments.length > 0 ? arguments[0] : undefined); }; }, { // 23.1.3.6 Map.prototype.get(key) get: function get(key){ var entry = strong.getEntry(this, key); return entry && entry.v; }, // 23.1.3.9 Map.prototype.set(key, value) set: function set(key, value){ return strong.def(this, key === 0 ? 0 : key, value); } }, strong, true); /***/ }, /* 204 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; var dP = __webpack_require__(9).f , create = __webpack_require__(44) , redefineAll = __webpack_require__(202) , ctx = __webpack_require__(18) , anInstance = __webpack_require__(197) , defined = __webpack_require__(33) , forOf = __webpack_require__(198) , $iterDefine = __webpack_require__(134) , step = __webpack_require__(184) , setSpecies = __webpack_require__(186) , DESCRIPTORS = __webpack_require__(4) , fastKey = __webpack_require__(20).fastKey , SIZE = DESCRIPTORS ? '_s' : 'size'; var getEntry = function(that, key){ // fast case var index = fastKey(key), entry; if(index !== 'F')return that._i[index]; // frozen object case for(entry = that._f; entry; entry = entry.n){ if(entry.k == key)return entry; } }; module.exports = { getConstructor: function(wrapper, NAME, IS_MAP, ADDER){ var C = wrapper(function(that, iterable){ anInstance(that, C, NAME, '_i'); that._i = create(null); // index that._f = undefined; // first entry that._l = undefined; // last entry that[SIZE] = 0; // size if(iterable != undefined)forOf(iterable, IS_MAP, that[ADDER], that); }); redefineAll(C.prototype, { // 23.1.3.1 Map.prototype.clear() // 23.2.3.2 Set.prototype.clear() clear: function clear(){ for(var that = this, data = that._i, entry = that._f; entry; entry = entry.n){ entry.r = true; if(entry.p)entry.p = entry.p.n = undefined; delete data[entry.i]; } that._f = that._l = undefined; that[SIZE] = 0; }, // 23.1.3.3 Map.prototype.delete(key) // 23.2.3.4 Set.prototype.delete(value) 'delete': function(key){ var that = this , entry = getEntry(that, key); if(entry){ var next = entry.n , prev = entry.p; delete that._i[entry.i]; entry.r = true; if(prev)prev.n = next; if(next)next.p = prev; if(that._f == entry)that._f = next; if(that._l == entry)that._l = prev; that[SIZE]--; } return !!entry; }, // 23.2.3.6 Set.prototype.forEach(callbackfn, thisArg = undefined) // 23.1.3.5 Map.prototype.forEach(callbackfn, thisArg = undefined) forEach: function forEach(callbackfn /*, that = undefined */){ anInstance(this, C, 'forEach'); var f = ctx(callbackfn, arguments.length > 1 ? arguments[1] : undefined, 3) , entry; while(entry = entry ? entry.n : this._f){ f(entry.v, entry.k, this); // revert to the last existing entry while(entry && entry.r)entry = entry.p; } }, // 23.1.3.7 Map.prototype.has(key) // 23.2.3.7 Set.prototype.has(value) has: function has(key){ return !!getEntry(this, key); } }); if(DESCRIPTORS)dP(C.prototype, 'size', { get: function(){ return defined(this[SIZE]); } }); return C; }, def: function(that, key, value){ var entry = getEntry(that, key) , prev, index; // change existing entry if(entry){ entry.v = value; // create new entry } else { that._l = entry = { i: index = fastKey(key, true), // <- index k: key, // <- key v: value, // <- value p: prev = that._l, // <- previous entry n: undefined, // <- next entry r: false // <- removed }; if(!that._f)that._f = entry; if(prev)prev.n = entry; that[SIZE]++; // add to index if(index !== 'F')that._i[index] = entry; } return that; }, getEntry: getEntry, setStrong: function(C, NAME, IS_MAP){ // add .keys, .values, .entries, [@@iterator] // 23.1.3.4, 23.1.3.8, 23.1.3.11, 23.1.3.12, 23.2.3.5, 23.2.3.8, 23.2.3.10, 23.2.3.11 $iterDefine(C, NAME, function(iterated, kind){ this._t = iterated; // target this._k = kind; // kind this._l = undefined; // previous }, function(){ var that = this , kind = that._k , entry = that._l; // revert to the last existing entry while(entry && entry.r)entry = entry.p; // get next entry if(!that._t || !(that._l = entry = entry ? entry.n : that._t._f)){ // or finish the iteration that._t = undefined; return step(1); } // return step by kind if(kind == 'keys' )return step(0, entry.k); if(kind == 'values')return step(0, entry.v); return step(0, [entry.k, entry.v]); }, IS_MAP ? 'entries' : 'values' , !IS_MAP, true); // add [@@species], 23.1.2.2, 23.2.2.2 setSpecies(NAME); } }; /***/ }, /* 205 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; var global = __webpack_require__(2) , $export = __webpack_require__(6) , redefine = __webpack_require__(16) , redefineAll = __webpack_require__(202) , meta = __webpack_require__(20) , forOf = __webpack_require__(198) , anInstance = __webpack_require__(197) , isObject = __webpack_require__(11) , fails = __webpack_require__(5) , $iterDetect = __webpack_require__(157) , setToStringTag = __webpack_require__(22) , inheritIfRequired = __webpack_require__(80); module.exports = function(NAME, wrapper, methods, common, IS_MAP, IS_WEAK){ var Base = global[NAME] , C = Base , ADDER = IS_MAP ? 'set' : 'add' , proto = C && C.prototype , O = {}; var fixMethod = function(KEY){ var fn = proto[KEY]; redefine(proto, KEY, KEY == 'delete' ? function(a){ return IS_WEAK && !isObject(a) ? false : fn.call(this, a === 0 ? 0 : a); } : KEY == 'has' ? function has(a){ return IS_WEAK && !isObject(a) ? false : fn.call(this, a === 0 ? 0 : a); } : KEY == 'get' ? function get(a){ return IS_WEAK && !isObject(a) ? undefined : fn.call(this, a === 0 ? 0 : a); } : KEY == 'add' ? function add(a){ fn.call(this, a === 0 ? 0 : a); return this; } : function set(a, b){ fn.call(this, a === 0 ? 0 : a, b); return this; } ); }; if(typeof C != 'function' || !(IS_WEAK || proto.forEach && !fails(function(){ new C().entries().next(); }))){ // create collection constructor C = common.getConstructor(wrapper, NAME, IS_MAP, ADDER); redefineAll(C.prototype, methods); meta.NEED = true; } else { var instance = new C // early implementations not supports chaining , HASNT_CHAINING = instance[ADDER](IS_WEAK ? {} : -0, 1) != instance // V8 ~ Chromium 40- weak-collections throws on primitives, but should return false , THROWS_ON_PRIMITIVES = fails(function(){ instance.has(1); }) // most early implementations doesn't supports iterables, most modern - not close it correctly , ACCEPT_ITERABLES = $iterDetect(function(iter){ new C(iter); }) // eslint-disable-line no-new // for early implementations -0 and +0 not the same , BUGGY_ZERO = !IS_WEAK && fails(function(){ // V8 ~ Chromium 42- fails only with 5+ elements var $instance = new C() , index = 5; while(index--)$instance[ADDER](index, index); return !$instance.has(-0); }); if(!ACCEPT_ITERABLES){ C = wrapper(function(target, iterable){ anInstance(target, C, NAME); var that = inheritIfRequired(new Base, target, C); if(iterable != undefined)forOf(iterable, IS_MAP, that[ADDER], that); return that; }); C.prototype = proto; proto.constructor = C; } if(THROWS_ON_PRIMITIVES || BUGGY_ZERO){ fixMethod('delete'); fixMethod('has'); IS_MAP && fixMethod('get'); } if(BUGGY_ZERO || HASNT_CHAINING)fixMethod(ADDER); // weak collections should not contains .clear method if(IS_WEAK && proto.clear)delete proto.clear; } setToStringTag(C, NAME); O[NAME] = C; $export($export.G + $export.W + $export.F * (C != Base), O); if(!IS_WEAK)common.setStrong(C, NAME, IS_MAP); return C; }; /***/ }, /* 206 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; var strong = __webpack_require__(204); // 23.2 Set Objects module.exports = __webpack_require__(205)('Set', function(get){ return function Set(){ return get(this, arguments.length > 0 ? arguments[0] : undefined); }; }, { // 23.2.3.1 Set.prototype.add(value) add: function add(value){ return strong.def(this, value = value === 0 ? 0 : value, value); } }, strong); /***/ }, /* 207 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; var each = __webpack_require__(164)(0) , redefine = __webpack_require__(16) , meta = __webpack_require__(20) , assign = __webpack_require__(67) , weak = __webpack_require__(208) , isObject = __webpack_require__(11) , getWeak = meta.getWeak , isExtensible = Object.isExtensible , uncaughtFrozenStore = weak.ufstore , tmp = {} , InternalMap; var wrapper = function(get){ return function WeakMap(){ return get(this, arguments.length > 0 ? arguments[0] : undefined); }; }; var methods = { // 23.3.3.3 WeakMap.prototype.get(key) get: function get(key){ if(isObject(key)){ var data = getWeak(key); if(data === true)return uncaughtFrozenStore(this).get(key); return data ? data[this._i] : undefined; } }, // 23.3.3.5 WeakMap.prototype.set(key, value) set: function set(key, value){ return weak.def(this, key, value); } }; // 23.3 WeakMap Objects var $WeakMap = module.exports = __webpack_require__(205)('WeakMap', wrapper, methods, weak, true, true); // IE11 WeakMap frozen keys fix if(new $WeakMap().set((Object.freeze || Object)(tmp), 7).get(tmp) != 7){ InternalMap = weak.getConstructor(wrapper); assign(InternalMap.prototype, methods); meta.NEED = true; each(['delete', 'has', 'get', 'set'], function(key){ var proto = $WeakMap.prototype , method = proto[key]; redefine(proto, key, function(a, b){ // store frozen objects on internal weakmap shim if(isObject(a) && !isExtensible(a)){ if(!this._f)this._f = new InternalMap; var result = this._f[key](a, b); return key == 'set' ? this : result; // store all the rest on native weakmap } return method.call(this, a, b); }); }); } /***/ }, /* 208 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; var redefineAll = __webpack_require__(202) , getWeak = __webpack_require__(20).getWeak , anObject = __webpack_require__(10) , isObject = __webpack_require__(11) , anInstance = __webpack_require__(197) , forOf = __webpack_require__(198) , createArrayMethod = __webpack_require__(164) , $has = __webpack_require__(3) , arrayFind = createArrayMethod(5) , arrayFindIndex = createArrayMethod(6) , id = 0; // fallback for uncaught frozen keys var uncaughtFrozenStore = function(that){ return that._l || (that._l = new UncaughtFrozenStore); }; var UncaughtFrozenStore = function(){ this.a = []; }; var findUncaughtFrozen = function(store, key){ return arrayFind(store.a, function(it){ return it[0] === key; }); }; UncaughtFrozenStore.prototype = { get: function(key){ var entry = findUncaughtFrozen(this, key); if(entry)return entry[1]; }, has: function(key){ return !!findUncaughtFrozen(this, key); }, set: function(key, value){ var entry = findUncaughtFrozen(this, key); if(entry)entry[1] = value; else this.a.push([key, value]); }, 'delete': function(key){ var index = arrayFindIndex(this.a, function(it){ return it[0] === key; }); if(~index)this.a.splice(index, 1); return !!~index; } }; module.exports = { getConstructor: function(wrapper, NAME, IS_MAP, ADDER){ var C = wrapper(function(that, iterable){ anInstance(that, C, NAME, '_i'); that._i = id++; // collection id that._l = undefined; // leak store for uncaught frozen objects if(iterable != undefined)forOf(iterable, IS_MAP, that[ADDER], that); }); redefineAll(C.prototype, { // 23.3.3.2 WeakMap.prototype.delete(key) // 23.4.3.3 WeakSet.prototype.delete(value) 'delete': function(key){ if(!isObject(key))return false; var data = getWeak(key); if(data === true)return uncaughtFrozenStore(this)['delete'](key); return data && $has(data, this._i) && delete data[this._i]; }, // 23.3.3.4 WeakMap.prototype.has(key) // 23.4.3.4 WeakSet.prototype.has(value) has: function has(key){ if(!isObject(key))return false; var data = getWeak(key); if(data === true)return uncaughtFrozenStore(this).has(key); return data && $has(data, this._i); } }); return C; }, def: function(that, key, value){ var data = getWeak(anObject(key), true); if(data === true)uncaughtFrozenStore(that).set(key, value); else data[that._i] = value; return that; }, ufstore: uncaughtFrozenStore }; /***/ }, /* 209 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; var weak = __webpack_require__(208); // 23.4 WeakSet Objects __webpack_require__(205)('WeakSet', function(get){ return function WeakSet(){ return get(this, arguments.length > 0 ? arguments[0] : undefined); }; }, { // 23.4.3.1 WeakSet.prototype.add(value) add: function add(value){ return weak.def(this, value, true); } }, weak, false, true); /***/ }, /* 210 */ /***/ function(module, exports, __webpack_require__) { // 26.1.1 Reflect.apply(target, thisArgument, argumentsList) var $export = __webpack_require__(6) , aFunction = __webpack_require__(19) , anObject = __webpack_require__(10) , rApply = (__webpack_require__(2).Reflect || {}).apply , fApply = Function.apply; // MS Edge argumentsList argument is optional $export($export.S + $export.F * !__webpack_require__(5)(function(){ rApply(function(){}); }), 'Reflect', { apply: function apply(target, thisArgument, argumentsList){ var T = aFunction(target) , L = anObject(argumentsList); return rApply ? rApply(T, thisArgument, L) : fApply.call(T, thisArgument, L); } }); /***/ }, /* 211 */ /***/ function(module, exports, __webpack_require__) { // 26.1.2 Reflect.construct(target, argumentsList [, newTarget]) var $export = __webpack_require__(6) , create = __webpack_require__(44) , aFunction = __webpack_require__(19) , anObject = __webpack_require__(10) , isObject = __webpack_require__(11) , fails = __webpack_require__(5) , bind = __webpack_require__(75) , rConstruct = (__webpack_require__(2).Reflect || {}).construct; // MS Edge supports only 2 arguments and argumentsList argument is optional // FF Nightly sets third argument as `new.target`, but does not create `this` from it var NEW_TARGET_BUG = fails(function(){ function F(){} return !(rConstruct(function(){}, [], F) instanceof F); }); var ARGS_BUG = !fails(function(){ rConstruct(function(){}); }); $export($export.S + $export.F * (NEW_TARGET_BUG || ARGS_BUG), 'Reflect', { construct: function construct(Target, args /*, newTarget*/){ aFunction(Target); anObject(args); var newTarget = arguments.length < 3 ? Target : aFunction(arguments[2]); if(ARGS_BUG && !NEW_TARGET_BUG)return rConstruct(Target, args, newTarget); if(Target == newTarget){ // w/o altered newTarget, optimization for 0-4 arguments switch(args.length){ case 0: return new Target; case 1: return new Target(args[0]); case 2: return new Target(args[0], args[1]); case 3: return new Target(args[0], args[1], args[2]); case 4: return new Target(args[0], args[1], args[2], args[3]); } // w/o altered newTarget, lot of arguments case var $args = [null]; $args.push.apply($args, args); return new (bind.apply(Target, $args)); } // with altered newTarget, not support built-in constructors var proto = newTarget.prototype , instance = create(isObject(proto) ? proto : Object.prototype) , result = Function.apply.call(Target, instance, args); return isObject(result) ? result : instance; } }); /***/ }, /* 212 */ /***/ function(module, exports, __webpack_require__) { // 26.1.3 Reflect.defineProperty(target, propertyKey, attributes) var dP = __webpack_require__(9) , $export = __webpack_require__(6) , anObject = __webpack_require__(10) , toPrimitive = __webpack_require__(14); // MS Edge has broken Reflect.defineProperty - throwing instead of returning false $export($export.S + $export.F * __webpack_require__(5)(function(){ Reflect.defineProperty(dP.f({}, 1, {value: 1}), 1, {value: 2}); }), 'Reflect', { defineProperty: function defineProperty(target, propertyKey, attributes){ anObject(target); propertyKey = toPrimitive(propertyKey, true); anObject(attributes); try { dP.f(target, propertyKey, attributes); return true; } catch(e){ return false; } } }); /***/ }, /* 213 */ /***/ function(module, exports, __webpack_require__) { // 26.1.4 Reflect.deleteProperty(target, propertyKey) var $export = __webpack_require__(6) , gOPD = __webpack_require__(49).f , anObject = __webpack_require__(10); $export($export.S, 'Reflect', { deleteProperty: function deleteProperty(target, propertyKey){ var desc = gOPD(anObject(target), propertyKey); return desc && !desc.configurable ? false : delete target[propertyKey]; } }); /***/ }, /* 214 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; // 26.1.5 Reflect.enumerate(target) var $export = __webpack_require__(6) , anObject = __webpack_require__(10); var Enumerate = function(iterated){ this._t = anObject(iterated); // target this._i = 0; // next index var keys = this._k = [] // keys , key; for(key in iterated)keys.push(key); }; __webpack_require__(136)(Enumerate, 'Object', function(){ var that = this , keys = that._k , key; do { if(that._i >= keys.length)return {value: undefined, done: true}; } while(!((key = keys[that._i++]) in that._t)); return {value: key, done: false}; }); $export($export.S, 'Reflect', { enumerate: function enumerate(target){ return new Enumerate(target); } }); /***/ }, /* 215 */ /***/ function(module, exports, __webpack_require__) { // 26.1.6 Reflect.get(target, propertyKey [, receiver]) var gOPD = __webpack_require__(49) , getPrototypeOf = __webpack_require__(57) , has = __webpack_require__(3) , $export = __webpack_require__(6) , isObject = __webpack_require__(11) , anObject = __webpack_require__(10); function get(target, propertyKey/*, receiver*/){ var receiver = arguments.length < 3 ? target : arguments[2] , desc, proto; if(anObject(target) === receiver)return target[propertyKey]; if(desc = gOPD.f(target, propertyKey))return has(desc, 'value') ? desc.value : desc.get !== undefined ? desc.get.call(receiver) : undefined; if(isObject(proto = getPrototypeOf(target)))return get(proto, propertyKey, receiver); } $export($export.S, 'Reflect', {get: get}); /***/ }, /* 216 */ /***/ function(module, exports, __webpack_require__) { // 26.1.7 Reflect.getOwnPropertyDescriptor(target, propertyKey) var gOPD = __webpack_require__(49) , $export = __webpack_require__(6) , anObject = __webpack_require__(10); $export($export.S, 'Reflect', { getOwnPropertyDescriptor: function getOwnPropertyDescriptor(target, propertyKey){ return gOPD.f(anObject(target), propertyKey); } }); /***/ }, /* 217 */ /***/ function(module, exports, __webpack_require__) { // 26.1.8 Reflect.getPrototypeOf(target) var $export = __webpack_require__(6) , getProto = __webpack_require__(57) , anObject = __webpack_require__(10); $export($export.S, 'Reflect', { getPrototypeOf: function getPrototypeOf(target){ return getProto(anObject(target)); } }); /***/ }, /* 218 */ /***/ function(module, exports, __webpack_require__) { // 26.1.9 Reflect.has(target, propertyKey) var $export = __webpack_require__(6); $export($export.S, 'Reflect', { has: function has(target, propertyKey){ return propertyKey in target; } }); /***/ }, /* 219 */ /***/ function(module, exports, __webpack_require__) { // 26.1.10 Reflect.isExtensible(target) var $export = __webpack_require__(6) , anObject = __webpack_require__(10) , $isExtensible = Object.isExtensible; $export($export.S, 'Reflect', { isExtensible: function isExtensible(target){ anObject(target); return $isExtensible ? $isExtensible(target) : true; } }); /***/ }, /* 220 */ /***/ function(module, exports, __webpack_require__) { // 26.1.11 Reflect.ownKeys(target) var $export = __webpack_require__(6); $export($export.S, 'Reflect', {ownKeys: __webpack_require__(221)}); /***/ }, /* 221 */ /***/ function(module, exports, __webpack_require__) { // all object keys, includes non-enumerable and symbols var gOPN = __webpack_require__(48) , gOPS = __webpack_require__(41) , anObject = __webpack_require__(10) , Reflect = __webpack_require__(2).Reflect; module.exports = Reflect && Reflect.ownKeys || function ownKeys(it){ var keys = gOPN.f(anObject(it)) , getSymbols = gOPS.f; return getSymbols ? keys.concat(getSymbols(it)) : keys; }; /***/ }, /* 222 */ /***/ function(module, exports, __webpack_require__) { // 26.1.12 Reflect.preventExtensions(target) var $export = __webpack_require__(6) , anObject = __webpack_require__(10) , $preventExtensions = Object.preventExtensions; $export($export.S, 'Reflect', { preventExtensions: function preventExtensions(target){ anObject(target); try { if($preventExtensions)$preventExtensions(target); return true; } catch(e){ return false; } } }); /***/ }, /* 223 */ /***/ function(module, exports, __webpack_require__) { // 26.1.13 Reflect.set(target, propertyKey, V [, receiver]) var dP = __webpack_require__(9) , gOPD = __webpack_require__(49) , getPrototypeOf = __webpack_require__(57) , has = __webpack_require__(3) , $export = __webpack_require__(6) , createDesc = __webpack_require__(15) , anObject = __webpack_require__(10) , isObject = __webpack_require__(11); function set(target, propertyKey, V/*, receiver*/){ var receiver = arguments.length < 4 ? target : arguments[3] , ownDesc = gOPD.f(anObject(target), propertyKey) , existingDescriptor, proto; if(!ownDesc){ if(isObject(proto = getPrototypeOf(target))){ return set(proto, propertyKey, V, receiver); } ownDesc = createDesc(0); } if(has(ownDesc, 'value')){ if(ownDesc.writable === false || !isObject(receiver))return false; existingDescriptor = gOPD.f(receiver, propertyKey) || createDesc(0); existingDescriptor.value = V; dP.f(receiver, propertyKey, existingDescriptor); return true; } return ownDesc.set === undefined ? false : (ownDesc.set.call(receiver, V), true); } $export($export.S, 'Reflect', {set: set}); /***/ }, /* 224 */ /***/ function(module, exports, __webpack_require__) { // 26.1.14 Reflect.setPrototypeOf(target, proto) var $export = __webpack_require__(6) , setProto = __webpack_require__(71); if(setProto)$export($export.S, 'Reflect', { setPrototypeOf: function setPrototypeOf(target, proto){ setProto.check(target, proto); try { setProto.set(target, proto); return true; } catch(e){ return false; } } }); /***/ }, /* 225 */ /***/ function(module, exports, __webpack_require__) { // 20.3.3.1 / 15.9.4.4 Date.now() var $export = __webpack_require__(6); $export($export.S, 'Date', {now: function(){ return new Date().getTime(); }}); /***/ }, /* 226 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; var $export = __webpack_require__(6) , toObject = __webpack_require__(56) , toPrimitive = __webpack_require__(14); $export($export.P + $export.F * __webpack_require__(5)(function(){ return new Date(NaN).toJSON() !== null || Date.prototype.toJSON.call({toISOString: function(){ return 1; }}) !== 1; }), 'Date', { toJSON: function toJSON(key){ var O = toObject(this) , pv = toPrimitive(O); return typeof pv == 'number' && !isFinite(pv) ? null : O.toISOString(); } }); /***/ }, /* 227 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; // 20.3.4.36 / 15.9.5.43 Date.prototype.toISOString() var $export = __webpack_require__(6) , fails = __webpack_require__(5) , getTime = Date.prototype.getTime; var lz = function(num){ return num > 9 ? num : '0' + num; }; // PhantomJS / old WebKit has a broken implementations $export($export.P + $export.F * (fails(function(){ return new Date(-5e13 - 1).toISOString() != '0385-07-25T07:06:39.999Z'; }) || !fails(function(){ new Date(NaN).toISOString(); })), 'Date', { toISOString: function toISOString(){ if(!isFinite(getTime.call(this)))throw RangeError('Invalid time value'); var d = this , y = d.getUTCFullYear() , m = d.getUTCMilliseconds() , s = y < 0 ? '-' : y > 9999 ? '+' : ''; return s + ('00000' + Math.abs(y)).slice(s ? -6 : -4) + '-' + lz(d.getUTCMonth() + 1) + '-' + lz(d.getUTCDate()) + 'T' + lz(d.getUTCHours()) + ':' + lz(d.getUTCMinutes()) + ':' + lz(d.getUTCSeconds()) + '.' + (m > 99 ? m : '0' + lz(m)) + 'Z'; } }); /***/ }, /* 228 */ /***/ function(module, exports, __webpack_require__) { var DateProto = Date.prototype , INVALID_DATE = 'Invalid Date' , TO_STRING = 'toString' , $toString = DateProto[TO_STRING] , getTime = DateProto.getTime; if(new Date(NaN) + '' != INVALID_DATE){ __webpack_require__(16)(DateProto, TO_STRING, function toString(){ var value = getTime.call(this); return value === value ? $toString.call(this) : INVALID_DATE; }); } /***/ }, /* 229 */ /***/ function(module, exports, __webpack_require__) { var TO_PRIMITIVE = __webpack_require__(23)('toPrimitive') , proto = Date.prototype; if(!(TO_PRIMITIVE in proto))__webpack_require__(8)(proto, TO_PRIMITIVE, __webpack_require__(230)); /***/ }, /* 230 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; var anObject = __webpack_require__(10) , toPrimitive = __webpack_require__(14) , NUMBER = 'number'; module.exports = function(hint){ if(hint !== 'string' && hint !== NUMBER && hint !== 'default')throw TypeError('Incorrect hint'); return toPrimitive(anObject(this), hint != NUMBER); }; /***/ }, /* 231 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; var $export = __webpack_require__(6) , $typed = __webpack_require__(232) , buffer = __webpack_require__(233) , anObject = __webpack_require__(10) , toIndex = __webpack_require__(37) , toLength = __webpack_require__(35) , isObject = __webpack_require__(11) , ArrayBuffer = __webpack_require__(2).ArrayBuffer , speciesConstructor = __webpack_require__(199) , $ArrayBuffer = buffer.ArrayBuffer , $DataView = buffer.DataView , $isView = $typed.ABV && ArrayBuffer.isView , $slice = $ArrayBuffer.prototype.slice , VIEW = $typed.VIEW , ARRAY_BUFFER = 'ArrayBuffer'; $export($export.G + $export.W + $export.F * (ArrayBuffer !== $ArrayBuffer), {ArrayBuffer: $ArrayBuffer}); $export($export.S + $export.F * !$typed.CONSTR, ARRAY_BUFFER, { // 24.1.3.1 ArrayBuffer.isView(arg) isView: function isView(it){ return $isView && $isView(it) || isObject(it) && VIEW in it; } }); $export($export.P + $export.U + $export.F * __webpack_require__(5)(function(){ return !new $ArrayBuffer(2).slice(1, undefined).byteLength; }), ARRAY_BUFFER, { // 24.1.4.3 ArrayBuffer.prototype.slice(start, end) slice: function slice(start, end){ if($slice !== undefined && end === undefined)return $slice.call(anObject(this), start); // FF fix var len = anObject(this).byteLength , first = toIndex(start, len) , final = toIndex(end === undefined ? len : end, len) , result = new (speciesConstructor(this, $ArrayBuffer))(toLength(final - first)) , viewS = new $DataView(this) , viewT = new $DataView(result) , index = 0; while(first < final){ viewT.setUint8(index++, viewS.getUint8(first++)); } return result; } }); __webpack_require__(186)(ARRAY_BUFFER); /***/ }, /* 232 */ /***/ function(module, exports, __webpack_require__) { var global = __webpack_require__(2) , hide = __webpack_require__(8) , uid = __webpack_require__(17) , TYPED = uid('typed_array') , VIEW = uid('view') , ABV = !!(global.ArrayBuffer && global.DataView) , CONSTR = ABV , i = 0, l = 9, Typed; var TypedArrayConstructors = ( 'Int8Array,Uint8Array,Uint8ClampedArray,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array' ).split(','); while(i < l){ if(Typed = global[TypedArrayConstructors[i++]]){ hide(Typed.prototype, TYPED, true); hide(Typed.prototype, VIEW, true); } else CONSTR = false; } module.exports = { ABV: ABV, CONSTR: CONSTR, TYPED: TYPED, VIEW: VIEW }; /***/ }, /* 233 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; var global = __webpack_require__(2) , DESCRIPTORS = __webpack_require__(4) , LIBRARY = __webpack_require__(26) , $typed = __webpack_require__(232) , hide = __webpack_require__(8) , redefineAll = __webpack_require__(202) , fails = __webpack_require__(5) , anInstance = __webpack_require__(197) , toInteger = __webpack_require__(36) , toLength = __webpack_require__(35) , gOPN = __webpack_require__(48).f , dP = __webpack_require__(9).f , arrayFill = __webpack_require__(180) , setToStringTag = __webpack_require__(22) , ARRAY_BUFFER = 'ArrayBuffer' , DATA_VIEW = 'DataView' , PROTOTYPE = 'prototype' , WRONG_LENGTH = 'Wrong length!' , WRONG_INDEX = 'Wrong index!' , $ArrayBuffer = global[ARRAY_BUFFER] , $DataView = global[DATA_VIEW] , Math = global.Math , RangeError = global.RangeError , Infinity = global.Infinity , BaseBuffer = $ArrayBuffer , abs = Math.abs , pow = Math.pow , floor = Math.floor , log = Math.log , LN2 = Math.LN2 , BUFFER = 'buffer' , BYTE_LENGTH = 'byteLength' , BYTE_OFFSET = 'byteOffset' , $BUFFER = DESCRIPTORS ? '_b' : BUFFER , $LENGTH = DESCRIPTORS ? '_l' : BYTE_LENGTH , $OFFSET = DESCRIPTORS ? '_o' : BYTE_OFFSET; // IEEE754 conversions based on https://github.com/feross/ieee754 var packIEEE754 = function(value, mLen, nBytes){ var buffer = Array(nBytes) , eLen = nBytes * 8 - mLen - 1 , eMax = (1 << eLen) - 1 , eBias = eMax >> 1 , rt = mLen === 23 ? pow(2, -24) - pow(2, -77) : 0 , i = 0 , s = value < 0 || value === 0 && 1 / value < 0 ? 1 : 0 , e, m, c; value = abs(value) if(value != value || value === Infinity){ m = value != value ? 1 : 0; e = eMax; } else { e = floor(log(value) / LN2); if(value * (c = pow(2, -e)) < 1){ e--; c *= 2; } if(e + eBias >= 1){ value += rt / c; } else { value += rt * pow(2, 1 - eBias); } if(value * c >= 2){ e++; c /= 2; } if(e + eBias >= eMax){ m = 0; e = eMax; } else if(e + eBias >= 1){ m = (value * c - 1) * pow(2, mLen); e = e + eBias; } else { m = value * pow(2, eBias - 1) * pow(2, mLen); e = 0; } } for(; mLen >= 8; buffer[i++] = m & 255, m /= 256, mLen -= 8); e = e << mLen | m; eLen += mLen; for(; eLen > 0; buffer[i++] = e & 255, e /= 256, eLen -= 8); buffer[--i] |= s * 128; return buffer; }; var unpackIEEE754 = function(buffer, mLen, nBytes){ var eLen = nBytes * 8 - mLen - 1 , eMax = (1 << eLen) - 1 , eBias = eMax >> 1 , nBits = eLen - 7 , i = nBytes - 1 , s = buffer[i--] , e = s & 127 , m; s >>= 7; for(; nBits > 0; e = e * 256 + buffer[i], i--, nBits -= 8); m = e & (1 << -nBits) - 1; e >>= -nBits; nBits += mLen; for(; nBits > 0; m = m * 256 + buffer[i], i--, nBits -= 8); if(e === 0){ e = 1 - eBias; } else if(e === eMax){ return m ? NaN : s ? -Infinity : Infinity; } else { m = m + pow(2, mLen); e = e - eBias; } return (s ? -1 : 1) * m * pow(2, e - mLen); }; var unpackI32 = function(bytes){ return bytes[3] << 24 | bytes[2] << 16 | bytes[1] << 8 | bytes[0]; }; var packI8 = function(it){ return [it & 0xff]; }; var packI16 = function(it){ return [it & 0xff, it >> 8 & 0xff]; }; var packI32 = function(it){ return [it & 0xff, it >> 8 & 0xff, it >> 16 & 0xff, it >> 24 & 0xff]; }; var packF64 = function(it){ return packIEEE754(it, 52, 8); }; var packF32 = function(it){ return packIEEE754(it, 23, 4); }; var addGetter = function(C, key, internal){ dP(C[PROTOTYPE], key, {get: function(){ return this[internal]; }}); }; var get = function(view, bytes, index, isLittleEndian){ var numIndex = +index , intIndex = toInteger(numIndex); if(numIndex != intIndex || intIndex < 0 || intIndex + bytes > view[$LENGTH])throw RangeError(WRONG_INDEX); var store = view[$BUFFER]._b , start = intIndex + view[$OFFSET] , pack = store.slice(start, start + bytes); return isLittleEndian ? pack : pack.reverse(); }; var set = function(view, bytes, index, conversion, value, isLittleEndian){ var numIndex = +index , intIndex = toInteger(numIndex); if(numIndex != intIndex || intIndex < 0 || intIndex + bytes > view[$LENGTH])throw RangeError(WRONG_INDEX); var store = view[$BUFFER]._b , start = intIndex + view[$OFFSET] , pack = conversion(+value); for(var i = 0; i < bytes; i++)store[start + i] = pack[isLittleEndian ? i : bytes - i - 1]; }; var validateArrayBufferArguments = function(that, length){ anInstance(that, $ArrayBuffer, ARRAY_BUFFER); var numberLength = +length , byteLength = toLength(numberLength); if(numberLength != byteLength)throw RangeError(WRONG_LENGTH); return byteLength; }; if(!$typed.ABV){ $ArrayBuffer = function ArrayBuffer(length){ var byteLength = validateArrayBufferArguments(this, length); this._b = arrayFill.call(Array(byteLength), 0); this[$LENGTH] = byteLength; }; $DataView = function DataView(buffer, byteOffset, byteLength){ anInstance(this, $DataView, DATA_VIEW); anInstance(buffer, $ArrayBuffer, DATA_VIEW); var bufferLength = buffer[$LENGTH] , offset = toInteger(byteOffset); if(offset < 0 || offset > bufferLength)throw RangeError('Wrong offset!'); byteLength = byteLength === undefined ? bufferLength - offset : toLength(byteLength); if(offset + byteLength > bufferLength)throw RangeError(WRONG_LENGTH); this[$BUFFER] = buffer; this[$OFFSET] = offset; this[$LENGTH] = byteLength; }; if(DESCRIPTORS){ addGetter($ArrayBuffer, BYTE_LENGTH, '_l'); addGetter($DataView, BUFFER, '_b'); addGetter($DataView, BYTE_LENGTH, '_l'); addGetter($DataView, BYTE_OFFSET, '_o'); } redefineAll($DataView[PROTOTYPE], { getInt8: function getInt8(byteOffset){ return get(this, 1, byteOffset)[0] << 24 >> 24; }, getUint8: function getUint8(byteOffset){ return get(this, 1, byteOffset)[0]; }, getInt16: function getInt16(byteOffset /*, littleEndian */){ var bytes = get(this, 2, byteOffset, arguments[1]); return (bytes[1] << 8 | bytes[0]) << 16 >> 16; }, getUint16: function getUint16(byteOffset /*, littleEndian */){ var bytes = get(this, 2, byteOffset, arguments[1]); return bytes[1] << 8 | bytes[0]; }, getInt32: function getInt32(byteOffset /*, littleEndian */){ return unpackI32(get(this, 4, byteOffset, arguments[1])); }, getUint32: function getUint32(byteOffset /*, littleEndian */){ return unpackI32(get(this, 4, byteOffset, arguments[1])) >>> 0; }, getFloat32: function getFloat32(byteOffset /*, littleEndian */){ return unpackIEEE754(get(this, 4, byteOffset, arguments[1]), 23, 4); }, getFloat64: function getFloat64(byteOffset /*, littleEndian */){ return unpackIEEE754(get(this, 8, byteOffset, arguments[1]), 52, 8); }, setInt8: function setInt8(byteOffset, value){ set(this, 1, byteOffset, packI8, value); }, setUint8: function setUint8(byteOffset, value){ set(this, 1, byteOffset, packI8, value); }, setInt16: function setInt16(byteOffset, value /*, littleEndian */){ set(this, 2, byteOffset, packI16, value, arguments[2]); }, setUint16: function setUint16(byteOffset, value /*, littleEndian */){ set(this, 2, byteOffset, packI16, value, arguments[2]); }, setInt32: function setInt32(byteOffset, value /*, littleEndian */){ set(this, 4, byteOffset, packI32, value, arguments[2]); }, setUint32: function setUint32(byteOffset, value /*, littleEndian */){ set(this, 4, byteOffset, packI32, value, arguments[2]); }, setFloat32: function setFloat32(byteOffset, value /*, littleEndian */){ set(this, 4, byteOffset, packF32, value, arguments[2]); }, setFloat64: function setFloat64(byteOffset, value /*, littleEndian */){ set(this, 8, byteOffset, packF64, value, arguments[2]); } }); } else { if(!fails(function(){ new $ArrayBuffer; // eslint-disable-line no-new }) || !fails(function(){ new $ArrayBuffer(.5); // eslint-disable-line no-new })){ $ArrayBuffer = function ArrayBuffer(length){ return new BaseBuffer(validateArrayBufferArguments(this, length)); }; var ArrayBufferProto = $ArrayBuffer[PROTOTYPE] = BaseBuffer[PROTOTYPE]; for(var keys = gOPN(BaseBuffer), j = 0, key; keys.length > j; ){ if(!((key = keys[j++]) in $ArrayBuffer))hide($ArrayBuffer, key, BaseBuffer[key]); }; if(!LIBRARY)ArrayBufferProto.constructor = $ArrayBuffer; } // iOS Safari 7.x bug var view = new $DataView(new $ArrayBuffer(2)) , $setInt8 = $DataView[PROTOTYPE].setInt8; view.setInt8(0, 2147483648); view.setInt8(1, 2147483649); if(view.getInt8(0) || !view.getInt8(1))redefineAll($DataView[PROTOTYPE], { setInt8: function setInt8(byteOffset, value){ $setInt8.call(this, byteOffset, value << 24 >> 24); }, setUint8: function setUint8(byteOffset, value){ $setInt8.call(this, byteOffset, value << 24 >> 24); } }, true); } setToStringTag($ArrayBuffer, ARRAY_BUFFER); setToStringTag($DataView, DATA_VIEW); hide($DataView[PROTOTYPE], $typed.VIEW, true); exports[ARRAY_BUFFER] = $ArrayBuffer; exports[DATA_VIEW] = $DataView; /***/ }, /* 234 */ /***/ function(module, exports, __webpack_require__) { var $export = __webpack_require__(6); $export($export.G + $export.W + $export.F * !__webpack_require__(232).ABV, { DataView: __webpack_require__(233).DataView }); /***/ }, /* 235 */ /***/ function(module, exports, __webpack_require__) { __webpack_require__(236)('Int8', 1, function(init){ return function Int8Array(data, byteOffset, length){ return init(this, data, byteOffset, length); }; }); /***/ }, /* 236 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; if(__webpack_require__(4)){ var LIBRARY = __webpack_require__(26) , global = __webpack_require__(2) , fails = __webpack_require__(5) , $export = __webpack_require__(6) , $typed = __webpack_require__(232) , $buffer = __webpack_require__(233) , ctx = __webpack_require__(18) , anInstance = __webpack_require__(197) , propertyDesc = __webpack_require__(15) , hide = __webpack_require__(8) , redefineAll = __webpack_require__(202) , toInteger = __webpack_require__(36) , toLength = __webpack_require__(35) , toIndex = __webpack_require__(37) , toPrimitive = __webpack_require__(14) , has = __webpack_require__(3) , same = __webpack_require__(69) , classof = __webpack_require__(73) , isObject = __webpack_require__(11) , toObject = __webpack_require__(56) , isArrayIter = __webpack_require__(154) , create = __webpack_require__(44) , getPrototypeOf = __webpack_require__(57) , gOPN = __webpack_require__(48).f , getIterFn = __webpack_require__(156) , uid = __webpack_require__(17) , wks = __webpack_require__(23) , createArrayMethod = __webpack_require__(164) , createArrayIncludes = __webpack_require__(34) , speciesConstructor = __webpack_require__(199) , ArrayIterators = __webpack_require__(183) , Iterators = __webpack_require__(135) , $iterDetect = __webpack_require__(157) , setSpecies = __webpack_require__(186) , arrayFill = __webpack_require__(180) , arrayCopyWithin = __webpack_require__(177) , $DP = __webpack_require__(9) , $GOPD = __webpack_require__(49) , dP = $DP.f , gOPD = $GOPD.f , RangeError = global.RangeError , TypeError = global.TypeError , Uint8Array = global.Uint8Array , ARRAY_BUFFER = 'ArrayBuffer' , SHARED_BUFFER = 'Shared' + ARRAY_BUFFER , BYTES_PER_ELEMENT = 'BYTES_PER_ELEMENT' , PROTOTYPE = 'prototype' , ArrayProto = Array[PROTOTYPE] , $ArrayBuffer = $buffer.ArrayBuffer , $DataView = $buffer.DataView , arrayForEach = createArrayMethod(0) , arrayFilter = createArrayMethod(2) , arraySome = createArrayMethod(3) , arrayEvery = createArrayMethod(4) , arrayFind = createArrayMethod(5) , arrayFindIndex = createArrayMethod(6) , arrayIncludes = createArrayIncludes(true) , arrayIndexOf = createArrayIncludes(false) , arrayValues = ArrayIterators.values , arrayKeys = ArrayIterators.keys , arrayEntries = ArrayIterators.entries , arrayLastIndexOf = ArrayProto.lastIndexOf , arrayReduce = ArrayProto.reduce , arrayReduceRight = ArrayProto.reduceRight , arrayJoin = ArrayProto.join , arraySort = ArrayProto.sort , arraySlice = ArrayProto.slice , arrayToString = ArrayProto.toString , arrayToLocaleString = ArrayProto.toLocaleString , ITERATOR = wks('iterator') , TAG = wks('toStringTag') , TYPED_CONSTRUCTOR = uid('typed_constructor') , DEF_CONSTRUCTOR = uid('def_constructor') , ALL_CONSTRUCTORS = $typed.CONSTR , TYPED_ARRAY = $typed.TYPED , VIEW = $typed.VIEW , WRONG_LENGTH = 'Wrong length!'; var $map = createArrayMethod(1, function(O, length){ return allocate(speciesConstructor(O, O[DEF_CONSTRUCTOR]), length); }); var LITTLE_ENDIAN = fails(function(){ return new Uint8Array(new Uint16Array([1]).buffer)[0] === 1; }); var FORCED_SET = !!Uint8Array && !!Uint8Array[PROTOTYPE].set && fails(function(){ new Uint8Array(1).set({}); }); var strictToLength = function(it, SAME){ if(it === undefined)throw TypeError(WRONG_LENGTH); var number = +it , length = toLength(it); if(SAME && !same(number, length))throw RangeError(WRONG_LENGTH); return length; }; var toOffset = function(it, BYTES){ var offset = toInteger(it); if(offset < 0 || offset % BYTES)throw RangeError('Wrong offset!'); return offset; }; var validate = function(it){ if(isObject(it) && TYPED_ARRAY in it)return it; throw TypeError(it + ' is not a typed array!'); }; var allocate = function(C, length){ if(!(isObject(C) && TYPED_CONSTRUCTOR in C)){ throw TypeError('It is not a typed array constructor!'); } return new C(length); }; var speciesFromList = function(O, list){ return fromList(speciesConstructor(O, O[DEF_CONSTRUCTOR]), list); }; var fromList = function(C, list){ var index = 0 , length = list.length , result = allocate(C, length); while(length > index)result[index] = list[index++]; return result; }; var addGetter = function(it, key, internal){ dP(it, key, {get: function(){ return this._d[internal]; }}); }; var $from = function from(source /*, mapfn, thisArg */){ var O = toObject(source) , aLen = arguments.length , mapfn = aLen > 1 ? arguments[1] : undefined , mapping = mapfn !== undefined , iterFn = getIterFn(O) , i, length, values, result, step, iterator; if(iterFn != undefined && !isArrayIter(iterFn)){ for(iterator = iterFn.call(O), values = [], i = 0; !(step = iterator.next()).done; i++){ values.push(step.value); } O = values; } if(mapping && aLen > 2)mapfn = ctx(mapfn, arguments[2], 2); for(i = 0, length = toLength(O.length), result = allocate(this, length); length > i; i++){ result[i] = mapping ? mapfn(O[i], i) : O[i]; } return result; }; var $of = function of(/*...items*/){ var index = 0 , length = arguments.length , result = allocate(this, length); while(length > index)result[index] = arguments[index++]; return result; }; // iOS Safari 6.x fails here var TO_LOCALE_BUG = !!Uint8Array && fails(function(){ arrayToLocaleString.call(new Uint8Array(1)); }); var $toLocaleString = function toLocaleString(){ return arrayToLocaleString.apply(TO_LOCALE_BUG ? arraySlice.call(validate(this)) : validate(this), arguments); }; var proto = { copyWithin: function copyWithin(target, start /*, end */){ return arrayCopyWithin.call(validate(this), target, start, arguments.length > 2 ? arguments[2] : undefined); }, every: function every(callbackfn /*, thisArg */){ return arrayEvery(validate(this), callbackfn, arguments.length > 1 ? arguments[1] : undefined); }, fill: function fill(value /*, start, end */){ // eslint-disable-line no-unused-vars return arrayFill.apply(validate(this), arguments); }, filter: function filter(callbackfn /*, thisArg */){ return speciesFromList(this, arrayFilter(validate(this), callbackfn, arguments.length > 1 ? arguments[1] : undefined)); }, find: function find(predicate /*, thisArg */){ return arrayFind(validate(this), predicate, arguments.length > 1 ? arguments[1] : undefined); }, findIndex: function findIndex(predicate /*, thisArg */){ return arrayFindIndex(validate(this), predicate, arguments.length > 1 ? arguments[1] : undefined); }, forEach: function forEach(callbackfn /*, thisArg */){ arrayForEach(validate(this), callbackfn, arguments.length > 1 ? arguments[1] : undefined); }, indexOf: function indexOf(searchElement /*, fromIndex */){ return arrayIndexOf(validate(this), searchElement, arguments.length > 1 ? arguments[1] : undefined); }, includes: function includes(searchElement /*, fromIndex */){ return arrayIncludes(validate(this), searchElement, arguments.length > 1 ? arguments[1] : undefined); }, join: function join(separator){ // eslint-disable-line no-unused-vars return arrayJoin.apply(validate(this), arguments); }, lastIndexOf: function lastIndexOf(searchElement /*, fromIndex */){ // eslint-disable-line no-unused-vars return arrayLastIndexOf.apply(validate(this), arguments); }, map: function map(mapfn /*, thisArg */){ return $map(validate(this), mapfn, arguments.length > 1 ? arguments[1] : undefined); }, reduce: function reduce(callbackfn /*, initialValue */){ // eslint-disable-line no-unused-vars return arrayReduce.apply(validate(this), arguments); }, reduceRight: function reduceRight(callbackfn /*, initialValue */){ // eslint-disable-line no-unused-vars return arrayReduceRight.apply(validate(this), arguments); }, reverse: function reverse(){ var that = this , length = validate(that).length , middle = Math.floor(length / 2) , index = 0 , value; while(index < middle){ value = that[index]; that[index++] = that[--length]; that[length] = value; } return that; }, some: function some(callbackfn /*, thisArg */){ return arraySome(validate(this), callbackfn, arguments.length > 1 ? arguments[1] : undefined); }, sort: function sort(comparefn){ return arraySort.call(validate(this), comparefn); }, subarray: function subarray(begin, end){ var O = validate(this) , length = O.length , $begin = toIndex(begin, length); return new (speciesConstructor(O, O[DEF_CONSTRUCTOR]))( O.buffer, O.byteOffset + $begin * O.BYTES_PER_ELEMENT, toLength((end === undefined ? length : toIndex(end, length)) - $begin) ); } }; var $slice = function slice(start, end){ return speciesFromList(this, arraySlice.call(validate(this), start, end)); }; var $set = function set(arrayLike /*, offset */){ validate(this); var offset = toOffset(arguments[1], 1) , length = this.length , src = toObject(arrayLike) , len = toLength(src.length) , index = 0; if(len + offset > length)throw RangeError(WRONG_LENGTH); while(index < len)this[offset + index] = src[index++]; }; var $iterators = { entries: function entries(){ return arrayEntries.call(validate(this)); }, keys: function keys(){ return arrayKeys.call(validate(this)); }, values: function values(){ return arrayValues.call(validate(this)); } }; var isTAIndex = function(target, key){ return isObject(target) && target[TYPED_ARRAY] && typeof key != 'symbol' && key in target && String(+key) == String(key); }; var $getDesc = function getOwnPropertyDescriptor(target, key){ return isTAIndex(target, key = toPrimitive(key, true)) ? propertyDesc(2, target[key]) : gOPD(target, key); }; var $setDesc = function defineProperty(target, key, desc){ if(isTAIndex(target, key = toPrimitive(key, true)) && isObject(desc) && has(desc, 'value') && !has(desc, 'get') && !has(desc, 'set') // TODO: add validation descriptor w/o calling accessors && !desc.configurable && (!has(desc, 'writable') || desc.writable) && (!has(desc, 'enumerable') || desc.enumerable) ){ target[key] = desc.value; return target; } else return dP(target, key, desc); }; if(!ALL_CONSTRUCTORS){ $GOPD.f = $getDesc; $DP.f = $setDesc; } $export($export.S + $export.F * !ALL_CONSTRUCTORS, 'Object', { getOwnPropertyDescriptor: $getDesc, defineProperty: $setDesc }); if(fails(function(){ arrayToString.call({}); })){ arrayToString = arrayToLocaleString = function toString(){ return arrayJoin.call(this); } } var $TypedArrayPrototype$ = redefineAll({}, proto); redefineAll($TypedArrayPrototype$, $iterators); hide($TypedArrayPrototype$, ITERATOR, $iterators.values); redefineAll($TypedArrayPrototype$, { slice: $slice, set: $set, constructor: function(){ /* noop */ }, toString: arrayToString, toLocaleString: $toLocaleString }); addGetter($TypedArrayPrototype$, 'buffer', 'b'); addGetter($TypedArrayPrototype$, 'byteOffset', 'o'); addGetter($TypedArrayPrototype$, 'byteLength', 'l'); addGetter($TypedArrayPrototype$, 'length', 'e'); dP($TypedArrayPrototype$, TAG, { get: function(){ return this[TYPED_ARRAY]; } }); module.exports = function(KEY, BYTES, wrapper, CLAMPED){ CLAMPED = !!CLAMPED; var NAME = KEY + (CLAMPED ? 'Clamped' : '') + 'Array' , ISNT_UINT8 = NAME != 'Uint8Array' , GETTER = 'get' + KEY , SETTER = 'set' + KEY , TypedArray = global[NAME] , Base = TypedArray || {} , TAC = TypedArray && getPrototypeOf(TypedArray) , FORCED = !TypedArray || !$typed.ABV , O = {} , TypedArrayPrototype = TypedArray && TypedArray[PROTOTYPE]; var getter = function(that, index){ var data = that._d; return data.v[GETTER](index * BYTES + data.o, LITTLE_ENDIAN); }; var setter = function(that, index, value){ var data = that._d; if(CLAMPED)value = (value = Math.round(value)) < 0 ? 0 : value > 0xff ? 0xff : value & 0xff; data.v[SETTER](index * BYTES + data.o, value, LITTLE_ENDIAN); }; var addElement = function(that, index){ dP(that, index, { get: function(){ return getter(this, index); }, set: function(value){ return setter(this, index, value); }, enumerable: true }); }; if(FORCED){ TypedArray = wrapper(function(that, data, $offset, $length){ anInstance(that, TypedArray, NAME, '_d'); var index = 0 , offset = 0 , buffer, byteLength, length, klass; if(!isObject(data)){ length = strictToLength(data, true) byteLength = length * BYTES; buffer = new $ArrayBuffer(byteLength); } else if(data instanceof $ArrayBuffer || (klass = classof(data)) == ARRAY_BUFFER || klass == SHARED_BUFFER){ buffer = data; offset = toOffset($offset, BYTES); var $len = data.byteLength; if($length === undefined){ if($len % BYTES)throw RangeError(WRONG_LENGTH); byteLength = $len - offset; if(byteLength < 0)throw RangeError(WRONG_LENGTH); } else { byteLength = toLength($length) * BYTES; if(byteLength + offset > $len)throw RangeError(WRONG_LENGTH); } length = byteLength / BYTES; } else if(TYPED_ARRAY in data){ return fromList(TypedArray, data); } else { return $from.call(TypedArray, data); } hide(that, '_d', { b: buffer, o: offset, l: byteLength, e: length, v: new $DataView(buffer) }); while(index < length)addElement(that, index++); }); TypedArrayPrototype = TypedArray[PROTOTYPE] = create($TypedArrayPrototype$); hide(TypedArrayPrototype, 'constructor', TypedArray); } else if(!$iterDetect(function(iter){ // V8 works with iterators, but fails in many other cases // https://code.google.com/p/v8/issues/detail?id=4552 new TypedArray(null); // eslint-disable-line no-new new TypedArray(iter); // eslint-disable-line no-new }, true)){ TypedArray = wrapper(function(that, data, $offset, $length){ anInstance(that, TypedArray, NAME); var klass; // `ws` module bug, temporarily remove validation length for Uint8Array // https://github.com/websockets/ws/pull/645 if(!isObject(data))return new Base(strictToLength(data, ISNT_UINT8)); if(data instanceof $ArrayBuffer || (klass = classof(data)) == ARRAY_BUFFER || klass == SHARED_BUFFER){ return $length !== undefined ? new Base(data, toOffset($offset, BYTES), $length) : $offset !== undefined ? new Base(data, toOffset($offset, BYTES)) : new Base(data); } if(TYPED_ARRAY in data)return fromList(TypedArray, data); return $from.call(TypedArray, data); }); arrayForEach(TAC !== Function.prototype ? gOPN(Base).concat(gOPN(TAC)) : gOPN(Base), function(key){ if(!(key in TypedArray))hide(TypedArray, key, Base[key]); }); TypedArray[PROTOTYPE] = TypedArrayPrototype; if(!LIBRARY)TypedArrayPrototype.constructor = TypedArray; } var $nativeIterator = TypedArrayPrototype[ITERATOR] , CORRECT_ITER_NAME = !!$nativeIterator && ($nativeIterator.name == 'values' || $nativeIterator.name == undefined) , $iterator = $iterators.values; hide(TypedArray, TYPED_CONSTRUCTOR, true); hide(TypedArrayPrototype, TYPED_ARRAY, NAME); hide(TypedArrayPrototype, VIEW, true); hide(TypedArrayPrototype, DEF_CONSTRUCTOR, TypedArray); if(CLAMPED ? new TypedArray(1)[TAG] != NAME : !(TAG in TypedArrayPrototype)){ dP(TypedArrayPrototype, TAG, { get: function(){ return NAME; } }); } O[NAME] = TypedArray; $export($export.G + $export.W + $export.F * (TypedArray != Base), O); $export($export.S, NAME, { BYTES_PER_ELEMENT: BYTES, from: $from, of: $of }); if(!(BYTES_PER_ELEMENT in TypedArrayPrototype))hide(TypedArrayPrototype, BYTES_PER_ELEMENT, BYTES); $export($export.P, NAME, proto); setSpecies(NAME); $export($export.P + $export.F * FORCED_SET, NAME, {set: $set}); $export($export.P + $export.F * !CORRECT_ITER_NAME, NAME, $iterators); $export($export.P + $export.F * (TypedArrayPrototype.toString != arrayToString), NAME, {toString: arrayToString}); $export($export.P + $export.F * fails(function(){ new TypedArray(1).slice(); }), NAME, {slice: $slice}); $export($export.P + $export.F * (fails(function(){ return [1, 2].toLocaleString() != new TypedArray([1, 2]).toLocaleString() }) || !fails(function(){ TypedArrayPrototype.toLocaleString.call([1, 2]); })), NAME, {toLocaleString: $toLocaleString}); Iterators[NAME] = CORRECT_ITER_NAME ? $nativeIterator : $iterator; if(!LIBRARY && !CORRECT_ITER_NAME)hide(TypedArrayPrototype, ITERATOR, $iterator); }; } else module.exports = function(){ /* empty */ }; /***/ }, /* 237 */ /***/ function(module, exports, __webpack_require__) { __webpack_require__(236)('Uint8', 1, function(init){ return function Uint8Array(data, byteOffset, length){ return init(this, data, byteOffset, length); }; }); /***/ }, /* 238 */ /***/ function(module, exports, __webpack_require__) { __webpack_require__(236)('Uint8', 1, function(init){ return function Uint8ClampedArray(data, byteOffset, length){ return init(this, data, byteOffset, length); }; }, true); /***/ }, /* 239 */ /***/ function(module, exports, __webpack_require__) { __webpack_require__(236)('Int16', 2, function(init){ return function Int16Array(data, byteOffset, length){ return init(this, data, byteOffset, length); }; }); /***/ }, /* 240 */ /***/ function(module, exports, __webpack_require__) { __webpack_require__(236)('Uint16', 2, function(init){ return function Uint16Array(data, byteOffset, length){ return init(this, data, byteOffset, length); }; }); /***/ }, /* 241 */ /***/ function(module, exports, __webpack_require__) { __webpack_require__(236)('Int32', 4, function(init){ return function Int32Array(data, byteOffset, length){ return init(this, data, byteOffset, length); }; }); /***/ }, /* 242 */ /***/ function(module, exports, __webpack_require__) { __webpack_require__(236)('Uint32', 4, function(init){ return function Uint32Array(data, byteOffset, length){ return init(this, data, byteOffset, length); }; }); /***/ }, /* 243 */ /***/ function(module, exports, __webpack_require__) { __webpack_require__(236)('Float32', 4, function(init){ return function Float32Array(data, byteOffset, length){ return init(this, data, byteOffset, length); }; }); /***/ }, /* 244 */ /***/ function(module, exports, __webpack_require__) { __webpack_require__(236)('Float64', 8, function(init){ return function Float64Array(data, byteOffset, length){ return init(this, data, byteOffset, length); }; }); /***/ }, /* 245 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; // https://github.com/tc39/Array.prototype.includes var $export = __webpack_require__(6) , $includes = __webpack_require__(34)(true); $export($export.P, 'Array', { includes: function includes(el /*, fromIndex = 0 */){ return $includes(this, el, arguments.length > 1 ? arguments[1] : undefined); } }); __webpack_require__(178)('includes'); /***/ }, /* 246 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; // https://github.com/mathiasbynens/String.prototype.at var $export = __webpack_require__(6) , $at = __webpack_require__(125)(true); $export($export.P, 'String', { at: function at(pos){ return $at(this, pos); } }); /***/ }, /* 247 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; // https://github.com/tc39/proposal-string-pad-start-end var $export = __webpack_require__(6) , $pad = __webpack_require__(248); $export($export.P, 'String', { padStart: function padStart(maxLength /*, fillString = ' ' */){ return $pad(this, maxLength, arguments.length > 1 ? arguments[1] : undefined, true); } }); /***/ }, /* 248 */ /***/ function(module, exports, __webpack_require__) { // https://github.com/tc39/proposal-string-pad-start-end var toLength = __webpack_require__(35) , repeat = __webpack_require__(85) , defined = __webpack_require__(33); module.exports = function(that, maxLength, fillString, left){ var S = String(defined(that)) , stringLength = S.length , fillStr = fillString === undefined ? ' ' : String(fillString) , intMaxLength = toLength(maxLength); if(intMaxLength <= stringLength || fillStr == '')return S; var fillLen = intMaxLength - stringLength , stringFiller = repeat.call(fillStr, Math.ceil(fillLen / fillStr.length)); if(stringFiller.length > fillLen)stringFiller = stringFiller.slice(0, fillLen); return left ? stringFiller + S : S + stringFiller; }; /***/ }, /* 249 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; // https://github.com/tc39/proposal-string-pad-start-end var $export = __webpack_require__(6) , $pad = __webpack_require__(248); $export($export.P, 'String', { padEnd: function padEnd(maxLength /*, fillString = ' ' */){ return $pad(this, maxLength, arguments.length > 1 ? arguments[1] : undefined, false); } }); /***/ }, /* 250 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; // https://github.com/sebmarkbage/ecmascript-string-left-right-trim __webpack_require__(81)('trimLeft', function($trim){ return function trimLeft(){ return $trim(this, 1); }; }, 'trimStart'); /***/ }, /* 251 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; // https://github.com/sebmarkbage/ecmascript-string-left-right-trim __webpack_require__(81)('trimRight', function($trim){ return function trimRight(){ return $trim(this, 2); }; }, 'trimEnd'); /***/ }, /* 252 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; // https://tc39.github.io/String.prototype.matchAll/ var $export = __webpack_require__(6) , defined = __webpack_require__(33) , toLength = __webpack_require__(35) , isRegExp = __webpack_require__(128) , getFlags = __webpack_require__(188) , RegExpProto = RegExp.prototype; var $RegExpStringIterator = function(regexp, string){ this._r = regexp; this._s = string; }; __webpack_require__(136)($RegExpStringIterator, 'RegExp String', function next(){ var match = this._r.exec(this._s); return {value: match, done: match === null}; }); $export($export.P, 'String', { matchAll: function matchAll(regexp){ defined(this); if(!isRegExp(regexp))throw TypeError(regexp + ' is not a regexp!'); var S = String(this) , flags = 'flags' in RegExpProto ? String(regexp.flags) : getFlags.call(regexp) , rx = new RegExp(regexp.source, ~flags.indexOf('g') ? flags : 'g' + flags); rx.lastIndex = toLength(regexp.lastIndex); return new $RegExpStringIterator(rx, S); } }); /***/ }, /* 253 */ /***/ function(module, exports, __webpack_require__) { __webpack_require__(25)('asyncIterator'); /***/ }, /* 254 */ /***/ function(module, exports, __webpack_require__) { __webpack_require__(25)('observable'); /***/ }, /* 255 */ /***/ function(module, exports, __webpack_require__) { // https://github.com/tc39/proposal-object-getownpropertydescriptors var $export = __webpack_require__(6) , ownKeys = __webpack_require__(221) , toIObject = __webpack_require__(30) , gOPD = __webpack_require__(49) , createProperty = __webpack_require__(155); $export($export.S, 'Object', { getOwnPropertyDescriptors: function getOwnPropertyDescriptors(object){ var O = toIObject(object) , getDesc = gOPD.f , keys = ownKeys(O) , result = {} , i = 0 , key; while(keys.length > i)createProperty(result, key = keys[i++], getDesc(O, key)); return result; } }); /***/ }, /* 256 */ /***/ function(module, exports, __webpack_require__) { // https://github.com/tc39/proposal-object-values-entries var $export = __webpack_require__(6) , $values = __webpack_require__(257)(false); $export($export.S, 'Object', { values: function values(it){ return $values(it); } }); /***/ }, /* 257 */ /***/ function(module, exports, __webpack_require__) { var getKeys = __webpack_require__(28) , toIObject = __webpack_require__(30) , isEnum = __webpack_require__(42).f; module.exports = function(isEntries){ return function(it){ var O = toIObject(it) , keys = getKeys(O) , length = keys.length , i = 0 , result = [] , key; while(length > i)if(isEnum.call(O, key = keys[i++])){ result.push(isEntries ? [key, O[key]] : O[key]); } return result; }; }; /***/ }, /* 258 */ /***/ function(module, exports, __webpack_require__) { // https://github.com/tc39/proposal-object-values-entries var $export = __webpack_require__(6) , $entries = __webpack_require__(257)(true); $export($export.S, 'Object', { entries: function entries(it){ return $entries(it); } }); /***/ }, /* 259 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; var $export = __webpack_require__(6) , toObject = __webpack_require__(56) , aFunction = __webpack_require__(19) , $defineProperty = __webpack_require__(9); // B.2.2.2 Object.prototype.__defineGetter__(P, getter) __webpack_require__(4) && $export($export.P + __webpack_require__(260), 'Object', { __defineGetter__: function __defineGetter__(P, getter){ $defineProperty.f(toObject(this), P, {get: aFunction(getter), enumerable: true, configurable: true}); } }); /***/ }, /* 260 */ /***/ function(module, exports, __webpack_require__) { // Forced replacement prototype accessors methods module.exports = __webpack_require__(26)|| !__webpack_require__(5)(function(){ var K = Math.random(); // In FF throws only define methods __defineSetter__.call(null, K, function(){ /* empty */}); delete __webpack_require__(2)[K]; }); /***/ }, /* 261 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; var $export = __webpack_require__(6) , toObject = __webpack_require__(56) , aFunction = __webpack_require__(19) , $defineProperty = __webpack_require__(9); // B.2.2.3 Object.prototype.__defineSetter__(P, setter) __webpack_require__(4) && $export($export.P + __webpack_require__(260), 'Object', { __defineSetter__: function __defineSetter__(P, setter){ $defineProperty.f(toObject(this), P, {set: aFunction(setter), enumerable: true, configurable: true}); } }); /***/ }, /* 262 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; var $export = __webpack_require__(6) , toObject = __webpack_require__(56) , toPrimitive = __webpack_require__(14) , getPrototypeOf = __webpack_require__(57) , getOwnPropertyDescriptor = __webpack_require__(49).f; // B.2.2.4 Object.prototype.__lookupGetter__(P) __webpack_require__(4) && $export($export.P + __webpack_require__(260), 'Object', { __lookupGetter__: function __lookupGetter__(P){ var O = toObject(this) , K = toPrimitive(P, true) , D; do { if(D = getOwnPropertyDescriptor(O, K))return D.get; } while(O = getPrototypeOf(O)); } }); /***/ }, /* 263 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; var $export = __webpack_require__(6) , toObject = __webpack_require__(56) , toPrimitive = __webpack_require__(14) , getPrototypeOf = __webpack_require__(57) , getOwnPropertyDescriptor = __webpack_require__(49).f; // B.2.2.5 Object.prototype.__lookupSetter__(P) __webpack_require__(4) && $export($export.P + __webpack_require__(260), 'Object', { __lookupSetter__: function __lookupSetter__(P){ var O = toObject(this) , K = toPrimitive(P, true) , D; do { if(D = getOwnPropertyDescriptor(O, K))return D.set; } while(O = getPrototypeOf(O)); } }); /***/ }, /* 264 */ /***/ function(module, exports, __webpack_require__) { // https://github.com/DavidBruant/Map-Set.prototype.toJSON var $export = __webpack_require__(6); $export($export.P + $export.R, 'Map', {toJSON: __webpack_require__(265)('Map')}); /***/ }, /* 265 */ /***/ function(module, exports, __webpack_require__) { // https://github.com/DavidBruant/Map-Set.prototype.toJSON var classof = __webpack_require__(73) , from = __webpack_require__(266); module.exports = function(NAME){ return function toJSON(){ if(classof(this) != NAME)throw TypeError(NAME + "#toJSON isn't generic"); return from(this); }; }; /***/ }, /* 266 */ /***/ function(module, exports, __webpack_require__) { var forOf = __webpack_require__(198); module.exports = function(iter, ITERATOR){ var result = []; forOf(iter, false, result.push, result, ITERATOR); return result; }; /***/ }, /* 267 */ /***/ function(module, exports, __webpack_require__) { // https://github.com/DavidBruant/Map-Set.prototype.toJSON var $export = __webpack_require__(6); $export($export.P + $export.R, 'Set', {toJSON: __webpack_require__(265)('Set')}); /***/ }, /* 268 */ /***/ function(module, exports, __webpack_require__) { // https://github.com/ljharb/proposal-global var $export = __webpack_require__(6); $export($export.S, 'System', {global: __webpack_require__(2)}); /***/ }, /* 269 */ /***/ function(module, exports, __webpack_require__) { // https://github.com/ljharb/proposal-is-error var $export = __webpack_require__(6) , cof = __webpack_require__(32); $export($export.S, 'Error', { isError: function isError(it){ return cof(it) === 'Error'; } }); /***/ }, /* 270 */ /***/ function(module, exports, __webpack_require__) { // https://gist.github.com/BrendanEich/4294d5c212a6d2254703 var $export = __webpack_require__(6); $export($export.S, 'Math', { iaddh: function iaddh(x0, x1, y0, y1){ var $x0 = x0 >>> 0 , $x1 = x1 >>> 0 , $y0 = y0 >>> 0; return $x1 + (y1 >>> 0) + (($x0 & $y0 | ($x0 | $y0) & ~($x0 + $y0 >>> 0)) >>> 31) | 0; } }); /***/ }, /* 271 */ /***/ function(module, exports, __webpack_require__) { // https://gist.github.com/BrendanEich/4294d5c212a6d2254703 var $export = __webpack_require__(6); $export($export.S, 'Math', { isubh: function isubh(x0, x1, y0, y1){ var $x0 = x0 >>> 0 , $x1 = x1 >>> 0 , $y0 = y0 >>> 0; return $x1 - (y1 >>> 0) - ((~$x0 & $y0 | ~($x0 ^ $y0) & $x0 - $y0 >>> 0) >>> 31) | 0; } }); /***/ }, /* 272 */ /***/ function(module, exports, __webpack_require__) { // https://gist.github.com/BrendanEich/4294d5c212a6d2254703 var $export = __webpack_require__(6); $export($export.S, 'Math', { imulh: function imulh(u, v){ var UINT16 = 0xffff , $u = +u , $v = +v , u0 = $u & UINT16 , v0 = $v & UINT16 , u1 = $u >> 16 , v1 = $v >> 16 , t = (u1 * v0 >>> 0) + (u0 * v0 >>> 16); return u1 * v1 + (t >> 16) + ((u0 * v1 >>> 0) + (t & UINT16) >> 16); } }); /***/ }, /* 273 */ /***/ function(module, exports, __webpack_require__) { // https://gist.github.com/BrendanEich/4294d5c212a6d2254703 var $export = __webpack_require__(6); $export($export.S, 'Math', { umulh: function umulh(u, v){ var UINT16 = 0xffff , $u = +u , $v = +v , u0 = $u & UINT16 , v0 = $v & UINT16 , u1 = $u >>> 16 , v1 = $v >>> 16 , t = (u1 * v0 >>> 0) + (u0 * v0 >>> 16); return u1 * v1 + (t >>> 16) + ((u0 * v1 >>> 0) + (t & UINT16) >>> 16); } }); /***/ }, /* 274 */ /***/ function(module, exports, __webpack_require__) { var metadata = __webpack_require__(275) , anObject = __webpack_require__(10) , toMetaKey = metadata.key , ordinaryDefineOwnMetadata = metadata.set; metadata.exp({defineMetadata: function defineMetadata(metadataKey, metadataValue, target, targetKey){ ordinaryDefineOwnMetadata(metadataKey, metadataValue, anObject(target), toMetaKey(targetKey)); }}); /***/ }, /* 275 */ /***/ function(module, exports, __webpack_require__) { var Map = __webpack_require__(203) , $export = __webpack_require__(6) , shared = __webpack_require__(21)('metadata') , store = shared.store || (shared.store = new (__webpack_require__(207))); var getOrCreateMetadataMap = function(target, targetKey, create){ var targetMetadata = store.get(target); if(!targetMetadata){ if(!create)return undefined; store.set(target, targetMetadata = new Map); } var keyMetadata = targetMetadata.get(targetKey); if(!keyMetadata){ if(!create)return undefined; targetMetadata.set(targetKey, keyMetadata = new Map); } return keyMetadata; }; var ordinaryHasOwnMetadata = function(MetadataKey, O, P){ var metadataMap = getOrCreateMetadataMap(O, P, false); return metadataMap === undefined ? false : metadataMap.has(MetadataKey); }; var ordinaryGetOwnMetadata = function(MetadataKey, O, P){ var metadataMap = getOrCreateMetadataMap(O, P, false); return metadataMap === undefined ? undefined : metadataMap.get(MetadataKey); }; var ordinaryDefineOwnMetadata = function(MetadataKey, MetadataValue, O, P){ getOrCreateMetadataMap(O, P, true).set(MetadataKey, MetadataValue); }; var ordinaryOwnMetadataKeys = function(target, targetKey){ var metadataMap = getOrCreateMetadataMap(target, targetKey, false) , keys = []; if(metadataMap)metadataMap.forEach(function(_, key){ keys.push(key); }); return keys; }; var toMetaKey = function(it){ return it === undefined || typeof it == 'symbol' ? it : String(it); }; var exp = function(O){ $export($export.S, 'Reflect', O); }; module.exports = { store: store, map: getOrCreateMetadataMap, has: ordinaryHasOwnMetadata, get: ordinaryGetOwnMetadata, set: ordinaryDefineOwnMetadata, keys: ordinaryOwnMetadataKeys, key: toMetaKey, exp: exp }; /***/ }, /* 276 */ /***/ function(module, exports, __webpack_require__) { var metadata = __webpack_require__(275) , anObject = __webpack_require__(10) , toMetaKey = metadata.key , getOrCreateMetadataMap = metadata.map , store = metadata.store; metadata.exp({deleteMetadata: function deleteMetadata(metadataKey, target /*, targetKey */){ var targetKey = arguments.length < 3 ? undefined : toMetaKey(arguments[2]) , metadataMap = getOrCreateMetadataMap(anObject(target), targetKey, false); if(metadataMap === undefined || !metadataMap['delete'](metadataKey))return false; if(metadataMap.size)return true; var targetMetadata = store.get(target); targetMetadata['delete'](targetKey); return !!targetMetadata.size || store['delete'](target); }}); /***/ }, /* 277 */ /***/ function(module, exports, __webpack_require__) { var metadata = __webpack_require__(275) , anObject = __webpack_require__(10) , getPrototypeOf = __webpack_require__(57) , ordinaryHasOwnMetadata = metadata.has , ordinaryGetOwnMetadata = metadata.get , toMetaKey = metadata.key; var ordinaryGetMetadata = function(MetadataKey, O, P){ var hasOwn = ordinaryHasOwnMetadata(MetadataKey, O, P); if(hasOwn)return ordinaryGetOwnMetadata(MetadataKey, O, P); var parent = getPrototypeOf(O); return parent !== null ? ordinaryGetMetadata(MetadataKey, parent, P) : undefined; }; metadata.exp({getMetadata: function getMetadata(metadataKey, target /*, targetKey */){ return ordinaryGetMetadata(metadataKey, anObject(target), arguments.length < 3 ? undefined : toMetaKey(arguments[2])); }}); /***/ }, /* 278 */ /***/ function(module, exports, __webpack_require__) { var Set = __webpack_require__(206) , from = __webpack_require__(266) , metadata = __webpack_require__(275) , anObject = __webpack_require__(10) , getPrototypeOf = __webpack_require__(57) , ordinaryOwnMetadataKeys = metadata.keys , toMetaKey = metadata.key; var ordinaryMetadataKeys = function(O, P){ var oKeys = ordinaryOwnMetadataKeys(O, P) , parent = getPrototypeOf(O); if(parent === null)return oKeys; var pKeys = ordinaryMetadataKeys(parent, P); return pKeys.length ? oKeys.length ? from(new Set(oKeys.concat(pKeys))) : pKeys : oKeys; }; metadata.exp({getMetadataKeys: function getMetadataKeys(target /*, targetKey */){ return ordinaryMetadataKeys(anObject(target), arguments.length < 2 ? undefined : toMetaKey(arguments[1])); }}); /***/ }, /* 279 */ /***/ function(module, exports, __webpack_require__) { var metadata = __webpack_require__(275) , anObject = __webpack_require__(10) , ordinaryGetOwnMetadata = metadata.get , toMetaKey = metadata.key; metadata.exp({getOwnMetadata: function getOwnMetadata(metadataKey, target /*, targetKey */){ return ordinaryGetOwnMetadata(metadataKey, anObject(target) , arguments.length < 3 ? undefined : toMetaKey(arguments[2])); }}); /***/ }, /* 280 */ /***/ function(module, exports, __webpack_require__) { var metadata = __webpack_require__(275) , anObject = __webpack_require__(10) , ordinaryOwnMetadataKeys = metadata.keys , toMetaKey = metadata.key; metadata.exp({getOwnMetadataKeys: function getOwnMetadataKeys(target /*, targetKey */){ return ordinaryOwnMetadataKeys(anObject(target), arguments.length < 2 ? undefined : toMetaKey(arguments[1])); }}); /***/ }, /* 281 */ /***/ function(module, exports, __webpack_require__) { var metadata = __webpack_require__(275) , anObject = __webpack_require__(10) , getPrototypeOf = __webpack_require__(57) , ordinaryHasOwnMetadata = metadata.has , toMetaKey = metadata.key; var ordinaryHasMetadata = function(MetadataKey, O, P){ var hasOwn = ordinaryHasOwnMetadata(MetadataKey, O, P); if(hasOwn)return true; var parent = getPrototypeOf(O); return parent !== null ? ordinaryHasMetadata(MetadataKey, parent, P) : false; }; metadata.exp({hasMetadata: function hasMetadata(metadataKey, target /*, targetKey */){ return ordinaryHasMetadata(metadataKey, anObject(target), arguments.length < 3 ? undefined : toMetaKey(arguments[2])); }}); /***/ }, /* 282 */ /***/ function(module, exports, __webpack_require__) { var metadata = __webpack_require__(275) , anObject = __webpack_require__(10) , ordinaryHasOwnMetadata = metadata.has , toMetaKey = metadata.key; metadata.exp({hasOwnMetadata: function hasOwnMetadata(metadataKey, target /*, targetKey */){ return ordinaryHasOwnMetadata(metadataKey, anObject(target) , arguments.length < 3 ? undefined : toMetaKey(arguments[2])); }}); /***/ }, /* 283 */ /***/ function(module, exports, __webpack_require__) { var metadata = __webpack_require__(275) , anObject = __webpack_require__(10) , aFunction = __webpack_require__(19) , toMetaKey = metadata.key , ordinaryDefineOwnMetadata = metadata.set; metadata.exp({metadata: function metadata(metadataKey, metadataValue){ return function decorator(target, targetKey){ ordinaryDefineOwnMetadata( metadataKey, metadataValue, (targetKey !== undefined ? anObject : aFunction)(target), toMetaKey(targetKey) ); }; }}); /***/ }, /* 284 */ /***/ function(module, exports, __webpack_require__) { // https://github.com/rwaldron/tc39-notes/blob/master/es6/2014-09/sept-25.md#510-globalasap-for-enqueuing-a-microtask var $export = __webpack_require__(6) , microtask = __webpack_require__(201)() , process = __webpack_require__(2).process , isNode = __webpack_require__(32)(process) == 'process'; $export($export.G, { asap: function asap(fn){ var domain = isNode && process.domain; microtask(domain ? domain.bind(fn) : fn); } }); /***/ }, /* 285 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; // https://github.com/zenparsing/es-observable var $export = __webpack_require__(6) , global = __webpack_require__(2) , core = __webpack_require__(7) , microtask = __webpack_require__(201)() , OBSERVABLE = __webpack_require__(23)('observable') , aFunction = __webpack_require__(19) , anObject = __webpack_require__(10) , anInstance = __webpack_require__(197) , redefineAll = __webpack_require__(202) , hide = __webpack_require__(8) , forOf = __webpack_require__(198) , RETURN = forOf.RETURN; var getMethod = function(fn){ return fn == null ? undefined : aFunction(fn); }; var cleanupSubscription = function(subscription){ var cleanup = subscription._c; if(cleanup){ subscription._c = undefined; cleanup(); } }; var subscriptionClosed = function(subscription){ return subscription._o === undefined; }; var closeSubscription = function(subscription){ if(!subscriptionClosed(subscription)){ subscription._o = undefined; cleanupSubscription(subscription); } }; var Subscription = function(observer, subscriber){ anObject(observer); this._c = undefined; this._o = observer; observer = new SubscriptionObserver(this); try { var cleanup = subscriber(observer) , subscription = cleanup; if(cleanup != null){ if(typeof cleanup.unsubscribe === 'function')cleanup = function(){ subscription.unsubscribe(); }; else aFunction(cleanup); this._c = cleanup; } } catch(e){ observer.error(e); return; } if(subscriptionClosed(this))cleanupSubscription(this); }; Subscription.prototype = redefineAll({}, { unsubscribe: function unsubscribe(){ closeSubscription(this); } }); var SubscriptionObserver = function(subscription){ this._s = subscription; }; SubscriptionObserver.prototype = redefineAll({}, { next: function next(value){ var subscription = this._s; if(!subscriptionClosed(subscription)){ var observer = subscription._o; try { var m = getMethod(observer.next); if(m)return m.call(observer, value); } catch(e){ try { closeSubscription(subscription); } finally { throw e; } } } }, error: function error(value){ var subscription = this._s; if(subscriptionClosed(subscription))throw value; var observer = subscription._o; subscription._o = undefined; try { var m = getMethod(observer.error); if(!m)throw value; value = m.call(observer, value); } catch(e){ try { cleanupSubscription(subscription); } finally { throw e; } } cleanupSubscription(subscription); return value; }, complete: function complete(value){ var subscription = this._s; if(!subscriptionClosed(subscription)){ var observer = subscription._o; subscription._o = undefined; try { var m = getMethod(observer.complete); value = m ? m.call(observer, value) : undefined; } catch(e){ try { cleanupSubscription(subscription); } finally { throw e; } } cleanupSubscription(subscription); return value; } } }); var $Observable = function Observable(subscriber){ anInstance(this, $Observable, 'Observable', '_f')._f = aFunction(subscriber); }; redefineAll($Observable.prototype, { subscribe: function subscribe(observer){ return new Subscription(observer, this._f); }, forEach: function forEach(fn){ var that = this; return new (core.Promise || global.Promise)(function(resolve, reject){ aFunction(fn); var subscription = that.subscribe({ next : function(value){ try { return fn(value); } catch(e){ reject(e); subscription.unsubscribe(); } }, error: reject, complete: resolve }); }); } }); redefineAll($Observable, { from: function from(x){ var C = typeof this === 'function' ? this : $Observable; var method = getMethod(anObject(x)[OBSERVABLE]); if(method){ var observable = anObject(method.call(x)); return observable.constructor === C ? observable : new C(function(observer){ return observable.subscribe(observer); }); } return new C(function(observer){ var done = false; microtask(function(){ if(!done){ try { if(forOf(x, false, function(it){ observer.next(it); if(done)return RETURN; }) === RETURN)return; } catch(e){ if(done)throw e; observer.error(e); return; } observer.complete(); } }); return function(){ done = true; }; }); }, of: function of(){ for(var i = 0, l = arguments.length, items = Array(l); i < l;)items[i] = arguments[i++]; return new (typeof this === 'function' ? this : $Observable)(function(observer){ var done = false; microtask(function(){ if(!done){ for(var i = 0; i < items.length; ++i){ observer.next(items[i]); if(done)return; } observer.complete(); } }); return function(){ done = true; }; }); } }); hide($Observable.prototype, OBSERVABLE, function(){ return this; }); $export($export.G, {Observable: $Observable}); __webpack_require__(186)('Observable'); /***/ }, /* 286 */ /***/ function(module, exports, __webpack_require__) { var $export = __webpack_require__(6) , $task = __webpack_require__(200); $export($export.G + $export.B, { setImmediate: $task.set, clearImmediate: $task.clear }); /***/ }, /* 287 */ /***/ function(module, exports, __webpack_require__) { var $iterators = __webpack_require__(183) , redefine = __webpack_require__(16) , global = __webpack_require__(2) , hide = __webpack_require__(8) , Iterators = __webpack_require__(135) , wks = __webpack_require__(23) , ITERATOR = wks('iterator') , TO_STRING_TAG = wks('toStringTag') , ArrayValues = Iterators.Array; for(var collections = ['NodeList', 'DOMTokenList', 'MediaList', 'StyleSheetList', 'CSSRuleList'], i = 0; i < 5; i++){ var NAME = collections[i] , Collection = global[NAME] , proto = Collection && Collection.prototype , key; if(proto){ if(!proto[ITERATOR])hide(proto, ITERATOR, ArrayValues); if(!proto[TO_STRING_TAG])hide(proto, TO_STRING_TAG, NAME); Iterators[NAME] = ArrayValues; for(key in $iterators)if(!proto[key])redefine(proto, key, $iterators[key], true); } } /***/ }, /* 288 */ /***/ function(module, exports, __webpack_require__) { // ie9- setTimeout & setInterval additional parameters fix var global = __webpack_require__(2) , $export = __webpack_require__(6) , invoke = __webpack_require__(76) , partial = __webpack_require__(289) , navigator = global.navigator , MSIE = !!navigator && /MSIE .\./.test(navigator.userAgent); // <- dirty ie9- check var wrap = function(set){ return MSIE ? function(fn, time /*, ...args */){ return set(invoke( partial, [].slice.call(arguments, 2), typeof fn == 'function' ? fn : Function(fn) ), time); } : set; }; $export($export.G + $export.B + $export.F * MSIE, { setTimeout: wrap(global.setTimeout), setInterval: wrap(global.setInterval) }); /***/ }, /* 289 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; var path = __webpack_require__(290) , invoke = __webpack_require__(76) , aFunction = __webpack_require__(19); module.exports = function(/* ...pargs */){ var fn = aFunction(this) , length = arguments.length , pargs = Array(length) , i = 0 , _ = path._ , holder = false; while(length > i)if((pargs[i] = arguments[i++]) === _)holder = true; return function(/* ...args */){ var that = this , aLen = arguments.length , j = 0, k = 0, args; if(!holder && !aLen)return invoke(fn, pargs, that); args = pargs.slice(); if(holder)for(;length > j; j++)if(args[j] === _)args[j] = arguments[k++]; while(aLen > k)args.push(arguments[k++]); return invoke(fn, args, that); }; }; /***/ }, /* 290 */ /***/ function(module, exports, __webpack_require__) { module.exports = __webpack_require__(2); /***/ }, /* 291 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; var ctx = __webpack_require__(18) , $export = __webpack_require__(6) , createDesc = __webpack_require__(15) , assign = __webpack_require__(67) , create = __webpack_require__(44) , getPrototypeOf = __webpack_require__(57) , getKeys = __webpack_require__(28) , dP = __webpack_require__(9) , keyOf = __webpack_require__(27) , aFunction = __webpack_require__(19) , forOf = __webpack_require__(198) , isIterable = __webpack_require__(292) , $iterCreate = __webpack_require__(136) , step = __webpack_require__(184) , isObject = __webpack_require__(11) , toIObject = __webpack_require__(30) , DESCRIPTORS = __webpack_require__(4) , has = __webpack_require__(3); // 0 -> Dict.forEach // 1 -> Dict.map // 2 -> Dict.filter // 3 -> Dict.some // 4 -> Dict.every // 5 -> Dict.find // 6 -> Dict.findKey // 7 -> Dict.mapPairs var createDictMethod = function(TYPE){ var IS_MAP = TYPE == 1 , IS_EVERY = TYPE == 4; return function(object, callbackfn, that /* = undefined */){ var f = ctx(callbackfn, that, 3) , O = toIObject(object) , result = IS_MAP || TYPE == 7 || TYPE == 2 ? new (typeof this == 'function' ? this : Dict) : undefined , key, val, res; for(key in O)if(has(O, key)){ val = O[key]; res = f(val, key, object); if(TYPE){ if(IS_MAP)result[key] = res; // map else if(res)switch(TYPE){ case 2: result[key] = val; break; // filter case 3: return true; // some case 5: return val; // find case 6: return key; // findKey case 7: result[res[0]] = res[1]; // mapPairs } else if(IS_EVERY)return false; // every } } return TYPE == 3 || IS_EVERY ? IS_EVERY : result; }; }; var findKey = createDictMethod(6); var createDictIter = function(kind){ return function(it){ return new DictIterator(it, kind); }; }; var DictIterator = function(iterated, kind){ this._t = toIObject(iterated); // target this._a = getKeys(iterated); // keys this._i = 0; // next index this._k = kind; // kind }; $iterCreate(DictIterator, 'Dict', function(){ var that = this , O = that._t , keys = that._a , kind = that._k , key; do { if(that._i >= keys.length){ that._t = undefined; return step(1); } } while(!has(O, key = keys[that._i++])); if(kind == 'keys' )return step(0, key); if(kind == 'values')return step(0, O[key]); return step(0, [key, O[key]]); }); function Dict(iterable){ var dict = create(null); if(iterable != undefined){ if(isIterable(iterable)){ forOf(iterable, true, function(key, value){ dict[key] = value; }); } else assign(dict, iterable); } return dict; } Dict.prototype = null; function reduce(object, mapfn, init){ aFunction(mapfn); var O = toIObject(object) , keys = getKeys(O) , length = keys.length , i = 0 , memo, key; if(arguments.length < 3){ if(!length)throw TypeError('Reduce of empty object with no initial value'); memo = O[keys[i++]]; } else memo = Object(init); while(length > i)if(has(O, key = keys[i++])){ memo = mapfn(memo, O[key], key, object); } return memo; } function includes(object, el){ return (el == el ? keyOf(object, el) : findKey(object, function(it){ return it != it; })) !== undefined; } function get(object, key){ if(has(object, key))return object[key]; } function set(object, key, value){ if(DESCRIPTORS && key in Object)dP.f(object, key, createDesc(0, value)); else object[key] = value; return object; } function isDict(it){ return isObject(it) && getPrototypeOf(it) === Dict.prototype; } $export($export.G + $export.F, {Dict: Dict}); $export($export.S, 'Dict', { keys: createDictIter('keys'), values: createDictIter('values'), entries: createDictIter('entries'), forEach: createDictMethod(0), map: createDictMethod(1), filter: createDictMethod(2), some: createDictMethod(3), every: createDictMethod(4), find: createDictMethod(5), findKey: findKey, mapPairs: createDictMethod(7), reduce: reduce, keyOf: keyOf, includes: includes, has: has, get: get, set: set, isDict: isDict }); /***/ }, /* 292 */ /***/ function(module, exports, __webpack_require__) { var classof = __webpack_require__(73) , ITERATOR = __webpack_require__(23)('iterator') , Iterators = __webpack_require__(135); module.exports = __webpack_require__(7).isIterable = function(it){ var O = Object(it); return O[ITERATOR] !== undefined || '@@iterator' in O || Iterators.hasOwnProperty(classof(O)); }; /***/ }, /* 293 */ /***/ function(module, exports, __webpack_require__) { var anObject = __webpack_require__(10) , get = __webpack_require__(156); module.exports = __webpack_require__(7).getIterator = function(it){ var iterFn = get(it); if(typeof iterFn != 'function')throw TypeError(it + ' is not iterable!'); return anObject(iterFn.call(it)); }; /***/ }, /* 294 */ /***/ function(module, exports, __webpack_require__) { var global = __webpack_require__(2) , core = __webpack_require__(7) , $export = __webpack_require__(6) , partial = __webpack_require__(289); // https://esdiscuss.org/topic/promise-returning-delay-function $export($export.G + $export.F, { delay: function delay(time){ return new (core.Promise || global.Promise)(function(resolve){ setTimeout(partial.call(resolve, true), time); }); } }); /***/ }, /* 295 */ /***/ function(module, exports, __webpack_require__) { var path = __webpack_require__(290) , $export = __webpack_require__(6); // Placeholder __webpack_require__(7)._ = path._ = path._ || {}; $export($export.P + $export.F, 'Function', {part: __webpack_require__(289)}); /***/ }, /* 296 */ /***/ function(module, exports, __webpack_require__) { var $export = __webpack_require__(6); $export($export.S + $export.F, 'Object', {isObject: __webpack_require__(11)}); /***/ }, /* 297 */ /***/ function(module, exports, __webpack_require__) { var $export = __webpack_require__(6); $export($export.S + $export.F, 'Object', {classof: __webpack_require__(73)}); /***/ }, /* 298 */ /***/ function(module, exports, __webpack_require__) { var $export = __webpack_require__(6) , define = __webpack_require__(299); $export($export.S + $export.F, 'Object', {define: define}); /***/ }, /* 299 */ /***/ function(module, exports, __webpack_require__) { var dP = __webpack_require__(9) , gOPD = __webpack_require__(49) , ownKeys = __webpack_require__(221) , toIObject = __webpack_require__(30); module.exports = function define(target, mixin){ var keys = ownKeys(toIObject(mixin)) , length = keys.length , i = 0, key; while(length > i)dP.f(target, key = keys[i++], gOPD.f(mixin, key)); return target; }; /***/ }, /* 300 */ /***/ function(module, exports, __webpack_require__) { var $export = __webpack_require__(6) , define = __webpack_require__(299) , create = __webpack_require__(44); $export($export.S + $export.F, 'Object', { make: function(proto, mixin){ return define(create(proto), mixin); } }); /***/ }, /* 301 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; __webpack_require__(134)(Number, 'Number', function(iterated){ this._l = +iterated; this._i = 0; }, function(){ var i = this._i++ , done = !(i < this._l); return {done: done, value: done ? undefined : i}; }); /***/ }, /* 302 */ /***/ function(module, exports, __webpack_require__) { // https://github.com/benjamingr/RexExp.escape var $export = __webpack_require__(6) , $re = __webpack_require__(303)(/[\\^$*+?.()|[\]{}]/g, '\\$&'); $export($export.S, 'RegExp', {escape: function escape(it){ return $re(it); }}); /***/ }, /* 303 */ /***/ function(module, exports) { module.exports = function(regExp, replace){ var replacer = replace === Object(replace) ? function(part){ return replace[part]; } : replace; return function(it){ return String(it).replace(regExp, replacer); }; }; /***/ }, /* 304 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; var $export = __webpack_require__(6); var $re = __webpack_require__(303)(/[&<>"']/g, { '&': '&', '<': '<', '>': '>', '"': '"', "'": ''' }); $export($export.P + $export.F, 'String', {escapeHTML: function escapeHTML(){ return $re(this); }}); /***/ }, /* 305 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; var $export = __webpack_require__(6); var $re = __webpack_require__(303)(/&(?:amp|lt|gt|quot|apos);/g, { '&': '&', '<': '<', '>': '>', '"': '"', ''': "'" }); $export($export.P + $export.F, 'String', {unescapeHTML: function unescapeHTML(){ return $re(this); }}); /***/ } /******/ ]); // CommonJS export if(typeof module != 'undefined' && module.exports)module.exports = __e; // RequireJS export else if(typeof define == 'function' && define.amd)define(function(){return __e}); // Export to global object else __g.core = __e; }(1, 1);core-js-2.4.1/client/core.min.js000066400000000000000000002413751274277553300164410ustar00rootroot00000000000000/** * core-js 2.4.1 * https://github.com/zloirock/core-js * License: http://rock.mit-license.org * © 2016 Denis Pushkarev */ !function(a,b,c){"use strict";!function(a){function __webpack_require__(c){if(b[c])return b[c].exports;var d=b[c]={exports:{},id:c,loaded:!1};return a[c].call(d.exports,d,d.exports,__webpack_require__),d.loaded=!0,d.exports}var b={};return __webpack_require__.m=a,__webpack_require__.c=b,__webpack_require__.p="",__webpack_require__(0)}([function(a,b,c){c(1),c(50),c(51),c(52),c(54),c(55),c(58),c(59),c(60),c(61),c(62),c(63),c(64),c(65),c(66),c(68),c(70),c(72),c(74),c(77),c(78),c(79),c(83),c(86),c(87),c(88),c(89),c(91),c(92),c(93),c(94),c(95),c(97),c(99),c(100),c(101),c(103),c(104),c(105),c(107),c(108),c(109),c(111),c(112),c(113),c(114),c(115),c(116),c(117),c(118),c(119),c(120),c(121),c(122),c(123),c(124),c(126),c(130),c(131),c(132),c(133),c(137),c(139),c(140),c(141),c(142),c(143),c(144),c(145),c(146),c(147),c(148),c(149),c(150),c(151),c(152),c(158),c(159),c(161),c(162),c(163),c(167),c(168),c(169),c(170),c(171),c(173),c(174),c(175),c(176),c(179),c(181),c(182),c(183),c(185),c(187),c(189),c(190),c(191),c(193),c(194),c(195),c(196),c(203),c(206),c(207),c(209),c(210),c(211),c(212),c(213),c(214),c(215),c(216),c(217),c(218),c(219),c(220),c(222),c(223),c(224),c(225),c(226),c(227),c(228),c(229),c(231),c(234),c(235),c(237),c(238),c(239),c(240),c(241),c(242),c(243),c(244),c(245),c(246),c(247),c(249),c(250),c(251),c(252),c(253),c(254),c(255),c(256),c(258),c(259),c(261),c(262),c(263),c(264),c(267),c(268),c(269),c(270),c(271),c(272),c(273),c(274),c(276),c(277),c(278),c(279),c(280),c(281),c(282),c(283),c(284),c(285),c(286),c(287),c(288),c(291),c(156),c(293),c(292),c(294),c(295),c(296),c(297),c(298),c(300),c(301),c(302),c(304),a.exports=c(305)},function(a,b,d){var e=d(2),f=d(3),g=d(4),h=d(6),i=d(16),j=d(20).KEY,k=d(5),l=d(21),m=d(22),n=d(17),o=d(23),p=d(24),q=d(25),r=d(27),s=d(40),t=d(43),u=d(10),v=d(30),w=d(14),x=d(15),y=d(44),z=d(47),A=d(49),B=d(9),C=d(28),D=A.f,E=B.f,F=z.f,G=e.Symbol,H=e.JSON,I=H&&H.stringify,J="prototype",K=o("_hidden"),L=o("toPrimitive"),M={}.propertyIsEnumerable,N=l("symbol-registry"),O=l("symbols"),P=l("op-symbols"),Q=Object[J],R="function"==typeof G,S=e.QObject,T=!S||!S[J]||!S[J].findChild,U=g&&k(function(){return 7!=y(E({},"a",{get:function(){return E(this,"a",{value:7}).a}})).a})?function(a,b,c){var d=D(Q,b);d&&delete Q[b],E(a,b,c),d&&a!==Q&&E(Q,b,d)}:E,V=function(a){var b=O[a]=y(G[J]);return b._k=a,b},W=R&&"symbol"==typeof G.iterator?function(a){return"symbol"==typeof a}:function(a){return a instanceof G},X=function defineProperty(a,b,c){return a===Q&&X(P,b,c),u(a),b=w(b,!0),u(c),f(O,b)?(c.enumerable?(f(a,K)&&a[K][b]&&(a[K][b]=!1),c=y(c,{enumerable:x(0,!1)})):(f(a,K)||E(a,K,x(1,{})),a[K][b]=!0),U(a,b,c)):E(a,b,c)},Y=function defineProperties(a,b){u(a);for(var c,d=s(b=v(b)),e=0,f=d.length;f>e;)X(a,c=d[e++],b[c]);return a},Z=function create(a,b){return b===c?y(a):Y(y(a),b)},$=function propertyIsEnumerable(a){var b=M.call(this,a=w(a,!0));return!(this===Q&&f(O,a)&&!f(P,a))&&(!(b||!f(this,a)||!f(O,a)||f(this,K)&&this[K][a])||b)},_=function getOwnPropertyDescriptor(a,b){if(a=v(a),b=w(b,!0),a!==Q||!f(O,b)||f(P,b)){var c=D(a,b);return!c||!f(O,b)||f(a,K)&&a[K][b]||(c.enumerable=!0),c}},aa=function getOwnPropertyNames(a){for(var b,c=F(v(a)),d=[],e=0;c.length>e;)f(O,b=c[e++])||b==K||b==j||d.push(b);return d},ba=function getOwnPropertySymbols(a){for(var b,c=a===Q,d=F(c?P:v(a)),e=[],g=0;d.length>g;)!f(O,b=d[g++])||c&&!f(Q,b)||e.push(O[b]);return e};R||(G=function Symbol(){if(this instanceof G)throw TypeError("Symbol is not a constructor!");var a=n(arguments.length>0?arguments[0]:c),b=function(c){this===Q&&b.call(P,c),f(this,K)&&f(this[K],a)&&(this[K][a]=!1),U(this,a,x(1,c))};return g&&T&&U(Q,a,{configurable:!0,set:b}),V(a)},i(G[J],"toString",function toString(){return this._k}),A.f=_,B.f=X,d(48).f=z.f=aa,d(42).f=$,d(41).f=ba,g&&!d(26)&&i(Q,"propertyIsEnumerable",$,!0),p.f=function(a){return V(o(a))}),h(h.G+h.W+h.F*!R,{Symbol:G});for(var ca="hasInstance,isConcatSpreadable,iterator,match,replace,search,species,split,toPrimitive,toStringTag,unscopables".split(","),da=0;ca.length>da;)o(ca[da++]);for(var ca=C(o.store),da=0;ca.length>da;)q(ca[da++]);h(h.S+h.F*!R,"Symbol",{"for":function(a){return f(N,a+="")?N[a]:N[a]=G(a)},keyFor:function keyFor(a){if(W(a))return r(N,a);throw TypeError(a+" is not a symbol!")},useSetter:function(){T=!0},useSimple:function(){T=!1}}),h(h.S+h.F*!R,"Object",{create:Z,defineProperty:X,defineProperties:Y,getOwnPropertyDescriptor:_,getOwnPropertyNames:aa,getOwnPropertySymbols:ba}),H&&h(h.S+h.F*(!R||k(function(){var a=G();return"[null]"!=I([a])||"{}"!=I({a:a})||"{}"!=I(Object(a))})),"JSON",{stringify:function stringify(a){if(a!==c&&!W(a)){for(var b,d,e=[a],f=1;arguments.length>f;)e.push(arguments[f++]);return b=e[1],"function"==typeof b&&(d=b),!d&&t(b)||(b=function(a,b){if(d&&(b=d.call(this,a,b)),!W(b))return b}),e[1]=b,I.apply(H,e)}}}),G[J][L]||d(8)(G[J],L,G[J].valueOf),m(G,"Symbol"),m(Math,"Math",!0),m(e.JSON,"JSON",!0)},function(a,c){var d=a.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof b&&(b=d)},function(a,b){var c={}.hasOwnProperty;a.exports=function(a,b){return c.call(a,b)}},function(a,b,c){a.exports=!c(5)(function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a})},function(a,b){a.exports=function(a){try{return!!a()}catch(b){return!0}}},function(a,b,d){var e=d(2),f=d(7),g=d(8),h=d(16),i=d(18),j="prototype",k=function(a,b,d){var l,m,n,o,p=a&k.F,q=a&k.G,r=a&k.S,s=a&k.P,t=a&k.B,u=q?e:r?e[b]||(e[b]={}):(e[b]||{})[j],v=q?f:f[b]||(f[b]={}),w=v[j]||(v[j]={});q&&(d=b);for(l in d)m=!p&&u&&u[l]!==c,n=(m?u:d)[l],o=t&&m?i(n,e):s&&"function"==typeof n?i(Function.call,n):n,u&&h(u,l,n,a&k.U),v[l]!=n&&g(v,l,o),s&&w[l]!=n&&(w[l]=n)};e.core=f,k.F=1,k.G=2,k.S=4,k.P=8,k.B=16,k.W=32,k.U=64,k.R=128,a.exports=k},function(b,c){var d=b.exports={version:"2.4.0"};"number"==typeof a&&(a=d)},function(a,b,c){var d=c(9),e=c(15);a.exports=c(4)?function(a,b,c){return d.f(a,b,e(1,c))}:function(a,b,c){return a[b]=c,a}},function(a,b,c){var d=c(10),e=c(12),f=c(14),g=Object.defineProperty;b.f=c(4)?Object.defineProperty:function defineProperty(a,b,c){if(d(a),b=f(b,!0),d(c),e)try{return g(a,b,c)}catch(h){}if("get"in c||"set"in c)throw TypeError("Accessors not supported!");return"value"in c&&(a[b]=c.value),a}},function(a,b,c){var d=c(11);a.exports=function(a){if(!d(a))throw TypeError(a+" is not an object!");return a}},function(a,b){a.exports=function(a){return"object"==typeof a?null!==a:"function"==typeof a}},function(a,b,c){a.exports=!c(4)&&!c(5)(function(){return 7!=Object.defineProperty(c(13)("div"),"a",{get:function(){return 7}}).a})},function(a,b,c){var d=c(11),e=c(2).document,f=d(e)&&d(e.createElement);a.exports=function(a){return f?e.createElement(a):{}}},function(a,b,c){var d=c(11);a.exports=function(a,b){if(!d(a))return a;var c,e;if(b&&"function"==typeof(c=a.toString)&&!d(e=c.call(a)))return e;if("function"==typeof(c=a.valueOf)&&!d(e=c.call(a)))return e;if(!b&&"function"==typeof(c=a.toString)&&!d(e=c.call(a)))return e;throw TypeError("Can't convert object to primitive value")}},function(a,b){a.exports=function(a,b){return{enumerable:!(1&a),configurable:!(2&a),writable:!(4&a),value:b}}},function(a,b,c){var d=c(2),e=c(8),f=c(3),g=c(17)("src"),h="toString",i=Function[h],j=(""+i).split(h);c(7).inspectSource=function(a){return i.call(a)},(a.exports=function(a,b,c,h){var i="function"==typeof c;i&&(f(c,"name")||e(c,"name",b)),a[b]!==c&&(i&&(f(c,g)||e(c,g,a[b]?""+a[b]:j.join(String(b)))),a===d?a[b]=c:h?a[b]?a[b]=c:e(a,b,c):(delete a[b],e(a,b,c)))})(Function.prototype,h,function toString(){return"function"==typeof this&&this[g]||i.call(this)})},function(a,b){var d=0,e=Math.random();a.exports=function(a){return"Symbol(".concat(a===c?"":a,")_",(++d+e).toString(36))}},function(a,b,d){var e=d(19);a.exports=function(a,b,d){if(e(a),b===c)return a;switch(d){case 1:return function(c){return a.call(b,c)};case 2:return function(c,d){return a.call(b,c,d)};case 3:return function(c,d,e){return a.call(b,c,d,e)}}return function(){return a.apply(b,arguments)}}},function(a,b){a.exports=function(a){if("function"!=typeof a)throw TypeError(a+" is not a function!");return a}},function(a,b,c){var d=c(17)("meta"),e=c(11),f=c(3),g=c(9).f,h=0,i=Object.isExtensible||function(){return!0},j=!c(5)(function(){return i(Object.preventExtensions({}))}),k=function(a){g(a,d,{value:{i:"O"+ ++h,w:{}}})},l=function(a,b){if(!e(a))return"symbol"==typeof a?a:("string"==typeof a?"S":"P")+a;if(!f(a,d)){if(!i(a))return"F";if(!b)return"E";k(a)}return a[d].i},m=function(a,b){if(!f(a,d)){if(!i(a))return!0;if(!b)return!1;k(a)}return a[d].w},n=function(a){return j&&o.NEED&&i(a)&&!f(a,d)&&k(a),a},o=a.exports={KEY:d,NEED:!1,fastKey:l,getWeak:m,onFreeze:n}},function(a,b,c){var d=c(2),e="__core-js_shared__",f=d[e]||(d[e]={});a.exports=function(a){return f[a]||(f[a]={})}},function(a,b,c){var d=c(9).f,e=c(3),f=c(23)("toStringTag");a.exports=function(a,b,c){a&&!e(a=c?a:a.prototype,f)&&d(a,f,{configurable:!0,value:b})}},function(a,b,c){var d=c(21)("wks"),e=c(17),f=c(2).Symbol,g="function"==typeof f,h=a.exports=function(a){return d[a]||(d[a]=g&&f[a]||(g?f:e)("Symbol."+a))};h.store=d},function(a,b,c){b.f=c(23)},function(a,b,c){var d=c(2),e=c(7),f=c(26),g=c(24),h=c(9).f;a.exports=function(a){var b=e.Symbol||(e.Symbol=f?{}:d.Symbol||{});"_"==a.charAt(0)||a in b||h(b,a,{value:g.f(a)})}},function(a,b){a.exports=!1},function(a,b,c){var d=c(28),e=c(30);a.exports=function(a,b){for(var c,f=e(a),g=d(f),h=g.length,i=0;h>i;)if(f[c=g[i++]]===b)return c}},function(a,b,c){var d=c(29),e=c(39);a.exports=Object.keys||function keys(a){return d(a,e)}},function(a,b,c){var d=c(3),e=c(30),f=c(34)(!1),g=c(38)("IE_PROTO");a.exports=function(a,b){var c,h=e(a),i=0,j=[];for(c in h)c!=g&&d(h,c)&&j.push(c);for(;b.length>i;)d(h,c=b[i++])&&(~f(j,c)||j.push(c));return j}},function(a,b,c){var d=c(31),e=c(33);a.exports=function(a){return d(e(a))}},function(a,b,c){var d=c(32);a.exports=Object("z").propertyIsEnumerable(0)?Object:function(a){return"String"==d(a)?a.split(""):Object(a)}},function(a,b){var c={}.toString;a.exports=function(a){return c.call(a).slice(8,-1)}},function(a,b){a.exports=function(a){if(a==c)throw TypeError("Can't call method on "+a);return a}},function(a,b,c){var d=c(30),e=c(35),f=c(37);a.exports=function(a){return function(b,c,g){var h,i=d(b),j=e(i.length),k=f(g,j);if(a&&c!=c){for(;j>k;)if(h=i[k++],h!=h)return!0}else for(;j>k;k++)if((a||k in i)&&i[k]===c)return a||k||0;return!a&&-1}}},function(a,b,c){var d=c(36),e=Math.min;a.exports=function(a){return a>0?e(d(a),9007199254740991):0}},function(a,b){var c=Math.ceil,d=Math.floor;a.exports=function(a){return isNaN(a=+a)?0:(a>0?d:c)(a)}},function(a,b,c){var d=c(36),e=Math.max,f=Math.min;a.exports=function(a,b){return a=d(a),a<0?e(a+b,0):f(a,b)}},function(a,b,c){var d=c(21)("keys"),e=c(17);a.exports=function(a){return d[a]||(d[a]=e(a))}},function(a,b){a.exports="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(",")},function(a,b,c){var d=c(28),e=c(41),f=c(42);a.exports=function(a){var b=d(a),c=e.f;if(c)for(var g,h=c(a),i=f.f,j=0;h.length>j;)i.call(a,g=h[j++])&&b.push(g);return b}},function(a,b){b.f=Object.getOwnPropertySymbols},function(a,b){b.f={}.propertyIsEnumerable},function(a,b,c){var d=c(32);a.exports=Array.isArray||function isArray(a){return"Array"==d(a)}},function(a,b,d){var e=d(10),f=d(45),g=d(39),h=d(38)("IE_PROTO"),i=function(){},j="prototype",k=function(){var a,b=d(13)("iframe"),c=g.length,e="<",f=">";for(b.style.display="none",d(46).appendChild(b),b.src="javascript:",a=b.contentWindow.document,a.open(),a.write(e+"script"+f+"document.F=Object"+e+"/script"+f),a.close(),k=a.F;c--;)delete k[j][g[c]];return k()};a.exports=Object.create||function create(a,b){var d;return null!==a?(i[j]=e(a),d=new i,i[j]=null,d[h]=a):d=k(),b===c?d:f(d,b)}},function(a,b,c){var d=c(9),e=c(10),f=c(28);a.exports=c(4)?Object.defineProperties:function defineProperties(a,b){e(a);for(var c,g=f(b),h=g.length,i=0;h>i;)d.f(a,c=g[i++],b[c]);return a}},function(a,b,c){a.exports=c(2).document&&document.documentElement},function(a,b,c){var d=c(30),e=c(48).f,f={}.toString,g="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],h=function(a){try{return e(a)}catch(b){return g.slice()}};a.exports.f=function getOwnPropertyNames(a){return g&&"[object Window]"==f.call(a)?h(a):e(d(a))}},function(a,b,c){var d=c(29),e=c(39).concat("length","prototype");b.f=Object.getOwnPropertyNames||function getOwnPropertyNames(a){return d(a,e)}},function(a,b,c){var d=c(42),e=c(15),f=c(30),g=c(14),h=c(3),i=c(12),j=Object.getOwnPropertyDescriptor;b.f=c(4)?j:function getOwnPropertyDescriptor(a,b){if(a=f(a),b=g(b,!0),i)try{return j(a,b)}catch(c){}if(h(a,b))return e(!d.f.call(a,b),a[b])}},function(a,b,c){var d=c(6);d(d.S+d.F*!c(4),"Object",{defineProperty:c(9).f})},function(a,b,c){var d=c(6);d(d.S+d.F*!c(4),"Object",{defineProperties:c(45)})},function(a,b,c){var d=c(30),e=c(49).f;c(53)("getOwnPropertyDescriptor",function(){return function getOwnPropertyDescriptor(a,b){return e(d(a),b)}})},function(a,b,c){var d=c(6),e=c(7),f=c(5);a.exports=function(a,b){var c=(e.Object||{})[a]||Object[a],g={};g[a]=b(c),d(d.S+d.F*f(function(){c(1)}),"Object",g)}},function(a,b,c){var d=c(6);d(d.S,"Object",{create:c(44)})},function(a,b,c){var d=c(56),e=c(57);c(53)("getPrototypeOf",function(){return function getPrototypeOf(a){return e(d(a))}})},function(a,b,c){var d=c(33);a.exports=function(a){return Object(d(a))}},function(a,b,c){var d=c(3),e=c(56),f=c(38)("IE_PROTO"),g=Object.prototype;a.exports=Object.getPrototypeOf||function(a){return a=e(a),d(a,f)?a[f]:"function"==typeof a.constructor&&a instanceof a.constructor?a.constructor.prototype:a instanceof Object?g:null}},function(a,b,c){var d=c(56),e=c(28);c(53)("keys",function(){return function keys(a){return e(d(a))}})},function(a,b,c){c(53)("getOwnPropertyNames",function(){return c(47).f})},function(a,b,c){var d=c(11),e=c(20).onFreeze;c(53)("freeze",function(a){return function freeze(b){return a&&d(b)?a(e(b)):b}})},function(a,b,c){var d=c(11),e=c(20).onFreeze;c(53)("seal",function(a){return function seal(b){return a&&d(b)?a(e(b)):b}})},function(a,b,c){var d=c(11),e=c(20).onFreeze;c(53)("preventExtensions",function(a){return function preventExtensions(b){return a&&d(b)?a(e(b)):b}})},function(a,b,c){var d=c(11);c(53)("isFrozen",function(a){return function isFrozen(b){return!d(b)||!!a&&a(b)}})},function(a,b,c){var d=c(11);c(53)("isSealed",function(a){return function isSealed(b){return!d(b)||!!a&&a(b)}})},function(a,b,c){var d=c(11);c(53)("isExtensible",function(a){return function isExtensible(b){return!!d(b)&&(!a||a(b))}})},function(a,b,c){var d=c(6);d(d.S+d.F,"Object",{assign:c(67)})},function(a,b,c){var d=c(28),e=c(41),f=c(42),g=c(56),h=c(31),i=Object.assign;a.exports=!i||c(5)(function(){var a={},b={},c=Symbol(),d="abcdefghijklmnopqrst";return a[c]=7,d.split("").forEach(function(a){b[a]=a}),7!=i({},a)[c]||Object.keys(i({},b)).join("")!=d})?function assign(a,b){for(var c=g(a),i=arguments.length,j=1,k=e.f,l=f.f;i>j;)for(var m,n=h(arguments[j++]),o=k?d(n).concat(k(n)):d(n),p=o.length,q=0;p>q;)l.call(n,m=o[q++])&&(c[m]=n[m]);return c}:i},function(a,b,c){var d=c(6);d(d.S,"Object",{is:c(69)})},function(a,b){a.exports=Object.is||function is(a,b){return a===b?0!==a||1/a===1/b:a!=a&&b!=b}},function(a,b,c){var d=c(6);d(d.S,"Object",{setPrototypeOf:c(71).set})},function(a,b,d){var e=d(11),f=d(10),g=function(a,b){if(f(a),!e(b)&&null!==b)throw TypeError(b+": can't set as prototype!")};a.exports={set:Object.setPrototypeOf||("__proto__"in{}?function(a,b,c){try{c=d(18)(Function.call,d(49).f(Object.prototype,"__proto__").set,2),c(a,[]),b=!(a instanceof Array)}catch(e){b=!0}return function setPrototypeOf(a,d){return g(a,d),b?a.__proto__=d:c(a,d),a}}({},!1):c),check:g}},function(a,b,c){var d=c(73),e={};e[c(23)("toStringTag")]="z",e+""!="[object z]"&&c(16)(Object.prototype,"toString",function toString(){return"[object "+d(this)+"]"},!0)},function(a,b,d){var e=d(32),f=d(23)("toStringTag"),g="Arguments"==e(function(){return arguments}()),h=function(a,b){try{return a[b]}catch(c){}};a.exports=function(a){var b,d,i;return a===c?"Undefined":null===a?"Null":"string"==typeof(d=h(b=Object(a),f))?d:g?e(b):"Object"==(i=e(b))&&"function"==typeof b.callee?"Arguments":i}},function(a,b,c){var d=c(6);d(d.P,"Function",{bind:c(75)})},function(a,b,c){var d=c(19),e=c(11),f=c(76),g=[].slice,h={},i=function(a,b,c){if(!(b in h)){for(var d=[],e=0;e2){b=s?b.trim():m(b,3);var c,d,e,f=b.charCodeAt(0);if(43===f||45===f){if(c=b.charCodeAt(2),88===c||120===c)return NaN}else if(48===f){switch(b.charCodeAt(1)){case 66:case 98:d=2,e=49;break;case 79:case 111:d=8,e=55;break;default:return+b}for(var g,i=b.slice(2),j=0,k=i.length;je)return NaN;return parseInt(i,d)}}return+b};if(!o(" 0o1")||!o("0b1")||o("+0x1")){o=function Number(a){var b=arguments.length<1?0:a,c=this;return c instanceof o&&(r?i(function(){q.valueOf.call(c)}):f(c)!=n)?g(new p(t(b)),c,o):t(b)};for(var u,v=c(4)?j(p):"MAX_VALUE,MIN_VALUE,NaN,NEGATIVE_INFINITY,POSITIVE_INFINITY,EPSILON,isFinite,isInteger,isNaN,isSafeInteger,MAX_SAFE_INTEGER,MIN_SAFE_INTEGER,parseFloat,parseInt,isInteger".split(","),w=0;v.length>w;w++)e(p,u=v[w])&&!e(o,u)&&l(o,u,k(p,u));o.prototype=q,q.constructor=o,c(16)(d,n,o)}},function(a,b,c){var d=c(11),e=c(71).set;a.exports=function(a,b,c){var f,g=b.constructor;return g!==c&&"function"==typeof g&&(f=g.prototype)!==c.prototype&&d(f)&&e&&e(a,f),a}},function(a,b,c){var d=c(6),e=c(33),f=c(5),g=c(82),h="["+g+"]",i="​…",j=RegExp("^"+h+h+"*"),k=RegExp(h+h+"*$"),l=function(a,b,c){var e={},h=f(function(){return!!g[a]()||i[a]()!=i}),j=e[a]=h?b(m):g[a];c&&(e[c]=j),d(d.P+d.F*h,"String",e)},m=l.trim=function(a,b){return a=String(e(a)),1&b&&(a=a.replace(j,"")),2&b&&(a=a.replace(k,"")),a};a.exports=l},function(a,b){a.exports="\t\n\x0B\f\r   ᠎              \u2028\u2029\ufeff"},function(a,b,c){var d=c(6),e=c(36),f=c(84),g=c(85),h=1..toFixed,i=Math.floor,j=[0,0,0,0,0,0],k="Number.toFixed: incorrect invocation!",l="0",m=function(a,b){for(var c=-1,d=b;++c<6;)d+=a*j[c],j[c]=d%1e7,d=i(d/1e7)},n=function(a){for(var b=6,c=0;--b>=0;)c+=j[b],j[b]=i(c/a),c=c%a*1e7},o=function(){for(var a=6,b="";--a>=0;)if(""!==b||0===a||0!==j[a]){var c=String(j[a]);b=""===b?c:b+g.call(l,7-c.length)+c}return b},p=function(a,b,c){return 0===b?c:b%2===1?p(a,b-1,c*a):p(a*a,b/2,c)},q=function(a){for(var b=0,c=a;c>=4096;)b+=12,c/=4096;for(;c>=2;)b+=1,c/=2;return b};d(d.P+d.F*(!!h&&("0.000"!==8e-5.toFixed(3)||"1"!==.9.toFixed(0)||"1.25"!==1.255.toFixed(2)||"1000000000000000128"!==(0xde0b6b3a7640080).toFixed(0))||!c(5)(function(){h.call({})})),"Number",{toFixed:function toFixed(a){var b,c,d,h,i=f(this,k),j=e(a),r="",s=l;if(j<0||j>20)throw RangeError(k);if(i!=i)return"NaN";if(i<=-1e21||i>=1e21)return String(i);if(i<0&&(r="-",i=-i),i>1e-21)if(b=q(i*p(2,69,1))-69,c=b<0?i*p(2,-b,1):i/p(2,b,1),c*=4503599627370496,b=52-b,b>0){for(m(0,c),d=j;d>=7;)m(1e7,0),d-=7;for(m(p(10,d,1),0),d=b-1;d>=23;)n(1<<23),d-=23;n(1<0?(h=s.length,s=r+(h<=j?"0."+g.call(l,j-h)+s:s.slice(0,h-j)+"."+s.slice(h-j))):s=r+s,s}})},function(a,b,c){var d=c(32);a.exports=function(a,b){if("number"!=typeof a&&"Number"!=d(a))throw TypeError(b);return+a}},function(a,b,c){var d=c(36),e=c(33);a.exports=function repeat(a){var b=String(e(this)),c="",f=d(a);if(f<0||f==1/0)throw RangeError("Count can't be negative");for(;f>0;(f>>>=1)&&(b+=b))1&f&&(c+=b);return c}},function(a,b,d){var e=d(6),f=d(5),g=d(84),h=1..toPrecision;e(e.P+e.F*(f(function(){return"1"!==h.call(1,c)})||!f(function(){h.call({})})),"Number",{toPrecision:function toPrecision(a){var b=g(this,"Number#toPrecision: incorrect invocation!");return a===c?h.call(b):h.call(b,a)}})},function(a,b,c){var d=c(6);d(d.S,"Number",{EPSILON:Math.pow(2,-52)})},function(a,b,c){var d=c(6),e=c(2).isFinite;d(d.S,"Number",{isFinite:function isFinite(a){return"number"==typeof a&&e(a)}})},function(a,b,c){var d=c(6);d(d.S,"Number",{isInteger:c(90)})},function(a,b,c){var d=c(11),e=Math.floor;a.exports=function isInteger(a){return!d(a)&&isFinite(a)&&e(a)===a}},function(a,b,c){var d=c(6);d(d.S,"Number",{isNaN:function isNaN(a){return a!=a}})},function(a,b,c){var d=c(6),e=c(90),f=Math.abs;d(d.S,"Number",{isSafeInteger:function isSafeInteger(a){return e(a)&&f(a)<=9007199254740991}})},function(a,b,c){var d=c(6);d(d.S,"Number",{MAX_SAFE_INTEGER:9007199254740991})},function(a,b,c){var d=c(6);d(d.S,"Number",{MIN_SAFE_INTEGER:-9007199254740991})},function(a,b,c){var d=c(6),e=c(96);d(d.S+d.F*(Number.parseFloat!=e),"Number",{parseFloat:e})},function(a,b,c){var d=c(2).parseFloat,e=c(81).trim;a.exports=1/d(c(82)+"-0")!==-(1/0)?function parseFloat(a){var b=e(String(a),3),c=d(b);return 0===c&&"-"==b.charAt(0)?-0:c}:d},function(a,b,c){var d=c(6),e=c(98);d(d.S+d.F*(Number.parseInt!=e),"Number",{parseInt:e})},function(a,b,c){var d=c(2).parseInt,e=c(81).trim,f=c(82),g=/^[\-+]?0[xX]/;a.exports=8!==d(f+"08")||22!==d(f+"0x16")?function parseInt(a,b){var c=e(String(a),3);return d(c,b>>>0||(g.test(c)?16:10))}:d},function(a,b,c){var d=c(6),e=c(98);d(d.G+d.F*(parseInt!=e),{parseInt:e})},function(a,b,c){var d=c(6),e=c(96);d(d.G+d.F*(parseFloat!=e),{parseFloat:e})},function(a,b,c){var d=c(6),e=c(102),f=Math.sqrt,g=Math.acosh;d(d.S+d.F*!(g&&710==Math.floor(g(Number.MAX_VALUE))&&g(1/0)==1/0),"Math",{acosh:function acosh(a){return(a=+a)<1?NaN:a>94906265.62425156?Math.log(a)+Math.LN2:e(a-1+f(a-1)*f(a+1))}})},function(a,b){a.exports=Math.log1p||function log1p(a){return(a=+a)>-1e-8&&a<1e-8?a-a*a/2:Math.log(1+a)}},function(a,b,c){function asinh(a){return isFinite(a=+a)&&0!=a?a<0?-asinh(-a):Math.log(a+Math.sqrt(a*a+1)):a}var d=c(6),e=Math.asinh;d(d.S+d.F*!(e&&1/e(0)>0),"Math",{asinh:asinh})},function(a,b,c){var d=c(6),e=Math.atanh;d(d.S+d.F*!(e&&1/e(-0)<0),"Math",{atanh:function atanh(a){return 0==(a=+a)?a:Math.log((1+a)/(1-a))/2}})},function(a,b,c){var d=c(6),e=c(106);d(d.S,"Math",{cbrt:function cbrt(a){return e(a=+a)*Math.pow(Math.abs(a),1/3)}})},function(a,b){a.exports=Math.sign||function sign(a){return 0==(a=+a)||a!=a?a:a<0?-1:1}},function(a,b,c){var d=c(6);d(d.S,"Math",{clz32:function clz32(a){return(a>>>=0)?31-Math.floor(Math.log(a+.5)*Math.LOG2E):32}})},function(a,b,c){var d=c(6),e=Math.exp;d(d.S,"Math",{cosh:function cosh(a){return(e(a=+a)+e(-a))/2}})},function(a,b,c){var d=c(6),e=c(110);d(d.S+d.F*(e!=Math.expm1),"Math",{expm1:e})},function(a,b){var c=Math.expm1;a.exports=!c||c(10)>22025.465794806718||c(10)<22025.465794806718||c(-2e-17)!=-2e-17?function expm1(a){return 0==(a=+a)?a:a>-1e-6&&a<1e-6?a+a*a/2:Math.exp(a)-1}:c},function(a,b,c){var d=c(6),e=c(106),f=Math.pow,g=f(2,-52),h=f(2,-23),i=f(2,127)*(2-h),j=f(2,-126),k=function(a){return a+1/g-1/g};d(d.S,"Math",{fround:function fround(a){var b,c,d=Math.abs(a),f=e(a);return di||c!=c?f*(1/0):f*c)}})},function(a,b,c){var d=c(6),e=Math.abs;d(d.S,"Math",{hypot:function hypot(a,b){for(var c,d,f=0,g=0,h=arguments.length,i=0;g0?(d=c/i,f+=d*d):f+=c;return i===1/0?1/0:i*Math.sqrt(f)}})},function(a,b,c){var d=c(6),e=Math.imul;d(d.S+d.F*c(5)(function(){return e(4294967295,5)!=-5||2!=e.length}),"Math",{imul:function imul(a,b){var c=65535,d=+a,e=+b,f=c&d,g=c&e;return 0|f*g+((c&d>>>16)*g+f*(c&e>>>16)<<16>>>0)}})},function(a,b,c){var d=c(6);d(d.S,"Math",{log10:function log10(a){return Math.log(a)/Math.LN10}})},function(a,b,c){var d=c(6);d(d.S,"Math",{log1p:c(102)})},function(a,b,c){var d=c(6);d(d.S,"Math",{log2:function log2(a){return Math.log(a)/Math.LN2}})},function(a,b,c){var d=c(6);d(d.S,"Math",{sign:c(106)})},function(a,b,c){var d=c(6),e=c(110),f=Math.exp;d(d.S+d.F*c(5)(function(){return!Math.sinh(-2e-17)!=-2e-17}),"Math",{sinh:function sinh(a){return Math.abs(a=+a)<1?(e(a)-e(-a))/2:(f(a-1)-f(-a-1))*(Math.E/2)}})},function(a,b,c){var d=c(6),e=c(110),f=Math.exp;d(d.S,"Math",{tanh:function tanh(a){var b=e(a=+a),c=e(-a);return b==1/0?1:c==1/0?-1:(b-c)/(f(a)+f(-a))}})},function(a,b,c){var d=c(6);d(d.S,"Math",{trunc:function trunc(a){return(a>0?Math.floor:Math.ceil)(a)}})},function(a,b,c){var d=c(6),e=c(37),f=String.fromCharCode,g=String.fromCodePoint;d(d.S+d.F*(!!g&&1!=g.length),"String",{fromCodePoint:function fromCodePoint(a){for(var b,c=[],d=arguments.length,g=0;d>g;){if(b=+arguments[g++],e(b,1114111)!==b)throw RangeError(b+" is not a valid code point");c.push(b<65536?f(b):f(((b-=65536)>>10)+55296,b%1024+56320))}return c.join("")}})},function(a,b,c){var d=c(6),e=c(30),f=c(35);d(d.S,"String",{raw:function raw(a){for(var b=e(a.raw),c=f(b.length),d=arguments.length,g=[],h=0;c>h;)g.push(String(b[h++])),h=k?a?"":c:(g=i.charCodeAt(j),g<55296||g>56319||j+1===k||(h=i.charCodeAt(j+1))<56320||h>57343?a?i.charAt(j):g:a?i.slice(j,j+2):(g-55296<<10)+(h-56320)+65536)}}},function(a,b,d){var e=d(6),f=d(35),g=d(127),h="endsWith",i=""[h];e(e.P+e.F*d(129)(h),"String",{endsWith:function endsWith(a){var b=g(this,a,h),d=arguments.length>1?arguments[1]:c,e=f(b.length),j=d===c?e:Math.min(f(d),e),k=String(a);return i?i.call(b,k,j):b.slice(j-k.length,j)===k}})},function(a,b,c){var d=c(128),e=c(33);a.exports=function(a,b,c){if(d(b))throw TypeError("String#"+c+" doesn't accept regex!");return String(e(a))}},function(a,b,d){var e=d(11),f=d(32),g=d(23)("match");a.exports=function(a){var b;return e(a)&&((b=a[g])!==c?!!b:"RegExp"==f(a))}},function(a,b,c){var d=c(23)("match");a.exports=function(a){var b=/./;try{"/./"[a](b)}catch(c){try{return b[d]=!1,!"/./"[a](b)}catch(e){}}return!0}},function(a,b,d){var e=d(6),f=d(127),g="includes";e(e.P+e.F*d(129)(g),"String",{includes:function includes(a){return!!~f(this,a,g).indexOf(a,arguments.length>1?arguments[1]:c)}})},function(a,b,c){var d=c(6);d(d.P,"String",{repeat:c(85)})},function(a,b,d){var e=d(6),f=d(35),g=d(127),h="startsWith",i=""[h];e(e.P+e.F*d(129)(h),"String",{startsWith:function startsWith(a){var b=g(this,a,h),d=f(Math.min(arguments.length>1?arguments[1]:c,b.length)),e=String(a);return i?i.call(b,e,d):b.slice(d,d+e.length)===e}})},function(a,b,d){var e=d(125)(!0);d(134)(String,"String",function(a){this._t=String(a),this._i=0},function(){var a,b=this._t,d=this._i;return d>=b.length?{value:c,done:!0}:(a=e(b,d),this._i+=a.length,{value:a,done:!1})})},function(a,b,d){var e=d(26),f=d(6),g=d(16),h=d(8),i=d(3),j=d(135),k=d(136),l=d(22),m=d(57),n=d(23)("iterator"),o=!([].keys&&"next"in[].keys()),p="@@iterator",q="keys",r="values",s=function(){return this};a.exports=function(a,b,d,t,u,v,w){k(d,b,t);var x,y,z,A=function(a){if(!o&&a in E)return E[a];switch(a){case q:return function keys(){return new d(this,a)};case r:return function values(){return new d(this,a)}}return function entries(){return new d(this,a)}},B=b+" Iterator",C=u==r,D=!1,E=a.prototype,F=E[n]||E[p]||u&&E[u],G=F||A(u),H=u?C?A("entries"):G:c,I="Array"==b?E.entries||F:F;if(I&&(z=m(I.call(new a)),z!==Object.prototype&&(l(z,B,!0),e||i(z,n)||h(z,n,s))),C&&F&&F.name!==r&&(D=!0,G=function values(){return F.call(this)}),e&&!w||!o&&!D&&E[n]||h(E,n,G),j[b]=G,j[B]=s,u)if(x={values:C?G:A(r),keys:v?G:A(q),entries:H},w)for(y in x)y in E||g(E,y,x[y]);else f(f.P+f.F*(o||D),b,x);return x}},function(a,b){a.exports={}},function(a,b,c){var d=c(44),e=c(15),f=c(22),g={};c(8)(g,c(23)("iterator"),function(){return this}),a.exports=function(a,b,c){a.prototype=d(g,{next:e(1,c)}),f(a,b+" Iterator")}},function(a,b,c){c(138)("anchor",function(a){return function anchor(b){return a(this,"a","name",b)}})},function(a,b,c){var d=c(6),e=c(5),f=c(33),g=/"/g,h=function(a,b,c,d){var e=String(f(a)),h="<"+b;return""!==c&&(h+=" "+c+'="'+String(d).replace(g,""")+'"'),h+">"+e+""};a.exports=function(a,b){var c={};c[a]=b(h),d(d.P+d.F*e(function(){var b=""[a]('"');return b!==b.toLowerCase()||b.split('"').length>3}),"String",c)}},function(a,b,c){c(138)("big",function(a){return function big(){return a(this,"big","","")}})},function(a,b,c){c(138)("blink",function(a){return function blink(){return a(this,"blink","","")}})},function(a,b,c){c(138)("bold",function(a){return function bold(){return a(this,"b","","")}})},function(a,b,c){c(138)("fixed",function(a){return function fixed(){return a(this,"tt","","")}})},function(a,b,c){c(138)("fontcolor",function(a){return function fontcolor(b){return a(this,"font","color",b)}})},function(a,b,c){c(138)("fontsize",function(a){return function fontsize(b){return a(this,"font","size",b)}})},function(a,b,c){c(138)("italics",function(a){return function italics(){return a(this,"i","","")}})},function(a,b,c){c(138)("link",function(a){return function link(b){return a(this,"a","href",b)}})},function(a,b,c){c(138)("small",function(a){return function small(){return a(this,"small","","")}})},function(a,b,c){c(138)("strike",function(a){return function strike(){return a(this,"strike","","")}})},function(a,b,c){c(138)("sub",function(a){return function sub(){return a(this,"sub","","")}})},function(a,b,c){c(138)("sup",function(a){return function sup(){return a(this,"sup","","")}})},function(a,b,c){var d=c(6);d(d.S,"Array",{isArray:c(43)})},function(a,b,d){var e=d(18),f=d(6),g=d(56),h=d(153),i=d(154),j=d(35),k=d(155),l=d(156);f(f.S+f.F*!d(157)(function(a){Array.from(a)}),"Array",{from:function from(a){var b,d,f,m,n=g(a),o="function"==typeof this?this:Array,p=arguments.length,q=p>1?arguments[1]:c,r=q!==c,s=0,t=l(n);if(r&&(q=e(q,p>2?arguments[2]:c,2)),t==c||o==Array&&i(t))for(b=j(n.length),d=new o(b);b>s;s++)k(d,s,r?q(n[s],s):n[s]);else for(m=t.call(n),d=new o;!(f=m.next()).done;s++)k(d,s,r?h(m,q,[f.value,s],!0):f.value);return d.length=s,d}})},function(a,b,d){var e=d(10);a.exports=function(a,b,d,f){try{return f?b(e(d)[0],d[1]):b(d)}catch(g){var h=a["return"];throw h!==c&&e(h.call(a)),g}}},function(a,b,d){var e=d(135),f=d(23)("iterator"),g=Array.prototype;a.exports=function(a){return a!==c&&(e.Array===a||g[f]===a)}},function(a,b,c){var d=c(9),e=c(15);a.exports=function(a,b,c){b in a?d.f(a,b,e(0,c)):a[b]=c}},function(a,b,d){var e=d(73),f=d(23)("iterator"),g=d(135);a.exports=d(7).getIteratorMethod=function(a){ if(a!=c)return a[f]||a["@@iterator"]||g[e(a)]}},function(a,b,c){var d=c(23)("iterator"),e=!1;try{var f=[7][d]();f["return"]=function(){e=!0},Array.from(f,function(){throw 2})}catch(g){}a.exports=function(a,b){if(!b&&!e)return!1;var c=!1;try{var f=[7],g=f[d]();g.next=function(){return{done:c=!0}},f[d]=function(){return g},a(f)}catch(h){}return c}},function(a,b,c){var d=c(6),e=c(155);d(d.S+d.F*c(5)(function(){function F(){}return!(Array.of.call(F)instanceof F)}),"Array",{of:function of(){for(var a=0,b=arguments.length,c=new("function"==typeof this?this:Array)(b);b>a;)e(c,a,arguments[a++]);return c.length=b,c}})},function(a,b,d){var e=d(6),f=d(30),g=[].join;e(e.P+e.F*(d(31)!=Object||!d(160)(g)),"Array",{join:function join(a){return g.call(f(this),a===c?",":a)}})},function(a,b,c){var d=c(5);a.exports=function(a,b){return!!a&&d(function(){b?a.call(null,function(){},1):a.call(null)})}},function(a,b,d){var e=d(6),f=d(46),g=d(32),h=d(37),i=d(35),j=[].slice;e(e.P+e.F*d(5)(function(){f&&j.call(f)}),"Array",{slice:function slice(a,b){var d=i(this.length),e=g(this);if(b=b===c?d:b,"Array"==e)return j.call(this,a,b);for(var f=h(a,d),k=h(b,d),l=i(k-f),m=Array(l),n=0;nw;w++)if((n||w in t)&&(q=t[w],r=u(q,w,s),a))if(d)x[w]=r;else if(r)switch(a){case 3:return!0;case 5:return q;case 6:return w;case 2:x.push(q)}else if(l)return!1;return m?-1:k||l?l:x}}},function(a,b,c){var d=c(166);a.exports=function(a,b){return new(d(a))(b)}},function(a,b,d){var e=d(11),f=d(43),g=d(23)("species");a.exports=function(a){var b;return f(a)&&(b=a.constructor,"function"!=typeof b||b!==Array&&!f(b.prototype)||(b=c),e(b)&&(b=b[g],null===b&&(b=c))),b===c?Array:b}},function(a,b,c){var d=c(6),e=c(164)(1);d(d.P+d.F*!c(160)([].map,!0),"Array",{map:function map(a){return e(this,a,arguments[1])}})},function(a,b,c){var d=c(6),e=c(164)(2);d(d.P+d.F*!c(160)([].filter,!0),"Array",{filter:function filter(a){return e(this,a,arguments[1])}})},function(a,b,c){var d=c(6),e=c(164)(3);d(d.P+d.F*!c(160)([].some,!0),"Array",{some:function some(a){return e(this,a,arguments[1])}})},function(a,b,c){var d=c(6),e=c(164)(4);d(d.P+d.F*!c(160)([].every,!0),"Array",{every:function every(a){return e(this,a,arguments[1])}})},function(a,b,c){var d=c(6),e=c(172);d(d.P+d.F*!c(160)([].reduce,!0),"Array",{reduce:function reduce(a){return e(this,a,arguments.length,arguments[1],!1)}})},function(a,b,c){var d=c(19),e=c(56),f=c(31),g=c(35);a.exports=function(a,b,c,h,i){d(b);var j=e(a),k=f(j),l=g(j.length),m=i?l-1:0,n=i?-1:1;if(c<2)for(;;){if(m in k){h=k[m],m+=n;break}if(m+=n,i?m<0:l<=m)throw TypeError("Reduce of empty array with no initial value")}for(;i?m>=0:l>m;m+=n)m in k&&(h=b(h,k[m],m,j));return h}},function(a,b,c){var d=c(6),e=c(172);d(d.P+d.F*!c(160)([].reduceRight,!0),"Array",{reduceRight:function reduceRight(a){return e(this,a,arguments.length,arguments[1],!0)}})},function(a,b,c){var d=c(6),e=c(34)(!1),f=[].indexOf,g=!!f&&1/[1].indexOf(1,-0)<0;d(d.P+d.F*(g||!c(160)(f)),"Array",{indexOf:function indexOf(a){return g?f.apply(this,arguments)||0:e(this,a,arguments[1])}})},function(a,b,c){var d=c(6),e=c(30),f=c(36),g=c(35),h=[].lastIndexOf,i=!!h&&1/[1].lastIndexOf(1,-0)<0;d(d.P+d.F*(i||!c(160)(h)),"Array",{lastIndexOf:function lastIndexOf(a){if(i)return h.apply(this,arguments)||0;var b=e(this),c=g(b.length),d=c-1;for(arguments.length>1&&(d=Math.min(d,f(arguments[1]))),d<0&&(d=c+d);d>=0;d--)if(d in b&&b[d]===a)return d||0;return-1}})},function(a,b,c){var d=c(6);d(d.P,"Array",{copyWithin:c(177)}),c(178)("copyWithin")},function(a,b,d){var e=d(56),f=d(37),g=d(35);a.exports=[].copyWithin||function copyWithin(a,b){var d=e(this),h=g(d.length),i=f(a,h),j=f(b,h),k=arguments.length>2?arguments[2]:c,l=Math.min((k===c?h:f(k,h))-j,h-i),m=1;for(j0;)j in d?d[i]=d[j]:delete d[i],i+=m,j+=m;return d}},function(a,b,d){var e=d(23)("unscopables"),f=Array.prototype;f[e]==c&&d(8)(f,e,{}),a.exports=function(a){f[e][a]=!0}},function(a,b,c){var d=c(6);d(d.P,"Array",{fill:c(180)}),c(178)("fill")},function(a,b,d){var e=d(56),f=d(37),g=d(35);a.exports=function fill(a){for(var b=e(this),d=g(b.length),h=arguments.length,i=f(h>1?arguments[1]:c,d),j=h>2?arguments[2]:c,k=j===c?d:f(j,d);k>i;)b[i++]=a;return b}},function(a,b,d){var e=d(6),f=d(164)(5),g="find",h=!0;g in[]&&Array(1)[g](function(){h=!1}),e(e.P+e.F*h,"Array",{find:function find(a){return f(this,a,arguments.length>1?arguments[1]:c)}}),d(178)(g)},function(a,b,d){var e=d(6),f=d(164)(6),g="findIndex",h=!0;g in[]&&Array(1)[g](function(){h=!1}),e(e.P+e.F*h,"Array",{findIndex:function findIndex(a){return f(this,a,arguments.length>1?arguments[1]:c)}}),d(178)(g)},function(a,b,d){var e=d(178),f=d(184),g=d(135),h=d(30);a.exports=d(134)(Array,"Array",function(a,b){this._t=h(a),this._i=0,this._k=b},function(){var a=this._t,b=this._k,d=this._i++;return!a||d>=a.length?(this._t=c,f(1)):"keys"==b?f(0,d):"values"==b?f(0,a[d]):f(0,[d,a[d]])},"values"),g.Arguments=g.Array,e("keys"),e("values"),e("entries")},function(a,b){a.exports=function(a,b){return{value:b,done:!!a}}},function(a,b,c){c(186)("Array")},function(a,b,c){var d=c(2),e=c(9),f=c(4),g=c(23)("species");a.exports=function(a){var b=d[a];f&&b&&!b[g]&&e.f(b,g,{configurable:!0,get:function(){return this}})}},function(a,b,d){var e=d(2),f=d(80),g=d(9).f,h=d(48).f,i=d(128),j=d(188),k=e.RegExp,l=k,m=k.prototype,n=/a/g,o=/a/g,p=new k(n)!==n;if(d(4)&&(!p||d(5)(function(){return o[d(23)("match")]=!1,k(n)!=n||k(o)==o||"/a/i"!=k(n,"i")}))){k=function RegExp(a,b){var d=this instanceof k,e=i(a),g=b===c;return!d&&e&&a.constructor===k&&g?a:f(p?new l(e&&!g?a.source:a,b):l((e=a instanceof k)?a.source:a,e&&g?j.call(a):b),d?this:m,k)};for(var q=(function(a){a in k||g(k,a,{configurable:!0,get:function(){return l[a]},set:function(b){l[a]=b}})}),r=h(l),s=0;r.length>s;)q(r[s++]);m.constructor=k,k.prototype=m,d(16)(e,"RegExp",k)}d(186)("RegExp")},function(a,b,c){var d=c(10);a.exports=function(){var a=d(this),b="";return a.global&&(b+="g"),a.ignoreCase&&(b+="i"),a.multiline&&(b+="m"),a.unicode&&(b+="u"),a.sticky&&(b+="y"),b}},function(a,b,d){d(190);var e=d(10),f=d(188),g=d(4),h="toString",i=/./[h],j=function(a){d(16)(RegExp.prototype,h,a,!0)};d(5)(function(){return"/a/b"!=i.call({source:"a",flags:"b"})})?j(function toString(){var a=e(this);return"/".concat(a.source,"/","flags"in a?a.flags:!g&&a instanceof RegExp?f.call(a):c)}):i.name!=h&&j(function toString(){return i.call(this)})},function(a,b,c){c(4)&&"g"!=/./g.flags&&c(9).f(RegExp.prototype,"flags",{configurable:!0,get:c(188)})},function(a,b,d){d(192)("match",1,function(a,b,d){return[function match(d){var e=a(this),f=d==c?c:d[b];return f!==c?f.call(d,e):new RegExp(d)[b](String(e))},d]})},function(a,b,c){var d=c(8),e=c(16),f=c(5),g=c(33),h=c(23);a.exports=function(a,b,c){var i=h(a),j=c(g,i,""[a]),k=j[0],l=j[1];f(function(){var b={};return b[i]=function(){return 7},7!=""[a](b)})&&(e(String.prototype,a,k),d(RegExp.prototype,i,2==b?function(a,b){return l.call(a,this,b)}:function(a){return l.call(a,this)}))}},function(a,b,d){d(192)("replace",2,function(a,b,d){return[function replace(e,f){var g=a(this),h=e==c?c:e[b];return h!==c?h.call(e,g,f):d.call(String(g),e,f)},d]})},function(a,b,d){d(192)("search",1,function(a,b,d){return[function search(d){var e=a(this),f=d==c?c:d[b];return f!==c?f.call(d,e):new RegExp(d)[b](String(e))},d]})},function(a,b,d){d(192)("split",2,function(a,b,e){var f=d(128),g=e,h=[].push,i="split",j="length",k="lastIndex";if("c"=="abbc"[i](/(b)*/)[1]||4!="test"[i](/(?:)/,-1)[j]||2!="ab"[i](/(?:ab)*/)[j]||4!="."[i](/(.?)(.?)/)[j]||"."[i](/()()/)[j]>1||""[i](/.?/)[j]){var l=/()??/.exec("")[1]===c;e=function(a,b){var d=String(this);if(a===c&&0===b)return[];if(!f(a))return g.call(d,a,b);var e,i,m,n,o,p=[],q=(a.ignoreCase?"i":"")+(a.multiline?"m":"")+(a.unicode?"u":"")+(a.sticky?"y":""),r=0,s=b===c?4294967295:b>>>0,t=new RegExp(a.source,q+"g");for(l||(e=new RegExp("^"+t.source+"$(?!\\s)",q));(i=t.exec(d))&&(m=i.index+i[0][j],!(m>r&&(p.push(d.slice(r,i.index)),!l&&i[j]>1&&i[0].replace(e,function(){for(o=1;o1&&i.index=s)));)t[k]===i.index&&t[k]++;return r===d[j]?!n&&t.test("")||p.push(""):p.push(d.slice(r)),p[j]>s?p.slice(0,s):p}}else"0"[i](c,0)[j]&&(e=function(a,b){return a===c&&0===b?[]:g.call(this,a,b)});return[function split(d,f){var g=a(this),h=d==c?c:d[b];return h!==c?h.call(d,g,f):e.call(String(g),d,f)},e]})},function(a,b,d){var e,f,g,h=d(26),i=d(2),j=d(18),k=d(73),l=d(6),m=d(11),n=d(19),o=d(197),p=d(198),q=d(199),r=d(200).set,s=d(201)(),t="Promise",u=i.TypeError,v=i.process,w=i[t],v=i.process,x="process"==k(v),y=function(){},z=!!function(){try{var a=w.resolve(1),b=(a.constructor={})[d(23)("species")]=function(a){a(y,y)};return(x||"function"==typeof PromiseRejectionEvent)&&a.then(y)instanceof b}catch(c){}}(),A=function(a,b){return a===b||a===w&&b===g},B=function(a){var b;return!(!m(a)||"function"!=typeof(b=a.then))&&b},C=function(a){return A(w,a)?new D(a):new f(a)},D=f=function(a){var b,d;this.promise=new a(function(a,e){if(b!==c||d!==c)throw u("Bad Promise constructor");b=a,d=e}),this.resolve=n(b),this.reject=n(d)},E=function(a){try{a()}catch(b){return{error:b}}},F=function(a,b){if(!a._n){a._n=!0;var c=a._c;s(function(){for(var d=a._v,e=1==a._s,f=0,g=function(b){var c,f,g=e?b.ok:b.fail,h=b.resolve,i=b.reject,j=b.domain;try{g?(e||(2==a._h&&I(a),a._h=1),g===!0?c=d:(j&&j.enter(),c=g(d),j&&j.exit()),c===b.promise?i(u("Promise-chain cycle")):(f=B(c))?f.call(c,h,i):h(c)):i(d)}catch(k){i(k)}};c.length>f;)g(c[f++]);a._c=[],a._n=!1,b&&!a._h&&G(a)})}},G=function(a){r.call(i,function(){var b,d,e,f=a._v;if(H(a)&&(b=E(function(){x?v.emit("unhandledRejection",f,a):(d=i.onunhandledrejection)?d({promise:a,reason:f}):(e=i.console)&&e.error&&e.error("Unhandled promise rejection",f)}),a._h=x||H(a)?2:1),a._a=c,b)throw b.error})},H=function(a){if(1==a._h)return!1;for(var b,c=a._a||a._c,d=0;c.length>d;)if(b=c[d++],b.fail||!H(b.promise))return!1;return!0},I=function(a){r.call(i,function(){var b;x?v.emit("rejectionHandled",a):(b=i.onrejectionhandled)&&b({promise:a,reason:a._v})})},J=function(a){var b=this;b._d||(b._d=!0,b=b._w||b,b._v=a,b._s=2,b._a||(b._a=b._c.slice()),F(b,!0))},K=function(a){var b,c=this;if(!c._d){c._d=!0,c=c._w||c;try{if(c===a)throw u("Promise can't be resolved itself");(b=B(a))?s(function(){var d={_w:c,_d:!1};try{b.call(a,j(K,d,1),j(J,d,1))}catch(e){J.call(d,e)}}):(c._v=a,c._s=1,F(c,!1))}catch(d){J.call({_w:c,_d:!1},d)}}};z||(w=function Promise(a){o(this,w,t,"_h"),n(a),e.call(this);try{a(j(K,this,1),j(J,this,1))}catch(b){J.call(this,b)}},e=function Promise(a){this._c=[],this._a=c,this._s=0,this._d=!1,this._v=c,this._h=0,this._n=!1},e.prototype=d(202)(w.prototype,{then:function then(a,b){var d=C(q(this,w));return d.ok="function"!=typeof a||a,d.fail="function"==typeof b&&b,d.domain=x?v.domain:c,this._c.push(d),this._a&&this._a.push(d),this._s&&F(this,!1),d.promise},"catch":function(a){return this.then(c,a)}}),D=function(){var a=new e;this.promise=a,this.resolve=j(K,a,1),this.reject=j(J,a,1)}),l(l.G+l.W+l.F*!z,{Promise:w}),d(22)(w,t),d(186)(t),g=d(7)[t],l(l.S+l.F*!z,t,{reject:function reject(a){var b=C(this),c=b.reject;return c(a),b.promise}}),l(l.S+l.F*(h||!z),t,{resolve:function resolve(a){if(a instanceof w&&A(a.constructor,this))return a;var b=C(this),c=b.resolve;return c(a),b.promise}}),l(l.S+l.F*!(z&&d(157)(function(a){w.all(a)["catch"](y)})),t,{all:function all(a){var b=this,d=C(b),e=d.resolve,f=d.reject,g=E(function(){var d=[],g=0,h=1;p(a,!1,function(a){var i=g++,j=!1;d.push(c),h++,b.resolve(a).then(function(a){j||(j=!0,d[i]=a,--h||e(d))},f)}),--h||e(d)});return g&&f(g.error),d.promise},race:function race(a){var b=this,c=C(b),d=c.reject,e=E(function(){p(a,!1,function(a){b.resolve(a).then(c.resolve,d)})});return e&&d(e.error),c.promise}})},function(a,b){a.exports=function(a,b,d,e){if(!(a instanceof b)||e!==c&&e in a)throw TypeError(d+": incorrect invocation!");return a}},function(a,b,c){var d=c(18),e=c(153),f=c(154),g=c(10),h=c(35),i=c(156),j={},k={},b=a.exports=function(a,b,c,l,m){var n,o,p,q,r=m?function(){return a}:i(a),s=d(c,l,b?2:1),t=0;if("function"!=typeof r)throw TypeError(a+" is not iterable!");if(f(r)){for(n=h(a.length);n>t;t++)if(q=b?s(g(o=a[t])[0],o[1]):s(a[t]),q===j||q===k)return q}else for(p=r.call(a);!(o=p.next()).done;)if(q=e(p,s,o.value,b),q===j||q===k)return q};b.BREAK=j,b.RETURN=k},function(a,b,d){var e=d(10),f=d(19),g=d(23)("species");a.exports=function(a,b){var d,h=e(a).constructor;return h===c||(d=e(h)[g])==c?b:f(d)}},function(a,b,c){var d,e,f,g=c(18),h=c(76),i=c(46),j=c(13),k=c(2),l=k.process,m=k.setImmediate,n=k.clearImmediate,o=k.MessageChannel,p=0,q={},r="onreadystatechange",s=function(){var a=+this;if(q.hasOwnProperty(a)){var b=q[a];delete q[a],b()}},t=function(a){s.call(a.data)};m&&n||(m=function setImmediate(a){for(var b=[],c=1;arguments.length>c;)b.push(arguments[c++]);return q[++p]=function(){h("function"==typeof a?a:Function(a),b)},d(p),p},n=function clearImmediate(a){delete q[a]},"process"==c(32)(l)?d=function(a){l.nextTick(g(s,a,1))}:o?(e=new o,f=e.port2,e.port1.onmessage=t,d=g(f.postMessage,f,1)):k.addEventListener&&"function"==typeof postMessage&&!k.importScripts?(d=function(a){k.postMessage(a+"","*")},k.addEventListener("message",t,!1)):d=r in j("script")?function(a){i.appendChild(j("script"))[r]=function(){i.removeChild(this),s.call(a)}}:function(a){setTimeout(g(s,a,1),0)}),a.exports={set:m,clear:n}},function(a,b,d){var e=d(2),f=d(200).set,g=e.MutationObserver||e.WebKitMutationObserver,h=e.process,i=e.Promise,j="process"==d(32)(h);a.exports=function(){var a,b,d,k=function(){var e,f;for(j&&(e=h.domain)&&e.exit();a;){f=a.fn,a=a.next;try{f()}catch(g){throw a?d():b=c,g}}b=c,e&&e.enter()};if(j)d=function(){h.nextTick(k)};else if(g){var l=!0,m=document.createTextNode("");new g(k).observe(m,{characterData:!0}),d=function(){m.data=l=!l}}else if(i&&i.resolve){var n=i.resolve();d=function(){n.then(k)}}else d=function(){f.call(e,k)};return function(e){var f={fn:e,next:c};b&&(b.next=f),a||(a=f,d()),b=f}}},function(a,b,c){var d=c(16);a.exports=function(a,b,c){for(var e in b)d(a,e,b[e],c);return a}},function(a,b,d){var e=d(204);a.exports=d(205)("Map",function(a){return function Map(){return a(this,arguments.length>0?arguments[0]:c)}},{get:function get(a){var b=e.getEntry(this,a);return b&&b.v},set:function set(a,b){return e.def(this,0===a?0:a,b)}},e,!0)},function(a,b,d){var e=d(9).f,f=d(44),g=d(202),h=d(18),i=d(197),j=d(33),k=d(198),l=d(134),m=d(184),n=d(186),o=d(4),p=d(20).fastKey,q=o?"_s":"size",r=function(a,b){var c,d=p(b);if("F"!==d)return a._i[d];for(c=a._f;c;c=c.n)if(c.k==b)return c};a.exports={getConstructor:function(a,b,d,l){var m=a(function(a,e){i(a,m,b,"_i"),a._i=f(null),a._f=c,a._l=c,a[q]=0,e!=c&&k(e,d,a[l],a)});return g(m.prototype,{clear:function clear(){for(var a=this,b=a._i,d=a._f;d;d=d.n)d.r=!0,d.p&&(d.p=d.p.n=c),delete b[d.i];a._f=a._l=c,a[q]=0},"delete":function(a){var b=this,c=r(b,a);if(c){var d=c.n,e=c.p;delete b._i[c.i],c.r=!0,e&&(e.n=d),d&&(d.p=e),b._f==c&&(b._f=d),b._l==c&&(b._l=e),b[q]--}return!!c},forEach:function forEach(a){i(this,m,"forEach");for(var b,d=h(a,arguments.length>1?arguments[1]:c,3);b=b?b.n:this._f;)for(d(b.v,b.k,this);b&&b.r;)b=b.p},has:function has(a){return!!r(this,a)}}),o&&e(m.prototype,"size",{get:function(){return j(this[q])}}),m},def:function(a,b,d){var e,f,g=r(a,b);return g?g.v=d:(a._l=g={i:f=p(b,!0),k:b,v:d,p:e=a._l,n:c,r:!1},a._f||(a._f=g),e&&(e.n=g),a[q]++,"F"!==f&&(a._i[f]=g)),a},getEntry:r,setStrong:function(a,b,d){l(a,b,function(a,b){this._t=a,this._k=b,this._l=c},function(){for(var a=this,b=a._k,d=a._l;d&&d.r;)d=d.p;return a._t&&(a._l=d=d?d.n:a._t._f)?"keys"==b?m(0,d.k):"values"==b?m(0,d.v):m(0,[d.k,d.v]):(a._t=c,m(1))},d?"entries":"values",!d,!0),n(b)}}},function(a,b,d){var e=d(2),f=d(6),g=d(16),h=d(202),i=d(20),j=d(198),k=d(197),l=d(11),m=d(5),n=d(157),o=d(22),p=d(80);a.exports=function(a,b,d,q,r,s){var t=e[a],u=t,v=r?"set":"add",w=u&&u.prototype,x={},y=function(a){var b=w[a];g(w,a,"delete"==a?function(a){return!(s&&!l(a))&&b.call(this,0===a?0:a)}:"has"==a?function has(a){return!(s&&!l(a))&&b.call(this,0===a?0:a)}:"get"==a?function get(a){return s&&!l(a)?c:b.call(this,0===a?0:a)}:"add"==a?function add(a){return b.call(this,0===a?0:a),this}:function set(a,c){return b.call(this,0===a?0:a,c),this})};if("function"==typeof u&&(s||w.forEach&&!m(function(){(new u).entries().next()}))){var z=new u,A=z[v](s?{}:-0,1)!=z,B=m(function(){z.has(1)}),C=n(function(a){new u(a)}),D=!s&&m(function(){for(var a=new u,b=5;b--;)a[v](b,b);return!a.has(-0)});C||(u=b(function(b,d){k(b,u,a);var e=p(new t,b,u);return d!=c&&j(d,r,e[v],e),e}),u.prototype=w,w.constructor=u),(B||D)&&(y("delete"),y("has"),r&&y("get")),(D||A)&&y(v),s&&w.clear&&delete w.clear}else u=q.getConstructor(b,a,r,v),h(u.prototype,d),i.NEED=!0;return o(u,a),x[a]=u,f(f.G+f.W+f.F*(u!=t),x),s||q.setStrong(u,a,r),u}},function(a,b,d){var e=d(204);a.exports=d(205)("Set",function(a){return function Set(){return a(this,arguments.length>0?arguments[0]:c)}},{add:function add(a){return e.def(this,a=0===a?0:a,a)}},e)},function(a,b,d){var e,f=d(164)(0),g=d(16),h=d(20),i=d(67),j=d(208),k=d(11),l=h.getWeak,m=Object.isExtensible,n=j.ufstore,o={},p=function(a){return function WeakMap(){return a(this,arguments.length>0?arguments[0]:c)}},q={get:function get(a){if(k(a)){var b=l(a);return b===!0?n(this).get(a):b?b[this._i]:c}},set:function set(a,b){return j.def(this,a,b)}},r=a.exports=d(205)("WeakMap",p,q,j,!0,!0);7!=(new r).set((Object.freeze||Object)(o),7).get(o)&&(e=j.getConstructor(p),i(e.prototype,q),h.NEED=!0,f(["delete","has","get","set"],function(a){var b=r.prototype,c=b[a];g(b,a,function(b,d){if(k(b)&&!m(b)){this._f||(this._f=new e);var f=this._f[a](b,d);return"set"==a?this:f}return c.call(this,b,d)})}))},function(a,b,d){var e=d(202),f=d(20).getWeak,g=d(10),h=d(11),i=d(197),j=d(198),k=d(164),l=d(3),m=k(5),n=k(6),o=0,p=function(a){return a._l||(a._l=new q)},q=function(){this.a=[]},r=function(a,b){return m(a.a,function(a){return a[0]===b})};q.prototype={get:function(a){var b=r(this,a);if(b)return b[1]},has:function(a){return!!r(this,a)},set:function(a,b){var c=r(this,a);c?c[1]=b:this.a.push([a,b])},"delete":function(a){var b=n(this.a,function(b){return b[0]===a});return~b&&this.a.splice(b,1),!!~b}},a.exports={getConstructor:function(a,b,d,g){var k=a(function(a,e){i(a,k,b,"_i"),a._i=o++,a._l=c,e!=c&&j(e,d,a[g],a)});return e(k.prototype,{"delete":function(a){if(!h(a))return!1;var b=f(a);return b===!0?p(this)["delete"](a):b&&l(b,this._i)&&delete b[this._i]},has:function has(a){if(!h(a))return!1;var b=f(a);return b===!0?p(this).has(a):b&&l(b,this._i)}}),k},def:function(a,b,c){var d=f(g(b),!0);return d===!0?p(a).set(b,c):d[a._i]=c,a},ufstore:p}},function(a,b,d){var e=d(208);d(205)("WeakSet",function(a){return function WeakSet(){return a(this,arguments.length>0?arguments[0]:c)}},{add:function add(a){return e.def(this,a,!0)}},e,!1,!0)},function(a,b,c){var d=c(6),e=c(19),f=c(10),g=(c(2).Reflect||{}).apply,h=Function.apply;d(d.S+d.F*!c(5)(function(){g(function(){})}),"Reflect",{apply:function apply(a,b,c){var d=e(a),i=f(c);return g?g(d,b,i):h.call(d,b,i)}})},function(a,b,c){var d=c(6),e=c(44),f=c(19),g=c(10),h=c(11),i=c(5),j=c(75),k=(c(2).Reflect||{}).construct,l=i(function(){function F(){}return!(k(function(){},[],F)instanceof F)}),m=!i(function(){k(function(){})});d(d.S+d.F*(l||m),"Reflect",{construct:function construct(a,b){f(a),g(b);var c=arguments.length<3?a:f(arguments[2]);if(m&&!l)return k(a,b,c);if(a==c){switch(b.length){case 0:return new a;case 1:return new a(b[0]);case 2:return new a(b[0],b[1]);case 3:return new a(b[0],b[1],b[2]);case 4:return new a(b[0],b[1],b[2],b[3])}var d=[null];return d.push.apply(d,b),new(j.apply(a,d))}var i=c.prototype,n=e(h(i)?i:Object.prototype),o=Function.apply.call(a,n,b);return h(o)?o:n}})},function(a,b,c){var d=c(9),e=c(6),f=c(10),g=c(14);e(e.S+e.F*c(5)(function(){Reflect.defineProperty(d.f({},1,{value:1}),1,{value:2})}),"Reflect",{defineProperty:function defineProperty(a,b,c){f(a),b=g(b,!0),f(c);try{return d.f(a,b,c),!0}catch(e){return!1}}})},function(a,b,c){var d=c(6),e=c(49).f,f=c(10);d(d.S,"Reflect",{deleteProperty:function deleteProperty(a,b){var c=e(f(a),b);return!(c&&!c.configurable)&&delete a[b]}})},function(a,b,d){var e=d(6),f=d(10),g=function(a){this._t=f(a),this._i=0;var b,c=this._k=[];for(b in a)c.push(b)};d(136)(g,"Object",function(){var a,b=this,d=b._k;do if(b._i>=d.length)return{value:c,done:!0};while(!((a=d[b._i++])in b._t));return{value:a,done:!1}}),e(e.S,"Reflect",{enumerate:function enumerate(a){return new g(a)}})},function(a,b,d){function get(a,b){var d,h,k=arguments.length<3?a:arguments[2];return j(a)===k?a[b]:(d=e.f(a,b))?g(d,"value")?d.value:d.get!==c?d.get.call(k):c:i(h=f(a))?get(h,b,k):void 0}var e=d(49),f=d(57),g=d(3),h=d(6),i=d(11),j=d(10);h(h.S,"Reflect",{get:get})},function(a,b,c){var d=c(49),e=c(6),f=c(10);e(e.S,"Reflect",{getOwnPropertyDescriptor:function getOwnPropertyDescriptor(a,b){return d.f(f(a),b)}})},function(a,b,c){var d=c(6),e=c(57),f=c(10);d(d.S,"Reflect",{getPrototypeOf:function getPrototypeOf(a){return e(f(a))}})},function(a,b,c){var d=c(6);d(d.S,"Reflect",{has:function has(a,b){return b in a}})},function(a,b,c){var d=c(6),e=c(10),f=Object.isExtensible;d(d.S,"Reflect",{isExtensible:function isExtensible(a){return e(a),!f||f(a)}})},function(a,b,c){var d=c(6);d(d.S,"Reflect",{ownKeys:c(221)})},function(a,b,c){var d=c(48),e=c(41),f=c(10),g=c(2).Reflect;a.exports=g&&g.ownKeys||function ownKeys(a){var b=d.f(f(a)),c=e.f;return c?b.concat(c(a)):b}},function(a,b,c){var d=c(6),e=c(10),f=Object.preventExtensions;d(d.S,"Reflect",{preventExtensions:function preventExtensions(a){e(a);try{return f&&f(a),!0}catch(b){return!1}}})},function(a,b,d){function set(a,b,d){var i,m,n=arguments.length<4?a:arguments[3],o=f.f(k(a),b);if(!o){if(l(m=g(a)))return set(m,b,d,n);o=j(0)}return h(o,"value")?!(o.writable===!1||!l(n))&&(i=f.f(n,b)||j(0),i.value=d,e.f(n,b,i),!0):o.set!==c&&(o.set.call(n,d),!0)}var e=d(9),f=d(49),g=d(57),h=d(3),i=d(6),j=d(15),k=d(10),l=d(11);i(i.S,"Reflect",{set:set})},function(a,b,c){var d=c(6),e=c(71);e&&d(d.S,"Reflect",{setPrototypeOf:function setPrototypeOf(a,b){e.check(a,b);try{return e.set(a,b),!0}catch(c){return!1}}})},function(a,b,c){var d=c(6);d(d.S,"Date",{now:function(){return(new Date).getTime()}})},function(a,b,c){var d=c(6),e=c(56),f=c(14);d(d.P+d.F*c(5)(function(){return null!==new Date(NaN).toJSON()||1!==Date.prototype.toJSON.call({toISOString:function(){return 1}})}),"Date",{toJSON:function toJSON(a){var b=e(this),c=f(b);return"number"!=typeof c||isFinite(c)?b.toISOString():null}})},function(a,b,c){var d=c(6),e=c(5),f=Date.prototype.getTime,g=function(a){return a>9?a:"0"+a};d(d.P+d.F*(e(function(){return"0385-07-25T07:06:39.999Z"!=new Date(-5e13-1).toISOString()})||!e(function(){new Date(NaN).toISOString()})),"Date",{toISOString:function toISOString(){if(!isFinite(f.call(this)))throw RangeError("Invalid time value");var a=this,b=a.getUTCFullYear(),c=a.getUTCMilliseconds(),d=b<0?"-":b>9999?"+":"";return d+("00000"+Math.abs(b)).slice(d?-6:-4)+"-"+g(a.getUTCMonth()+1)+"-"+g(a.getUTCDate())+"T"+g(a.getUTCHours())+":"+g(a.getUTCMinutes())+":"+g(a.getUTCSeconds())+"."+(c>99?c:"0"+g(c))+"Z"}})},function(a,b,c){var d=Date.prototype,e="Invalid Date",f="toString",g=d[f],h=d.getTime;new Date(NaN)+""!=e&&c(16)(d,f,function toString(){var a=h.call(this);return a===a?g.call(this):e})},function(a,b,c){var d=c(23)("toPrimitive"),e=Date.prototype;d in e||c(8)(e,d,c(230))},function(a,b,c){var d=c(10),e=c(14),f="number";a.exports=function(a){if("string"!==a&&a!==f&&"default"!==a)throw TypeError("Incorrect hint");return e(d(this),a!=f)}},function(a,b,d){var e=d(6),f=d(232),g=d(233),h=d(10),i=d(37),j=d(35),k=d(11),l=d(2).ArrayBuffer,m=d(199),n=g.ArrayBuffer,o=g.DataView,p=f.ABV&&l.isView,q=n.prototype.slice,r=f.VIEW,s="ArrayBuffer";e(e.G+e.W+e.F*(l!==n),{ArrayBuffer:n}),e(e.S+e.F*!f.CONSTR,s,{isView:function isView(a){return p&&p(a)||k(a)&&r in a}}),e(e.P+e.U+e.F*d(5)(function(){return!new n(2).slice(1,c).byteLength}),s,{slice:function slice(a,b){if(q!==c&&b===c)return q.call(h(this),a);for(var d=h(this).byteLength,e=i(a,d),f=i(b===c?d:b,d),g=new(m(this,n))(j(f-e)),k=new o(this),l=new o(g),p=0;e>1,k=23===b?E(2,-24)-E(2,-77):0,l=0,m=a<0||0===a&&1/a<0?1:0;for(a=D(a),a!=a||a===B?(e=a!=a?1:0,d=i):(d=F(G(a)/H),a*(f=E(2,-d))<1&&(d--,f*=2),a+=d+j>=1?k/f:k*E(2,1-j),a*f>=2&&(d++,f/=2),d+j>=i?(e=0,d=i):d+j>=1?(e=(a*f-1)*E(2,b),d+=j):(e=a*E(2,j-1)*E(2,b),d=0));b>=8;g[l++]=255&e,e/=256,b-=8);for(d=d<0;g[l++]=255&d,d/=256,h-=8);return g[--l]|=128*m,g},P=function(a,b,c){var d,e=8*c-b-1,f=(1<>1,h=e-7,i=c-1,j=a[i--],k=127&j;for(j>>=7;h>0;k=256*k+a[i],i--,h-=8);for(d=k&(1<<-h)-1,k>>=-h,h+=b;h>0;d=256*d+a[i],i--,h-=8);if(0===k)k=1-g;else{if(k===f)return d?NaN:j?-B:B;d+=E(2,b),k-=g}return(j?-1:1)*d*E(2,k-b)},Q=function(a){return a[3]<<24|a[2]<<16|a[1]<<8|a[0]},R=function(a){return[255&a]},S=function(a){return[255&a,a>>8&255]},T=function(a){return[255&a,a>>8&255,a>>16&255,a>>24&255]},U=function(a){return O(a,52,8)},V=function(a){return O(a,23,4)},W=function(a,b,c){p(a[u],b,{get:function(){return this[c]}})},X=function(a,b,c,d){var e=+c,f=m(e);if(e!=f||f<0||f+b>a[M])throw A(w);var g=a[L]._b,h=f+a[N],i=g.slice(h,h+b);return d?i:i.reverse()},Y=function(a,b,c,d,e,f){var g=+c,h=m(g);if(g!=h||h<0||h+b>a[M])throw A(w);for(var i=a[L]._b,j=h+a[N],k=d(+e),l=0;lba;)($=aa[ba++])in x||i(x,$,C[$]);g||(_.constructor=x)}var ca=new y(new x(2)),da=y[u].setInt8;ca.setInt8(0,2147483648),ca.setInt8(1,2147483649),!ca.getInt8(0)&&ca.getInt8(1)||j(y[u],{setInt8:function setInt8(a,b){da.call(this,a,b<<24>>24)},setUint8:function setUint8(a,b){da.call(this,a,b<<24>>24)}},!0)}else x=function ArrayBuffer(a){var b=Z(this,a);this._b=q.call(Array(b),0),this[M]=b},y=function DataView(a,b,d){l(this,y,t),l(a,x,t);var e=a[M],f=m(b);if(f<0||f>e)throw A("Wrong offset!");if(d=d===c?e-f:n(d),f+d>e)throw A(v);this[L]=a,this[N]=f,this[M]=d},f&&(W(x,J,"_l"),W(y,I,"_b"),W(y,J,"_l"),W(y,K,"_o")),j(y[u],{getInt8:function getInt8(a){return X(this,1,a)[0]<<24>>24},getUint8:function getUint8(a){return X(this,1,a)[0]},getInt16:function getInt16(a){var b=X(this,2,a,arguments[1]);return(b[1]<<8|b[0])<<16>>16},getUint16:function getUint16(a){var b=X(this,2,a,arguments[1]);return b[1]<<8|b[0]},getInt32:function getInt32(a){return Q(X(this,4,a,arguments[1]))},getUint32:function getUint32(a){return Q(X(this,4,a,arguments[1]))>>>0},getFloat32:function getFloat32(a){return P(X(this,4,a,arguments[1]),23,4)},getFloat64:function getFloat64(a){return P(X(this,8,a,arguments[1]),52,8)},setInt8:function setInt8(a,b){Y(this,1,a,R,b)},setUint8:function setUint8(a,b){Y(this,1,a,R,b)},setInt16:function setInt16(a,b){Y(this,2,a,S,b,arguments[2])},setUint16:function setUint16(a,b){Y(this,2,a,S,b,arguments[2])},setInt32:function setInt32(a,b){Y(this,4,a,T,b,arguments[2])},setUint32:function setUint32(a,b){Y(this,4,a,T,b,arguments[2])},setFloat32:function setFloat32(a,b){Y(this,4,a,V,b,arguments[2])},setFloat64:function setFloat64(a,b){Y(this,8,a,U,b,arguments[2])}});r(x,s),r(y,t),i(y[u],h.VIEW,!0),b[s]=x,b[t]=y},function(a,b,c){var d=c(6);d(d.G+d.W+d.F*!c(232).ABV,{DataView:c(233).DataView})},function(a,b,c){c(236)("Int8",1,function(a){return function Int8Array(b,c,d){return a(this,b,c,d)}})},function(a,b,d){if(d(4)){var e=d(26),f=d(2),g=d(5),h=d(6),i=d(232),j=d(233),k=d(18),l=d(197),m=d(15),n=d(8),o=d(202),p=d(36),q=d(35),r=d(37),s=d(14),t=d(3),u=d(69),v=d(73),w=d(11),x=d(56),y=d(154),z=d(44),A=d(57),B=d(48).f,C=d(156),D=d(17),E=d(23),F=d(164),G=d(34),H=d(199),I=d(183),J=d(135),K=d(157),L=d(186),M=d(180),N=d(177),O=d(9),P=d(49),Q=O.f,R=P.f,S=f.RangeError,T=f.TypeError,U=f.Uint8Array,V="ArrayBuffer",W="Shared"+V,X="BYTES_PER_ELEMENT",Y="prototype",Z=Array[Y],$=j.ArrayBuffer,_=j.DataView,aa=F(0),ba=F(2),ca=F(3),da=F(4),ea=F(5),fa=F(6),ga=G(!0),ha=G(!1),ia=I.values,ja=I.keys,ka=I.entries,la=Z.lastIndexOf,ma=Z.reduce,na=Z.reduceRight,oa=Z.join,pa=Z.sort,qa=Z.slice,ra=Z.toString,sa=Z.toLocaleString,ta=E("iterator"),ua=E("toStringTag"),va=D("typed_constructor"),wa=D("def_constructor"),xa=i.CONSTR,ya=i.TYPED,za=i.VIEW,Aa="Wrong length!",Ba=F(1,function(a,b){return Ha(H(a,a[wa]),b)}),Ca=g(function(){return 1===new U(new Uint16Array([1]).buffer)[0]}),Da=!!U&&!!U[Y].set&&g(function(){new U(1).set({})}),Ea=function(a,b){if(a===c)throw T(Aa);var d=+a,e=q(a);if(b&&!u(d,e))throw S(Aa);return e},Fa=function(a,b){var c=p(a);if(c<0||c%b)throw S("Wrong offset!");return c},Ga=function(a){if(w(a)&&ya in a)return a;throw T(a+" is not a typed array!")},Ha=function(a,b){if(!(w(a)&&va in a))throw T("It is not a typed array constructor!");return new a(b)},Ia=function(a,b){return Ja(H(a,a[wa]),b)},Ja=function(a,b){for(var c=0,d=b.length,e=Ha(a,d);d>c;)e[c]=b[c++];return e},Ka=function(a,b,c){Q(a,b,{get:function(){return this._d[c]}})},La=function from(a){var b,d,e,f,g,h,i=x(a),j=arguments.length,l=j>1?arguments[1]:c,m=l!==c,n=C(i);if(n!=c&&!y(n)){for(h=n.call(i),e=[],b=0;!(g=h.next()).done;b++)e.push(g.value);i=e}for(m&&j>2&&(l=k(l,arguments[2],2)),b=0,d=q(i.length),f=Ha(this,d);d>b;b++)f[b]=m?l(i[b],b):i[b];return f},Ma=function of(){for(var a=0,b=arguments.length,c=Ha(this,b);b>a;)c[a]=arguments[a++];return c},Na=!!U&&g(function(){sa.call(new U(1))}),Oa=function toLocaleString(){return sa.apply(Na?qa.call(Ga(this)):Ga(this),arguments)},Pa={copyWithin:function copyWithin(a,b){return N.call(Ga(this),a,b,arguments.length>2?arguments[2]:c)},every:function every(a){return da(Ga(this),a,arguments.length>1?arguments[1]:c)},fill:function fill(a){return M.apply(Ga(this),arguments)},filter:function filter(a){return Ia(this,ba(Ga(this),a,arguments.length>1?arguments[1]:c))},find:function find(a){return ea(Ga(this),a,arguments.length>1?arguments[1]:c)},findIndex:function findIndex(a){return fa(Ga(this),a,arguments.length>1?arguments[1]:c)},forEach:function forEach(a){aa(Ga(this),a,arguments.length>1?arguments[1]:c)},indexOf:function indexOf(a){return ha(Ga(this),a,arguments.length>1?arguments[1]:c)},includes:function includes(a){return ga(Ga(this),a,arguments.length>1?arguments[1]:c); },join:function join(a){return oa.apply(Ga(this),arguments)},lastIndexOf:function lastIndexOf(a){return la.apply(Ga(this),arguments)},map:function map(a){return Ba(Ga(this),a,arguments.length>1?arguments[1]:c)},reduce:function reduce(a){return ma.apply(Ga(this),arguments)},reduceRight:function reduceRight(a){return na.apply(Ga(this),arguments)},reverse:function reverse(){for(var a,b=this,c=Ga(b).length,d=Math.floor(c/2),e=0;e1?arguments[1]:c)},sort:function sort(a){return pa.call(Ga(this),a)},subarray:function subarray(a,b){var d=Ga(this),e=d.length,f=r(a,e);return new(H(d,d[wa]))(d.buffer,d.byteOffset+f*d.BYTES_PER_ELEMENT,q((b===c?e:r(b,e))-f))}},Qa=function slice(a,b){return Ia(this,qa.call(Ga(this),a,b))},Ra=function set(a){Ga(this);var b=Fa(arguments[1],1),c=this.length,d=x(a),e=q(d.length),f=0;if(e+b>c)throw S(Aa);for(;f255?255:255&d),e.v[p](c*b+e.o,d,Ca)},E=function(a,b){Q(a,b,{get:function(){return C(this,b)},set:function(a){return D(this,b,a)},enumerable:!0})};u?(r=d(function(a,d,e,f){l(a,r,k,"_d");var g,h,i,j,m=0,o=0;if(w(d)){if(!(d instanceof $||(j=v(d))==V||j==W))return ya in d?Ja(r,d):La.call(r,d);g=d,o=Fa(e,b);var p=d.byteLength;if(f===c){if(p%b)throw S(Aa);if(h=p-o,h<0)throw S(Aa)}else if(h=q(f)*b,h+o>p)throw S(Aa);i=h/b}else i=Ea(d,!0),h=i*b,g=new $(h);for(n(a,"_d",{b:g,o:o,l:h,e:i,v:new _(g)});m1?arguments[1]:c)}}),d(178)("includes")},function(a,b,c){var d=c(6),e=c(125)(!0);d(d.P,"String",{at:function at(a){return e(this,a)}})},function(a,b,d){var e=d(6),f=d(248);e(e.P,"String",{padStart:function padStart(a){return f(this,a,arguments.length>1?arguments[1]:c,!0)}})},function(a,b,d){var e=d(35),f=d(85),g=d(33);a.exports=function(a,b,d,h){var i=String(g(a)),j=i.length,k=d===c?" ":String(d),l=e(b);if(l<=j||""==k)return i;var m=l-j,n=f.call(k,Math.ceil(m/k.length));return n.length>m&&(n=n.slice(0,m)),h?n+i:i+n}},function(a,b,d){var e=d(6),f=d(248);e(e.P,"String",{padEnd:function padEnd(a){return f(this,a,arguments.length>1?arguments[1]:c,!1)}})},function(a,b,c){c(81)("trimLeft",function(a){return function trimLeft(){return a(this,1)}},"trimStart")},function(a,b,c){c(81)("trimRight",function(a){return function trimRight(){return a(this,2)}},"trimEnd")},function(a,b,c){var d=c(6),e=c(33),f=c(35),g=c(128),h=c(188),i=RegExp.prototype,j=function(a,b){this._r=a,this._s=b};c(136)(j,"RegExp String",function next(){var a=this._r.exec(this._s);return{value:a,done:null===a}}),d(d.P,"String",{matchAll:function matchAll(a){if(e(this),!g(a))throw TypeError(a+" is not a regexp!");var b=String(this),c="flags"in i?String(a.flags):h.call(a),d=new RegExp(a.source,~c.indexOf("g")?c:"g"+c);return d.lastIndex=f(a.lastIndex),new j(d,b)}})},function(a,b,c){c(25)("asyncIterator")},function(a,b,c){c(25)("observable")},function(a,b,c){var d=c(6),e=c(221),f=c(30),g=c(49),h=c(155);d(d.S,"Object",{getOwnPropertyDescriptors:function getOwnPropertyDescriptors(a){for(var b,c=f(a),d=g.f,i=e(c),j={},k=0;i.length>k;)h(j,b=i[k++],d(c,b));return j}})},function(a,b,c){var d=c(6),e=c(257)(!1);d(d.S,"Object",{values:function values(a){return e(a)}})},function(a,b,c){var d=c(28),e=c(30),f=c(42).f;a.exports=function(a){return function(b){for(var c,g=e(b),h=d(g),i=h.length,j=0,k=[];i>j;)f.call(g,c=h[j++])&&k.push(a?[c,g[c]]:g[c]);return k}}},function(a,b,c){var d=c(6),e=c(257)(!0);d(d.S,"Object",{entries:function entries(a){return e(a)}})},function(a,b,c){var d=c(6),e=c(56),f=c(19),g=c(9);c(4)&&d(d.P+c(260),"Object",{__defineGetter__:function __defineGetter__(a,b){g.f(e(this),a,{get:f(b),enumerable:!0,configurable:!0})}})},function(a,b,c){a.exports=c(26)||!c(5)(function(){var a=Math.random();__defineSetter__.call(null,a,function(){}),delete c(2)[a]})},function(a,b,c){var d=c(6),e=c(56),f=c(19),g=c(9);c(4)&&d(d.P+c(260),"Object",{__defineSetter__:function __defineSetter__(a,b){g.f(e(this),a,{set:f(b),enumerable:!0,configurable:!0})}})},function(a,b,c){var d=c(6),e=c(56),f=c(14),g=c(57),h=c(49).f;c(4)&&d(d.P+c(260),"Object",{__lookupGetter__:function __lookupGetter__(a){var b,c=e(this),d=f(a,!0);do if(b=h(c,d))return b.get;while(c=g(c))}})},function(a,b,c){var d=c(6),e=c(56),f=c(14),g=c(57),h=c(49).f;c(4)&&d(d.P+c(260),"Object",{__lookupSetter__:function __lookupSetter__(a){var b,c=e(this),d=f(a,!0);do if(b=h(c,d))return b.set;while(c=g(c))}})},function(a,b,c){var d=c(6);d(d.P+d.R,"Map",{toJSON:c(265)("Map")})},function(a,b,c){var d=c(73),e=c(266);a.exports=function(a){return function toJSON(){if(d(this)!=a)throw TypeError(a+"#toJSON isn't generic");return e(this)}}},function(a,b,c){var d=c(198);a.exports=function(a,b){var c=[];return d(a,!1,c.push,c,b),c}},function(a,b,c){var d=c(6);d(d.P+d.R,"Set",{toJSON:c(265)("Set")})},function(a,b,c){var d=c(6);d(d.S,"System",{global:c(2)})},function(a,b,c){var d=c(6),e=c(32);d(d.S,"Error",{isError:function isError(a){return"Error"===e(a)}})},function(a,b,c){var d=c(6);d(d.S,"Math",{iaddh:function iaddh(a,b,c,d){var e=a>>>0,f=b>>>0,g=c>>>0;return f+(d>>>0)+((e&g|(e|g)&~(e+g>>>0))>>>31)|0}})},function(a,b,c){var d=c(6);d(d.S,"Math",{isubh:function isubh(a,b,c,d){var e=a>>>0,f=b>>>0,g=c>>>0;return f-(d>>>0)-((~e&g|~(e^g)&e-g>>>0)>>>31)|0}})},function(a,b,c){var d=c(6);d(d.S,"Math",{imulh:function imulh(a,b){var c=65535,d=+a,e=+b,f=d&c,g=e&c,h=d>>16,i=e>>16,j=(h*g>>>0)+(f*g>>>16);return h*i+(j>>16)+((f*i>>>0)+(j&c)>>16)}})},function(a,b,c){var d=c(6);d(d.S,"Math",{umulh:function umulh(a,b){var c=65535,d=+a,e=+b,f=d&c,g=e&c,h=d>>>16,i=e>>>16,j=(h*g>>>0)+(f*g>>>16);return h*i+(j>>>16)+((f*i>>>0)+(j&c)>>>16)}})},function(a,b,c){var d=c(275),e=c(10),f=d.key,g=d.set;d.exp({defineMetadata:function defineMetadata(a,b,c,d){g(a,b,e(c),f(d))}})},function(a,b,d){var e=d(203),f=d(6),g=d(21)("metadata"),h=g.store||(g.store=new(d(207))),i=function(a,b,d){var f=h.get(a);if(!f){if(!d)return c;h.set(a,f=new e)}var g=f.get(b);if(!g){if(!d)return c;f.set(b,g=new e)}return g},j=function(a,b,d){var e=i(b,d,!1);return e!==c&&e.has(a)},k=function(a,b,d){var e=i(b,d,!1);return e===c?c:e.get(a)},l=function(a,b,c,d){i(c,d,!0).set(a,b)},m=function(a,b){var c=i(a,b,!1),d=[];return c&&c.forEach(function(a,b){d.push(b)}),d},n=function(a){return a===c||"symbol"==typeof a?a:String(a)},o=function(a){f(f.S,"Reflect",a)};a.exports={store:h,map:i,has:j,get:k,set:l,keys:m,key:n,exp:o}},function(a,b,d){var e=d(275),f=d(10),g=e.key,h=e.map,i=e.store;e.exp({deleteMetadata:function deleteMetadata(a,b){var d=arguments.length<3?c:g(arguments[2]),e=h(f(b),d,!1);if(e===c||!e["delete"](a))return!1;if(e.size)return!0;var j=i.get(b);return j["delete"](d),!!j.size||i["delete"](b)}})},function(a,b,d){var e=d(275),f=d(10),g=d(57),h=e.has,i=e.get,j=e.key,k=function(a,b,d){var e=h(a,b,d);if(e)return i(a,b,d);var f=g(b);return null!==f?k(a,f,d):c};e.exp({getMetadata:function getMetadata(a,b){return k(a,f(b),arguments.length<3?c:j(arguments[2]))}})},function(a,b,d){var e=d(206),f=d(266),g=d(275),h=d(10),i=d(57),j=g.keys,k=g.key,l=function(a,b){var c=j(a,b),d=i(a);if(null===d)return c;var g=l(d,b);return g.length?c.length?f(new e(c.concat(g))):g:c};g.exp({getMetadataKeys:function getMetadataKeys(a){return l(h(a),arguments.length<2?c:k(arguments[1]))}})},function(a,b,d){var e=d(275),f=d(10),g=e.get,h=e.key;e.exp({getOwnMetadata:function getOwnMetadata(a,b){return g(a,f(b),arguments.length<3?c:h(arguments[2]))}})},function(a,b,d){var e=d(275),f=d(10),g=e.keys,h=e.key;e.exp({getOwnMetadataKeys:function getOwnMetadataKeys(a){return g(f(a),arguments.length<2?c:h(arguments[1]))}})},function(a,b,d){var e=d(275),f=d(10),g=d(57),h=e.has,i=e.key,j=function(a,b,c){var d=h(a,b,c);if(d)return!0;var e=g(b);return null!==e&&j(a,e,c)};e.exp({hasMetadata:function hasMetadata(a,b){return j(a,f(b),arguments.length<3?c:i(arguments[2]))}})},function(a,b,d){var e=d(275),f=d(10),g=e.has,h=e.key;e.exp({hasOwnMetadata:function hasOwnMetadata(a,b){return g(a,f(b),arguments.length<3?c:h(arguments[2]))}})},function(a,b,d){var e=d(275),f=d(10),g=d(19),h=e.key,i=e.set;e.exp({metadata:function metadata(a,b){return function decorator(d,e){i(a,b,(e!==c?f:g)(d),h(e))}}})},function(a,b,c){var d=c(6),e=c(201)(),f=c(2).process,g="process"==c(32)(f);d(d.G,{asap:function asap(a){var b=g&&f.domain;e(b?b.bind(a):a)}})},function(a,b,d){var e=d(6),f=d(2),g=d(7),h=d(201)(),i=d(23)("observable"),j=d(19),k=d(10),l=d(197),m=d(202),n=d(8),o=d(198),p=o.RETURN,q=function(a){return null==a?c:j(a)},r=function(a){var b=a._c;b&&(a._c=c,b())},s=function(a){return a._o===c},t=function(a){s(a)||(a._o=c,r(a))},u=function(a,b){k(a),this._c=c,this._o=a,a=new v(this);try{var d=b(a),e=d;null!=d&&("function"==typeof d.unsubscribe?d=function(){e.unsubscribe()}:j(d),this._c=d)}catch(f){return void a.error(f)}s(this)&&r(this)};u.prototype=m({},{unsubscribe:function unsubscribe(){t(this)}});var v=function(a){this._s=a};v.prototype=m({},{next:function next(a){var b=this._s;if(!s(b)){var c=b._o;try{var d=q(c.next);if(d)return d.call(c,a)}catch(e){try{t(b)}finally{throw e}}}},error:function error(a){var b=this._s;if(s(b))throw a;var d=b._o;b._o=c;try{var e=q(d.error);if(!e)throw a;a=e.call(d,a)}catch(f){try{r(b)}finally{throw f}}return r(b),a},complete:function complete(a){var b=this._s;if(!s(b)){var d=b._o;b._o=c;try{var e=q(d.complete);a=e?e.call(d,a):c}catch(f){try{r(b)}finally{throw f}}return r(b),a}}});var w=function Observable(a){l(this,w,"Observable","_f")._f=j(a)};m(w.prototype,{subscribe:function subscribe(a){return new u(a,this._f)},forEach:function forEach(a){var b=this;return new(g.Promise||f.Promise)(function(c,d){j(a);var e=b.subscribe({next:function(b){try{return a(b)}catch(c){d(c),e.unsubscribe()}},error:d,complete:c})})}}),m(w,{from:function from(a){var b="function"==typeof this?this:w,c=q(k(a)[i]);if(c){var d=k(c.call(a));return d.constructor===b?d:new b(function(a){return d.subscribe(a)})}return new b(function(b){var c=!1;return h(function(){if(!c){try{if(o(a,!1,function(a){if(b.next(a),c)return p})===p)return}catch(d){if(c)throw d;return void b.error(d)}b.complete()}}),function(){c=!0}})},of:function of(){for(var a=0,b=arguments.length,c=Array(b);ag;)(c[g]=arguments[g++])===h&&(i=!0);return function(){var d,f=this,g=arguments.length,j=0,k=0;if(!i&&!g)return e(a,c,f);if(d=c.slice(),i)for(;b>j;j++)d[j]===h&&(d[j]=arguments[k++]);for(;g>k;)d.push(arguments[k++]);return e(a,d,f)}}},function(a,b,c){a.exports=c(2)},function(a,b,d){function Dict(a){var b=i(null);return a!=c&&(p(a)?o(a,!0,function(a,c){b[a]=c}):h(b,a)),b}function reduce(a,b,c){n(b);var d,e,f=t(a),g=k(f),h=g.length,i=0;if(arguments.length<3){if(!h)throw TypeError("Reduce of empty object with no initial value");d=f[g[i++]]}else d=Object(c);for(;h>i;)v(f,e=g[i++])&&(d=b(d,f[e],e,a));return d}function includes(a,b){return(b==b?m(a,b):x(a,function(a){return a!=a}))!==c}function get(a,b){if(v(a,b))return a[b]}function set(a,b,c){return u&&b in Object?l.f(a,b,g(0,c)):a[b]=c,a}function isDict(a){return s(a)&&j(a)===Dict.prototype}var e=d(18),f=d(6),g=d(15),h=d(67),i=d(44),j=d(57),k=d(28),l=d(9),m=d(27),n=d(19),o=d(198),p=d(292),q=d(136),r=d(184),s=d(11),t=d(30),u=d(4),v=d(3),w=function(a){var b=1==a,d=4==a;return function(f,g,h){var i,j,k,l=e(g,h,3),m=t(f),n=b||7==a||2==a?new("function"==typeof this?this:Dict):c;for(i in m)if(v(m,i)&&(j=m[i],k=l(j,i,f),a))if(b)n[i]=k;else if(k)switch(a){case 2:n[i]=j;break;case 3:return!0;case 5:return j;case 6:return i;case 7:n[k[0]]=k[1]}else if(d)return!1;return 3==a||d?d:n}},x=w(6),y=function(a){return function(b){return new z(b,a)}},z=function(a,b){this._t=t(a),this._a=k(a),this._i=0,this._k=b};q(z,"Dict",function(){var a,b=this,d=b._t,e=b._a,f=b._k;do if(b._i>=e.length)return b._t=c,r(1);while(!v(d,a=e[b._i++]));return"keys"==f?r(0,a):"values"==f?r(0,d[a]):r(0,[a,d[a]])}),Dict.prototype=null,f(f.G+f.F,{Dict:Dict}),f(f.S,"Dict",{keys:y("keys"),values:y("values"),entries:y("entries"),forEach:w(0),map:w(1),filter:w(2),some:w(3),every:w(4),find:w(5),findKey:x,mapPairs:w(7),reduce:reduce,keyOf:m,includes:includes,has:v,get:get,set:set,isDict:isDict})},function(a,b,d){var e=d(73),f=d(23)("iterator"),g=d(135);a.exports=d(7).isIterable=function(a){var b=Object(a);return b[f]!==c||"@@iterator"in b||g.hasOwnProperty(e(b))}},function(a,b,c){var d=c(10),e=c(156);a.exports=c(7).getIterator=function(a){var b=e(a);if("function"!=typeof b)throw TypeError(a+" is not iterable!");return d(b.call(a))}},function(a,b,c){var d=c(2),e=c(7),f=c(6),g=c(289);f(f.G+f.F,{delay:function delay(a){return new(e.Promise||d.Promise)(function(b){setTimeout(g.call(b,!0),a)})}})},function(a,b,c){var d=c(290),e=c(6);c(7)._=d._=d._||{},e(e.P+e.F,"Function",{part:c(289)})},function(a,b,c){var d=c(6);d(d.S+d.F,"Object",{isObject:c(11)})},function(a,b,c){var d=c(6);d(d.S+d.F,"Object",{classof:c(73)})},function(a,b,c){var d=c(6),e=c(299);d(d.S+d.F,"Object",{define:e})},function(a,b,c){var d=c(9),e=c(49),f=c(221),g=c(30);a.exports=function define(a,b){for(var c,h=f(g(b)),i=h.length,j=0;i>j;)d.f(a,c=h[j++],e.f(b,c));return a}},function(a,b,c){var d=c(6),e=c(299),f=c(44);d(d.S+d.F,"Object",{make:function(a,b){return e(f(a),b)}})},function(a,b,d){d(134)(Number,"Number",function(a){this._l=+a,this._i=0},function(){var a=this._i++,b=!(a"']/g,{"&":"&","<":"<",">":">",'"':""","'":"'"});d(d.P+d.F,"String",{escapeHTML:function escapeHTML(){return e(this)}})},function(a,b,c){var d=c(6),e=c(303)(/&(?:amp|lt|gt|quot|apos);/g,{"&":"&","<":"<",">":">",""":'"',"'":"'"});d(d.P+d.F,"String",{unescapeHTML:function unescapeHTML(){return e(this)}})}]),"undefined"!=typeof module&&module.exports?module.exports=a:"function"==typeof define&&define.amd?define(function(){return a}):b.core=a}(1,1); //# sourceMappingURL=core.min.js.mapcore-js-2.4.1/client/core.min.js.map000066400000000000000000004305571274277553300172170ustar00rootroot00000000000000{"version":3,"sources":["core.js"],"names":["__e","__g","undefined","modules","__webpack_require__","moduleId","installedModules","exports","module","id","loaded","call","m","c","p","global","has","DESCRIPTORS","$export","redefine","META","KEY","$fails","shared","setToStringTag","uid","wks","wksExt","wksDefine","keyOf","enumKeys","isArray","anObject","toIObject","toPrimitive","createDesc","_create","gOPNExt","$GOPD","$DP","$keys","gOPD","f","dP","gOPN","$Symbol","Symbol","$JSON","JSON","_stringify","stringify","PROTOTYPE","HIDDEN","TO_PRIMITIVE","isEnum","propertyIsEnumerable","SymbolRegistry","AllSymbols","OPSymbols","ObjectProto","Object","USE_NATIVE","QObject","setter","findChild","setSymbolDesc","get","this","value","a","it","key","D","protoDesc","wrap","tag","sym","_k","isSymbol","iterator","$defineProperty","defineProperty","enumerable","$defineProperties","defineProperties","P","keys","i","l","length","$create","create","$propertyIsEnumerable","E","$getOwnPropertyDescriptor","getOwnPropertyDescriptor","$getOwnPropertyNames","getOwnPropertyNames","names","result","push","$getOwnPropertySymbols","getOwnPropertySymbols","IS_OP","TypeError","arguments","$set","configurable","set","toString","name","G","W","F","symbols","split","store","S","for","keyFor","useSetter","useSimple","replacer","$replacer","args","apply","valueOf","Math","window","self","Function","hasOwnProperty","exec","e","core","hide","ctx","type","source","own","out","exp","IS_FORCED","IS_GLOBAL","IS_STATIC","IS_PROTO","IS_BIND","B","target","expProto","U","R","version","object","IE8_DOM_DEFINE","O","Attributes","isObject","document","is","createElement","fn","val","bitmap","writable","SRC","TO_STRING","$toString","TPL","inspectSource","safe","isFunction","join","String","prototype","px","random","concat","aFunction","that","b","setDesc","isExtensible","FREEZE","preventExtensions","setMeta","w","fastKey","getWeak","onFreeze","meta","NEED","SHARED","def","TAG","stat","USE_SYMBOL","$exports","LIBRARY","charAt","getKeys","el","index","enumBugKeys","arrayIndexOf","IE_PROTO","IObject","defined","cof","slice","toLength","toIndex","IS_INCLUDES","$this","fromIndex","toInteger","min","ceil","floor","isNaN","max","gOPS","pIE","getSymbols","Array","arg","dPs","Empty","createDict","iframeDocument","iframe","lt","gt","style","display","appendChild","src","contentWindow","open","write","close","Properties","documentElement","windowNames","getWindowNames","hiddenKeys","fails","toObject","$getPrototypeOf","getPrototypeOf","constructor","$freeze","freeze","$seal","seal","$preventExtensions","$isFrozen","isFrozen","$isSealed","isSealed","$isExtensible","assign","$assign","A","K","forEach","k","T","aLen","j","x","y","setPrototypeOf","check","proto","test","buggy","__proto__","classof","ARG","tryGet","callee","bind","invoke","arraySlice","factories","construct","len","n","partArgs","bound","un","FProto","nameRE","NAME","match","HAS_INSTANCE","FunctionProto","inheritIfRequired","$trim","trim","NUMBER","$Number","Base","BROKEN_COF","TRIM","toNumber","argument","third","radix","maxCode","first","charCodeAt","NaN","code","digits","parseInt","Number","C","spaces","space","non","ltrim","RegExp","rtrim","exporter","ALIAS","FORCE","string","TYPE","replace","aNumberValue","repeat","$toFixed","toFixed","data","ERROR","ZERO","multiply","c2","divide","numToString","s","t","pow","acc","log","x2","fractionDigits","z","RangeError","msg","count","str","res","Infinity","$toPrecision","toPrecision","precision","EPSILON","_isFinite","isFinite","isInteger","number","abs","isSafeInteger","MAX_SAFE_INTEGER","MIN_SAFE_INTEGER","$parseFloat","parseFloat","$parseInt","ws","hex","log1p","sqrt","$acosh","acosh","MAX_VALUE","LN2","asinh","$asinh","$atanh","atanh","sign","cbrt","clz32","LOG2E","cosh","$expm1","expm1","EPSILON32","MAX32","MIN32","roundTiesToEven","fround","$abs","$sign","hypot","value1","value2","div","sum","larg","$imul","imul","UINT16","xn","yn","xl","yl","log10","LN10","log2","sinh","tanh","trunc","fromCharCode","$fromCodePoint","fromCodePoint","raw","callSite","tpl","$at","codePointAt","pos","context","ENDS_WITH","$endsWith","endsWith","searchString","endPosition","end","search","isRegExp","MATCH","re","INCLUDES","includes","indexOf","STARTS_WITH","$startsWith","startsWith","iterated","_t","_i","point","done","Iterators","$iterCreate","ITERATOR","BUGGY","FF_ITERATOR","KEYS","VALUES","returnThis","Constructor","next","DEFAULT","IS_SET","FORCED","methods","IteratorPrototype","getMethod","kind","values","entries","DEF_VALUES","VALUES_BUG","$native","$default","$entries","$anyNative","descriptor","createHTML","anchor","quot","attribute","p1","toLowerCase","big","blink","bold","fixed","fontcolor","color","fontsize","size","italics","link","url","small","strike","sub","sup","isArrayIter","createProperty","getIterFn","iter","from","arrayLike","step","mapfn","mapping","iterFn","ret","ArrayProto","getIteratorMethod","SAFE_CLOSING","riter","skipClosing","arr","of","arrayJoin","separator","method","html","begin","klass","start","upTo","cloned","$sort","sort","comparefn","$forEach","STRICT","callbackfn","asc","IS_MAP","IS_FILTER","IS_SOME","IS_EVERY","IS_FIND_INDEX","NO_HOLES","speciesConstructor","original","SPECIES","$map","map","$filter","filter","$some","some","$every","every","$reduce","reduce","memo","isRight","reduceRight","$indexOf","NEGATIVE_ZERO","searchElement","lastIndexOf","copyWithin","to","inc","UNSCOPABLES","fill","endPos","$find","forced","find","findIndex","addToUnscopables","Arguments","$flags","$RegExp","re1","re2","CORRECT_NEW","tiRE","piRE","fiU","proxy","ignoreCase","multiline","unicode","sticky","define","flags","$match","regexp","SYMBOL","fns","strfn","rxfn","REPLACE","$replace","searchValue","replaceValue","SEARCH","$search","SPLIT","$split","_split","$push","$SPLIT","LENGTH","LAST_INDEX","NPCG","limit","separator2","lastIndex","lastLength","output","lastLastIndex","splitLimit","separatorCopy","Internal","GenericPromiseCapability","Wrapper","anInstance","forOf","task","microtask","PROMISE","process","$Promise","isNode","empty","promise","resolve","FakePromise","PromiseRejectionEvent","then","sameConstructor","isThenable","newPromiseCapability","PromiseCapability","reject","$$resolve","$$reject","perform","error","notify","isReject","_n","chain","_c","_v","ok","_s","run","reaction","handler","fail","domain","_h","onHandleUnhandled","enter","exit","onUnhandled","abrupt","console","isUnhandled","emit","onunhandledrejection","reason","_a","onrejectionhandled","$reject","_d","_w","$resolve","wrapper","Promise","executor","err","onFulfilled","onRejected","catch","r","capability","all","iterable","remaining","$index","alreadyCalled","race","forbiddenField","BREAK","RETURN","defer","channel","port","cel","setTask","setImmediate","clearTask","clearImmediate","MessageChannel","counter","queue","ONREADYSTATECHANGE","listener","event","nextTick","port2","port1","onmessage","postMessage","addEventListener","importScripts","removeChild","setTimeout","clear","macrotask","Observer","MutationObserver","WebKitMutationObserver","head","last","flush","parent","toggle","node","createTextNode","observe","characterData","strong","Map","entry","getEntry","v","redefineAll","$iterDefine","setSpecies","SIZE","_f","getConstructor","ADDER","_l","delete","prev","setStrong","$iterDetect","common","IS_WEAK","fixMethod","add","instance","HASNT_CHAINING","THROWS_ON_PRIMITIVES","ACCEPT_ITERABLES","BUGGY_ZERO","$instance","Set","InternalMap","each","weak","uncaughtFrozenStore","ufstore","tmp","WeakMap","$WeakMap","createArrayMethod","$has","arrayFind","arrayFindIndex","UncaughtFrozenStore","findUncaughtFrozen","splice","WeakSet","rApply","Reflect","fApply","thisArgument","argumentsList","L","rConstruct","NEW_TARGET_BUG","ARGS_BUG","Target","newTarget","$args","propertyKey","attributes","deleteProperty","desc","Enumerate","enumerate","receiver","getProto","ownKeys","V","existingDescriptor","ownDesc","setProto","now","Date","getTime","toJSON","toISOString","pv","lz","num","d","getUTCFullYear","getUTCMilliseconds","getUTCMonth","getUTCDate","getUTCHours","getUTCMinutes","getUTCSeconds","DateProto","INVALID_DATE","hint","$typed","buffer","ArrayBuffer","$ArrayBuffer","$DataView","DataView","$isView","ABV","isView","$slice","VIEW","ARRAY_BUFFER","CONSTR","byteLength","final","viewS","viewT","setUint8","getUint8","Typed","TYPED","TypedArrayConstructors","arrayFill","DATA_VIEW","WRONG_LENGTH","WRONG_INDEX","BaseBuffer","BUFFER","BYTE_LENGTH","BYTE_OFFSET","$BUFFER","$LENGTH","$OFFSET","packIEEE754","mLen","nBytes","eLen","eMax","eBias","rt","unpackIEEE754","nBits","unpackI32","bytes","packI8","packI16","packI32","packF64","packF32","addGetter","internal","view","isLittleEndian","numIndex","intIndex","_b","pack","reverse","conversion","validateArrayBufferArguments","numberLength","ArrayBufferProto","$setInt8","setInt8","getInt8","byteOffset","bufferLength","offset","getInt16","getUint16","getInt32","getUint32","getFloat32","getFloat64","setInt16","setUint16","setInt32","setUint32","setFloat32","setFloat64","init","Int8Array","$buffer","propertyDesc","same","createArrayIncludes","ArrayIterators","arrayCopyWithin","Uint8Array","SHARED_BUFFER","BYTES_PER_ELEMENT","arrayForEach","arrayFilter","arraySome","arrayEvery","arrayIncludes","arrayValues","arrayKeys","arrayEntries","arrayLastIndexOf","arrayReduce","arrayReduceRight","arraySort","arrayToString","arrayToLocaleString","toLocaleString","TYPED_CONSTRUCTOR","DEF_CONSTRUCTOR","ALL_CONSTRUCTORS","TYPED_ARRAY","allocate","LITTLE_ENDIAN","Uint16Array","FORCED_SET","strictToLength","SAME","toOffset","BYTES","validate","speciesFromList","list","fromList","$from","$of","TO_LOCALE_BUG","$toLocaleString","predicate","middle","subarray","$begin","$iterators","isTAIndex","$getDesc","$setDesc","$TypedArrayPrototype$","CLAMPED","ISNT_UINT8","GETTER","SETTER","TypedArray","TAC","TypedArrayPrototype","getter","o","round","addElement","$offset","$length","$len","$nativeIterator","CORRECT_ITER_NAME","$iterator","Uint8ClampedArray","Int16Array","Int32Array","Uint32Array","Float32Array","Float64Array","$includes","at","$pad","padStart","maxLength","fillString","left","stringLength","fillStr","intMaxLength","fillLen","stringFiller","padEnd","trimLeft","trimRight","getFlags","RegExpProto","$RegExpStringIterator","_r","matchAll","rx","getOwnPropertyDescriptors","getDesc","$values","isEntries","__defineGetter__","__defineSetter__","__lookupGetter__","__lookupSetter__","isError","iaddh","x0","x1","y0","y1","$x0","$x1","$y0","isubh","imulh","u","$u","$v","u0","v0","u1","v1","umulh","metadata","toMetaKey","ordinaryDefineOwnMetadata","defineMetadata","metadataKey","metadataValue","targetKey","getOrCreateMetadataMap","targetMetadata","keyMetadata","ordinaryHasOwnMetadata","MetadataKey","metadataMap","ordinaryGetOwnMetadata","MetadataValue","ordinaryOwnMetadataKeys","_","deleteMetadata","ordinaryGetMetadata","hasOwn","getMetadata","ordinaryMetadataKeys","oKeys","pKeys","getMetadataKeys","getOwnMetadata","getOwnMetadataKeys","ordinaryHasMetadata","hasMetadata","hasOwnMetadata","decorator","asap","OBSERVABLE","cleanupSubscription","subscription","cleanup","subscriptionClosed","_o","closeSubscription","Subscription","observer","subscriber","SubscriptionObserver","unsubscribe","complete","$Observable","Observable","subscribe","observable","items","$task","TO_STRING_TAG","ArrayValues","collections","Collection","partial","navigator","MSIE","userAgent","time","setInterval","path","pargs","holder","Dict","dict","isIterable","findKey","isDict","createDictMethod","createDictIter","DictIterator","mapPairs","getIterator","delay","part","mixin","make","$re","escape","regExp","&","<",">","\"","'","escapeHTML","&","<",">",""","'","unescapeHTML","amd"],"mappings":";;;;;;CAMC,SAASA,EAAKC,EAAKC,GACpB,cACS,SAAUC,GAKT,QAASC,qBAAoBC,GAG5B,GAAGC,EAAiBD,GACnB,MAAOC,GAAiBD,GAAUE,OAGnC,IAAIC,GAASF,EAAiBD,IAC7BE,WACAE,GAAIJ,EACJK,QAAQ,EAUT,OANAP,GAAQE,GAAUM,KAAKH,EAAOD,QAASC,EAAQA,EAAOD,QAASH,qBAG/DI,EAAOE,QA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AW,SAASuvB,GACpD,MAAOvvB,GAAQuvB,IACbvvB,CACJ,OAAO,UAASpQ,GACd,MAAOuG,QAAOvG,GAAIoQ,QAAQ4vB,EAAQ58B,MAMjC,SAASlH,EAAQD,EAASH,GAG/B,GAAIc,GAAUd,EAAoB,GAC9BgkC,EAAMhkC,EAAoB,KAAK,YACjCmkC,IAAK,QACLC,IAAK,OACLC,IAAK,OACLC,IAAK,SACLC,IAAK,UAGPzjC,GAAQA,EAAQmE,EAAInE,EAAQ+F,EAAG,UAAW29B,WAAY,QAASA,cAAc,MAAOR,GAAIjgC,UAInF,SAAS3D,EAAQD,EAASH,GAG/B,GAAIc,GAAUd,EAAoB,GAC9BgkC,EAAMhkC,EAAoB,KAAK,8BACjCykC,QAAU,IACVC,OAAU,IACVC,OAAU,IACVC,SAAU,IACVC,SAAU,KAGZ/jC,GAAQA,EAAQmE,EAAInE,EAAQ+F,EAAG,UAAWi+B,aAAe,QAASA,gBAAgB,MAAOd,GAAIjgC,YAK1E,mBAAV3D,SAAyBA,OAAOD,QAAQC,OAAOD,QAAUP,EAE1C,kBAAVmkB,SAAwBA,OAAOghB,IAAIhhB,OAAO,WAAW,MAAOnkB,KAEtEC,EAAIqI,KAAOtI,GACd,EAAG","file":"core.min.js"}core-js-2.4.1/client/library.js000066400000000000000000006570051274277553300163740ustar00rootroot00000000000000/** * core-js 2.4.1 * https://github.com/zloirock/core-js * License: http://rock.mit-license.org * © 2016 Denis Pushkarev */ !function(__e, __g, undefined){ 'use strict'; /******/ (function(modules) { // webpackBootstrap /******/ // The module cache /******/ var installedModules = {}; /******/ // The require function /******/ function __webpack_require__(moduleId) { /******/ // Check if module is in cache /******/ if(installedModules[moduleId]) /******/ return installedModules[moduleId].exports; /******/ // Create a new module (and put it into the cache) /******/ var module = installedModules[moduleId] = { /******/ exports: {}, /******/ id: moduleId, /******/ loaded: false /******/ }; /******/ // Execute the module function /******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__); /******/ // Flag the module as loaded /******/ module.loaded = true; /******/ // Return the exports of the module /******/ return module.exports; /******/ } /******/ // expose the modules object (__webpack_modules__) /******/ __webpack_require__.m = modules; /******/ // expose the module cache /******/ __webpack_require__.c = installedModules; /******/ // __webpack_public_path__ /******/ __webpack_require__.p = ""; /******/ // Load entry module and return exports /******/ return __webpack_require__(0); /******/ }) /************************************************************************/ /******/ ([ /* 0 */ /***/ function(module, exports, __webpack_require__) { __webpack_require__(1); __webpack_require__(50); __webpack_require__(51); __webpack_require__(52); __webpack_require__(54); __webpack_require__(55); __webpack_require__(58); __webpack_require__(59); __webpack_require__(60); __webpack_require__(61); __webpack_require__(62); __webpack_require__(63); __webpack_require__(64); __webpack_require__(65); __webpack_require__(66); __webpack_require__(68); __webpack_require__(70); __webpack_require__(72); __webpack_require__(75); __webpack_require__(76); __webpack_require__(79); __webpack_require__(80); __webpack_require__(81); __webpack_require__(82); __webpack_require__(84); __webpack_require__(85); __webpack_require__(86); __webpack_require__(87); __webpack_require__(88); __webpack_require__(92); __webpack_require__(94); __webpack_require__(95); __webpack_require__(96); __webpack_require__(98); __webpack_require__(99); __webpack_require__(100); __webpack_require__(102); __webpack_require__(103); __webpack_require__(104); __webpack_require__(106); __webpack_require__(107); __webpack_require__(108); __webpack_require__(109); __webpack_require__(110); __webpack_require__(111); __webpack_require__(112); __webpack_require__(113); __webpack_require__(114); __webpack_require__(115); __webpack_require__(116); __webpack_require__(117); __webpack_require__(118); __webpack_require__(119); __webpack_require__(121); __webpack_require__(125); __webpack_require__(126); __webpack_require__(127); __webpack_require__(128); __webpack_require__(132); __webpack_require__(134); __webpack_require__(135); __webpack_require__(136); __webpack_require__(137); __webpack_require__(138); __webpack_require__(139); __webpack_require__(140); __webpack_require__(141); __webpack_require__(142); __webpack_require__(143); __webpack_require__(144); __webpack_require__(145); __webpack_require__(146); __webpack_require__(147); __webpack_require__(154); __webpack_require__(155); __webpack_require__(157); __webpack_require__(158); __webpack_require__(159); __webpack_require__(163); __webpack_require__(164); __webpack_require__(165); __webpack_require__(166); __webpack_require__(167); __webpack_require__(169); __webpack_require__(170); __webpack_require__(171); __webpack_require__(172); __webpack_require__(175); __webpack_require__(177); __webpack_require__(178); __webpack_require__(179); __webpack_require__(181); __webpack_require__(183); __webpack_require__(190); __webpack_require__(193); __webpack_require__(194); __webpack_require__(196); __webpack_require__(197); __webpack_require__(198); __webpack_require__(199); __webpack_require__(200); __webpack_require__(201); __webpack_require__(202); __webpack_require__(203); __webpack_require__(204); __webpack_require__(205); __webpack_require__(206); __webpack_require__(207); __webpack_require__(209); __webpack_require__(210); __webpack_require__(211); __webpack_require__(212); __webpack_require__(213); __webpack_require__(214); __webpack_require__(215); __webpack_require__(218); __webpack_require__(219); __webpack_require__(221); __webpack_require__(222); __webpack_require__(223); __webpack_require__(224); __webpack_require__(225); __webpack_require__(226); __webpack_require__(227); __webpack_require__(228); __webpack_require__(229); __webpack_require__(230); __webpack_require__(231); __webpack_require__(233); __webpack_require__(234); __webpack_require__(235); __webpack_require__(236); __webpack_require__(238); __webpack_require__(239); __webpack_require__(240); __webpack_require__(241); __webpack_require__(243); __webpack_require__(244); __webpack_require__(246); __webpack_require__(247); __webpack_require__(248); __webpack_require__(249); __webpack_require__(252); __webpack_require__(253); __webpack_require__(254); __webpack_require__(255); __webpack_require__(256); __webpack_require__(257); __webpack_require__(258); __webpack_require__(259); __webpack_require__(261); __webpack_require__(262); __webpack_require__(263); __webpack_require__(264); __webpack_require__(265); __webpack_require__(266); __webpack_require__(267); __webpack_require__(268); __webpack_require__(269); __webpack_require__(270); __webpack_require__(271); __webpack_require__(272); __webpack_require__(273); __webpack_require__(276); __webpack_require__(151); __webpack_require__(278); __webpack_require__(277); __webpack_require__(279); __webpack_require__(280); __webpack_require__(281); __webpack_require__(282); __webpack_require__(283); __webpack_require__(285); __webpack_require__(286); __webpack_require__(287); __webpack_require__(289); module.exports = __webpack_require__(290); /***/ }, /* 1 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; // ECMAScript 6 symbols shim var global = __webpack_require__(2) , has = __webpack_require__(3) , DESCRIPTORS = __webpack_require__(4) , $export = __webpack_require__(6) , redefine = __webpack_require__(18) , META = __webpack_require__(19).KEY , $fails = __webpack_require__(5) , shared = __webpack_require__(21) , setToStringTag = __webpack_require__(22) , uid = __webpack_require__(20) , wks = __webpack_require__(23) , wksExt = __webpack_require__(24) , wksDefine = __webpack_require__(25) , keyOf = __webpack_require__(27) , enumKeys = __webpack_require__(40) , isArray = __webpack_require__(43) , anObject = __webpack_require__(12) , toIObject = __webpack_require__(30) , toPrimitive = __webpack_require__(16) , createDesc = __webpack_require__(17) , _create = __webpack_require__(44) , gOPNExt = __webpack_require__(47) , $GOPD = __webpack_require__(49) , $DP = __webpack_require__(11) , $keys = __webpack_require__(28) , gOPD = $GOPD.f , dP = $DP.f , gOPN = gOPNExt.f , $Symbol = global.Symbol , $JSON = global.JSON , _stringify = $JSON && $JSON.stringify , PROTOTYPE = 'prototype' , HIDDEN = wks('_hidden') , TO_PRIMITIVE = wks('toPrimitive') , isEnum = {}.propertyIsEnumerable , SymbolRegistry = shared('symbol-registry') , AllSymbols = shared('symbols') , OPSymbols = shared('op-symbols') , ObjectProto = Object[PROTOTYPE] , USE_NATIVE = typeof $Symbol == 'function' , QObject = global.QObject; // Don't use setters in Qt Script, https://github.com/zloirock/core-js/issues/173 var setter = !QObject || !QObject[PROTOTYPE] || !QObject[PROTOTYPE].findChild; // fallback for old Android, https://code.google.com/p/v8/issues/detail?id=687 var setSymbolDesc = DESCRIPTORS && $fails(function(){ return _create(dP({}, 'a', { get: function(){ return dP(this, 'a', {value: 7}).a; } })).a != 7; }) ? function(it, key, D){ var protoDesc = gOPD(ObjectProto, key); if(protoDesc)delete ObjectProto[key]; dP(it, key, D); if(protoDesc && it !== ObjectProto)dP(ObjectProto, key, protoDesc); } : dP; var wrap = function(tag){ var sym = AllSymbols[tag] = _create($Symbol[PROTOTYPE]); sym._k = tag; return sym; }; var isSymbol = USE_NATIVE && typeof $Symbol.iterator == 'symbol' ? function(it){ return typeof it == 'symbol'; } : function(it){ return it instanceof $Symbol; }; var $defineProperty = function defineProperty(it, key, D){ if(it === ObjectProto)$defineProperty(OPSymbols, key, D); anObject(it); key = toPrimitive(key, true); anObject(D); if(has(AllSymbols, key)){ if(!D.enumerable){ if(!has(it, HIDDEN))dP(it, HIDDEN, createDesc(1, {})); it[HIDDEN][key] = true; } else { if(has(it, HIDDEN) && it[HIDDEN][key])it[HIDDEN][key] = false; D = _create(D, {enumerable: createDesc(0, false)}); } return setSymbolDesc(it, key, D); } return dP(it, key, D); }; var $defineProperties = function defineProperties(it, P){ anObject(it); var keys = enumKeys(P = toIObject(P)) , i = 0 , l = keys.length , key; while(l > i)$defineProperty(it, key = keys[i++], P[key]); return it; }; var $create = function create(it, P){ return P === undefined ? _create(it) : $defineProperties(_create(it), P); }; var $propertyIsEnumerable = function propertyIsEnumerable(key){ var E = isEnum.call(this, key = toPrimitive(key, true)); if(this === ObjectProto && has(AllSymbols, key) && !has(OPSymbols, key))return false; return E || !has(this, key) || !has(AllSymbols, key) || has(this, HIDDEN) && this[HIDDEN][key] ? E : true; }; var $getOwnPropertyDescriptor = function getOwnPropertyDescriptor(it, key){ it = toIObject(it); key = toPrimitive(key, true); if(it === ObjectProto && has(AllSymbols, key) && !has(OPSymbols, key))return; var D = gOPD(it, key); if(D && has(AllSymbols, key) && !(has(it, HIDDEN) && it[HIDDEN][key]))D.enumerable = true; return D; }; var $getOwnPropertyNames = function getOwnPropertyNames(it){ var names = gOPN(toIObject(it)) , result = [] , i = 0 , key; while(names.length > i){ if(!has(AllSymbols, key = names[i++]) && key != HIDDEN && key != META)result.push(key); } return result; }; var $getOwnPropertySymbols = function getOwnPropertySymbols(it){ var IS_OP = it === ObjectProto , names = gOPN(IS_OP ? OPSymbols : toIObject(it)) , result = [] , i = 0 , key; while(names.length > i){ if(has(AllSymbols, key = names[i++]) && (IS_OP ? has(ObjectProto, key) : true))result.push(AllSymbols[key]); } return result; }; // 19.4.1.1 Symbol([description]) if(!USE_NATIVE){ $Symbol = function Symbol(){ if(this instanceof $Symbol)throw TypeError('Symbol is not a constructor!'); var tag = uid(arguments.length > 0 ? arguments[0] : undefined); var $set = function(value){ if(this === ObjectProto)$set.call(OPSymbols, value); if(has(this, HIDDEN) && has(this[HIDDEN], tag))this[HIDDEN][tag] = false; setSymbolDesc(this, tag, createDesc(1, value)); }; if(DESCRIPTORS && setter)setSymbolDesc(ObjectProto, tag, {configurable: true, set: $set}); return wrap(tag); }; redefine($Symbol[PROTOTYPE], 'toString', function toString(){ return this._k; }); $GOPD.f = $getOwnPropertyDescriptor; $DP.f = $defineProperty; __webpack_require__(48).f = gOPNExt.f = $getOwnPropertyNames; __webpack_require__(42).f = $propertyIsEnumerable; __webpack_require__(41).f = $getOwnPropertySymbols; if(DESCRIPTORS && !__webpack_require__(26)){ redefine(ObjectProto, 'propertyIsEnumerable', $propertyIsEnumerable, true); } wksExt.f = function(name){ return wrap(wks(name)); } } $export($export.G + $export.W + $export.F * !USE_NATIVE, {Symbol: $Symbol}); for(var symbols = ( // 19.4.2.2, 19.4.2.3, 19.4.2.4, 19.4.2.6, 19.4.2.8, 19.4.2.9, 19.4.2.10, 19.4.2.11, 19.4.2.12, 19.4.2.13, 19.4.2.14 'hasInstance,isConcatSpreadable,iterator,match,replace,search,species,split,toPrimitive,toStringTag,unscopables' ).split(','), i = 0; symbols.length > i; )wks(symbols[i++]); for(var symbols = $keys(wks.store), i = 0; symbols.length > i; )wksDefine(symbols[i++]); $export($export.S + $export.F * !USE_NATIVE, 'Symbol', { // 19.4.2.1 Symbol.for(key) 'for': function(key){ return has(SymbolRegistry, key += '') ? SymbolRegistry[key] : SymbolRegistry[key] = $Symbol(key); }, // 19.4.2.5 Symbol.keyFor(sym) keyFor: function keyFor(key){ if(isSymbol(key))return keyOf(SymbolRegistry, key); throw TypeError(key + ' is not a symbol!'); }, useSetter: function(){ setter = true; }, useSimple: function(){ setter = false; } }); $export($export.S + $export.F * !USE_NATIVE, 'Object', { // 19.1.2.2 Object.create(O [, Properties]) create: $create, // 19.1.2.4 Object.defineProperty(O, P, Attributes) defineProperty: $defineProperty, // 19.1.2.3 Object.defineProperties(O, Properties) defineProperties: $defineProperties, // 19.1.2.6 Object.getOwnPropertyDescriptor(O, P) getOwnPropertyDescriptor: $getOwnPropertyDescriptor, // 19.1.2.7 Object.getOwnPropertyNames(O) getOwnPropertyNames: $getOwnPropertyNames, // 19.1.2.8 Object.getOwnPropertySymbols(O) getOwnPropertySymbols: $getOwnPropertySymbols }); // 24.3.2 JSON.stringify(value [, replacer [, space]]) $JSON && $export($export.S + $export.F * (!USE_NATIVE || $fails(function(){ var S = $Symbol(); // MS Edge converts symbol values to JSON as {} // WebKit converts symbol values to JSON as null // V8 throws on boxed symbols return _stringify([S]) != '[null]' || _stringify({a: S}) != '{}' || _stringify(Object(S)) != '{}'; })), 'JSON', { stringify: function stringify(it){ if(it === undefined || isSymbol(it))return; // IE8 returns string on undefined var args = [it] , i = 1 , replacer, $replacer; while(arguments.length > i)args.push(arguments[i++]); replacer = args[1]; if(typeof replacer == 'function')$replacer = replacer; if($replacer || !isArray(replacer))replacer = function(key, value){ if($replacer)value = $replacer.call(this, key, value); if(!isSymbol(value))return value; }; args[1] = replacer; return _stringify.apply($JSON, args); } }); // 19.4.3.4 Symbol.prototype[@@toPrimitive](hint) $Symbol[PROTOTYPE][TO_PRIMITIVE] || __webpack_require__(10)($Symbol[PROTOTYPE], TO_PRIMITIVE, $Symbol[PROTOTYPE].valueOf); // 19.4.3.5 Symbol.prototype[@@toStringTag] setToStringTag($Symbol, 'Symbol'); // 20.2.1.9 Math[@@toStringTag] setToStringTag(Math, 'Math', true); // 24.3.3 JSON[@@toStringTag] setToStringTag(global.JSON, 'JSON', true); /***/ }, /* 2 */ /***/ function(module, exports) { // https://github.com/zloirock/core-js/issues/86#issuecomment-115759028 var global = module.exports = typeof window != 'undefined' && window.Math == Math ? window : typeof self != 'undefined' && self.Math == Math ? self : Function('return this')(); if(typeof __g == 'number')__g = global; // eslint-disable-line no-undef /***/ }, /* 3 */ /***/ function(module, exports) { var hasOwnProperty = {}.hasOwnProperty; module.exports = function(it, key){ return hasOwnProperty.call(it, key); }; /***/ }, /* 4 */ /***/ function(module, exports, __webpack_require__) { // Thank's IE8 for his funny defineProperty module.exports = !__webpack_require__(5)(function(){ return Object.defineProperty({}, 'a', {get: function(){ return 7; }}).a != 7; }); /***/ }, /* 5 */ /***/ function(module, exports) { module.exports = function(exec){ try { return !!exec(); } catch(e){ return true; } }; /***/ }, /* 6 */ /***/ function(module, exports, __webpack_require__) { var global = __webpack_require__(2) , core = __webpack_require__(7) , ctx = __webpack_require__(8) , hide = __webpack_require__(10) , PROTOTYPE = 'prototype'; var $export = function(type, name, source){ var IS_FORCED = type & $export.F , IS_GLOBAL = type & $export.G , IS_STATIC = type & $export.S , IS_PROTO = type & $export.P , IS_BIND = type & $export.B , IS_WRAP = type & $export.W , exports = IS_GLOBAL ? core : core[name] || (core[name] = {}) , expProto = exports[PROTOTYPE] , target = IS_GLOBAL ? global : IS_STATIC ? global[name] : (global[name] || {})[PROTOTYPE] , key, own, out; if(IS_GLOBAL)source = name; for(key in source){ // contains in native own = !IS_FORCED && target && target[key] !== undefined; if(own && key in exports)continue; // export native or passed out = own ? target[key] : source[key]; // prevent global pollution for namespaces exports[key] = IS_GLOBAL && typeof target[key] != 'function' ? source[key] // bind timers to global for call from export context : IS_BIND && own ? ctx(out, global) // wrap global constructors for prevent change them in library : IS_WRAP && target[key] == out ? (function(C){ var F = function(a, b, c){ if(this instanceof C){ switch(arguments.length){ case 0: return new C; case 1: return new C(a); case 2: return new C(a, b); } return new C(a, b, c); } return C.apply(this, arguments); }; F[PROTOTYPE] = C[PROTOTYPE]; return F; // make static versions for prototype methods })(out) : IS_PROTO && typeof out == 'function' ? ctx(Function.call, out) : out; // export proto methods to core.%CONSTRUCTOR%.methods.%NAME% if(IS_PROTO){ (exports.virtual || (exports.virtual = {}))[key] = out; // export proto methods to core.%CONSTRUCTOR%.prototype.%NAME% if(type & $export.R && expProto && !expProto[key])hide(expProto, key, out); } } }; // type bitmap $export.F = 1; // forced $export.G = 2; // global $export.S = 4; // static $export.P = 8; // proto $export.B = 16; // bind $export.W = 32; // wrap $export.U = 64; // safe $export.R = 128; // real proto method for `library` module.exports = $export; /***/ }, /* 7 */ /***/ function(module, exports) { var core = module.exports = {version: '2.4.0'}; if(typeof __e == 'number')__e = core; // eslint-disable-line no-undef /***/ }, /* 8 */ /***/ function(module, exports, __webpack_require__) { // optional / simple context binding var aFunction = __webpack_require__(9); module.exports = function(fn, that, length){ aFunction(fn); if(that === undefined)return fn; switch(length){ case 1: return function(a){ return fn.call(that, a); }; case 2: return function(a, b){ return fn.call(that, a, b); }; case 3: return function(a, b, c){ return fn.call(that, a, b, c); }; } return function(/* ...args */){ return fn.apply(that, arguments); }; }; /***/ }, /* 9 */ /***/ function(module, exports) { module.exports = function(it){ if(typeof it != 'function')throw TypeError(it + ' is not a function!'); return it; }; /***/ }, /* 10 */ /***/ function(module, exports, __webpack_require__) { var dP = __webpack_require__(11) , createDesc = __webpack_require__(17); module.exports = __webpack_require__(4) ? function(object, key, value){ return dP.f(object, key, createDesc(1, value)); } : function(object, key, value){ object[key] = value; return object; }; /***/ }, /* 11 */ /***/ function(module, exports, __webpack_require__) { var anObject = __webpack_require__(12) , IE8_DOM_DEFINE = __webpack_require__(14) , toPrimitive = __webpack_require__(16) , dP = Object.defineProperty; exports.f = __webpack_require__(4) ? Object.defineProperty : function defineProperty(O, P, Attributes){ anObject(O); P = toPrimitive(P, true); anObject(Attributes); if(IE8_DOM_DEFINE)try { return dP(O, P, Attributes); } catch(e){ /* empty */ } if('get' in Attributes || 'set' in Attributes)throw TypeError('Accessors not supported!'); if('value' in Attributes)O[P] = Attributes.value; return O; }; /***/ }, /* 12 */ /***/ function(module, exports, __webpack_require__) { var isObject = __webpack_require__(13); module.exports = function(it){ if(!isObject(it))throw TypeError(it + ' is not an object!'); return it; }; /***/ }, /* 13 */ /***/ function(module, exports) { module.exports = function(it){ return typeof it === 'object' ? it !== null : typeof it === 'function'; }; /***/ }, /* 14 */ /***/ function(module, exports, __webpack_require__) { module.exports = !__webpack_require__(4) && !__webpack_require__(5)(function(){ return Object.defineProperty(__webpack_require__(15)('div'), 'a', {get: function(){ return 7; }}).a != 7; }); /***/ }, /* 15 */ /***/ function(module, exports, __webpack_require__) { var isObject = __webpack_require__(13) , document = __webpack_require__(2).document // in old IE typeof document.createElement is 'object' , is = isObject(document) && isObject(document.createElement); module.exports = function(it){ return is ? document.createElement(it) : {}; }; /***/ }, /* 16 */ /***/ function(module, exports, __webpack_require__) { // 7.1.1 ToPrimitive(input [, PreferredType]) var isObject = __webpack_require__(13); // instead of the ES6 spec version, we didn't implement @@toPrimitive case // and the second argument - flag - preferred type is a string module.exports = function(it, S){ if(!isObject(it))return it; var fn, val; if(S && typeof (fn = it.toString) == 'function' && !isObject(val = fn.call(it)))return val; if(typeof (fn = it.valueOf) == 'function' && !isObject(val = fn.call(it)))return val; if(!S && typeof (fn = it.toString) == 'function' && !isObject(val = fn.call(it)))return val; throw TypeError("Can't convert object to primitive value"); }; /***/ }, /* 17 */ /***/ function(module, exports) { module.exports = function(bitmap, value){ return { enumerable : !(bitmap & 1), configurable: !(bitmap & 2), writable : !(bitmap & 4), value : value }; }; /***/ }, /* 18 */ /***/ function(module, exports, __webpack_require__) { module.exports = __webpack_require__(10); /***/ }, /* 19 */ /***/ function(module, exports, __webpack_require__) { var META = __webpack_require__(20)('meta') , isObject = __webpack_require__(13) , has = __webpack_require__(3) , setDesc = __webpack_require__(11).f , id = 0; var isExtensible = Object.isExtensible || function(){ return true; }; var FREEZE = !__webpack_require__(5)(function(){ return isExtensible(Object.preventExtensions({})); }); var setMeta = function(it){ setDesc(it, META, {value: { i: 'O' + ++id, // object ID w: {} // weak collections IDs }}); }; var fastKey = function(it, create){ // return primitive with prefix if(!isObject(it))return typeof it == 'symbol' ? it : (typeof it == 'string' ? 'S' : 'P') + it; if(!has(it, META)){ // can't set metadata to uncaught frozen object if(!isExtensible(it))return 'F'; // not necessary to add metadata if(!create)return 'E'; // add missing metadata setMeta(it); // return object ID } return it[META].i; }; var getWeak = function(it, create){ if(!has(it, META)){ // can't set metadata to uncaught frozen object if(!isExtensible(it))return true; // not necessary to add metadata if(!create)return false; // add missing metadata setMeta(it); // return hash weak collections IDs } return it[META].w; }; // add metadata on freeze-family methods calling var onFreeze = function(it){ if(FREEZE && meta.NEED && isExtensible(it) && !has(it, META))setMeta(it); return it; }; var meta = module.exports = { KEY: META, NEED: false, fastKey: fastKey, getWeak: getWeak, onFreeze: onFreeze }; /***/ }, /* 20 */ /***/ function(module, exports) { var id = 0 , px = Math.random(); module.exports = function(key){ return 'Symbol('.concat(key === undefined ? '' : key, ')_', (++id + px).toString(36)); }; /***/ }, /* 21 */ /***/ function(module, exports, __webpack_require__) { var global = __webpack_require__(2) , SHARED = '__core-js_shared__' , store = global[SHARED] || (global[SHARED] = {}); module.exports = function(key){ return store[key] || (store[key] = {}); }; /***/ }, /* 22 */ /***/ function(module, exports, __webpack_require__) { var def = __webpack_require__(11).f , has = __webpack_require__(3) , TAG = __webpack_require__(23)('toStringTag'); module.exports = function(it, tag, stat){ if(it && !has(it = stat ? it : it.prototype, TAG))def(it, TAG, {configurable: true, value: tag}); }; /***/ }, /* 23 */ /***/ function(module, exports, __webpack_require__) { var store = __webpack_require__(21)('wks') , uid = __webpack_require__(20) , Symbol = __webpack_require__(2).Symbol , USE_SYMBOL = typeof Symbol == 'function'; var $exports = module.exports = function(name){ return store[name] || (store[name] = USE_SYMBOL && Symbol[name] || (USE_SYMBOL ? Symbol : uid)('Symbol.' + name)); }; $exports.store = store; /***/ }, /* 24 */ /***/ function(module, exports, __webpack_require__) { exports.f = __webpack_require__(23); /***/ }, /* 25 */ /***/ function(module, exports, __webpack_require__) { var global = __webpack_require__(2) , core = __webpack_require__(7) , LIBRARY = __webpack_require__(26) , wksExt = __webpack_require__(24) , defineProperty = __webpack_require__(11).f; module.exports = function(name){ var $Symbol = core.Symbol || (core.Symbol = LIBRARY ? {} : global.Symbol || {}); if(name.charAt(0) != '_' && !(name in $Symbol))defineProperty($Symbol, name, {value: wksExt.f(name)}); }; /***/ }, /* 26 */ /***/ function(module, exports) { module.exports = true; /***/ }, /* 27 */ /***/ function(module, exports, __webpack_require__) { var getKeys = __webpack_require__(28) , toIObject = __webpack_require__(30); module.exports = function(object, el){ var O = toIObject(object) , keys = getKeys(O) , length = keys.length , index = 0 , key; while(length > index)if(O[key = keys[index++]] === el)return key; }; /***/ }, /* 28 */ /***/ function(module, exports, __webpack_require__) { // 19.1.2.14 / 15.2.3.14 Object.keys(O) var $keys = __webpack_require__(29) , enumBugKeys = __webpack_require__(39); module.exports = Object.keys || function keys(O){ return $keys(O, enumBugKeys); }; /***/ }, /* 29 */ /***/ function(module, exports, __webpack_require__) { var has = __webpack_require__(3) , toIObject = __webpack_require__(30) , arrayIndexOf = __webpack_require__(34)(false) , IE_PROTO = __webpack_require__(38)('IE_PROTO'); module.exports = function(object, names){ var O = toIObject(object) , i = 0 , result = [] , key; for(key in O)if(key != IE_PROTO)has(O, key) && result.push(key); // Don't enum bug & hidden keys while(names.length > i)if(has(O, key = names[i++])){ ~arrayIndexOf(result, key) || result.push(key); } return result; }; /***/ }, /* 30 */ /***/ function(module, exports, __webpack_require__) { // to indexed object, toObject with fallback for non-array-like ES3 strings var IObject = __webpack_require__(31) , defined = __webpack_require__(33); module.exports = function(it){ return IObject(defined(it)); }; /***/ }, /* 31 */ /***/ function(module, exports, __webpack_require__) { // fallback for non-array-like ES3 and non-enumerable old V8 strings var cof = __webpack_require__(32); module.exports = Object('z').propertyIsEnumerable(0) ? Object : function(it){ return cof(it) == 'String' ? it.split('') : Object(it); }; /***/ }, /* 32 */ /***/ function(module, exports) { var toString = {}.toString; module.exports = function(it){ return toString.call(it).slice(8, -1); }; /***/ }, /* 33 */ /***/ function(module, exports) { // 7.2.1 RequireObjectCoercible(argument) module.exports = function(it){ if(it == undefined)throw TypeError("Can't call method on " + it); return it; }; /***/ }, /* 34 */ /***/ function(module, exports, __webpack_require__) { // false -> Array#indexOf // true -> Array#includes var toIObject = __webpack_require__(30) , toLength = __webpack_require__(35) , toIndex = __webpack_require__(37); module.exports = function(IS_INCLUDES){ return function($this, el, fromIndex){ var O = toIObject($this) , length = toLength(O.length) , index = toIndex(fromIndex, length) , value; // Array#includes uses SameValueZero equality algorithm if(IS_INCLUDES && el != el)while(length > index){ value = O[index++]; if(value != value)return true; // Array#toIndex ignores holes, Array#includes - not } else for(;length > index; index++)if(IS_INCLUDES || index in O){ if(O[index] === el)return IS_INCLUDES || index || 0; } return !IS_INCLUDES && -1; }; }; /***/ }, /* 35 */ /***/ function(module, exports, __webpack_require__) { // 7.1.15 ToLength var toInteger = __webpack_require__(36) , min = Math.min; module.exports = function(it){ return it > 0 ? min(toInteger(it), 0x1fffffffffffff) : 0; // pow(2, 53) - 1 == 9007199254740991 }; /***/ }, /* 36 */ /***/ function(module, exports) { // 7.1.4 ToInteger var ceil = Math.ceil , floor = Math.floor; module.exports = function(it){ return isNaN(it = +it) ? 0 : (it > 0 ? floor : ceil)(it); }; /***/ }, /* 37 */ /***/ function(module, exports, __webpack_require__) { var toInteger = __webpack_require__(36) , max = Math.max , min = Math.min; module.exports = function(index, length){ index = toInteger(index); return index < 0 ? max(index + length, 0) : min(index, length); }; /***/ }, /* 38 */ /***/ function(module, exports, __webpack_require__) { var shared = __webpack_require__(21)('keys') , uid = __webpack_require__(20); module.exports = function(key){ return shared[key] || (shared[key] = uid(key)); }; /***/ }, /* 39 */ /***/ function(module, exports) { // IE 8- don't enum bug keys module.exports = ( 'constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf' ).split(','); /***/ }, /* 40 */ /***/ function(module, exports, __webpack_require__) { // all enumerable object keys, includes symbols var getKeys = __webpack_require__(28) , gOPS = __webpack_require__(41) , pIE = __webpack_require__(42); module.exports = function(it){ var result = getKeys(it) , getSymbols = gOPS.f; if(getSymbols){ var symbols = getSymbols(it) , isEnum = pIE.f , i = 0 , key; while(symbols.length > i)if(isEnum.call(it, key = symbols[i++]))result.push(key); } return result; }; /***/ }, /* 41 */ /***/ function(module, exports) { exports.f = Object.getOwnPropertySymbols; /***/ }, /* 42 */ /***/ function(module, exports) { exports.f = {}.propertyIsEnumerable; /***/ }, /* 43 */ /***/ function(module, exports, __webpack_require__) { // 7.2.2 IsArray(argument) var cof = __webpack_require__(32); module.exports = Array.isArray || function isArray(arg){ return cof(arg) == 'Array'; }; /***/ }, /* 44 */ /***/ function(module, exports, __webpack_require__) { // 19.1.2.2 / 15.2.3.5 Object.create(O [, Properties]) var anObject = __webpack_require__(12) , dPs = __webpack_require__(45) , enumBugKeys = __webpack_require__(39) , IE_PROTO = __webpack_require__(38)('IE_PROTO') , Empty = function(){ /* empty */ } , PROTOTYPE = 'prototype'; // Create object with fake `null` prototype: use iframe Object with cleared prototype var createDict = function(){ // Thrash, waste and sodomy: IE GC bug var iframe = __webpack_require__(15)('iframe') , i = enumBugKeys.length , lt = '<' , gt = '>' , iframeDocument; iframe.style.display = 'none'; __webpack_require__(46).appendChild(iframe); iframe.src = 'javascript:'; // eslint-disable-line no-script-url // createDict = iframe.contentWindow.Object; // html.removeChild(iframe); iframeDocument = iframe.contentWindow.document; iframeDocument.open(); iframeDocument.write(lt + 'script' + gt + 'document.F=Object' + lt + '/script' + gt); iframeDocument.close(); createDict = iframeDocument.F; while(i--)delete createDict[PROTOTYPE][enumBugKeys[i]]; return createDict(); }; module.exports = Object.create || function create(O, Properties){ var result; if(O !== null){ Empty[PROTOTYPE] = anObject(O); result = new Empty; Empty[PROTOTYPE] = null; // add "__proto__" for Object.getPrototypeOf polyfill result[IE_PROTO] = O; } else result = createDict(); return Properties === undefined ? result : dPs(result, Properties); }; /***/ }, /* 45 */ /***/ function(module, exports, __webpack_require__) { var dP = __webpack_require__(11) , anObject = __webpack_require__(12) , getKeys = __webpack_require__(28); module.exports = __webpack_require__(4) ? Object.defineProperties : function defineProperties(O, Properties){ anObject(O); var keys = getKeys(Properties) , length = keys.length , i = 0 , P; while(length > i)dP.f(O, P = keys[i++], Properties[P]); return O; }; /***/ }, /* 46 */ /***/ function(module, exports, __webpack_require__) { module.exports = __webpack_require__(2).document && document.documentElement; /***/ }, /* 47 */ /***/ function(module, exports, __webpack_require__) { // fallback for IE11 buggy Object.getOwnPropertyNames with iframe and window var toIObject = __webpack_require__(30) , gOPN = __webpack_require__(48).f , toString = {}.toString; var windowNames = typeof window == 'object' && window && Object.getOwnPropertyNames ? Object.getOwnPropertyNames(window) : []; var getWindowNames = function(it){ try { return gOPN(it); } catch(e){ return windowNames.slice(); } }; module.exports.f = function getOwnPropertyNames(it){ return windowNames && toString.call(it) == '[object Window]' ? getWindowNames(it) : gOPN(toIObject(it)); }; /***/ }, /* 48 */ /***/ function(module, exports, __webpack_require__) { // 19.1.2.7 / 15.2.3.4 Object.getOwnPropertyNames(O) var $keys = __webpack_require__(29) , hiddenKeys = __webpack_require__(39).concat('length', 'prototype'); exports.f = Object.getOwnPropertyNames || function getOwnPropertyNames(O){ return $keys(O, hiddenKeys); }; /***/ }, /* 49 */ /***/ function(module, exports, __webpack_require__) { var pIE = __webpack_require__(42) , createDesc = __webpack_require__(17) , toIObject = __webpack_require__(30) , toPrimitive = __webpack_require__(16) , has = __webpack_require__(3) , IE8_DOM_DEFINE = __webpack_require__(14) , gOPD = Object.getOwnPropertyDescriptor; exports.f = __webpack_require__(4) ? gOPD : function getOwnPropertyDescriptor(O, P){ O = toIObject(O); P = toPrimitive(P, true); if(IE8_DOM_DEFINE)try { return gOPD(O, P); } catch(e){ /* empty */ } if(has(O, P))return createDesc(!pIE.f.call(O, P), O[P]); }; /***/ }, /* 50 */ /***/ function(module, exports, __webpack_require__) { var $export = __webpack_require__(6); // 19.1.2.4 / 15.2.3.6 Object.defineProperty(O, P, Attributes) $export($export.S + $export.F * !__webpack_require__(4), 'Object', {defineProperty: __webpack_require__(11).f}); /***/ }, /* 51 */ /***/ function(module, exports, __webpack_require__) { var $export = __webpack_require__(6); // 19.1.2.3 / 15.2.3.7 Object.defineProperties(O, Properties) $export($export.S + $export.F * !__webpack_require__(4), 'Object', {defineProperties: __webpack_require__(45)}); /***/ }, /* 52 */ /***/ function(module, exports, __webpack_require__) { // 19.1.2.6 Object.getOwnPropertyDescriptor(O, P) var toIObject = __webpack_require__(30) , $getOwnPropertyDescriptor = __webpack_require__(49).f; __webpack_require__(53)('getOwnPropertyDescriptor', function(){ return function getOwnPropertyDescriptor(it, key){ return $getOwnPropertyDescriptor(toIObject(it), key); }; }); /***/ }, /* 53 */ /***/ function(module, exports, __webpack_require__) { // most Object methods by ES6 should accept primitives var $export = __webpack_require__(6) , core = __webpack_require__(7) , fails = __webpack_require__(5); module.exports = function(KEY, exec){ var fn = (core.Object || {})[KEY] || Object[KEY] , exp = {}; exp[KEY] = exec(fn); $export($export.S + $export.F * fails(function(){ fn(1); }), 'Object', exp); }; /***/ }, /* 54 */ /***/ function(module, exports, __webpack_require__) { var $export = __webpack_require__(6) // 19.1.2.2 / 15.2.3.5 Object.create(O [, Properties]) $export($export.S, 'Object', {create: __webpack_require__(44)}); /***/ }, /* 55 */ /***/ function(module, exports, __webpack_require__) { // 19.1.2.9 Object.getPrototypeOf(O) var toObject = __webpack_require__(56) , $getPrototypeOf = __webpack_require__(57); __webpack_require__(53)('getPrototypeOf', function(){ return function getPrototypeOf(it){ return $getPrototypeOf(toObject(it)); }; }); /***/ }, /* 56 */ /***/ function(module, exports, __webpack_require__) { // 7.1.13 ToObject(argument) var defined = __webpack_require__(33); module.exports = function(it){ return Object(defined(it)); }; /***/ }, /* 57 */ /***/ function(module, exports, __webpack_require__) { // 19.1.2.9 / 15.2.3.2 Object.getPrototypeOf(O) var has = __webpack_require__(3) , toObject = __webpack_require__(56) , IE_PROTO = __webpack_require__(38)('IE_PROTO') , ObjectProto = Object.prototype; module.exports = Object.getPrototypeOf || function(O){ O = toObject(O); if(has(O, IE_PROTO))return O[IE_PROTO]; if(typeof O.constructor == 'function' && O instanceof O.constructor){ return O.constructor.prototype; } return O instanceof Object ? ObjectProto : null; }; /***/ }, /* 58 */ /***/ function(module, exports, __webpack_require__) { // 19.1.2.14 Object.keys(O) var toObject = __webpack_require__(56) , $keys = __webpack_require__(28); __webpack_require__(53)('keys', function(){ return function keys(it){ return $keys(toObject(it)); }; }); /***/ }, /* 59 */ /***/ function(module, exports, __webpack_require__) { // 19.1.2.7 Object.getOwnPropertyNames(O) __webpack_require__(53)('getOwnPropertyNames', function(){ return __webpack_require__(47).f; }); /***/ }, /* 60 */ /***/ function(module, exports, __webpack_require__) { // 19.1.2.5 Object.freeze(O) var isObject = __webpack_require__(13) , meta = __webpack_require__(19).onFreeze; __webpack_require__(53)('freeze', function($freeze){ return function freeze(it){ return $freeze && isObject(it) ? $freeze(meta(it)) : it; }; }); /***/ }, /* 61 */ /***/ function(module, exports, __webpack_require__) { // 19.1.2.17 Object.seal(O) var isObject = __webpack_require__(13) , meta = __webpack_require__(19).onFreeze; __webpack_require__(53)('seal', function($seal){ return function seal(it){ return $seal && isObject(it) ? $seal(meta(it)) : it; }; }); /***/ }, /* 62 */ /***/ function(module, exports, __webpack_require__) { // 19.1.2.15 Object.preventExtensions(O) var isObject = __webpack_require__(13) , meta = __webpack_require__(19).onFreeze; __webpack_require__(53)('preventExtensions', function($preventExtensions){ return function preventExtensions(it){ return $preventExtensions && isObject(it) ? $preventExtensions(meta(it)) : it; }; }); /***/ }, /* 63 */ /***/ function(module, exports, __webpack_require__) { // 19.1.2.12 Object.isFrozen(O) var isObject = __webpack_require__(13); __webpack_require__(53)('isFrozen', function($isFrozen){ return function isFrozen(it){ return isObject(it) ? $isFrozen ? $isFrozen(it) : false : true; }; }); /***/ }, /* 64 */ /***/ function(module, exports, __webpack_require__) { // 19.1.2.13 Object.isSealed(O) var isObject = __webpack_require__(13); __webpack_require__(53)('isSealed', function($isSealed){ return function isSealed(it){ return isObject(it) ? $isSealed ? $isSealed(it) : false : true; }; }); /***/ }, /* 65 */ /***/ function(module, exports, __webpack_require__) { // 19.1.2.11 Object.isExtensible(O) var isObject = __webpack_require__(13); __webpack_require__(53)('isExtensible', function($isExtensible){ return function isExtensible(it){ return isObject(it) ? $isExtensible ? $isExtensible(it) : true : false; }; }); /***/ }, /* 66 */ /***/ function(module, exports, __webpack_require__) { // 19.1.3.1 Object.assign(target, source) var $export = __webpack_require__(6); $export($export.S + $export.F, 'Object', {assign: __webpack_require__(67)}); /***/ }, /* 67 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; // 19.1.2.1 Object.assign(target, source, ...) var getKeys = __webpack_require__(28) , gOPS = __webpack_require__(41) , pIE = __webpack_require__(42) , toObject = __webpack_require__(56) , IObject = __webpack_require__(31) , $assign = Object.assign; // should work with symbols and should have deterministic property order (V8 bug) module.exports = !$assign || __webpack_require__(5)(function(){ var A = {} , B = {} , S = Symbol() , K = 'abcdefghijklmnopqrst'; A[S] = 7; K.split('').forEach(function(k){ B[k] = k; }); return $assign({}, A)[S] != 7 || Object.keys($assign({}, B)).join('') != K; }) ? function assign(target, source){ // eslint-disable-line no-unused-vars var T = toObject(target) , aLen = arguments.length , index = 1 , getSymbols = gOPS.f , isEnum = pIE.f; while(aLen > index){ var S = IObject(arguments[index++]) , keys = getSymbols ? getKeys(S).concat(getSymbols(S)) : getKeys(S) , length = keys.length , j = 0 , key; while(length > j)if(isEnum.call(S, key = keys[j++]))T[key] = S[key]; } return T; } : $assign; /***/ }, /* 68 */ /***/ function(module, exports, __webpack_require__) { // 19.1.3.10 Object.is(value1, value2) var $export = __webpack_require__(6); $export($export.S, 'Object', {is: __webpack_require__(69)}); /***/ }, /* 69 */ /***/ function(module, exports) { // 7.2.9 SameValue(x, y) module.exports = Object.is || function is(x, y){ return x === y ? x !== 0 || 1 / x === 1 / y : x != x && y != y; }; /***/ }, /* 70 */ /***/ function(module, exports, __webpack_require__) { // 19.1.3.19 Object.setPrototypeOf(O, proto) var $export = __webpack_require__(6); $export($export.S, 'Object', {setPrototypeOf: __webpack_require__(71).set}); /***/ }, /* 71 */ /***/ function(module, exports, __webpack_require__) { // Works with __proto__ only. Old v8 can't work with null proto objects. /* eslint-disable no-proto */ var isObject = __webpack_require__(13) , anObject = __webpack_require__(12); var check = function(O, proto){ anObject(O); if(!isObject(proto) && proto !== null)throw TypeError(proto + ": can't set as prototype!"); }; module.exports = { set: Object.setPrototypeOf || ('__proto__' in {} ? // eslint-disable-line function(test, buggy, set){ try { set = __webpack_require__(8)(Function.call, __webpack_require__(49).f(Object.prototype, '__proto__').set, 2); set(test, []); buggy = !(test instanceof Array); } catch(e){ buggy = true; } return function setPrototypeOf(O, proto){ check(O, proto); if(buggy)O.__proto__ = proto; else set(O, proto); return O; }; }({}, false) : undefined), check: check }; /***/ }, /* 72 */ /***/ function(module, exports, __webpack_require__) { // 19.2.3.2 / 15.3.4.5 Function.prototype.bind(thisArg, args...) var $export = __webpack_require__(6); $export($export.P, 'Function', {bind: __webpack_require__(73)}); /***/ }, /* 73 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; var aFunction = __webpack_require__(9) , isObject = __webpack_require__(13) , invoke = __webpack_require__(74) , arraySlice = [].slice , factories = {}; var construct = function(F, len, args){ if(!(len in factories)){ for(var n = [], i = 0; i < len; i++)n[i] = 'a[' + i + ']'; factories[len] = Function('F,a', 'return new F(' + n.join(',') + ')'); } return factories[len](F, args); }; module.exports = Function.bind || function bind(that /*, args... */){ var fn = aFunction(this) , partArgs = arraySlice.call(arguments, 1); var bound = function(/* args... */){ var args = partArgs.concat(arraySlice.call(arguments)); return this instanceof bound ? construct(fn, args.length, args) : invoke(fn, args, that); }; if(isObject(fn.prototype))bound.prototype = fn.prototype; return bound; }; /***/ }, /* 74 */ /***/ function(module, exports) { // fast apply, http://jsperf.lnkit.com/fast-apply/5 module.exports = function(fn, args, that){ var un = that === undefined; switch(args.length){ case 0: return un ? fn() : fn.call(that); case 1: return un ? fn(args[0]) : fn.call(that, args[0]); case 2: return un ? fn(args[0], args[1]) : fn.call(that, args[0], args[1]); case 3: return un ? fn(args[0], args[1], args[2]) : fn.call(that, args[0], args[1], args[2]); case 4: return un ? fn(args[0], args[1], args[2], args[3]) : fn.call(that, args[0], args[1], args[2], args[3]); } return fn.apply(that, args); }; /***/ }, /* 75 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; var isObject = __webpack_require__(13) , getPrototypeOf = __webpack_require__(57) , HAS_INSTANCE = __webpack_require__(23)('hasInstance') , FunctionProto = Function.prototype; // 19.2.3.6 Function.prototype[@@hasInstance](V) if(!(HAS_INSTANCE in FunctionProto))__webpack_require__(11).f(FunctionProto, HAS_INSTANCE, {value: function(O){ if(typeof this != 'function' || !isObject(O))return false; if(!isObject(this.prototype))return O instanceof this; // for environment w/o native `@@hasInstance` logic enough `instanceof`, but add this: while(O = getPrototypeOf(O))if(this.prototype === O)return true; return false; }}); /***/ }, /* 76 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; var $export = __webpack_require__(6) , toInteger = __webpack_require__(36) , aNumberValue = __webpack_require__(77) , repeat = __webpack_require__(78) , $toFixed = 1..toFixed , floor = Math.floor , data = [0, 0, 0, 0, 0, 0] , ERROR = 'Number.toFixed: incorrect invocation!' , ZERO = '0'; var multiply = function(n, c){ var i = -1 , c2 = c; while(++i < 6){ c2 += n * data[i]; data[i] = c2 % 1e7; c2 = floor(c2 / 1e7); } }; var divide = function(n){ var i = 6 , c = 0; while(--i >= 0){ c += data[i]; data[i] = floor(c / n); c = (c % n) * 1e7; } }; var numToString = function(){ var i = 6 , s = ''; while(--i >= 0){ if(s !== '' || i === 0 || data[i] !== 0){ var t = String(data[i]); s = s === '' ? t : s + repeat.call(ZERO, 7 - t.length) + t; } } return s; }; var pow = function(x, n, acc){ return n === 0 ? acc : n % 2 === 1 ? pow(x, n - 1, acc * x) : pow(x * x, n / 2, acc); }; var log = function(x){ var n = 0 , x2 = x; while(x2 >= 4096){ n += 12; x2 /= 4096; } while(x2 >= 2){ n += 1; x2 /= 2; } return n; }; $export($export.P + $export.F * (!!$toFixed && ( 0.00008.toFixed(3) !== '0.000' || 0.9.toFixed(0) !== '1' || 1.255.toFixed(2) !== '1.25' || 1000000000000000128..toFixed(0) !== '1000000000000000128' ) || !__webpack_require__(5)(function(){ // V8 ~ Android 4.3- $toFixed.call({}); })), 'Number', { toFixed: function toFixed(fractionDigits){ var x = aNumberValue(this, ERROR) , f = toInteger(fractionDigits) , s = '' , m = ZERO , e, z, j, k; if(f < 0 || f > 20)throw RangeError(ERROR); if(x != x)return 'NaN'; if(x <= -1e21 || x >= 1e21)return String(x); if(x < 0){ s = '-'; x = -x; } if(x > 1e-21){ e = log(x * pow(2, 69, 1)) - 69; z = e < 0 ? x * pow(2, -e, 1) : x / pow(2, e, 1); z *= 0x10000000000000; e = 52 - e; if(e > 0){ multiply(0, z); j = f; while(j >= 7){ multiply(1e7, 0); j -= 7; } multiply(pow(10, j, 1), 0); j = e - 1; while(j >= 23){ divide(1 << 23); j -= 23; } divide(1 << j); multiply(1, 1); divide(2); m = numToString(); } else { multiply(0, z); multiply(1 << -e, 0); m = numToString() + repeat.call(ZERO, f); } } if(f > 0){ k = m.length; m = s + (k <= f ? '0.' + repeat.call(ZERO, f - k) + m : m.slice(0, k - f) + '.' + m.slice(k - f)); } else { m = s + m; } return m; } }); /***/ }, /* 77 */ /***/ function(module, exports, __webpack_require__) { var cof = __webpack_require__(32); module.exports = function(it, msg){ if(typeof it != 'number' && cof(it) != 'Number')throw TypeError(msg); return +it; }; /***/ }, /* 78 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; var toInteger = __webpack_require__(36) , defined = __webpack_require__(33); module.exports = function repeat(count){ var str = String(defined(this)) , res = '' , n = toInteger(count); if(n < 0 || n == Infinity)throw RangeError("Count can't be negative"); for(;n > 0; (n >>>= 1) && (str += str))if(n & 1)res += str; return res; }; /***/ }, /* 79 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; var $export = __webpack_require__(6) , $fails = __webpack_require__(5) , aNumberValue = __webpack_require__(77) , $toPrecision = 1..toPrecision; $export($export.P + $export.F * ($fails(function(){ // IE7- return $toPrecision.call(1, undefined) !== '1'; }) || !$fails(function(){ // V8 ~ Android 4.3- $toPrecision.call({}); })), 'Number', { toPrecision: function toPrecision(precision){ var that = aNumberValue(this, 'Number#toPrecision: incorrect invocation!'); return precision === undefined ? $toPrecision.call(that) : $toPrecision.call(that, precision); } }); /***/ }, /* 80 */ /***/ function(module, exports, __webpack_require__) { // 20.1.2.1 Number.EPSILON var $export = __webpack_require__(6); $export($export.S, 'Number', {EPSILON: Math.pow(2, -52)}); /***/ }, /* 81 */ /***/ function(module, exports, __webpack_require__) { // 20.1.2.2 Number.isFinite(number) var $export = __webpack_require__(6) , _isFinite = __webpack_require__(2).isFinite; $export($export.S, 'Number', { isFinite: function isFinite(it){ return typeof it == 'number' && _isFinite(it); } }); /***/ }, /* 82 */ /***/ function(module, exports, __webpack_require__) { // 20.1.2.3 Number.isInteger(number) var $export = __webpack_require__(6); $export($export.S, 'Number', {isInteger: __webpack_require__(83)}); /***/ }, /* 83 */ /***/ function(module, exports, __webpack_require__) { // 20.1.2.3 Number.isInteger(number) var isObject = __webpack_require__(13) , floor = Math.floor; module.exports = function isInteger(it){ return !isObject(it) && isFinite(it) && floor(it) === it; }; /***/ }, /* 84 */ /***/ function(module, exports, __webpack_require__) { // 20.1.2.4 Number.isNaN(number) var $export = __webpack_require__(6); $export($export.S, 'Number', { isNaN: function isNaN(number){ return number != number; } }); /***/ }, /* 85 */ /***/ function(module, exports, __webpack_require__) { // 20.1.2.5 Number.isSafeInteger(number) var $export = __webpack_require__(6) , isInteger = __webpack_require__(83) , abs = Math.abs; $export($export.S, 'Number', { isSafeInteger: function isSafeInteger(number){ return isInteger(number) && abs(number) <= 0x1fffffffffffff; } }); /***/ }, /* 86 */ /***/ function(module, exports, __webpack_require__) { // 20.1.2.6 Number.MAX_SAFE_INTEGER var $export = __webpack_require__(6); $export($export.S, 'Number', {MAX_SAFE_INTEGER: 0x1fffffffffffff}); /***/ }, /* 87 */ /***/ function(module, exports, __webpack_require__) { // 20.1.2.10 Number.MIN_SAFE_INTEGER var $export = __webpack_require__(6); $export($export.S, 'Number', {MIN_SAFE_INTEGER: -0x1fffffffffffff}); /***/ }, /* 88 */ /***/ function(module, exports, __webpack_require__) { var $export = __webpack_require__(6) , $parseFloat = __webpack_require__(89); // 20.1.2.12 Number.parseFloat(string) $export($export.S + $export.F * (Number.parseFloat != $parseFloat), 'Number', {parseFloat: $parseFloat}); /***/ }, /* 89 */ /***/ function(module, exports, __webpack_require__) { var $parseFloat = __webpack_require__(2).parseFloat , $trim = __webpack_require__(90).trim; module.exports = 1 / $parseFloat(__webpack_require__(91) + '-0') !== -Infinity ? function parseFloat(str){ var string = $trim(String(str), 3) , result = $parseFloat(string); return result === 0 && string.charAt(0) == '-' ? -0 : result; } : $parseFloat; /***/ }, /* 90 */ /***/ function(module, exports, __webpack_require__) { var $export = __webpack_require__(6) , defined = __webpack_require__(33) , fails = __webpack_require__(5) , spaces = __webpack_require__(91) , space = '[' + spaces + ']' , non = '\u200b\u0085' , ltrim = RegExp('^' + space + space + '*') , rtrim = RegExp(space + space + '*$'); var exporter = function(KEY, exec, ALIAS){ var exp = {}; var FORCE = fails(function(){ return !!spaces[KEY]() || non[KEY]() != non; }); var fn = exp[KEY] = FORCE ? exec(trim) : spaces[KEY]; if(ALIAS)exp[ALIAS] = fn; $export($export.P + $export.F * FORCE, 'String', exp); }; // 1 -> String#trimLeft // 2 -> String#trimRight // 3 -> String#trim var trim = exporter.trim = function(string, TYPE){ string = String(defined(string)); if(TYPE & 1)string = string.replace(ltrim, ''); if(TYPE & 2)string = string.replace(rtrim, ''); return string; }; module.exports = exporter; /***/ }, /* 91 */ /***/ function(module, exports) { module.exports = '\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u180E\u2000\u2001\u2002\u2003' + '\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF'; /***/ }, /* 92 */ /***/ function(module, exports, __webpack_require__) { var $export = __webpack_require__(6) , $parseInt = __webpack_require__(93); // 20.1.2.13 Number.parseInt(string, radix) $export($export.S + $export.F * (Number.parseInt != $parseInt), 'Number', {parseInt: $parseInt}); /***/ }, /* 93 */ /***/ function(module, exports, __webpack_require__) { var $parseInt = __webpack_require__(2).parseInt , $trim = __webpack_require__(90).trim , ws = __webpack_require__(91) , hex = /^[\-+]?0[xX]/; module.exports = $parseInt(ws + '08') !== 8 || $parseInt(ws + '0x16') !== 22 ? function parseInt(str, radix){ var string = $trim(String(str), 3); return $parseInt(string, (radix >>> 0) || (hex.test(string) ? 16 : 10)); } : $parseInt; /***/ }, /* 94 */ /***/ function(module, exports, __webpack_require__) { var $export = __webpack_require__(6) , $parseInt = __webpack_require__(93); // 18.2.5 parseInt(string, radix) $export($export.G + $export.F * (parseInt != $parseInt), {parseInt: $parseInt}); /***/ }, /* 95 */ /***/ function(module, exports, __webpack_require__) { var $export = __webpack_require__(6) , $parseFloat = __webpack_require__(89); // 18.2.4 parseFloat(string) $export($export.G + $export.F * (parseFloat != $parseFloat), {parseFloat: $parseFloat}); /***/ }, /* 96 */ /***/ function(module, exports, __webpack_require__) { // 20.2.2.3 Math.acosh(x) var $export = __webpack_require__(6) , log1p = __webpack_require__(97) , sqrt = Math.sqrt , $acosh = Math.acosh; $export($export.S + $export.F * !($acosh // V8 bug: https://code.google.com/p/v8/issues/detail?id=3509 && Math.floor($acosh(Number.MAX_VALUE)) == 710 // Tor Browser bug: Math.acosh(Infinity) -> NaN && $acosh(Infinity) == Infinity ), 'Math', { acosh: function acosh(x){ return (x = +x) < 1 ? NaN : x > 94906265.62425156 ? Math.log(x) + Math.LN2 : log1p(x - 1 + sqrt(x - 1) * sqrt(x + 1)); } }); /***/ }, /* 97 */ /***/ function(module, exports) { // 20.2.2.20 Math.log1p(x) module.exports = Math.log1p || function log1p(x){ return (x = +x) > -1e-8 && x < 1e-8 ? x - x * x / 2 : Math.log(1 + x); }; /***/ }, /* 98 */ /***/ function(module, exports, __webpack_require__) { // 20.2.2.5 Math.asinh(x) var $export = __webpack_require__(6) , $asinh = Math.asinh; function asinh(x){ return !isFinite(x = +x) || x == 0 ? x : x < 0 ? -asinh(-x) : Math.log(x + Math.sqrt(x * x + 1)); } // Tor Browser bug: Math.asinh(0) -> -0 $export($export.S + $export.F * !($asinh && 1 / $asinh(0) > 0), 'Math', {asinh: asinh}); /***/ }, /* 99 */ /***/ function(module, exports, __webpack_require__) { // 20.2.2.7 Math.atanh(x) var $export = __webpack_require__(6) , $atanh = Math.atanh; // Tor Browser bug: Math.atanh(-0) -> 0 $export($export.S + $export.F * !($atanh && 1 / $atanh(-0) < 0), 'Math', { atanh: function atanh(x){ return (x = +x) == 0 ? x : Math.log((1 + x) / (1 - x)) / 2; } }); /***/ }, /* 100 */ /***/ function(module, exports, __webpack_require__) { // 20.2.2.9 Math.cbrt(x) var $export = __webpack_require__(6) , sign = __webpack_require__(101); $export($export.S, 'Math', { cbrt: function cbrt(x){ return sign(x = +x) * Math.pow(Math.abs(x), 1 / 3); } }); /***/ }, /* 101 */ /***/ function(module, exports) { // 20.2.2.28 Math.sign(x) module.exports = Math.sign || function sign(x){ return (x = +x) == 0 || x != x ? x : x < 0 ? -1 : 1; }; /***/ }, /* 102 */ /***/ function(module, exports, __webpack_require__) { // 20.2.2.11 Math.clz32(x) var $export = __webpack_require__(6); $export($export.S, 'Math', { clz32: function clz32(x){ return (x >>>= 0) ? 31 - Math.floor(Math.log(x + 0.5) * Math.LOG2E) : 32; } }); /***/ }, /* 103 */ /***/ function(module, exports, __webpack_require__) { // 20.2.2.12 Math.cosh(x) var $export = __webpack_require__(6) , exp = Math.exp; $export($export.S, 'Math', { cosh: function cosh(x){ return (exp(x = +x) + exp(-x)) / 2; } }); /***/ }, /* 104 */ /***/ function(module, exports, __webpack_require__) { // 20.2.2.14 Math.expm1(x) var $export = __webpack_require__(6) , $expm1 = __webpack_require__(105); $export($export.S + $export.F * ($expm1 != Math.expm1), 'Math', {expm1: $expm1}); /***/ }, /* 105 */ /***/ function(module, exports) { // 20.2.2.14 Math.expm1(x) var $expm1 = Math.expm1; module.exports = (!$expm1 // Old FF bug || $expm1(10) > 22025.465794806719 || $expm1(10) < 22025.4657948067165168 // Tor Browser bug || $expm1(-2e-17) != -2e-17 ) ? function expm1(x){ return (x = +x) == 0 ? x : x > -1e-6 && x < 1e-6 ? x + x * x / 2 : Math.exp(x) - 1; } : $expm1; /***/ }, /* 106 */ /***/ function(module, exports, __webpack_require__) { // 20.2.2.16 Math.fround(x) var $export = __webpack_require__(6) , sign = __webpack_require__(101) , pow = Math.pow , EPSILON = pow(2, -52) , EPSILON32 = pow(2, -23) , MAX32 = pow(2, 127) * (2 - EPSILON32) , MIN32 = pow(2, -126); var roundTiesToEven = function(n){ return n + 1 / EPSILON - 1 / EPSILON; }; $export($export.S, 'Math', { fround: function fround(x){ var $abs = Math.abs(x) , $sign = sign(x) , a, result; if($abs < MIN32)return $sign * roundTiesToEven($abs / MIN32 / EPSILON32) * MIN32 * EPSILON32; a = (1 + EPSILON32 / EPSILON) * $abs; result = a - (a - $abs); if(result > MAX32 || result != result)return $sign * Infinity; return $sign * result; } }); /***/ }, /* 107 */ /***/ function(module, exports, __webpack_require__) { // 20.2.2.17 Math.hypot([value1[, value2[, … ]]]) var $export = __webpack_require__(6) , abs = Math.abs; $export($export.S, 'Math', { hypot: function hypot(value1, value2){ // eslint-disable-line no-unused-vars var sum = 0 , i = 0 , aLen = arguments.length , larg = 0 , arg, div; while(i < aLen){ arg = abs(arguments[i++]); if(larg < arg){ div = larg / arg; sum = sum * div * div + 1; larg = arg; } else if(arg > 0){ div = arg / larg; sum += div * div; } else sum += arg; } return larg === Infinity ? Infinity : larg * Math.sqrt(sum); } }); /***/ }, /* 108 */ /***/ function(module, exports, __webpack_require__) { // 20.2.2.18 Math.imul(x, y) var $export = __webpack_require__(6) , $imul = Math.imul; // some WebKit versions fails with big numbers, some has wrong arity $export($export.S + $export.F * __webpack_require__(5)(function(){ return $imul(0xffffffff, 5) != -5 || $imul.length != 2; }), 'Math', { imul: function imul(x, y){ var UINT16 = 0xffff , xn = +x , yn = +y , xl = UINT16 & xn , yl = UINT16 & yn; return 0 | xl * yl + ((UINT16 & xn >>> 16) * yl + xl * (UINT16 & yn >>> 16) << 16 >>> 0); } }); /***/ }, /* 109 */ /***/ function(module, exports, __webpack_require__) { // 20.2.2.21 Math.log10(x) var $export = __webpack_require__(6); $export($export.S, 'Math', { log10: function log10(x){ return Math.log(x) / Math.LN10; } }); /***/ }, /* 110 */ /***/ function(module, exports, __webpack_require__) { // 20.2.2.20 Math.log1p(x) var $export = __webpack_require__(6); $export($export.S, 'Math', {log1p: __webpack_require__(97)}); /***/ }, /* 111 */ /***/ function(module, exports, __webpack_require__) { // 20.2.2.22 Math.log2(x) var $export = __webpack_require__(6); $export($export.S, 'Math', { log2: function log2(x){ return Math.log(x) / Math.LN2; } }); /***/ }, /* 112 */ /***/ function(module, exports, __webpack_require__) { // 20.2.2.28 Math.sign(x) var $export = __webpack_require__(6); $export($export.S, 'Math', {sign: __webpack_require__(101)}); /***/ }, /* 113 */ /***/ function(module, exports, __webpack_require__) { // 20.2.2.30 Math.sinh(x) var $export = __webpack_require__(6) , expm1 = __webpack_require__(105) , exp = Math.exp; // V8 near Chromium 38 has a problem with very small numbers $export($export.S + $export.F * __webpack_require__(5)(function(){ return !Math.sinh(-2e-17) != -2e-17; }), 'Math', { sinh: function sinh(x){ return Math.abs(x = +x) < 1 ? (expm1(x) - expm1(-x)) / 2 : (exp(x - 1) - exp(-x - 1)) * (Math.E / 2); } }); /***/ }, /* 114 */ /***/ function(module, exports, __webpack_require__) { // 20.2.2.33 Math.tanh(x) var $export = __webpack_require__(6) , expm1 = __webpack_require__(105) , exp = Math.exp; $export($export.S, 'Math', { tanh: function tanh(x){ var a = expm1(x = +x) , b = expm1(-x); return a == Infinity ? 1 : b == Infinity ? -1 : (a - b) / (exp(x) + exp(-x)); } }); /***/ }, /* 115 */ /***/ function(module, exports, __webpack_require__) { // 20.2.2.34 Math.trunc(x) var $export = __webpack_require__(6); $export($export.S, 'Math', { trunc: function trunc(it){ return (it > 0 ? Math.floor : Math.ceil)(it); } }); /***/ }, /* 116 */ /***/ function(module, exports, __webpack_require__) { var $export = __webpack_require__(6) , toIndex = __webpack_require__(37) , fromCharCode = String.fromCharCode , $fromCodePoint = String.fromCodePoint; // length should be 1, old FF problem $export($export.S + $export.F * (!!$fromCodePoint && $fromCodePoint.length != 1), 'String', { // 21.1.2.2 String.fromCodePoint(...codePoints) fromCodePoint: function fromCodePoint(x){ // eslint-disable-line no-unused-vars var res = [] , aLen = arguments.length , i = 0 , code; while(aLen > i){ code = +arguments[i++]; if(toIndex(code, 0x10ffff) !== code)throw RangeError(code + ' is not a valid code point'); res.push(code < 0x10000 ? fromCharCode(code) : fromCharCode(((code -= 0x10000) >> 10) + 0xd800, code % 0x400 + 0xdc00) ); } return res.join(''); } }); /***/ }, /* 117 */ /***/ function(module, exports, __webpack_require__) { var $export = __webpack_require__(6) , toIObject = __webpack_require__(30) , toLength = __webpack_require__(35); $export($export.S, 'String', { // 21.1.2.4 String.raw(callSite, ...substitutions) raw: function raw(callSite){ var tpl = toIObject(callSite.raw) , len = toLength(tpl.length) , aLen = arguments.length , res = [] , i = 0; while(len > i){ res.push(String(tpl[i++])); if(i < aLen)res.push(String(arguments[i])); } return res.join(''); } }); /***/ }, /* 118 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; // 21.1.3.25 String.prototype.trim() __webpack_require__(90)('trim', function($trim){ return function trim(){ return $trim(this, 3); }; }); /***/ }, /* 119 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; var $export = __webpack_require__(6) , $at = __webpack_require__(120)(false); $export($export.P, 'String', { // 21.1.3.3 String.prototype.codePointAt(pos) codePointAt: function codePointAt(pos){ return $at(this, pos); } }); /***/ }, /* 120 */ /***/ function(module, exports, __webpack_require__) { var toInteger = __webpack_require__(36) , defined = __webpack_require__(33); // true -> String#at // false -> String#codePointAt module.exports = function(TO_STRING){ return function(that, pos){ var s = String(defined(that)) , i = toInteger(pos) , l = s.length , a, b; if(i < 0 || i >= l)return TO_STRING ? '' : undefined; a = s.charCodeAt(i); return a < 0xd800 || a > 0xdbff || i + 1 === l || (b = s.charCodeAt(i + 1)) < 0xdc00 || b > 0xdfff ? TO_STRING ? s.charAt(i) : a : TO_STRING ? s.slice(i, i + 2) : (a - 0xd800 << 10) + (b - 0xdc00) + 0x10000; }; }; /***/ }, /* 121 */ /***/ function(module, exports, __webpack_require__) { // 21.1.3.6 String.prototype.endsWith(searchString [, endPosition]) 'use strict'; var $export = __webpack_require__(6) , toLength = __webpack_require__(35) , context = __webpack_require__(122) , ENDS_WITH = 'endsWith' , $endsWith = ''[ENDS_WITH]; $export($export.P + $export.F * __webpack_require__(124)(ENDS_WITH), 'String', { endsWith: function endsWith(searchString /*, endPosition = @length */){ var that = context(this, searchString, ENDS_WITH) , endPosition = arguments.length > 1 ? arguments[1] : undefined , len = toLength(that.length) , end = endPosition === undefined ? len : Math.min(toLength(endPosition), len) , search = String(searchString); return $endsWith ? $endsWith.call(that, search, end) : that.slice(end - search.length, end) === search; } }); /***/ }, /* 122 */ /***/ function(module, exports, __webpack_require__) { // helper for String#{startsWith, endsWith, includes} var isRegExp = __webpack_require__(123) , defined = __webpack_require__(33); module.exports = function(that, searchString, NAME){ if(isRegExp(searchString))throw TypeError('String#' + NAME + " doesn't accept regex!"); return String(defined(that)); }; /***/ }, /* 123 */ /***/ function(module, exports, __webpack_require__) { // 7.2.8 IsRegExp(argument) var isObject = __webpack_require__(13) , cof = __webpack_require__(32) , MATCH = __webpack_require__(23)('match'); module.exports = function(it){ var isRegExp; return isObject(it) && ((isRegExp = it[MATCH]) !== undefined ? !!isRegExp : cof(it) == 'RegExp'); }; /***/ }, /* 124 */ /***/ function(module, exports, __webpack_require__) { var MATCH = __webpack_require__(23)('match'); module.exports = function(KEY){ var re = /./; try { '/./'[KEY](re); } catch(e){ try { re[MATCH] = false; return !'/./'[KEY](re); } catch(f){ /* empty */ } } return true; }; /***/ }, /* 125 */ /***/ function(module, exports, __webpack_require__) { // 21.1.3.7 String.prototype.includes(searchString, position = 0) 'use strict'; var $export = __webpack_require__(6) , context = __webpack_require__(122) , INCLUDES = 'includes'; $export($export.P + $export.F * __webpack_require__(124)(INCLUDES), 'String', { includes: function includes(searchString /*, position = 0 */){ return !!~context(this, searchString, INCLUDES) .indexOf(searchString, arguments.length > 1 ? arguments[1] : undefined); } }); /***/ }, /* 126 */ /***/ function(module, exports, __webpack_require__) { var $export = __webpack_require__(6); $export($export.P, 'String', { // 21.1.3.13 String.prototype.repeat(count) repeat: __webpack_require__(78) }); /***/ }, /* 127 */ /***/ function(module, exports, __webpack_require__) { // 21.1.3.18 String.prototype.startsWith(searchString [, position ]) 'use strict'; var $export = __webpack_require__(6) , toLength = __webpack_require__(35) , context = __webpack_require__(122) , STARTS_WITH = 'startsWith' , $startsWith = ''[STARTS_WITH]; $export($export.P + $export.F * __webpack_require__(124)(STARTS_WITH), 'String', { startsWith: function startsWith(searchString /*, position = 0 */){ var that = context(this, searchString, STARTS_WITH) , index = toLength(Math.min(arguments.length > 1 ? arguments[1] : undefined, that.length)) , search = String(searchString); return $startsWith ? $startsWith.call(that, search, index) : that.slice(index, index + search.length) === search; } }); /***/ }, /* 128 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; var $at = __webpack_require__(120)(true); // 21.1.3.27 String.prototype[@@iterator]() __webpack_require__(129)(String, 'String', function(iterated){ this._t = String(iterated); // target this._i = 0; // next index // 21.1.5.2.1 %StringIteratorPrototype%.next() }, function(){ var O = this._t , index = this._i , point; if(index >= O.length)return {value: undefined, done: true}; point = $at(O, index); this._i += point.length; return {value: point, done: false}; }); /***/ }, /* 129 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; var LIBRARY = __webpack_require__(26) , $export = __webpack_require__(6) , redefine = __webpack_require__(18) , hide = __webpack_require__(10) , has = __webpack_require__(3) , Iterators = __webpack_require__(130) , $iterCreate = __webpack_require__(131) , setToStringTag = __webpack_require__(22) , getPrototypeOf = __webpack_require__(57) , ITERATOR = __webpack_require__(23)('iterator') , BUGGY = !([].keys && 'next' in [].keys()) // Safari has buggy iterators w/o `next` , FF_ITERATOR = '@@iterator' , KEYS = 'keys' , VALUES = 'values'; var returnThis = function(){ return this; }; module.exports = function(Base, NAME, Constructor, next, DEFAULT, IS_SET, FORCED){ $iterCreate(Constructor, NAME, next); var getMethod = function(kind){ if(!BUGGY && kind in proto)return proto[kind]; switch(kind){ case KEYS: return function keys(){ return new Constructor(this, kind); }; case VALUES: return function values(){ return new Constructor(this, kind); }; } return function entries(){ return new Constructor(this, kind); }; }; var TAG = NAME + ' Iterator' , DEF_VALUES = DEFAULT == VALUES , VALUES_BUG = false , proto = Base.prototype , $native = proto[ITERATOR] || proto[FF_ITERATOR] || DEFAULT && proto[DEFAULT] , $default = $native || getMethod(DEFAULT) , $entries = DEFAULT ? !DEF_VALUES ? $default : getMethod('entries') : undefined , $anyNative = NAME == 'Array' ? proto.entries || $native : $native , methods, key, IteratorPrototype; // Fix native if($anyNative){ IteratorPrototype = getPrototypeOf($anyNative.call(new Base)); if(IteratorPrototype !== Object.prototype){ // Set @@toStringTag to native iterators setToStringTag(IteratorPrototype, TAG, true); // fix for some old engines if(!LIBRARY && !has(IteratorPrototype, ITERATOR))hide(IteratorPrototype, ITERATOR, returnThis); } } // fix Array#{values, @@iterator}.name in V8 / FF if(DEF_VALUES && $native && $native.name !== VALUES){ VALUES_BUG = true; $default = function values(){ return $native.call(this); }; } // Define iterator if((!LIBRARY || FORCED) && (BUGGY || VALUES_BUG || !proto[ITERATOR])){ hide(proto, ITERATOR, $default); } // Plug for library Iterators[NAME] = $default; Iterators[TAG] = returnThis; if(DEFAULT){ methods = { values: DEF_VALUES ? $default : getMethod(VALUES), keys: IS_SET ? $default : getMethod(KEYS), entries: $entries }; if(FORCED)for(key in methods){ if(!(key in proto))redefine(proto, key, methods[key]); } else $export($export.P + $export.F * (BUGGY || VALUES_BUG), NAME, methods); } return methods; }; /***/ }, /* 130 */ /***/ function(module, exports) { module.exports = {}; /***/ }, /* 131 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; var create = __webpack_require__(44) , descriptor = __webpack_require__(17) , setToStringTag = __webpack_require__(22) , IteratorPrototype = {}; // 25.1.2.1.1 %IteratorPrototype%[@@iterator]() __webpack_require__(10)(IteratorPrototype, __webpack_require__(23)('iterator'), function(){ return this; }); module.exports = function(Constructor, NAME, next){ Constructor.prototype = create(IteratorPrototype, {next: descriptor(1, next)}); setToStringTag(Constructor, NAME + ' Iterator'); }; /***/ }, /* 132 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; // B.2.3.2 String.prototype.anchor(name) __webpack_require__(133)('anchor', function(createHTML){ return function anchor(name){ return createHTML(this, 'a', 'name', name); } }); /***/ }, /* 133 */ /***/ function(module, exports, __webpack_require__) { var $export = __webpack_require__(6) , fails = __webpack_require__(5) , defined = __webpack_require__(33) , quot = /"/g; // B.2.3.2.1 CreateHTML(string, tag, attribute, value) var createHTML = function(string, tag, attribute, value) { var S = String(defined(string)) , p1 = '<' + tag; if(attribute !== '')p1 += ' ' + attribute + '="' + String(value).replace(quot, '"') + '"'; return p1 + '>' + S + ''; }; module.exports = function(NAME, exec){ var O = {}; O[NAME] = exec(createHTML); $export($export.P + $export.F * fails(function(){ var test = ''[NAME]('"'); return test !== test.toLowerCase() || test.split('"').length > 3; }), 'String', O); }; /***/ }, /* 134 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; // B.2.3.3 String.prototype.big() __webpack_require__(133)('big', function(createHTML){ return function big(){ return createHTML(this, 'big', '', ''); } }); /***/ }, /* 135 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; // B.2.3.4 String.prototype.blink() __webpack_require__(133)('blink', function(createHTML){ return function blink(){ return createHTML(this, 'blink', '', ''); } }); /***/ }, /* 136 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; // B.2.3.5 String.prototype.bold() __webpack_require__(133)('bold', function(createHTML){ return function bold(){ return createHTML(this, 'b', '', ''); } }); /***/ }, /* 137 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; // B.2.3.6 String.prototype.fixed() __webpack_require__(133)('fixed', function(createHTML){ return function fixed(){ return createHTML(this, 'tt', '', ''); } }); /***/ }, /* 138 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; // B.2.3.7 String.prototype.fontcolor(color) __webpack_require__(133)('fontcolor', function(createHTML){ return function fontcolor(color){ return createHTML(this, 'font', 'color', color); } }); /***/ }, /* 139 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; // B.2.3.8 String.prototype.fontsize(size) __webpack_require__(133)('fontsize', function(createHTML){ return function fontsize(size){ return createHTML(this, 'font', 'size', size); } }); /***/ }, /* 140 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; // B.2.3.9 String.prototype.italics() __webpack_require__(133)('italics', function(createHTML){ return function italics(){ return createHTML(this, 'i', '', ''); } }); /***/ }, /* 141 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; // B.2.3.10 String.prototype.link(url) __webpack_require__(133)('link', function(createHTML){ return function link(url){ return createHTML(this, 'a', 'href', url); } }); /***/ }, /* 142 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; // B.2.3.11 String.prototype.small() __webpack_require__(133)('small', function(createHTML){ return function small(){ return createHTML(this, 'small', '', ''); } }); /***/ }, /* 143 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; // B.2.3.12 String.prototype.strike() __webpack_require__(133)('strike', function(createHTML){ return function strike(){ return createHTML(this, 'strike', '', ''); } }); /***/ }, /* 144 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; // B.2.3.13 String.prototype.sub() __webpack_require__(133)('sub', function(createHTML){ return function sub(){ return createHTML(this, 'sub', '', ''); } }); /***/ }, /* 145 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; // B.2.3.14 String.prototype.sup() __webpack_require__(133)('sup', function(createHTML){ return function sup(){ return createHTML(this, 'sup', '', ''); } }); /***/ }, /* 146 */ /***/ function(module, exports, __webpack_require__) { // 22.1.2.2 / 15.4.3.2 Array.isArray(arg) var $export = __webpack_require__(6); $export($export.S, 'Array', {isArray: __webpack_require__(43)}); /***/ }, /* 147 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; var ctx = __webpack_require__(8) , $export = __webpack_require__(6) , toObject = __webpack_require__(56) , call = __webpack_require__(148) , isArrayIter = __webpack_require__(149) , toLength = __webpack_require__(35) , createProperty = __webpack_require__(150) , getIterFn = __webpack_require__(151); $export($export.S + $export.F * !__webpack_require__(153)(function(iter){ Array.from(iter); }), 'Array', { // 22.1.2.1 Array.from(arrayLike, mapfn = undefined, thisArg = undefined) from: function from(arrayLike/*, mapfn = undefined, thisArg = undefined*/){ var O = toObject(arrayLike) , C = typeof this == 'function' ? this : Array , aLen = arguments.length , mapfn = aLen > 1 ? arguments[1] : undefined , mapping = mapfn !== undefined , index = 0 , iterFn = getIterFn(O) , length, result, step, iterator; if(mapping)mapfn = ctx(mapfn, aLen > 2 ? arguments[2] : undefined, 2); // if object isn't iterable or it's array with default iterator - use simple case if(iterFn != undefined && !(C == Array && isArrayIter(iterFn))){ for(iterator = iterFn.call(O), result = new C; !(step = iterator.next()).done; index++){ createProperty(result, index, mapping ? call(iterator, mapfn, [step.value, index], true) : step.value); } } else { length = toLength(O.length); for(result = new C(length); length > index; index++){ createProperty(result, index, mapping ? mapfn(O[index], index) : O[index]); } } result.length = index; return result; } }); /***/ }, /* 148 */ /***/ function(module, exports, __webpack_require__) { // call something on iterator step with safe closing on error var anObject = __webpack_require__(12); module.exports = function(iterator, fn, value, entries){ try { return entries ? fn(anObject(value)[0], value[1]) : fn(value); // 7.4.6 IteratorClose(iterator, completion) } catch(e){ var ret = iterator['return']; if(ret !== undefined)anObject(ret.call(iterator)); throw e; } }; /***/ }, /* 149 */ /***/ function(module, exports, __webpack_require__) { // check on default Array iterator var Iterators = __webpack_require__(130) , ITERATOR = __webpack_require__(23)('iterator') , ArrayProto = Array.prototype; module.exports = function(it){ return it !== undefined && (Iterators.Array === it || ArrayProto[ITERATOR] === it); }; /***/ }, /* 150 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; var $defineProperty = __webpack_require__(11) , createDesc = __webpack_require__(17); module.exports = function(object, index, value){ if(index in object)$defineProperty.f(object, index, createDesc(0, value)); else object[index] = value; }; /***/ }, /* 151 */ /***/ function(module, exports, __webpack_require__) { var classof = __webpack_require__(152) , ITERATOR = __webpack_require__(23)('iterator') , Iterators = __webpack_require__(130); module.exports = __webpack_require__(7).getIteratorMethod = function(it){ if(it != undefined)return it[ITERATOR] || it['@@iterator'] || Iterators[classof(it)]; }; /***/ }, /* 152 */ /***/ function(module, exports, __webpack_require__) { // getting tag from 19.1.3.6 Object.prototype.toString() var cof = __webpack_require__(32) , TAG = __webpack_require__(23)('toStringTag') // ES3 wrong here , ARG = cof(function(){ return arguments; }()) == 'Arguments'; // fallback for IE11 Script Access Denied error var tryGet = function(it, key){ try { return it[key]; } catch(e){ /* empty */ } }; module.exports = function(it){ var O, T, B; return it === undefined ? 'Undefined' : it === null ? 'Null' // @@toStringTag case : typeof (T = tryGet(O = Object(it), TAG)) == 'string' ? T // builtinTag case : ARG ? cof(O) // ES3 arguments fallback : (B = cof(O)) == 'Object' && typeof O.callee == 'function' ? 'Arguments' : B; }; /***/ }, /* 153 */ /***/ function(module, exports, __webpack_require__) { var ITERATOR = __webpack_require__(23)('iterator') , SAFE_CLOSING = false; try { var riter = [7][ITERATOR](); riter['return'] = function(){ SAFE_CLOSING = true; }; Array.from(riter, function(){ throw 2; }); } catch(e){ /* empty */ } module.exports = function(exec, skipClosing){ if(!skipClosing && !SAFE_CLOSING)return false; var safe = false; try { var arr = [7] , iter = arr[ITERATOR](); iter.next = function(){ return {done: safe = true}; }; arr[ITERATOR] = function(){ return iter; }; exec(arr); } catch(e){ /* empty */ } return safe; }; /***/ }, /* 154 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; var $export = __webpack_require__(6) , createProperty = __webpack_require__(150); // WebKit Array.of isn't generic $export($export.S + $export.F * __webpack_require__(5)(function(){ function F(){} return !(Array.of.call(F) instanceof F); }), 'Array', { // 22.1.2.3 Array.of( ...items) of: function of(/* ...args */){ var index = 0 , aLen = arguments.length , result = new (typeof this == 'function' ? this : Array)(aLen); while(aLen > index)createProperty(result, index, arguments[index++]); result.length = aLen; return result; } }); /***/ }, /* 155 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; // 22.1.3.13 Array.prototype.join(separator) var $export = __webpack_require__(6) , toIObject = __webpack_require__(30) , arrayJoin = [].join; // fallback for not array-like strings $export($export.P + $export.F * (__webpack_require__(31) != Object || !__webpack_require__(156)(arrayJoin)), 'Array', { join: function join(separator){ return arrayJoin.call(toIObject(this), separator === undefined ? ',' : separator); } }); /***/ }, /* 156 */ /***/ function(module, exports, __webpack_require__) { var fails = __webpack_require__(5); module.exports = function(method, arg){ return !!method && fails(function(){ arg ? method.call(null, function(){}, 1) : method.call(null); }); }; /***/ }, /* 157 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; var $export = __webpack_require__(6) , html = __webpack_require__(46) , cof = __webpack_require__(32) , toIndex = __webpack_require__(37) , toLength = __webpack_require__(35) , arraySlice = [].slice; // fallback for not array-like ES3 strings and DOM objects $export($export.P + $export.F * __webpack_require__(5)(function(){ if(html)arraySlice.call(html); }), 'Array', { slice: function slice(begin, end){ var len = toLength(this.length) , klass = cof(this); end = end === undefined ? len : end; if(klass == 'Array')return arraySlice.call(this, begin, end); var start = toIndex(begin, len) , upTo = toIndex(end, len) , size = toLength(upTo - start) , cloned = Array(size) , i = 0; for(; i < size; i++)cloned[i] = klass == 'String' ? this.charAt(start + i) : this[start + i]; return cloned; } }); /***/ }, /* 158 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; var $export = __webpack_require__(6) , aFunction = __webpack_require__(9) , toObject = __webpack_require__(56) , fails = __webpack_require__(5) , $sort = [].sort , test = [1, 2, 3]; $export($export.P + $export.F * (fails(function(){ // IE8- test.sort(undefined); }) || !fails(function(){ // V8 bug test.sort(null); // Old WebKit }) || !__webpack_require__(156)($sort)), 'Array', { // 22.1.3.25 Array.prototype.sort(comparefn) sort: function sort(comparefn){ return comparefn === undefined ? $sort.call(toObject(this)) : $sort.call(toObject(this), aFunction(comparefn)); } }); /***/ }, /* 159 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; var $export = __webpack_require__(6) , $forEach = __webpack_require__(160)(0) , STRICT = __webpack_require__(156)([].forEach, true); $export($export.P + $export.F * !STRICT, 'Array', { // 22.1.3.10 / 15.4.4.18 Array.prototype.forEach(callbackfn [, thisArg]) forEach: function forEach(callbackfn /* , thisArg */){ return $forEach(this, callbackfn, arguments[1]); } }); /***/ }, /* 160 */ /***/ function(module, exports, __webpack_require__) { // 0 -> Array#forEach // 1 -> Array#map // 2 -> Array#filter // 3 -> Array#some // 4 -> Array#every // 5 -> Array#find // 6 -> Array#findIndex var ctx = __webpack_require__(8) , IObject = __webpack_require__(31) , toObject = __webpack_require__(56) , toLength = __webpack_require__(35) , asc = __webpack_require__(161); module.exports = function(TYPE, $create){ var IS_MAP = TYPE == 1 , IS_FILTER = TYPE == 2 , IS_SOME = TYPE == 3 , IS_EVERY = TYPE == 4 , IS_FIND_INDEX = TYPE == 6 , NO_HOLES = TYPE == 5 || IS_FIND_INDEX , create = $create || asc; return function($this, callbackfn, that){ var O = toObject($this) , self = IObject(O) , f = ctx(callbackfn, that, 3) , length = toLength(self.length) , index = 0 , result = IS_MAP ? create($this, length) : IS_FILTER ? create($this, 0) : undefined , val, res; for(;length > index; index++)if(NO_HOLES || index in self){ val = self[index]; res = f(val, index, O); if(TYPE){ if(IS_MAP)result[index] = res; // map else if(res)switch(TYPE){ case 3: return true; // some case 5: return val; // find case 6: return index; // findIndex case 2: result.push(val); // filter } else if(IS_EVERY)return false; // every } } return IS_FIND_INDEX ? -1 : IS_SOME || IS_EVERY ? IS_EVERY : result; }; }; /***/ }, /* 161 */ /***/ function(module, exports, __webpack_require__) { // 9.4.2.3 ArraySpeciesCreate(originalArray, length) var speciesConstructor = __webpack_require__(162); module.exports = function(original, length){ return new (speciesConstructor(original))(length); }; /***/ }, /* 162 */ /***/ function(module, exports, __webpack_require__) { var isObject = __webpack_require__(13) , isArray = __webpack_require__(43) , SPECIES = __webpack_require__(23)('species'); module.exports = function(original){ var C; if(isArray(original)){ C = original.constructor; // cross-realm fallback if(typeof C == 'function' && (C === Array || isArray(C.prototype)))C = undefined; if(isObject(C)){ C = C[SPECIES]; if(C === null)C = undefined; } } return C === undefined ? Array : C; }; /***/ }, /* 163 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; var $export = __webpack_require__(6) , $map = __webpack_require__(160)(1); $export($export.P + $export.F * !__webpack_require__(156)([].map, true), 'Array', { // 22.1.3.15 / 15.4.4.19 Array.prototype.map(callbackfn [, thisArg]) map: function map(callbackfn /* , thisArg */){ return $map(this, callbackfn, arguments[1]); } }); /***/ }, /* 164 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; var $export = __webpack_require__(6) , $filter = __webpack_require__(160)(2); $export($export.P + $export.F * !__webpack_require__(156)([].filter, true), 'Array', { // 22.1.3.7 / 15.4.4.20 Array.prototype.filter(callbackfn [, thisArg]) filter: function filter(callbackfn /* , thisArg */){ return $filter(this, callbackfn, arguments[1]); } }); /***/ }, /* 165 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; var $export = __webpack_require__(6) , $some = __webpack_require__(160)(3); $export($export.P + $export.F * !__webpack_require__(156)([].some, true), 'Array', { // 22.1.3.23 / 15.4.4.17 Array.prototype.some(callbackfn [, thisArg]) some: function some(callbackfn /* , thisArg */){ return $some(this, callbackfn, arguments[1]); } }); /***/ }, /* 166 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; var $export = __webpack_require__(6) , $every = __webpack_require__(160)(4); $export($export.P + $export.F * !__webpack_require__(156)([].every, true), 'Array', { // 22.1.3.5 / 15.4.4.16 Array.prototype.every(callbackfn [, thisArg]) every: function every(callbackfn /* , thisArg */){ return $every(this, callbackfn, arguments[1]); } }); /***/ }, /* 167 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; var $export = __webpack_require__(6) , $reduce = __webpack_require__(168); $export($export.P + $export.F * !__webpack_require__(156)([].reduce, true), 'Array', { // 22.1.3.18 / 15.4.4.21 Array.prototype.reduce(callbackfn [, initialValue]) reduce: function reduce(callbackfn /* , initialValue */){ return $reduce(this, callbackfn, arguments.length, arguments[1], false); } }); /***/ }, /* 168 */ /***/ function(module, exports, __webpack_require__) { var aFunction = __webpack_require__(9) , toObject = __webpack_require__(56) , IObject = __webpack_require__(31) , toLength = __webpack_require__(35); module.exports = function(that, callbackfn, aLen, memo, isRight){ aFunction(callbackfn); var O = toObject(that) , self = IObject(O) , length = toLength(O.length) , index = isRight ? length - 1 : 0 , i = isRight ? -1 : 1; if(aLen < 2)for(;;){ if(index in self){ memo = self[index]; index += i; break; } index += i; if(isRight ? index < 0 : length <= index){ throw TypeError('Reduce of empty array with no initial value'); } } for(;isRight ? index >= 0 : length > index; index += i)if(index in self){ memo = callbackfn(memo, self[index], index, O); } return memo; }; /***/ }, /* 169 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; var $export = __webpack_require__(6) , $reduce = __webpack_require__(168); $export($export.P + $export.F * !__webpack_require__(156)([].reduceRight, true), 'Array', { // 22.1.3.19 / 15.4.4.22 Array.prototype.reduceRight(callbackfn [, initialValue]) reduceRight: function reduceRight(callbackfn /* , initialValue */){ return $reduce(this, callbackfn, arguments.length, arguments[1], true); } }); /***/ }, /* 170 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; var $export = __webpack_require__(6) , $indexOf = __webpack_require__(34)(false) , $native = [].indexOf , NEGATIVE_ZERO = !!$native && 1 / [1].indexOf(1, -0) < 0; $export($export.P + $export.F * (NEGATIVE_ZERO || !__webpack_require__(156)($native)), 'Array', { // 22.1.3.11 / 15.4.4.14 Array.prototype.indexOf(searchElement [, fromIndex]) indexOf: function indexOf(searchElement /*, fromIndex = 0 */){ return NEGATIVE_ZERO // convert -0 to +0 ? $native.apply(this, arguments) || 0 : $indexOf(this, searchElement, arguments[1]); } }); /***/ }, /* 171 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; var $export = __webpack_require__(6) , toIObject = __webpack_require__(30) , toInteger = __webpack_require__(36) , toLength = __webpack_require__(35) , $native = [].lastIndexOf , NEGATIVE_ZERO = !!$native && 1 / [1].lastIndexOf(1, -0) < 0; $export($export.P + $export.F * (NEGATIVE_ZERO || !__webpack_require__(156)($native)), 'Array', { // 22.1.3.14 / 15.4.4.15 Array.prototype.lastIndexOf(searchElement [, fromIndex]) lastIndexOf: function lastIndexOf(searchElement /*, fromIndex = @[*-1] */){ // convert -0 to +0 if(NEGATIVE_ZERO)return $native.apply(this, arguments) || 0; var O = toIObject(this) , length = toLength(O.length) , index = length - 1; if(arguments.length > 1)index = Math.min(index, toInteger(arguments[1])); if(index < 0)index = length + index; for(;index >= 0; index--)if(index in O)if(O[index] === searchElement)return index || 0; return -1; } }); /***/ }, /* 172 */ /***/ function(module, exports, __webpack_require__) { // 22.1.3.3 Array.prototype.copyWithin(target, start, end = this.length) var $export = __webpack_require__(6); $export($export.P, 'Array', {copyWithin: __webpack_require__(173)}); __webpack_require__(174)('copyWithin'); /***/ }, /* 173 */ /***/ function(module, exports, __webpack_require__) { // 22.1.3.3 Array.prototype.copyWithin(target, start, end = this.length) 'use strict'; var toObject = __webpack_require__(56) , toIndex = __webpack_require__(37) , toLength = __webpack_require__(35); module.exports = [].copyWithin || function copyWithin(target/*= 0*/, start/*= 0, end = @length*/){ var O = toObject(this) , len = toLength(O.length) , to = toIndex(target, len) , from = toIndex(start, len) , end = arguments.length > 2 ? arguments[2] : undefined , count = Math.min((end === undefined ? len : toIndex(end, len)) - from, len - to) , inc = 1; if(from < to && to < from + count){ inc = -1; from += count - 1; to += count - 1; } while(count-- > 0){ if(from in O)O[to] = O[from]; else delete O[to]; to += inc; from += inc; } return O; }; /***/ }, /* 174 */ /***/ function(module, exports) { module.exports = function(){ /* empty */ }; /***/ }, /* 175 */ /***/ function(module, exports, __webpack_require__) { // 22.1.3.6 Array.prototype.fill(value, start = 0, end = this.length) var $export = __webpack_require__(6); $export($export.P, 'Array', {fill: __webpack_require__(176)}); __webpack_require__(174)('fill'); /***/ }, /* 176 */ /***/ function(module, exports, __webpack_require__) { // 22.1.3.6 Array.prototype.fill(value, start = 0, end = this.length) 'use strict'; var toObject = __webpack_require__(56) , toIndex = __webpack_require__(37) , toLength = __webpack_require__(35); module.exports = function fill(value /*, start = 0, end = @length */){ var O = toObject(this) , length = toLength(O.length) , aLen = arguments.length , index = toIndex(aLen > 1 ? arguments[1] : undefined, length) , end = aLen > 2 ? arguments[2] : undefined , endPos = end === undefined ? length : toIndex(end, length); while(endPos > index)O[index++] = value; return O; }; /***/ }, /* 177 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; // 22.1.3.8 Array.prototype.find(predicate, thisArg = undefined) var $export = __webpack_require__(6) , $find = __webpack_require__(160)(5) , KEY = 'find' , forced = true; // Shouldn't skip holes if(KEY in [])Array(1)[KEY](function(){ forced = false; }); $export($export.P + $export.F * forced, 'Array', { find: function find(callbackfn/*, that = undefined */){ return $find(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined); } }); __webpack_require__(174)(KEY); /***/ }, /* 178 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; // 22.1.3.9 Array.prototype.findIndex(predicate, thisArg = undefined) var $export = __webpack_require__(6) , $find = __webpack_require__(160)(6) , KEY = 'findIndex' , forced = true; // Shouldn't skip holes if(KEY in [])Array(1)[KEY](function(){ forced = false; }); $export($export.P + $export.F * forced, 'Array', { findIndex: function findIndex(callbackfn/*, that = undefined */){ return $find(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined); } }); __webpack_require__(174)(KEY); /***/ }, /* 179 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; var addToUnscopables = __webpack_require__(174) , step = __webpack_require__(180) , Iterators = __webpack_require__(130) , toIObject = __webpack_require__(30); // 22.1.3.4 Array.prototype.entries() // 22.1.3.13 Array.prototype.keys() // 22.1.3.29 Array.prototype.values() // 22.1.3.30 Array.prototype[@@iterator]() module.exports = __webpack_require__(129)(Array, 'Array', function(iterated, kind){ this._t = toIObject(iterated); // target this._i = 0; // next index this._k = kind; // kind // 22.1.5.2.1 %ArrayIteratorPrototype%.next() }, function(){ var O = this._t , kind = this._k , index = this._i++; if(!O || index >= O.length){ this._t = undefined; return step(1); } if(kind == 'keys' )return step(0, index); if(kind == 'values')return step(0, O[index]); return step(0, [index, O[index]]); }, 'values'); // argumentsList[@@iterator] is %ArrayProto_values% (9.4.4.6, 9.4.4.7) Iterators.Arguments = Iterators.Array; addToUnscopables('keys'); addToUnscopables('values'); addToUnscopables('entries'); /***/ }, /* 180 */ /***/ function(module, exports) { module.exports = function(done, value){ return {value: value, done: !!done}; }; /***/ }, /* 181 */ /***/ function(module, exports, __webpack_require__) { __webpack_require__(182)('Array'); /***/ }, /* 182 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; var global = __webpack_require__(2) , core = __webpack_require__(7) , dP = __webpack_require__(11) , DESCRIPTORS = __webpack_require__(4) , SPECIES = __webpack_require__(23)('species'); module.exports = function(KEY){ var C = typeof core[KEY] == 'function' ? core[KEY] : global[KEY]; if(DESCRIPTORS && C && !C[SPECIES])dP.f(C, SPECIES, { configurable: true, get: function(){ return this; } }); }; /***/ }, /* 183 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; var LIBRARY = __webpack_require__(26) , global = __webpack_require__(2) , ctx = __webpack_require__(8) , classof = __webpack_require__(152) , $export = __webpack_require__(6) , isObject = __webpack_require__(13) , aFunction = __webpack_require__(9) , anInstance = __webpack_require__(184) , forOf = __webpack_require__(185) , speciesConstructor = __webpack_require__(186) , task = __webpack_require__(187).set , microtask = __webpack_require__(188)() , PROMISE = 'Promise' , TypeError = global.TypeError , process = global.process , $Promise = global[PROMISE] , process = global.process , isNode = classof(process) == 'process' , empty = function(){ /* empty */ } , Internal, GenericPromiseCapability, Wrapper; var USE_NATIVE = !!function(){ try { // correct subclassing with @@species support var promise = $Promise.resolve(1) , FakePromise = (promise.constructor = {})[__webpack_require__(23)('species')] = function(exec){ exec(empty, empty); }; // unhandled rejections tracking support, NodeJS Promise without it fails @@species test return (isNode || typeof PromiseRejectionEvent == 'function') && promise.then(empty) instanceof FakePromise; } catch(e){ /* empty */ } }(); // helpers var sameConstructor = function(a, b){ // with library wrapper special case return a === b || a === $Promise && b === Wrapper; }; var isThenable = function(it){ var then; return isObject(it) && typeof (then = it.then) == 'function' ? then : false; }; var newPromiseCapability = function(C){ return sameConstructor($Promise, C) ? new PromiseCapability(C) : new GenericPromiseCapability(C); }; var PromiseCapability = GenericPromiseCapability = function(C){ var resolve, reject; this.promise = new C(function($$resolve, $$reject){ if(resolve !== undefined || reject !== undefined)throw TypeError('Bad Promise constructor'); resolve = $$resolve; reject = $$reject; }); this.resolve = aFunction(resolve); this.reject = aFunction(reject); }; var perform = function(exec){ try { exec(); } catch(e){ return {error: e}; } }; var notify = function(promise, isReject){ if(promise._n)return; promise._n = true; var chain = promise._c; microtask(function(){ var value = promise._v , ok = promise._s == 1 , i = 0; var run = function(reaction){ var handler = ok ? reaction.ok : reaction.fail , resolve = reaction.resolve , reject = reaction.reject , domain = reaction.domain , result, then; try { if(handler){ if(!ok){ if(promise._h == 2)onHandleUnhandled(promise); promise._h = 1; } if(handler === true)result = value; else { if(domain)domain.enter(); result = handler(value); if(domain)domain.exit(); } if(result === reaction.promise){ reject(TypeError('Promise-chain cycle')); } else if(then = isThenable(result)){ then.call(result, resolve, reject); } else resolve(result); } else reject(value); } catch(e){ reject(e); } }; while(chain.length > i)run(chain[i++]); // variable length - can't use forEach promise._c = []; promise._n = false; if(isReject && !promise._h)onUnhandled(promise); }); }; var onUnhandled = function(promise){ task.call(global, function(){ var value = promise._v , abrupt, handler, console; if(isUnhandled(promise)){ abrupt = perform(function(){ if(isNode){ process.emit('unhandledRejection', value, promise); } else if(handler = global.onunhandledrejection){ handler({promise: promise, reason: value}); } else if((console = global.console) && console.error){ console.error('Unhandled promise rejection', value); } }); // Browsers should not trigger `rejectionHandled` event if it was handled here, NodeJS - should promise._h = isNode || isUnhandled(promise) ? 2 : 1; } promise._a = undefined; if(abrupt)throw abrupt.error; }); }; var isUnhandled = function(promise){ if(promise._h == 1)return false; var chain = promise._a || promise._c , i = 0 , reaction; while(chain.length > i){ reaction = chain[i++]; if(reaction.fail || !isUnhandled(reaction.promise))return false; } return true; }; var onHandleUnhandled = function(promise){ task.call(global, function(){ var handler; if(isNode){ process.emit('rejectionHandled', promise); } else if(handler = global.onrejectionhandled){ handler({promise: promise, reason: promise._v}); } }); }; var $reject = function(value){ var promise = this; if(promise._d)return; promise._d = true; promise = promise._w || promise; // unwrap promise._v = value; promise._s = 2; if(!promise._a)promise._a = promise._c.slice(); notify(promise, true); }; var $resolve = function(value){ var promise = this , then; if(promise._d)return; promise._d = true; promise = promise._w || promise; // unwrap try { if(promise === value)throw TypeError("Promise can't be resolved itself"); if(then = isThenable(value)){ microtask(function(){ var wrapper = {_w: promise, _d: false}; // wrap try { then.call(value, ctx($resolve, wrapper, 1), ctx($reject, wrapper, 1)); } catch(e){ $reject.call(wrapper, e); } }); } else { promise._v = value; promise._s = 1; notify(promise, false); } } catch(e){ $reject.call({_w: promise, _d: false}, e); // wrap } }; // constructor polyfill if(!USE_NATIVE){ // 25.4.3.1 Promise(executor) $Promise = function Promise(executor){ anInstance(this, $Promise, PROMISE, '_h'); aFunction(executor); Internal.call(this); try { executor(ctx($resolve, this, 1), ctx($reject, this, 1)); } catch(err){ $reject.call(this, err); } }; Internal = function Promise(executor){ this._c = []; // <- awaiting reactions this._a = undefined; // <- checked in isUnhandled reactions this._s = 0; // <- state this._d = false; // <- done this._v = undefined; // <- value this._h = 0; // <- rejection state, 0 - default, 1 - handled, 2 - unhandled this._n = false; // <- notify }; Internal.prototype = __webpack_require__(189)($Promise.prototype, { // 25.4.5.3 Promise.prototype.then(onFulfilled, onRejected) then: function then(onFulfilled, onRejected){ var reaction = newPromiseCapability(speciesConstructor(this, $Promise)); reaction.ok = typeof onFulfilled == 'function' ? onFulfilled : true; reaction.fail = typeof onRejected == 'function' && onRejected; reaction.domain = isNode ? process.domain : undefined; this._c.push(reaction); if(this._a)this._a.push(reaction); if(this._s)notify(this, false); return reaction.promise; }, // 25.4.5.1 Promise.prototype.catch(onRejected) 'catch': function(onRejected){ return this.then(undefined, onRejected); } }); PromiseCapability = function(){ var promise = new Internal; this.promise = promise; this.resolve = ctx($resolve, promise, 1); this.reject = ctx($reject, promise, 1); }; } $export($export.G + $export.W + $export.F * !USE_NATIVE, {Promise: $Promise}); __webpack_require__(22)($Promise, PROMISE); __webpack_require__(182)(PROMISE); Wrapper = __webpack_require__(7)[PROMISE]; // statics $export($export.S + $export.F * !USE_NATIVE, PROMISE, { // 25.4.4.5 Promise.reject(r) reject: function reject(r){ var capability = newPromiseCapability(this) , $$reject = capability.reject; $$reject(r); return capability.promise; } }); $export($export.S + $export.F * (LIBRARY || !USE_NATIVE), PROMISE, { // 25.4.4.6 Promise.resolve(x) resolve: function resolve(x){ // instanceof instead of internal slot check because we should fix it without replacement native Promise core if(x instanceof $Promise && sameConstructor(x.constructor, this))return x; var capability = newPromiseCapability(this) , $$resolve = capability.resolve; $$resolve(x); return capability.promise; } }); $export($export.S + $export.F * !(USE_NATIVE && __webpack_require__(153)(function(iter){ $Promise.all(iter)['catch'](empty); })), PROMISE, { // 25.4.4.1 Promise.all(iterable) all: function all(iterable){ var C = this , capability = newPromiseCapability(C) , resolve = capability.resolve , reject = capability.reject; var abrupt = perform(function(){ var values = [] , index = 0 , remaining = 1; forOf(iterable, false, function(promise){ var $index = index++ , alreadyCalled = false; values.push(undefined); remaining++; C.resolve(promise).then(function(value){ if(alreadyCalled)return; alreadyCalled = true; values[$index] = value; --remaining || resolve(values); }, reject); }); --remaining || resolve(values); }); if(abrupt)reject(abrupt.error); return capability.promise; }, // 25.4.4.4 Promise.race(iterable) race: function race(iterable){ var C = this , capability = newPromiseCapability(C) , reject = capability.reject; var abrupt = perform(function(){ forOf(iterable, false, function(promise){ C.resolve(promise).then(capability.resolve, reject); }); }); if(abrupt)reject(abrupt.error); return capability.promise; } }); /***/ }, /* 184 */ /***/ function(module, exports) { module.exports = function(it, Constructor, name, forbiddenField){ if(!(it instanceof Constructor) || (forbiddenField !== undefined && forbiddenField in it)){ throw TypeError(name + ': incorrect invocation!'); } return it; }; /***/ }, /* 185 */ /***/ function(module, exports, __webpack_require__) { var ctx = __webpack_require__(8) , call = __webpack_require__(148) , isArrayIter = __webpack_require__(149) , anObject = __webpack_require__(12) , toLength = __webpack_require__(35) , getIterFn = __webpack_require__(151) , BREAK = {} , RETURN = {}; var exports = module.exports = function(iterable, entries, fn, that, ITERATOR){ var iterFn = ITERATOR ? function(){ return iterable; } : getIterFn(iterable) , f = ctx(fn, that, entries ? 2 : 1) , index = 0 , length, step, iterator, result; if(typeof iterFn != 'function')throw TypeError(iterable + ' is not iterable!'); // fast case for arrays with default iterator if(isArrayIter(iterFn))for(length = toLength(iterable.length); length > index; index++){ result = entries ? f(anObject(step = iterable[index])[0], step[1]) : f(iterable[index]); if(result === BREAK || result === RETURN)return result; } else for(iterator = iterFn.call(iterable); !(step = iterator.next()).done; ){ result = call(iterator, f, step.value, entries); if(result === BREAK || result === RETURN)return result; } }; exports.BREAK = BREAK; exports.RETURN = RETURN; /***/ }, /* 186 */ /***/ function(module, exports, __webpack_require__) { // 7.3.20 SpeciesConstructor(O, defaultConstructor) var anObject = __webpack_require__(12) , aFunction = __webpack_require__(9) , SPECIES = __webpack_require__(23)('species'); module.exports = function(O, D){ var C = anObject(O).constructor, S; return C === undefined || (S = anObject(C)[SPECIES]) == undefined ? D : aFunction(S); }; /***/ }, /* 187 */ /***/ function(module, exports, __webpack_require__) { var ctx = __webpack_require__(8) , invoke = __webpack_require__(74) , html = __webpack_require__(46) , cel = __webpack_require__(15) , global = __webpack_require__(2) , process = global.process , setTask = global.setImmediate , clearTask = global.clearImmediate , MessageChannel = global.MessageChannel , counter = 0 , queue = {} , ONREADYSTATECHANGE = 'onreadystatechange' , defer, channel, port; var run = function(){ var id = +this; if(queue.hasOwnProperty(id)){ var fn = queue[id]; delete queue[id]; fn(); } }; var listener = function(event){ run.call(event.data); }; // Node.js 0.9+ & IE10+ has setImmediate, otherwise: if(!setTask || !clearTask){ setTask = function setImmediate(fn){ var args = [], i = 1; while(arguments.length > i)args.push(arguments[i++]); queue[++counter] = function(){ invoke(typeof fn == 'function' ? fn : Function(fn), args); }; defer(counter); return counter; }; clearTask = function clearImmediate(id){ delete queue[id]; }; // Node.js 0.8- if(__webpack_require__(32)(process) == 'process'){ defer = function(id){ process.nextTick(ctx(run, id, 1)); }; // Browsers with MessageChannel, includes WebWorkers } else if(MessageChannel){ channel = new MessageChannel; port = channel.port2; channel.port1.onmessage = listener; defer = ctx(port.postMessage, port, 1); // Browsers with postMessage, skip WebWorkers // IE8 has postMessage, but it's sync & typeof its postMessage is 'object' } else if(global.addEventListener && typeof postMessage == 'function' && !global.importScripts){ defer = function(id){ global.postMessage(id + '', '*'); }; global.addEventListener('message', listener, false); // IE8- } else if(ONREADYSTATECHANGE in cel('script')){ defer = function(id){ html.appendChild(cel('script'))[ONREADYSTATECHANGE] = function(){ html.removeChild(this); run.call(id); }; }; // Rest old browsers } else { defer = function(id){ setTimeout(ctx(run, id, 1), 0); }; } } module.exports = { set: setTask, clear: clearTask }; /***/ }, /* 188 */ /***/ function(module, exports, __webpack_require__) { var global = __webpack_require__(2) , macrotask = __webpack_require__(187).set , Observer = global.MutationObserver || global.WebKitMutationObserver , process = global.process , Promise = global.Promise , isNode = __webpack_require__(32)(process) == 'process'; module.exports = function(){ var head, last, notify; var flush = function(){ var parent, fn; if(isNode && (parent = process.domain))parent.exit(); while(head){ fn = head.fn; head = head.next; try { fn(); } catch(e){ if(head)notify(); else last = undefined; throw e; } } last = undefined; if(parent)parent.enter(); }; // Node.js if(isNode){ notify = function(){ process.nextTick(flush); }; // browsers with MutationObserver } else if(Observer){ var toggle = true , node = document.createTextNode(''); new Observer(flush).observe(node, {characterData: true}); // eslint-disable-line no-new notify = function(){ node.data = toggle = !toggle; }; // environments with maybe non-completely correct, but existent Promise } else if(Promise && Promise.resolve){ var promise = Promise.resolve(); notify = function(){ promise.then(flush); }; // for other environments - macrotask based on: // - setImmediate // - MessageChannel // - window.postMessag // - onreadystatechange // - setTimeout } else { notify = function(){ // strange IE + webpack dev server bug - use .call(global) macrotask.call(global, flush); }; } return function(fn){ var task = {fn: fn, next: undefined}; if(last)last.next = task; if(!head){ head = task; notify(); } last = task; }; }; /***/ }, /* 189 */ /***/ function(module, exports, __webpack_require__) { var hide = __webpack_require__(10); module.exports = function(target, src, safe){ for(var key in src){ if(safe && target[key])target[key] = src[key]; else hide(target, key, src[key]); } return target; }; /***/ }, /* 190 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; var strong = __webpack_require__(191); // 23.1 Map Objects module.exports = __webpack_require__(192)('Map', function(get){ return function Map(){ return get(this, arguments.length > 0 ? arguments[0] : undefined); }; }, { // 23.1.3.6 Map.prototype.get(key) get: function get(key){ var entry = strong.getEntry(this, key); return entry && entry.v; }, // 23.1.3.9 Map.prototype.set(key, value) set: function set(key, value){ return strong.def(this, key === 0 ? 0 : key, value); } }, strong, true); /***/ }, /* 191 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; var dP = __webpack_require__(11).f , create = __webpack_require__(44) , redefineAll = __webpack_require__(189) , ctx = __webpack_require__(8) , anInstance = __webpack_require__(184) , defined = __webpack_require__(33) , forOf = __webpack_require__(185) , $iterDefine = __webpack_require__(129) , step = __webpack_require__(180) , setSpecies = __webpack_require__(182) , DESCRIPTORS = __webpack_require__(4) , fastKey = __webpack_require__(19).fastKey , SIZE = DESCRIPTORS ? '_s' : 'size'; var getEntry = function(that, key){ // fast case var index = fastKey(key), entry; if(index !== 'F')return that._i[index]; // frozen object case for(entry = that._f; entry; entry = entry.n){ if(entry.k == key)return entry; } }; module.exports = { getConstructor: function(wrapper, NAME, IS_MAP, ADDER){ var C = wrapper(function(that, iterable){ anInstance(that, C, NAME, '_i'); that._i = create(null); // index that._f = undefined; // first entry that._l = undefined; // last entry that[SIZE] = 0; // size if(iterable != undefined)forOf(iterable, IS_MAP, that[ADDER], that); }); redefineAll(C.prototype, { // 23.1.3.1 Map.prototype.clear() // 23.2.3.2 Set.prototype.clear() clear: function clear(){ for(var that = this, data = that._i, entry = that._f; entry; entry = entry.n){ entry.r = true; if(entry.p)entry.p = entry.p.n = undefined; delete data[entry.i]; } that._f = that._l = undefined; that[SIZE] = 0; }, // 23.1.3.3 Map.prototype.delete(key) // 23.2.3.4 Set.prototype.delete(value) 'delete': function(key){ var that = this , entry = getEntry(that, key); if(entry){ var next = entry.n , prev = entry.p; delete that._i[entry.i]; entry.r = true; if(prev)prev.n = next; if(next)next.p = prev; if(that._f == entry)that._f = next; if(that._l == entry)that._l = prev; that[SIZE]--; } return !!entry; }, // 23.2.3.6 Set.prototype.forEach(callbackfn, thisArg = undefined) // 23.1.3.5 Map.prototype.forEach(callbackfn, thisArg = undefined) forEach: function forEach(callbackfn /*, that = undefined */){ anInstance(this, C, 'forEach'); var f = ctx(callbackfn, arguments.length > 1 ? arguments[1] : undefined, 3) , entry; while(entry = entry ? entry.n : this._f){ f(entry.v, entry.k, this); // revert to the last existing entry while(entry && entry.r)entry = entry.p; } }, // 23.1.3.7 Map.prototype.has(key) // 23.2.3.7 Set.prototype.has(value) has: function has(key){ return !!getEntry(this, key); } }); if(DESCRIPTORS)dP(C.prototype, 'size', { get: function(){ return defined(this[SIZE]); } }); return C; }, def: function(that, key, value){ var entry = getEntry(that, key) , prev, index; // change existing entry if(entry){ entry.v = value; // create new entry } else { that._l = entry = { i: index = fastKey(key, true), // <- index k: key, // <- key v: value, // <- value p: prev = that._l, // <- previous entry n: undefined, // <- next entry r: false // <- removed }; if(!that._f)that._f = entry; if(prev)prev.n = entry; that[SIZE]++; // add to index if(index !== 'F')that._i[index] = entry; } return that; }, getEntry: getEntry, setStrong: function(C, NAME, IS_MAP){ // add .keys, .values, .entries, [@@iterator] // 23.1.3.4, 23.1.3.8, 23.1.3.11, 23.1.3.12, 23.2.3.5, 23.2.3.8, 23.2.3.10, 23.2.3.11 $iterDefine(C, NAME, function(iterated, kind){ this._t = iterated; // target this._k = kind; // kind this._l = undefined; // previous }, function(){ var that = this , kind = that._k , entry = that._l; // revert to the last existing entry while(entry && entry.r)entry = entry.p; // get next entry if(!that._t || !(that._l = entry = entry ? entry.n : that._t._f)){ // or finish the iteration that._t = undefined; return step(1); } // return step by kind if(kind == 'keys' )return step(0, entry.k); if(kind == 'values')return step(0, entry.v); return step(0, [entry.k, entry.v]); }, IS_MAP ? 'entries' : 'values' , !IS_MAP, true); // add [@@species], 23.1.2.2, 23.2.2.2 setSpecies(NAME); } }; /***/ }, /* 192 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; var global = __webpack_require__(2) , $export = __webpack_require__(6) , meta = __webpack_require__(19) , fails = __webpack_require__(5) , hide = __webpack_require__(10) , redefineAll = __webpack_require__(189) , forOf = __webpack_require__(185) , anInstance = __webpack_require__(184) , isObject = __webpack_require__(13) , setToStringTag = __webpack_require__(22) , dP = __webpack_require__(11).f , each = __webpack_require__(160)(0) , DESCRIPTORS = __webpack_require__(4); module.exports = function(NAME, wrapper, methods, common, IS_MAP, IS_WEAK){ var Base = global[NAME] , C = Base , ADDER = IS_MAP ? 'set' : 'add' , proto = C && C.prototype , O = {}; if(!DESCRIPTORS || typeof C != 'function' || !(IS_WEAK || proto.forEach && !fails(function(){ new C().entries().next(); }))){ // create collection constructor C = common.getConstructor(wrapper, NAME, IS_MAP, ADDER); redefineAll(C.prototype, methods); meta.NEED = true; } else { C = wrapper(function(target, iterable){ anInstance(target, C, NAME, '_c'); target._c = new Base; if(iterable != undefined)forOf(iterable, IS_MAP, target[ADDER], target); }); each('add,clear,delete,forEach,get,has,set,keys,values,entries,toJSON'.split(','),function(KEY){ var IS_ADDER = KEY == 'add' || KEY == 'set'; if(KEY in proto && !(IS_WEAK && KEY == 'clear'))hide(C.prototype, KEY, function(a, b){ anInstance(this, C, KEY); if(!IS_ADDER && IS_WEAK && !isObject(a))return KEY == 'get' ? undefined : false; var result = this._c[KEY](a === 0 ? 0 : a, b); return IS_ADDER ? this : result; }); }); if('size' in proto)dP(C.prototype, 'size', { get: function(){ return this._c.size; } }); } setToStringTag(C, NAME); O[NAME] = C; $export($export.G + $export.W + $export.F, O); if(!IS_WEAK)common.setStrong(C, NAME, IS_MAP); return C; }; /***/ }, /* 193 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; var strong = __webpack_require__(191); // 23.2 Set Objects module.exports = __webpack_require__(192)('Set', function(get){ return function Set(){ return get(this, arguments.length > 0 ? arguments[0] : undefined); }; }, { // 23.2.3.1 Set.prototype.add(value) add: function add(value){ return strong.def(this, value = value === 0 ? 0 : value, value); } }, strong); /***/ }, /* 194 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; var each = __webpack_require__(160)(0) , redefine = __webpack_require__(18) , meta = __webpack_require__(19) , assign = __webpack_require__(67) , weak = __webpack_require__(195) , isObject = __webpack_require__(13) , getWeak = meta.getWeak , isExtensible = Object.isExtensible , uncaughtFrozenStore = weak.ufstore , tmp = {} , InternalMap; var wrapper = function(get){ return function WeakMap(){ return get(this, arguments.length > 0 ? arguments[0] : undefined); }; }; var methods = { // 23.3.3.3 WeakMap.prototype.get(key) get: function get(key){ if(isObject(key)){ var data = getWeak(key); if(data === true)return uncaughtFrozenStore(this).get(key); return data ? data[this._i] : undefined; } }, // 23.3.3.5 WeakMap.prototype.set(key, value) set: function set(key, value){ return weak.def(this, key, value); } }; // 23.3 WeakMap Objects var $WeakMap = module.exports = __webpack_require__(192)('WeakMap', wrapper, methods, weak, true, true); // IE11 WeakMap frozen keys fix if(new $WeakMap().set((Object.freeze || Object)(tmp), 7).get(tmp) != 7){ InternalMap = weak.getConstructor(wrapper); assign(InternalMap.prototype, methods); meta.NEED = true; each(['delete', 'has', 'get', 'set'], function(key){ var proto = $WeakMap.prototype , method = proto[key]; redefine(proto, key, function(a, b){ // store frozen objects on internal weakmap shim if(isObject(a) && !isExtensible(a)){ if(!this._f)this._f = new InternalMap; var result = this._f[key](a, b); return key == 'set' ? this : result; // store all the rest on native weakmap } return method.call(this, a, b); }); }); } /***/ }, /* 195 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; var redefineAll = __webpack_require__(189) , getWeak = __webpack_require__(19).getWeak , anObject = __webpack_require__(12) , isObject = __webpack_require__(13) , anInstance = __webpack_require__(184) , forOf = __webpack_require__(185) , createArrayMethod = __webpack_require__(160) , $has = __webpack_require__(3) , arrayFind = createArrayMethod(5) , arrayFindIndex = createArrayMethod(6) , id = 0; // fallback for uncaught frozen keys var uncaughtFrozenStore = function(that){ return that._l || (that._l = new UncaughtFrozenStore); }; var UncaughtFrozenStore = function(){ this.a = []; }; var findUncaughtFrozen = function(store, key){ return arrayFind(store.a, function(it){ return it[0] === key; }); }; UncaughtFrozenStore.prototype = { get: function(key){ var entry = findUncaughtFrozen(this, key); if(entry)return entry[1]; }, has: function(key){ return !!findUncaughtFrozen(this, key); }, set: function(key, value){ var entry = findUncaughtFrozen(this, key); if(entry)entry[1] = value; else this.a.push([key, value]); }, 'delete': function(key){ var index = arrayFindIndex(this.a, function(it){ return it[0] === key; }); if(~index)this.a.splice(index, 1); return !!~index; } }; module.exports = { getConstructor: function(wrapper, NAME, IS_MAP, ADDER){ var C = wrapper(function(that, iterable){ anInstance(that, C, NAME, '_i'); that._i = id++; // collection id that._l = undefined; // leak store for uncaught frozen objects if(iterable != undefined)forOf(iterable, IS_MAP, that[ADDER], that); }); redefineAll(C.prototype, { // 23.3.3.2 WeakMap.prototype.delete(key) // 23.4.3.3 WeakSet.prototype.delete(value) 'delete': function(key){ if(!isObject(key))return false; var data = getWeak(key); if(data === true)return uncaughtFrozenStore(this)['delete'](key); return data && $has(data, this._i) && delete data[this._i]; }, // 23.3.3.4 WeakMap.prototype.has(key) // 23.4.3.4 WeakSet.prototype.has(value) has: function has(key){ if(!isObject(key))return false; var data = getWeak(key); if(data === true)return uncaughtFrozenStore(this).has(key); return data && $has(data, this._i); } }); return C; }, def: function(that, key, value){ var data = getWeak(anObject(key), true); if(data === true)uncaughtFrozenStore(that).set(key, value); else data[that._i] = value; return that; }, ufstore: uncaughtFrozenStore }; /***/ }, /* 196 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; var weak = __webpack_require__(195); // 23.4 WeakSet Objects __webpack_require__(192)('WeakSet', function(get){ return function WeakSet(){ return get(this, arguments.length > 0 ? arguments[0] : undefined); }; }, { // 23.4.3.1 WeakSet.prototype.add(value) add: function add(value){ return weak.def(this, value, true); } }, weak, false, true); /***/ }, /* 197 */ /***/ function(module, exports, __webpack_require__) { // 26.1.1 Reflect.apply(target, thisArgument, argumentsList) var $export = __webpack_require__(6) , aFunction = __webpack_require__(9) , anObject = __webpack_require__(12) , rApply = (__webpack_require__(2).Reflect || {}).apply , fApply = Function.apply; // MS Edge argumentsList argument is optional $export($export.S + $export.F * !__webpack_require__(5)(function(){ rApply(function(){}); }), 'Reflect', { apply: function apply(target, thisArgument, argumentsList){ var T = aFunction(target) , L = anObject(argumentsList); return rApply ? rApply(T, thisArgument, L) : fApply.call(T, thisArgument, L); } }); /***/ }, /* 198 */ /***/ function(module, exports, __webpack_require__) { // 26.1.2 Reflect.construct(target, argumentsList [, newTarget]) var $export = __webpack_require__(6) , create = __webpack_require__(44) , aFunction = __webpack_require__(9) , anObject = __webpack_require__(12) , isObject = __webpack_require__(13) , fails = __webpack_require__(5) , bind = __webpack_require__(73) , rConstruct = (__webpack_require__(2).Reflect || {}).construct; // MS Edge supports only 2 arguments and argumentsList argument is optional // FF Nightly sets third argument as `new.target`, but does not create `this` from it var NEW_TARGET_BUG = fails(function(){ function F(){} return !(rConstruct(function(){}, [], F) instanceof F); }); var ARGS_BUG = !fails(function(){ rConstruct(function(){}); }); $export($export.S + $export.F * (NEW_TARGET_BUG || ARGS_BUG), 'Reflect', { construct: function construct(Target, args /*, newTarget*/){ aFunction(Target); anObject(args); var newTarget = arguments.length < 3 ? Target : aFunction(arguments[2]); if(ARGS_BUG && !NEW_TARGET_BUG)return rConstruct(Target, args, newTarget); if(Target == newTarget){ // w/o altered newTarget, optimization for 0-4 arguments switch(args.length){ case 0: return new Target; case 1: return new Target(args[0]); case 2: return new Target(args[0], args[1]); case 3: return new Target(args[0], args[1], args[2]); case 4: return new Target(args[0], args[1], args[2], args[3]); } // w/o altered newTarget, lot of arguments case var $args = [null]; $args.push.apply($args, args); return new (bind.apply(Target, $args)); } // with altered newTarget, not support built-in constructors var proto = newTarget.prototype , instance = create(isObject(proto) ? proto : Object.prototype) , result = Function.apply.call(Target, instance, args); return isObject(result) ? result : instance; } }); /***/ }, /* 199 */ /***/ function(module, exports, __webpack_require__) { // 26.1.3 Reflect.defineProperty(target, propertyKey, attributes) var dP = __webpack_require__(11) , $export = __webpack_require__(6) , anObject = __webpack_require__(12) , toPrimitive = __webpack_require__(16); // MS Edge has broken Reflect.defineProperty - throwing instead of returning false $export($export.S + $export.F * __webpack_require__(5)(function(){ Reflect.defineProperty(dP.f({}, 1, {value: 1}), 1, {value: 2}); }), 'Reflect', { defineProperty: function defineProperty(target, propertyKey, attributes){ anObject(target); propertyKey = toPrimitive(propertyKey, true); anObject(attributes); try { dP.f(target, propertyKey, attributes); return true; } catch(e){ return false; } } }); /***/ }, /* 200 */ /***/ function(module, exports, __webpack_require__) { // 26.1.4 Reflect.deleteProperty(target, propertyKey) var $export = __webpack_require__(6) , gOPD = __webpack_require__(49).f , anObject = __webpack_require__(12); $export($export.S, 'Reflect', { deleteProperty: function deleteProperty(target, propertyKey){ var desc = gOPD(anObject(target), propertyKey); return desc && !desc.configurable ? false : delete target[propertyKey]; } }); /***/ }, /* 201 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; // 26.1.5 Reflect.enumerate(target) var $export = __webpack_require__(6) , anObject = __webpack_require__(12); var Enumerate = function(iterated){ this._t = anObject(iterated); // target this._i = 0; // next index var keys = this._k = [] // keys , key; for(key in iterated)keys.push(key); }; __webpack_require__(131)(Enumerate, 'Object', function(){ var that = this , keys = that._k , key; do { if(that._i >= keys.length)return {value: undefined, done: true}; } while(!((key = keys[that._i++]) in that._t)); return {value: key, done: false}; }); $export($export.S, 'Reflect', { enumerate: function enumerate(target){ return new Enumerate(target); } }); /***/ }, /* 202 */ /***/ function(module, exports, __webpack_require__) { // 26.1.6 Reflect.get(target, propertyKey [, receiver]) var gOPD = __webpack_require__(49) , getPrototypeOf = __webpack_require__(57) , has = __webpack_require__(3) , $export = __webpack_require__(6) , isObject = __webpack_require__(13) , anObject = __webpack_require__(12); function get(target, propertyKey/*, receiver*/){ var receiver = arguments.length < 3 ? target : arguments[2] , desc, proto; if(anObject(target) === receiver)return target[propertyKey]; if(desc = gOPD.f(target, propertyKey))return has(desc, 'value') ? desc.value : desc.get !== undefined ? desc.get.call(receiver) : undefined; if(isObject(proto = getPrototypeOf(target)))return get(proto, propertyKey, receiver); } $export($export.S, 'Reflect', {get: get}); /***/ }, /* 203 */ /***/ function(module, exports, __webpack_require__) { // 26.1.7 Reflect.getOwnPropertyDescriptor(target, propertyKey) var gOPD = __webpack_require__(49) , $export = __webpack_require__(6) , anObject = __webpack_require__(12); $export($export.S, 'Reflect', { getOwnPropertyDescriptor: function getOwnPropertyDescriptor(target, propertyKey){ return gOPD.f(anObject(target), propertyKey); } }); /***/ }, /* 204 */ /***/ function(module, exports, __webpack_require__) { // 26.1.8 Reflect.getPrototypeOf(target) var $export = __webpack_require__(6) , getProto = __webpack_require__(57) , anObject = __webpack_require__(12); $export($export.S, 'Reflect', { getPrototypeOf: function getPrototypeOf(target){ return getProto(anObject(target)); } }); /***/ }, /* 205 */ /***/ function(module, exports, __webpack_require__) { // 26.1.9 Reflect.has(target, propertyKey) var $export = __webpack_require__(6); $export($export.S, 'Reflect', { has: function has(target, propertyKey){ return propertyKey in target; } }); /***/ }, /* 206 */ /***/ function(module, exports, __webpack_require__) { // 26.1.10 Reflect.isExtensible(target) var $export = __webpack_require__(6) , anObject = __webpack_require__(12) , $isExtensible = Object.isExtensible; $export($export.S, 'Reflect', { isExtensible: function isExtensible(target){ anObject(target); return $isExtensible ? $isExtensible(target) : true; } }); /***/ }, /* 207 */ /***/ function(module, exports, __webpack_require__) { // 26.1.11 Reflect.ownKeys(target) var $export = __webpack_require__(6); $export($export.S, 'Reflect', {ownKeys: __webpack_require__(208)}); /***/ }, /* 208 */ /***/ function(module, exports, __webpack_require__) { // all object keys, includes non-enumerable and symbols var gOPN = __webpack_require__(48) , gOPS = __webpack_require__(41) , anObject = __webpack_require__(12) , Reflect = __webpack_require__(2).Reflect; module.exports = Reflect && Reflect.ownKeys || function ownKeys(it){ var keys = gOPN.f(anObject(it)) , getSymbols = gOPS.f; return getSymbols ? keys.concat(getSymbols(it)) : keys; }; /***/ }, /* 209 */ /***/ function(module, exports, __webpack_require__) { // 26.1.12 Reflect.preventExtensions(target) var $export = __webpack_require__(6) , anObject = __webpack_require__(12) , $preventExtensions = Object.preventExtensions; $export($export.S, 'Reflect', { preventExtensions: function preventExtensions(target){ anObject(target); try { if($preventExtensions)$preventExtensions(target); return true; } catch(e){ return false; } } }); /***/ }, /* 210 */ /***/ function(module, exports, __webpack_require__) { // 26.1.13 Reflect.set(target, propertyKey, V [, receiver]) var dP = __webpack_require__(11) , gOPD = __webpack_require__(49) , getPrototypeOf = __webpack_require__(57) , has = __webpack_require__(3) , $export = __webpack_require__(6) , createDesc = __webpack_require__(17) , anObject = __webpack_require__(12) , isObject = __webpack_require__(13); function set(target, propertyKey, V/*, receiver*/){ var receiver = arguments.length < 4 ? target : arguments[3] , ownDesc = gOPD.f(anObject(target), propertyKey) , existingDescriptor, proto; if(!ownDesc){ if(isObject(proto = getPrototypeOf(target))){ return set(proto, propertyKey, V, receiver); } ownDesc = createDesc(0); } if(has(ownDesc, 'value')){ if(ownDesc.writable === false || !isObject(receiver))return false; existingDescriptor = gOPD.f(receiver, propertyKey) || createDesc(0); existingDescriptor.value = V; dP.f(receiver, propertyKey, existingDescriptor); return true; } return ownDesc.set === undefined ? false : (ownDesc.set.call(receiver, V), true); } $export($export.S, 'Reflect', {set: set}); /***/ }, /* 211 */ /***/ function(module, exports, __webpack_require__) { // 26.1.14 Reflect.setPrototypeOf(target, proto) var $export = __webpack_require__(6) , setProto = __webpack_require__(71); if(setProto)$export($export.S, 'Reflect', { setPrototypeOf: function setPrototypeOf(target, proto){ setProto.check(target, proto); try { setProto.set(target, proto); return true; } catch(e){ return false; } } }); /***/ }, /* 212 */ /***/ function(module, exports, __webpack_require__) { // 20.3.3.1 / 15.9.4.4 Date.now() var $export = __webpack_require__(6); $export($export.S, 'Date', {now: function(){ return new Date().getTime(); }}); /***/ }, /* 213 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; var $export = __webpack_require__(6) , toObject = __webpack_require__(56) , toPrimitive = __webpack_require__(16); $export($export.P + $export.F * __webpack_require__(5)(function(){ return new Date(NaN).toJSON() !== null || Date.prototype.toJSON.call({toISOString: function(){ return 1; }}) !== 1; }), 'Date', { toJSON: function toJSON(key){ var O = toObject(this) , pv = toPrimitive(O); return typeof pv == 'number' && !isFinite(pv) ? null : O.toISOString(); } }); /***/ }, /* 214 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; // 20.3.4.36 / 15.9.5.43 Date.prototype.toISOString() var $export = __webpack_require__(6) , fails = __webpack_require__(5) , getTime = Date.prototype.getTime; var lz = function(num){ return num > 9 ? num : '0' + num; }; // PhantomJS / old WebKit has a broken implementations $export($export.P + $export.F * (fails(function(){ return new Date(-5e13 - 1).toISOString() != '0385-07-25T07:06:39.999Z'; }) || !fails(function(){ new Date(NaN).toISOString(); })), 'Date', { toISOString: function toISOString(){ if(!isFinite(getTime.call(this)))throw RangeError('Invalid time value'); var d = this , y = d.getUTCFullYear() , m = d.getUTCMilliseconds() , s = y < 0 ? '-' : y > 9999 ? '+' : ''; return s + ('00000' + Math.abs(y)).slice(s ? -6 : -4) + '-' + lz(d.getUTCMonth() + 1) + '-' + lz(d.getUTCDate()) + 'T' + lz(d.getUTCHours()) + ':' + lz(d.getUTCMinutes()) + ':' + lz(d.getUTCSeconds()) + '.' + (m > 99 ? m : '0' + lz(m)) + 'Z'; } }); /***/ }, /* 215 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; var $export = __webpack_require__(6) , $typed = __webpack_require__(216) , buffer = __webpack_require__(217) , anObject = __webpack_require__(12) , toIndex = __webpack_require__(37) , toLength = __webpack_require__(35) , isObject = __webpack_require__(13) , ArrayBuffer = __webpack_require__(2).ArrayBuffer , speciesConstructor = __webpack_require__(186) , $ArrayBuffer = buffer.ArrayBuffer , $DataView = buffer.DataView , $isView = $typed.ABV && ArrayBuffer.isView , $slice = $ArrayBuffer.prototype.slice , VIEW = $typed.VIEW , ARRAY_BUFFER = 'ArrayBuffer'; $export($export.G + $export.W + $export.F * (ArrayBuffer !== $ArrayBuffer), {ArrayBuffer: $ArrayBuffer}); $export($export.S + $export.F * !$typed.CONSTR, ARRAY_BUFFER, { // 24.1.3.1 ArrayBuffer.isView(arg) isView: function isView(it){ return $isView && $isView(it) || isObject(it) && VIEW in it; } }); $export($export.P + $export.U + $export.F * __webpack_require__(5)(function(){ return !new $ArrayBuffer(2).slice(1, undefined).byteLength; }), ARRAY_BUFFER, { // 24.1.4.3 ArrayBuffer.prototype.slice(start, end) slice: function slice(start, end){ if($slice !== undefined && end === undefined)return $slice.call(anObject(this), start); // FF fix var len = anObject(this).byteLength , first = toIndex(start, len) , final = toIndex(end === undefined ? len : end, len) , result = new (speciesConstructor(this, $ArrayBuffer))(toLength(final - first)) , viewS = new $DataView(this) , viewT = new $DataView(result) , index = 0; while(first < final){ viewT.setUint8(index++, viewS.getUint8(first++)); } return result; } }); __webpack_require__(182)(ARRAY_BUFFER); /***/ }, /* 216 */ /***/ function(module, exports, __webpack_require__) { var global = __webpack_require__(2) , hide = __webpack_require__(10) , uid = __webpack_require__(20) , TYPED = uid('typed_array') , VIEW = uid('view') , ABV = !!(global.ArrayBuffer && global.DataView) , CONSTR = ABV , i = 0, l = 9, Typed; var TypedArrayConstructors = ( 'Int8Array,Uint8Array,Uint8ClampedArray,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array' ).split(','); while(i < l){ if(Typed = global[TypedArrayConstructors[i++]]){ hide(Typed.prototype, TYPED, true); hide(Typed.prototype, VIEW, true); } else CONSTR = false; } module.exports = { ABV: ABV, CONSTR: CONSTR, TYPED: TYPED, VIEW: VIEW }; /***/ }, /* 217 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; var global = __webpack_require__(2) , DESCRIPTORS = __webpack_require__(4) , LIBRARY = __webpack_require__(26) , $typed = __webpack_require__(216) , hide = __webpack_require__(10) , redefineAll = __webpack_require__(189) , fails = __webpack_require__(5) , anInstance = __webpack_require__(184) , toInteger = __webpack_require__(36) , toLength = __webpack_require__(35) , gOPN = __webpack_require__(48).f , dP = __webpack_require__(11).f , arrayFill = __webpack_require__(176) , setToStringTag = __webpack_require__(22) , ARRAY_BUFFER = 'ArrayBuffer' , DATA_VIEW = 'DataView' , PROTOTYPE = 'prototype' , WRONG_LENGTH = 'Wrong length!' , WRONG_INDEX = 'Wrong index!' , $ArrayBuffer = global[ARRAY_BUFFER] , $DataView = global[DATA_VIEW] , Math = global.Math , RangeError = global.RangeError , Infinity = global.Infinity , BaseBuffer = $ArrayBuffer , abs = Math.abs , pow = Math.pow , floor = Math.floor , log = Math.log , LN2 = Math.LN2 , BUFFER = 'buffer' , BYTE_LENGTH = 'byteLength' , BYTE_OFFSET = 'byteOffset' , $BUFFER = DESCRIPTORS ? '_b' : BUFFER , $LENGTH = DESCRIPTORS ? '_l' : BYTE_LENGTH , $OFFSET = DESCRIPTORS ? '_o' : BYTE_OFFSET; // IEEE754 conversions based on https://github.com/feross/ieee754 var packIEEE754 = function(value, mLen, nBytes){ var buffer = Array(nBytes) , eLen = nBytes * 8 - mLen - 1 , eMax = (1 << eLen) - 1 , eBias = eMax >> 1 , rt = mLen === 23 ? pow(2, -24) - pow(2, -77) : 0 , i = 0 , s = value < 0 || value === 0 && 1 / value < 0 ? 1 : 0 , e, m, c; value = abs(value) if(value != value || value === Infinity){ m = value != value ? 1 : 0; e = eMax; } else { e = floor(log(value) / LN2); if(value * (c = pow(2, -e)) < 1){ e--; c *= 2; } if(e + eBias >= 1){ value += rt / c; } else { value += rt * pow(2, 1 - eBias); } if(value * c >= 2){ e++; c /= 2; } if(e + eBias >= eMax){ m = 0; e = eMax; } else if(e + eBias >= 1){ m = (value * c - 1) * pow(2, mLen); e = e + eBias; } else { m = value * pow(2, eBias - 1) * pow(2, mLen); e = 0; } } for(; mLen >= 8; buffer[i++] = m & 255, m /= 256, mLen -= 8); e = e << mLen | m; eLen += mLen; for(; eLen > 0; buffer[i++] = e & 255, e /= 256, eLen -= 8); buffer[--i] |= s * 128; return buffer; }; var unpackIEEE754 = function(buffer, mLen, nBytes){ var eLen = nBytes * 8 - mLen - 1 , eMax = (1 << eLen) - 1 , eBias = eMax >> 1 , nBits = eLen - 7 , i = nBytes - 1 , s = buffer[i--] , e = s & 127 , m; s >>= 7; for(; nBits > 0; e = e * 256 + buffer[i], i--, nBits -= 8); m = e & (1 << -nBits) - 1; e >>= -nBits; nBits += mLen; for(; nBits > 0; m = m * 256 + buffer[i], i--, nBits -= 8); if(e === 0){ e = 1 - eBias; } else if(e === eMax){ return m ? NaN : s ? -Infinity : Infinity; } else { m = m + pow(2, mLen); e = e - eBias; } return (s ? -1 : 1) * m * pow(2, e - mLen); }; var unpackI32 = function(bytes){ return bytes[3] << 24 | bytes[2] << 16 | bytes[1] << 8 | bytes[0]; }; var packI8 = function(it){ return [it & 0xff]; }; var packI16 = function(it){ return [it & 0xff, it >> 8 & 0xff]; }; var packI32 = function(it){ return [it & 0xff, it >> 8 & 0xff, it >> 16 & 0xff, it >> 24 & 0xff]; }; var packF64 = function(it){ return packIEEE754(it, 52, 8); }; var packF32 = function(it){ return packIEEE754(it, 23, 4); }; var addGetter = function(C, key, internal){ dP(C[PROTOTYPE], key, {get: function(){ return this[internal]; }}); }; var get = function(view, bytes, index, isLittleEndian){ var numIndex = +index , intIndex = toInteger(numIndex); if(numIndex != intIndex || intIndex < 0 || intIndex + bytes > view[$LENGTH])throw RangeError(WRONG_INDEX); var store = view[$BUFFER]._b , start = intIndex + view[$OFFSET] , pack = store.slice(start, start + bytes); return isLittleEndian ? pack : pack.reverse(); }; var set = function(view, bytes, index, conversion, value, isLittleEndian){ var numIndex = +index , intIndex = toInteger(numIndex); if(numIndex != intIndex || intIndex < 0 || intIndex + bytes > view[$LENGTH])throw RangeError(WRONG_INDEX); var store = view[$BUFFER]._b , start = intIndex + view[$OFFSET] , pack = conversion(+value); for(var i = 0; i < bytes; i++)store[start + i] = pack[isLittleEndian ? i : bytes - i - 1]; }; var validateArrayBufferArguments = function(that, length){ anInstance(that, $ArrayBuffer, ARRAY_BUFFER); var numberLength = +length , byteLength = toLength(numberLength); if(numberLength != byteLength)throw RangeError(WRONG_LENGTH); return byteLength; }; if(!$typed.ABV){ $ArrayBuffer = function ArrayBuffer(length){ var byteLength = validateArrayBufferArguments(this, length); this._b = arrayFill.call(Array(byteLength), 0); this[$LENGTH] = byteLength; }; $DataView = function DataView(buffer, byteOffset, byteLength){ anInstance(this, $DataView, DATA_VIEW); anInstance(buffer, $ArrayBuffer, DATA_VIEW); var bufferLength = buffer[$LENGTH] , offset = toInteger(byteOffset); if(offset < 0 || offset > bufferLength)throw RangeError('Wrong offset!'); byteLength = byteLength === undefined ? bufferLength - offset : toLength(byteLength); if(offset + byteLength > bufferLength)throw RangeError(WRONG_LENGTH); this[$BUFFER] = buffer; this[$OFFSET] = offset; this[$LENGTH] = byteLength; }; if(DESCRIPTORS){ addGetter($ArrayBuffer, BYTE_LENGTH, '_l'); addGetter($DataView, BUFFER, '_b'); addGetter($DataView, BYTE_LENGTH, '_l'); addGetter($DataView, BYTE_OFFSET, '_o'); } redefineAll($DataView[PROTOTYPE], { getInt8: function getInt8(byteOffset){ return get(this, 1, byteOffset)[0] << 24 >> 24; }, getUint8: function getUint8(byteOffset){ return get(this, 1, byteOffset)[0]; }, getInt16: function getInt16(byteOffset /*, littleEndian */){ var bytes = get(this, 2, byteOffset, arguments[1]); return (bytes[1] << 8 | bytes[0]) << 16 >> 16; }, getUint16: function getUint16(byteOffset /*, littleEndian */){ var bytes = get(this, 2, byteOffset, arguments[1]); return bytes[1] << 8 | bytes[0]; }, getInt32: function getInt32(byteOffset /*, littleEndian */){ return unpackI32(get(this, 4, byteOffset, arguments[1])); }, getUint32: function getUint32(byteOffset /*, littleEndian */){ return unpackI32(get(this, 4, byteOffset, arguments[1])) >>> 0; }, getFloat32: function getFloat32(byteOffset /*, littleEndian */){ return unpackIEEE754(get(this, 4, byteOffset, arguments[1]), 23, 4); }, getFloat64: function getFloat64(byteOffset /*, littleEndian */){ return unpackIEEE754(get(this, 8, byteOffset, arguments[1]), 52, 8); }, setInt8: function setInt8(byteOffset, value){ set(this, 1, byteOffset, packI8, value); }, setUint8: function setUint8(byteOffset, value){ set(this, 1, byteOffset, packI8, value); }, setInt16: function setInt16(byteOffset, value /*, littleEndian */){ set(this, 2, byteOffset, packI16, value, arguments[2]); }, setUint16: function setUint16(byteOffset, value /*, littleEndian */){ set(this, 2, byteOffset, packI16, value, arguments[2]); }, setInt32: function setInt32(byteOffset, value /*, littleEndian */){ set(this, 4, byteOffset, packI32, value, arguments[2]); }, setUint32: function setUint32(byteOffset, value /*, littleEndian */){ set(this, 4, byteOffset, packI32, value, arguments[2]); }, setFloat32: function setFloat32(byteOffset, value /*, littleEndian */){ set(this, 4, byteOffset, packF32, value, arguments[2]); }, setFloat64: function setFloat64(byteOffset, value /*, littleEndian */){ set(this, 8, byteOffset, packF64, value, arguments[2]); } }); } else { if(!fails(function(){ new $ArrayBuffer; // eslint-disable-line no-new }) || !fails(function(){ new $ArrayBuffer(.5); // eslint-disable-line no-new })){ $ArrayBuffer = function ArrayBuffer(length){ return new BaseBuffer(validateArrayBufferArguments(this, length)); }; var ArrayBufferProto = $ArrayBuffer[PROTOTYPE] = BaseBuffer[PROTOTYPE]; for(var keys = gOPN(BaseBuffer), j = 0, key; keys.length > j; ){ if(!((key = keys[j++]) in $ArrayBuffer))hide($ArrayBuffer, key, BaseBuffer[key]); }; if(!LIBRARY)ArrayBufferProto.constructor = $ArrayBuffer; } // iOS Safari 7.x bug var view = new $DataView(new $ArrayBuffer(2)) , $setInt8 = $DataView[PROTOTYPE].setInt8; view.setInt8(0, 2147483648); view.setInt8(1, 2147483649); if(view.getInt8(0) || !view.getInt8(1))redefineAll($DataView[PROTOTYPE], { setInt8: function setInt8(byteOffset, value){ $setInt8.call(this, byteOffset, value << 24 >> 24); }, setUint8: function setUint8(byteOffset, value){ $setInt8.call(this, byteOffset, value << 24 >> 24); } }, true); } setToStringTag($ArrayBuffer, ARRAY_BUFFER); setToStringTag($DataView, DATA_VIEW); hide($DataView[PROTOTYPE], $typed.VIEW, true); exports[ARRAY_BUFFER] = $ArrayBuffer; exports[DATA_VIEW] = $DataView; /***/ }, /* 218 */ /***/ function(module, exports, __webpack_require__) { var $export = __webpack_require__(6); $export($export.G + $export.W + $export.F * !__webpack_require__(216).ABV, { DataView: __webpack_require__(217).DataView }); /***/ }, /* 219 */ /***/ function(module, exports, __webpack_require__) { __webpack_require__(220)('Int8', 1, function(init){ return function Int8Array(data, byteOffset, length){ return init(this, data, byteOffset, length); }; }); /***/ }, /* 220 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; if(__webpack_require__(4)){ var LIBRARY = __webpack_require__(26) , global = __webpack_require__(2) , fails = __webpack_require__(5) , $export = __webpack_require__(6) , $typed = __webpack_require__(216) , $buffer = __webpack_require__(217) , ctx = __webpack_require__(8) , anInstance = __webpack_require__(184) , propertyDesc = __webpack_require__(17) , hide = __webpack_require__(10) , redefineAll = __webpack_require__(189) , toInteger = __webpack_require__(36) , toLength = __webpack_require__(35) , toIndex = __webpack_require__(37) , toPrimitive = __webpack_require__(16) , has = __webpack_require__(3) , same = __webpack_require__(69) , classof = __webpack_require__(152) , isObject = __webpack_require__(13) , toObject = __webpack_require__(56) , isArrayIter = __webpack_require__(149) , create = __webpack_require__(44) , getPrototypeOf = __webpack_require__(57) , gOPN = __webpack_require__(48).f , getIterFn = __webpack_require__(151) , uid = __webpack_require__(20) , wks = __webpack_require__(23) , createArrayMethod = __webpack_require__(160) , createArrayIncludes = __webpack_require__(34) , speciesConstructor = __webpack_require__(186) , ArrayIterators = __webpack_require__(179) , Iterators = __webpack_require__(130) , $iterDetect = __webpack_require__(153) , setSpecies = __webpack_require__(182) , arrayFill = __webpack_require__(176) , arrayCopyWithin = __webpack_require__(173) , $DP = __webpack_require__(11) , $GOPD = __webpack_require__(49) , dP = $DP.f , gOPD = $GOPD.f , RangeError = global.RangeError , TypeError = global.TypeError , Uint8Array = global.Uint8Array , ARRAY_BUFFER = 'ArrayBuffer' , SHARED_BUFFER = 'Shared' + ARRAY_BUFFER , BYTES_PER_ELEMENT = 'BYTES_PER_ELEMENT' , PROTOTYPE = 'prototype' , ArrayProto = Array[PROTOTYPE] , $ArrayBuffer = $buffer.ArrayBuffer , $DataView = $buffer.DataView , arrayForEach = createArrayMethod(0) , arrayFilter = createArrayMethod(2) , arraySome = createArrayMethod(3) , arrayEvery = createArrayMethod(4) , arrayFind = createArrayMethod(5) , arrayFindIndex = createArrayMethod(6) , arrayIncludes = createArrayIncludes(true) , arrayIndexOf = createArrayIncludes(false) , arrayValues = ArrayIterators.values , arrayKeys = ArrayIterators.keys , arrayEntries = ArrayIterators.entries , arrayLastIndexOf = ArrayProto.lastIndexOf , arrayReduce = ArrayProto.reduce , arrayReduceRight = ArrayProto.reduceRight , arrayJoin = ArrayProto.join , arraySort = ArrayProto.sort , arraySlice = ArrayProto.slice , arrayToString = ArrayProto.toString , arrayToLocaleString = ArrayProto.toLocaleString , ITERATOR = wks('iterator') , TAG = wks('toStringTag') , TYPED_CONSTRUCTOR = uid('typed_constructor') , DEF_CONSTRUCTOR = uid('def_constructor') , ALL_CONSTRUCTORS = $typed.CONSTR , TYPED_ARRAY = $typed.TYPED , VIEW = $typed.VIEW , WRONG_LENGTH = 'Wrong length!'; var $map = createArrayMethod(1, function(O, length){ return allocate(speciesConstructor(O, O[DEF_CONSTRUCTOR]), length); }); var LITTLE_ENDIAN = fails(function(){ return new Uint8Array(new Uint16Array([1]).buffer)[0] === 1; }); var FORCED_SET = !!Uint8Array && !!Uint8Array[PROTOTYPE].set && fails(function(){ new Uint8Array(1).set({}); }); var strictToLength = function(it, SAME){ if(it === undefined)throw TypeError(WRONG_LENGTH); var number = +it , length = toLength(it); if(SAME && !same(number, length))throw RangeError(WRONG_LENGTH); return length; }; var toOffset = function(it, BYTES){ var offset = toInteger(it); if(offset < 0 || offset % BYTES)throw RangeError('Wrong offset!'); return offset; }; var validate = function(it){ if(isObject(it) && TYPED_ARRAY in it)return it; throw TypeError(it + ' is not a typed array!'); }; var allocate = function(C, length){ if(!(isObject(C) && TYPED_CONSTRUCTOR in C)){ throw TypeError('It is not a typed array constructor!'); } return new C(length); }; var speciesFromList = function(O, list){ return fromList(speciesConstructor(O, O[DEF_CONSTRUCTOR]), list); }; var fromList = function(C, list){ var index = 0 , length = list.length , result = allocate(C, length); while(length > index)result[index] = list[index++]; return result; }; var addGetter = function(it, key, internal){ dP(it, key, {get: function(){ return this._d[internal]; }}); }; var $from = function from(source /*, mapfn, thisArg */){ var O = toObject(source) , aLen = arguments.length , mapfn = aLen > 1 ? arguments[1] : undefined , mapping = mapfn !== undefined , iterFn = getIterFn(O) , i, length, values, result, step, iterator; if(iterFn != undefined && !isArrayIter(iterFn)){ for(iterator = iterFn.call(O), values = [], i = 0; !(step = iterator.next()).done; i++){ values.push(step.value); } O = values; } if(mapping && aLen > 2)mapfn = ctx(mapfn, arguments[2], 2); for(i = 0, length = toLength(O.length), result = allocate(this, length); length > i; i++){ result[i] = mapping ? mapfn(O[i], i) : O[i]; } return result; }; var $of = function of(/*...items*/){ var index = 0 , length = arguments.length , result = allocate(this, length); while(length > index)result[index] = arguments[index++]; return result; }; // iOS Safari 6.x fails here var TO_LOCALE_BUG = !!Uint8Array && fails(function(){ arrayToLocaleString.call(new Uint8Array(1)); }); var $toLocaleString = function toLocaleString(){ return arrayToLocaleString.apply(TO_LOCALE_BUG ? arraySlice.call(validate(this)) : validate(this), arguments); }; var proto = { copyWithin: function copyWithin(target, start /*, end */){ return arrayCopyWithin.call(validate(this), target, start, arguments.length > 2 ? arguments[2] : undefined); }, every: function every(callbackfn /*, thisArg */){ return arrayEvery(validate(this), callbackfn, arguments.length > 1 ? arguments[1] : undefined); }, fill: function fill(value /*, start, end */){ // eslint-disable-line no-unused-vars return arrayFill.apply(validate(this), arguments); }, filter: function filter(callbackfn /*, thisArg */){ return speciesFromList(this, arrayFilter(validate(this), callbackfn, arguments.length > 1 ? arguments[1] : undefined)); }, find: function find(predicate /*, thisArg */){ return arrayFind(validate(this), predicate, arguments.length > 1 ? arguments[1] : undefined); }, findIndex: function findIndex(predicate /*, thisArg */){ return arrayFindIndex(validate(this), predicate, arguments.length > 1 ? arguments[1] : undefined); }, forEach: function forEach(callbackfn /*, thisArg */){ arrayForEach(validate(this), callbackfn, arguments.length > 1 ? arguments[1] : undefined); }, indexOf: function indexOf(searchElement /*, fromIndex */){ return arrayIndexOf(validate(this), searchElement, arguments.length > 1 ? arguments[1] : undefined); }, includes: function includes(searchElement /*, fromIndex */){ return arrayIncludes(validate(this), searchElement, arguments.length > 1 ? arguments[1] : undefined); }, join: function join(separator){ // eslint-disable-line no-unused-vars return arrayJoin.apply(validate(this), arguments); }, lastIndexOf: function lastIndexOf(searchElement /*, fromIndex */){ // eslint-disable-line no-unused-vars return arrayLastIndexOf.apply(validate(this), arguments); }, map: function map(mapfn /*, thisArg */){ return $map(validate(this), mapfn, arguments.length > 1 ? arguments[1] : undefined); }, reduce: function reduce(callbackfn /*, initialValue */){ // eslint-disable-line no-unused-vars return arrayReduce.apply(validate(this), arguments); }, reduceRight: function reduceRight(callbackfn /*, initialValue */){ // eslint-disable-line no-unused-vars return arrayReduceRight.apply(validate(this), arguments); }, reverse: function reverse(){ var that = this , length = validate(that).length , middle = Math.floor(length / 2) , index = 0 , value; while(index < middle){ value = that[index]; that[index++] = that[--length]; that[length] = value; } return that; }, some: function some(callbackfn /*, thisArg */){ return arraySome(validate(this), callbackfn, arguments.length > 1 ? arguments[1] : undefined); }, sort: function sort(comparefn){ return arraySort.call(validate(this), comparefn); }, subarray: function subarray(begin, end){ var O = validate(this) , length = O.length , $begin = toIndex(begin, length); return new (speciesConstructor(O, O[DEF_CONSTRUCTOR]))( O.buffer, O.byteOffset + $begin * O.BYTES_PER_ELEMENT, toLength((end === undefined ? length : toIndex(end, length)) - $begin) ); } }; var $slice = function slice(start, end){ return speciesFromList(this, arraySlice.call(validate(this), start, end)); }; var $set = function set(arrayLike /*, offset */){ validate(this); var offset = toOffset(arguments[1], 1) , length = this.length , src = toObject(arrayLike) , len = toLength(src.length) , index = 0; if(len + offset > length)throw RangeError(WRONG_LENGTH); while(index < len)this[offset + index] = src[index++]; }; var $iterators = { entries: function entries(){ return arrayEntries.call(validate(this)); }, keys: function keys(){ return arrayKeys.call(validate(this)); }, values: function values(){ return arrayValues.call(validate(this)); } }; var isTAIndex = function(target, key){ return isObject(target) && target[TYPED_ARRAY] && typeof key != 'symbol' && key in target && String(+key) == String(key); }; var $getDesc = function getOwnPropertyDescriptor(target, key){ return isTAIndex(target, key = toPrimitive(key, true)) ? propertyDesc(2, target[key]) : gOPD(target, key); }; var $setDesc = function defineProperty(target, key, desc){ if(isTAIndex(target, key = toPrimitive(key, true)) && isObject(desc) && has(desc, 'value') && !has(desc, 'get') && !has(desc, 'set') // TODO: add validation descriptor w/o calling accessors && !desc.configurable && (!has(desc, 'writable') || desc.writable) && (!has(desc, 'enumerable') || desc.enumerable) ){ target[key] = desc.value; return target; } else return dP(target, key, desc); }; if(!ALL_CONSTRUCTORS){ $GOPD.f = $getDesc; $DP.f = $setDesc; } $export($export.S + $export.F * !ALL_CONSTRUCTORS, 'Object', { getOwnPropertyDescriptor: $getDesc, defineProperty: $setDesc }); if(fails(function(){ arrayToString.call({}); })){ arrayToString = arrayToLocaleString = function toString(){ return arrayJoin.call(this); } } var $TypedArrayPrototype$ = redefineAll({}, proto); redefineAll($TypedArrayPrototype$, $iterators); hide($TypedArrayPrototype$, ITERATOR, $iterators.values); redefineAll($TypedArrayPrototype$, { slice: $slice, set: $set, constructor: function(){ /* noop */ }, toString: arrayToString, toLocaleString: $toLocaleString }); addGetter($TypedArrayPrototype$, 'buffer', 'b'); addGetter($TypedArrayPrototype$, 'byteOffset', 'o'); addGetter($TypedArrayPrototype$, 'byteLength', 'l'); addGetter($TypedArrayPrototype$, 'length', 'e'); dP($TypedArrayPrototype$, TAG, { get: function(){ return this[TYPED_ARRAY]; } }); module.exports = function(KEY, BYTES, wrapper, CLAMPED){ CLAMPED = !!CLAMPED; var NAME = KEY + (CLAMPED ? 'Clamped' : '') + 'Array' , ISNT_UINT8 = NAME != 'Uint8Array' , GETTER = 'get' + KEY , SETTER = 'set' + KEY , TypedArray = global[NAME] , Base = TypedArray || {} , TAC = TypedArray && getPrototypeOf(TypedArray) , FORCED = !TypedArray || !$typed.ABV , O = {} , TypedArrayPrototype = TypedArray && TypedArray[PROTOTYPE]; var getter = function(that, index){ var data = that._d; return data.v[GETTER](index * BYTES + data.o, LITTLE_ENDIAN); }; var setter = function(that, index, value){ var data = that._d; if(CLAMPED)value = (value = Math.round(value)) < 0 ? 0 : value > 0xff ? 0xff : value & 0xff; data.v[SETTER](index * BYTES + data.o, value, LITTLE_ENDIAN); }; var addElement = function(that, index){ dP(that, index, { get: function(){ return getter(this, index); }, set: function(value){ return setter(this, index, value); }, enumerable: true }); }; if(FORCED){ TypedArray = wrapper(function(that, data, $offset, $length){ anInstance(that, TypedArray, NAME, '_d'); var index = 0 , offset = 0 , buffer, byteLength, length, klass; if(!isObject(data)){ length = strictToLength(data, true) byteLength = length * BYTES; buffer = new $ArrayBuffer(byteLength); } else if(data instanceof $ArrayBuffer || (klass = classof(data)) == ARRAY_BUFFER || klass == SHARED_BUFFER){ buffer = data; offset = toOffset($offset, BYTES); var $len = data.byteLength; if($length === undefined){ if($len % BYTES)throw RangeError(WRONG_LENGTH); byteLength = $len - offset; if(byteLength < 0)throw RangeError(WRONG_LENGTH); } else { byteLength = toLength($length) * BYTES; if(byteLength + offset > $len)throw RangeError(WRONG_LENGTH); } length = byteLength / BYTES; } else if(TYPED_ARRAY in data){ return fromList(TypedArray, data); } else { return $from.call(TypedArray, data); } hide(that, '_d', { b: buffer, o: offset, l: byteLength, e: length, v: new $DataView(buffer) }); while(index < length)addElement(that, index++); }); TypedArrayPrototype = TypedArray[PROTOTYPE] = create($TypedArrayPrototype$); hide(TypedArrayPrototype, 'constructor', TypedArray); } else if(!$iterDetect(function(iter){ // V8 works with iterators, but fails in many other cases // https://code.google.com/p/v8/issues/detail?id=4552 new TypedArray(null); // eslint-disable-line no-new new TypedArray(iter); // eslint-disable-line no-new }, true)){ TypedArray = wrapper(function(that, data, $offset, $length){ anInstance(that, TypedArray, NAME); var klass; // `ws` module bug, temporarily remove validation length for Uint8Array // https://github.com/websockets/ws/pull/645 if(!isObject(data))return new Base(strictToLength(data, ISNT_UINT8)); if(data instanceof $ArrayBuffer || (klass = classof(data)) == ARRAY_BUFFER || klass == SHARED_BUFFER){ return $length !== undefined ? new Base(data, toOffset($offset, BYTES), $length) : $offset !== undefined ? new Base(data, toOffset($offset, BYTES)) : new Base(data); } if(TYPED_ARRAY in data)return fromList(TypedArray, data); return $from.call(TypedArray, data); }); arrayForEach(TAC !== Function.prototype ? gOPN(Base).concat(gOPN(TAC)) : gOPN(Base), function(key){ if(!(key in TypedArray))hide(TypedArray, key, Base[key]); }); TypedArray[PROTOTYPE] = TypedArrayPrototype; if(!LIBRARY)TypedArrayPrototype.constructor = TypedArray; } var $nativeIterator = TypedArrayPrototype[ITERATOR] , CORRECT_ITER_NAME = !!$nativeIterator && ($nativeIterator.name == 'values' || $nativeIterator.name == undefined) , $iterator = $iterators.values; hide(TypedArray, TYPED_CONSTRUCTOR, true); hide(TypedArrayPrototype, TYPED_ARRAY, NAME); hide(TypedArrayPrototype, VIEW, true); hide(TypedArrayPrototype, DEF_CONSTRUCTOR, TypedArray); if(CLAMPED ? new TypedArray(1)[TAG] != NAME : !(TAG in TypedArrayPrototype)){ dP(TypedArrayPrototype, TAG, { get: function(){ return NAME; } }); } O[NAME] = TypedArray; $export($export.G + $export.W + $export.F * (TypedArray != Base), O); $export($export.S, NAME, { BYTES_PER_ELEMENT: BYTES, from: $from, of: $of }); if(!(BYTES_PER_ELEMENT in TypedArrayPrototype))hide(TypedArrayPrototype, BYTES_PER_ELEMENT, BYTES); $export($export.P, NAME, proto); setSpecies(NAME); $export($export.P + $export.F * FORCED_SET, NAME, {set: $set}); $export($export.P + $export.F * !CORRECT_ITER_NAME, NAME, $iterators); $export($export.P + $export.F * (TypedArrayPrototype.toString != arrayToString), NAME, {toString: arrayToString}); $export($export.P + $export.F * fails(function(){ new TypedArray(1).slice(); }), NAME, {slice: $slice}); $export($export.P + $export.F * (fails(function(){ return [1, 2].toLocaleString() != new TypedArray([1, 2]).toLocaleString() }) || !fails(function(){ TypedArrayPrototype.toLocaleString.call([1, 2]); })), NAME, {toLocaleString: $toLocaleString}); Iterators[NAME] = CORRECT_ITER_NAME ? $nativeIterator : $iterator; if(!LIBRARY && !CORRECT_ITER_NAME)hide(TypedArrayPrototype, ITERATOR, $iterator); }; } else module.exports = function(){ /* empty */ }; /***/ }, /* 221 */ /***/ function(module, exports, __webpack_require__) { __webpack_require__(220)('Uint8', 1, function(init){ return function Uint8Array(data, byteOffset, length){ return init(this, data, byteOffset, length); }; }); /***/ }, /* 222 */ /***/ function(module, exports, __webpack_require__) { __webpack_require__(220)('Uint8', 1, function(init){ return function Uint8ClampedArray(data, byteOffset, length){ return init(this, data, byteOffset, length); }; }, true); /***/ }, /* 223 */ /***/ function(module, exports, __webpack_require__) { __webpack_require__(220)('Int16', 2, function(init){ return function Int16Array(data, byteOffset, length){ return init(this, data, byteOffset, length); }; }); /***/ }, /* 224 */ /***/ function(module, exports, __webpack_require__) { __webpack_require__(220)('Uint16', 2, function(init){ return function Uint16Array(data, byteOffset, length){ return init(this, data, byteOffset, length); }; }); /***/ }, /* 225 */ /***/ function(module, exports, __webpack_require__) { __webpack_require__(220)('Int32', 4, function(init){ return function Int32Array(data, byteOffset, length){ return init(this, data, byteOffset, length); }; }); /***/ }, /* 226 */ /***/ function(module, exports, __webpack_require__) { __webpack_require__(220)('Uint32', 4, function(init){ return function Uint32Array(data, byteOffset, length){ return init(this, data, byteOffset, length); }; }); /***/ }, /* 227 */ /***/ function(module, exports, __webpack_require__) { __webpack_require__(220)('Float32', 4, function(init){ return function Float32Array(data, byteOffset, length){ return init(this, data, byteOffset, length); }; }); /***/ }, /* 228 */ /***/ function(module, exports, __webpack_require__) { __webpack_require__(220)('Float64', 8, function(init){ return function Float64Array(data, byteOffset, length){ return init(this, data, byteOffset, length); }; }); /***/ }, /* 229 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; // https://github.com/tc39/Array.prototype.includes var $export = __webpack_require__(6) , $includes = __webpack_require__(34)(true); $export($export.P, 'Array', { includes: function includes(el /*, fromIndex = 0 */){ return $includes(this, el, arguments.length > 1 ? arguments[1] : undefined); } }); __webpack_require__(174)('includes'); /***/ }, /* 230 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; // https://github.com/mathiasbynens/String.prototype.at var $export = __webpack_require__(6) , $at = __webpack_require__(120)(true); $export($export.P, 'String', { at: function at(pos){ return $at(this, pos); } }); /***/ }, /* 231 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; // https://github.com/tc39/proposal-string-pad-start-end var $export = __webpack_require__(6) , $pad = __webpack_require__(232); $export($export.P, 'String', { padStart: function padStart(maxLength /*, fillString = ' ' */){ return $pad(this, maxLength, arguments.length > 1 ? arguments[1] : undefined, true); } }); /***/ }, /* 232 */ /***/ function(module, exports, __webpack_require__) { // https://github.com/tc39/proposal-string-pad-start-end var toLength = __webpack_require__(35) , repeat = __webpack_require__(78) , defined = __webpack_require__(33); module.exports = function(that, maxLength, fillString, left){ var S = String(defined(that)) , stringLength = S.length , fillStr = fillString === undefined ? ' ' : String(fillString) , intMaxLength = toLength(maxLength); if(intMaxLength <= stringLength || fillStr == '')return S; var fillLen = intMaxLength - stringLength , stringFiller = repeat.call(fillStr, Math.ceil(fillLen / fillStr.length)); if(stringFiller.length > fillLen)stringFiller = stringFiller.slice(0, fillLen); return left ? stringFiller + S : S + stringFiller; }; /***/ }, /* 233 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; // https://github.com/tc39/proposal-string-pad-start-end var $export = __webpack_require__(6) , $pad = __webpack_require__(232); $export($export.P, 'String', { padEnd: function padEnd(maxLength /*, fillString = ' ' */){ return $pad(this, maxLength, arguments.length > 1 ? arguments[1] : undefined, false); } }); /***/ }, /* 234 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; // https://github.com/sebmarkbage/ecmascript-string-left-right-trim __webpack_require__(90)('trimLeft', function($trim){ return function trimLeft(){ return $trim(this, 1); }; }, 'trimStart'); /***/ }, /* 235 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; // https://github.com/sebmarkbage/ecmascript-string-left-right-trim __webpack_require__(90)('trimRight', function($trim){ return function trimRight(){ return $trim(this, 2); }; }, 'trimEnd'); /***/ }, /* 236 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; // https://tc39.github.io/String.prototype.matchAll/ var $export = __webpack_require__(6) , defined = __webpack_require__(33) , toLength = __webpack_require__(35) , isRegExp = __webpack_require__(123) , getFlags = __webpack_require__(237) , RegExpProto = RegExp.prototype; var $RegExpStringIterator = function(regexp, string){ this._r = regexp; this._s = string; }; __webpack_require__(131)($RegExpStringIterator, 'RegExp String', function next(){ var match = this._r.exec(this._s); return {value: match, done: match === null}; }); $export($export.P, 'String', { matchAll: function matchAll(regexp){ defined(this); if(!isRegExp(regexp))throw TypeError(regexp + ' is not a regexp!'); var S = String(this) , flags = 'flags' in RegExpProto ? String(regexp.flags) : getFlags.call(regexp) , rx = new RegExp(regexp.source, ~flags.indexOf('g') ? flags : 'g' + flags); rx.lastIndex = toLength(regexp.lastIndex); return new $RegExpStringIterator(rx, S); } }); /***/ }, /* 237 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; // 21.2.5.3 get RegExp.prototype.flags var anObject = __webpack_require__(12); module.exports = function(){ var that = anObject(this) , result = ''; if(that.global) result += 'g'; if(that.ignoreCase) result += 'i'; if(that.multiline) result += 'm'; if(that.unicode) result += 'u'; if(that.sticky) result += 'y'; return result; }; /***/ }, /* 238 */ /***/ function(module, exports, __webpack_require__) { __webpack_require__(25)('asyncIterator'); /***/ }, /* 239 */ /***/ function(module, exports, __webpack_require__) { __webpack_require__(25)('observable'); /***/ }, /* 240 */ /***/ function(module, exports, __webpack_require__) { // https://github.com/tc39/proposal-object-getownpropertydescriptors var $export = __webpack_require__(6) , ownKeys = __webpack_require__(208) , toIObject = __webpack_require__(30) , gOPD = __webpack_require__(49) , createProperty = __webpack_require__(150); $export($export.S, 'Object', { getOwnPropertyDescriptors: function getOwnPropertyDescriptors(object){ var O = toIObject(object) , getDesc = gOPD.f , keys = ownKeys(O) , result = {} , i = 0 , key; while(keys.length > i)createProperty(result, key = keys[i++], getDesc(O, key)); return result; } }); /***/ }, /* 241 */ /***/ function(module, exports, __webpack_require__) { // https://github.com/tc39/proposal-object-values-entries var $export = __webpack_require__(6) , $values = __webpack_require__(242)(false); $export($export.S, 'Object', { values: function values(it){ return $values(it); } }); /***/ }, /* 242 */ /***/ function(module, exports, __webpack_require__) { var getKeys = __webpack_require__(28) , toIObject = __webpack_require__(30) , isEnum = __webpack_require__(42).f; module.exports = function(isEntries){ return function(it){ var O = toIObject(it) , keys = getKeys(O) , length = keys.length , i = 0 , result = [] , key; while(length > i)if(isEnum.call(O, key = keys[i++])){ result.push(isEntries ? [key, O[key]] : O[key]); } return result; }; }; /***/ }, /* 243 */ /***/ function(module, exports, __webpack_require__) { // https://github.com/tc39/proposal-object-values-entries var $export = __webpack_require__(6) , $entries = __webpack_require__(242)(true); $export($export.S, 'Object', { entries: function entries(it){ return $entries(it); } }); /***/ }, /* 244 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; var $export = __webpack_require__(6) , toObject = __webpack_require__(56) , aFunction = __webpack_require__(9) , $defineProperty = __webpack_require__(11); // B.2.2.2 Object.prototype.__defineGetter__(P, getter) __webpack_require__(4) && $export($export.P + __webpack_require__(245), 'Object', { __defineGetter__: function __defineGetter__(P, getter){ $defineProperty.f(toObject(this), P, {get: aFunction(getter), enumerable: true, configurable: true}); } }); /***/ }, /* 245 */ /***/ function(module, exports, __webpack_require__) { // Forced replacement prototype accessors methods module.exports = __webpack_require__(26)|| !__webpack_require__(5)(function(){ var K = Math.random(); // In FF throws only define methods __defineSetter__.call(null, K, function(){ /* empty */}); delete __webpack_require__(2)[K]; }); /***/ }, /* 246 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; var $export = __webpack_require__(6) , toObject = __webpack_require__(56) , aFunction = __webpack_require__(9) , $defineProperty = __webpack_require__(11); // B.2.2.3 Object.prototype.__defineSetter__(P, setter) __webpack_require__(4) && $export($export.P + __webpack_require__(245), 'Object', { __defineSetter__: function __defineSetter__(P, setter){ $defineProperty.f(toObject(this), P, {set: aFunction(setter), enumerable: true, configurable: true}); } }); /***/ }, /* 247 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; var $export = __webpack_require__(6) , toObject = __webpack_require__(56) , toPrimitive = __webpack_require__(16) , getPrototypeOf = __webpack_require__(57) , getOwnPropertyDescriptor = __webpack_require__(49).f; // B.2.2.4 Object.prototype.__lookupGetter__(P) __webpack_require__(4) && $export($export.P + __webpack_require__(245), 'Object', { __lookupGetter__: function __lookupGetter__(P){ var O = toObject(this) , K = toPrimitive(P, true) , D; do { if(D = getOwnPropertyDescriptor(O, K))return D.get; } while(O = getPrototypeOf(O)); } }); /***/ }, /* 248 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; var $export = __webpack_require__(6) , toObject = __webpack_require__(56) , toPrimitive = __webpack_require__(16) , getPrototypeOf = __webpack_require__(57) , getOwnPropertyDescriptor = __webpack_require__(49).f; // B.2.2.5 Object.prototype.__lookupSetter__(P) __webpack_require__(4) && $export($export.P + __webpack_require__(245), 'Object', { __lookupSetter__: function __lookupSetter__(P){ var O = toObject(this) , K = toPrimitive(P, true) , D; do { if(D = getOwnPropertyDescriptor(O, K))return D.set; } while(O = getPrototypeOf(O)); } }); /***/ }, /* 249 */ /***/ function(module, exports, __webpack_require__) { // https://github.com/DavidBruant/Map-Set.prototype.toJSON var $export = __webpack_require__(6); $export($export.P + $export.R, 'Map', {toJSON: __webpack_require__(250)('Map')}); /***/ }, /* 250 */ /***/ function(module, exports, __webpack_require__) { // https://github.com/DavidBruant/Map-Set.prototype.toJSON var classof = __webpack_require__(152) , from = __webpack_require__(251); module.exports = function(NAME){ return function toJSON(){ if(classof(this) != NAME)throw TypeError(NAME + "#toJSON isn't generic"); return from(this); }; }; /***/ }, /* 251 */ /***/ function(module, exports, __webpack_require__) { var forOf = __webpack_require__(185); module.exports = function(iter, ITERATOR){ var result = []; forOf(iter, false, result.push, result, ITERATOR); return result; }; /***/ }, /* 252 */ /***/ function(module, exports, __webpack_require__) { // https://github.com/DavidBruant/Map-Set.prototype.toJSON var $export = __webpack_require__(6); $export($export.P + $export.R, 'Set', {toJSON: __webpack_require__(250)('Set')}); /***/ }, /* 253 */ /***/ function(module, exports, __webpack_require__) { // https://github.com/ljharb/proposal-global var $export = __webpack_require__(6); $export($export.S, 'System', {global: __webpack_require__(2)}); /***/ }, /* 254 */ /***/ function(module, exports, __webpack_require__) { // https://github.com/ljharb/proposal-is-error var $export = __webpack_require__(6) , cof = __webpack_require__(32); $export($export.S, 'Error', { isError: function isError(it){ return cof(it) === 'Error'; } }); /***/ }, /* 255 */ /***/ function(module, exports, __webpack_require__) { // https://gist.github.com/BrendanEich/4294d5c212a6d2254703 var $export = __webpack_require__(6); $export($export.S, 'Math', { iaddh: function iaddh(x0, x1, y0, y1){ var $x0 = x0 >>> 0 , $x1 = x1 >>> 0 , $y0 = y0 >>> 0; return $x1 + (y1 >>> 0) + (($x0 & $y0 | ($x0 | $y0) & ~($x0 + $y0 >>> 0)) >>> 31) | 0; } }); /***/ }, /* 256 */ /***/ function(module, exports, __webpack_require__) { // https://gist.github.com/BrendanEich/4294d5c212a6d2254703 var $export = __webpack_require__(6); $export($export.S, 'Math', { isubh: function isubh(x0, x1, y0, y1){ var $x0 = x0 >>> 0 , $x1 = x1 >>> 0 , $y0 = y0 >>> 0; return $x1 - (y1 >>> 0) - ((~$x0 & $y0 | ~($x0 ^ $y0) & $x0 - $y0 >>> 0) >>> 31) | 0; } }); /***/ }, /* 257 */ /***/ function(module, exports, __webpack_require__) { // https://gist.github.com/BrendanEich/4294d5c212a6d2254703 var $export = __webpack_require__(6); $export($export.S, 'Math', { imulh: function imulh(u, v){ var UINT16 = 0xffff , $u = +u , $v = +v , u0 = $u & UINT16 , v0 = $v & UINT16 , u1 = $u >> 16 , v1 = $v >> 16 , t = (u1 * v0 >>> 0) + (u0 * v0 >>> 16); return u1 * v1 + (t >> 16) + ((u0 * v1 >>> 0) + (t & UINT16) >> 16); } }); /***/ }, /* 258 */ /***/ function(module, exports, __webpack_require__) { // https://gist.github.com/BrendanEich/4294d5c212a6d2254703 var $export = __webpack_require__(6); $export($export.S, 'Math', { umulh: function umulh(u, v){ var UINT16 = 0xffff , $u = +u , $v = +v , u0 = $u & UINT16 , v0 = $v & UINT16 , u1 = $u >>> 16 , v1 = $v >>> 16 , t = (u1 * v0 >>> 0) + (u0 * v0 >>> 16); return u1 * v1 + (t >>> 16) + ((u0 * v1 >>> 0) + (t & UINT16) >>> 16); } }); /***/ }, /* 259 */ /***/ function(module, exports, __webpack_require__) { var metadata = __webpack_require__(260) , anObject = __webpack_require__(12) , toMetaKey = metadata.key , ordinaryDefineOwnMetadata = metadata.set; metadata.exp({defineMetadata: function defineMetadata(metadataKey, metadataValue, target, targetKey){ ordinaryDefineOwnMetadata(metadataKey, metadataValue, anObject(target), toMetaKey(targetKey)); }}); /***/ }, /* 260 */ /***/ function(module, exports, __webpack_require__) { var Map = __webpack_require__(190) , $export = __webpack_require__(6) , shared = __webpack_require__(21)('metadata') , store = shared.store || (shared.store = new (__webpack_require__(194))); var getOrCreateMetadataMap = function(target, targetKey, create){ var targetMetadata = store.get(target); if(!targetMetadata){ if(!create)return undefined; store.set(target, targetMetadata = new Map); } var keyMetadata = targetMetadata.get(targetKey); if(!keyMetadata){ if(!create)return undefined; targetMetadata.set(targetKey, keyMetadata = new Map); } return keyMetadata; }; var ordinaryHasOwnMetadata = function(MetadataKey, O, P){ var metadataMap = getOrCreateMetadataMap(O, P, false); return metadataMap === undefined ? false : metadataMap.has(MetadataKey); }; var ordinaryGetOwnMetadata = function(MetadataKey, O, P){ var metadataMap = getOrCreateMetadataMap(O, P, false); return metadataMap === undefined ? undefined : metadataMap.get(MetadataKey); }; var ordinaryDefineOwnMetadata = function(MetadataKey, MetadataValue, O, P){ getOrCreateMetadataMap(O, P, true).set(MetadataKey, MetadataValue); }; var ordinaryOwnMetadataKeys = function(target, targetKey){ var metadataMap = getOrCreateMetadataMap(target, targetKey, false) , keys = []; if(metadataMap)metadataMap.forEach(function(_, key){ keys.push(key); }); return keys; }; var toMetaKey = function(it){ return it === undefined || typeof it == 'symbol' ? it : String(it); }; var exp = function(O){ $export($export.S, 'Reflect', O); }; module.exports = { store: store, map: getOrCreateMetadataMap, has: ordinaryHasOwnMetadata, get: ordinaryGetOwnMetadata, set: ordinaryDefineOwnMetadata, keys: ordinaryOwnMetadataKeys, key: toMetaKey, exp: exp }; /***/ }, /* 261 */ /***/ function(module, exports, __webpack_require__) { var metadata = __webpack_require__(260) , anObject = __webpack_require__(12) , toMetaKey = metadata.key , getOrCreateMetadataMap = metadata.map , store = metadata.store; metadata.exp({deleteMetadata: function deleteMetadata(metadataKey, target /*, targetKey */){ var targetKey = arguments.length < 3 ? undefined : toMetaKey(arguments[2]) , metadataMap = getOrCreateMetadataMap(anObject(target), targetKey, false); if(metadataMap === undefined || !metadataMap['delete'](metadataKey))return false; if(metadataMap.size)return true; var targetMetadata = store.get(target); targetMetadata['delete'](targetKey); return !!targetMetadata.size || store['delete'](target); }}); /***/ }, /* 262 */ /***/ function(module, exports, __webpack_require__) { var metadata = __webpack_require__(260) , anObject = __webpack_require__(12) , getPrototypeOf = __webpack_require__(57) , ordinaryHasOwnMetadata = metadata.has , ordinaryGetOwnMetadata = metadata.get , toMetaKey = metadata.key; var ordinaryGetMetadata = function(MetadataKey, O, P){ var hasOwn = ordinaryHasOwnMetadata(MetadataKey, O, P); if(hasOwn)return ordinaryGetOwnMetadata(MetadataKey, O, P); var parent = getPrototypeOf(O); return parent !== null ? ordinaryGetMetadata(MetadataKey, parent, P) : undefined; }; metadata.exp({getMetadata: function getMetadata(metadataKey, target /*, targetKey */){ return ordinaryGetMetadata(metadataKey, anObject(target), arguments.length < 3 ? undefined : toMetaKey(arguments[2])); }}); /***/ }, /* 263 */ /***/ function(module, exports, __webpack_require__) { var Set = __webpack_require__(193) , from = __webpack_require__(251) , metadata = __webpack_require__(260) , anObject = __webpack_require__(12) , getPrototypeOf = __webpack_require__(57) , ordinaryOwnMetadataKeys = metadata.keys , toMetaKey = metadata.key; var ordinaryMetadataKeys = function(O, P){ var oKeys = ordinaryOwnMetadataKeys(O, P) , parent = getPrototypeOf(O); if(parent === null)return oKeys; var pKeys = ordinaryMetadataKeys(parent, P); return pKeys.length ? oKeys.length ? from(new Set(oKeys.concat(pKeys))) : pKeys : oKeys; }; metadata.exp({getMetadataKeys: function getMetadataKeys(target /*, targetKey */){ return ordinaryMetadataKeys(anObject(target), arguments.length < 2 ? undefined : toMetaKey(arguments[1])); }}); /***/ }, /* 264 */ /***/ function(module, exports, __webpack_require__) { var metadata = __webpack_require__(260) , anObject = __webpack_require__(12) , ordinaryGetOwnMetadata = metadata.get , toMetaKey = metadata.key; metadata.exp({getOwnMetadata: function getOwnMetadata(metadataKey, target /*, targetKey */){ return ordinaryGetOwnMetadata(metadataKey, anObject(target) , arguments.length < 3 ? undefined : toMetaKey(arguments[2])); }}); /***/ }, /* 265 */ /***/ function(module, exports, __webpack_require__) { var metadata = __webpack_require__(260) , anObject = __webpack_require__(12) , ordinaryOwnMetadataKeys = metadata.keys , toMetaKey = metadata.key; metadata.exp({getOwnMetadataKeys: function getOwnMetadataKeys(target /*, targetKey */){ return ordinaryOwnMetadataKeys(anObject(target), arguments.length < 2 ? undefined : toMetaKey(arguments[1])); }}); /***/ }, /* 266 */ /***/ function(module, exports, __webpack_require__) { var metadata = __webpack_require__(260) , anObject = __webpack_require__(12) , getPrototypeOf = __webpack_require__(57) , ordinaryHasOwnMetadata = metadata.has , toMetaKey = metadata.key; var ordinaryHasMetadata = function(MetadataKey, O, P){ var hasOwn = ordinaryHasOwnMetadata(MetadataKey, O, P); if(hasOwn)return true; var parent = getPrototypeOf(O); return parent !== null ? ordinaryHasMetadata(MetadataKey, parent, P) : false; }; metadata.exp({hasMetadata: function hasMetadata(metadataKey, target /*, targetKey */){ return ordinaryHasMetadata(metadataKey, anObject(target), arguments.length < 3 ? undefined : toMetaKey(arguments[2])); }}); /***/ }, /* 267 */ /***/ function(module, exports, __webpack_require__) { var metadata = __webpack_require__(260) , anObject = __webpack_require__(12) , ordinaryHasOwnMetadata = metadata.has , toMetaKey = metadata.key; metadata.exp({hasOwnMetadata: function hasOwnMetadata(metadataKey, target /*, targetKey */){ return ordinaryHasOwnMetadata(metadataKey, anObject(target) , arguments.length < 3 ? undefined : toMetaKey(arguments[2])); }}); /***/ }, /* 268 */ /***/ function(module, exports, __webpack_require__) { var metadata = __webpack_require__(260) , anObject = __webpack_require__(12) , aFunction = __webpack_require__(9) , toMetaKey = metadata.key , ordinaryDefineOwnMetadata = metadata.set; metadata.exp({metadata: function metadata(metadataKey, metadataValue){ return function decorator(target, targetKey){ ordinaryDefineOwnMetadata( metadataKey, metadataValue, (targetKey !== undefined ? anObject : aFunction)(target), toMetaKey(targetKey) ); }; }}); /***/ }, /* 269 */ /***/ function(module, exports, __webpack_require__) { // https://github.com/rwaldron/tc39-notes/blob/master/es6/2014-09/sept-25.md#510-globalasap-for-enqueuing-a-microtask var $export = __webpack_require__(6) , microtask = __webpack_require__(188)() , process = __webpack_require__(2).process , isNode = __webpack_require__(32)(process) == 'process'; $export($export.G, { asap: function asap(fn){ var domain = isNode && process.domain; microtask(domain ? domain.bind(fn) : fn); } }); /***/ }, /* 270 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; // https://github.com/zenparsing/es-observable var $export = __webpack_require__(6) , global = __webpack_require__(2) , core = __webpack_require__(7) , microtask = __webpack_require__(188)() , OBSERVABLE = __webpack_require__(23)('observable') , aFunction = __webpack_require__(9) , anObject = __webpack_require__(12) , anInstance = __webpack_require__(184) , redefineAll = __webpack_require__(189) , hide = __webpack_require__(10) , forOf = __webpack_require__(185) , RETURN = forOf.RETURN; var getMethod = function(fn){ return fn == null ? undefined : aFunction(fn); }; var cleanupSubscription = function(subscription){ var cleanup = subscription._c; if(cleanup){ subscription._c = undefined; cleanup(); } }; var subscriptionClosed = function(subscription){ return subscription._o === undefined; }; var closeSubscription = function(subscription){ if(!subscriptionClosed(subscription)){ subscription._o = undefined; cleanupSubscription(subscription); } }; var Subscription = function(observer, subscriber){ anObject(observer); this._c = undefined; this._o = observer; observer = new SubscriptionObserver(this); try { var cleanup = subscriber(observer) , subscription = cleanup; if(cleanup != null){ if(typeof cleanup.unsubscribe === 'function')cleanup = function(){ subscription.unsubscribe(); }; else aFunction(cleanup); this._c = cleanup; } } catch(e){ observer.error(e); return; } if(subscriptionClosed(this))cleanupSubscription(this); }; Subscription.prototype = redefineAll({}, { unsubscribe: function unsubscribe(){ closeSubscription(this); } }); var SubscriptionObserver = function(subscription){ this._s = subscription; }; SubscriptionObserver.prototype = redefineAll({}, { next: function next(value){ var subscription = this._s; if(!subscriptionClosed(subscription)){ var observer = subscription._o; try { var m = getMethod(observer.next); if(m)return m.call(observer, value); } catch(e){ try { closeSubscription(subscription); } finally { throw e; } } } }, error: function error(value){ var subscription = this._s; if(subscriptionClosed(subscription))throw value; var observer = subscription._o; subscription._o = undefined; try { var m = getMethod(observer.error); if(!m)throw value; value = m.call(observer, value); } catch(e){ try { cleanupSubscription(subscription); } finally { throw e; } } cleanupSubscription(subscription); return value; }, complete: function complete(value){ var subscription = this._s; if(!subscriptionClosed(subscription)){ var observer = subscription._o; subscription._o = undefined; try { var m = getMethod(observer.complete); value = m ? m.call(observer, value) : undefined; } catch(e){ try { cleanupSubscription(subscription); } finally { throw e; } } cleanupSubscription(subscription); return value; } } }); var $Observable = function Observable(subscriber){ anInstance(this, $Observable, 'Observable', '_f')._f = aFunction(subscriber); }; redefineAll($Observable.prototype, { subscribe: function subscribe(observer){ return new Subscription(observer, this._f); }, forEach: function forEach(fn){ var that = this; return new (core.Promise || global.Promise)(function(resolve, reject){ aFunction(fn); var subscription = that.subscribe({ next : function(value){ try { return fn(value); } catch(e){ reject(e); subscription.unsubscribe(); } }, error: reject, complete: resolve }); }); } }); redefineAll($Observable, { from: function from(x){ var C = typeof this === 'function' ? this : $Observable; var method = getMethod(anObject(x)[OBSERVABLE]); if(method){ var observable = anObject(method.call(x)); return observable.constructor === C ? observable : new C(function(observer){ return observable.subscribe(observer); }); } return new C(function(observer){ var done = false; microtask(function(){ if(!done){ try { if(forOf(x, false, function(it){ observer.next(it); if(done)return RETURN; }) === RETURN)return; } catch(e){ if(done)throw e; observer.error(e); return; } observer.complete(); } }); return function(){ done = true; }; }); }, of: function of(){ for(var i = 0, l = arguments.length, items = Array(l); i < l;)items[i] = arguments[i++]; return new (typeof this === 'function' ? this : $Observable)(function(observer){ var done = false; microtask(function(){ if(!done){ for(var i = 0; i < items.length; ++i){ observer.next(items[i]); if(done)return; } observer.complete(); } }); return function(){ done = true; }; }); } }); hide($Observable.prototype, OBSERVABLE, function(){ return this; }); $export($export.G, {Observable: $Observable}); __webpack_require__(182)('Observable'); /***/ }, /* 271 */ /***/ function(module, exports, __webpack_require__) { var $export = __webpack_require__(6) , $task = __webpack_require__(187); $export($export.G + $export.B, { setImmediate: $task.set, clearImmediate: $task.clear }); /***/ }, /* 272 */ /***/ function(module, exports, __webpack_require__) { __webpack_require__(179); var global = __webpack_require__(2) , hide = __webpack_require__(10) , Iterators = __webpack_require__(130) , TO_STRING_TAG = __webpack_require__(23)('toStringTag'); for(var collections = ['NodeList', 'DOMTokenList', 'MediaList', 'StyleSheetList', 'CSSRuleList'], i = 0; i < 5; i++){ var NAME = collections[i] , Collection = global[NAME] , proto = Collection && Collection.prototype; if(proto && !proto[TO_STRING_TAG])hide(proto, TO_STRING_TAG, NAME); Iterators[NAME] = Iterators.Array; } /***/ }, /* 273 */ /***/ function(module, exports, __webpack_require__) { // ie9- setTimeout & setInterval additional parameters fix var global = __webpack_require__(2) , $export = __webpack_require__(6) , invoke = __webpack_require__(74) , partial = __webpack_require__(274) , navigator = global.navigator , MSIE = !!navigator && /MSIE .\./.test(navigator.userAgent); // <- dirty ie9- check var wrap = function(set){ return MSIE ? function(fn, time /*, ...args */){ return set(invoke( partial, [].slice.call(arguments, 2), typeof fn == 'function' ? fn : Function(fn) ), time); } : set; }; $export($export.G + $export.B + $export.F * MSIE, { setTimeout: wrap(global.setTimeout), setInterval: wrap(global.setInterval) }); /***/ }, /* 274 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; var path = __webpack_require__(275) , invoke = __webpack_require__(74) , aFunction = __webpack_require__(9); module.exports = function(/* ...pargs */){ var fn = aFunction(this) , length = arguments.length , pargs = Array(length) , i = 0 , _ = path._ , holder = false; while(length > i)if((pargs[i] = arguments[i++]) === _)holder = true; return function(/* ...args */){ var that = this , aLen = arguments.length , j = 0, k = 0, args; if(!holder && !aLen)return invoke(fn, pargs, that); args = pargs.slice(); if(holder)for(;length > j; j++)if(args[j] === _)args[j] = arguments[k++]; while(aLen > k)args.push(arguments[k++]); return invoke(fn, args, that); }; }; /***/ }, /* 275 */ /***/ function(module, exports, __webpack_require__) { module.exports = __webpack_require__(7); /***/ }, /* 276 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; var ctx = __webpack_require__(8) , $export = __webpack_require__(6) , createDesc = __webpack_require__(17) , assign = __webpack_require__(67) , create = __webpack_require__(44) , getPrototypeOf = __webpack_require__(57) , getKeys = __webpack_require__(28) , dP = __webpack_require__(11) , keyOf = __webpack_require__(27) , aFunction = __webpack_require__(9) , forOf = __webpack_require__(185) , isIterable = __webpack_require__(277) , $iterCreate = __webpack_require__(131) , step = __webpack_require__(180) , isObject = __webpack_require__(13) , toIObject = __webpack_require__(30) , DESCRIPTORS = __webpack_require__(4) , has = __webpack_require__(3); // 0 -> Dict.forEach // 1 -> Dict.map // 2 -> Dict.filter // 3 -> Dict.some // 4 -> Dict.every // 5 -> Dict.find // 6 -> Dict.findKey // 7 -> Dict.mapPairs var createDictMethod = function(TYPE){ var IS_MAP = TYPE == 1 , IS_EVERY = TYPE == 4; return function(object, callbackfn, that /* = undefined */){ var f = ctx(callbackfn, that, 3) , O = toIObject(object) , result = IS_MAP || TYPE == 7 || TYPE == 2 ? new (typeof this == 'function' ? this : Dict) : undefined , key, val, res; for(key in O)if(has(O, key)){ val = O[key]; res = f(val, key, object); if(TYPE){ if(IS_MAP)result[key] = res; // map else if(res)switch(TYPE){ case 2: result[key] = val; break; // filter case 3: return true; // some case 5: return val; // find case 6: return key; // findKey case 7: result[res[0]] = res[1]; // mapPairs } else if(IS_EVERY)return false; // every } } return TYPE == 3 || IS_EVERY ? IS_EVERY : result; }; }; var findKey = createDictMethod(6); var createDictIter = function(kind){ return function(it){ return new DictIterator(it, kind); }; }; var DictIterator = function(iterated, kind){ this._t = toIObject(iterated); // target this._a = getKeys(iterated); // keys this._i = 0; // next index this._k = kind; // kind }; $iterCreate(DictIterator, 'Dict', function(){ var that = this , O = that._t , keys = that._a , kind = that._k , key; do { if(that._i >= keys.length){ that._t = undefined; return step(1); } } while(!has(O, key = keys[that._i++])); if(kind == 'keys' )return step(0, key); if(kind == 'values')return step(0, O[key]); return step(0, [key, O[key]]); }); function Dict(iterable){ var dict = create(null); if(iterable != undefined){ if(isIterable(iterable)){ forOf(iterable, true, function(key, value){ dict[key] = value; }); } else assign(dict, iterable); } return dict; } Dict.prototype = null; function reduce(object, mapfn, init){ aFunction(mapfn); var O = toIObject(object) , keys = getKeys(O) , length = keys.length , i = 0 , memo, key; if(arguments.length < 3){ if(!length)throw TypeError('Reduce of empty object with no initial value'); memo = O[keys[i++]]; } else memo = Object(init); while(length > i)if(has(O, key = keys[i++])){ memo = mapfn(memo, O[key], key, object); } return memo; } function includes(object, el){ return (el == el ? keyOf(object, el) : findKey(object, function(it){ return it != it; })) !== undefined; } function get(object, key){ if(has(object, key))return object[key]; } function set(object, key, value){ if(DESCRIPTORS && key in Object)dP.f(object, key, createDesc(0, value)); else object[key] = value; return object; } function isDict(it){ return isObject(it) && getPrototypeOf(it) === Dict.prototype; } $export($export.G + $export.F, {Dict: Dict}); $export($export.S, 'Dict', { keys: createDictIter('keys'), values: createDictIter('values'), entries: createDictIter('entries'), forEach: createDictMethod(0), map: createDictMethod(1), filter: createDictMethod(2), some: createDictMethod(3), every: createDictMethod(4), find: createDictMethod(5), findKey: findKey, mapPairs: createDictMethod(7), reduce: reduce, keyOf: keyOf, includes: includes, has: has, get: get, set: set, isDict: isDict }); /***/ }, /* 277 */ /***/ function(module, exports, __webpack_require__) { var classof = __webpack_require__(152) , ITERATOR = __webpack_require__(23)('iterator') , Iterators = __webpack_require__(130); module.exports = __webpack_require__(7).isIterable = function(it){ var O = Object(it); return O[ITERATOR] !== undefined || '@@iterator' in O || Iterators.hasOwnProperty(classof(O)); }; /***/ }, /* 278 */ /***/ function(module, exports, __webpack_require__) { var anObject = __webpack_require__(12) , get = __webpack_require__(151); module.exports = __webpack_require__(7).getIterator = function(it){ var iterFn = get(it); if(typeof iterFn != 'function')throw TypeError(it + ' is not iterable!'); return anObject(iterFn.call(it)); }; /***/ }, /* 279 */ /***/ function(module, exports, __webpack_require__) { var global = __webpack_require__(2) , core = __webpack_require__(7) , $export = __webpack_require__(6) , partial = __webpack_require__(274); // https://esdiscuss.org/topic/promise-returning-delay-function $export($export.G + $export.F, { delay: function delay(time){ return new (core.Promise || global.Promise)(function(resolve){ setTimeout(partial.call(resolve, true), time); }); } }); /***/ }, /* 280 */ /***/ function(module, exports, __webpack_require__) { var path = __webpack_require__(275) , $export = __webpack_require__(6); // Placeholder __webpack_require__(7)._ = path._ = path._ || {}; $export($export.P + $export.F, 'Function', {part: __webpack_require__(274)}); /***/ }, /* 281 */ /***/ function(module, exports, __webpack_require__) { var $export = __webpack_require__(6); $export($export.S + $export.F, 'Object', {isObject: __webpack_require__(13)}); /***/ }, /* 282 */ /***/ function(module, exports, __webpack_require__) { var $export = __webpack_require__(6); $export($export.S + $export.F, 'Object', {classof: __webpack_require__(152)}); /***/ }, /* 283 */ /***/ function(module, exports, __webpack_require__) { var $export = __webpack_require__(6) , define = __webpack_require__(284); $export($export.S + $export.F, 'Object', {define: define}); /***/ }, /* 284 */ /***/ function(module, exports, __webpack_require__) { var dP = __webpack_require__(11) , gOPD = __webpack_require__(49) , ownKeys = __webpack_require__(208) , toIObject = __webpack_require__(30); module.exports = function define(target, mixin){ var keys = ownKeys(toIObject(mixin)) , length = keys.length , i = 0, key; while(length > i)dP.f(target, key = keys[i++], gOPD.f(mixin, key)); return target; }; /***/ }, /* 285 */ /***/ function(module, exports, __webpack_require__) { var $export = __webpack_require__(6) , define = __webpack_require__(284) , create = __webpack_require__(44); $export($export.S + $export.F, 'Object', { make: function(proto, mixin){ return define(create(proto), mixin); } }); /***/ }, /* 286 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; __webpack_require__(129)(Number, 'Number', function(iterated){ this._l = +iterated; this._i = 0; }, function(){ var i = this._i++ , done = !(i < this._l); return {done: done, value: done ? undefined : i}; }); /***/ }, /* 287 */ /***/ function(module, exports, __webpack_require__) { // https://github.com/benjamingr/RexExp.escape var $export = __webpack_require__(6) , $re = __webpack_require__(288)(/[\\^$*+?.()|[\]{}]/g, '\\$&'); $export($export.S, 'RegExp', {escape: function escape(it){ return $re(it); }}); /***/ }, /* 288 */ /***/ function(module, exports) { module.exports = function(regExp, replace){ var replacer = replace === Object(replace) ? function(part){ return replace[part]; } : replace; return function(it){ return String(it).replace(regExp, replacer); }; }; /***/ }, /* 289 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; var $export = __webpack_require__(6); var $re = __webpack_require__(288)(/[&<>"']/g, { '&': '&', '<': '<', '>': '>', '"': '"', "'": ''' }); $export($export.P + $export.F, 'String', {escapeHTML: function escapeHTML(){ return $re(this); }}); /***/ }, /* 290 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; var $export = __webpack_require__(6); var $re = __webpack_require__(288)(/&(?:amp|lt|gt|quot|apos);/g, { '&': '&', '<': '<', '>': '>', '"': '"', ''': "'" }); $export($export.P + $export.F, 'String', {unescapeHTML: function unescapeHTML(){ return $re(this); }}); /***/ } /******/ ]); // CommonJS export if(typeof module != 'undefined' && module.exports)module.exports = __e; // RequireJS export else if(typeof define == 'function' && define.amd)define(function(){return __e}); // Export to global object else __g.core = __e; }(1, 1);core-js-2.4.1/client/library.min.js000066400000000000000000002260351274277553300171510ustar00rootroot00000000000000/** * core-js 2.4.1 * https://github.com/zloirock/core-js * License: http://rock.mit-license.org * © 2016 Denis Pushkarev */ !function(a,b,c){"use strict";!function(a){function __webpack_require__(c){if(b[c])return b[c].exports;var d=b[c]={exports:{},id:c,loaded:!1};return a[c].call(d.exports,d,d.exports,__webpack_require__),d.loaded=!0,d.exports}var b={};return __webpack_require__.m=a,__webpack_require__.c=b,__webpack_require__.p="",__webpack_require__(0)}([function(a,b,c){c(1),c(50),c(51),c(52),c(54),c(55),c(58),c(59),c(60),c(61),c(62),c(63),c(64),c(65),c(66),c(68),c(70),c(72),c(75),c(76),c(79),c(80),c(81),c(82),c(84),c(85),c(86),c(87),c(88),c(92),c(94),c(95),c(96),c(98),c(99),c(100),c(102),c(103),c(104),c(106),c(107),c(108),c(109),c(110),c(111),c(112),c(113),c(114),c(115),c(116),c(117),c(118),c(119),c(121),c(125),c(126),c(127),c(128),c(132),c(134),c(135),c(136),c(137),c(138),c(139),c(140),c(141),c(142),c(143),c(144),c(145),c(146),c(147),c(154),c(155),c(157),c(158),c(159),c(163),c(164),c(165),c(166),c(167),c(169),c(170),c(171),c(172),c(175),c(177),c(178),c(179),c(181),c(183),c(190),c(193),c(194),c(196),c(197),c(198),c(199),c(200),c(201),c(202),c(203),c(204),c(205),c(206),c(207),c(209),c(210),c(211),c(212),c(213),c(214),c(215),c(218),c(219),c(221),c(222),c(223),c(224),c(225),c(226),c(227),c(228),c(229),c(230),c(231),c(233),c(234),c(235),c(236),c(238),c(239),c(240),c(241),c(243),c(244),c(246),c(247),c(248),c(249),c(252),c(253),c(254),c(255),c(256),c(257),c(258),c(259),c(261),c(262),c(263),c(264),c(265),c(266),c(267),c(268),c(269),c(270),c(271),c(272),c(273),c(276),c(151),c(278),c(277),c(279),c(280),c(281),c(282),c(283),c(285),c(286),c(287),c(289),a.exports=c(290)},function(a,b,d){var e=d(2),f=d(3),g=d(4),h=d(6),i=d(18),j=d(19).KEY,k=d(5),l=d(21),m=d(22),n=d(20),o=d(23),p=d(24),q=d(25),r=d(27),s=d(40),t=d(43),u=d(12),v=d(30),w=d(16),x=d(17),y=d(44),z=d(47),A=d(49),B=d(11),C=d(28),D=A.f,E=B.f,F=z.f,G=e.Symbol,H=e.JSON,I=H&&H.stringify,J="prototype",K=o("_hidden"),L=o("toPrimitive"),M={}.propertyIsEnumerable,N=l("symbol-registry"),O=l("symbols"),P=l("op-symbols"),Q=Object[J],R="function"==typeof G,S=e.QObject,T=!S||!S[J]||!S[J].findChild,U=g&&k(function(){return 7!=y(E({},"a",{get:function(){return E(this,"a",{value:7}).a}})).a})?function(a,b,c){var d=D(Q,b);d&&delete Q[b],E(a,b,c),d&&a!==Q&&E(Q,b,d)}:E,V=function(a){var b=O[a]=y(G[J]);return b._k=a,b},W=R&&"symbol"==typeof G.iterator?function(a){return"symbol"==typeof a}:function(a){return a instanceof G},X=function defineProperty(a,b,c){return a===Q&&X(P,b,c),u(a),b=w(b,!0),u(c),f(O,b)?(c.enumerable?(f(a,K)&&a[K][b]&&(a[K][b]=!1),c=y(c,{enumerable:x(0,!1)})):(f(a,K)||E(a,K,x(1,{})),a[K][b]=!0),U(a,b,c)):E(a,b,c)},Y=function defineProperties(a,b){u(a);for(var c,d=s(b=v(b)),e=0,f=d.length;f>e;)X(a,c=d[e++],b[c]);return a},Z=function create(a,b){return b===c?y(a):Y(y(a),b)},$=function propertyIsEnumerable(a){var b=M.call(this,a=w(a,!0));return!(this===Q&&f(O,a)&&!f(P,a))&&(!(b||!f(this,a)||!f(O,a)||f(this,K)&&this[K][a])||b)},_=function getOwnPropertyDescriptor(a,b){if(a=v(a),b=w(b,!0),a!==Q||!f(O,b)||f(P,b)){var c=D(a,b);return!c||!f(O,b)||f(a,K)&&a[K][b]||(c.enumerable=!0),c}},aa=function getOwnPropertyNames(a){for(var b,c=F(v(a)),d=[],e=0;c.length>e;)f(O,b=c[e++])||b==K||b==j||d.push(b);return d},ba=function getOwnPropertySymbols(a){for(var b,c=a===Q,d=F(c?P:v(a)),e=[],g=0;d.length>g;)!f(O,b=d[g++])||c&&!f(Q,b)||e.push(O[b]);return e};R||(G=function Symbol(){if(this instanceof G)throw TypeError("Symbol is not a constructor!");var a=n(arguments.length>0?arguments[0]:c),b=function(c){this===Q&&b.call(P,c),f(this,K)&&f(this[K],a)&&(this[K][a]=!1),U(this,a,x(1,c))};return g&&T&&U(Q,a,{configurable:!0,set:b}),V(a)},i(G[J],"toString",function toString(){return this._k}),A.f=_,B.f=X,d(48).f=z.f=aa,d(42).f=$,d(41).f=ba,g&&!d(26)&&i(Q,"propertyIsEnumerable",$,!0),p.f=function(a){return V(o(a))}),h(h.G+h.W+h.F*!R,{Symbol:G});for(var ca="hasInstance,isConcatSpreadable,iterator,match,replace,search,species,split,toPrimitive,toStringTag,unscopables".split(","),da=0;ca.length>da;)o(ca[da++]);for(var ca=C(o.store),da=0;ca.length>da;)q(ca[da++]);h(h.S+h.F*!R,"Symbol",{"for":function(a){return f(N,a+="")?N[a]:N[a]=G(a)},keyFor:function keyFor(a){if(W(a))return r(N,a);throw TypeError(a+" is not a symbol!")},useSetter:function(){T=!0},useSimple:function(){T=!1}}),h(h.S+h.F*!R,"Object",{create:Z,defineProperty:X,defineProperties:Y,getOwnPropertyDescriptor:_,getOwnPropertyNames:aa,getOwnPropertySymbols:ba}),H&&h(h.S+h.F*(!R||k(function(){var a=G();return"[null]"!=I([a])||"{}"!=I({a:a})||"{}"!=I(Object(a))})),"JSON",{stringify:function stringify(a){if(a!==c&&!W(a)){for(var b,d,e=[a],f=1;arguments.length>f;)e.push(arguments[f++]);return b=e[1],"function"==typeof b&&(d=b),!d&&t(b)||(b=function(a,b){if(d&&(b=d.call(this,a,b)),!W(b))return b}),e[1]=b,I.apply(H,e)}}}),G[J][L]||d(10)(G[J],L,G[J].valueOf),m(G,"Symbol"),m(Math,"Math",!0),m(e.JSON,"JSON",!0)},function(a,c){var d=a.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof b&&(b=d)},function(a,b){var c={}.hasOwnProperty;a.exports=function(a,b){return c.call(a,b)}},function(a,b,c){a.exports=!c(5)(function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a})},function(a,b){a.exports=function(a){try{return!!a()}catch(b){return!0}}},function(a,b,d){var e=d(2),f=d(7),g=d(8),h=d(10),i="prototype",j=function(a,b,d){var k,l,m,n=a&j.F,o=a&j.G,p=a&j.S,q=a&j.P,r=a&j.B,s=a&j.W,t=o?f:f[b]||(f[b]={}),u=t[i],v=o?e:p?e[b]:(e[b]||{})[i];o&&(d=b);for(k in d)l=!n&&v&&v[k]!==c,l&&k in t||(m=l?v[k]:d[k],t[k]=o&&"function"!=typeof v[k]?d[k]:r&&l?g(m,e):s&&v[k]==m?function(a){var b=function(b,c,d){if(this instanceof a){switch(arguments.length){case 0:return new a;case 1:return new a(b);case 2:return new a(b,c)}return new a(b,c,d)}return a.apply(this,arguments)};return b[i]=a[i],b}(m):q&&"function"==typeof m?g(Function.call,m):m,q&&((t.virtual||(t.virtual={}))[k]=m,a&j.R&&u&&!u[k]&&h(u,k,m)))};j.F=1,j.G=2,j.S=4,j.P=8,j.B=16,j.W=32,j.U=64,j.R=128,a.exports=j},function(b,c){var d=b.exports={version:"2.4.0"};"number"==typeof a&&(a=d)},function(a,b,d){var e=d(9);a.exports=function(a,b,d){if(e(a),b===c)return a;switch(d){case 1:return function(c){return a.call(b,c)};case 2:return function(c,d){return a.call(b,c,d)};case 3:return function(c,d,e){return a.call(b,c,d,e)}}return function(){return a.apply(b,arguments)}}},function(a,b){a.exports=function(a){if("function"!=typeof a)throw TypeError(a+" is not a function!");return a}},function(a,b,c){var d=c(11),e=c(17);a.exports=c(4)?function(a,b,c){return d.f(a,b,e(1,c))}:function(a,b,c){return a[b]=c,a}},function(a,b,c){var d=c(12),e=c(14),f=c(16),g=Object.defineProperty;b.f=c(4)?Object.defineProperty:function defineProperty(a,b,c){if(d(a),b=f(b,!0),d(c),e)try{return g(a,b,c)}catch(h){}if("get"in c||"set"in c)throw TypeError("Accessors not supported!");return"value"in c&&(a[b]=c.value),a}},function(a,b,c){var d=c(13);a.exports=function(a){if(!d(a))throw TypeError(a+" is not an object!");return a}},function(a,b){a.exports=function(a){return"object"==typeof a?null!==a:"function"==typeof a}},function(a,b,c){a.exports=!c(4)&&!c(5)(function(){return 7!=Object.defineProperty(c(15)("div"),"a",{get:function(){return 7}}).a})},function(a,b,c){var d=c(13),e=c(2).document,f=d(e)&&d(e.createElement);a.exports=function(a){return f?e.createElement(a):{}}},function(a,b,c){var d=c(13);a.exports=function(a,b){if(!d(a))return a;var c,e;if(b&&"function"==typeof(c=a.toString)&&!d(e=c.call(a)))return e;if("function"==typeof(c=a.valueOf)&&!d(e=c.call(a)))return e;if(!b&&"function"==typeof(c=a.toString)&&!d(e=c.call(a)))return e;throw TypeError("Can't convert object to primitive value")}},function(a,b){a.exports=function(a,b){return{enumerable:!(1&a),configurable:!(2&a),writable:!(4&a),value:b}}},function(a,b,c){a.exports=c(10)},function(a,b,c){var d=c(20)("meta"),e=c(13),f=c(3),g=c(11).f,h=0,i=Object.isExtensible||function(){return!0},j=!c(5)(function(){return i(Object.preventExtensions({}))}),k=function(a){g(a,d,{value:{i:"O"+ ++h,w:{}}})},l=function(a,b){if(!e(a))return"symbol"==typeof a?a:("string"==typeof a?"S":"P")+a;if(!f(a,d)){if(!i(a))return"F";if(!b)return"E";k(a)}return a[d].i},m=function(a,b){if(!f(a,d)){if(!i(a))return!0;if(!b)return!1;k(a)}return a[d].w},n=function(a){return j&&o.NEED&&i(a)&&!f(a,d)&&k(a),a},o=a.exports={KEY:d,NEED:!1,fastKey:l,getWeak:m,onFreeze:n}},function(a,b){var d=0,e=Math.random();a.exports=function(a){return"Symbol(".concat(a===c?"":a,")_",(++d+e).toString(36))}},function(a,b,c){var d=c(2),e="__core-js_shared__",f=d[e]||(d[e]={});a.exports=function(a){return f[a]||(f[a]={})}},function(a,b,c){var d=c(11).f,e=c(3),f=c(23)("toStringTag");a.exports=function(a,b,c){a&&!e(a=c?a:a.prototype,f)&&d(a,f,{configurable:!0,value:b})}},function(a,b,c){var d=c(21)("wks"),e=c(20),f=c(2).Symbol,g="function"==typeof f,h=a.exports=function(a){return d[a]||(d[a]=g&&f[a]||(g?f:e)("Symbol."+a))};h.store=d},function(a,b,c){b.f=c(23)},function(a,b,c){var d=c(2),e=c(7),f=c(26),g=c(24),h=c(11).f;a.exports=function(a){var b=e.Symbol||(e.Symbol=f?{}:d.Symbol||{});"_"==a.charAt(0)||a in b||h(b,a,{value:g.f(a)})}},function(a,b){a.exports=!0},function(a,b,c){var d=c(28),e=c(30);a.exports=function(a,b){for(var c,f=e(a),g=d(f),h=g.length,i=0;h>i;)if(f[c=g[i++]]===b)return c}},function(a,b,c){var d=c(29),e=c(39);a.exports=Object.keys||function keys(a){return d(a,e)}},function(a,b,c){var d=c(3),e=c(30),f=c(34)(!1),g=c(38)("IE_PROTO");a.exports=function(a,b){var c,h=e(a),i=0,j=[];for(c in h)c!=g&&d(h,c)&&j.push(c);for(;b.length>i;)d(h,c=b[i++])&&(~f(j,c)||j.push(c));return j}},function(a,b,c){var d=c(31),e=c(33);a.exports=function(a){return d(e(a))}},function(a,b,c){var d=c(32);a.exports=Object("z").propertyIsEnumerable(0)?Object:function(a){return"String"==d(a)?a.split(""):Object(a)}},function(a,b){var c={}.toString;a.exports=function(a){return c.call(a).slice(8,-1)}},function(a,b){a.exports=function(a){if(a==c)throw TypeError("Can't call method on "+a);return a}},function(a,b,c){var d=c(30),e=c(35),f=c(37);a.exports=function(a){return function(b,c,g){var h,i=d(b),j=e(i.length),k=f(g,j);if(a&&c!=c){for(;j>k;)if(h=i[k++],h!=h)return!0}else for(;j>k;k++)if((a||k in i)&&i[k]===c)return a||k||0;return!a&&-1}}},function(a,b,c){var d=c(36),e=Math.min;a.exports=function(a){return a>0?e(d(a),9007199254740991):0}},function(a,b){var c=Math.ceil,d=Math.floor;a.exports=function(a){return isNaN(a=+a)?0:(a>0?d:c)(a)}},function(a,b,c){var d=c(36),e=Math.max,f=Math.min;a.exports=function(a,b){return a=d(a),a<0?e(a+b,0):f(a,b)}},function(a,b,c){var d=c(21)("keys"),e=c(20);a.exports=function(a){return d[a]||(d[a]=e(a))}},function(a,b){a.exports="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(",")},function(a,b,c){var d=c(28),e=c(41),f=c(42);a.exports=function(a){var b=d(a),c=e.f;if(c)for(var g,h=c(a),i=f.f,j=0;h.length>j;)i.call(a,g=h[j++])&&b.push(g);return b}},function(a,b){b.f=Object.getOwnPropertySymbols},function(a,b){b.f={}.propertyIsEnumerable},function(a,b,c){var d=c(32);a.exports=Array.isArray||function isArray(a){return"Array"==d(a)}},function(a,b,d){var e=d(12),f=d(45),g=d(39),h=d(38)("IE_PROTO"),i=function(){},j="prototype",k=function(){var a,b=d(15)("iframe"),c=g.length,e="<",f=">";for(b.style.display="none",d(46).appendChild(b),b.src="javascript:",a=b.contentWindow.document,a.open(),a.write(e+"script"+f+"document.F=Object"+e+"/script"+f),a.close(),k=a.F;c--;)delete k[j][g[c]];return k()};a.exports=Object.create||function create(a,b){var d;return null!==a?(i[j]=e(a),d=new i,i[j]=null,d[h]=a):d=k(),b===c?d:f(d,b)}},function(a,b,c){var d=c(11),e=c(12),f=c(28);a.exports=c(4)?Object.defineProperties:function defineProperties(a,b){e(a);for(var c,g=f(b),h=g.length,i=0;h>i;)d.f(a,c=g[i++],b[c]);return a}},function(a,b,c){a.exports=c(2).document&&document.documentElement},function(a,b,c){var d=c(30),e=c(48).f,f={}.toString,g="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],h=function(a){try{return e(a)}catch(b){return g.slice()}};a.exports.f=function getOwnPropertyNames(a){return g&&"[object Window]"==f.call(a)?h(a):e(d(a))}},function(a,b,c){var d=c(29),e=c(39).concat("length","prototype");b.f=Object.getOwnPropertyNames||function getOwnPropertyNames(a){return d(a,e)}},function(a,b,c){var d=c(42),e=c(17),f=c(30),g=c(16),h=c(3),i=c(14),j=Object.getOwnPropertyDescriptor;b.f=c(4)?j:function getOwnPropertyDescriptor(a,b){if(a=f(a),b=g(b,!0),i)try{return j(a,b)}catch(c){}if(h(a,b))return e(!d.f.call(a,b),a[b])}},function(a,b,c){var d=c(6);d(d.S+d.F*!c(4),"Object",{defineProperty:c(11).f})},function(a,b,c){var d=c(6);d(d.S+d.F*!c(4),"Object",{defineProperties:c(45)})},function(a,b,c){var d=c(30),e=c(49).f;c(53)("getOwnPropertyDescriptor",function(){return function getOwnPropertyDescriptor(a,b){return e(d(a),b)}})},function(a,b,c){var d=c(6),e=c(7),f=c(5);a.exports=function(a,b){var c=(e.Object||{})[a]||Object[a],g={};g[a]=b(c),d(d.S+d.F*f(function(){c(1)}),"Object",g)}},function(a,b,c){var d=c(6);d(d.S,"Object",{create:c(44)})},function(a,b,c){var d=c(56),e=c(57);c(53)("getPrototypeOf",function(){return function getPrototypeOf(a){return e(d(a))}})},function(a,b,c){var d=c(33);a.exports=function(a){return Object(d(a))}},function(a,b,c){var d=c(3),e=c(56),f=c(38)("IE_PROTO"),g=Object.prototype;a.exports=Object.getPrototypeOf||function(a){return a=e(a),d(a,f)?a[f]:"function"==typeof a.constructor&&a instanceof a.constructor?a.constructor.prototype:a instanceof Object?g:null}},function(a,b,c){var d=c(56),e=c(28);c(53)("keys",function(){return function keys(a){return e(d(a))}})},function(a,b,c){c(53)("getOwnPropertyNames",function(){return c(47).f})},function(a,b,c){var d=c(13),e=c(19).onFreeze;c(53)("freeze",function(a){return function freeze(b){return a&&d(b)?a(e(b)):b}})},function(a,b,c){var d=c(13),e=c(19).onFreeze;c(53)("seal",function(a){return function seal(b){return a&&d(b)?a(e(b)):b}})},function(a,b,c){var d=c(13),e=c(19).onFreeze;c(53)("preventExtensions",function(a){return function preventExtensions(b){return a&&d(b)?a(e(b)):b}})},function(a,b,c){var d=c(13);c(53)("isFrozen",function(a){return function isFrozen(b){return!d(b)||!!a&&a(b)}})},function(a,b,c){var d=c(13);c(53)("isSealed",function(a){return function isSealed(b){return!d(b)||!!a&&a(b)}})},function(a,b,c){var d=c(13);c(53)("isExtensible",function(a){return function isExtensible(b){return!!d(b)&&(!a||a(b))}})},function(a,b,c){var d=c(6);d(d.S+d.F,"Object",{assign:c(67)})},function(a,b,c){var d=c(28),e=c(41),f=c(42),g=c(56),h=c(31),i=Object.assign;a.exports=!i||c(5)(function(){var a={},b={},c=Symbol(),d="abcdefghijklmnopqrst";return a[c]=7,d.split("").forEach(function(a){b[a]=a}),7!=i({},a)[c]||Object.keys(i({},b)).join("")!=d})?function assign(a,b){for(var c=g(a),i=arguments.length,j=1,k=e.f,l=f.f;i>j;)for(var m,n=h(arguments[j++]),o=k?d(n).concat(k(n)):d(n),p=o.length,q=0;p>q;)l.call(n,m=o[q++])&&(c[m]=n[m]);return c}:i},function(a,b,c){var d=c(6);d(d.S,"Object",{is:c(69)})},function(a,b){a.exports=Object.is||function is(a,b){return a===b?0!==a||1/a===1/b:a!=a&&b!=b}},function(a,b,c){var d=c(6);d(d.S,"Object",{setPrototypeOf:c(71).set})},function(a,b,d){var e=d(13),f=d(12),g=function(a,b){if(f(a),!e(b)&&null!==b)throw TypeError(b+": can't set as prototype!")};a.exports={set:Object.setPrototypeOf||("__proto__"in{}?function(a,b,c){try{c=d(8)(Function.call,d(49).f(Object.prototype,"__proto__").set,2),c(a,[]),b=!(a instanceof Array)}catch(e){b=!0}return function setPrototypeOf(a,d){return g(a,d),b?a.__proto__=d:c(a,d),a}}({},!1):c),check:g}},function(a,b,c){var d=c(6);d(d.P,"Function",{bind:c(73)})},function(a,b,c){var d=c(9),e=c(13),f=c(74),g=[].slice,h={},i=function(a,b,c){if(!(b in h)){for(var d=[],e=0;e=0;)c+=j[b],j[b]=i(c/a),c=c%a*1e7},o=function(){for(var a=6,b="";--a>=0;)if(""!==b||0===a||0!==j[a]){var c=String(j[a]);b=""===b?c:b+g.call(l,7-c.length)+c}return b},p=function(a,b,c){return 0===b?c:b%2===1?p(a,b-1,c*a):p(a*a,b/2,c)},q=function(a){for(var b=0,c=a;c>=4096;)b+=12,c/=4096;for(;c>=2;)b+=1,c/=2;return b};d(d.P+d.F*(!!h&&("0.000"!==8e-5.toFixed(3)||"1"!==.9.toFixed(0)||"1.25"!==1.255.toFixed(2)||"1000000000000000128"!==(0xde0b6b3a7640080).toFixed(0))||!c(5)(function(){h.call({})})),"Number",{toFixed:function toFixed(a){var b,c,d,h,i=f(this,k),j=e(a),r="",s=l;if(j<0||j>20)throw RangeError(k);if(i!=i)return"NaN";if(i<=-1e21||i>=1e21)return String(i);if(i<0&&(r="-",i=-i),i>1e-21)if(b=q(i*p(2,69,1))-69,c=b<0?i*p(2,-b,1):i/p(2,b,1),c*=4503599627370496,b=52-b,b>0){for(m(0,c),d=j;d>=7;)m(1e7,0),d-=7;for(m(p(10,d,1),0),d=b-1;d>=23;)n(1<<23),d-=23;n(1<0?(h=s.length,s=r+(h<=j?"0."+g.call(l,j-h)+s:s.slice(0,h-j)+"."+s.slice(h-j))):s=r+s,s}})},function(a,b,c){var d=c(32);a.exports=function(a,b){if("number"!=typeof a&&"Number"!=d(a))throw TypeError(b);return+a}},function(a,b,c){var d=c(36),e=c(33);a.exports=function repeat(a){var b=String(e(this)),c="",f=d(a);if(f<0||f==1/0)throw RangeError("Count can't be negative");for(;f>0;(f>>>=1)&&(b+=b))1&f&&(c+=b);return c}},function(a,b,d){var e=d(6),f=d(5),g=d(77),h=1..toPrecision;e(e.P+e.F*(f(function(){return"1"!==h.call(1,c)})||!f(function(){h.call({})})),"Number",{toPrecision:function toPrecision(a){var b=g(this,"Number#toPrecision: incorrect invocation!");return a===c?h.call(b):h.call(b,a)}})},function(a,b,c){var d=c(6);d(d.S,"Number",{EPSILON:Math.pow(2,-52)})},function(a,b,c){var d=c(6),e=c(2).isFinite;d(d.S,"Number",{isFinite:function isFinite(a){return"number"==typeof a&&e(a)}})},function(a,b,c){var d=c(6);d(d.S,"Number",{isInteger:c(83)})},function(a,b,c){var d=c(13),e=Math.floor;a.exports=function isInteger(a){return!d(a)&&isFinite(a)&&e(a)===a}},function(a,b,c){var d=c(6);d(d.S,"Number",{isNaN:function isNaN(a){return a!=a}})},function(a,b,c){var d=c(6),e=c(83),f=Math.abs;d(d.S,"Number",{isSafeInteger:function isSafeInteger(a){return e(a)&&f(a)<=9007199254740991}})},function(a,b,c){var d=c(6);d(d.S,"Number",{MAX_SAFE_INTEGER:9007199254740991})},function(a,b,c){var d=c(6);d(d.S,"Number",{MIN_SAFE_INTEGER:-9007199254740991})},function(a,b,c){var d=c(6),e=c(89);d(d.S+d.F*(Number.parseFloat!=e),"Number",{parseFloat:e})},function(a,b,c){var d=c(2).parseFloat,e=c(90).trim;a.exports=1/d(c(91)+"-0")!==-(1/0)?function parseFloat(a){var b=e(String(a),3),c=d(b);return 0===c&&"-"==b.charAt(0)?-0:c}:d},function(a,b,c){var d=c(6),e=c(33),f=c(5),g=c(91),h="["+g+"]",i="​…",j=RegExp("^"+h+h+"*"),k=RegExp(h+h+"*$"),l=function(a,b,c){var e={},h=f(function(){return!!g[a]()||i[a]()!=i}),j=e[a]=h?b(m):g[a];c&&(e[c]=j),d(d.P+d.F*h,"String",e)},m=l.trim=function(a,b){return a=String(e(a)),1&b&&(a=a.replace(j,"")),2&b&&(a=a.replace(k,"")),a};a.exports=l},function(a,b){a.exports="\t\n\x0B\f\r   ᠎              \u2028\u2029\ufeff"},function(a,b,c){var d=c(6),e=c(93);d(d.S+d.F*(Number.parseInt!=e),"Number",{parseInt:e})},function(a,b,c){var d=c(2).parseInt,e=c(90).trim,f=c(91),g=/^[\-+]?0[xX]/;a.exports=8!==d(f+"08")||22!==d(f+"0x16")?function parseInt(a,b){var c=e(String(a),3);return d(c,b>>>0||(g.test(c)?16:10))}:d},function(a,b,c){var d=c(6),e=c(93);d(d.G+d.F*(parseInt!=e),{parseInt:e})},function(a,b,c){var d=c(6),e=c(89);d(d.G+d.F*(parseFloat!=e),{parseFloat:e})},function(a,b,c){var d=c(6),e=c(97),f=Math.sqrt,g=Math.acosh;d(d.S+d.F*!(g&&710==Math.floor(g(Number.MAX_VALUE))&&g(1/0)==1/0),"Math",{acosh:function acosh(a){return(a=+a)<1?NaN:a>94906265.62425156?Math.log(a)+Math.LN2:e(a-1+f(a-1)*f(a+1))}})},function(a,b){a.exports=Math.log1p||function log1p(a){return(a=+a)>-1e-8&&a<1e-8?a-a*a/2:Math.log(1+a)}},function(a,b,c){function asinh(a){return isFinite(a=+a)&&0!=a?a<0?-asinh(-a):Math.log(a+Math.sqrt(a*a+1)):a}var d=c(6),e=Math.asinh;d(d.S+d.F*!(e&&1/e(0)>0),"Math",{asinh:asinh})},function(a,b,c){var d=c(6),e=Math.atanh;d(d.S+d.F*!(e&&1/e(-0)<0),"Math",{atanh:function atanh(a){return 0==(a=+a)?a:Math.log((1+a)/(1-a))/2}})},function(a,b,c){var d=c(6),e=c(101);d(d.S,"Math",{cbrt:function cbrt(a){return e(a=+a)*Math.pow(Math.abs(a),1/3)}})},function(a,b){a.exports=Math.sign||function sign(a){return 0==(a=+a)||a!=a?a:a<0?-1:1}},function(a,b,c){var d=c(6);d(d.S,"Math",{clz32:function clz32(a){return(a>>>=0)?31-Math.floor(Math.log(a+.5)*Math.LOG2E):32}})},function(a,b,c){var d=c(6),e=Math.exp;d(d.S,"Math",{cosh:function cosh(a){return(e(a=+a)+e(-a))/2}})},function(a,b,c){var d=c(6),e=c(105);d(d.S+d.F*(e!=Math.expm1),"Math",{expm1:e})},function(a,b){var c=Math.expm1;a.exports=!c||c(10)>22025.465794806718||c(10)<22025.465794806718||c(-2e-17)!=-2e-17?function expm1(a){return 0==(a=+a)?a:a>-1e-6&&a<1e-6?a+a*a/2:Math.exp(a)-1}:c},function(a,b,c){var d=c(6),e=c(101),f=Math.pow,g=f(2,-52),h=f(2,-23),i=f(2,127)*(2-h),j=f(2,-126),k=function(a){return a+1/g-1/g};d(d.S,"Math",{fround:function fround(a){var b,c,d=Math.abs(a),f=e(a);return di||c!=c?f*(1/0):f*c)}})},function(a,b,c){var d=c(6),e=Math.abs;d(d.S,"Math",{hypot:function hypot(a,b){for(var c,d,f=0,g=0,h=arguments.length,i=0;g0?(d=c/i,f+=d*d):f+=c;return i===1/0?1/0:i*Math.sqrt(f)}})},function(a,b,c){var d=c(6),e=Math.imul;d(d.S+d.F*c(5)(function(){return e(4294967295,5)!=-5||2!=e.length}),"Math",{imul:function imul(a,b){var c=65535,d=+a,e=+b,f=c&d,g=c&e;return 0|f*g+((c&d>>>16)*g+f*(c&e>>>16)<<16>>>0)}})},function(a,b,c){var d=c(6);d(d.S,"Math",{log10:function log10(a){return Math.log(a)/Math.LN10}})},function(a,b,c){var d=c(6);d(d.S,"Math",{log1p:c(97)})},function(a,b,c){var d=c(6);d(d.S,"Math",{log2:function log2(a){return Math.log(a)/Math.LN2}})},function(a,b,c){var d=c(6);d(d.S,"Math",{sign:c(101)})},function(a,b,c){var d=c(6),e=c(105),f=Math.exp;d(d.S+d.F*c(5)(function(){return!Math.sinh(-2e-17)!=-2e-17}),"Math",{sinh:function sinh(a){return Math.abs(a=+a)<1?(e(a)-e(-a))/2:(f(a-1)-f(-a-1))*(Math.E/2)}})},function(a,b,c){var d=c(6),e=c(105),f=Math.exp;d(d.S,"Math",{tanh:function tanh(a){var b=e(a=+a),c=e(-a);return b==1/0?1:c==1/0?-1:(b-c)/(f(a)+f(-a))}})},function(a,b,c){var d=c(6);d(d.S,"Math",{trunc:function trunc(a){return(a>0?Math.floor:Math.ceil)(a)}})},function(a,b,c){var d=c(6),e=c(37),f=String.fromCharCode,g=String.fromCodePoint;d(d.S+d.F*(!!g&&1!=g.length),"String",{fromCodePoint:function fromCodePoint(a){for(var b,c=[],d=arguments.length,g=0;d>g;){if(b=+arguments[g++],e(b,1114111)!==b)throw RangeError(b+" is not a valid code point");c.push(b<65536?f(b):f(((b-=65536)>>10)+55296,b%1024+56320))}return c.join("")}})},function(a,b,c){var d=c(6),e=c(30),f=c(35);d(d.S,"String",{raw:function raw(a){for(var b=e(a.raw),c=f(b.length),d=arguments.length,g=[],h=0;c>h;)g.push(String(b[h++])),h=k?a?"":c:(g=i.charCodeAt(j),g<55296||g>56319||j+1===k||(h=i.charCodeAt(j+1))<56320||h>57343?a?i.charAt(j):g:a?i.slice(j,j+2):(g-55296<<10)+(h-56320)+65536)}}},function(a,b,d){var e=d(6),f=d(35),g=d(122),h="endsWith",i=""[h];e(e.P+e.F*d(124)(h),"String",{endsWith:function endsWith(a){var b=g(this,a,h),d=arguments.length>1?arguments[1]:c,e=f(b.length),j=d===c?e:Math.min(f(d),e),k=String(a);return i?i.call(b,k,j):b.slice(j-k.length,j)===k}})},function(a,b,c){var d=c(123),e=c(33);a.exports=function(a,b,c){if(d(b))throw TypeError("String#"+c+" doesn't accept regex!");return String(e(a))}},function(a,b,d){var e=d(13),f=d(32),g=d(23)("match");a.exports=function(a){var b;return e(a)&&((b=a[g])!==c?!!b:"RegExp"==f(a))}},function(a,b,c){var d=c(23)("match");a.exports=function(a){var b=/./;try{"/./"[a](b)}catch(c){try{return b[d]=!1,!"/./"[a](b)}catch(e){}}return!0}},function(a,b,d){var e=d(6),f=d(122),g="includes";e(e.P+e.F*d(124)(g),"String",{includes:function includes(a){return!!~f(this,a,g).indexOf(a,arguments.length>1?arguments[1]:c)}})},function(a,b,c){var d=c(6);d(d.P,"String",{repeat:c(78)})},function(a,b,d){var e=d(6),f=d(35),g=d(122),h="startsWith",i=""[h];e(e.P+e.F*d(124)(h),"String",{startsWith:function startsWith(a){var b=g(this,a,h),d=f(Math.min(arguments.length>1?arguments[1]:c,b.length)),e=String(a);return i?i.call(b,e,d):b.slice(d,d+e.length)===e}})},function(a,b,d){var e=d(120)(!0);d(129)(String,"String",function(a){this._t=String(a),this._i=0},function(){var a,b=this._t,d=this._i;return d>=b.length?{value:c,done:!0}:(a=e(b,d),this._i+=a.length,{value:a,done:!1})})},function(a,b,d){var e=d(26),f=d(6),g=d(18),h=d(10),i=d(3),j=d(130),k=d(131),l=d(22),m=d(57),n=d(23)("iterator"),o=!([].keys&&"next"in[].keys()),p="@@iterator",q="keys",r="values",s=function(){return this};a.exports=function(a,b,d,t,u,v,w){k(d,b,t);var x,y,z,A=function(a){if(!o&&a in E)return E[a];switch(a){case q:return function keys(){return new d(this,a)};case r:return function values(){return new d(this,a)}}return function entries(){return new d(this,a)}},B=b+" Iterator",C=u==r,D=!1,E=a.prototype,F=E[n]||E[p]||u&&E[u],G=F||A(u),H=u?C?A("entries"):G:c,I="Array"==b?E.entries||F:F;if(I&&(z=m(I.call(new a)),z!==Object.prototype&&(l(z,B,!0),e||i(z,n)||h(z,n,s))),C&&F&&F.name!==r&&(D=!0,G=function values(){return F.call(this)}),e&&!w||!o&&!D&&E[n]||h(E,n,G),j[b]=G,j[B]=s,u)if(x={values:C?G:A(r),keys:v?G:A(q),entries:H},w)for(y in x)y in E||g(E,y,x[y]);else f(f.P+f.F*(o||D),b,x);return x}},function(a,b){a.exports={}},function(a,b,c){var d=c(44),e=c(17),f=c(22),g={};c(10)(g,c(23)("iterator"),function(){return this}),a.exports=function(a,b,c){a.prototype=d(g,{next:e(1,c)}),f(a,b+" Iterator")}},function(a,b,c){c(133)("anchor",function(a){return function anchor(b){return a(this,"a","name",b)}})},function(a,b,c){var d=c(6),e=c(5),f=c(33),g=/"/g,h=function(a,b,c,d){var e=String(f(a)),h="<"+b;return""!==c&&(h+=" "+c+'="'+String(d).replace(g,""")+'"'),h+">"+e+""};a.exports=function(a,b){var c={};c[a]=b(h),d(d.P+d.F*e(function(){var b=""[a]('"');return b!==b.toLowerCase()||b.split('"').length>3}),"String",c)}},function(a,b,c){c(133)("big",function(a){return function big(){return a(this,"big","","")}})},function(a,b,c){c(133)("blink",function(a){return function blink(){return a(this,"blink","","")}})},function(a,b,c){c(133)("bold",function(a){return function bold(){return a(this,"b","","")}})},function(a,b,c){c(133)("fixed",function(a){return function fixed(){return a(this,"tt","","")}})},function(a,b,c){c(133)("fontcolor",function(a){return function fontcolor(b){return a(this,"font","color",b)}})},function(a,b,c){c(133)("fontsize",function(a){return function fontsize(b){return a(this,"font","size",b)}})},function(a,b,c){c(133)("italics",function(a){return function italics(){return a(this,"i","","")}})},function(a,b,c){c(133)("link",function(a){return function link(b){return a(this,"a","href",b)}})},function(a,b,c){c(133)("small",function(a){return function small(){return a(this,"small","","")}})},function(a,b,c){c(133)("strike",function(a){return function strike(){return a(this,"strike","","")}})},function(a,b,c){c(133)("sub",function(a){return function sub(){return a(this,"sub","","")}})},function(a,b,c){c(133)("sup",function(a){return function sup(){return a(this,"sup","","")}})},function(a,b,c){var d=c(6);d(d.S,"Array",{isArray:c(43)})},function(a,b,d){var e=d(8),f=d(6),g=d(56),h=d(148),i=d(149),j=d(35),k=d(150),l=d(151);f(f.S+f.F*!d(153)(function(a){Array.from(a)}),"Array",{from:function from(a){var b,d,f,m,n=g(a),o="function"==typeof this?this:Array,p=arguments.length,q=p>1?arguments[1]:c,r=q!==c,s=0,t=l(n);if(r&&(q=e(q,p>2?arguments[2]:c,2)),t==c||o==Array&&i(t))for(b=j(n.length),d=new o(b);b>s;s++)k(d,s,r?q(n[s],s):n[s]);else for(m=t.call(n),d=new o;!(f=m.next()).done;s++)k(d,s,r?h(m,q,[f.value,s],!0):f.value);return d.length=s,d}})},function(a,b,d){var e=d(12);a.exports=function(a,b,d,f){try{return f?b(e(d)[0],d[1]):b(d)}catch(g){var h=a["return"];throw h!==c&&e(h.call(a)),g}}},function(a,b,d){var e=d(130),f=d(23)("iterator"),g=Array.prototype;a.exports=function(a){return a!==c&&(e.Array===a||g[f]===a)}},function(a,b,c){var d=c(11),e=c(17);a.exports=function(a,b,c){b in a?d.f(a,b,e(0,c)):a[b]=c}},function(a,b,d){var e=d(152),f=d(23)("iterator"),g=d(130);a.exports=d(7).getIteratorMethod=function(a){if(a!=c)return a[f]||a["@@iterator"]||g[e(a)]}},function(a,b,d){var e=d(32),f=d(23)("toStringTag"),g="Arguments"==e(function(){return arguments}()),h=function(a,b){try{return a[b]}catch(c){}};a.exports=function(a){var b,d,i;return a===c?"Undefined":null===a?"Null":"string"==typeof(d=h(b=Object(a),f))?d:g?e(b):"Object"==(i=e(b))&&"function"==typeof b.callee?"Arguments":i}},function(a,b,c){var d=c(23)("iterator"),e=!1;try{var f=[7][d]();f["return"]=function(){e=!0},Array.from(f,function(){throw 2})}catch(g){}a.exports=function(a,b){if(!b&&!e)return!1;var c=!1;try{var f=[7],g=f[d]();g.next=function(){return{done:c=!0}},f[d]=function(){return g},a(f)}catch(h){}return c}},function(a,b,c){var d=c(6),e=c(150);d(d.S+d.F*c(5)(function(){function F(){}return!(Array.of.call(F)instanceof F)}),"Array",{of:function of(){for(var a=0,b=arguments.length,c=new("function"==typeof this?this:Array)(b);b>a;)e(c,a,arguments[a++]);return c.length=b,c}})},function(a,b,d){var e=d(6),f=d(30),g=[].join;e(e.P+e.F*(d(31)!=Object||!d(156)(g)),"Array",{join:function join(a){return g.call(f(this),a===c?",":a)}})},function(a,b,c){var d=c(5);a.exports=function(a,b){return!!a&&d(function(){b?a.call(null,function(){},1):a.call(null)})}},function(a,b,d){var e=d(6),f=d(46),g=d(32),h=d(37),i=d(35),j=[].slice;e(e.P+e.F*d(5)(function(){f&&j.call(f)}),"Array",{slice:function slice(a,b){var d=i(this.length),e=g(this);if(b=b===c?d:b,"Array"==e)return j.call(this,a,b);for(var f=h(a,d),k=h(b,d),l=i(k-f),m=Array(l),n=0;nw;w++)if((n||w in t)&&(q=t[w],r=u(q,w,s),a))if(d)x[w]=r;else if(r)switch(a){case 3:return!0;case 5: return q;case 6:return w;case 2:x.push(q)}else if(l)return!1;return m?-1:k||l?l:x}}},function(a,b,c){var d=c(162);a.exports=function(a,b){return new(d(a))(b)}},function(a,b,d){var e=d(13),f=d(43),g=d(23)("species");a.exports=function(a){var b;return f(a)&&(b=a.constructor,"function"!=typeof b||b!==Array&&!f(b.prototype)||(b=c),e(b)&&(b=b[g],null===b&&(b=c))),b===c?Array:b}},function(a,b,c){var d=c(6),e=c(160)(1);d(d.P+d.F*!c(156)([].map,!0),"Array",{map:function map(a){return e(this,a,arguments[1])}})},function(a,b,c){var d=c(6),e=c(160)(2);d(d.P+d.F*!c(156)([].filter,!0),"Array",{filter:function filter(a){return e(this,a,arguments[1])}})},function(a,b,c){var d=c(6),e=c(160)(3);d(d.P+d.F*!c(156)([].some,!0),"Array",{some:function some(a){return e(this,a,arguments[1])}})},function(a,b,c){var d=c(6),e=c(160)(4);d(d.P+d.F*!c(156)([].every,!0),"Array",{every:function every(a){return e(this,a,arguments[1])}})},function(a,b,c){var d=c(6),e=c(168);d(d.P+d.F*!c(156)([].reduce,!0),"Array",{reduce:function reduce(a){return e(this,a,arguments.length,arguments[1],!1)}})},function(a,b,c){var d=c(9),e=c(56),f=c(31),g=c(35);a.exports=function(a,b,c,h,i){d(b);var j=e(a),k=f(j),l=g(j.length),m=i?l-1:0,n=i?-1:1;if(c<2)for(;;){if(m in k){h=k[m],m+=n;break}if(m+=n,i?m<0:l<=m)throw TypeError("Reduce of empty array with no initial value")}for(;i?m>=0:l>m;m+=n)m in k&&(h=b(h,k[m],m,j));return h}},function(a,b,c){var d=c(6),e=c(168);d(d.P+d.F*!c(156)([].reduceRight,!0),"Array",{reduceRight:function reduceRight(a){return e(this,a,arguments.length,arguments[1],!0)}})},function(a,b,c){var d=c(6),e=c(34)(!1),f=[].indexOf,g=!!f&&1/[1].indexOf(1,-0)<0;d(d.P+d.F*(g||!c(156)(f)),"Array",{indexOf:function indexOf(a){return g?f.apply(this,arguments)||0:e(this,a,arguments[1])}})},function(a,b,c){var d=c(6),e=c(30),f=c(36),g=c(35),h=[].lastIndexOf,i=!!h&&1/[1].lastIndexOf(1,-0)<0;d(d.P+d.F*(i||!c(156)(h)),"Array",{lastIndexOf:function lastIndexOf(a){if(i)return h.apply(this,arguments)||0;var b=e(this),c=g(b.length),d=c-1;for(arguments.length>1&&(d=Math.min(d,f(arguments[1]))),d<0&&(d=c+d);d>=0;d--)if(d in b&&b[d]===a)return d||0;return-1}})},function(a,b,c){var d=c(6);d(d.P,"Array",{copyWithin:c(173)}),c(174)("copyWithin")},function(a,b,d){var e=d(56),f=d(37),g=d(35);a.exports=[].copyWithin||function copyWithin(a,b){var d=e(this),h=g(d.length),i=f(a,h),j=f(b,h),k=arguments.length>2?arguments[2]:c,l=Math.min((k===c?h:f(k,h))-j,h-i),m=1;for(j0;)j in d?d[i]=d[j]:delete d[i],i+=m,j+=m;return d}},function(a,b){a.exports=function(){}},function(a,b,c){var d=c(6);d(d.P,"Array",{fill:c(176)}),c(174)("fill")},function(a,b,d){var e=d(56),f=d(37),g=d(35);a.exports=function fill(a){for(var b=e(this),d=g(b.length),h=arguments.length,i=f(h>1?arguments[1]:c,d),j=h>2?arguments[2]:c,k=j===c?d:f(j,d);k>i;)b[i++]=a;return b}},function(a,b,d){var e=d(6),f=d(160)(5),g="find",h=!0;g in[]&&Array(1)[g](function(){h=!1}),e(e.P+e.F*h,"Array",{find:function find(a){return f(this,a,arguments.length>1?arguments[1]:c)}}),d(174)(g)},function(a,b,d){var e=d(6),f=d(160)(6),g="findIndex",h=!0;g in[]&&Array(1)[g](function(){h=!1}),e(e.P+e.F*h,"Array",{findIndex:function findIndex(a){return f(this,a,arguments.length>1?arguments[1]:c)}}),d(174)(g)},function(a,b,d){var e=d(174),f=d(180),g=d(130),h=d(30);a.exports=d(129)(Array,"Array",function(a,b){this._t=h(a),this._i=0,this._k=b},function(){var a=this._t,b=this._k,d=this._i++;return!a||d>=a.length?(this._t=c,f(1)):"keys"==b?f(0,d):"values"==b?f(0,a[d]):f(0,[d,a[d]])},"values"),g.Arguments=g.Array,e("keys"),e("values"),e("entries")},function(a,b){a.exports=function(a,b){return{value:b,done:!!a}}},function(a,b,c){c(182)("Array")},function(a,b,c){var d=c(2),e=c(7),f=c(11),g=c(4),h=c(23)("species");a.exports=function(a){var b="function"==typeof e[a]?e[a]:d[a];g&&b&&!b[h]&&f.f(b,h,{configurable:!0,get:function(){return this}})}},function(a,b,d){var e,f,g,h=d(26),i=d(2),j=d(8),k=d(152),l=d(6),m=d(13),n=d(9),o=d(184),p=d(185),q=d(186),r=d(187).set,s=d(188)(),t="Promise",u=i.TypeError,v=i.process,w=i[t],v=i.process,x="process"==k(v),y=function(){},z=!!function(){try{var a=w.resolve(1),b=(a.constructor={})[d(23)("species")]=function(a){a(y,y)};return(x||"function"==typeof PromiseRejectionEvent)&&a.then(y)instanceof b}catch(c){}}(),A=function(a,b){return a===b||a===w&&b===g},B=function(a){var b;return!(!m(a)||"function"!=typeof(b=a.then))&&b},C=function(a){return A(w,a)?new D(a):new f(a)},D=f=function(a){var b,d;this.promise=new a(function(a,e){if(b!==c||d!==c)throw u("Bad Promise constructor");b=a,d=e}),this.resolve=n(b),this.reject=n(d)},E=function(a){try{a()}catch(b){return{error:b}}},F=function(a,b){if(!a._n){a._n=!0;var c=a._c;s(function(){for(var d=a._v,e=1==a._s,f=0,g=function(b){var c,f,g=e?b.ok:b.fail,h=b.resolve,i=b.reject,j=b.domain;try{g?(e||(2==a._h&&I(a),a._h=1),g===!0?c=d:(j&&j.enter(),c=g(d),j&&j.exit()),c===b.promise?i(u("Promise-chain cycle")):(f=B(c))?f.call(c,h,i):h(c)):i(d)}catch(k){i(k)}};c.length>f;)g(c[f++]);a._c=[],a._n=!1,b&&!a._h&&G(a)})}},G=function(a){r.call(i,function(){var b,d,e,f=a._v;if(H(a)&&(b=E(function(){x?v.emit("unhandledRejection",f,a):(d=i.onunhandledrejection)?d({promise:a,reason:f}):(e=i.console)&&e.error&&e.error("Unhandled promise rejection",f)}),a._h=x||H(a)?2:1),a._a=c,b)throw b.error})},H=function(a){if(1==a._h)return!1;for(var b,c=a._a||a._c,d=0;c.length>d;)if(b=c[d++],b.fail||!H(b.promise))return!1;return!0},I=function(a){r.call(i,function(){var b;x?v.emit("rejectionHandled",a):(b=i.onrejectionhandled)&&b({promise:a,reason:a._v})})},J=function(a){var b=this;b._d||(b._d=!0,b=b._w||b,b._v=a,b._s=2,b._a||(b._a=b._c.slice()),F(b,!0))},K=function(a){var b,c=this;if(!c._d){c._d=!0,c=c._w||c;try{if(c===a)throw u("Promise can't be resolved itself");(b=B(a))?s(function(){var d={_w:c,_d:!1};try{b.call(a,j(K,d,1),j(J,d,1))}catch(e){J.call(d,e)}}):(c._v=a,c._s=1,F(c,!1))}catch(d){J.call({_w:c,_d:!1},d)}}};z||(w=function Promise(a){o(this,w,t,"_h"),n(a),e.call(this);try{a(j(K,this,1),j(J,this,1))}catch(b){J.call(this,b)}},e=function Promise(a){this._c=[],this._a=c,this._s=0,this._d=!1,this._v=c,this._h=0,this._n=!1},e.prototype=d(189)(w.prototype,{then:function then(a,b){var d=C(q(this,w));return d.ok="function"!=typeof a||a,d.fail="function"==typeof b&&b,d.domain=x?v.domain:c,this._c.push(d),this._a&&this._a.push(d),this._s&&F(this,!1),d.promise},"catch":function(a){return this.then(c,a)}}),D=function(){var a=new e;this.promise=a,this.resolve=j(K,a,1),this.reject=j(J,a,1)}),l(l.G+l.W+l.F*!z,{Promise:w}),d(22)(w,t),d(182)(t),g=d(7)[t],l(l.S+l.F*!z,t,{reject:function reject(a){var b=C(this),c=b.reject;return c(a),b.promise}}),l(l.S+l.F*(h||!z),t,{resolve:function resolve(a){if(a instanceof w&&A(a.constructor,this))return a;var b=C(this),c=b.resolve;return c(a),b.promise}}),l(l.S+l.F*!(z&&d(153)(function(a){w.all(a)["catch"](y)})),t,{all:function all(a){var b=this,d=C(b),e=d.resolve,f=d.reject,g=E(function(){var d=[],g=0,h=1;p(a,!1,function(a){var i=g++,j=!1;d.push(c),h++,b.resolve(a).then(function(a){j||(j=!0,d[i]=a,--h||e(d))},f)}),--h||e(d)});return g&&f(g.error),d.promise},race:function race(a){var b=this,c=C(b),d=c.reject,e=E(function(){p(a,!1,function(a){b.resolve(a).then(c.resolve,d)})});return e&&d(e.error),c.promise}})},function(a,b){a.exports=function(a,b,d,e){if(!(a instanceof b)||e!==c&&e in a)throw TypeError(d+": incorrect invocation!");return a}},function(a,b,c){var d=c(8),e=c(148),f=c(149),g=c(12),h=c(35),i=c(151),j={},k={},b=a.exports=function(a,b,c,l,m){var n,o,p,q,r=m?function(){return a}:i(a),s=d(c,l,b?2:1),t=0;if("function"!=typeof r)throw TypeError(a+" is not iterable!");if(f(r)){for(n=h(a.length);n>t;t++)if(q=b?s(g(o=a[t])[0],o[1]):s(a[t]),q===j||q===k)return q}else for(p=r.call(a);!(o=p.next()).done;)if(q=e(p,s,o.value,b),q===j||q===k)return q};b.BREAK=j,b.RETURN=k},function(a,b,d){var e=d(12),f=d(9),g=d(23)("species");a.exports=function(a,b){var d,h=e(a).constructor;return h===c||(d=e(h)[g])==c?b:f(d)}},function(a,b,c){var d,e,f,g=c(8),h=c(74),i=c(46),j=c(15),k=c(2),l=k.process,m=k.setImmediate,n=k.clearImmediate,o=k.MessageChannel,p=0,q={},r="onreadystatechange",s=function(){var a=+this;if(q.hasOwnProperty(a)){var b=q[a];delete q[a],b()}},t=function(a){s.call(a.data)};m&&n||(m=function setImmediate(a){for(var b=[],c=1;arguments.length>c;)b.push(arguments[c++]);return q[++p]=function(){h("function"==typeof a?a:Function(a),b)},d(p),p},n=function clearImmediate(a){delete q[a]},"process"==c(32)(l)?d=function(a){l.nextTick(g(s,a,1))}:o?(e=new o,f=e.port2,e.port1.onmessage=t,d=g(f.postMessage,f,1)):k.addEventListener&&"function"==typeof postMessage&&!k.importScripts?(d=function(a){k.postMessage(a+"","*")},k.addEventListener("message",t,!1)):d=r in j("script")?function(a){i.appendChild(j("script"))[r]=function(){i.removeChild(this),s.call(a)}}:function(a){setTimeout(g(s,a,1),0)}),a.exports={set:m,clear:n}},function(a,b,d){var e=d(2),f=d(187).set,g=e.MutationObserver||e.WebKitMutationObserver,h=e.process,i=e.Promise,j="process"==d(32)(h);a.exports=function(){var a,b,d,k=function(){var e,f;for(j&&(e=h.domain)&&e.exit();a;){f=a.fn,a=a.next;try{f()}catch(g){throw a?d():b=c,g}}b=c,e&&e.enter()};if(j)d=function(){h.nextTick(k)};else if(g){var l=!0,m=document.createTextNode("");new g(k).observe(m,{characterData:!0}),d=function(){m.data=l=!l}}else if(i&&i.resolve){var n=i.resolve();d=function(){n.then(k)}}else d=function(){f.call(e,k)};return function(e){var f={fn:e,next:c};b&&(b.next=f),a||(a=f,d()),b=f}}},function(a,b,c){var d=c(10);a.exports=function(a,b,c){for(var e in b)c&&a[e]?a[e]=b[e]:d(a,e,b[e]);return a}},function(a,b,d){var e=d(191);a.exports=d(192)("Map",function(a){return function Map(){return a(this,arguments.length>0?arguments[0]:c)}},{get:function get(a){var b=e.getEntry(this,a);return b&&b.v},set:function set(a,b){return e.def(this,0===a?0:a,b)}},e,!0)},function(a,b,d){var e=d(11).f,f=d(44),g=d(189),h=d(8),i=d(184),j=d(33),k=d(185),l=d(129),m=d(180),n=d(182),o=d(4),p=d(19).fastKey,q=o?"_s":"size",r=function(a,b){var c,d=p(b);if("F"!==d)return a._i[d];for(c=a._f;c;c=c.n)if(c.k==b)return c};a.exports={getConstructor:function(a,b,d,l){var m=a(function(a,e){i(a,m,b,"_i"),a._i=f(null),a._f=c,a._l=c,a[q]=0,e!=c&&k(e,d,a[l],a)});return g(m.prototype,{clear:function clear(){for(var a=this,b=a._i,d=a._f;d;d=d.n)d.r=!0,d.p&&(d.p=d.p.n=c),delete b[d.i];a._f=a._l=c,a[q]=0},"delete":function(a){var b=this,c=r(b,a);if(c){var d=c.n,e=c.p;delete b._i[c.i],c.r=!0,e&&(e.n=d),d&&(d.p=e),b._f==c&&(b._f=d),b._l==c&&(b._l=e),b[q]--}return!!c},forEach:function forEach(a){i(this,m,"forEach");for(var b,d=h(a,arguments.length>1?arguments[1]:c,3);b=b?b.n:this._f;)for(d(b.v,b.k,this);b&&b.r;)b=b.p},has:function has(a){return!!r(this,a)}}),o&&e(m.prototype,"size",{get:function(){return j(this[q])}}),m},def:function(a,b,d){var e,f,g=r(a,b);return g?g.v=d:(a._l=g={i:f=p(b,!0),k:b,v:d,p:e=a._l,n:c,r:!1},a._f||(a._f=g),e&&(e.n=g),a[q]++,"F"!==f&&(a._i[f]=g)),a},getEntry:r,setStrong:function(a,b,d){l(a,b,function(a,b){this._t=a,this._k=b,this._l=c},function(){for(var a=this,b=a._k,d=a._l;d&&d.r;)d=d.p;return a._t&&(a._l=d=d?d.n:a._t._f)?"keys"==b?m(0,d.k):"values"==b?m(0,d.v):m(0,[d.k,d.v]):(a._t=c,m(1))},d?"entries":"values",!d,!0),n(b)}}},function(a,b,d){var e=d(2),f=d(6),g=d(19),h=d(5),i=d(10),j=d(189),k=d(185),l=d(184),m=d(13),n=d(22),o=d(11).f,p=d(160)(0),q=d(4);a.exports=function(a,b,d,r,s,t){var u=e[a],v=u,w=s?"set":"add",x=v&&v.prototype,y={};return q&&"function"==typeof v&&(t||x.forEach&&!h(function(){(new v).entries().next()}))?(v=b(function(b,d){l(b,v,a,"_c"),b._c=new u,d!=c&&k(d,s,b[w],b)}),p("add,clear,delete,forEach,get,has,set,keys,values,entries,toJSON".split(","),function(a){var b="add"==a||"set"==a;a in x&&(!t||"clear"!=a)&&i(v.prototype,a,function(d,e){if(l(this,v,a),!b&&t&&!m(d))return"get"==a&&c;var f=this._c[a](0===d?0:d,e);return b?this:f})}),"size"in x&&o(v.prototype,"size",{get:function(){return this._c.size}})):(v=r.getConstructor(b,a,s,w),j(v.prototype,d),g.NEED=!0),n(v,a),y[a]=v,f(f.G+f.W+f.F,y),t||r.setStrong(v,a,s),v}},function(a,b,d){var e=d(191);a.exports=d(192)("Set",function(a){return function Set(){return a(this,arguments.length>0?arguments[0]:c)}},{add:function add(a){return e.def(this,a=0===a?0:a,a)}},e)},function(a,b,d){var e,f=d(160)(0),g=d(18),h=d(19),i=d(67),j=d(195),k=d(13),l=h.getWeak,m=Object.isExtensible,n=j.ufstore,o={},p=function(a){return function WeakMap(){return a(this,arguments.length>0?arguments[0]:c)}},q={get:function get(a){if(k(a)){var b=l(a);return b===!0?n(this).get(a):b?b[this._i]:c}},set:function set(a,b){return j.def(this,a,b)}},r=a.exports=d(192)("WeakMap",p,q,j,!0,!0);7!=(new r).set((Object.freeze||Object)(o),7).get(o)&&(e=j.getConstructor(p),i(e.prototype,q),h.NEED=!0,f(["delete","has","get","set"],function(a){var b=r.prototype,c=b[a];g(b,a,function(b,d){if(k(b)&&!m(b)){this._f||(this._f=new e);var f=this._f[a](b,d);return"set"==a?this:f}return c.call(this,b,d)})}))},function(a,b,d){var e=d(189),f=d(19).getWeak,g=d(12),h=d(13),i=d(184),j=d(185),k=d(160),l=d(3),m=k(5),n=k(6),o=0,p=function(a){return a._l||(a._l=new q)},q=function(){this.a=[]},r=function(a,b){return m(a.a,function(a){return a[0]===b})};q.prototype={get:function(a){var b=r(this,a);if(b)return b[1]},has:function(a){return!!r(this,a)},set:function(a,b){var c=r(this,a);c?c[1]=b:this.a.push([a,b])},"delete":function(a){var b=n(this.a,function(b){return b[0]===a});return~b&&this.a.splice(b,1),!!~b}},a.exports={getConstructor:function(a,b,d,g){var k=a(function(a,e){i(a,k,b,"_i"),a._i=o++,a._l=c,e!=c&&j(e,d,a[g],a)});return e(k.prototype,{"delete":function(a){if(!h(a))return!1;var b=f(a);return b===!0?p(this)["delete"](a):b&&l(b,this._i)&&delete b[this._i]},has:function has(a){if(!h(a))return!1;var b=f(a);return b===!0?p(this).has(a):b&&l(b,this._i)}}),k},def:function(a,b,c){var d=f(g(b),!0);return d===!0?p(a).set(b,c):d[a._i]=c,a},ufstore:p}},function(a,b,d){var e=d(195);d(192)("WeakSet",function(a){return function WeakSet(){return a(this,arguments.length>0?arguments[0]:c)}},{add:function add(a){return e.def(this,a,!0)}},e,!1,!0)},function(a,b,c){var d=c(6),e=c(9),f=c(12),g=(c(2).Reflect||{}).apply,h=Function.apply;d(d.S+d.F*!c(5)(function(){g(function(){})}),"Reflect",{apply:function apply(a,b,c){var d=e(a),i=f(c);return g?g(d,b,i):h.call(d,b,i)}})},function(a,b,c){var d=c(6),e=c(44),f=c(9),g=c(12),h=c(13),i=c(5),j=c(73),k=(c(2).Reflect||{}).construct,l=i(function(){function F(){}return!(k(function(){},[],F)instanceof F)}),m=!i(function(){k(function(){})});d(d.S+d.F*(l||m),"Reflect",{construct:function construct(a,b){f(a),g(b);var c=arguments.length<3?a:f(arguments[2]);if(m&&!l)return k(a,b,c);if(a==c){switch(b.length){case 0:return new a;case 1:return new a(b[0]);case 2:return new a(b[0],b[1]);case 3:return new a(b[0],b[1],b[2]);case 4:return new a(b[0],b[1],b[2],b[3])}var d=[null];return d.push.apply(d,b),new(j.apply(a,d))}var i=c.prototype,n=e(h(i)?i:Object.prototype),o=Function.apply.call(a,n,b);return h(o)?o:n}})},function(a,b,c){var d=c(11),e=c(6),f=c(12),g=c(16);e(e.S+e.F*c(5)(function(){Reflect.defineProperty(d.f({},1,{value:1}),1,{value:2})}),"Reflect",{defineProperty:function defineProperty(a,b,c){f(a),b=g(b,!0),f(c);try{return d.f(a,b,c),!0}catch(e){return!1}}})},function(a,b,c){var d=c(6),e=c(49).f,f=c(12);d(d.S,"Reflect",{deleteProperty:function deleteProperty(a,b){var c=e(f(a),b);return!(c&&!c.configurable)&&delete a[b]}})},function(a,b,d){var e=d(6),f=d(12),g=function(a){this._t=f(a),this._i=0;var b,c=this._k=[];for(b in a)c.push(b)};d(131)(g,"Object",function(){var a,b=this,d=b._k;do if(b._i>=d.length)return{value:c,done:!0};while(!((a=d[b._i++])in b._t));return{value:a,done:!1}}),e(e.S,"Reflect",{enumerate:function enumerate(a){return new g(a)}})},function(a,b,d){function get(a,b){var d,h,k=arguments.length<3?a:arguments[2];return j(a)===k?a[b]:(d=e.f(a,b))?g(d,"value")?d.value:d.get!==c?d.get.call(k):c:i(h=f(a))?get(h,b,k):void 0}var e=d(49),f=d(57),g=d(3),h=d(6),i=d(13),j=d(12);h(h.S,"Reflect",{get:get})},function(a,b,c){var d=c(49),e=c(6),f=c(12);e(e.S,"Reflect",{getOwnPropertyDescriptor:function getOwnPropertyDescriptor(a,b){return d.f(f(a),b)}})},function(a,b,c){var d=c(6),e=c(57),f=c(12);d(d.S,"Reflect",{getPrototypeOf:function getPrototypeOf(a){return e(f(a))}})},function(a,b,c){var d=c(6);d(d.S,"Reflect",{has:function has(a,b){return b in a}})},function(a,b,c){var d=c(6),e=c(12),f=Object.isExtensible;d(d.S,"Reflect",{isExtensible:function isExtensible(a){return e(a),!f||f(a)}})},function(a,b,c){var d=c(6);d(d.S,"Reflect",{ownKeys:c(208)})},function(a,b,c){var d=c(48),e=c(41),f=c(12),g=c(2).Reflect;a.exports=g&&g.ownKeys||function ownKeys(a){var b=d.f(f(a)),c=e.f;return c?b.concat(c(a)):b}},function(a,b,c){var d=c(6),e=c(12),f=Object.preventExtensions;d(d.S,"Reflect",{preventExtensions:function preventExtensions(a){e(a);try{return f&&f(a),!0}catch(b){return!1}}})},function(a,b,d){function set(a,b,d){var i,m,n=arguments.length<4?a:arguments[3],o=f.f(k(a),b);if(!o){if(l(m=g(a)))return set(m,b,d,n);o=j(0)}return h(o,"value")?!(o.writable===!1||!l(n))&&(i=f.f(n,b)||j(0),i.value=d,e.f(n,b,i),!0):o.set!==c&&(o.set.call(n,d),!0)}var e=d(11),f=d(49),g=d(57),h=d(3),i=d(6),j=d(17),k=d(12),l=d(13);i(i.S,"Reflect",{set:set})},function(a,b,c){var d=c(6),e=c(71);e&&d(d.S,"Reflect",{setPrototypeOf:function setPrototypeOf(a,b){e.check(a,b);try{return e.set(a,b),!0}catch(c){return!1}}})},function(a,b,c){var d=c(6);d(d.S,"Date",{now:function(){return(new Date).getTime()}})},function(a,b,c){var d=c(6),e=c(56),f=c(16);d(d.P+d.F*c(5)(function(){return null!==new Date(NaN).toJSON()||1!==Date.prototype.toJSON.call({toISOString:function(){return 1}})}),"Date",{toJSON:function toJSON(a){var b=e(this),c=f(b);return"number"!=typeof c||isFinite(c)?b.toISOString():null}})},function(a,b,c){var d=c(6),e=c(5),f=Date.prototype.getTime,g=function(a){return a>9?a:"0"+a};d(d.P+d.F*(e(function(){return"0385-07-25T07:06:39.999Z"!=new Date(-5e13-1).toISOString()})||!e(function(){new Date(NaN).toISOString()})),"Date",{toISOString:function toISOString(){if(!isFinite(f.call(this)))throw RangeError("Invalid time value");var a=this,b=a.getUTCFullYear(),c=a.getUTCMilliseconds(),d=b<0?"-":b>9999?"+":"";return d+("00000"+Math.abs(b)).slice(d?-6:-4)+"-"+g(a.getUTCMonth()+1)+"-"+g(a.getUTCDate())+"T"+g(a.getUTCHours())+":"+g(a.getUTCMinutes())+":"+g(a.getUTCSeconds())+"."+(c>99?c:"0"+g(c))+"Z"}})},function(a,b,d){var e=d(6),f=d(216),g=d(217),h=d(12),i=d(37),j=d(35),k=d(13),l=d(2).ArrayBuffer,m=d(186),n=g.ArrayBuffer,o=g.DataView,p=f.ABV&&l.isView,q=n.prototype.slice,r=f.VIEW,s="ArrayBuffer";e(e.G+e.W+e.F*(l!==n),{ArrayBuffer:n}),e(e.S+e.F*!f.CONSTR,s,{isView:function isView(a){return p&&p(a)||k(a)&&r in a}}),e(e.P+e.U+e.F*d(5)(function(){return!new n(2).slice(1,c).byteLength}),s,{slice:function slice(a,b){if(q!==c&&b===c)return q.call(h(this),a);for(var d=h(this).byteLength,e=i(a,d),f=i(b===c?d:b,d),g=new(m(this,n))(j(f-e)),k=new o(this),l=new o(g),p=0;e>1,k=23===b?E(2,-24)-E(2,-77):0,l=0,m=a<0||0===a&&1/a<0?1:0;for(a=D(a),a!=a||a===B?(e=a!=a?1:0,d=i):(d=F(G(a)/H),a*(f=E(2,-d))<1&&(d--,f*=2),a+=d+j>=1?k/f:k*E(2,1-j),a*f>=2&&(d++,f/=2),d+j>=i?(e=0,d=i):d+j>=1?(e=(a*f-1)*E(2,b),d+=j):(e=a*E(2,j-1)*E(2,b),d=0));b>=8;g[l++]=255&e,e/=256,b-=8);for(d=d<0;g[l++]=255&d,d/=256,h-=8);return g[--l]|=128*m,g},P=function(a,b,c){var d,e=8*c-b-1,f=(1<>1,h=e-7,i=c-1,j=a[i--],k=127&j;for(j>>=7;h>0;k=256*k+a[i],i--,h-=8);for(d=k&(1<<-h)-1,k>>=-h,h+=b;h>0;d=256*d+a[i],i--,h-=8);if(0===k)k=1-g;else{if(k===f)return d?NaN:j?-B:B;d+=E(2,b),k-=g}return(j?-1:1)*d*E(2,k-b)},Q=function(a){return a[3]<<24|a[2]<<16|a[1]<<8|a[0]},R=function(a){return[255&a]},S=function(a){return[255&a,a>>8&255]},T=function(a){return[255&a,a>>8&255,a>>16&255,a>>24&255]},U=function(a){return O(a,52,8)},V=function(a){return O(a,23,4)},W=function(a,b,c){p(a[u],b,{get:function(){return this[c]}})},X=function(a,b,c,d){var e=+c,f=m(e);if(e!=f||f<0||f+b>a[M])throw A(w);var g=a[L]._b,h=f+a[N],i=g.slice(h,h+b);return d?i:i.reverse()},Y=function(a,b,c,d,e,f){var g=+c,h=m(g);if(g!=h||h<0||h+b>a[M])throw A(w);for(var i=a[L]._b,j=h+a[N],k=d(+e),l=0;lba;)($=aa[ba++])in x||i(x,$,C[$]);g||(_.constructor=x)}var ca=new y(new x(2)),da=y[u].setInt8;ca.setInt8(0,2147483648),ca.setInt8(1,2147483649),!ca.getInt8(0)&&ca.getInt8(1)||j(y[u],{setInt8:function setInt8(a,b){da.call(this,a,b<<24>>24)},setUint8:function setUint8(a,b){da.call(this,a,b<<24>>24)}},!0)}else x=function ArrayBuffer(a){var b=Z(this,a);this._b=q.call(Array(b),0),this[M]=b},y=function DataView(a,b,d){l(this,y,t),l(a,x,t);var e=a[M],f=m(b);if(f<0||f>e)throw A("Wrong offset!");if(d=d===c?e-f:n(d),f+d>e)throw A(v);this[L]=a,this[N]=f,this[M]=d},f&&(W(x,J,"_l"),W(y,I,"_b"),W(y,J,"_l"),W(y,K,"_o")),j(y[u],{getInt8:function getInt8(a){return X(this,1,a)[0]<<24>>24},getUint8:function getUint8(a){return X(this,1,a)[0]},getInt16:function getInt16(a){var b=X(this,2,a,arguments[1]);return(b[1]<<8|b[0])<<16>>16},getUint16:function getUint16(a){var b=X(this,2,a,arguments[1]);return b[1]<<8|b[0]},getInt32:function getInt32(a){return Q(X(this,4,a,arguments[1]))},getUint32:function getUint32(a){return Q(X(this,4,a,arguments[1]))>>>0},getFloat32:function getFloat32(a){return P(X(this,4,a,arguments[1]),23,4)},getFloat64:function getFloat64(a){return P(X(this,8,a,arguments[1]),52,8)},setInt8:function setInt8(a,b){Y(this,1,a,R,b)},setUint8:function setUint8(a,b){Y(this,1,a,R,b)},setInt16:function setInt16(a,b){Y(this,2,a,S,b,arguments[2])},setUint16:function setUint16(a,b){Y(this,2,a,S,b,arguments[2])},setInt32:function setInt32(a,b){Y(this,4,a,T,b,arguments[2])},setUint32:function setUint32(a,b){Y(this,4,a,T,b,arguments[2])},setFloat32:function setFloat32(a,b){Y(this,4,a,V,b,arguments[2])},setFloat64:function setFloat64(a,b){Y(this,8,a,U,b,arguments[2])}});r(x,s),r(y,t),i(y[u],h.VIEW,!0),b[s]=x,b[t]=y},function(a,b,c){var d=c(6);d(d.G+d.W+d.F*!c(216).ABV,{DataView:c(217).DataView})},function(a,b,c){c(220)("Int8",1,function(a){return function Int8Array(b,c,d){return a(this,b,c,d)}})},function(a,b,d){if(d(4)){var e=d(26),f=d(2),g=d(5),h=d(6),i=d(216),j=d(217),k=d(8),l=d(184),m=d(17),n=d(10),o=d(189),p=d(36),q=d(35),r=d(37),s=d(16),t=d(3),u=d(69),v=d(152),w=d(13),x=d(56),y=d(149),z=d(44),A=d(57),B=d(48).f,C=d(151),D=d(20),E=d(23),F=d(160),G=d(34),H=d(186),I=d(179),J=d(130),K=d(153),L=d(182),M=d(176),N=d(173),O=d(11),P=d(49),Q=O.f,R=P.f,S=f.RangeError,T=f.TypeError,U=f.Uint8Array,V="ArrayBuffer",W="Shared"+V,X="BYTES_PER_ELEMENT",Y="prototype",Z=Array[Y],$=j.ArrayBuffer,_=j.DataView,aa=F(0),ba=F(2),ca=F(3),da=F(4),ea=F(5),fa=F(6),ga=G(!0),ha=G(!1),ia=I.values,ja=I.keys,ka=I.entries,la=Z.lastIndexOf,ma=Z.reduce,na=Z.reduceRight,oa=Z.join,pa=Z.sort,qa=Z.slice,ra=Z.toString,sa=Z.toLocaleString,ta=E("iterator"),ua=E("toStringTag"),va=D("typed_constructor"),wa=D("def_constructor"),xa=i.CONSTR,ya=i.TYPED,za=i.VIEW,Aa="Wrong length!",Ba=F(1,function(a,b){return Ha(H(a,a[wa]),b)}),Ca=g(function(){return 1===new U(new Uint16Array([1]).buffer)[0]}),Da=!!U&&!!U[Y].set&&g(function(){new U(1).set({})}),Ea=function(a,b){if(a===c)throw T(Aa);var d=+a,e=q(a);if(b&&!u(d,e))throw S(Aa);return e},Fa=function(a,b){var c=p(a);if(c<0||c%b)throw S("Wrong offset!");return c},Ga=function(a){if(w(a)&&ya in a)return a;throw T(a+" is not a typed array!")},Ha=function(a,b){if(!(w(a)&&va in a))throw T("It is not a typed array constructor!");return new a(b)},Ia=function(a,b){return Ja(H(a,a[wa]),b)},Ja=function(a,b){for(var c=0,d=b.length,e=Ha(a,d);d>c;)e[c]=b[c++];return e},Ka=function(a,b,c){Q(a,b,{get:function(){return this._d[c]}})},La=function from(a){var b,d,e,f,g,h,i=x(a),j=arguments.length,l=j>1?arguments[1]:c,m=l!==c,n=C(i);if(n!=c&&!y(n)){for(h=n.call(i),e=[],b=0;!(g=h.next()).done;b++)e.push(g.value);i=e}for(m&&j>2&&(l=k(l,arguments[2],2)),b=0,d=q(i.length),f=Ha(this,d);d>b;b++)f[b]=m?l(i[b],b):i[b];return f},Ma=function of(){for(var a=0,b=arguments.length,c=Ha(this,b);b>a;)c[a]=arguments[a++];return c},Na=!!U&&g(function(){sa.call(new U(1))}),Oa=function toLocaleString(){return sa.apply(Na?qa.call(Ga(this)):Ga(this),arguments)},Pa={copyWithin:function copyWithin(a,b){return N.call(Ga(this),a,b,arguments.length>2?arguments[2]:c)},every:function every(a){return da(Ga(this),a,arguments.length>1?arguments[1]:c)},fill:function fill(a){return M.apply(Ga(this),arguments)},filter:function filter(a){return Ia(this,ba(Ga(this),a,arguments.length>1?arguments[1]:c))},find:function find(a){return ea(Ga(this),a,arguments.length>1?arguments[1]:c)},findIndex:function findIndex(a){return fa(Ga(this),a,arguments.length>1?arguments[1]:c)},forEach:function forEach(a){aa(Ga(this),a,arguments.length>1?arguments[1]:c)},indexOf:function indexOf(a){return ha(Ga(this),a,arguments.length>1?arguments[1]:c)},includes:function includes(a){return ga(Ga(this),a,arguments.length>1?arguments[1]:c)},join:function join(a){return oa.apply(Ga(this),arguments)},lastIndexOf:function lastIndexOf(a){return la.apply(Ga(this),arguments)},map:function map(a){return Ba(Ga(this),a,arguments.length>1?arguments[1]:c)},reduce:function reduce(a){return ma.apply(Ga(this),arguments)},reduceRight:function reduceRight(a){return na.apply(Ga(this),arguments)},reverse:function reverse(){for(var a,b=this,c=Ga(b).length,d=Math.floor(c/2),e=0;e1?arguments[1]:c)},sort:function sort(a){return pa.call(Ga(this),a)},subarray:function subarray(a,b){var d=Ga(this),e=d.length,f=r(a,e);return new(H(d,d[wa]))(d.buffer,d.byteOffset+f*d.BYTES_PER_ELEMENT,q((b===c?e:r(b,e))-f))}},Qa=function slice(a,b){return Ia(this,qa.call(Ga(this),a,b))},Ra=function set(a){Ga(this);var b=Fa(arguments[1],1),c=this.length,d=x(a),e=q(d.length),f=0;if(e+b>c)throw S(Aa);for(;f255?255:255&d),e.v[p](c*b+e.o,d,Ca)},E=function(a,b){Q(a,b,{get:function(){return C(this,b)},set:function(a){return D(this,b,a)},enumerable:!0})};u?(r=d(function(a,d,e,f){l(a,r,k,"_d");var g,h,i,j,m=0,o=0;if(w(d)){if(!(d instanceof $||(j=v(d))==V||j==W))return ya in d?Ja(r,d):La.call(r,d);g=d,o=Fa(e,b);var p=d.byteLength;if(f===c){if(p%b)throw S(Aa);if(h=p-o,h<0)throw S(Aa)}else if(h=q(f)*b,h+o>p)throw S(Aa);i=h/b}else i=Ea(d,!0),h=i*b,g=new $(h);for(n(a,"_d",{b:g,o:o,l:h,e:i,v:new _(g)});m1?arguments[1]:c)}}),d(174)("includes")},function(a,b,c){var d=c(6),e=c(120)(!0);d(d.P,"String",{at:function at(a){return e(this,a)}})},function(a,b,d){var e=d(6),f=d(232);e(e.P,"String",{padStart:function padStart(a){return f(this,a,arguments.length>1?arguments[1]:c,!0)}})},function(a,b,d){var e=d(35),f=d(78),g=d(33);a.exports=function(a,b,d,h){var i=String(g(a)),j=i.length,k=d===c?" ":String(d),l=e(b);if(l<=j||""==k)return i;var m=l-j,n=f.call(k,Math.ceil(m/k.length));return n.length>m&&(n=n.slice(0,m)),h?n+i:i+n}},function(a,b,d){var e=d(6),f=d(232);e(e.P,"String",{padEnd:function padEnd(a){return f(this,a,arguments.length>1?arguments[1]:c,!1)}})},function(a,b,c){c(90)("trimLeft",function(a){return function trimLeft(){return a(this,1)}},"trimStart")},function(a,b,c){c(90)("trimRight",function(a){return function trimRight(){return a(this,2)}},"trimEnd")},function(a,b,c){var d=c(6),e=c(33),f=c(35),g=c(123),h=c(237),i=RegExp.prototype,j=function(a,b){this._r=a,this._s=b};c(131)(j,"RegExp String",function next(){var a=this._r.exec(this._s);return{value:a,done:null===a}}),d(d.P,"String",{matchAll:function matchAll(a){if(e(this),!g(a))throw TypeError(a+" is not a regexp!");var b=String(this),c="flags"in i?String(a.flags):h.call(a),d=new RegExp(a.source,~c.indexOf("g")?c:"g"+c); return d.lastIndex=f(a.lastIndex),new j(d,b)}})},function(a,b,c){var d=c(12);a.exports=function(){var a=d(this),b="";return a.global&&(b+="g"),a.ignoreCase&&(b+="i"),a.multiline&&(b+="m"),a.unicode&&(b+="u"),a.sticky&&(b+="y"),b}},function(a,b,c){c(25)("asyncIterator")},function(a,b,c){c(25)("observable")},function(a,b,c){var d=c(6),e=c(208),f=c(30),g=c(49),h=c(150);d(d.S,"Object",{getOwnPropertyDescriptors:function getOwnPropertyDescriptors(a){for(var b,c=f(a),d=g.f,i=e(c),j={},k=0;i.length>k;)h(j,b=i[k++],d(c,b));return j}})},function(a,b,c){var d=c(6),e=c(242)(!1);d(d.S,"Object",{values:function values(a){return e(a)}})},function(a,b,c){var d=c(28),e=c(30),f=c(42).f;a.exports=function(a){return function(b){for(var c,g=e(b),h=d(g),i=h.length,j=0,k=[];i>j;)f.call(g,c=h[j++])&&k.push(a?[c,g[c]]:g[c]);return k}}},function(a,b,c){var d=c(6),e=c(242)(!0);d(d.S,"Object",{entries:function entries(a){return e(a)}})},function(a,b,c){var d=c(6),e=c(56),f=c(9),g=c(11);c(4)&&d(d.P+c(245),"Object",{__defineGetter__:function __defineGetter__(a,b){g.f(e(this),a,{get:f(b),enumerable:!0,configurable:!0})}})},function(a,b,c){a.exports=c(26)||!c(5)(function(){var a=Math.random();__defineSetter__.call(null,a,function(){}),delete c(2)[a]})},function(a,b,c){var d=c(6),e=c(56),f=c(9),g=c(11);c(4)&&d(d.P+c(245),"Object",{__defineSetter__:function __defineSetter__(a,b){g.f(e(this),a,{set:f(b),enumerable:!0,configurable:!0})}})},function(a,b,c){var d=c(6),e=c(56),f=c(16),g=c(57),h=c(49).f;c(4)&&d(d.P+c(245),"Object",{__lookupGetter__:function __lookupGetter__(a){var b,c=e(this),d=f(a,!0);do if(b=h(c,d))return b.get;while(c=g(c))}})},function(a,b,c){var d=c(6),e=c(56),f=c(16),g=c(57),h=c(49).f;c(4)&&d(d.P+c(245),"Object",{__lookupSetter__:function __lookupSetter__(a){var b,c=e(this),d=f(a,!0);do if(b=h(c,d))return b.set;while(c=g(c))}})},function(a,b,c){var d=c(6);d(d.P+d.R,"Map",{toJSON:c(250)("Map")})},function(a,b,c){var d=c(152),e=c(251);a.exports=function(a){return function toJSON(){if(d(this)!=a)throw TypeError(a+"#toJSON isn't generic");return e(this)}}},function(a,b,c){var d=c(185);a.exports=function(a,b){var c=[];return d(a,!1,c.push,c,b),c}},function(a,b,c){var d=c(6);d(d.P+d.R,"Set",{toJSON:c(250)("Set")})},function(a,b,c){var d=c(6);d(d.S,"System",{global:c(2)})},function(a,b,c){var d=c(6),e=c(32);d(d.S,"Error",{isError:function isError(a){return"Error"===e(a)}})},function(a,b,c){var d=c(6);d(d.S,"Math",{iaddh:function iaddh(a,b,c,d){var e=a>>>0,f=b>>>0,g=c>>>0;return f+(d>>>0)+((e&g|(e|g)&~(e+g>>>0))>>>31)|0}})},function(a,b,c){var d=c(6);d(d.S,"Math",{isubh:function isubh(a,b,c,d){var e=a>>>0,f=b>>>0,g=c>>>0;return f-(d>>>0)-((~e&g|~(e^g)&e-g>>>0)>>>31)|0}})},function(a,b,c){var d=c(6);d(d.S,"Math",{imulh:function imulh(a,b){var c=65535,d=+a,e=+b,f=d&c,g=e&c,h=d>>16,i=e>>16,j=(h*g>>>0)+(f*g>>>16);return h*i+(j>>16)+((f*i>>>0)+(j&c)>>16)}})},function(a,b,c){var d=c(6);d(d.S,"Math",{umulh:function umulh(a,b){var c=65535,d=+a,e=+b,f=d&c,g=e&c,h=d>>>16,i=e>>>16,j=(h*g>>>0)+(f*g>>>16);return h*i+(j>>>16)+((f*i>>>0)+(j&c)>>>16)}})},function(a,b,c){var d=c(260),e=c(12),f=d.key,g=d.set;d.exp({defineMetadata:function defineMetadata(a,b,c,d){g(a,b,e(c),f(d))}})},function(a,b,d){var e=d(190),f=d(6),g=d(21)("metadata"),h=g.store||(g.store=new(d(194))),i=function(a,b,d){var f=h.get(a);if(!f){if(!d)return c;h.set(a,f=new e)}var g=f.get(b);if(!g){if(!d)return c;f.set(b,g=new e)}return g},j=function(a,b,d){var e=i(b,d,!1);return e!==c&&e.has(a)},k=function(a,b,d){var e=i(b,d,!1);return e===c?c:e.get(a)},l=function(a,b,c,d){i(c,d,!0).set(a,b)},m=function(a,b){var c=i(a,b,!1),d=[];return c&&c.forEach(function(a,b){d.push(b)}),d},n=function(a){return a===c||"symbol"==typeof a?a:String(a)},o=function(a){f(f.S,"Reflect",a)};a.exports={store:h,map:i,has:j,get:k,set:l,keys:m,key:n,exp:o}},function(a,b,d){var e=d(260),f=d(12),g=e.key,h=e.map,i=e.store;e.exp({deleteMetadata:function deleteMetadata(a,b){var d=arguments.length<3?c:g(arguments[2]),e=h(f(b),d,!1);if(e===c||!e["delete"](a))return!1;if(e.size)return!0;var j=i.get(b);return j["delete"](d),!!j.size||i["delete"](b)}})},function(a,b,d){var e=d(260),f=d(12),g=d(57),h=e.has,i=e.get,j=e.key,k=function(a,b,d){var e=h(a,b,d);if(e)return i(a,b,d);var f=g(b);return null!==f?k(a,f,d):c};e.exp({getMetadata:function getMetadata(a,b){return k(a,f(b),arguments.length<3?c:j(arguments[2]))}})},function(a,b,d){var e=d(193),f=d(251),g=d(260),h=d(12),i=d(57),j=g.keys,k=g.key,l=function(a,b){var c=j(a,b),d=i(a);if(null===d)return c;var g=l(d,b);return g.length?c.length?f(new e(c.concat(g))):g:c};g.exp({getMetadataKeys:function getMetadataKeys(a){return l(h(a),arguments.length<2?c:k(arguments[1]))}})},function(a,b,d){var e=d(260),f=d(12),g=e.get,h=e.key;e.exp({getOwnMetadata:function getOwnMetadata(a,b){return g(a,f(b),arguments.length<3?c:h(arguments[2]))}})},function(a,b,d){var e=d(260),f=d(12),g=e.keys,h=e.key;e.exp({getOwnMetadataKeys:function getOwnMetadataKeys(a){return g(f(a),arguments.length<2?c:h(arguments[1]))}})},function(a,b,d){var e=d(260),f=d(12),g=d(57),h=e.has,i=e.key,j=function(a,b,c){var d=h(a,b,c);if(d)return!0;var e=g(b);return null!==e&&j(a,e,c)};e.exp({hasMetadata:function hasMetadata(a,b){return j(a,f(b),arguments.length<3?c:i(arguments[2]))}})},function(a,b,d){var e=d(260),f=d(12),g=e.has,h=e.key;e.exp({hasOwnMetadata:function hasOwnMetadata(a,b){return g(a,f(b),arguments.length<3?c:h(arguments[2]))}})},function(a,b,d){var e=d(260),f=d(12),g=d(9),h=e.key,i=e.set;e.exp({metadata:function metadata(a,b){return function decorator(d,e){i(a,b,(e!==c?f:g)(d),h(e))}}})},function(a,b,c){var d=c(6),e=c(188)(),f=c(2).process,g="process"==c(32)(f);d(d.G,{asap:function asap(a){var b=g&&f.domain;e(b?b.bind(a):a)}})},function(a,b,d){var e=d(6),f=d(2),g=d(7),h=d(188)(),i=d(23)("observable"),j=d(9),k=d(12),l=d(184),m=d(189),n=d(10),o=d(185),p=o.RETURN,q=function(a){return null==a?c:j(a)},r=function(a){var b=a._c;b&&(a._c=c,b())},s=function(a){return a._o===c},t=function(a){s(a)||(a._o=c,r(a))},u=function(a,b){k(a),this._c=c,this._o=a,a=new v(this);try{var d=b(a),e=d;null!=d&&("function"==typeof d.unsubscribe?d=function(){e.unsubscribe()}:j(d),this._c=d)}catch(f){return void a.error(f)}s(this)&&r(this)};u.prototype=m({},{unsubscribe:function unsubscribe(){t(this)}});var v=function(a){this._s=a};v.prototype=m({},{next:function next(a){var b=this._s;if(!s(b)){var c=b._o;try{var d=q(c.next);if(d)return d.call(c,a)}catch(e){try{t(b)}finally{throw e}}}},error:function error(a){var b=this._s;if(s(b))throw a;var d=b._o;b._o=c;try{var e=q(d.error);if(!e)throw a;a=e.call(d,a)}catch(f){try{r(b)}finally{throw f}}return r(b),a},complete:function complete(a){var b=this._s;if(!s(b)){var d=b._o;b._o=c;try{var e=q(d.complete);a=e?e.call(d,a):c}catch(f){try{r(b)}finally{throw f}}return r(b),a}}});var w=function Observable(a){l(this,w,"Observable","_f")._f=j(a)};m(w.prototype,{subscribe:function subscribe(a){return new u(a,this._f)},forEach:function forEach(a){var b=this;return new(g.Promise||f.Promise)(function(c,d){j(a);var e=b.subscribe({next:function(b){try{return a(b)}catch(c){d(c),e.unsubscribe()}},error:d,complete:c})})}}),m(w,{from:function from(a){var b="function"==typeof this?this:w,c=q(k(a)[i]);if(c){var d=k(c.call(a));return d.constructor===b?d:new b(function(a){return d.subscribe(a)})}return new b(function(b){var c=!1;return h(function(){if(!c){try{if(o(a,!1,function(a){if(b.next(a),c)return p})===p)return}catch(d){if(c)throw d;return void b.error(d)}b.complete()}}),function(){c=!0}})},of:function of(){for(var a=0,b=arguments.length,c=Array(b);ag;)(c[g]=arguments[g++])===h&&(i=!0);return function(){var d,f=this,g=arguments.length,j=0,k=0;if(!i&&!g)return e(a,c,f);if(d=c.slice(),i)for(;b>j;j++)d[j]===h&&(d[j]=arguments[k++]);for(;g>k;)d.push(arguments[k++]);return e(a,d,f)}}},function(a,b,c){a.exports=c(7)},function(a,b,d){function Dict(a){var b=i(null);return a!=c&&(p(a)?o(a,!0,function(a,c){b[a]=c}):h(b,a)),b}function reduce(a,b,c){n(b);var d,e,f=t(a),g=k(f),h=g.length,i=0;if(arguments.length<3){if(!h)throw TypeError("Reduce of empty object with no initial value");d=f[g[i++]]}else d=Object(c);for(;h>i;)v(f,e=g[i++])&&(d=b(d,f[e],e,a));return d}function includes(a,b){return(b==b?m(a,b):x(a,function(a){return a!=a}))!==c}function get(a,b){if(v(a,b))return a[b]}function set(a,b,c){return u&&b in Object?l.f(a,b,g(0,c)):a[b]=c,a}function isDict(a){return s(a)&&j(a)===Dict.prototype}var e=d(8),f=d(6),g=d(17),h=d(67),i=d(44),j=d(57),k=d(28),l=d(11),m=d(27),n=d(9),o=d(185),p=d(277),q=d(131),r=d(180),s=d(13),t=d(30),u=d(4),v=d(3),w=function(a){var b=1==a,d=4==a;return function(f,g,h){var i,j,k,l=e(g,h,3),m=t(f),n=b||7==a||2==a?new("function"==typeof this?this:Dict):c;for(i in m)if(v(m,i)&&(j=m[i],k=l(j,i,f),a))if(b)n[i]=k;else if(k)switch(a){case 2:n[i]=j;break;case 3:return!0;case 5:return j;case 6:return i;case 7:n[k[0]]=k[1]}else if(d)return!1;return 3==a||d?d:n}},x=w(6),y=function(a){return function(b){return new z(b,a)}},z=function(a,b){this._t=t(a),this._a=k(a),this._i=0,this._k=b};q(z,"Dict",function(){var a,b=this,d=b._t,e=b._a,f=b._k;do if(b._i>=e.length)return b._t=c,r(1);while(!v(d,a=e[b._i++]));return"keys"==f?r(0,a):"values"==f?r(0,d[a]):r(0,[a,d[a]])}),Dict.prototype=null,f(f.G+f.F,{Dict:Dict}),f(f.S,"Dict",{keys:y("keys"),values:y("values"),entries:y("entries"),forEach:w(0),map:w(1),filter:w(2),some:w(3),every:w(4),find:w(5),findKey:x,mapPairs:w(7),reduce:reduce,keyOf:m,includes:includes,has:v,get:get,set:set,isDict:isDict})},function(a,b,d){var e=d(152),f=d(23)("iterator"),g=d(130);a.exports=d(7).isIterable=function(a){var b=Object(a);return b[f]!==c||"@@iterator"in b||g.hasOwnProperty(e(b))}},function(a,b,c){var d=c(12),e=c(151);a.exports=c(7).getIterator=function(a){var b=e(a);if("function"!=typeof b)throw TypeError(a+" is not iterable!");return d(b.call(a))}},function(a,b,c){var d=c(2),e=c(7),f=c(6),g=c(274);f(f.G+f.F,{delay:function delay(a){return new(e.Promise||d.Promise)(function(b){setTimeout(g.call(b,!0),a)})}})},function(a,b,c){var d=c(275),e=c(6);c(7)._=d._=d._||{},e(e.P+e.F,"Function",{part:c(274)})},function(a,b,c){var d=c(6);d(d.S+d.F,"Object",{isObject:c(13)})},function(a,b,c){var d=c(6);d(d.S+d.F,"Object",{classof:c(152)})},function(a,b,c){var d=c(6),e=c(284);d(d.S+d.F,"Object",{define:e})},function(a,b,c){var d=c(11),e=c(49),f=c(208),g=c(30);a.exports=function define(a,b){for(var c,h=f(g(b)),i=h.length,j=0;i>j;)d.f(a,c=h[j++],e.f(b,c));return a}},function(a,b,c){var d=c(6),e=c(284),f=c(44);d(d.S+d.F,"Object",{make:function(a,b){return e(f(a),b)}})},function(a,b,d){d(129)(Number,"Number",function(a){this._l=+a,this._i=0},function(){var a=this._i++,b=!(a"']/g,{"&":"&","<":"<",">":">",'"':""","'":"'"});d(d.P+d.F,"String",{escapeHTML:function escapeHTML(){return e(this)}})},function(a,b,c){var d=c(6),e=c(288)(/&(?:amp|lt|gt|quot|apos);/g,{"&":"&","<":"<",">":">",""":'"',"'":"'"});d(d.P+d.F,"String",{unescapeHTML:function unescapeHTML(){return e(this)}})}]),"undefined"!=typeof module&&module.exports?module.exports=a:"function"==typeof define&&define.amd?define(function(){return a}):b.core=a}(1,1); //# sourceMappingURL=library.min.js.mapcore-js-2.4.1/client/library.min.js.map000066400000000000000000004044161274277553300177260ustar00rootroot00000000000000{"version":3,"sources":["library.js"],"names":["__e","__g","undefined","modules","__webpack_require__","moduleId","installedModules","exports","module","id","loaded","call","m","c","p","global","has","DESCRIPTORS","$export","redefine","META","KEY","$fails","shared","setToStringTag","uid","wks","wksExt","wksDefine","keyOf","enumKeys","isArray","anObject","toIObject","toPrimitive","createDesc","_create","gOPNExt","$GOPD","$DP","$keys","gOPD","f","dP","gOPN","$Symbol","Symbol","$JSON","JSON","_stringify","stringify","PROTOTYPE","HIDDEN","TO_PRIMITIVE","isEnum","propertyIsEnumerable","SymbolRegistry","AllSymbols","OPSymbols","ObjectProto","Object","USE_NATIVE","QObject","setter","findChild","setSymbolDesc","get","this","value","a","it","key","D","protoDesc","wrap","tag","sym","_k","isSymbol","iterator","$defineProperty","defineProperty","enumerable","$defineProperties","defineProperties","P","keys","i","l","length","$create","create","$propertyIsEnumerable","E","$getOwnPropertyDescriptor","getOwnPropertyDescriptor","$getOwnPropertyNames","getOwnPropertyNames","names","result","push","$getOwnPropertySymbols","getOwnPropertySymbols","IS_OP","TypeError","arguments","$set","configurable","set","toString","name","G","W","F","symbols","split","store","S","for","keyFor","useSetter","useSimple","replacer","$replacer","args","apply","valueOf","Math","window","self","Function","hasOwnProperty","exec","e","core","ctx","hide","type","source","own","out","IS_FORCED","IS_GLOBAL","IS_STATIC","IS_PROTO","IS_BIND","B","IS_WRAP","expProto","target","C","b","virtual","R","U","version","aFunction","fn","that","object","IE8_DOM_DEFINE","O","Attributes","isObject","document","is","createElement","val","bitmap","writable","setDesc","isExtensible","FREEZE","preventExtensions","setMeta","w","fastKey","getWeak","onFreeze","meta","NEED","px","random","concat","SHARED","def","TAG","stat","prototype","USE_SYMBOL","$exports","LIBRARY","charAt","getKeys","el","index","enumBugKeys","arrayIndexOf","IE_PROTO","IObject","defined","cof","slice","toLength","toIndex","IS_INCLUDES","$this","fromIndex","toInteger","min","ceil","floor","isNaN","max","gOPS","pIE","getSymbols","Array","arg","dPs","Empty","createDict","iframeDocument","iframe","lt","gt","style","display","appendChild","src","contentWindow","open","write","close","Properties","documentElement","windowNames","getWindowNames","hiddenKeys","fails","exp","toObject","$getPrototypeOf","getPrototypeOf","constructor","$freeze","freeze","$seal","seal","$preventExtensions","$isFrozen","isFrozen","$isSealed","isSealed","$isExtensible","assign","$assign","A","K","forEach","k","join","T","aLen","j","x","y","setPrototypeOf","check","proto","test","buggy","__proto__","bind","invoke","arraySlice","factories","construct","len","n","partArgs","bound","un","HAS_INSTANCE","FunctionProto","aNumberValue","repeat","$toFixed","toFixed","data","ERROR","ZERO","multiply","c2","divide","numToString","s","t","String","pow","acc","log","x2","fractionDigits","z","RangeError","msg","count","str","res","Infinity","$toPrecision","toPrecision","precision","EPSILON","_isFinite","isFinite","isInteger","number","abs","isSafeInteger","MAX_SAFE_INTEGER","MIN_SAFE_INTEGER","$parseFloat","Number","parseFloat","$trim","trim","string","spaces","space","non","ltrim","RegExp","rtrim","exporter","ALIAS","FORCE","TYPE","replace","$parseInt","parseInt","ws","hex","radix","log1p","sqrt","$acosh","acosh","MAX_VALUE","NaN","LN2","asinh","$asinh","$atanh","atanh","sign","cbrt","clz32","LOG2E","cosh","$expm1","expm1","EPSILON32","MAX32","MIN32","roundTiesToEven","fround","$abs","$sign","hypot","value1","value2","div","sum","larg","$imul","imul","UINT16","xn","yn","xl","yl","log10","LN10","log2","sinh","tanh","trunc","fromCharCode","$fromCodePoint","fromCodePoint","code","raw","callSite","tpl","$at","codePointAt","pos","TO_STRING","charCodeAt","context","ENDS_WITH","$endsWith","endsWith","searchString","endPosition","end","search","isRegExp","NAME","MATCH","re","INCLUDES","includes","indexOf","STARTS_WITH","$startsWith","startsWith","iterated","_t","_i","point","done","Iterators","$iterCreate","ITERATOR","BUGGY","FF_ITERATOR","KEYS","VALUES","returnThis","Base","Constructor","next","DEFAULT","IS_SET","FORCED","methods","IteratorPrototype","getMethod","kind","values","entries","DEF_VALUES","VALUES_BUG","$native","$default","$entries","$anyNative","descriptor","createHTML","anchor","quot","attribute","p1","toLowerCase","big","blink","bold","fixed","fontcolor","color","fontsize","size","italics","link","url","small","strike","sub","sup","isArrayIter","createProperty","getIterFn","iter","from","arrayLike","step","mapfn","mapping","iterFn","ret","ArrayProto","classof","getIteratorMethod","ARG","tryGet","callee","SAFE_CLOSING","riter","skipClosing","safe","arr","of","arrayJoin","separator","method","html","begin","klass","start","upTo","cloned","$sort","sort","comparefn","$forEach","STRICT","callbackfn","asc","IS_MAP","IS_FILTER","IS_SOME","IS_EVERY","IS_FIND_INDEX","NO_HOLES","speciesConstructor","original","SPECIES","$map","map","$filter","filter","$some","some","$every","every","$reduce","reduce","memo","isRight","reduceRight","$indexOf","NEGATIVE_ZERO","searchElement","lastIndexOf","copyWithin","to","inc","fill","endPos","$find","forced","find","findIndex","addToUnscopables","Arguments","Internal","GenericPromiseCapability","Wrapper","anInstance","forOf","task","microtask","PROMISE","process","$Promise","isNode","empty","promise","resolve","FakePromise","PromiseRejectionEvent","then","sameConstructor","isThenable","newPromiseCapability","PromiseCapability","reject","$$resolve","$$reject","perform","error","notify","isReject","_n","chain","_c","_v","ok","_s","run","reaction","handler","fail","domain","_h","onHandleUnhandled","enter","exit","onUnhandled","abrupt","console","isUnhandled","emit","onunhandledrejection","reason","_a","onrejectionhandled","$reject","_d","_w","$resolve","wrapper","Promise","executor","err","onFulfilled","onRejected","catch","r","capability","all","iterable","remaining","$index","alreadyCalled","race","forbiddenField","BREAK","RETURN","defer","channel","port","cel","setTask","setImmediate","clearTask","clearImmediate","MessageChannel","counter","queue","ONREADYSTATECHANGE","listener","event","nextTick","port2","port1","onmessage","postMessage","addEventListener","importScripts","removeChild","setTimeout","clear","macrotask","Observer","MutationObserver","WebKitMutationObserver","head","last","flush","parent","toggle","node","createTextNode","observe","characterData","strong","Map","entry","getEntry","v","redefineAll","$iterDefine","setSpecies","SIZE","_f","getConstructor","ADDER","_l","delete","prev","setStrong","each","common","IS_WEAK","IS_ADDER","Set","add","InternalMap","weak","uncaughtFrozenStore","ufstore","tmp","WeakMap","$WeakMap","createArrayMethod","$has","arrayFind","arrayFindIndex","UncaughtFrozenStore","findUncaughtFrozen","splice","WeakSet","rApply","Reflect","fApply","thisArgument","argumentsList","L","rConstruct","NEW_TARGET_BUG","ARGS_BUG","Target","newTarget","$args","instance","propertyKey","attributes","deleteProperty","desc","Enumerate","enumerate","receiver","getProto","ownKeys","V","existingDescriptor","ownDesc","setProto","now","Date","getTime","toJSON","toISOString","pv","lz","num","d","getUTCFullYear","getUTCMilliseconds","getUTCMonth","getUTCDate","getUTCHours","getUTCMinutes","getUTCSeconds","$typed","buffer","ArrayBuffer","$ArrayBuffer","$DataView","DataView","$isView","ABV","isView","$slice","VIEW","ARRAY_BUFFER","CONSTR","byteLength","first","final","viewS","viewT","setUint8","getUint8","Typed","TYPED","TypedArrayConstructors","arrayFill","DATA_VIEW","WRONG_LENGTH","WRONG_INDEX","BaseBuffer","BUFFER","BYTE_LENGTH","BYTE_OFFSET","$BUFFER","$LENGTH","$OFFSET","packIEEE754","mLen","nBytes","eLen","eMax","eBias","rt","unpackIEEE754","nBits","unpackI32","bytes","packI8","packI16","packI32","packF64","packF32","addGetter","internal","view","isLittleEndian","numIndex","intIndex","_b","pack","reverse","conversion","validateArrayBufferArguments","numberLength","ArrayBufferProto","$setInt8","setInt8","getInt8","byteOffset","bufferLength","offset","getInt16","getUint16","getInt32","getUint32","getFloat32","getFloat64","setInt16","setUint16","setInt32","setUint32","setFloat32","setFloat64","init","Int8Array","$buffer","propertyDesc","same","createArrayIncludes","ArrayIterators","$iterDetect","arrayCopyWithin","Uint8Array","SHARED_BUFFER","BYTES_PER_ELEMENT","arrayForEach","arrayFilter","arraySome","arrayEvery","arrayIncludes","arrayValues","arrayKeys","arrayEntries","arrayLastIndexOf","arrayReduce","arrayReduceRight","arraySort","arrayToString","arrayToLocaleString","toLocaleString","TYPED_CONSTRUCTOR","DEF_CONSTRUCTOR","ALL_CONSTRUCTORS","TYPED_ARRAY","allocate","LITTLE_ENDIAN","Uint16Array","FORCED_SET","strictToLength","SAME","toOffset","BYTES","validate","speciesFromList","list","fromList","$from","$of","TO_LOCALE_BUG","$toLocaleString","predicate","middle","subarray","$begin","$iterators","isTAIndex","$getDesc","$setDesc","$TypedArrayPrototype$","CLAMPED","ISNT_UINT8","GETTER","SETTER","TypedArray","TAC","TypedArrayPrototype","getter","o","round","addElement","$offset","$length","$len","$nativeIterator","CORRECT_ITER_NAME","$iterator","Uint8ClampedArray","Int16Array","Int32Array","Uint32Array","Float32Array","Float64Array","$includes","at","$pad","padStart","maxLength","fillString","left","stringLength","fillStr","intMaxLength","fillLen","stringFiller","padEnd","trimLeft","trimRight","getFlags","RegExpProto","$RegExpStringIterator","regexp","_r","match","matchAll","flags","rx","lastIndex","ignoreCase","multiline","unicode","sticky","getOwnPropertyDescriptors","getDesc","$values","isEntries","__defineGetter__","__defineSetter__","__lookupGetter__","__lookupSetter__","isError","iaddh","x0","x1","y0","y1","$x0","$x1","$y0","isubh","imulh","u","$u","$v","u0","v0","u1","v1","umulh","metadata","toMetaKey","ordinaryDefineOwnMetadata","defineMetadata","metadataKey","metadataValue","targetKey","getOrCreateMetadataMap","targetMetadata","keyMetadata","ordinaryHasOwnMetadata","MetadataKey","metadataMap","ordinaryGetOwnMetadata","MetadataValue","ordinaryOwnMetadataKeys","_","deleteMetadata","ordinaryGetMetadata","hasOwn","getMetadata","ordinaryMetadataKeys","oKeys","pKeys","getMetadataKeys","getOwnMetadata","getOwnMetadataKeys","ordinaryHasMetadata","hasMetadata","hasOwnMetadata","decorator","asap","OBSERVABLE","cleanupSubscription","subscription","cleanup","subscriptionClosed","_o","closeSubscription","Subscription","observer","subscriber","SubscriptionObserver","unsubscribe","complete","$Observable","Observable","subscribe","observable","items","$task","TO_STRING_TAG","collections","Collection","partial","navigator","MSIE","userAgent","time","setInterval","path","pargs","holder","Dict","dict","isIterable","findKey","isDict","createDictMethod","createDictIter","DictIterator","mapPairs","getIterator","delay","part","define","mixin","make","$re","escape","regExp","&","<",">","\"","'","escapeHTML","&","<",">",""","'","unescapeHTML","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,QAASA,QAAOn8B,GAAK,MAAOk8B,GAAIl8B,OAKjE,SAAS9D,EAAQD,GAEtBC,EAAOD,QAAU,SAASmgC,EAAQvrB,GAChC,GAAIzN,GAAWyN,IAAYvR,OAAOuR,GAAW,SAASirB,GACpD,MAAOjrB,GAAQirB,IACbjrB,CACJ,OAAO,UAAS7Q,GACd,MAAOoO,QAAOpO,GAAI6Q,QAAQurB,EAAQh5B,MAMjC,SAASlH,EAAQD,EAASH,GAG/B,GAAIc,GAAUd,EAAoB,GAC9BogC,EAAMpgC,EAAoB,KAAK,YACjCugC,IAAK,QACLC,IAAK,OACLC,IAAK,OACLC,IAAK,SACLC,IAAK,UAGP7/B,GAAQA,EAAQmE,EAAInE,EAAQ+F,EAAG,UAAW+5B,WAAY,QAASA,cAAc,MAAOR,GAAIr8B,UAInF,SAAS3D,EAAQD,EAASH,GAG/B,GAAIc,GAAUd,EAAoB,GAC9BogC,EAAMpgC,EAAoB,KAAK,8BACjC6gC,QAAU,IACVC,OAAU,IACVC,OAAU,IACVC,SAAU,IACVC,SAAU,KAGZngC,GAAQA,EAAQmE,EAAInE,EAAQ+F,EAAG,UAAWq6B,aAAe,QAASA,gBAAgB,MAAOd,GAAIr8B,YAK1E,mBAAV3D,SAAyBA,OAAOD,QAAQC,OAAOD,QAAUP,EAE1C,kBAAVqgC,SAAwBA,OAAOkB,IAAIlB,OAAO,WAAW,MAAOrgC,KAEtEC,EAAIqI,KAAOtI,GACd,EAAG","file":"library.min.js"}core-js-2.4.1/client/shim.js000066400000000000000000006756201274277553300156730ustar00rootroot00000000000000/** * core-js 2.4.1 * https://github.com/zloirock/core-js * License: http://rock.mit-license.org * © 2016 Denis Pushkarev */ !function(__e, __g, undefined){ 'use strict'; /******/ (function(modules) { // webpackBootstrap /******/ // The module cache /******/ var installedModules = {}; /******/ // The require function /******/ function __webpack_require__(moduleId) { /******/ // Check if module is in cache /******/ if(installedModules[moduleId]) /******/ return installedModules[moduleId].exports; /******/ // Create a new module (and put it into the cache) /******/ var module = installedModules[moduleId] = { /******/ exports: {}, /******/ id: moduleId, /******/ loaded: false /******/ }; /******/ // Execute the module function /******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__); /******/ // Flag the module as loaded /******/ module.loaded = true; /******/ // Return the exports of the module /******/ return module.exports; /******/ } /******/ // expose the modules object (__webpack_modules__) /******/ __webpack_require__.m = modules; /******/ // expose the module cache /******/ __webpack_require__.c = installedModules; /******/ // __webpack_public_path__ /******/ __webpack_require__.p = ""; /******/ // Load entry module and return exports /******/ return __webpack_require__(0); /******/ }) /************************************************************************/ /******/ ([ /* 0 */ /***/ function(module, exports, __webpack_require__) { __webpack_require__(1); __webpack_require__(50); __webpack_require__(51); __webpack_require__(52); __webpack_require__(54); __webpack_require__(55); __webpack_require__(58); __webpack_require__(59); __webpack_require__(60); __webpack_require__(61); __webpack_require__(62); __webpack_require__(63); __webpack_require__(64); __webpack_require__(65); __webpack_require__(66); __webpack_require__(68); __webpack_require__(70); __webpack_require__(72); __webpack_require__(74); __webpack_require__(77); __webpack_require__(78); __webpack_require__(79); __webpack_require__(83); __webpack_require__(86); __webpack_require__(87); __webpack_require__(88); __webpack_require__(89); __webpack_require__(91); __webpack_require__(92); __webpack_require__(93); __webpack_require__(94); __webpack_require__(95); __webpack_require__(97); __webpack_require__(99); __webpack_require__(100); __webpack_require__(101); __webpack_require__(103); __webpack_require__(104); __webpack_require__(105); __webpack_require__(107); __webpack_require__(108); __webpack_require__(109); __webpack_require__(111); __webpack_require__(112); __webpack_require__(113); __webpack_require__(114); __webpack_require__(115); __webpack_require__(116); __webpack_require__(117); __webpack_require__(118); __webpack_require__(119); __webpack_require__(120); __webpack_require__(121); __webpack_require__(122); __webpack_require__(123); __webpack_require__(124); __webpack_require__(126); __webpack_require__(130); __webpack_require__(131); __webpack_require__(132); __webpack_require__(133); __webpack_require__(137); __webpack_require__(139); __webpack_require__(140); __webpack_require__(141); __webpack_require__(142); __webpack_require__(143); __webpack_require__(144); __webpack_require__(145); __webpack_require__(146); __webpack_require__(147); __webpack_require__(148); __webpack_require__(149); __webpack_require__(150); __webpack_require__(151); __webpack_require__(152); __webpack_require__(158); __webpack_require__(159); __webpack_require__(161); __webpack_require__(162); __webpack_require__(163); __webpack_require__(167); __webpack_require__(168); __webpack_require__(169); __webpack_require__(170); __webpack_require__(171); __webpack_require__(173); __webpack_require__(174); __webpack_require__(175); __webpack_require__(176); __webpack_require__(179); __webpack_require__(181); __webpack_require__(182); __webpack_require__(183); __webpack_require__(185); __webpack_require__(187); __webpack_require__(189); __webpack_require__(190); __webpack_require__(191); __webpack_require__(193); __webpack_require__(194); __webpack_require__(195); __webpack_require__(196); __webpack_require__(203); __webpack_require__(206); __webpack_require__(207); __webpack_require__(209); __webpack_require__(210); __webpack_require__(211); __webpack_require__(212); __webpack_require__(213); __webpack_require__(214); __webpack_require__(215); __webpack_require__(216); __webpack_require__(217); __webpack_require__(218); __webpack_require__(219); __webpack_require__(220); __webpack_require__(222); __webpack_require__(223); __webpack_require__(224); __webpack_require__(225); __webpack_require__(226); __webpack_require__(227); __webpack_require__(228); __webpack_require__(229); __webpack_require__(231); __webpack_require__(234); __webpack_require__(235); __webpack_require__(237); __webpack_require__(238); __webpack_require__(239); __webpack_require__(240); __webpack_require__(241); __webpack_require__(242); __webpack_require__(243); __webpack_require__(244); __webpack_require__(245); __webpack_require__(246); __webpack_require__(247); __webpack_require__(249); __webpack_require__(250); __webpack_require__(251); __webpack_require__(252); __webpack_require__(253); __webpack_require__(254); __webpack_require__(255); __webpack_require__(256); __webpack_require__(258); __webpack_require__(259); __webpack_require__(261); __webpack_require__(262); __webpack_require__(263); __webpack_require__(264); __webpack_require__(267); __webpack_require__(268); __webpack_require__(269); __webpack_require__(270); __webpack_require__(271); __webpack_require__(272); __webpack_require__(273); __webpack_require__(274); __webpack_require__(276); __webpack_require__(277); __webpack_require__(278); __webpack_require__(279); __webpack_require__(280); __webpack_require__(281); __webpack_require__(282); __webpack_require__(283); __webpack_require__(284); __webpack_require__(285); __webpack_require__(286); __webpack_require__(287); module.exports = __webpack_require__(288); /***/ }, /* 1 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; // ECMAScript 6 symbols shim var global = __webpack_require__(2) , has = __webpack_require__(3) , DESCRIPTORS = __webpack_require__(4) , $export = __webpack_require__(6) , redefine = __webpack_require__(16) , META = __webpack_require__(20).KEY , $fails = __webpack_require__(5) , shared = __webpack_require__(21) , setToStringTag = __webpack_require__(22) , uid = __webpack_require__(17) , wks = __webpack_require__(23) , wksExt = __webpack_require__(24) , wksDefine = __webpack_require__(25) , keyOf = __webpack_require__(27) , enumKeys = __webpack_require__(40) , isArray = __webpack_require__(43) , anObject = __webpack_require__(10) , toIObject = __webpack_require__(30) , toPrimitive = __webpack_require__(14) , createDesc = __webpack_require__(15) , _create = __webpack_require__(44) , gOPNExt = __webpack_require__(47) , $GOPD = __webpack_require__(49) , $DP = __webpack_require__(9) , $keys = __webpack_require__(28) , gOPD = $GOPD.f , dP = $DP.f , gOPN = gOPNExt.f , $Symbol = global.Symbol , $JSON = global.JSON , _stringify = $JSON && $JSON.stringify , PROTOTYPE = 'prototype' , HIDDEN = wks('_hidden') , TO_PRIMITIVE = wks('toPrimitive') , isEnum = {}.propertyIsEnumerable , SymbolRegistry = shared('symbol-registry') , AllSymbols = shared('symbols') , OPSymbols = shared('op-symbols') , ObjectProto = Object[PROTOTYPE] , USE_NATIVE = typeof $Symbol == 'function' , QObject = global.QObject; // Don't use setters in Qt Script, https://github.com/zloirock/core-js/issues/173 var setter = !QObject || !QObject[PROTOTYPE] || !QObject[PROTOTYPE].findChild; // fallback for old Android, https://code.google.com/p/v8/issues/detail?id=687 var setSymbolDesc = DESCRIPTORS && $fails(function(){ return _create(dP({}, 'a', { get: function(){ return dP(this, 'a', {value: 7}).a; } })).a != 7; }) ? function(it, key, D){ var protoDesc = gOPD(ObjectProto, key); if(protoDesc)delete ObjectProto[key]; dP(it, key, D); if(protoDesc && it !== ObjectProto)dP(ObjectProto, key, protoDesc); } : dP; var wrap = function(tag){ var sym = AllSymbols[tag] = _create($Symbol[PROTOTYPE]); sym._k = tag; return sym; }; var isSymbol = USE_NATIVE && typeof $Symbol.iterator == 'symbol' ? function(it){ return typeof it == 'symbol'; } : function(it){ return it instanceof $Symbol; }; var $defineProperty = function defineProperty(it, key, D){ if(it === ObjectProto)$defineProperty(OPSymbols, key, D); anObject(it); key = toPrimitive(key, true); anObject(D); if(has(AllSymbols, key)){ if(!D.enumerable){ if(!has(it, HIDDEN))dP(it, HIDDEN, createDesc(1, {})); it[HIDDEN][key] = true; } else { if(has(it, HIDDEN) && it[HIDDEN][key])it[HIDDEN][key] = false; D = _create(D, {enumerable: createDesc(0, false)}); } return setSymbolDesc(it, key, D); } return dP(it, key, D); }; var $defineProperties = function defineProperties(it, P){ anObject(it); var keys = enumKeys(P = toIObject(P)) , i = 0 , l = keys.length , key; while(l > i)$defineProperty(it, key = keys[i++], P[key]); return it; }; var $create = function create(it, P){ return P === undefined ? _create(it) : $defineProperties(_create(it), P); }; var $propertyIsEnumerable = function propertyIsEnumerable(key){ var E = isEnum.call(this, key = toPrimitive(key, true)); if(this === ObjectProto && has(AllSymbols, key) && !has(OPSymbols, key))return false; return E || !has(this, key) || !has(AllSymbols, key) || has(this, HIDDEN) && this[HIDDEN][key] ? E : true; }; var $getOwnPropertyDescriptor = function getOwnPropertyDescriptor(it, key){ it = toIObject(it); key = toPrimitive(key, true); if(it === ObjectProto && has(AllSymbols, key) && !has(OPSymbols, key))return; var D = gOPD(it, key); if(D && has(AllSymbols, key) && !(has(it, HIDDEN) && it[HIDDEN][key]))D.enumerable = true; return D; }; var $getOwnPropertyNames = function getOwnPropertyNames(it){ var names = gOPN(toIObject(it)) , result = [] , i = 0 , key; while(names.length > i){ if(!has(AllSymbols, key = names[i++]) && key != HIDDEN && key != META)result.push(key); } return result; }; var $getOwnPropertySymbols = function getOwnPropertySymbols(it){ var IS_OP = it === ObjectProto , names = gOPN(IS_OP ? OPSymbols : toIObject(it)) , result = [] , i = 0 , key; while(names.length > i){ if(has(AllSymbols, key = names[i++]) && (IS_OP ? has(ObjectProto, key) : true))result.push(AllSymbols[key]); } return result; }; // 19.4.1.1 Symbol([description]) if(!USE_NATIVE){ $Symbol = function Symbol(){ if(this instanceof $Symbol)throw TypeError('Symbol is not a constructor!'); var tag = uid(arguments.length > 0 ? arguments[0] : undefined); var $set = function(value){ if(this === ObjectProto)$set.call(OPSymbols, value); if(has(this, HIDDEN) && has(this[HIDDEN], tag))this[HIDDEN][tag] = false; setSymbolDesc(this, tag, createDesc(1, value)); }; if(DESCRIPTORS && setter)setSymbolDesc(ObjectProto, tag, {configurable: true, set: $set}); return wrap(tag); }; redefine($Symbol[PROTOTYPE], 'toString', function toString(){ return this._k; }); $GOPD.f = $getOwnPropertyDescriptor; $DP.f = $defineProperty; __webpack_require__(48).f = gOPNExt.f = $getOwnPropertyNames; __webpack_require__(42).f = $propertyIsEnumerable; __webpack_require__(41).f = $getOwnPropertySymbols; if(DESCRIPTORS && !__webpack_require__(26)){ redefine(ObjectProto, 'propertyIsEnumerable', $propertyIsEnumerable, true); } wksExt.f = function(name){ return wrap(wks(name)); } } $export($export.G + $export.W + $export.F * !USE_NATIVE, {Symbol: $Symbol}); for(var symbols = ( // 19.4.2.2, 19.4.2.3, 19.4.2.4, 19.4.2.6, 19.4.2.8, 19.4.2.9, 19.4.2.10, 19.4.2.11, 19.4.2.12, 19.4.2.13, 19.4.2.14 'hasInstance,isConcatSpreadable,iterator,match,replace,search,species,split,toPrimitive,toStringTag,unscopables' ).split(','), i = 0; symbols.length > i; )wks(symbols[i++]); for(var symbols = $keys(wks.store), i = 0; symbols.length > i; )wksDefine(symbols[i++]); $export($export.S + $export.F * !USE_NATIVE, 'Symbol', { // 19.4.2.1 Symbol.for(key) 'for': function(key){ return has(SymbolRegistry, key += '') ? SymbolRegistry[key] : SymbolRegistry[key] = $Symbol(key); }, // 19.4.2.5 Symbol.keyFor(sym) keyFor: function keyFor(key){ if(isSymbol(key))return keyOf(SymbolRegistry, key); throw TypeError(key + ' is not a symbol!'); }, useSetter: function(){ setter = true; }, useSimple: function(){ setter = false; } }); $export($export.S + $export.F * !USE_NATIVE, 'Object', { // 19.1.2.2 Object.create(O [, Properties]) create: $create, // 19.1.2.4 Object.defineProperty(O, P, Attributes) defineProperty: $defineProperty, // 19.1.2.3 Object.defineProperties(O, Properties) defineProperties: $defineProperties, // 19.1.2.6 Object.getOwnPropertyDescriptor(O, P) getOwnPropertyDescriptor: $getOwnPropertyDescriptor, // 19.1.2.7 Object.getOwnPropertyNames(O) getOwnPropertyNames: $getOwnPropertyNames, // 19.1.2.8 Object.getOwnPropertySymbols(O) getOwnPropertySymbols: $getOwnPropertySymbols }); // 24.3.2 JSON.stringify(value [, replacer [, space]]) $JSON && $export($export.S + $export.F * (!USE_NATIVE || $fails(function(){ var S = $Symbol(); // MS Edge converts symbol values to JSON as {} // WebKit converts symbol values to JSON as null // V8 throws on boxed symbols return _stringify([S]) != '[null]' || _stringify({a: S}) != '{}' || _stringify(Object(S)) != '{}'; })), 'JSON', { stringify: function stringify(it){ if(it === undefined || isSymbol(it))return; // IE8 returns string on undefined var args = [it] , i = 1 , replacer, $replacer; while(arguments.length > i)args.push(arguments[i++]); replacer = args[1]; if(typeof replacer == 'function')$replacer = replacer; if($replacer || !isArray(replacer))replacer = function(key, value){ if($replacer)value = $replacer.call(this, key, value); if(!isSymbol(value))return value; }; args[1] = replacer; return _stringify.apply($JSON, args); } }); // 19.4.3.4 Symbol.prototype[@@toPrimitive](hint) $Symbol[PROTOTYPE][TO_PRIMITIVE] || __webpack_require__(8)($Symbol[PROTOTYPE], TO_PRIMITIVE, $Symbol[PROTOTYPE].valueOf); // 19.4.3.5 Symbol.prototype[@@toStringTag] setToStringTag($Symbol, 'Symbol'); // 20.2.1.9 Math[@@toStringTag] setToStringTag(Math, 'Math', true); // 24.3.3 JSON[@@toStringTag] setToStringTag(global.JSON, 'JSON', true); /***/ }, /* 2 */ /***/ function(module, exports) { // https://github.com/zloirock/core-js/issues/86#issuecomment-115759028 var global = module.exports = typeof window != 'undefined' && window.Math == Math ? window : typeof self != 'undefined' && self.Math == Math ? self : Function('return this')(); if(typeof __g == 'number')__g = global; // eslint-disable-line no-undef /***/ }, /* 3 */ /***/ function(module, exports) { var hasOwnProperty = {}.hasOwnProperty; module.exports = function(it, key){ return hasOwnProperty.call(it, key); }; /***/ }, /* 4 */ /***/ function(module, exports, __webpack_require__) { // Thank's IE8 for his funny defineProperty module.exports = !__webpack_require__(5)(function(){ return Object.defineProperty({}, 'a', {get: function(){ return 7; }}).a != 7; }); /***/ }, /* 5 */ /***/ function(module, exports) { module.exports = function(exec){ try { return !!exec(); } catch(e){ return true; } }; /***/ }, /* 6 */ /***/ function(module, exports, __webpack_require__) { var global = __webpack_require__(2) , core = __webpack_require__(7) , hide = __webpack_require__(8) , redefine = __webpack_require__(16) , ctx = __webpack_require__(18) , PROTOTYPE = 'prototype'; var $export = function(type, name, source){ var IS_FORCED = type & $export.F , IS_GLOBAL = type & $export.G , IS_STATIC = type & $export.S , IS_PROTO = type & $export.P , IS_BIND = type & $export.B , target = IS_GLOBAL ? global : IS_STATIC ? global[name] || (global[name] = {}) : (global[name] || {})[PROTOTYPE] , exports = IS_GLOBAL ? core : core[name] || (core[name] = {}) , expProto = exports[PROTOTYPE] || (exports[PROTOTYPE] = {}) , key, own, out, exp; if(IS_GLOBAL)source = name; for(key in source){ // contains in native own = !IS_FORCED && target && target[key] !== undefined; // export native or passed out = (own ? target : source)[key]; // bind timers to global for call from export context exp = IS_BIND && own ? ctx(out, global) : IS_PROTO && typeof out == 'function' ? ctx(Function.call, out) : out; // extend global if(target)redefine(target, key, out, type & $export.U); // export if(exports[key] != out)hide(exports, key, exp); if(IS_PROTO && expProto[key] != out)expProto[key] = out; } }; global.core = core; // type bitmap $export.F = 1; // forced $export.G = 2; // global $export.S = 4; // static $export.P = 8; // proto $export.B = 16; // bind $export.W = 32; // wrap $export.U = 64; // safe $export.R = 128; // real proto method for `library` module.exports = $export; /***/ }, /* 7 */ /***/ function(module, exports) { var core = module.exports = {version: '2.4.0'}; if(typeof __e == 'number')__e = core; // eslint-disable-line no-undef /***/ }, /* 8 */ /***/ function(module, exports, __webpack_require__) { var dP = __webpack_require__(9) , createDesc = __webpack_require__(15); module.exports = __webpack_require__(4) ? function(object, key, value){ return dP.f(object, key, createDesc(1, value)); } : function(object, key, value){ object[key] = value; return object; }; /***/ }, /* 9 */ /***/ function(module, exports, __webpack_require__) { var anObject = __webpack_require__(10) , IE8_DOM_DEFINE = __webpack_require__(12) , toPrimitive = __webpack_require__(14) , dP = Object.defineProperty; exports.f = __webpack_require__(4) ? Object.defineProperty : function defineProperty(O, P, Attributes){ anObject(O); P = toPrimitive(P, true); anObject(Attributes); if(IE8_DOM_DEFINE)try { return dP(O, P, Attributes); } catch(e){ /* empty */ } if('get' in Attributes || 'set' in Attributes)throw TypeError('Accessors not supported!'); if('value' in Attributes)O[P] = Attributes.value; return O; }; /***/ }, /* 10 */ /***/ function(module, exports, __webpack_require__) { var isObject = __webpack_require__(11); module.exports = function(it){ if(!isObject(it))throw TypeError(it + ' is not an object!'); return it; }; /***/ }, /* 11 */ /***/ function(module, exports) { module.exports = function(it){ return typeof it === 'object' ? it !== null : typeof it === 'function'; }; /***/ }, /* 12 */ /***/ function(module, exports, __webpack_require__) { module.exports = !__webpack_require__(4) && !__webpack_require__(5)(function(){ return Object.defineProperty(__webpack_require__(13)('div'), 'a', {get: function(){ return 7; }}).a != 7; }); /***/ }, /* 13 */ /***/ function(module, exports, __webpack_require__) { var isObject = __webpack_require__(11) , document = __webpack_require__(2).document // in old IE typeof document.createElement is 'object' , is = isObject(document) && isObject(document.createElement); module.exports = function(it){ return is ? document.createElement(it) : {}; }; /***/ }, /* 14 */ /***/ function(module, exports, __webpack_require__) { // 7.1.1 ToPrimitive(input [, PreferredType]) var isObject = __webpack_require__(11); // instead of the ES6 spec version, we didn't implement @@toPrimitive case // and the second argument - flag - preferred type is a string module.exports = function(it, S){ if(!isObject(it))return it; var fn, val; if(S && typeof (fn = it.toString) == 'function' && !isObject(val = fn.call(it)))return val; if(typeof (fn = it.valueOf) == 'function' && !isObject(val = fn.call(it)))return val; if(!S && typeof (fn = it.toString) == 'function' && !isObject(val = fn.call(it)))return val; throw TypeError("Can't convert object to primitive value"); }; /***/ }, /* 15 */ /***/ function(module, exports) { module.exports = function(bitmap, value){ return { enumerable : !(bitmap & 1), configurable: !(bitmap & 2), writable : !(bitmap & 4), value : value }; }; /***/ }, /* 16 */ /***/ function(module, exports, __webpack_require__) { var global = __webpack_require__(2) , hide = __webpack_require__(8) , has = __webpack_require__(3) , SRC = __webpack_require__(17)('src') , TO_STRING = 'toString' , $toString = Function[TO_STRING] , TPL = ('' + $toString).split(TO_STRING); __webpack_require__(7).inspectSource = function(it){ return $toString.call(it); }; (module.exports = function(O, key, val, safe){ var isFunction = typeof val == 'function'; if(isFunction)has(val, 'name') || hide(val, 'name', key); if(O[key] === val)return; if(isFunction)has(val, SRC) || hide(val, SRC, O[key] ? '' + O[key] : TPL.join(String(key))); if(O === global){ O[key] = val; } else { if(!safe){ delete O[key]; hide(O, key, val); } else { if(O[key])O[key] = val; else hide(O, key, val); } } // add fake Function#toString for correct work wrapped methods / constructors with methods like LoDash isNative })(Function.prototype, TO_STRING, function toString(){ return typeof this == 'function' && this[SRC] || $toString.call(this); }); /***/ }, /* 17 */ /***/ function(module, exports) { var id = 0 , px = Math.random(); module.exports = function(key){ return 'Symbol('.concat(key === undefined ? '' : key, ')_', (++id + px).toString(36)); }; /***/ }, /* 18 */ /***/ function(module, exports, __webpack_require__) { // optional / simple context binding var aFunction = __webpack_require__(19); module.exports = function(fn, that, length){ aFunction(fn); if(that === undefined)return fn; switch(length){ case 1: return function(a){ return fn.call(that, a); }; case 2: return function(a, b){ return fn.call(that, a, b); }; case 3: return function(a, b, c){ return fn.call(that, a, b, c); }; } return function(/* ...args */){ return fn.apply(that, arguments); }; }; /***/ }, /* 19 */ /***/ function(module, exports) { module.exports = function(it){ if(typeof it != 'function')throw TypeError(it + ' is not a function!'); return it; }; /***/ }, /* 20 */ /***/ function(module, exports, __webpack_require__) { var META = __webpack_require__(17)('meta') , isObject = __webpack_require__(11) , has = __webpack_require__(3) , setDesc = __webpack_require__(9).f , id = 0; var isExtensible = Object.isExtensible || function(){ return true; }; var FREEZE = !__webpack_require__(5)(function(){ return isExtensible(Object.preventExtensions({})); }); var setMeta = function(it){ setDesc(it, META, {value: { i: 'O' + ++id, // object ID w: {} // weak collections IDs }}); }; var fastKey = function(it, create){ // return primitive with prefix if(!isObject(it))return typeof it == 'symbol' ? it : (typeof it == 'string' ? 'S' : 'P') + it; if(!has(it, META)){ // can't set metadata to uncaught frozen object if(!isExtensible(it))return 'F'; // not necessary to add metadata if(!create)return 'E'; // add missing metadata setMeta(it); // return object ID } return it[META].i; }; var getWeak = function(it, create){ if(!has(it, META)){ // can't set metadata to uncaught frozen object if(!isExtensible(it))return true; // not necessary to add metadata if(!create)return false; // add missing metadata setMeta(it); // return hash weak collections IDs } return it[META].w; }; // add metadata on freeze-family methods calling var onFreeze = function(it){ if(FREEZE && meta.NEED && isExtensible(it) && !has(it, META))setMeta(it); return it; }; var meta = module.exports = { KEY: META, NEED: false, fastKey: fastKey, getWeak: getWeak, onFreeze: onFreeze }; /***/ }, /* 21 */ /***/ function(module, exports, __webpack_require__) { var global = __webpack_require__(2) , SHARED = '__core-js_shared__' , store = global[SHARED] || (global[SHARED] = {}); module.exports = function(key){ return store[key] || (store[key] = {}); }; /***/ }, /* 22 */ /***/ function(module, exports, __webpack_require__) { var def = __webpack_require__(9).f , has = __webpack_require__(3) , TAG = __webpack_require__(23)('toStringTag'); module.exports = function(it, tag, stat){ if(it && !has(it = stat ? it : it.prototype, TAG))def(it, TAG, {configurable: true, value: tag}); }; /***/ }, /* 23 */ /***/ function(module, exports, __webpack_require__) { var store = __webpack_require__(21)('wks') , uid = __webpack_require__(17) , Symbol = __webpack_require__(2).Symbol , USE_SYMBOL = typeof Symbol == 'function'; var $exports = module.exports = function(name){ return store[name] || (store[name] = USE_SYMBOL && Symbol[name] || (USE_SYMBOL ? Symbol : uid)('Symbol.' + name)); }; $exports.store = store; /***/ }, /* 24 */ /***/ function(module, exports, __webpack_require__) { exports.f = __webpack_require__(23); /***/ }, /* 25 */ /***/ function(module, exports, __webpack_require__) { var global = __webpack_require__(2) , core = __webpack_require__(7) , LIBRARY = __webpack_require__(26) , wksExt = __webpack_require__(24) , defineProperty = __webpack_require__(9).f; module.exports = function(name){ var $Symbol = core.Symbol || (core.Symbol = LIBRARY ? {} : global.Symbol || {}); if(name.charAt(0) != '_' && !(name in $Symbol))defineProperty($Symbol, name, {value: wksExt.f(name)}); }; /***/ }, /* 26 */ /***/ function(module, exports) { module.exports = false; /***/ }, /* 27 */ /***/ function(module, exports, __webpack_require__) { var getKeys = __webpack_require__(28) , toIObject = __webpack_require__(30); module.exports = function(object, el){ var O = toIObject(object) , keys = getKeys(O) , length = keys.length , index = 0 , key; while(length > index)if(O[key = keys[index++]] === el)return key; }; /***/ }, /* 28 */ /***/ function(module, exports, __webpack_require__) { // 19.1.2.14 / 15.2.3.14 Object.keys(O) var $keys = __webpack_require__(29) , enumBugKeys = __webpack_require__(39); module.exports = Object.keys || function keys(O){ return $keys(O, enumBugKeys); }; /***/ }, /* 29 */ /***/ function(module, exports, __webpack_require__) { var has = __webpack_require__(3) , toIObject = __webpack_require__(30) , arrayIndexOf = __webpack_require__(34)(false) , IE_PROTO = __webpack_require__(38)('IE_PROTO'); module.exports = function(object, names){ var O = toIObject(object) , i = 0 , result = [] , key; for(key in O)if(key != IE_PROTO)has(O, key) && result.push(key); // Don't enum bug & hidden keys while(names.length > i)if(has(O, key = names[i++])){ ~arrayIndexOf(result, key) || result.push(key); } return result; }; /***/ }, /* 30 */ /***/ function(module, exports, __webpack_require__) { // to indexed object, toObject with fallback for non-array-like ES3 strings var IObject = __webpack_require__(31) , defined = __webpack_require__(33); module.exports = function(it){ return IObject(defined(it)); }; /***/ }, /* 31 */ /***/ function(module, exports, __webpack_require__) { // fallback for non-array-like ES3 and non-enumerable old V8 strings var cof = __webpack_require__(32); module.exports = Object('z').propertyIsEnumerable(0) ? Object : function(it){ return cof(it) == 'String' ? it.split('') : Object(it); }; /***/ }, /* 32 */ /***/ function(module, exports) { var toString = {}.toString; module.exports = function(it){ return toString.call(it).slice(8, -1); }; /***/ }, /* 33 */ /***/ function(module, exports) { // 7.2.1 RequireObjectCoercible(argument) module.exports = function(it){ if(it == undefined)throw TypeError("Can't call method on " + it); return it; }; /***/ }, /* 34 */ /***/ function(module, exports, __webpack_require__) { // false -> Array#indexOf // true -> Array#includes var toIObject = __webpack_require__(30) , toLength = __webpack_require__(35) , toIndex = __webpack_require__(37); module.exports = function(IS_INCLUDES){ return function($this, el, fromIndex){ var O = toIObject($this) , length = toLength(O.length) , index = toIndex(fromIndex, length) , value; // Array#includes uses SameValueZero equality algorithm if(IS_INCLUDES && el != el)while(length > index){ value = O[index++]; if(value != value)return true; // Array#toIndex ignores holes, Array#includes - not } else for(;length > index; index++)if(IS_INCLUDES || index in O){ if(O[index] === el)return IS_INCLUDES || index || 0; } return !IS_INCLUDES && -1; }; }; /***/ }, /* 35 */ /***/ function(module, exports, __webpack_require__) { // 7.1.15 ToLength var toInteger = __webpack_require__(36) , min = Math.min; module.exports = function(it){ return it > 0 ? min(toInteger(it), 0x1fffffffffffff) : 0; // pow(2, 53) - 1 == 9007199254740991 }; /***/ }, /* 36 */ /***/ function(module, exports) { // 7.1.4 ToInteger var ceil = Math.ceil , floor = Math.floor; module.exports = function(it){ return isNaN(it = +it) ? 0 : (it > 0 ? floor : ceil)(it); }; /***/ }, /* 37 */ /***/ function(module, exports, __webpack_require__) { var toInteger = __webpack_require__(36) , max = Math.max , min = Math.min; module.exports = function(index, length){ index = toInteger(index); return index < 0 ? max(index + length, 0) : min(index, length); }; /***/ }, /* 38 */ /***/ function(module, exports, __webpack_require__) { var shared = __webpack_require__(21)('keys') , uid = __webpack_require__(17); module.exports = function(key){ return shared[key] || (shared[key] = uid(key)); }; /***/ }, /* 39 */ /***/ function(module, exports) { // IE 8- don't enum bug keys module.exports = ( 'constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf' ).split(','); /***/ }, /* 40 */ /***/ function(module, exports, __webpack_require__) { // all enumerable object keys, includes symbols var getKeys = __webpack_require__(28) , gOPS = __webpack_require__(41) , pIE = __webpack_require__(42); module.exports = function(it){ var result = getKeys(it) , getSymbols = gOPS.f; if(getSymbols){ var symbols = getSymbols(it) , isEnum = pIE.f , i = 0 , key; while(symbols.length > i)if(isEnum.call(it, key = symbols[i++]))result.push(key); } return result; }; /***/ }, /* 41 */ /***/ function(module, exports) { exports.f = Object.getOwnPropertySymbols; /***/ }, /* 42 */ /***/ function(module, exports) { exports.f = {}.propertyIsEnumerable; /***/ }, /* 43 */ /***/ function(module, exports, __webpack_require__) { // 7.2.2 IsArray(argument) var cof = __webpack_require__(32); module.exports = Array.isArray || function isArray(arg){ return cof(arg) == 'Array'; }; /***/ }, /* 44 */ /***/ function(module, exports, __webpack_require__) { // 19.1.2.2 / 15.2.3.5 Object.create(O [, Properties]) var anObject = __webpack_require__(10) , dPs = __webpack_require__(45) , enumBugKeys = __webpack_require__(39) , IE_PROTO = __webpack_require__(38)('IE_PROTO') , Empty = function(){ /* empty */ } , PROTOTYPE = 'prototype'; // Create object with fake `null` prototype: use iframe Object with cleared prototype var createDict = function(){ // Thrash, waste and sodomy: IE GC bug var iframe = __webpack_require__(13)('iframe') , i = enumBugKeys.length , lt = '<' , gt = '>' , iframeDocument; iframe.style.display = 'none'; __webpack_require__(46).appendChild(iframe); iframe.src = 'javascript:'; // eslint-disable-line no-script-url // createDict = iframe.contentWindow.Object; // html.removeChild(iframe); iframeDocument = iframe.contentWindow.document; iframeDocument.open(); iframeDocument.write(lt + 'script' + gt + 'document.F=Object' + lt + '/script' + gt); iframeDocument.close(); createDict = iframeDocument.F; while(i--)delete createDict[PROTOTYPE][enumBugKeys[i]]; return createDict(); }; module.exports = Object.create || function create(O, Properties){ var result; if(O !== null){ Empty[PROTOTYPE] = anObject(O); result = new Empty; Empty[PROTOTYPE] = null; // add "__proto__" for Object.getPrototypeOf polyfill result[IE_PROTO] = O; } else result = createDict(); return Properties === undefined ? result : dPs(result, Properties); }; /***/ }, /* 45 */ /***/ function(module, exports, __webpack_require__) { var dP = __webpack_require__(9) , anObject = __webpack_require__(10) , getKeys = __webpack_require__(28); module.exports = __webpack_require__(4) ? Object.defineProperties : function defineProperties(O, Properties){ anObject(O); var keys = getKeys(Properties) , length = keys.length , i = 0 , P; while(length > i)dP.f(O, P = keys[i++], Properties[P]); return O; }; /***/ }, /* 46 */ /***/ function(module, exports, __webpack_require__) { module.exports = __webpack_require__(2).document && document.documentElement; /***/ }, /* 47 */ /***/ function(module, exports, __webpack_require__) { // fallback for IE11 buggy Object.getOwnPropertyNames with iframe and window var toIObject = __webpack_require__(30) , gOPN = __webpack_require__(48).f , toString = {}.toString; var windowNames = typeof window == 'object' && window && Object.getOwnPropertyNames ? Object.getOwnPropertyNames(window) : []; var getWindowNames = function(it){ try { return gOPN(it); } catch(e){ return windowNames.slice(); } }; module.exports.f = function getOwnPropertyNames(it){ return windowNames && toString.call(it) == '[object Window]' ? getWindowNames(it) : gOPN(toIObject(it)); }; /***/ }, /* 48 */ /***/ function(module, exports, __webpack_require__) { // 19.1.2.7 / 15.2.3.4 Object.getOwnPropertyNames(O) var $keys = __webpack_require__(29) , hiddenKeys = __webpack_require__(39).concat('length', 'prototype'); exports.f = Object.getOwnPropertyNames || function getOwnPropertyNames(O){ return $keys(O, hiddenKeys); }; /***/ }, /* 49 */ /***/ function(module, exports, __webpack_require__) { var pIE = __webpack_require__(42) , createDesc = __webpack_require__(15) , toIObject = __webpack_require__(30) , toPrimitive = __webpack_require__(14) , has = __webpack_require__(3) , IE8_DOM_DEFINE = __webpack_require__(12) , gOPD = Object.getOwnPropertyDescriptor; exports.f = __webpack_require__(4) ? gOPD : function getOwnPropertyDescriptor(O, P){ O = toIObject(O); P = toPrimitive(P, true); if(IE8_DOM_DEFINE)try { return gOPD(O, P); } catch(e){ /* empty */ } if(has(O, P))return createDesc(!pIE.f.call(O, P), O[P]); }; /***/ }, /* 50 */ /***/ function(module, exports, __webpack_require__) { var $export = __webpack_require__(6); // 19.1.2.4 / 15.2.3.6 Object.defineProperty(O, P, Attributes) $export($export.S + $export.F * !__webpack_require__(4), 'Object', {defineProperty: __webpack_require__(9).f}); /***/ }, /* 51 */ /***/ function(module, exports, __webpack_require__) { var $export = __webpack_require__(6); // 19.1.2.3 / 15.2.3.7 Object.defineProperties(O, Properties) $export($export.S + $export.F * !__webpack_require__(4), 'Object', {defineProperties: __webpack_require__(45)}); /***/ }, /* 52 */ /***/ function(module, exports, __webpack_require__) { // 19.1.2.6 Object.getOwnPropertyDescriptor(O, P) var toIObject = __webpack_require__(30) , $getOwnPropertyDescriptor = __webpack_require__(49).f; __webpack_require__(53)('getOwnPropertyDescriptor', function(){ return function getOwnPropertyDescriptor(it, key){ return $getOwnPropertyDescriptor(toIObject(it), key); }; }); /***/ }, /* 53 */ /***/ function(module, exports, __webpack_require__) { // most Object methods by ES6 should accept primitives var $export = __webpack_require__(6) , core = __webpack_require__(7) , fails = __webpack_require__(5); module.exports = function(KEY, exec){ var fn = (core.Object || {})[KEY] || Object[KEY] , exp = {}; exp[KEY] = exec(fn); $export($export.S + $export.F * fails(function(){ fn(1); }), 'Object', exp); }; /***/ }, /* 54 */ /***/ function(module, exports, __webpack_require__) { var $export = __webpack_require__(6) // 19.1.2.2 / 15.2.3.5 Object.create(O [, Properties]) $export($export.S, 'Object', {create: __webpack_require__(44)}); /***/ }, /* 55 */ /***/ function(module, exports, __webpack_require__) { // 19.1.2.9 Object.getPrototypeOf(O) var toObject = __webpack_require__(56) , $getPrototypeOf = __webpack_require__(57); __webpack_require__(53)('getPrototypeOf', function(){ return function getPrototypeOf(it){ return $getPrototypeOf(toObject(it)); }; }); /***/ }, /* 56 */ /***/ function(module, exports, __webpack_require__) { // 7.1.13 ToObject(argument) var defined = __webpack_require__(33); module.exports = function(it){ return Object(defined(it)); }; /***/ }, /* 57 */ /***/ function(module, exports, __webpack_require__) { // 19.1.2.9 / 15.2.3.2 Object.getPrototypeOf(O) var has = __webpack_require__(3) , toObject = __webpack_require__(56) , IE_PROTO = __webpack_require__(38)('IE_PROTO') , ObjectProto = Object.prototype; module.exports = Object.getPrototypeOf || function(O){ O = toObject(O); if(has(O, IE_PROTO))return O[IE_PROTO]; if(typeof O.constructor == 'function' && O instanceof O.constructor){ return O.constructor.prototype; } return O instanceof Object ? ObjectProto : null; }; /***/ }, /* 58 */ /***/ function(module, exports, __webpack_require__) { // 19.1.2.14 Object.keys(O) var toObject = __webpack_require__(56) , $keys = __webpack_require__(28); __webpack_require__(53)('keys', function(){ return function keys(it){ return $keys(toObject(it)); }; }); /***/ }, /* 59 */ /***/ function(module, exports, __webpack_require__) { // 19.1.2.7 Object.getOwnPropertyNames(O) __webpack_require__(53)('getOwnPropertyNames', function(){ return __webpack_require__(47).f; }); /***/ }, /* 60 */ /***/ function(module, exports, __webpack_require__) { // 19.1.2.5 Object.freeze(O) var isObject = __webpack_require__(11) , meta = __webpack_require__(20).onFreeze; __webpack_require__(53)('freeze', function($freeze){ return function freeze(it){ return $freeze && isObject(it) ? $freeze(meta(it)) : it; }; }); /***/ }, /* 61 */ /***/ function(module, exports, __webpack_require__) { // 19.1.2.17 Object.seal(O) var isObject = __webpack_require__(11) , meta = __webpack_require__(20).onFreeze; __webpack_require__(53)('seal', function($seal){ return function seal(it){ return $seal && isObject(it) ? $seal(meta(it)) : it; }; }); /***/ }, /* 62 */ /***/ function(module, exports, __webpack_require__) { // 19.1.2.15 Object.preventExtensions(O) var isObject = __webpack_require__(11) , meta = __webpack_require__(20).onFreeze; __webpack_require__(53)('preventExtensions', function($preventExtensions){ return function preventExtensions(it){ return $preventExtensions && isObject(it) ? $preventExtensions(meta(it)) : it; }; }); /***/ }, /* 63 */ /***/ function(module, exports, __webpack_require__) { // 19.1.2.12 Object.isFrozen(O) var isObject = __webpack_require__(11); __webpack_require__(53)('isFrozen', function($isFrozen){ return function isFrozen(it){ return isObject(it) ? $isFrozen ? $isFrozen(it) : false : true; }; }); /***/ }, /* 64 */ /***/ function(module, exports, __webpack_require__) { // 19.1.2.13 Object.isSealed(O) var isObject = __webpack_require__(11); __webpack_require__(53)('isSealed', function($isSealed){ return function isSealed(it){ return isObject(it) ? $isSealed ? $isSealed(it) : false : true; }; }); /***/ }, /* 65 */ /***/ function(module, exports, __webpack_require__) { // 19.1.2.11 Object.isExtensible(O) var isObject = __webpack_require__(11); __webpack_require__(53)('isExtensible', function($isExtensible){ return function isExtensible(it){ return isObject(it) ? $isExtensible ? $isExtensible(it) : true : false; }; }); /***/ }, /* 66 */ /***/ function(module, exports, __webpack_require__) { // 19.1.3.1 Object.assign(target, source) var $export = __webpack_require__(6); $export($export.S + $export.F, 'Object', {assign: __webpack_require__(67)}); /***/ }, /* 67 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; // 19.1.2.1 Object.assign(target, source, ...) var getKeys = __webpack_require__(28) , gOPS = __webpack_require__(41) , pIE = __webpack_require__(42) , toObject = __webpack_require__(56) , IObject = __webpack_require__(31) , $assign = Object.assign; // should work with symbols and should have deterministic property order (V8 bug) module.exports = !$assign || __webpack_require__(5)(function(){ var A = {} , B = {} , S = Symbol() , K = 'abcdefghijklmnopqrst'; A[S] = 7; K.split('').forEach(function(k){ B[k] = k; }); return $assign({}, A)[S] != 7 || Object.keys($assign({}, B)).join('') != K; }) ? function assign(target, source){ // eslint-disable-line no-unused-vars var T = toObject(target) , aLen = arguments.length , index = 1 , getSymbols = gOPS.f , isEnum = pIE.f; while(aLen > index){ var S = IObject(arguments[index++]) , keys = getSymbols ? getKeys(S).concat(getSymbols(S)) : getKeys(S) , length = keys.length , j = 0 , key; while(length > j)if(isEnum.call(S, key = keys[j++]))T[key] = S[key]; } return T; } : $assign; /***/ }, /* 68 */ /***/ function(module, exports, __webpack_require__) { // 19.1.3.10 Object.is(value1, value2) var $export = __webpack_require__(6); $export($export.S, 'Object', {is: __webpack_require__(69)}); /***/ }, /* 69 */ /***/ function(module, exports) { // 7.2.9 SameValue(x, y) module.exports = Object.is || function is(x, y){ return x === y ? x !== 0 || 1 / x === 1 / y : x != x && y != y; }; /***/ }, /* 70 */ /***/ function(module, exports, __webpack_require__) { // 19.1.3.19 Object.setPrototypeOf(O, proto) var $export = __webpack_require__(6); $export($export.S, 'Object', {setPrototypeOf: __webpack_require__(71).set}); /***/ }, /* 71 */ /***/ function(module, exports, __webpack_require__) { // Works with __proto__ only. Old v8 can't work with null proto objects. /* eslint-disable no-proto */ var isObject = __webpack_require__(11) , anObject = __webpack_require__(10); var check = function(O, proto){ anObject(O); if(!isObject(proto) && proto !== null)throw TypeError(proto + ": can't set as prototype!"); }; module.exports = { set: Object.setPrototypeOf || ('__proto__' in {} ? // eslint-disable-line function(test, buggy, set){ try { set = __webpack_require__(18)(Function.call, __webpack_require__(49).f(Object.prototype, '__proto__').set, 2); set(test, []); buggy = !(test instanceof Array); } catch(e){ buggy = true; } return function setPrototypeOf(O, proto){ check(O, proto); if(buggy)O.__proto__ = proto; else set(O, proto); return O; }; }({}, false) : undefined), check: check }; /***/ }, /* 72 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; // 19.1.3.6 Object.prototype.toString() var classof = __webpack_require__(73) , test = {}; test[__webpack_require__(23)('toStringTag')] = 'z'; if(test + '' != '[object z]'){ __webpack_require__(16)(Object.prototype, 'toString', function toString(){ return '[object ' + classof(this) + ']'; }, true); } /***/ }, /* 73 */ /***/ function(module, exports, __webpack_require__) { // getting tag from 19.1.3.6 Object.prototype.toString() var cof = __webpack_require__(32) , TAG = __webpack_require__(23)('toStringTag') // ES3 wrong here , ARG = cof(function(){ return arguments; }()) == 'Arguments'; // fallback for IE11 Script Access Denied error var tryGet = function(it, key){ try { return it[key]; } catch(e){ /* empty */ } }; module.exports = function(it){ var O, T, B; return it === undefined ? 'Undefined' : it === null ? 'Null' // @@toStringTag case : typeof (T = tryGet(O = Object(it), TAG)) == 'string' ? T // builtinTag case : ARG ? cof(O) // ES3 arguments fallback : (B = cof(O)) == 'Object' && typeof O.callee == 'function' ? 'Arguments' : B; }; /***/ }, /* 74 */ /***/ function(module, exports, __webpack_require__) { // 19.2.3.2 / 15.3.4.5 Function.prototype.bind(thisArg, args...) var $export = __webpack_require__(6); $export($export.P, 'Function', {bind: __webpack_require__(75)}); /***/ }, /* 75 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; var aFunction = __webpack_require__(19) , isObject = __webpack_require__(11) , invoke = __webpack_require__(76) , arraySlice = [].slice , factories = {}; var construct = function(F, len, args){ if(!(len in factories)){ for(var n = [], i = 0; i < len; i++)n[i] = 'a[' + i + ']'; factories[len] = Function('F,a', 'return new F(' + n.join(',') + ')'); } return factories[len](F, args); }; module.exports = Function.bind || function bind(that /*, args... */){ var fn = aFunction(this) , partArgs = arraySlice.call(arguments, 1); var bound = function(/* args... */){ var args = partArgs.concat(arraySlice.call(arguments)); return this instanceof bound ? construct(fn, args.length, args) : invoke(fn, args, that); }; if(isObject(fn.prototype))bound.prototype = fn.prototype; return bound; }; /***/ }, /* 76 */ /***/ function(module, exports) { // fast apply, http://jsperf.lnkit.com/fast-apply/5 module.exports = function(fn, args, that){ var un = that === undefined; switch(args.length){ case 0: return un ? fn() : fn.call(that); case 1: return un ? fn(args[0]) : fn.call(that, args[0]); case 2: return un ? fn(args[0], args[1]) : fn.call(that, args[0], args[1]); case 3: return un ? fn(args[0], args[1], args[2]) : fn.call(that, args[0], args[1], args[2]); case 4: return un ? fn(args[0], args[1], args[2], args[3]) : fn.call(that, args[0], args[1], args[2], args[3]); } return fn.apply(that, args); }; /***/ }, /* 77 */ /***/ function(module, exports, __webpack_require__) { var dP = __webpack_require__(9).f , createDesc = __webpack_require__(15) , has = __webpack_require__(3) , FProto = Function.prototype , nameRE = /^\s*function ([^ (]*)/ , NAME = 'name'; var isExtensible = Object.isExtensible || function(){ return true; }; // 19.2.4.2 name NAME in FProto || __webpack_require__(4) && dP(FProto, NAME, { configurable: true, get: function(){ try { var that = this , name = ('' + that).match(nameRE)[1]; has(that, NAME) || !isExtensible(that) || dP(that, NAME, createDesc(5, name)); return name; } catch(e){ return ''; } } }); /***/ }, /* 78 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; var isObject = __webpack_require__(11) , getPrototypeOf = __webpack_require__(57) , HAS_INSTANCE = __webpack_require__(23)('hasInstance') , FunctionProto = Function.prototype; // 19.2.3.6 Function.prototype[@@hasInstance](V) if(!(HAS_INSTANCE in FunctionProto))__webpack_require__(9).f(FunctionProto, HAS_INSTANCE, {value: function(O){ if(typeof this != 'function' || !isObject(O))return false; if(!isObject(this.prototype))return O instanceof this; // for environment w/o native `@@hasInstance` logic enough `instanceof`, but add this: while(O = getPrototypeOf(O))if(this.prototype === O)return true; return false; }}); /***/ }, /* 79 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; var global = __webpack_require__(2) , has = __webpack_require__(3) , cof = __webpack_require__(32) , inheritIfRequired = __webpack_require__(80) , toPrimitive = __webpack_require__(14) , fails = __webpack_require__(5) , gOPN = __webpack_require__(48).f , gOPD = __webpack_require__(49).f , dP = __webpack_require__(9).f , $trim = __webpack_require__(81).trim , NUMBER = 'Number' , $Number = global[NUMBER] , Base = $Number , proto = $Number.prototype // Opera ~12 has broken Object#toString , BROKEN_COF = cof(__webpack_require__(44)(proto)) == NUMBER , TRIM = 'trim' in String.prototype; // 7.1.3 ToNumber(argument) var toNumber = function(argument){ var it = toPrimitive(argument, false); if(typeof it == 'string' && it.length > 2){ it = TRIM ? it.trim() : $trim(it, 3); var first = it.charCodeAt(0) , third, radix, maxCode; if(first === 43 || first === 45){ third = it.charCodeAt(2); if(third === 88 || third === 120)return NaN; // Number('+0x1') should be NaN, old V8 fix } else if(first === 48){ switch(it.charCodeAt(1)){ case 66 : case 98 : radix = 2; maxCode = 49; break; // fast equal /^0b[01]+$/i case 79 : case 111 : radix = 8; maxCode = 55; break; // fast equal /^0o[0-7]+$/i default : return +it; } for(var digits = it.slice(2), i = 0, l = digits.length, code; i < l; i++){ code = digits.charCodeAt(i); // parseInt parses a string to a first unavailable symbol // but ToNumber should return NaN if a string contains unavailable symbols if(code < 48 || code > maxCode)return NaN; } return parseInt(digits, radix); } } return +it; }; if(!$Number(' 0o1') || !$Number('0b1') || $Number('+0x1')){ $Number = function Number(value){ var it = arguments.length < 1 ? 0 : value , that = this; return that instanceof $Number // check on 1..constructor(foo) case && (BROKEN_COF ? fails(function(){ proto.valueOf.call(that); }) : cof(that) != NUMBER) ? inheritIfRequired(new Base(toNumber(it)), that, $Number) : toNumber(it); }; for(var keys = __webpack_require__(4) ? gOPN(Base) : ( // ES3: 'MAX_VALUE,MIN_VALUE,NaN,NEGATIVE_INFINITY,POSITIVE_INFINITY,' + // ES6 (in case, if modules with ES6 Number statics required before): 'EPSILON,isFinite,isInteger,isNaN,isSafeInteger,MAX_SAFE_INTEGER,' + 'MIN_SAFE_INTEGER,parseFloat,parseInt,isInteger' ).split(','), j = 0, key; keys.length > j; j++){ if(has(Base, key = keys[j]) && !has($Number, key)){ dP($Number, key, gOPD(Base, key)); } } $Number.prototype = proto; proto.constructor = $Number; __webpack_require__(16)(global, NUMBER, $Number); } /***/ }, /* 80 */ /***/ function(module, exports, __webpack_require__) { var isObject = __webpack_require__(11) , setPrototypeOf = __webpack_require__(71).set; module.exports = function(that, target, C){ var P, S = target.constructor; if(S !== C && typeof S == 'function' && (P = S.prototype) !== C.prototype && isObject(P) && setPrototypeOf){ setPrototypeOf(that, P); } return that; }; /***/ }, /* 81 */ /***/ function(module, exports, __webpack_require__) { var $export = __webpack_require__(6) , defined = __webpack_require__(33) , fails = __webpack_require__(5) , spaces = __webpack_require__(82) , space = '[' + spaces + ']' , non = '\u200b\u0085' , ltrim = RegExp('^' + space + space + '*') , rtrim = RegExp(space + space + '*$'); var exporter = function(KEY, exec, ALIAS){ var exp = {}; var FORCE = fails(function(){ return !!spaces[KEY]() || non[KEY]() != non; }); var fn = exp[KEY] = FORCE ? exec(trim) : spaces[KEY]; if(ALIAS)exp[ALIAS] = fn; $export($export.P + $export.F * FORCE, 'String', exp); }; // 1 -> String#trimLeft // 2 -> String#trimRight // 3 -> String#trim var trim = exporter.trim = function(string, TYPE){ string = String(defined(string)); if(TYPE & 1)string = string.replace(ltrim, ''); if(TYPE & 2)string = string.replace(rtrim, ''); return string; }; module.exports = exporter; /***/ }, /* 82 */ /***/ function(module, exports) { module.exports = '\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u180E\u2000\u2001\u2002\u2003' + '\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF'; /***/ }, /* 83 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; var $export = __webpack_require__(6) , toInteger = __webpack_require__(36) , aNumberValue = __webpack_require__(84) , repeat = __webpack_require__(85) , $toFixed = 1..toFixed , floor = Math.floor , data = [0, 0, 0, 0, 0, 0] , ERROR = 'Number.toFixed: incorrect invocation!' , ZERO = '0'; var multiply = function(n, c){ var i = -1 , c2 = c; while(++i < 6){ c2 += n * data[i]; data[i] = c2 % 1e7; c2 = floor(c2 / 1e7); } }; var divide = function(n){ var i = 6 , c = 0; while(--i >= 0){ c += data[i]; data[i] = floor(c / n); c = (c % n) * 1e7; } }; var numToString = function(){ var i = 6 , s = ''; while(--i >= 0){ if(s !== '' || i === 0 || data[i] !== 0){ var t = String(data[i]); s = s === '' ? t : s + repeat.call(ZERO, 7 - t.length) + t; } } return s; }; var pow = function(x, n, acc){ return n === 0 ? acc : n % 2 === 1 ? pow(x, n - 1, acc * x) : pow(x * x, n / 2, acc); }; var log = function(x){ var n = 0 , x2 = x; while(x2 >= 4096){ n += 12; x2 /= 4096; } while(x2 >= 2){ n += 1; x2 /= 2; } return n; }; $export($export.P + $export.F * (!!$toFixed && ( 0.00008.toFixed(3) !== '0.000' || 0.9.toFixed(0) !== '1' || 1.255.toFixed(2) !== '1.25' || 1000000000000000128..toFixed(0) !== '1000000000000000128' ) || !__webpack_require__(5)(function(){ // V8 ~ Android 4.3- $toFixed.call({}); })), 'Number', { toFixed: function toFixed(fractionDigits){ var x = aNumberValue(this, ERROR) , f = toInteger(fractionDigits) , s = '' , m = ZERO , e, z, j, k; if(f < 0 || f > 20)throw RangeError(ERROR); if(x != x)return 'NaN'; if(x <= -1e21 || x >= 1e21)return String(x); if(x < 0){ s = '-'; x = -x; } if(x > 1e-21){ e = log(x * pow(2, 69, 1)) - 69; z = e < 0 ? x * pow(2, -e, 1) : x / pow(2, e, 1); z *= 0x10000000000000; e = 52 - e; if(e > 0){ multiply(0, z); j = f; while(j >= 7){ multiply(1e7, 0); j -= 7; } multiply(pow(10, j, 1), 0); j = e - 1; while(j >= 23){ divide(1 << 23); j -= 23; } divide(1 << j); multiply(1, 1); divide(2); m = numToString(); } else { multiply(0, z); multiply(1 << -e, 0); m = numToString() + repeat.call(ZERO, f); } } if(f > 0){ k = m.length; m = s + (k <= f ? '0.' + repeat.call(ZERO, f - k) + m : m.slice(0, k - f) + '.' + m.slice(k - f)); } else { m = s + m; } return m; } }); /***/ }, /* 84 */ /***/ function(module, exports, __webpack_require__) { var cof = __webpack_require__(32); module.exports = function(it, msg){ if(typeof it != 'number' && cof(it) != 'Number')throw TypeError(msg); return +it; }; /***/ }, /* 85 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; var toInteger = __webpack_require__(36) , defined = __webpack_require__(33); module.exports = function repeat(count){ var str = String(defined(this)) , res = '' , n = toInteger(count); if(n < 0 || n == Infinity)throw RangeError("Count can't be negative"); for(;n > 0; (n >>>= 1) && (str += str))if(n & 1)res += str; return res; }; /***/ }, /* 86 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; var $export = __webpack_require__(6) , $fails = __webpack_require__(5) , aNumberValue = __webpack_require__(84) , $toPrecision = 1..toPrecision; $export($export.P + $export.F * ($fails(function(){ // IE7- return $toPrecision.call(1, undefined) !== '1'; }) || !$fails(function(){ // V8 ~ Android 4.3- $toPrecision.call({}); })), 'Number', { toPrecision: function toPrecision(precision){ var that = aNumberValue(this, 'Number#toPrecision: incorrect invocation!'); return precision === undefined ? $toPrecision.call(that) : $toPrecision.call(that, precision); } }); /***/ }, /* 87 */ /***/ function(module, exports, __webpack_require__) { // 20.1.2.1 Number.EPSILON var $export = __webpack_require__(6); $export($export.S, 'Number', {EPSILON: Math.pow(2, -52)}); /***/ }, /* 88 */ /***/ function(module, exports, __webpack_require__) { // 20.1.2.2 Number.isFinite(number) var $export = __webpack_require__(6) , _isFinite = __webpack_require__(2).isFinite; $export($export.S, 'Number', { isFinite: function isFinite(it){ return typeof it == 'number' && _isFinite(it); } }); /***/ }, /* 89 */ /***/ function(module, exports, __webpack_require__) { // 20.1.2.3 Number.isInteger(number) var $export = __webpack_require__(6); $export($export.S, 'Number', {isInteger: __webpack_require__(90)}); /***/ }, /* 90 */ /***/ function(module, exports, __webpack_require__) { // 20.1.2.3 Number.isInteger(number) var isObject = __webpack_require__(11) , floor = Math.floor; module.exports = function isInteger(it){ return !isObject(it) && isFinite(it) && floor(it) === it; }; /***/ }, /* 91 */ /***/ function(module, exports, __webpack_require__) { // 20.1.2.4 Number.isNaN(number) var $export = __webpack_require__(6); $export($export.S, 'Number', { isNaN: function isNaN(number){ return number != number; } }); /***/ }, /* 92 */ /***/ function(module, exports, __webpack_require__) { // 20.1.2.5 Number.isSafeInteger(number) var $export = __webpack_require__(6) , isInteger = __webpack_require__(90) , abs = Math.abs; $export($export.S, 'Number', { isSafeInteger: function isSafeInteger(number){ return isInteger(number) && abs(number) <= 0x1fffffffffffff; } }); /***/ }, /* 93 */ /***/ function(module, exports, __webpack_require__) { // 20.1.2.6 Number.MAX_SAFE_INTEGER var $export = __webpack_require__(6); $export($export.S, 'Number', {MAX_SAFE_INTEGER: 0x1fffffffffffff}); /***/ }, /* 94 */ /***/ function(module, exports, __webpack_require__) { // 20.1.2.10 Number.MIN_SAFE_INTEGER var $export = __webpack_require__(6); $export($export.S, 'Number', {MIN_SAFE_INTEGER: -0x1fffffffffffff}); /***/ }, /* 95 */ /***/ function(module, exports, __webpack_require__) { var $export = __webpack_require__(6) , $parseFloat = __webpack_require__(96); // 20.1.2.12 Number.parseFloat(string) $export($export.S + $export.F * (Number.parseFloat != $parseFloat), 'Number', {parseFloat: $parseFloat}); /***/ }, /* 96 */ /***/ function(module, exports, __webpack_require__) { var $parseFloat = __webpack_require__(2).parseFloat , $trim = __webpack_require__(81).trim; module.exports = 1 / $parseFloat(__webpack_require__(82) + '-0') !== -Infinity ? function parseFloat(str){ var string = $trim(String(str), 3) , result = $parseFloat(string); return result === 0 && string.charAt(0) == '-' ? -0 : result; } : $parseFloat; /***/ }, /* 97 */ /***/ function(module, exports, __webpack_require__) { var $export = __webpack_require__(6) , $parseInt = __webpack_require__(98); // 20.1.2.13 Number.parseInt(string, radix) $export($export.S + $export.F * (Number.parseInt != $parseInt), 'Number', {parseInt: $parseInt}); /***/ }, /* 98 */ /***/ function(module, exports, __webpack_require__) { var $parseInt = __webpack_require__(2).parseInt , $trim = __webpack_require__(81).trim , ws = __webpack_require__(82) , hex = /^[\-+]?0[xX]/; module.exports = $parseInt(ws + '08') !== 8 || $parseInt(ws + '0x16') !== 22 ? function parseInt(str, radix){ var string = $trim(String(str), 3); return $parseInt(string, (radix >>> 0) || (hex.test(string) ? 16 : 10)); } : $parseInt; /***/ }, /* 99 */ /***/ function(module, exports, __webpack_require__) { var $export = __webpack_require__(6) , $parseInt = __webpack_require__(98); // 18.2.5 parseInt(string, radix) $export($export.G + $export.F * (parseInt != $parseInt), {parseInt: $parseInt}); /***/ }, /* 100 */ /***/ function(module, exports, __webpack_require__) { var $export = __webpack_require__(6) , $parseFloat = __webpack_require__(96); // 18.2.4 parseFloat(string) $export($export.G + $export.F * (parseFloat != $parseFloat), {parseFloat: $parseFloat}); /***/ }, /* 101 */ /***/ function(module, exports, __webpack_require__) { // 20.2.2.3 Math.acosh(x) var $export = __webpack_require__(6) , log1p = __webpack_require__(102) , sqrt = Math.sqrt , $acosh = Math.acosh; $export($export.S + $export.F * !($acosh // V8 bug: https://code.google.com/p/v8/issues/detail?id=3509 && Math.floor($acosh(Number.MAX_VALUE)) == 710 // Tor Browser bug: Math.acosh(Infinity) -> NaN && $acosh(Infinity) == Infinity ), 'Math', { acosh: function acosh(x){ return (x = +x) < 1 ? NaN : x > 94906265.62425156 ? Math.log(x) + Math.LN2 : log1p(x - 1 + sqrt(x - 1) * sqrt(x + 1)); } }); /***/ }, /* 102 */ /***/ function(module, exports) { // 20.2.2.20 Math.log1p(x) module.exports = Math.log1p || function log1p(x){ return (x = +x) > -1e-8 && x < 1e-8 ? x - x * x / 2 : Math.log(1 + x); }; /***/ }, /* 103 */ /***/ function(module, exports, __webpack_require__) { // 20.2.2.5 Math.asinh(x) var $export = __webpack_require__(6) , $asinh = Math.asinh; function asinh(x){ return !isFinite(x = +x) || x == 0 ? x : x < 0 ? -asinh(-x) : Math.log(x + Math.sqrt(x * x + 1)); } // Tor Browser bug: Math.asinh(0) -> -0 $export($export.S + $export.F * !($asinh && 1 / $asinh(0) > 0), 'Math', {asinh: asinh}); /***/ }, /* 104 */ /***/ function(module, exports, __webpack_require__) { // 20.2.2.7 Math.atanh(x) var $export = __webpack_require__(6) , $atanh = Math.atanh; // Tor Browser bug: Math.atanh(-0) -> 0 $export($export.S + $export.F * !($atanh && 1 / $atanh(-0) < 0), 'Math', { atanh: function atanh(x){ return (x = +x) == 0 ? x : Math.log((1 + x) / (1 - x)) / 2; } }); /***/ }, /* 105 */ /***/ function(module, exports, __webpack_require__) { // 20.2.2.9 Math.cbrt(x) var $export = __webpack_require__(6) , sign = __webpack_require__(106); $export($export.S, 'Math', { cbrt: function cbrt(x){ return sign(x = +x) * Math.pow(Math.abs(x), 1 / 3); } }); /***/ }, /* 106 */ /***/ function(module, exports) { // 20.2.2.28 Math.sign(x) module.exports = Math.sign || function sign(x){ return (x = +x) == 0 || x != x ? x : x < 0 ? -1 : 1; }; /***/ }, /* 107 */ /***/ function(module, exports, __webpack_require__) { // 20.2.2.11 Math.clz32(x) var $export = __webpack_require__(6); $export($export.S, 'Math', { clz32: function clz32(x){ return (x >>>= 0) ? 31 - Math.floor(Math.log(x + 0.5) * Math.LOG2E) : 32; } }); /***/ }, /* 108 */ /***/ function(module, exports, __webpack_require__) { // 20.2.2.12 Math.cosh(x) var $export = __webpack_require__(6) , exp = Math.exp; $export($export.S, 'Math', { cosh: function cosh(x){ return (exp(x = +x) + exp(-x)) / 2; } }); /***/ }, /* 109 */ /***/ function(module, exports, __webpack_require__) { // 20.2.2.14 Math.expm1(x) var $export = __webpack_require__(6) , $expm1 = __webpack_require__(110); $export($export.S + $export.F * ($expm1 != Math.expm1), 'Math', {expm1: $expm1}); /***/ }, /* 110 */ /***/ function(module, exports) { // 20.2.2.14 Math.expm1(x) var $expm1 = Math.expm1; module.exports = (!$expm1 // Old FF bug || $expm1(10) > 22025.465794806719 || $expm1(10) < 22025.4657948067165168 // Tor Browser bug || $expm1(-2e-17) != -2e-17 ) ? function expm1(x){ return (x = +x) == 0 ? x : x > -1e-6 && x < 1e-6 ? x + x * x / 2 : Math.exp(x) - 1; } : $expm1; /***/ }, /* 111 */ /***/ function(module, exports, __webpack_require__) { // 20.2.2.16 Math.fround(x) var $export = __webpack_require__(6) , sign = __webpack_require__(106) , pow = Math.pow , EPSILON = pow(2, -52) , EPSILON32 = pow(2, -23) , MAX32 = pow(2, 127) * (2 - EPSILON32) , MIN32 = pow(2, -126); var roundTiesToEven = function(n){ return n + 1 / EPSILON - 1 / EPSILON; }; $export($export.S, 'Math', { fround: function fround(x){ var $abs = Math.abs(x) , $sign = sign(x) , a, result; if($abs < MIN32)return $sign * roundTiesToEven($abs / MIN32 / EPSILON32) * MIN32 * EPSILON32; a = (1 + EPSILON32 / EPSILON) * $abs; result = a - (a - $abs); if(result > MAX32 || result != result)return $sign * Infinity; return $sign * result; } }); /***/ }, /* 112 */ /***/ function(module, exports, __webpack_require__) { // 20.2.2.17 Math.hypot([value1[, value2[, … ]]]) var $export = __webpack_require__(6) , abs = Math.abs; $export($export.S, 'Math', { hypot: function hypot(value1, value2){ // eslint-disable-line no-unused-vars var sum = 0 , i = 0 , aLen = arguments.length , larg = 0 , arg, div; while(i < aLen){ arg = abs(arguments[i++]); if(larg < arg){ div = larg / arg; sum = sum * div * div + 1; larg = arg; } else if(arg > 0){ div = arg / larg; sum += div * div; } else sum += arg; } return larg === Infinity ? Infinity : larg * Math.sqrt(sum); } }); /***/ }, /* 113 */ /***/ function(module, exports, __webpack_require__) { // 20.2.2.18 Math.imul(x, y) var $export = __webpack_require__(6) , $imul = Math.imul; // some WebKit versions fails with big numbers, some has wrong arity $export($export.S + $export.F * __webpack_require__(5)(function(){ return $imul(0xffffffff, 5) != -5 || $imul.length != 2; }), 'Math', { imul: function imul(x, y){ var UINT16 = 0xffff , xn = +x , yn = +y , xl = UINT16 & xn , yl = UINT16 & yn; return 0 | xl * yl + ((UINT16 & xn >>> 16) * yl + xl * (UINT16 & yn >>> 16) << 16 >>> 0); } }); /***/ }, /* 114 */ /***/ function(module, exports, __webpack_require__) { // 20.2.2.21 Math.log10(x) var $export = __webpack_require__(6); $export($export.S, 'Math', { log10: function log10(x){ return Math.log(x) / Math.LN10; } }); /***/ }, /* 115 */ /***/ function(module, exports, __webpack_require__) { // 20.2.2.20 Math.log1p(x) var $export = __webpack_require__(6); $export($export.S, 'Math', {log1p: __webpack_require__(102)}); /***/ }, /* 116 */ /***/ function(module, exports, __webpack_require__) { // 20.2.2.22 Math.log2(x) var $export = __webpack_require__(6); $export($export.S, 'Math', { log2: function log2(x){ return Math.log(x) / Math.LN2; } }); /***/ }, /* 117 */ /***/ function(module, exports, __webpack_require__) { // 20.2.2.28 Math.sign(x) var $export = __webpack_require__(6); $export($export.S, 'Math', {sign: __webpack_require__(106)}); /***/ }, /* 118 */ /***/ function(module, exports, __webpack_require__) { // 20.2.2.30 Math.sinh(x) var $export = __webpack_require__(6) , expm1 = __webpack_require__(110) , exp = Math.exp; // V8 near Chromium 38 has a problem with very small numbers $export($export.S + $export.F * __webpack_require__(5)(function(){ return !Math.sinh(-2e-17) != -2e-17; }), 'Math', { sinh: function sinh(x){ return Math.abs(x = +x) < 1 ? (expm1(x) - expm1(-x)) / 2 : (exp(x - 1) - exp(-x - 1)) * (Math.E / 2); } }); /***/ }, /* 119 */ /***/ function(module, exports, __webpack_require__) { // 20.2.2.33 Math.tanh(x) var $export = __webpack_require__(6) , expm1 = __webpack_require__(110) , exp = Math.exp; $export($export.S, 'Math', { tanh: function tanh(x){ var a = expm1(x = +x) , b = expm1(-x); return a == Infinity ? 1 : b == Infinity ? -1 : (a - b) / (exp(x) + exp(-x)); } }); /***/ }, /* 120 */ /***/ function(module, exports, __webpack_require__) { // 20.2.2.34 Math.trunc(x) var $export = __webpack_require__(6); $export($export.S, 'Math', { trunc: function trunc(it){ return (it > 0 ? Math.floor : Math.ceil)(it); } }); /***/ }, /* 121 */ /***/ function(module, exports, __webpack_require__) { var $export = __webpack_require__(6) , toIndex = __webpack_require__(37) , fromCharCode = String.fromCharCode , $fromCodePoint = String.fromCodePoint; // length should be 1, old FF problem $export($export.S + $export.F * (!!$fromCodePoint && $fromCodePoint.length != 1), 'String', { // 21.1.2.2 String.fromCodePoint(...codePoints) fromCodePoint: function fromCodePoint(x){ // eslint-disable-line no-unused-vars var res = [] , aLen = arguments.length , i = 0 , code; while(aLen > i){ code = +arguments[i++]; if(toIndex(code, 0x10ffff) !== code)throw RangeError(code + ' is not a valid code point'); res.push(code < 0x10000 ? fromCharCode(code) : fromCharCode(((code -= 0x10000) >> 10) + 0xd800, code % 0x400 + 0xdc00) ); } return res.join(''); } }); /***/ }, /* 122 */ /***/ function(module, exports, __webpack_require__) { var $export = __webpack_require__(6) , toIObject = __webpack_require__(30) , toLength = __webpack_require__(35); $export($export.S, 'String', { // 21.1.2.4 String.raw(callSite, ...substitutions) raw: function raw(callSite){ var tpl = toIObject(callSite.raw) , len = toLength(tpl.length) , aLen = arguments.length , res = [] , i = 0; while(len > i){ res.push(String(tpl[i++])); if(i < aLen)res.push(String(arguments[i])); } return res.join(''); } }); /***/ }, /* 123 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; // 21.1.3.25 String.prototype.trim() __webpack_require__(81)('trim', function($trim){ return function trim(){ return $trim(this, 3); }; }); /***/ }, /* 124 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; var $export = __webpack_require__(6) , $at = __webpack_require__(125)(false); $export($export.P, 'String', { // 21.1.3.3 String.prototype.codePointAt(pos) codePointAt: function codePointAt(pos){ return $at(this, pos); } }); /***/ }, /* 125 */ /***/ function(module, exports, __webpack_require__) { var toInteger = __webpack_require__(36) , defined = __webpack_require__(33); // true -> String#at // false -> String#codePointAt module.exports = function(TO_STRING){ return function(that, pos){ var s = String(defined(that)) , i = toInteger(pos) , l = s.length , a, b; if(i < 0 || i >= l)return TO_STRING ? '' : undefined; a = s.charCodeAt(i); return a < 0xd800 || a > 0xdbff || i + 1 === l || (b = s.charCodeAt(i + 1)) < 0xdc00 || b > 0xdfff ? TO_STRING ? s.charAt(i) : a : TO_STRING ? s.slice(i, i + 2) : (a - 0xd800 << 10) + (b - 0xdc00) + 0x10000; }; }; /***/ }, /* 126 */ /***/ function(module, exports, __webpack_require__) { // 21.1.3.6 String.prototype.endsWith(searchString [, endPosition]) 'use strict'; var $export = __webpack_require__(6) , toLength = __webpack_require__(35) , context = __webpack_require__(127) , ENDS_WITH = 'endsWith' , $endsWith = ''[ENDS_WITH]; $export($export.P + $export.F * __webpack_require__(129)(ENDS_WITH), 'String', { endsWith: function endsWith(searchString /*, endPosition = @length */){ var that = context(this, searchString, ENDS_WITH) , endPosition = arguments.length > 1 ? arguments[1] : undefined , len = toLength(that.length) , end = endPosition === undefined ? len : Math.min(toLength(endPosition), len) , search = String(searchString); return $endsWith ? $endsWith.call(that, search, end) : that.slice(end - search.length, end) === search; } }); /***/ }, /* 127 */ /***/ function(module, exports, __webpack_require__) { // helper for String#{startsWith, endsWith, includes} var isRegExp = __webpack_require__(128) , defined = __webpack_require__(33); module.exports = function(that, searchString, NAME){ if(isRegExp(searchString))throw TypeError('String#' + NAME + " doesn't accept regex!"); return String(defined(that)); }; /***/ }, /* 128 */ /***/ function(module, exports, __webpack_require__) { // 7.2.8 IsRegExp(argument) var isObject = __webpack_require__(11) , cof = __webpack_require__(32) , MATCH = __webpack_require__(23)('match'); module.exports = function(it){ var isRegExp; return isObject(it) && ((isRegExp = it[MATCH]) !== undefined ? !!isRegExp : cof(it) == 'RegExp'); }; /***/ }, /* 129 */ /***/ function(module, exports, __webpack_require__) { var MATCH = __webpack_require__(23)('match'); module.exports = function(KEY){ var re = /./; try { '/./'[KEY](re); } catch(e){ try { re[MATCH] = false; return !'/./'[KEY](re); } catch(f){ /* empty */ } } return true; }; /***/ }, /* 130 */ /***/ function(module, exports, __webpack_require__) { // 21.1.3.7 String.prototype.includes(searchString, position = 0) 'use strict'; var $export = __webpack_require__(6) , context = __webpack_require__(127) , INCLUDES = 'includes'; $export($export.P + $export.F * __webpack_require__(129)(INCLUDES), 'String', { includes: function includes(searchString /*, position = 0 */){ return !!~context(this, searchString, INCLUDES) .indexOf(searchString, arguments.length > 1 ? arguments[1] : undefined); } }); /***/ }, /* 131 */ /***/ function(module, exports, __webpack_require__) { var $export = __webpack_require__(6); $export($export.P, 'String', { // 21.1.3.13 String.prototype.repeat(count) repeat: __webpack_require__(85) }); /***/ }, /* 132 */ /***/ function(module, exports, __webpack_require__) { // 21.1.3.18 String.prototype.startsWith(searchString [, position ]) 'use strict'; var $export = __webpack_require__(6) , toLength = __webpack_require__(35) , context = __webpack_require__(127) , STARTS_WITH = 'startsWith' , $startsWith = ''[STARTS_WITH]; $export($export.P + $export.F * __webpack_require__(129)(STARTS_WITH), 'String', { startsWith: function startsWith(searchString /*, position = 0 */){ var that = context(this, searchString, STARTS_WITH) , index = toLength(Math.min(arguments.length > 1 ? arguments[1] : undefined, that.length)) , search = String(searchString); return $startsWith ? $startsWith.call(that, search, index) : that.slice(index, index + search.length) === search; } }); /***/ }, /* 133 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; var $at = __webpack_require__(125)(true); // 21.1.3.27 String.prototype[@@iterator]() __webpack_require__(134)(String, 'String', function(iterated){ this._t = String(iterated); // target this._i = 0; // next index // 21.1.5.2.1 %StringIteratorPrototype%.next() }, function(){ var O = this._t , index = this._i , point; if(index >= O.length)return {value: undefined, done: true}; point = $at(O, index); this._i += point.length; return {value: point, done: false}; }); /***/ }, /* 134 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; var LIBRARY = __webpack_require__(26) , $export = __webpack_require__(6) , redefine = __webpack_require__(16) , hide = __webpack_require__(8) , has = __webpack_require__(3) , Iterators = __webpack_require__(135) , $iterCreate = __webpack_require__(136) , setToStringTag = __webpack_require__(22) , getPrototypeOf = __webpack_require__(57) , ITERATOR = __webpack_require__(23)('iterator') , BUGGY = !([].keys && 'next' in [].keys()) // Safari has buggy iterators w/o `next` , FF_ITERATOR = '@@iterator' , KEYS = 'keys' , VALUES = 'values'; var returnThis = function(){ return this; }; module.exports = function(Base, NAME, Constructor, next, DEFAULT, IS_SET, FORCED){ $iterCreate(Constructor, NAME, next); var getMethod = function(kind){ if(!BUGGY && kind in proto)return proto[kind]; switch(kind){ case KEYS: return function keys(){ return new Constructor(this, kind); }; case VALUES: return function values(){ return new Constructor(this, kind); }; } return function entries(){ return new Constructor(this, kind); }; }; var TAG = NAME + ' Iterator' , DEF_VALUES = DEFAULT == VALUES , VALUES_BUG = false , proto = Base.prototype , $native = proto[ITERATOR] || proto[FF_ITERATOR] || DEFAULT && proto[DEFAULT] , $default = $native || getMethod(DEFAULT) , $entries = DEFAULT ? !DEF_VALUES ? $default : getMethod('entries') : undefined , $anyNative = NAME == 'Array' ? proto.entries || $native : $native , methods, key, IteratorPrototype; // Fix native if($anyNative){ IteratorPrototype = getPrototypeOf($anyNative.call(new Base)); if(IteratorPrototype !== Object.prototype){ // Set @@toStringTag to native iterators setToStringTag(IteratorPrototype, TAG, true); // fix for some old engines if(!LIBRARY && !has(IteratorPrototype, ITERATOR))hide(IteratorPrototype, ITERATOR, returnThis); } } // fix Array#{values, @@iterator}.name in V8 / FF if(DEF_VALUES && $native && $native.name !== VALUES){ VALUES_BUG = true; $default = function values(){ return $native.call(this); }; } // Define iterator if((!LIBRARY || FORCED) && (BUGGY || VALUES_BUG || !proto[ITERATOR])){ hide(proto, ITERATOR, $default); } // Plug for library Iterators[NAME] = $default; Iterators[TAG] = returnThis; if(DEFAULT){ methods = { values: DEF_VALUES ? $default : getMethod(VALUES), keys: IS_SET ? $default : getMethod(KEYS), entries: $entries }; if(FORCED)for(key in methods){ if(!(key in proto))redefine(proto, key, methods[key]); } else $export($export.P + $export.F * (BUGGY || VALUES_BUG), NAME, methods); } return methods; }; /***/ }, /* 135 */ /***/ function(module, exports) { module.exports = {}; /***/ }, /* 136 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; var create = __webpack_require__(44) , descriptor = __webpack_require__(15) , setToStringTag = __webpack_require__(22) , IteratorPrototype = {}; // 25.1.2.1.1 %IteratorPrototype%[@@iterator]() __webpack_require__(8)(IteratorPrototype, __webpack_require__(23)('iterator'), function(){ return this; }); module.exports = function(Constructor, NAME, next){ Constructor.prototype = create(IteratorPrototype, {next: descriptor(1, next)}); setToStringTag(Constructor, NAME + ' Iterator'); }; /***/ }, /* 137 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; // B.2.3.2 String.prototype.anchor(name) __webpack_require__(138)('anchor', function(createHTML){ return function anchor(name){ return createHTML(this, 'a', 'name', name); } }); /***/ }, /* 138 */ /***/ function(module, exports, __webpack_require__) { var $export = __webpack_require__(6) , fails = __webpack_require__(5) , defined = __webpack_require__(33) , quot = /"/g; // B.2.3.2.1 CreateHTML(string, tag, attribute, value) var createHTML = function(string, tag, attribute, value) { var S = String(defined(string)) , p1 = '<' + tag; if(attribute !== '')p1 += ' ' + attribute + '="' + String(value).replace(quot, '"') + '"'; return p1 + '>' + S + ''; }; module.exports = function(NAME, exec){ var O = {}; O[NAME] = exec(createHTML); $export($export.P + $export.F * fails(function(){ var test = ''[NAME]('"'); return test !== test.toLowerCase() || test.split('"').length > 3; }), 'String', O); }; /***/ }, /* 139 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; // B.2.3.3 String.prototype.big() __webpack_require__(138)('big', function(createHTML){ return function big(){ return createHTML(this, 'big', '', ''); } }); /***/ }, /* 140 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; // B.2.3.4 String.prototype.blink() __webpack_require__(138)('blink', function(createHTML){ return function blink(){ return createHTML(this, 'blink', '', ''); } }); /***/ }, /* 141 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; // B.2.3.5 String.prototype.bold() __webpack_require__(138)('bold', function(createHTML){ return function bold(){ return createHTML(this, 'b', '', ''); } }); /***/ }, /* 142 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; // B.2.3.6 String.prototype.fixed() __webpack_require__(138)('fixed', function(createHTML){ return function fixed(){ return createHTML(this, 'tt', '', ''); } }); /***/ }, /* 143 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; // B.2.3.7 String.prototype.fontcolor(color) __webpack_require__(138)('fontcolor', function(createHTML){ return function fontcolor(color){ return createHTML(this, 'font', 'color', color); } }); /***/ }, /* 144 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; // B.2.3.8 String.prototype.fontsize(size) __webpack_require__(138)('fontsize', function(createHTML){ return function fontsize(size){ return createHTML(this, 'font', 'size', size); } }); /***/ }, /* 145 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; // B.2.3.9 String.prototype.italics() __webpack_require__(138)('italics', function(createHTML){ return function italics(){ return createHTML(this, 'i', '', ''); } }); /***/ }, /* 146 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; // B.2.3.10 String.prototype.link(url) __webpack_require__(138)('link', function(createHTML){ return function link(url){ return createHTML(this, 'a', 'href', url); } }); /***/ }, /* 147 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; // B.2.3.11 String.prototype.small() __webpack_require__(138)('small', function(createHTML){ return function small(){ return createHTML(this, 'small', '', ''); } }); /***/ }, /* 148 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; // B.2.3.12 String.prototype.strike() __webpack_require__(138)('strike', function(createHTML){ return function strike(){ return createHTML(this, 'strike', '', ''); } }); /***/ }, /* 149 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; // B.2.3.13 String.prototype.sub() __webpack_require__(138)('sub', function(createHTML){ return function sub(){ return createHTML(this, 'sub', '', ''); } }); /***/ }, /* 150 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; // B.2.3.14 String.prototype.sup() __webpack_require__(138)('sup', function(createHTML){ return function sup(){ return createHTML(this, 'sup', '', ''); } }); /***/ }, /* 151 */ /***/ function(module, exports, __webpack_require__) { // 22.1.2.2 / 15.4.3.2 Array.isArray(arg) var $export = __webpack_require__(6); $export($export.S, 'Array', {isArray: __webpack_require__(43)}); /***/ }, /* 152 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; var ctx = __webpack_require__(18) , $export = __webpack_require__(6) , toObject = __webpack_require__(56) , call = __webpack_require__(153) , isArrayIter = __webpack_require__(154) , toLength = __webpack_require__(35) , createProperty = __webpack_require__(155) , getIterFn = __webpack_require__(156); $export($export.S + $export.F * !__webpack_require__(157)(function(iter){ Array.from(iter); }), 'Array', { // 22.1.2.1 Array.from(arrayLike, mapfn = undefined, thisArg = undefined) from: function from(arrayLike/*, mapfn = undefined, thisArg = undefined*/){ var O = toObject(arrayLike) , C = typeof this == 'function' ? this : Array , aLen = arguments.length , mapfn = aLen > 1 ? arguments[1] : undefined , mapping = mapfn !== undefined , index = 0 , iterFn = getIterFn(O) , length, result, step, iterator; if(mapping)mapfn = ctx(mapfn, aLen > 2 ? arguments[2] : undefined, 2); // if object isn't iterable or it's array with default iterator - use simple case if(iterFn != undefined && !(C == Array && isArrayIter(iterFn))){ for(iterator = iterFn.call(O), result = new C; !(step = iterator.next()).done; index++){ createProperty(result, index, mapping ? call(iterator, mapfn, [step.value, index], true) : step.value); } } else { length = toLength(O.length); for(result = new C(length); length > index; index++){ createProperty(result, index, mapping ? mapfn(O[index], index) : O[index]); } } result.length = index; return result; } }); /***/ }, /* 153 */ /***/ function(module, exports, __webpack_require__) { // call something on iterator step with safe closing on error var anObject = __webpack_require__(10); module.exports = function(iterator, fn, value, entries){ try { return entries ? fn(anObject(value)[0], value[1]) : fn(value); // 7.4.6 IteratorClose(iterator, completion) } catch(e){ var ret = iterator['return']; if(ret !== undefined)anObject(ret.call(iterator)); throw e; } }; /***/ }, /* 154 */ /***/ function(module, exports, __webpack_require__) { // check on default Array iterator var Iterators = __webpack_require__(135) , ITERATOR = __webpack_require__(23)('iterator') , ArrayProto = Array.prototype; module.exports = function(it){ return it !== undefined && (Iterators.Array === it || ArrayProto[ITERATOR] === it); }; /***/ }, /* 155 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; var $defineProperty = __webpack_require__(9) , createDesc = __webpack_require__(15); module.exports = function(object, index, value){ if(index in object)$defineProperty.f(object, index, createDesc(0, value)); else object[index] = value; }; /***/ }, /* 156 */ /***/ function(module, exports, __webpack_require__) { var classof = __webpack_require__(73) , ITERATOR = __webpack_require__(23)('iterator') , Iterators = __webpack_require__(135); module.exports = __webpack_require__(7).getIteratorMethod = function(it){ if(it != undefined)return it[ITERATOR] || it['@@iterator'] || Iterators[classof(it)]; }; /***/ }, /* 157 */ /***/ function(module, exports, __webpack_require__) { var ITERATOR = __webpack_require__(23)('iterator') , SAFE_CLOSING = false; try { var riter = [7][ITERATOR](); riter['return'] = function(){ SAFE_CLOSING = true; }; Array.from(riter, function(){ throw 2; }); } catch(e){ /* empty */ } module.exports = function(exec, skipClosing){ if(!skipClosing && !SAFE_CLOSING)return false; var safe = false; try { var arr = [7] , iter = arr[ITERATOR](); iter.next = function(){ return {done: safe = true}; }; arr[ITERATOR] = function(){ return iter; }; exec(arr); } catch(e){ /* empty */ } return safe; }; /***/ }, /* 158 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; var $export = __webpack_require__(6) , createProperty = __webpack_require__(155); // WebKit Array.of isn't generic $export($export.S + $export.F * __webpack_require__(5)(function(){ function F(){} return !(Array.of.call(F) instanceof F); }), 'Array', { // 22.1.2.3 Array.of( ...items) of: function of(/* ...args */){ var index = 0 , aLen = arguments.length , result = new (typeof this == 'function' ? this : Array)(aLen); while(aLen > index)createProperty(result, index, arguments[index++]); result.length = aLen; return result; } }); /***/ }, /* 159 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; // 22.1.3.13 Array.prototype.join(separator) var $export = __webpack_require__(6) , toIObject = __webpack_require__(30) , arrayJoin = [].join; // fallback for not array-like strings $export($export.P + $export.F * (__webpack_require__(31) != Object || !__webpack_require__(160)(arrayJoin)), 'Array', { join: function join(separator){ return arrayJoin.call(toIObject(this), separator === undefined ? ',' : separator); } }); /***/ }, /* 160 */ /***/ function(module, exports, __webpack_require__) { var fails = __webpack_require__(5); module.exports = function(method, arg){ return !!method && fails(function(){ arg ? method.call(null, function(){}, 1) : method.call(null); }); }; /***/ }, /* 161 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; var $export = __webpack_require__(6) , html = __webpack_require__(46) , cof = __webpack_require__(32) , toIndex = __webpack_require__(37) , toLength = __webpack_require__(35) , arraySlice = [].slice; // fallback for not array-like ES3 strings and DOM objects $export($export.P + $export.F * __webpack_require__(5)(function(){ if(html)arraySlice.call(html); }), 'Array', { slice: function slice(begin, end){ var len = toLength(this.length) , klass = cof(this); end = end === undefined ? len : end; if(klass == 'Array')return arraySlice.call(this, begin, end); var start = toIndex(begin, len) , upTo = toIndex(end, len) , size = toLength(upTo - start) , cloned = Array(size) , i = 0; for(; i < size; i++)cloned[i] = klass == 'String' ? this.charAt(start + i) : this[start + i]; return cloned; } }); /***/ }, /* 162 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; var $export = __webpack_require__(6) , aFunction = __webpack_require__(19) , toObject = __webpack_require__(56) , fails = __webpack_require__(5) , $sort = [].sort , test = [1, 2, 3]; $export($export.P + $export.F * (fails(function(){ // IE8- test.sort(undefined); }) || !fails(function(){ // V8 bug test.sort(null); // Old WebKit }) || !__webpack_require__(160)($sort)), 'Array', { // 22.1.3.25 Array.prototype.sort(comparefn) sort: function sort(comparefn){ return comparefn === undefined ? $sort.call(toObject(this)) : $sort.call(toObject(this), aFunction(comparefn)); } }); /***/ }, /* 163 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; var $export = __webpack_require__(6) , $forEach = __webpack_require__(164)(0) , STRICT = __webpack_require__(160)([].forEach, true); $export($export.P + $export.F * !STRICT, 'Array', { // 22.1.3.10 / 15.4.4.18 Array.prototype.forEach(callbackfn [, thisArg]) forEach: function forEach(callbackfn /* , thisArg */){ return $forEach(this, callbackfn, arguments[1]); } }); /***/ }, /* 164 */ /***/ function(module, exports, __webpack_require__) { // 0 -> Array#forEach // 1 -> Array#map // 2 -> Array#filter // 3 -> Array#some // 4 -> Array#every // 5 -> Array#find // 6 -> Array#findIndex var ctx = __webpack_require__(18) , IObject = __webpack_require__(31) , toObject = __webpack_require__(56) , toLength = __webpack_require__(35) , asc = __webpack_require__(165); module.exports = function(TYPE, $create){ var IS_MAP = TYPE == 1 , IS_FILTER = TYPE == 2 , IS_SOME = TYPE == 3 , IS_EVERY = TYPE == 4 , IS_FIND_INDEX = TYPE == 6 , NO_HOLES = TYPE == 5 || IS_FIND_INDEX , create = $create || asc; return function($this, callbackfn, that){ var O = toObject($this) , self = IObject(O) , f = ctx(callbackfn, that, 3) , length = toLength(self.length) , index = 0 , result = IS_MAP ? create($this, length) : IS_FILTER ? create($this, 0) : undefined , val, res; for(;length > index; index++)if(NO_HOLES || index in self){ val = self[index]; res = f(val, index, O); if(TYPE){ if(IS_MAP)result[index] = res; // map else if(res)switch(TYPE){ case 3: return true; // some case 5: return val; // find case 6: return index; // findIndex case 2: result.push(val); // filter } else if(IS_EVERY)return false; // every } } return IS_FIND_INDEX ? -1 : IS_SOME || IS_EVERY ? IS_EVERY : result; }; }; /***/ }, /* 165 */ /***/ function(module, exports, __webpack_require__) { // 9.4.2.3 ArraySpeciesCreate(originalArray, length) var speciesConstructor = __webpack_require__(166); module.exports = function(original, length){ return new (speciesConstructor(original))(length); }; /***/ }, /* 166 */ /***/ function(module, exports, __webpack_require__) { var isObject = __webpack_require__(11) , isArray = __webpack_require__(43) , SPECIES = __webpack_require__(23)('species'); module.exports = function(original){ var C; if(isArray(original)){ C = original.constructor; // cross-realm fallback if(typeof C == 'function' && (C === Array || isArray(C.prototype)))C = undefined; if(isObject(C)){ C = C[SPECIES]; if(C === null)C = undefined; } } return C === undefined ? Array : C; }; /***/ }, /* 167 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; var $export = __webpack_require__(6) , $map = __webpack_require__(164)(1); $export($export.P + $export.F * !__webpack_require__(160)([].map, true), 'Array', { // 22.1.3.15 / 15.4.4.19 Array.prototype.map(callbackfn [, thisArg]) map: function map(callbackfn /* , thisArg */){ return $map(this, callbackfn, arguments[1]); } }); /***/ }, /* 168 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; var $export = __webpack_require__(6) , $filter = __webpack_require__(164)(2); $export($export.P + $export.F * !__webpack_require__(160)([].filter, true), 'Array', { // 22.1.3.7 / 15.4.4.20 Array.prototype.filter(callbackfn [, thisArg]) filter: function filter(callbackfn /* , thisArg */){ return $filter(this, callbackfn, arguments[1]); } }); /***/ }, /* 169 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; var $export = __webpack_require__(6) , $some = __webpack_require__(164)(3); $export($export.P + $export.F * !__webpack_require__(160)([].some, true), 'Array', { // 22.1.3.23 / 15.4.4.17 Array.prototype.some(callbackfn [, thisArg]) some: function some(callbackfn /* , thisArg */){ return $some(this, callbackfn, arguments[1]); } }); /***/ }, /* 170 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; var $export = __webpack_require__(6) , $every = __webpack_require__(164)(4); $export($export.P + $export.F * !__webpack_require__(160)([].every, true), 'Array', { // 22.1.3.5 / 15.4.4.16 Array.prototype.every(callbackfn [, thisArg]) every: function every(callbackfn /* , thisArg */){ return $every(this, callbackfn, arguments[1]); } }); /***/ }, /* 171 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; var $export = __webpack_require__(6) , $reduce = __webpack_require__(172); $export($export.P + $export.F * !__webpack_require__(160)([].reduce, true), 'Array', { // 22.1.3.18 / 15.4.4.21 Array.prototype.reduce(callbackfn [, initialValue]) reduce: function reduce(callbackfn /* , initialValue */){ return $reduce(this, callbackfn, arguments.length, arguments[1], false); } }); /***/ }, /* 172 */ /***/ function(module, exports, __webpack_require__) { var aFunction = __webpack_require__(19) , toObject = __webpack_require__(56) , IObject = __webpack_require__(31) , toLength = __webpack_require__(35); module.exports = function(that, callbackfn, aLen, memo, isRight){ aFunction(callbackfn); var O = toObject(that) , self = IObject(O) , length = toLength(O.length) , index = isRight ? length - 1 : 0 , i = isRight ? -1 : 1; if(aLen < 2)for(;;){ if(index in self){ memo = self[index]; index += i; break; } index += i; if(isRight ? index < 0 : length <= index){ throw TypeError('Reduce of empty array with no initial value'); } } for(;isRight ? index >= 0 : length > index; index += i)if(index in self){ memo = callbackfn(memo, self[index], index, O); } return memo; }; /***/ }, /* 173 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; var $export = __webpack_require__(6) , $reduce = __webpack_require__(172); $export($export.P + $export.F * !__webpack_require__(160)([].reduceRight, true), 'Array', { // 22.1.3.19 / 15.4.4.22 Array.prototype.reduceRight(callbackfn [, initialValue]) reduceRight: function reduceRight(callbackfn /* , initialValue */){ return $reduce(this, callbackfn, arguments.length, arguments[1], true); } }); /***/ }, /* 174 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; var $export = __webpack_require__(6) , $indexOf = __webpack_require__(34)(false) , $native = [].indexOf , NEGATIVE_ZERO = !!$native && 1 / [1].indexOf(1, -0) < 0; $export($export.P + $export.F * (NEGATIVE_ZERO || !__webpack_require__(160)($native)), 'Array', { // 22.1.3.11 / 15.4.4.14 Array.prototype.indexOf(searchElement [, fromIndex]) indexOf: function indexOf(searchElement /*, fromIndex = 0 */){ return NEGATIVE_ZERO // convert -0 to +0 ? $native.apply(this, arguments) || 0 : $indexOf(this, searchElement, arguments[1]); } }); /***/ }, /* 175 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; var $export = __webpack_require__(6) , toIObject = __webpack_require__(30) , toInteger = __webpack_require__(36) , toLength = __webpack_require__(35) , $native = [].lastIndexOf , NEGATIVE_ZERO = !!$native && 1 / [1].lastIndexOf(1, -0) < 0; $export($export.P + $export.F * (NEGATIVE_ZERO || !__webpack_require__(160)($native)), 'Array', { // 22.1.3.14 / 15.4.4.15 Array.prototype.lastIndexOf(searchElement [, fromIndex]) lastIndexOf: function lastIndexOf(searchElement /*, fromIndex = @[*-1] */){ // convert -0 to +0 if(NEGATIVE_ZERO)return $native.apply(this, arguments) || 0; var O = toIObject(this) , length = toLength(O.length) , index = length - 1; if(arguments.length > 1)index = Math.min(index, toInteger(arguments[1])); if(index < 0)index = length + index; for(;index >= 0; index--)if(index in O)if(O[index] === searchElement)return index || 0; return -1; } }); /***/ }, /* 176 */ /***/ function(module, exports, __webpack_require__) { // 22.1.3.3 Array.prototype.copyWithin(target, start, end = this.length) var $export = __webpack_require__(6); $export($export.P, 'Array', {copyWithin: __webpack_require__(177)}); __webpack_require__(178)('copyWithin'); /***/ }, /* 177 */ /***/ function(module, exports, __webpack_require__) { // 22.1.3.3 Array.prototype.copyWithin(target, start, end = this.length) 'use strict'; var toObject = __webpack_require__(56) , toIndex = __webpack_require__(37) , toLength = __webpack_require__(35); module.exports = [].copyWithin || function copyWithin(target/*= 0*/, start/*= 0, end = @length*/){ var O = toObject(this) , len = toLength(O.length) , to = toIndex(target, len) , from = toIndex(start, len) , end = arguments.length > 2 ? arguments[2] : undefined , count = Math.min((end === undefined ? len : toIndex(end, len)) - from, len - to) , inc = 1; if(from < to && to < from + count){ inc = -1; from += count - 1; to += count - 1; } while(count-- > 0){ if(from in O)O[to] = O[from]; else delete O[to]; to += inc; from += inc; } return O; }; /***/ }, /* 178 */ /***/ function(module, exports, __webpack_require__) { // 22.1.3.31 Array.prototype[@@unscopables] var UNSCOPABLES = __webpack_require__(23)('unscopables') , ArrayProto = Array.prototype; if(ArrayProto[UNSCOPABLES] == undefined)__webpack_require__(8)(ArrayProto, UNSCOPABLES, {}); module.exports = function(key){ ArrayProto[UNSCOPABLES][key] = true; }; /***/ }, /* 179 */ /***/ function(module, exports, __webpack_require__) { // 22.1.3.6 Array.prototype.fill(value, start = 0, end = this.length) var $export = __webpack_require__(6); $export($export.P, 'Array', {fill: __webpack_require__(180)}); __webpack_require__(178)('fill'); /***/ }, /* 180 */ /***/ function(module, exports, __webpack_require__) { // 22.1.3.6 Array.prototype.fill(value, start = 0, end = this.length) 'use strict'; var toObject = __webpack_require__(56) , toIndex = __webpack_require__(37) , toLength = __webpack_require__(35); module.exports = function fill(value /*, start = 0, end = @length */){ var O = toObject(this) , length = toLength(O.length) , aLen = arguments.length , index = toIndex(aLen > 1 ? arguments[1] : undefined, length) , end = aLen > 2 ? arguments[2] : undefined , endPos = end === undefined ? length : toIndex(end, length); while(endPos > index)O[index++] = value; return O; }; /***/ }, /* 181 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; // 22.1.3.8 Array.prototype.find(predicate, thisArg = undefined) var $export = __webpack_require__(6) , $find = __webpack_require__(164)(5) , KEY = 'find' , forced = true; // Shouldn't skip holes if(KEY in [])Array(1)[KEY](function(){ forced = false; }); $export($export.P + $export.F * forced, 'Array', { find: function find(callbackfn/*, that = undefined */){ return $find(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined); } }); __webpack_require__(178)(KEY); /***/ }, /* 182 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; // 22.1.3.9 Array.prototype.findIndex(predicate, thisArg = undefined) var $export = __webpack_require__(6) , $find = __webpack_require__(164)(6) , KEY = 'findIndex' , forced = true; // Shouldn't skip holes if(KEY in [])Array(1)[KEY](function(){ forced = false; }); $export($export.P + $export.F * forced, 'Array', { findIndex: function findIndex(callbackfn/*, that = undefined */){ return $find(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined); } }); __webpack_require__(178)(KEY); /***/ }, /* 183 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; var addToUnscopables = __webpack_require__(178) , step = __webpack_require__(184) , Iterators = __webpack_require__(135) , toIObject = __webpack_require__(30); // 22.1.3.4 Array.prototype.entries() // 22.1.3.13 Array.prototype.keys() // 22.1.3.29 Array.prototype.values() // 22.1.3.30 Array.prototype[@@iterator]() module.exports = __webpack_require__(134)(Array, 'Array', function(iterated, kind){ this._t = toIObject(iterated); // target this._i = 0; // next index this._k = kind; // kind // 22.1.5.2.1 %ArrayIteratorPrototype%.next() }, function(){ var O = this._t , kind = this._k , index = this._i++; if(!O || index >= O.length){ this._t = undefined; return step(1); } if(kind == 'keys' )return step(0, index); if(kind == 'values')return step(0, O[index]); return step(0, [index, O[index]]); }, 'values'); // argumentsList[@@iterator] is %ArrayProto_values% (9.4.4.6, 9.4.4.7) Iterators.Arguments = Iterators.Array; addToUnscopables('keys'); addToUnscopables('values'); addToUnscopables('entries'); /***/ }, /* 184 */ /***/ function(module, exports) { module.exports = function(done, value){ return {value: value, done: !!done}; }; /***/ }, /* 185 */ /***/ function(module, exports, __webpack_require__) { __webpack_require__(186)('Array'); /***/ }, /* 186 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; var global = __webpack_require__(2) , dP = __webpack_require__(9) , DESCRIPTORS = __webpack_require__(4) , SPECIES = __webpack_require__(23)('species'); module.exports = function(KEY){ var C = global[KEY]; if(DESCRIPTORS && C && !C[SPECIES])dP.f(C, SPECIES, { configurable: true, get: function(){ return this; } }); }; /***/ }, /* 187 */ /***/ function(module, exports, __webpack_require__) { var global = __webpack_require__(2) , inheritIfRequired = __webpack_require__(80) , dP = __webpack_require__(9).f , gOPN = __webpack_require__(48).f , isRegExp = __webpack_require__(128) , $flags = __webpack_require__(188) , $RegExp = global.RegExp , Base = $RegExp , proto = $RegExp.prototype , re1 = /a/g , re2 = /a/g // "new" creates a new object, old webkit buggy here , CORRECT_NEW = new $RegExp(re1) !== re1; if(__webpack_require__(4) && (!CORRECT_NEW || __webpack_require__(5)(function(){ re2[__webpack_require__(23)('match')] = false; // RegExp constructor can alter flags and IsRegExp works correct with @@match return $RegExp(re1) != re1 || $RegExp(re2) == re2 || $RegExp(re1, 'i') != '/a/i'; }))){ $RegExp = function RegExp(p, f){ var tiRE = this instanceof $RegExp , piRE = isRegExp(p) , fiU = f === undefined; return !tiRE && piRE && p.constructor === $RegExp && fiU ? p : inheritIfRequired(CORRECT_NEW ? new Base(piRE && !fiU ? p.source : p, f) : Base((piRE = p instanceof $RegExp) ? p.source : p, piRE && fiU ? $flags.call(p) : f) , tiRE ? this : proto, $RegExp); }; var proxy = function(key){ key in $RegExp || dP($RegExp, key, { configurable: true, get: function(){ return Base[key]; }, set: function(it){ Base[key] = it; } }); }; for(var keys = gOPN(Base), i = 0; keys.length > i; )proxy(keys[i++]); proto.constructor = $RegExp; $RegExp.prototype = proto; __webpack_require__(16)(global, 'RegExp', $RegExp); } __webpack_require__(186)('RegExp'); /***/ }, /* 188 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; // 21.2.5.3 get RegExp.prototype.flags var anObject = __webpack_require__(10); module.exports = function(){ var that = anObject(this) , result = ''; if(that.global) result += 'g'; if(that.ignoreCase) result += 'i'; if(that.multiline) result += 'm'; if(that.unicode) result += 'u'; if(that.sticky) result += 'y'; return result; }; /***/ }, /* 189 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; __webpack_require__(190); var anObject = __webpack_require__(10) , $flags = __webpack_require__(188) , DESCRIPTORS = __webpack_require__(4) , TO_STRING = 'toString' , $toString = /./[TO_STRING]; var define = function(fn){ __webpack_require__(16)(RegExp.prototype, TO_STRING, fn, true); }; // 21.2.5.14 RegExp.prototype.toString() if(__webpack_require__(5)(function(){ return $toString.call({source: 'a', flags: 'b'}) != '/a/b'; })){ define(function toString(){ var R = anObject(this); return '/'.concat(R.source, '/', 'flags' in R ? R.flags : !DESCRIPTORS && R instanceof RegExp ? $flags.call(R) : undefined); }); // FF44- RegExp#toString has a wrong name } else if($toString.name != TO_STRING){ define(function toString(){ return $toString.call(this); }); } /***/ }, /* 190 */ /***/ function(module, exports, __webpack_require__) { // 21.2.5.3 get RegExp.prototype.flags() if(__webpack_require__(4) && /./g.flags != 'g')__webpack_require__(9).f(RegExp.prototype, 'flags', { configurable: true, get: __webpack_require__(188) }); /***/ }, /* 191 */ /***/ function(module, exports, __webpack_require__) { // @@match logic __webpack_require__(192)('match', 1, function(defined, MATCH, $match){ // 21.1.3.11 String.prototype.match(regexp) return [function match(regexp){ 'use strict'; var O = defined(this) , fn = regexp == undefined ? undefined : regexp[MATCH]; return fn !== undefined ? fn.call(regexp, O) : new RegExp(regexp)[MATCH](String(O)); }, $match]; }); /***/ }, /* 192 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; var hide = __webpack_require__(8) , redefine = __webpack_require__(16) , fails = __webpack_require__(5) , defined = __webpack_require__(33) , wks = __webpack_require__(23); module.exports = function(KEY, length, exec){ var SYMBOL = wks(KEY) , fns = exec(defined, SYMBOL, ''[KEY]) , strfn = fns[0] , rxfn = fns[1]; if(fails(function(){ var O = {}; O[SYMBOL] = function(){ return 7; }; return ''[KEY](O) != 7; })){ redefine(String.prototype, KEY, strfn); hide(RegExp.prototype, SYMBOL, length == 2 // 21.2.5.8 RegExp.prototype[@@replace](string, replaceValue) // 21.2.5.11 RegExp.prototype[@@split](string, limit) ? function(string, arg){ return rxfn.call(string, this, arg); } // 21.2.5.6 RegExp.prototype[@@match](string) // 21.2.5.9 RegExp.prototype[@@search](string) : function(string){ return rxfn.call(string, this); } ); } }; /***/ }, /* 193 */ /***/ function(module, exports, __webpack_require__) { // @@replace logic __webpack_require__(192)('replace', 2, function(defined, REPLACE, $replace){ // 21.1.3.14 String.prototype.replace(searchValue, replaceValue) return [function replace(searchValue, replaceValue){ 'use strict'; var O = defined(this) , fn = searchValue == undefined ? undefined : searchValue[REPLACE]; return fn !== undefined ? fn.call(searchValue, O, replaceValue) : $replace.call(String(O), searchValue, replaceValue); }, $replace]; }); /***/ }, /* 194 */ /***/ function(module, exports, __webpack_require__) { // @@search logic __webpack_require__(192)('search', 1, function(defined, SEARCH, $search){ // 21.1.3.15 String.prototype.search(regexp) return [function search(regexp){ 'use strict'; var O = defined(this) , fn = regexp == undefined ? undefined : regexp[SEARCH]; return fn !== undefined ? fn.call(regexp, O) : new RegExp(regexp)[SEARCH](String(O)); }, $search]; }); /***/ }, /* 195 */ /***/ function(module, exports, __webpack_require__) { // @@split logic __webpack_require__(192)('split', 2, function(defined, SPLIT, $split){ 'use strict'; var isRegExp = __webpack_require__(128) , _split = $split , $push = [].push , $SPLIT = 'split' , LENGTH = 'length' , LAST_INDEX = 'lastIndex'; if( 'abbc'[$SPLIT](/(b)*/)[1] == 'c' || 'test'[$SPLIT](/(?:)/, -1)[LENGTH] != 4 || 'ab'[$SPLIT](/(?:ab)*/)[LENGTH] != 2 || '.'[$SPLIT](/(.?)(.?)/)[LENGTH] != 4 || '.'[$SPLIT](/()()/)[LENGTH] > 1 || ''[$SPLIT](/.?/)[LENGTH] ){ var NPCG = /()??/.exec('')[1] === undefined; // nonparticipating capturing group // based on es5-shim implementation, need to rework it $split = function(separator, limit){ var string = String(this); if(separator === undefined && limit === 0)return []; // If `separator` is not a regex, use native split if(!isRegExp(separator))return _split.call(string, separator, limit); var output = []; var flags = (separator.ignoreCase ? 'i' : '') + (separator.multiline ? 'm' : '') + (separator.unicode ? 'u' : '') + (separator.sticky ? 'y' : ''); var lastLastIndex = 0; var splitLimit = limit === undefined ? 4294967295 : limit >>> 0; // Make `global` and avoid `lastIndex` issues by working with a copy var separatorCopy = new RegExp(separator.source, flags + 'g'); var separator2, match, lastIndex, lastLength, i; // Doesn't need flags gy, but they don't hurt if(!NPCG)separator2 = new RegExp('^' + separatorCopy.source + '$(?!\\s)', flags); while(match = separatorCopy.exec(string)){ // `separatorCopy.lastIndex` is not reliable cross-browser lastIndex = match.index + match[0][LENGTH]; if(lastIndex > lastLastIndex){ output.push(string.slice(lastLastIndex, match.index)); // Fix browsers whose `exec` methods don't consistently return `undefined` for NPCG if(!NPCG && match[LENGTH] > 1)match[0].replace(separator2, function(){ for(i = 1; i < arguments[LENGTH] - 2; i++)if(arguments[i] === undefined)match[i] = undefined; }); if(match[LENGTH] > 1 && match.index < string[LENGTH])$push.apply(output, match.slice(1)); lastLength = match[0][LENGTH]; lastLastIndex = lastIndex; if(output[LENGTH] >= splitLimit)break; } if(separatorCopy[LAST_INDEX] === match.index)separatorCopy[LAST_INDEX]++; // Avoid an infinite loop } if(lastLastIndex === string[LENGTH]){ if(lastLength || !separatorCopy.test(''))output.push(''); } else output.push(string.slice(lastLastIndex)); return output[LENGTH] > splitLimit ? output.slice(0, splitLimit) : output; }; // Chakra, V8 } else if('0'[$SPLIT](undefined, 0)[LENGTH]){ $split = function(separator, limit){ return separator === undefined && limit === 0 ? [] : _split.call(this, separator, limit); }; } // 21.1.3.17 String.prototype.split(separator, limit) return [function split(separator, limit){ var O = defined(this) , fn = separator == undefined ? undefined : separator[SPLIT]; return fn !== undefined ? fn.call(separator, O, limit) : $split.call(String(O), separator, limit); }, $split]; }); /***/ }, /* 196 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; var LIBRARY = __webpack_require__(26) , global = __webpack_require__(2) , ctx = __webpack_require__(18) , classof = __webpack_require__(73) , $export = __webpack_require__(6) , isObject = __webpack_require__(11) , aFunction = __webpack_require__(19) , anInstance = __webpack_require__(197) , forOf = __webpack_require__(198) , speciesConstructor = __webpack_require__(199) , task = __webpack_require__(200).set , microtask = __webpack_require__(201)() , PROMISE = 'Promise' , TypeError = global.TypeError , process = global.process , $Promise = global[PROMISE] , process = global.process , isNode = classof(process) == 'process' , empty = function(){ /* empty */ } , Internal, GenericPromiseCapability, Wrapper; var USE_NATIVE = !!function(){ try { // correct subclassing with @@species support var promise = $Promise.resolve(1) , FakePromise = (promise.constructor = {})[__webpack_require__(23)('species')] = function(exec){ exec(empty, empty); }; // unhandled rejections tracking support, NodeJS Promise without it fails @@species test return (isNode || typeof PromiseRejectionEvent == 'function') && promise.then(empty) instanceof FakePromise; } catch(e){ /* empty */ } }(); // helpers var sameConstructor = function(a, b){ // with library wrapper special case return a === b || a === $Promise && b === Wrapper; }; var isThenable = function(it){ var then; return isObject(it) && typeof (then = it.then) == 'function' ? then : false; }; var newPromiseCapability = function(C){ return sameConstructor($Promise, C) ? new PromiseCapability(C) : new GenericPromiseCapability(C); }; var PromiseCapability = GenericPromiseCapability = function(C){ var resolve, reject; this.promise = new C(function($$resolve, $$reject){ if(resolve !== undefined || reject !== undefined)throw TypeError('Bad Promise constructor'); resolve = $$resolve; reject = $$reject; }); this.resolve = aFunction(resolve); this.reject = aFunction(reject); }; var perform = function(exec){ try { exec(); } catch(e){ return {error: e}; } }; var notify = function(promise, isReject){ if(promise._n)return; promise._n = true; var chain = promise._c; microtask(function(){ var value = promise._v , ok = promise._s == 1 , i = 0; var run = function(reaction){ var handler = ok ? reaction.ok : reaction.fail , resolve = reaction.resolve , reject = reaction.reject , domain = reaction.domain , result, then; try { if(handler){ if(!ok){ if(promise._h == 2)onHandleUnhandled(promise); promise._h = 1; } if(handler === true)result = value; else { if(domain)domain.enter(); result = handler(value); if(domain)domain.exit(); } if(result === reaction.promise){ reject(TypeError('Promise-chain cycle')); } else if(then = isThenable(result)){ then.call(result, resolve, reject); } else resolve(result); } else reject(value); } catch(e){ reject(e); } }; while(chain.length > i)run(chain[i++]); // variable length - can't use forEach promise._c = []; promise._n = false; if(isReject && !promise._h)onUnhandled(promise); }); }; var onUnhandled = function(promise){ task.call(global, function(){ var value = promise._v , abrupt, handler, console; if(isUnhandled(promise)){ abrupt = perform(function(){ if(isNode){ process.emit('unhandledRejection', value, promise); } else if(handler = global.onunhandledrejection){ handler({promise: promise, reason: value}); } else if((console = global.console) && console.error){ console.error('Unhandled promise rejection', value); } }); // Browsers should not trigger `rejectionHandled` event if it was handled here, NodeJS - should promise._h = isNode || isUnhandled(promise) ? 2 : 1; } promise._a = undefined; if(abrupt)throw abrupt.error; }); }; var isUnhandled = function(promise){ if(promise._h == 1)return false; var chain = promise._a || promise._c , i = 0 , reaction; while(chain.length > i){ reaction = chain[i++]; if(reaction.fail || !isUnhandled(reaction.promise))return false; } return true; }; var onHandleUnhandled = function(promise){ task.call(global, function(){ var handler; if(isNode){ process.emit('rejectionHandled', promise); } else if(handler = global.onrejectionhandled){ handler({promise: promise, reason: promise._v}); } }); }; var $reject = function(value){ var promise = this; if(promise._d)return; promise._d = true; promise = promise._w || promise; // unwrap promise._v = value; promise._s = 2; if(!promise._a)promise._a = promise._c.slice(); notify(promise, true); }; var $resolve = function(value){ var promise = this , then; if(promise._d)return; promise._d = true; promise = promise._w || promise; // unwrap try { if(promise === value)throw TypeError("Promise can't be resolved itself"); if(then = isThenable(value)){ microtask(function(){ var wrapper = {_w: promise, _d: false}; // wrap try { then.call(value, ctx($resolve, wrapper, 1), ctx($reject, wrapper, 1)); } catch(e){ $reject.call(wrapper, e); } }); } else { promise._v = value; promise._s = 1; notify(promise, false); } } catch(e){ $reject.call({_w: promise, _d: false}, e); // wrap } }; // constructor polyfill if(!USE_NATIVE){ // 25.4.3.1 Promise(executor) $Promise = function Promise(executor){ anInstance(this, $Promise, PROMISE, '_h'); aFunction(executor); Internal.call(this); try { executor(ctx($resolve, this, 1), ctx($reject, this, 1)); } catch(err){ $reject.call(this, err); } }; Internal = function Promise(executor){ this._c = []; // <- awaiting reactions this._a = undefined; // <- checked in isUnhandled reactions this._s = 0; // <- state this._d = false; // <- done this._v = undefined; // <- value this._h = 0; // <- rejection state, 0 - default, 1 - handled, 2 - unhandled this._n = false; // <- notify }; Internal.prototype = __webpack_require__(202)($Promise.prototype, { // 25.4.5.3 Promise.prototype.then(onFulfilled, onRejected) then: function then(onFulfilled, onRejected){ var reaction = newPromiseCapability(speciesConstructor(this, $Promise)); reaction.ok = typeof onFulfilled == 'function' ? onFulfilled : true; reaction.fail = typeof onRejected == 'function' && onRejected; reaction.domain = isNode ? process.domain : undefined; this._c.push(reaction); if(this._a)this._a.push(reaction); if(this._s)notify(this, false); return reaction.promise; }, // 25.4.5.1 Promise.prototype.catch(onRejected) 'catch': function(onRejected){ return this.then(undefined, onRejected); } }); PromiseCapability = function(){ var promise = new Internal; this.promise = promise; this.resolve = ctx($resolve, promise, 1); this.reject = ctx($reject, promise, 1); }; } $export($export.G + $export.W + $export.F * !USE_NATIVE, {Promise: $Promise}); __webpack_require__(22)($Promise, PROMISE); __webpack_require__(186)(PROMISE); Wrapper = __webpack_require__(7)[PROMISE]; // statics $export($export.S + $export.F * !USE_NATIVE, PROMISE, { // 25.4.4.5 Promise.reject(r) reject: function reject(r){ var capability = newPromiseCapability(this) , $$reject = capability.reject; $$reject(r); return capability.promise; } }); $export($export.S + $export.F * (LIBRARY || !USE_NATIVE), PROMISE, { // 25.4.4.6 Promise.resolve(x) resolve: function resolve(x){ // instanceof instead of internal slot check because we should fix it without replacement native Promise core if(x instanceof $Promise && sameConstructor(x.constructor, this))return x; var capability = newPromiseCapability(this) , $$resolve = capability.resolve; $$resolve(x); return capability.promise; } }); $export($export.S + $export.F * !(USE_NATIVE && __webpack_require__(157)(function(iter){ $Promise.all(iter)['catch'](empty); })), PROMISE, { // 25.4.4.1 Promise.all(iterable) all: function all(iterable){ var C = this , capability = newPromiseCapability(C) , resolve = capability.resolve , reject = capability.reject; var abrupt = perform(function(){ var values = [] , index = 0 , remaining = 1; forOf(iterable, false, function(promise){ var $index = index++ , alreadyCalled = false; values.push(undefined); remaining++; C.resolve(promise).then(function(value){ if(alreadyCalled)return; alreadyCalled = true; values[$index] = value; --remaining || resolve(values); }, reject); }); --remaining || resolve(values); }); if(abrupt)reject(abrupt.error); return capability.promise; }, // 25.4.4.4 Promise.race(iterable) race: function race(iterable){ var C = this , capability = newPromiseCapability(C) , reject = capability.reject; var abrupt = perform(function(){ forOf(iterable, false, function(promise){ C.resolve(promise).then(capability.resolve, reject); }); }); if(abrupt)reject(abrupt.error); return capability.promise; } }); /***/ }, /* 197 */ /***/ function(module, exports) { module.exports = function(it, Constructor, name, forbiddenField){ if(!(it instanceof Constructor) || (forbiddenField !== undefined && forbiddenField in it)){ throw TypeError(name + ': incorrect invocation!'); } return it; }; /***/ }, /* 198 */ /***/ function(module, exports, __webpack_require__) { var ctx = __webpack_require__(18) , call = __webpack_require__(153) , isArrayIter = __webpack_require__(154) , anObject = __webpack_require__(10) , toLength = __webpack_require__(35) , getIterFn = __webpack_require__(156) , BREAK = {} , RETURN = {}; var exports = module.exports = function(iterable, entries, fn, that, ITERATOR){ var iterFn = ITERATOR ? function(){ return iterable; } : getIterFn(iterable) , f = ctx(fn, that, entries ? 2 : 1) , index = 0 , length, step, iterator, result; if(typeof iterFn != 'function')throw TypeError(iterable + ' is not iterable!'); // fast case for arrays with default iterator if(isArrayIter(iterFn))for(length = toLength(iterable.length); length > index; index++){ result = entries ? f(anObject(step = iterable[index])[0], step[1]) : f(iterable[index]); if(result === BREAK || result === RETURN)return result; } else for(iterator = iterFn.call(iterable); !(step = iterator.next()).done; ){ result = call(iterator, f, step.value, entries); if(result === BREAK || result === RETURN)return result; } }; exports.BREAK = BREAK; exports.RETURN = RETURN; /***/ }, /* 199 */ /***/ function(module, exports, __webpack_require__) { // 7.3.20 SpeciesConstructor(O, defaultConstructor) var anObject = __webpack_require__(10) , aFunction = __webpack_require__(19) , SPECIES = __webpack_require__(23)('species'); module.exports = function(O, D){ var C = anObject(O).constructor, S; return C === undefined || (S = anObject(C)[SPECIES]) == undefined ? D : aFunction(S); }; /***/ }, /* 200 */ /***/ function(module, exports, __webpack_require__) { var ctx = __webpack_require__(18) , invoke = __webpack_require__(76) , html = __webpack_require__(46) , cel = __webpack_require__(13) , global = __webpack_require__(2) , process = global.process , setTask = global.setImmediate , clearTask = global.clearImmediate , MessageChannel = global.MessageChannel , counter = 0 , queue = {} , ONREADYSTATECHANGE = 'onreadystatechange' , defer, channel, port; var run = function(){ var id = +this; if(queue.hasOwnProperty(id)){ var fn = queue[id]; delete queue[id]; fn(); } }; var listener = function(event){ run.call(event.data); }; // Node.js 0.9+ & IE10+ has setImmediate, otherwise: if(!setTask || !clearTask){ setTask = function setImmediate(fn){ var args = [], i = 1; while(arguments.length > i)args.push(arguments[i++]); queue[++counter] = function(){ invoke(typeof fn == 'function' ? fn : Function(fn), args); }; defer(counter); return counter; }; clearTask = function clearImmediate(id){ delete queue[id]; }; // Node.js 0.8- if(__webpack_require__(32)(process) == 'process'){ defer = function(id){ process.nextTick(ctx(run, id, 1)); }; // Browsers with MessageChannel, includes WebWorkers } else if(MessageChannel){ channel = new MessageChannel; port = channel.port2; channel.port1.onmessage = listener; defer = ctx(port.postMessage, port, 1); // Browsers with postMessage, skip WebWorkers // IE8 has postMessage, but it's sync & typeof its postMessage is 'object' } else if(global.addEventListener && typeof postMessage == 'function' && !global.importScripts){ defer = function(id){ global.postMessage(id + '', '*'); }; global.addEventListener('message', listener, false); // IE8- } else if(ONREADYSTATECHANGE in cel('script')){ defer = function(id){ html.appendChild(cel('script'))[ONREADYSTATECHANGE] = function(){ html.removeChild(this); run.call(id); }; }; // Rest old browsers } else { defer = function(id){ setTimeout(ctx(run, id, 1), 0); }; } } module.exports = { set: setTask, clear: clearTask }; /***/ }, /* 201 */ /***/ function(module, exports, __webpack_require__) { var global = __webpack_require__(2) , macrotask = __webpack_require__(200).set , Observer = global.MutationObserver || global.WebKitMutationObserver , process = global.process , Promise = global.Promise , isNode = __webpack_require__(32)(process) == 'process'; module.exports = function(){ var head, last, notify; var flush = function(){ var parent, fn; if(isNode && (parent = process.domain))parent.exit(); while(head){ fn = head.fn; head = head.next; try { fn(); } catch(e){ if(head)notify(); else last = undefined; throw e; } } last = undefined; if(parent)parent.enter(); }; // Node.js if(isNode){ notify = function(){ process.nextTick(flush); }; // browsers with MutationObserver } else if(Observer){ var toggle = true , node = document.createTextNode(''); new Observer(flush).observe(node, {characterData: true}); // eslint-disable-line no-new notify = function(){ node.data = toggle = !toggle; }; // environments with maybe non-completely correct, but existent Promise } else if(Promise && Promise.resolve){ var promise = Promise.resolve(); notify = function(){ promise.then(flush); }; // for other environments - macrotask based on: // - setImmediate // - MessageChannel // - window.postMessag // - onreadystatechange // - setTimeout } else { notify = function(){ // strange IE + webpack dev server bug - use .call(global) macrotask.call(global, flush); }; } return function(fn){ var task = {fn: fn, next: undefined}; if(last)last.next = task; if(!head){ head = task; notify(); } last = task; }; }; /***/ }, /* 202 */ /***/ function(module, exports, __webpack_require__) { var redefine = __webpack_require__(16); module.exports = function(target, src, safe){ for(var key in src)redefine(target, key, src[key], safe); return target; }; /***/ }, /* 203 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; var strong = __webpack_require__(204); // 23.1 Map Objects module.exports = __webpack_require__(205)('Map', function(get){ return function Map(){ return get(this, arguments.length > 0 ? arguments[0] : undefined); }; }, { // 23.1.3.6 Map.prototype.get(key) get: function get(key){ var entry = strong.getEntry(this, key); return entry && entry.v; }, // 23.1.3.9 Map.prototype.set(key, value) set: function set(key, value){ return strong.def(this, key === 0 ? 0 : key, value); } }, strong, true); /***/ }, /* 204 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; var dP = __webpack_require__(9).f , create = __webpack_require__(44) , redefineAll = __webpack_require__(202) , ctx = __webpack_require__(18) , anInstance = __webpack_require__(197) , defined = __webpack_require__(33) , forOf = __webpack_require__(198) , $iterDefine = __webpack_require__(134) , step = __webpack_require__(184) , setSpecies = __webpack_require__(186) , DESCRIPTORS = __webpack_require__(4) , fastKey = __webpack_require__(20).fastKey , SIZE = DESCRIPTORS ? '_s' : 'size'; var getEntry = function(that, key){ // fast case var index = fastKey(key), entry; if(index !== 'F')return that._i[index]; // frozen object case for(entry = that._f; entry; entry = entry.n){ if(entry.k == key)return entry; } }; module.exports = { getConstructor: function(wrapper, NAME, IS_MAP, ADDER){ var C = wrapper(function(that, iterable){ anInstance(that, C, NAME, '_i'); that._i = create(null); // index that._f = undefined; // first entry that._l = undefined; // last entry that[SIZE] = 0; // size if(iterable != undefined)forOf(iterable, IS_MAP, that[ADDER], that); }); redefineAll(C.prototype, { // 23.1.3.1 Map.prototype.clear() // 23.2.3.2 Set.prototype.clear() clear: function clear(){ for(var that = this, data = that._i, entry = that._f; entry; entry = entry.n){ entry.r = true; if(entry.p)entry.p = entry.p.n = undefined; delete data[entry.i]; } that._f = that._l = undefined; that[SIZE] = 0; }, // 23.1.3.3 Map.prototype.delete(key) // 23.2.3.4 Set.prototype.delete(value) 'delete': function(key){ var that = this , entry = getEntry(that, key); if(entry){ var next = entry.n , prev = entry.p; delete that._i[entry.i]; entry.r = true; if(prev)prev.n = next; if(next)next.p = prev; if(that._f == entry)that._f = next; if(that._l == entry)that._l = prev; that[SIZE]--; } return !!entry; }, // 23.2.3.6 Set.prototype.forEach(callbackfn, thisArg = undefined) // 23.1.3.5 Map.prototype.forEach(callbackfn, thisArg = undefined) forEach: function forEach(callbackfn /*, that = undefined */){ anInstance(this, C, 'forEach'); var f = ctx(callbackfn, arguments.length > 1 ? arguments[1] : undefined, 3) , entry; while(entry = entry ? entry.n : this._f){ f(entry.v, entry.k, this); // revert to the last existing entry while(entry && entry.r)entry = entry.p; } }, // 23.1.3.7 Map.prototype.has(key) // 23.2.3.7 Set.prototype.has(value) has: function has(key){ return !!getEntry(this, key); } }); if(DESCRIPTORS)dP(C.prototype, 'size', { get: function(){ return defined(this[SIZE]); } }); return C; }, def: function(that, key, value){ var entry = getEntry(that, key) , prev, index; // change existing entry if(entry){ entry.v = value; // create new entry } else { that._l = entry = { i: index = fastKey(key, true), // <- index k: key, // <- key v: value, // <- value p: prev = that._l, // <- previous entry n: undefined, // <- next entry r: false // <- removed }; if(!that._f)that._f = entry; if(prev)prev.n = entry; that[SIZE]++; // add to index if(index !== 'F')that._i[index] = entry; } return that; }, getEntry: getEntry, setStrong: function(C, NAME, IS_MAP){ // add .keys, .values, .entries, [@@iterator] // 23.1.3.4, 23.1.3.8, 23.1.3.11, 23.1.3.12, 23.2.3.5, 23.2.3.8, 23.2.3.10, 23.2.3.11 $iterDefine(C, NAME, function(iterated, kind){ this._t = iterated; // target this._k = kind; // kind this._l = undefined; // previous }, function(){ var that = this , kind = that._k , entry = that._l; // revert to the last existing entry while(entry && entry.r)entry = entry.p; // get next entry if(!that._t || !(that._l = entry = entry ? entry.n : that._t._f)){ // or finish the iteration that._t = undefined; return step(1); } // return step by kind if(kind == 'keys' )return step(0, entry.k); if(kind == 'values')return step(0, entry.v); return step(0, [entry.k, entry.v]); }, IS_MAP ? 'entries' : 'values' , !IS_MAP, true); // add [@@species], 23.1.2.2, 23.2.2.2 setSpecies(NAME); } }; /***/ }, /* 205 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; var global = __webpack_require__(2) , $export = __webpack_require__(6) , redefine = __webpack_require__(16) , redefineAll = __webpack_require__(202) , meta = __webpack_require__(20) , forOf = __webpack_require__(198) , anInstance = __webpack_require__(197) , isObject = __webpack_require__(11) , fails = __webpack_require__(5) , $iterDetect = __webpack_require__(157) , setToStringTag = __webpack_require__(22) , inheritIfRequired = __webpack_require__(80); module.exports = function(NAME, wrapper, methods, common, IS_MAP, IS_WEAK){ var Base = global[NAME] , C = Base , ADDER = IS_MAP ? 'set' : 'add' , proto = C && C.prototype , O = {}; var fixMethod = function(KEY){ var fn = proto[KEY]; redefine(proto, KEY, KEY == 'delete' ? function(a){ return IS_WEAK && !isObject(a) ? false : fn.call(this, a === 0 ? 0 : a); } : KEY == 'has' ? function has(a){ return IS_WEAK && !isObject(a) ? false : fn.call(this, a === 0 ? 0 : a); } : KEY == 'get' ? function get(a){ return IS_WEAK && !isObject(a) ? undefined : fn.call(this, a === 0 ? 0 : a); } : KEY == 'add' ? function add(a){ fn.call(this, a === 0 ? 0 : a); return this; } : function set(a, b){ fn.call(this, a === 0 ? 0 : a, b); return this; } ); }; if(typeof C != 'function' || !(IS_WEAK || proto.forEach && !fails(function(){ new C().entries().next(); }))){ // create collection constructor C = common.getConstructor(wrapper, NAME, IS_MAP, ADDER); redefineAll(C.prototype, methods); meta.NEED = true; } else { var instance = new C // early implementations not supports chaining , HASNT_CHAINING = instance[ADDER](IS_WEAK ? {} : -0, 1) != instance // V8 ~ Chromium 40- weak-collections throws on primitives, but should return false , THROWS_ON_PRIMITIVES = fails(function(){ instance.has(1); }) // most early implementations doesn't supports iterables, most modern - not close it correctly , ACCEPT_ITERABLES = $iterDetect(function(iter){ new C(iter); }) // eslint-disable-line no-new // for early implementations -0 and +0 not the same , BUGGY_ZERO = !IS_WEAK && fails(function(){ // V8 ~ Chromium 42- fails only with 5+ elements var $instance = new C() , index = 5; while(index--)$instance[ADDER](index, index); return !$instance.has(-0); }); if(!ACCEPT_ITERABLES){ C = wrapper(function(target, iterable){ anInstance(target, C, NAME); var that = inheritIfRequired(new Base, target, C); if(iterable != undefined)forOf(iterable, IS_MAP, that[ADDER], that); return that; }); C.prototype = proto; proto.constructor = C; } if(THROWS_ON_PRIMITIVES || BUGGY_ZERO){ fixMethod('delete'); fixMethod('has'); IS_MAP && fixMethod('get'); } if(BUGGY_ZERO || HASNT_CHAINING)fixMethod(ADDER); // weak collections should not contains .clear method if(IS_WEAK && proto.clear)delete proto.clear; } setToStringTag(C, NAME); O[NAME] = C; $export($export.G + $export.W + $export.F * (C != Base), O); if(!IS_WEAK)common.setStrong(C, NAME, IS_MAP); return C; }; /***/ }, /* 206 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; var strong = __webpack_require__(204); // 23.2 Set Objects module.exports = __webpack_require__(205)('Set', function(get){ return function Set(){ return get(this, arguments.length > 0 ? arguments[0] : undefined); }; }, { // 23.2.3.1 Set.prototype.add(value) add: function add(value){ return strong.def(this, value = value === 0 ? 0 : value, value); } }, strong); /***/ }, /* 207 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; var each = __webpack_require__(164)(0) , redefine = __webpack_require__(16) , meta = __webpack_require__(20) , assign = __webpack_require__(67) , weak = __webpack_require__(208) , isObject = __webpack_require__(11) , getWeak = meta.getWeak , isExtensible = Object.isExtensible , uncaughtFrozenStore = weak.ufstore , tmp = {} , InternalMap; var wrapper = function(get){ return function WeakMap(){ return get(this, arguments.length > 0 ? arguments[0] : undefined); }; }; var methods = { // 23.3.3.3 WeakMap.prototype.get(key) get: function get(key){ if(isObject(key)){ var data = getWeak(key); if(data === true)return uncaughtFrozenStore(this).get(key); return data ? data[this._i] : undefined; } }, // 23.3.3.5 WeakMap.prototype.set(key, value) set: function set(key, value){ return weak.def(this, key, value); } }; // 23.3 WeakMap Objects var $WeakMap = module.exports = __webpack_require__(205)('WeakMap', wrapper, methods, weak, true, true); // IE11 WeakMap frozen keys fix if(new $WeakMap().set((Object.freeze || Object)(tmp), 7).get(tmp) != 7){ InternalMap = weak.getConstructor(wrapper); assign(InternalMap.prototype, methods); meta.NEED = true; each(['delete', 'has', 'get', 'set'], function(key){ var proto = $WeakMap.prototype , method = proto[key]; redefine(proto, key, function(a, b){ // store frozen objects on internal weakmap shim if(isObject(a) && !isExtensible(a)){ if(!this._f)this._f = new InternalMap; var result = this._f[key](a, b); return key == 'set' ? this : result; // store all the rest on native weakmap } return method.call(this, a, b); }); }); } /***/ }, /* 208 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; var redefineAll = __webpack_require__(202) , getWeak = __webpack_require__(20).getWeak , anObject = __webpack_require__(10) , isObject = __webpack_require__(11) , anInstance = __webpack_require__(197) , forOf = __webpack_require__(198) , createArrayMethod = __webpack_require__(164) , $has = __webpack_require__(3) , arrayFind = createArrayMethod(5) , arrayFindIndex = createArrayMethod(6) , id = 0; // fallback for uncaught frozen keys var uncaughtFrozenStore = function(that){ return that._l || (that._l = new UncaughtFrozenStore); }; var UncaughtFrozenStore = function(){ this.a = []; }; var findUncaughtFrozen = function(store, key){ return arrayFind(store.a, function(it){ return it[0] === key; }); }; UncaughtFrozenStore.prototype = { get: function(key){ var entry = findUncaughtFrozen(this, key); if(entry)return entry[1]; }, has: function(key){ return !!findUncaughtFrozen(this, key); }, set: function(key, value){ var entry = findUncaughtFrozen(this, key); if(entry)entry[1] = value; else this.a.push([key, value]); }, 'delete': function(key){ var index = arrayFindIndex(this.a, function(it){ return it[0] === key; }); if(~index)this.a.splice(index, 1); return !!~index; } }; module.exports = { getConstructor: function(wrapper, NAME, IS_MAP, ADDER){ var C = wrapper(function(that, iterable){ anInstance(that, C, NAME, '_i'); that._i = id++; // collection id that._l = undefined; // leak store for uncaught frozen objects if(iterable != undefined)forOf(iterable, IS_MAP, that[ADDER], that); }); redefineAll(C.prototype, { // 23.3.3.2 WeakMap.prototype.delete(key) // 23.4.3.3 WeakSet.prototype.delete(value) 'delete': function(key){ if(!isObject(key))return false; var data = getWeak(key); if(data === true)return uncaughtFrozenStore(this)['delete'](key); return data && $has(data, this._i) && delete data[this._i]; }, // 23.3.3.4 WeakMap.prototype.has(key) // 23.4.3.4 WeakSet.prototype.has(value) has: function has(key){ if(!isObject(key))return false; var data = getWeak(key); if(data === true)return uncaughtFrozenStore(this).has(key); return data && $has(data, this._i); } }); return C; }, def: function(that, key, value){ var data = getWeak(anObject(key), true); if(data === true)uncaughtFrozenStore(that).set(key, value); else data[that._i] = value; return that; }, ufstore: uncaughtFrozenStore }; /***/ }, /* 209 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; var weak = __webpack_require__(208); // 23.4 WeakSet Objects __webpack_require__(205)('WeakSet', function(get){ return function WeakSet(){ return get(this, arguments.length > 0 ? arguments[0] : undefined); }; }, { // 23.4.3.1 WeakSet.prototype.add(value) add: function add(value){ return weak.def(this, value, true); } }, weak, false, true); /***/ }, /* 210 */ /***/ function(module, exports, __webpack_require__) { // 26.1.1 Reflect.apply(target, thisArgument, argumentsList) var $export = __webpack_require__(6) , aFunction = __webpack_require__(19) , anObject = __webpack_require__(10) , rApply = (__webpack_require__(2).Reflect || {}).apply , fApply = Function.apply; // MS Edge argumentsList argument is optional $export($export.S + $export.F * !__webpack_require__(5)(function(){ rApply(function(){}); }), 'Reflect', { apply: function apply(target, thisArgument, argumentsList){ var T = aFunction(target) , L = anObject(argumentsList); return rApply ? rApply(T, thisArgument, L) : fApply.call(T, thisArgument, L); } }); /***/ }, /* 211 */ /***/ function(module, exports, __webpack_require__) { // 26.1.2 Reflect.construct(target, argumentsList [, newTarget]) var $export = __webpack_require__(6) , create = __webpack_require__(44) , aFunction = __webpack_require__(19) , anObject = __webpack_require__(10) , isObject = __webpack_require__(11) , fails = __webpack_require__(5) , bind = __webpack_require__(75) , rConstruct = (__webpack_require__(2).Reflect || {}).construct; // MS Edge supports only 2 arguments and argumentsList argument is optional // FF Nightly sets third argument as `new.target`, but does not create `this` from it var NEW_TARGET_BUG = fails(function(){ function F(){} return !(rConstruct(function(){}, [], F) instanceof F); }); var ARGS_BUG = !fails(function(){ rConstruct(function(){}); }); $export($export.S + $export.F * (NEW_TARGET_BUG || ARGS_BUG), 'Reflect', { construct: function construct(Target, args /*, newTarget*/){ aFunction(Target); anObject(args); var newTarget = arguments.length < 3 ? Target : aFunction(arguments[2]); if(ARGS_BUG && !NEW_TARGET_BUG)return rConstruct(Target, args, newTarget); if(Target == newTarget){ // w/o altered newTarget, optimization for 0-4 arguments switch(args.length){ case 0: return new Target; case 1: return new Target(args[0]); case 2: return new Target(args[0], args[1]); case 3: return new Target(args[0], args[1], args[2]); case 4: return new Target(args[0], args[1], args[2], args[3]); } // w/o altered newTarget, lot of arguments case var $args = [null]; $args.push.apply($args, args); return new (bind.apply(Target, $args)); } // with altered newTarget, not support built-in constructors var proto = newTarget.prototype , instance = create(isObject(proto) ? proto : Object.prototype) , result = Function.apply.call(Target, instance, args); return isObject(result) ? result : instance; } }); /***/ }, /* 212 */ /***/ function(module, exports, __webpack_require__) { // 26.1.3 Reflect.defineProperty(target, propertyKey, attributes) var dP = __webpack_require__(9) , $export = __webpack_require__(6) , anObject = __webpack_require__(10) , toPrimitive = __webpack_require__(14); // MS Edge has broken Reflect.defineProperty - throwing instead of returning false $export($export.S + $export.F * __webpack_require__(5)(function(){ Reflect.defineProperty(dP.f({}, 1, {value: 1}), 1, {value: 2}); }), 'Reflect', { defineProperty: function defineProperty(target, propertyKey, attributes){ anObject(target); propertyKey = toPrimitive(propertyKey, true); anObject(attributes); try { dP.f(target, propertyKey, attributes); return true; } catch(e){ return false; } } }); /***/ }, /* 213 */ /***/ function(module, exports, __webpack_require__) { // 26.1.4 Reflect.deleteProperty(target, propertyKey) var $export = __webpack_require__(6) , gOPD = __webpack_require__(49).f , anObject = __webpack_require__(10); $export($export.S, 'Reflect', { deleteProperty: function deleteProperty(target, propertyKey){ var desc = gOPD(anObject(target), propertyKey); return desc && !desc.configurable ? false : delete target[propertyKey]; } }); /***/ }, /* 214 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; // 26.1.5 Reflect.enumerate(target) var $export = __webpack_require__(6) , anObject = __webpack_require__(10); var Enumerate = function(iterated){ this._t = anObject(iterated); // target this._i = 0; // next index var keys = this._k = [] // keys , key; for(key in iterated)keys.push(key); }; __webpack_require__(136)(Enumerate, 'Object', function(){ var that = this , keys = that._k , key; do { if(that._i >= keys.length)return {value: undefined, done: true}; } while(!((key = keys[that._i++]) in that._t)); return {value: key, done: false}; }); $export($export.S, 'Reflect', { enumerate: function enumerate(target){ return new Enumerate(target); } }); /***/ }, /* 215 */ /***/ function(module, exports, __webpack_require__) { // 26.1.6 Reflect.get(target, propertyKey [, receiver]) var gOPD = __webpack_require__(49) , getPrototypeOf = __webpack_require__(57) , has = __webpack_require__(3) , $export = __webpack_require__(6) , isObject = __webpack_require__(11) , anObject = __webpack_require__(10); function get(target, propertyKey/*, receiver*/){ var receiver = arguments.length < 3 ? target : arguments[2] , desc, proto; if(anObject(target) === receiver)return target[propertyKey]; if(desc = gOPD.f(target, propertyKey))return has(desc, 'value') ? desc.value : desc.get !== undefined ? desc.get.call(receiver) : undefined; if(isObject(proto = getPrototypeOf(target)))return get(proto, propertyKey, receiver); } $export($export.S, 'Reflect', {get: get}); /***/ }, /* 216 */ /***/ function(module, exports, __webpack_require__) { // 26.1.7 Reflect.getOwnPropertyDescriptor(target, propertyKey) var gOPD = __webpack_require__(49) , $export = __webpack_require__(6) , anObject = __webpack_require__(10); $export($export.S, 'Reflect', { getOwnPropertyDescriptor: function getOwnPropertyDescriptor(target, propertyKey){ return gOPD.f(anObject(target), propertyKey); } }); /***/ }, /* 217 */ /***/ function(module, exports, __webpack_require__) { // 26.1.8 Reflect.getPrototypeOf(target) var $export = __webpack_require__(6) , getProto = __webpack_require__(57) , anObject = __webpack_require__(10); $export($export.S, 'Reflect', { getPrototypeOf: function getPrototypeOf(target){ return getProto(anObject(target)); } }); /***/ }, /* 218 */ /***/ function(module, exports, __webpack_require__) { // 26.1.9 Reflect.has(target, propertyKey) var $export = __webpack_require__(6); $export($export.S, 'Reflect', { has: function has(target, propertyKey){ return propertyKey in target; } }); /***/ }, /* 219 */ /***/ function(module, exports, __webpack_require__) { // 26.1.10 Reflect.isExtensible(target) var $export = __webpack_require__(6) , anObject = __webpack_require__(10) , $isExtensible = Object.isExtensible; $export($export.S, 'Reflect', { isExtensible: function isExtensible(target){ anObject(target); return $isExtensible ? $isExtensible(target) : true; } }); /***/ }, /* 220 */ /***/ function(module, exports, __webpack_require__) { // 26.1.11 Reflect.ownKeys(target) var $export = __webpack_require__(6); $export($export.S, 'Reflect', {ownKeys: __webpack_require__(221)}); /***/ }, /* 221 */ /***/ function(module, exports, __webpack_require__) { // all object keys, includes non-enumerable and symbols var gOPN = __webpack_require__(48) , gOPS = __webpack_require__(41) , anObject = __webpack_require__(10) , Reflect = __webpack_require__(2).Reflect; module.exports = Reflect && Reflect.ownKeys || function ownKeys(it){ var keys = gOPN.f(anObject(it)) , getSymbols = gOPS.f; return getSymbols ? keys.concat(getSymbols(it)) : keys; }; /***/ }, /* 222 */ /***/ function(module, exports, __webpack_require__) { // 26.1.12 Reflect.preventExtensions(target) var $export = __webpack_require__(6) , anObject = __webpack_require__(10) , $preventExtensions = Object.preventExtensions; $export($export.S, 'Reflect', { preventExtensions: function preventExtensions(target){ anObject(target); try { if($preventExtensions)$preventExtensions(target); return true; } catch(e){ return false; } } }); /***/ }, /* 223 */ /***/ function(module, exports, __webpack_require__) { // 26.1.13 Reflect.set(target, propertyKey, V [, receiver]) var dP = __webpack_require__(9) , gOPD = __webpack_require__(49) , getPrototypeOf = __webpack_require__(57) , has = __webpack_require__(3) , $export = __webpack_require__(6) , createDesc = __webpack_require__(15) , anObject = __webpack_require__(10) , isObject = __webpack_require__(11); function set(target, propertyKey, V/*, receiver*/){ var receiver = arguments.length < 4 ? target : arguments[3] , ownDesc = gOPD.f(anObject(target), propertyKey) , existingDescriptor, proto; if(!ownDesc){ if(isObject(proto = getPrototypeOf(target))){ return set(proto, propertyKey, V, receiver); } ownDesc = createDesc(0); } if(has(ownDesc, 'value')){ if(ownDesc.writable === false || !isObject(receiver))return false; existingDescriptor = gOPD.f(receiver, propertyKey) || createDesc(0); existingDescriptor.value = V; dP.f(receiver, propertyKey, existingDescriptor); return true; } return ownDesc.set === undefined ? false : (ownDesc.set.call(receiver, V), true); } $export($export.S, 'Reflect', {set: set}); /***/ }, /* 224 */ /***/ function(module, exports, __webpack_require__) { // 26.1.14 Reflect.setPrototypeOf(target, proto) var $export = __webpack_require__(6) , setProto = __webpack_require__(71); if(setProto)$export($export.S, 'Reflect', { setPrototypeOf: function setPrototypeOf(target, proto){ setProto.check(target, proto); try { setProto.set(target, proto); return true; } catch(e){ return false; } } }); /***/ }, /* 225 */ /***/ function(module, exports, __webpack_require__) { // 20.3.3.1 / 15.9.4.4 Date.now() var $export = __webpack_require__(6); $export($export.S, 'Date', {now: function(){ return new Date().getTime(); }}); /***/ }, /* 226 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; var $export = __webpack_require__(6) , toObject = __webpack_require__(56) , toPrimitive = __webpack_require__(14); $export($export.P + $export.F * __webpack_require__(5)(function(){ return new Date(NaN).toJSON() !== null || Date.prototype.toJSON.call({toISOString: function(){ return 1; }}) !== 1; }), 'Date', { toJSON: function toJSON(key){ var O = toObject(this) , pv = toPrimitive(O); return typeof pv == 'number' && !isFinite(pv) ? null : O.toISOString(); } }); /***/ }, /* 227 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; // 20.3.4.36 / 15.9.5.43 Date.prototype.toISOString() var $export = __webpack_require__(6) , fails = __webpack_require__(5) , getTime = Date.prototype.getTime; var lz = function(num){ return num > 9 ? num : '0' + num; }; // PhantomJS / old WebKit has a broken implementations $export($export.P + $export.F * (fails(function(){ return new Date(-5e13 - 1).toISOString() != '0385-07-25T07:06:39.999Z'; }) || !fails(function(){ new Date(NaN).toISOString(); })), 'Date', { toISOString: function toISOString(){ if(!isFinite(getTime.call(this)))throw RangeError('Invalid time value'); var d = this , y = d.getUTCFullYear() , m = d.getUTCMilliseconds() , s = y < 0 ? '-' : y > 9999 ? '+' : ''; return s + ('00000' + Math.abs(y)).slice(s ? -6 : -4) + '-' + lz(d.getUTCMonth() + 1) + '-' + lz(d.getUTCDate()) + 'T' + lz(d.getUTCHours()) + ':' + lz(d.getUTCMinutes()) + ':' + lz(d.getUTCSeconds()) + '.' + (m > 99 ? m : '0' + lz(m)) + 'Z'; } }); /***/ }, /* 228 */ /***/ function(module, exports, __webpack_require__) { var DateProto = Date.prototype , INVALID_DATE = 'Invalid Date' , TO_STRING = 'toString' , $toString = DateProto[TO_STRING] , getTime = DateProto.getTime; if(new Date(NaN) + '' != INVALID_DATE){ __webpack_require__(16)(DateProto, TO_STRING, function toString(){ var value = getTime.call(this); return value === value ? $toString.call(this) : INVALID_DATE; }); } /***/ }, /* 229 */ /***/ function(module, exports, __webpack_require__) { var TO_PRIMITIVE = __webpack_require__(23)('toPrimitive') , proto = Date.prototype; if(!(TO_PRIMITIVE in proto))__webpack_require__(8)(proto, TO_PRIMITIVE, __webpack_require__(230)); /***/ }, /* 230 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; var anObject = __webpack_require__(10) , toPrimitive = __webpack_require__(14) , NUMBER = 'number'; module.exports = function(hint){ if(hint !== 'string' && hint !== NUMBER && hint !== 'default')throw TypeError('Incorrect hint'); return toPrimitive(anObject(this), hint != NUMBER); }; /***/ }, /* 231 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; var $export = __webpack_require__(6) , $typed = __webpack_require__(232) , buffer = __webpack_require__(233) , anObject = __webpack_require__(10) , toIndex = __webpack_require__(37) , toLength = __webpack_require__(35) , isObject = __webpack_require__(11) , ArrayBuffer = __webpack_require__(2).ArrayBuffer , speciesConstructor = __webpack_require__(199) , $ArrayBuffer = buffer.ArrayBuffer , $DataView = buffer.DataView , $isView = $typed.ABV && ArrayBuffer.isView , $slice = $ArrayBuffer.prototype.slice , VIEW = $typed.VIEW , ARRAY_BUFFER = 'ArrayBuffer'; $export($export.G + $export.W + $export.F * (ArrayBuffer !== $ArrayBuffer), {ArrayBuffer: $ArrayBuffer}); $export($export.S + $export.F * !$typed.CONSTR, ARRAY_BUFFER, { // 24.1.3.1 ArrayBuffer.isView(arg) isView: function isView(it){ return $isView && $isView(it) || isObject(it) && VIEW in it; } }); $export($export.P + $export.U + $export.F * __webpack_require__(5)(function(){ return !new $ArrayBuffer(2).slice(1, undefined).byteLength; }), ARRAY_BUFFER, { // 24.1.4.3 ArrayBuffer.prototype.slice(start, end) slice: function slice(start, end){ if($slice !== undefined && end === undefined)return $slice.call(anObject(this), start); // FF fix var len = anObject(this).byteLength , first = toIndex(start, len) , final = toIndex(end === undefined ? len : end, len) , result = new (speciesConstructor(this, $ArrayBuffer))(toLength(final - first)) , viewS = new $DataView(this) , viewT = new $DataView(result) , index = 0; while(first < final){ viewT.setUint8(index++, viewS.getUint8(first++)); } return result; } }); __webpack_require__(186)(ARRAY_BUFFER); /***/ }, /* 232 */ /***/ function(module, exports, __webpack_require__) { var global = __webpack_require__(2) , hide = __webpack_require__(8) , uid = __webpack_require__(17) , TYPED = uid('typed_array') , VIEW = uid('view') , ABV = !!(global.ArrayBuffer && global.DataView) , CONSTR = ABV , i = 0, l = 9, Typed; var TypedArrayConstructors = ( 'Int8Array,Uint8Array,Uint8ClampedArray,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array' ).split(','); while(i < l){ if(Typed = global[TypedArrayConstructors[i++]]){ hide(Typed.prototype, TYPED, true); hide(Typed.prototype, VIEW, true); } else CONSTR = false; } module.exports = { ABV: ABV, CONSTR: CONSTR, TYPED: TYPED, VIEW: VIEW }; /***/ }, /* 233 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; var global = __webpack_require__(2) , DESCRIPTORS = __webpack_require__(4) , LIBRARY = __webpack_require__(26) , $typed = __webpack_require__(232) , hide = __webpack_require__(8) , redefineAll = __webpack_require__(202) , fails = __webpack_require__(5) , anInstance = __webpack_require__(197) , toInteger = __webpack_require__(36) , toLength = __webpack_require__(35) , gOPN = __webpack_require__(48).f , dP = __webpack_require__(9).f , arrayFill = __webpack_require__(180) , setToStringTag = __webpack_require__(22) , ARRAY_BUFFER = 'ArrayBuffer' , DATA_VIEW = 'DataView' , PROTOTYPE = 'prototype' , WRONG_LENGTH = 'Wrong length!' , WRONG_INDEX = 'Wrong index!' , $ArrayBuffer = global[ARRAY_BUFFER] , $DataView = global[DATA_VIEW] , Math = global.Math , RangeError = global.RangeError , Infinity = global.Infinity , BaseBuffer = $ArrayBuffer , abs = Math.abs , pow = Math.pow , floor = Math.floor , log = Math.log , LN2 = Math.LN2 , BUFFER = 'buffer' , BYTE_LENGTH = 'byteLength' , BYTE_OFFSET = 'byteOffset' , $BUFFER = DESCRIPTORS ? '_b' : BUFFER , $LENGTH = DESCRIPTORS ? '_l' : BYTE_LENGTH , $OFFSET = DESCRIPTORS ? '_o' : BYTE_OFFSET; // IEEE754 conversions based on https://github.com/feross/ieee754 var packIEEE754 = function(value, mLen, nBytes){ var buffer = Array(nBytes) , eLen = nBytes * 8 - mLen - 1 , eMax = (1 << eLen) - 1 , eBias = eMax >> 1 , rt = mLen === 23 ? pow(2, -24) - pow(2, -77) : 0 , i = 0 , s = value < 0 || value === 0 && 1 / value < 0 ? 1 : 0 , e, m, c; value = abs(value) if(value != value || value === Infinity){ m = value != value ? 1 : 0; e = eMax; } else { e = floor(log(value) / LN2); if(value * (c = pow(2, -e)) < 1){ e--; c *= 2; } if(e + eBias >= 1){ value += rt / c; } else { value += rt * pow(2, 1 - eBias); } if(value * c >= 2){ e++; c /= 2; } if(e + eBias >= eMax){ m = 0; e = eMax; } else if(e + eBias >= 1){ m = (value * c - 1) * pow(2, mLen); e = e + eBias; } else { m = value * pow(2, eBias - 1) * pow(2, mLen); e = 0; } } for(; mLen >= 8; buffer[i++] = m & 255, m /= 256, mLen -= 8); e = e << mLen | m; eLen += mLen; for(; eLen > 0; buffer[i++] = e & 255, e /= 256, eLen -= 8); buffer[--i] |= s * 128; return buffer; }; var unpackIEEE754 = function(buffer, mLen, nBytes){ var eLen = nBytes * 8 - mLen - 1 , eMax = (1 << eLen) - 1 , eBias = eMax >> 1 , nBits = eLen - 7 , i = nBytes - 1 , s = buffer[i--] , e = s & 127 , m; s >>= 7; for(; nBits > 0; e = e * 256 + buffer[i], i--, nBits -= 8); m = e & (1 << -nBits) - 1; e >>= -nBits; nBits += mLen; for(; nBits > 0; m = m * 256 + buffer[i], i--, nBits -= 8); if(e === 0){ e = 1 - eBias; } else if(e === eMax){ return m ? NaN : s ? -Infinity : Infinity; } else { m = m + pow(2, mLen); e = e - eBias; } return (s ? -1 : 1) * m * pow(2, e - mLen); }; var unpackI32 = function(bytes){ return bytes[3] << 24 | bytes[2] << 16 | bytes[1] << 8 | bytes[0]; }; var packI8 = function(it){ return [it & 0xff]; }; var packI16 = function(it){ return [it & 0xff, it >> 8 & 0xff]; }; var packI32 = function(it){ return [it & 0xff, it >> 8 & 0xff, it >> 16 & 0xff, it >> 24 & 0xff]; }; var packF64 = function(it){ return packIEEE754(it, 52, 8); }; var packF32 = function(it){ return packIEEE754(it, 23, 4); }; var addGetter = function(C, key, internal){ dP(C[PROTOTYPE], key, {get: function(){ return this[internal]; }}); }; var get = function(view, bytes, index, isLittleEndian){ var numIndex = +index , intIndex = toInteger(numIndex); if(numIndex != intIndex || intIndex < 0 || intIndex + bytes > view[$LENGTH])throw RangeError(WRONG_INDEX); var store = view[$BUFFER]._b , start = intIndex + view[$OFFSET] , pack = store.slice(start, start + bytes); return isLittleEndian ? pack : pack.reverse(); }; var set = function(view, bytes, index, conversion, value, isLittleEndian){ var numIndex = +index , intIndex = toInteger(numIndex); if(numIndex != intIndex || intIndex < 0 || intIndex + bytes > view[$LENGTH])throw RangeError(WRONG_INDEX); var store = view[$BUFFER]._b , start = intIndex + view[$OFFSET] , pack = conversion(+value); for(var i = 0; i < bytes; i++)store[start + i] = pack[isLittleEndian ? i : bytes - i - 1]; }; var validateArrayBufferArguments = function(that, length){ anInstance(that, $ArrayBuffer, ARRAY_BUFFER); var numberLength = +length , byteLength = toLength(numberLength); if(numberLength != byteLength)throw RangeError(WRONG_LENGTH); return byteLength; }; if(!$typed.ABV){ $ArrayBuffer = function ArrayBuffer(length){ var byteLength = validateArrayBufferArguments(this, length); this._b = arrayFill.call(Array(byteLength), 0); this[$LENGTH] = byteLength; }; $DataView = function DataView(buffer, byteOffset, byteLength){ anInstance(this, $DataView, DATA_VIEW); anInstance(buffer, $ArrayBuffer, DATA_VIEW); var bufferLength = buffer[$LENGTH] , offset = toInteger(byteOffset); if(offset < 0 || offset > bufferLength)throw RangeError('Wrong offset!'); byteLength = byteLength === undefined ? bufferLength - offset : toLength(byteLength); if(offset + byteLength > bufferLength)throw RangeError(WRONG_LENGTH); this[$BUFFER] = buffer; this[$OFFSET] = offset; this[$LENGTH] = byteLength; }; if(DESCRIPTORS){ addGetter($ArrayBuffer, BYTE_LENGTH, '_l'); addGetter($DataView, BUFFER, '_b'); addGetter($DataView, BYTE_LENGTH, '_l'); addGetter($DataView, BYTE_OFFSET, '_o'); } redefineAll($DataView[PROTOTYPE], { getInt8: function getInt8(byteOffset){ return get(this, 1, byteOffset)[0] << 24 >> 24; }, getUint8: function getUint8(byteOffset){ return get(this, 1, byteOffset)[0]; }, getInt16: function getInt16(byteOffset /*, littleEndian */){ var bytes = get(this, 2, byteOffset, arguments[1]); return (bytes[1] << 8 | bytes[0]) << 16 >> 16; }, getUint16: function getUint16(byteOffset /*, littleEndian */){ var bytes = get(this, 2, byteOffset, arguments[1]); return bytes[1] << 8 | bytes[0]; }, getInt32: function getInt32(byteOffset /*, littleEndian */){ return unpackI32(get(this, 4, byteOffset, arguments[1])); }, getUint32: function getUint32(byteOffset /*, littleEndian */){ return unpackI32(get(this, 4, byteOffset, arguments[1])) >>> 0; }, getFloat32: function getFloat32(byteOffset /*, littleEndian */){ return unpackIEEE754(get(this, 4, byteOffset, arguments[1]), 23, 4); }, getFloat64: function getFloat64(byteOffset /*, littleEndian */){ return unpackIEEE754(get(this, 8, byteOffset, arguments[1]), 52, 8); }, setInt8: function setInt8(byteOffset, value){ set(this, 1, byteOffset, packI8, value); }, setUint8: function setUint8(byteOffset, value){ set(this, 1, byteOffset, packI8, value); }, setInt16: function setInt16(byteOffset, value /*, littleEndian */){ set(this, 2, byteOffset, packI16, value, arguments[2]); }, setUint16: function setUint16(byteOffset, value /*, littleEndian */){ set(this, 2, byteOffset, packI16, value, arguments[2]); }, setInt32: function setInt32(byteOffset, value /*, littleEndian */){ set(this, 4, byteOffset, packI32, value, arguments[2]); }, setUint32: function setUint32(byteOffset, value /*, littleEndian */){ set(this, 4, byteOffset, packI32, value, arguments[2]); }, setFloat32: function setFloat32(byteOffset, value /*, littleEndian */){ set(this, 4, byteOffset, packF32, value, arguments[2]); }, setFloat64: function setFloat64(byteOffset, value /*, littleEndian */){ set(this, 8, byteOffset, packF64, value, arguments[2]); } }); } else { if(!fails(function(){ new $ArrayBuffer; // eslint-disable-line no-new }) || !fails(function(){ new $ArrayBuffer(.5); // eslint-disable-line no-new })){ $ArrayBuffer = function ArrayBuffer(length){ return new BaseBuffer(validateArrayBufferArguments(this, length)); }; var ArrayBufferProto = $ArrayBuffer[PROTOTYPE] = BaseBuffer[PROTOTYPE]; for(var keys = gOPN(BaseBuffer), j = 0, key; keys.length > j; ){ if(!((key = keys[j++]) in $ArrayBuffer))hide($ArrayBuffer, key, BaseBuffer[key]); }; if(!LIBRARY)ArrayBufferProto.constructor = $ArrayBuffer; } // iOS Safari 7.x bug var view = new $DataView(new $ArrayBuffer(2)) , $setInt8 = $DataView[PROTOTYPE].setInt8; view.setInt8(0, 2147483648); view.setInt8(1, 2147483649); if(view.getInt8(0) || !view.getInt8(1))redefineAll($DataView[PROTOTYPE], { setInt8: function setInt8(byteOffset, value){ $setInt8.call(this, byteOffset, value << 24 >> 24); }, setUint8: function setUint8(byteOffset, value){ $setInt8.call(this, byteOffset, value << 24 >> 24); } }, true); } setToStringTag($ArrayBuffer, ARRAY_BUFFER); setToStringTag($DataView, DATA_VIEW); hide($DataView[PROTOTYPE], $typed.VIEW, true); exports[ARRAY_BUFFER] = $ArrayBuffer; exports[DATA_VIEW] = $DataView; /***/ }, /* 234 */ /***/ function(module, exports, __webpack_require__) { var $export = __webpack_require__(6); $export($export.G + $export.W + $export.F * !__webpack_require__(232).ABV, { DataView: __webpack_require__(233).DataView }); /***/ }, /* 235 */ /***/ function(module, exports, __webpack_require__) { __webpack_require__(236)('Int8', 1, function(init){ return function Int8Array(data, byteOffset, length){ return init(this, data, byteOffset, length); }; }); /***/ }, /* 236 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; if(__webpack_require__(4)){ var LIBRARY = __webpack_require__(26) , global = __webpack_require__(2) , fails = __webpack_require__(5) , $export = __webpack_require__(6) , $typed = __webpack_require__(232) , $buffer = __webpack_require__(233) , ctx = __webpack_require__(18) , anInstance = __webpack_require__(197) , propertyDesc = __webpack_require__(15) , hide = __webpack_require__(8) , redefineAll = __webpack_require__(202) , toInteger = __webpack_require__(36) , toLength = __webpack_require__(35) , toIndex = __webpack_require__(37) , toPrimitive = __webpack_require__(14) , has = __webpack_require__(3) , same = __webpack_require__(69) , classof = __webpack_require__(73) , isObject = __webpack_require__(11) , toObject = __webpack_require__(56) , isArrayIter = __webpack_require__(154) , create = __webpack_require__(44) , getPrototypeOf = __webpack_require__(57) , gOPN = __webpack_require__(48).f , getIterFn = __webpack_require__(156) , uid = __webpack_require__(17) , wks = __webpack_require__(23) , createArrayMethod = __webpack_require__(164) , createArrayIncludes = __webpack_require__(34) , speciesConstructor = __webpack_require__(199) , ArrayIterators = __webpack_require__(183) , Iterators = __webpack_require__(135) , $iterDetect = __webpack_require__(157) , setSpecies = __webpack_require__(186) , arrayFill = __webpack_require__(180) , arrayCopyWithin = __webpack_require__(177) , $DP = __webpack_require__(9) , $GOPD = __webpack_require__(49) , dP = $DP.f , gOPD = $GOPD.f , RangeError = global.RangeError , TypeError = global.TypeError , Uint8Array = global.Uint8Array , ARRAY_BUFFER = 'ArrayBuffer' , SHARED_BUFFER = 'Shared' + ARRAY_BUFFER , BYTES_PER_ELEMENT = 'BYTES_PER_ELEMENT' , PROTOTYPE = 'prototype' , ArrayProto = Array[PROTOTYPE] , $ArrayBuffer = $buffer.ArrayBuffer , $DataView = $buffer.DataView , arrayForEach = createArrayMethod(0) , arrayFilter = createArrayMethod(2) , arraySome = createArrayMethod(3) , arrayEvery = createArrayMethod(4) , arrayFind = createArrayMethod(5) , arrayFindIndex = createArrayMethod(6) , arrayIncludes = createArrayIncludes(true) , arrayIndexOf = createArrayIncludes(false) , arrayValues = ArrayIterators.values , arrayKeys = ArrayIterators.keys , arrayEntries = ArrayIterators.entries , arrayLastIndexOf = ArrayProto.lastIndexOf , arrayReduce = ArrayProto.reduce , arrayReduceRight = ArrayProto.reduceRight , arrayJoin = ArrayProto.join , arraySort = ArrayProto.sort , arraySlice = ArrayProto.slice , arrayToString = ArrayProto.toString , arrayToLocaleString = ArrayProto.toLocaleString , ITERATOR = wks('iterator') , TAG = wks('toStringTag') , TYPED_CONSTRUCTOR = uid('typed_constructor') , DEF_CONSTRUCTOR = uid('def_constructor') , ALL_CONSTRUCTORS = $typed.CONSTR , TYPED_ARRAY = $typed.TYPED , VIEW = $typed.VIEW , WRONG_LENGTH = 'Wrong length!'; var $map = createArrayMethod(1, function(O, length){ return allocate(speciesConstructor(O, O[DEF_CONSTRUCTOR]), length); }); var LITTLE_ENDIAN = fails(function(){ return new Uint8Array(new Uint16Array([1]).buffer)[0] === 1; }); var FORCED_SET = !!Uint8Array && !!Uint8Array[PROTOTYPE].set && fails(function(){ new Uint8Array(1).set({}); }); var strictToLength = function(it, SAME){ if(it === undefined)throw TypeError(WRONG_LENGTH); var number = +it , length = toLength(it); if(SAME && !same(number, length))throw RangeError(WRONG_LENGTH); return length; }; var toOffset = function(it, BYTES){ var offset = toInteger(it); if(offset < 0 || offset % BYTES)throw RangeError('Wrong offset!'); return offset; }; var validate = function(it){ if(isObject(it) && TYPED_ARRAY in it)return it; throw TypeError(it + ' is not a typed array!'); }; var allocate = function(C, length){ if(!(isObject(C) && TYPED_CONSTRUCTOR in C)){ throw TypeError('It is not a typed array constructor!'); } return new C(length); }; var speciesFromList = function(O, list){ return fromList(speciesConstructor(O, O[DEF_CONSTRUCTOR]), list); }; var fromList = function(C, list){ var index = 0 , length = list.length , result = allocate(C, length); while(length > index)result[index] = list[index++]; return result; }; var addGetter = function(it, key, internal){ dP(it, key, {get: function(){ return this._d[internal]; }}); }; var $from = function from(source /*, mapfn, thisArg */){ var O = toObject(source) , aLen = arguments.length , mapfn = aLen > 1 ? arguments[1] : undefined , mapping = mapfn !== undefined , iterFn = getIterFn(O) , i, length, values, result, step, iterator; if(iterFn != undefined && !isArrayIter(iterFn)){ for(iterator = iterFn.call(O), values = [], i = 0; !(step = iterator.next()).done; i++){ values.push(step.value); } O = values; } if(mapping && aLen > 2)mapfn = ctx(mapfn, arguments[2], 2); for(i = 0, length = toLength(O.length), result = allocate(this, length); length > i; i++){ result[i] = mapping ? mapfn(O[i], i) : O[i]; } return result; }; var $of = function of(/*...items*/){ var index = 0 , length = arguments.length , result = allocate(this, length); while(length > index)result[index] = arguments[index++]; return result; }; // iOS Safari 6.x fails here var TO_LOCALE_BUG = !!Uint8Array && fails(function(){ arrayToLocaleString.call(new Uint8Array(1)); }); var $toLocaleString = function toLocaleString(){ return arrayToLocaleString.apply(TO_LOCALE_BUG ? arraySlice.call(validate(this)) : validate(this), arguments); }; var proto = { copyWithin: function copyWithin(target, start /*, end */){ return arrayCopyWithin.call(validate(this), target, start, arguments.length > 2 ? arguments[2] : undefined); }, every: function every(callbackfn /*, thisArg */){ return arrayEvery(validate(this), callbackfn, arguments.length > 1 ? arguments[1] : undefined); }, fill: function fill(value /*, start, end */){ // eslint-disable-line no-unused-vars return arrayFill.apply(validate(this), arguments); }, filter: function filter(callbackfn /*, thisArg */){ return speciesFromList(this, arrayFilter(validate(this), callbackfn, arguments.length > 1 ? arguments[1] : undefined)); }, find: function find(predicate /*, thisArg */){ return arrayFind(validate(this), predicate, arguments.length > 1 ? arguments[1] : undefined); }, findIndex: function findIndex(predicate /*, thisArg */){ return arrayFindIndex(validate(this), predicate, arguments.length > 1 ? arguments[1] : undefined); }, forEach: function forEach(callbackfn /*, thisArg */){ arrayForEach(validate(this), callbackfn, arguments.length > 1 ? arguments[1] : undefined); }, indexOf: function indexOf(searchElement /*, fromIndex */){ return arrayIndexOf(validate(this), searchElement, arguments.length > 1 ? arguments[1] : undefined); }, includes: function includes(searchElement /*, fromIndex */){ return arrayIncludes(validate(this), searchElement, arguments.length > 1 ? arguments[1] : undefined); }, join: function join(separator){ // eslint-disable-line no-unused-vars return arrayJoin.apply(validate(this), arguments); }, lastIndexOf: function lastIndexOf(searchElement /*, fromIndex */){ // eslint-disable-line no-unused-vars return arrayLastIndexOf.apply(validate(this), arguments); }, map: function map(mapfn /*, thisArg */){ return $map(validate(this), mapfn, arguments.length > 1 ? arguments[1] : undefined); }, reduce: function reduce(callbackfn /*, initialValue */){ // eslint-disable-line no-unused-vars return arrayReduce.apply(validate(this), arguments); }, reduceRight: function reduceRight(callbackfn /*, initialValue */){ // eslint-disable-line no-unused-vars return arrayReduceRight.apply(validate(this), arguments); }, reverse: function reverse(){ var that = this , length = validate(that).length , middle = Math.floor(length / 2) , index = 0 , value; while(index < middle){ value = that[index]; that[index++] = that[--length]; that[length] = value; } return that; }, some: function some(callbackfn /*, thisArg */){ return arraySome(validate(this), callbackfn, arguments.length > 1 ? arguments[1] : undefined); }, sort: function sort(comparefn){ return arraySort.call(validate(this), comparefn); }, subarray: function subarray(begin, end){ var O = validate(this) , length = O.length , $begin = toIndex(begin, length); return new (speciesConstructor(O, O[DEF_CONSTRUCTOR]))( O.buffer, O.byteOffset + $begin * O.BYTES_PER_ELEMENT, toLength((end === undefined ? length : toIndex(end, length)) - $begin) ); } }; var $slice = function slice(start, end){ return speciesFromList(this, arraySlice.call(validate(this), start, end)); }; var $set = function set(arrayLike /*, offset */){ validate(this); var offset = toOffset(arguments[1], 1) , length = this.length , src = toObject(arrayLike) , len = toLength(src.length) , index = 0; if(len + offset > length)throw RangeError(WRONG_LENGTH); while(index < len)this[offset + index] = src[index++]; }; var $iterators = { entries: function entries(){ return arrayEntries.call(validate(this)); }, keys: function keys(){ return arrayKeys.call(validate(this)); }, values: function values(){ return arrayValues.call(validate(this)); } }; var isTAIndex = function(target, key){ return isObject(target) && target[TYPED_ARRAY] && typeof key != 'symbol' && key in target && String(+key) == String(key); }; var $getDesc = function getOwnPropertyDescriptor(target, key){ return isTAIndex(target, key = toPrimitive(key, true)) ? propertyDesc(2, target[key]) : gOPD(target, key); }; var $setDesc = function defineProperty(target, key, desc){ if(isTAIndex(target, key = toPrimitive(key, true)) && isObject(desc) && has(desc, 'value') && !has(desc, 'get') && !has(desc, 'set') // TODO: add validation descriptor w/o calling accessors && !desc.configurable && (!has(desc, 'writable') || desc.writable) && (!has(desc, 'enumerable') || desc.enumerable) ){ target[key] = desc.value; return target; } else return dP(target, key, desc); }; if(!ALL_CONSTRUCTORS){ $GOPD.f = $getDesc; $DP.f = $setDesc; } $export($export.S + $export.F * !ALL_CONSTRUCTORS, 'Object', { getOwnPropertyDescriptor: $getDesc, defineProperty: $setDesc }); if(fails(function(){ arrayToString.call({}); })){ arrayToString = arrayToLocaleString = function toString(){ return arrayJoin.call(this); } } var $TypedArrayPrototype$ = redefineAll({}, proto); redefineAll($TypedArrayPrototype$, $iterators); hide($TypedArrayPrototype$, ITERATOR, $iterators.values); redefineAll($TypedArrayPrototype$, { slice: $slice, set: $set, constructor: function(){ /* noop */ }, toString: arrayToString, toLocaleString: $toLocaleString }); addGetter($TypedArrayPrototype$, 'buffer', 'b'); addGetter($TypedArrayPrototype$, 'byteOffset', 'o'); addGetter($TypedArrayPrototype$, 'byteLength', 'l'); addGetter($TypedArrayPrototype$, 'length', 'e'); dP($TypedArrayPrototype$, TAG, { get: function(){ return this[TYPED_ARRAY]; } }); module.exports = function(KEY, BYTES, wrapper, CLAMPED){ CLAMPED = !!CLAMPED; var NAME = KEY + (CLAMPED ? 'Clamped' : '') + 'Array' , ISNT_UINT8 = NAME != 'Uint8Array' , GETTER = 'get' + KEY , SETTER = 'set' + KEY , TypedArray = global[NAME] , Base = TypedArray || {} , TAC = TypedArray && getPrototypeOf(TypedArray) , FORCED = !TypedArray || !$typed.ABV , O = {} , TypedArrayPrototype = TypedArray && TypedArray[PROTOTYPE]; var getter = function(that, index){ var data = that._d; return data.v[GETTER](index * BYTES + data.o, LITTLE_ENDIAN); }; var setter = function(that, index, value){ var data = that._d; if(CLAMPED)value = (value = Math.round(value)) < 0 ? 0 : value > 0xff ? 0xff : value & 0xff; data.v[SETTER](index * BYTES + data.o, value, LITTLE_ENDIAN); }; var addElement = function(that, index){ dP(that, index, { get: function(){ return getter(this, index); }, set: function(value){ return setter(this, index, value); }, enumerable: true }); }; if(FORCED){ TypedArray = wrapper(function(that, data, $offset, $length){ anInstance(that, TypedArray, NAME, '_d'); var index = 0 , offset = 0 , buffer, byteLength, length, klass; if(!isObject(data)){ length = strictToLength(data, true) byteLength = length * BYTES; buffer = new $ArrayBuffer(byteLength); } else if(data instanceof $ArrayBuffer || (klass = classof(data)) == ARRAY_BUFFER || klass == SHARED_BUFFER){ buffer = data; offset = toOffset($offset, BYTES); var $len = data.byteLength; if($length === undefined){ if($len % BYTES)throw RangeError(WRONG_LENGTH); byteLength = $len - offset; if(byteLength < 0)throw RangeError(WRONG_LENGTH); } else { byteLength = toLength($length) * BYTES; if(byteLength + offset > $len)throw RangeError(WRONG_LENGTH); } length = byteLength / BYTES; } else if(TYPED_ARRAY in data){ return fromList(TypedArray, data); } else { return $from.call(TypedArray, data); } hide(that, '_d', { b: buffer, o: offset, l: byteLength, e: length, v: new $DataView(buffer) }); while(index < length)addElement(that, index++); }); TypedArrayPrototype = TypedArray[PROTOTYPE] = create($TypedArrayPrototype$); hide(TypedArrayPrototype, 'constructor', TypedArray); } else if(!$iterDetect(function(iter){ // V8 works with iterators, but fails in many other cases // https://code.google.com/p/v8/issues/detail?id=4552 new TypedArray(null); // eslint-disable-line no-new new TypedArray(iter); // eslint-disable-line no-new }, true)){ TypedArray = wrapper(function(that, data, $offset, $length){ anInstance(that, TypedArray, NAME); var klass; // `ws` module bug, temporarily remove validation length for Uint8Array // https://github.com/websockets/ws/pull/645 if(!isObject(data))return new Base(strictToLength(data, ISNT_UINT8)); if(data instanceof $ArrayBuffer || (klass = classof(data)) == ARRAY_BUFFER || klass == SHARED_BUFFER){ return $length !== undefined ? new Base(data, toOffset($offset, BYTES), $length) : $offset !== undefined ? new Base(data, toOffset($offset, BYTES)) : new Base(data); } if(TYPED_ARRAY in data)return fromList(TypedArray, data); return $from.call(TypedArray, data); }); arrayForEach(TAC !== Function.prototype ? gOPN(Base).concat(gOPN(TAC)) : gOPN(Base), function(key){ if(!(key in TypedArray))hide(TypedArray, key, Base[key]); }); TypedArray[PROTOTYPE] = TypedArrayPrototype; if(!LIBRARY)TypedArrayPrototype.constructor = TypedArray; } var $nativeIterator = TypedArrayPrototype[ITERATOR] , CORRECT_ITER_NAME = !!$nativeIterator && ($nativeIterator.name == 'values' || $nativeIterator.name == undefined) , $iterator = $iterators.values; hide(TypedArray, TYPED_CONSTRUCTOR, true); hide(TypedArrayPrototype, TYPED_ARRAY, NAME); hide(TypedArrayPrototype, VIEW, true); hide(TypedArrayPrototype, DEF_CONSTRUCTOR, TypedArray); if(CLAMPED ? new TypedArray(1)[TAG] != NAME : !(TAG in TypedArrayPrototype)){ dP(TypedArrayPrototype, TAG, { get: function(){ return NAME; } }); } O[NAME] = TypedArray; $export($export.G + $export.W + $export.F * (TypedArray != Base), O); $export($export.S, NAME, { BYTES_PER_ELEMENT: BYTES, from: $from, of: $of }); if(!(BYTES_PER_ELEMENT in TypedArrayPrototype))hide(TypedArrayPrototype, BYTES_PER_ELEMENT, BYTES); $export($export.P, NAME, proto); setSpecies(NAME); $export($export.P + $export.F * FORCED_SET, NAME, {set: $set}); $export($export.P + $export.F * !CORRECT_ITER_NAME, NAME, $iterators); $export($export.P + $export.F * (TypedArrayPrototype.toString != arrayToString), NAME, {toString: arrayToString}); $export($export.P + $export.F * fails(function(){ new TypedArray(1).slice(); }), NAME, {slice: $slice}); $export($export.P + $export.F * (fails(function(){ return [1, 2].toLocaleString() != new TypedArray([1, 2]).toLocaleString() }) || !fails(function(){ TypedArrayPrototype.toLocaleString.call([1, 2]); })), NAME, {toLocaleString: $toLocaleString}); Iterators[NAME] = CORRECT_ITER_NAME ? $nativeIterator : $iterator; if(!LIBRARY && !CORRECT_ITER_NAME)hide(TypedArrayPrototype, ITERATOR, $iterator); }; } else module.exports = function(){ /* empty */ }; /***/ }, /* 237 */ /***/ function(module, exports, __webpack_require__) { __webpack_require__(236)('Uint8', 1, function(init){ return function Uint8Array(data, byteOffset, length){ return init(this, data, byteOffset, length); }; }); /***/ }, /* 238 */ /***/ function(module, exports, __webpack_require__) { __webpack_require__(236)('Uint8', 1, function(init){ return function Uint8ClampedArray(data, byteOffset, length){ return init(this, data, byteOffset, length); }; }, true); /***/ }, /* 239 */ /***/ function(module, exports, __webpack_require__) { __webpack_require__(236)('Int16', 2, function(init){ return function Int16Array(data, byteOffset, length){ return init(this, data, byteOffset, length); }; }); /***/ }, /* 240 */ /***/ function(module, exports, __webpack_require__) { __webpack_require__(236)('Uint16', 2, function(init){ return function Uint16Array(data, byteOffset, length){ return init(this, data, byteOffset, length); }; }); /***/ }, /* 241 */ /***/ function(module, exports, __webpack_require__) { __webpack_require__(236)('Int32', 4, function(init){ return function Int32Array(data, byteOffset, length){ return init(this, data, byteOffset, length); }; }); /***/ }, /* 242 */ /***/ function(module, exports, __webpack_require__) { __webpack_require__(236)('Uint32', 4, function(init){ return function Uint32Array(data, byteOffset, length){ return init(this, data, byteOffset, length); }; }); /***/ }, /* 243 */ /***/ function(module, exports, __webpack_require__) { __webpack_require__(236)('Float32', 4, function(init){ return function Float32Array(data, byteOffset, length){ return init(this, data, byteOffset, length); }; }); /***/ }, /* 244 */ /***/ function(module, exports, __webpack_require__) { __webpack_require__(236)('Float64', 8, function(init){ return function Float64Array(data, byteOffset, length){ return init(this, data, byteOffset, length); }; }); /***/ }, /* 245 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; // https://github.com/tc39/Array.prototype.includes var $export = __webpack_require__(6) , $includes = __webpack_require__(34)(true); $export($export.P, 'Array', { includes: function includes(el /*, fromIndex = 0 */){ return $includes(this, el, arguments.length > 1 ? arguments[1] : undefined); } }); __webpack_require__(178)('includes'); /***/ }, /* 246 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; // https://github.com/mathiasbynens/String.prototype.at var $export = __webpack_require__(6) , $at = __webpack_require__(125)(true); $export($export.P, 'String', { at: function at(pos){ return $at(this, pos); } }); /***/ }, /* 247 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; // https://github.com/tc39/proposal-string-pad-start-end var $export = __webpack_require__(6) , $pad = __webpack_require__(248); $export($export.P, 'String', { padStart: function padStart(maxLength /*, fillString = ' ' */){ return $pad(this, maxLength, arguments.length > 1 ? arguments[1] : undefined, true); } }); /***/ }, /* 248 */ /***/ function(module, exports, __webpack_require__) { // https://github.com/tc39/proposal-string-pad-start-end var toLength = __webpack_require__(35) , repeat = __webpack_require__(85) , defined = __webpack_require__(33); module.exports = function(that, maxLength, fillString, left){ var S = String(defined(that)) , stringLength = S.length , fillStr = fillString === undefined ? ' ' : String(fillString) , intMaxLength = toLength(maxLength); if(intMaxLength <= stringLength || fillStr == '')return S; var fillLen = intMaxLength - stringLength , stringFiller = repeat.call(fillStr, Math.ceil(fillLen / fillStr.length)); if(stringFiller.length > fillLen)stringFiller = stringFiller.slice(0, fillLen); return left ? stringFiller + S : S + stringFiller; }; /***/ }, /* 249 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; // https://github.com/tc39/proposal-string-pad-start-end var $export = __webpack_require__(6) , $pad = __webpack_require__(248); $export($export.P, 'String', { padEnd: function padEnd(maxLength /*, fillString = ' ' */){ return $pad(this, maxLength, arguments.length > 1 ? arguments[1] : undefined, false); } }); /***/ }, /* 250 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; // https://github.com/sebmarkbage/ecmascript-string-left-right-trim __webpack_require__(81)('trimLeft', function($trim){ return function trimLeft(){ return $trim(this, 1); }; }, 'trimStart'); /***/ }, /* 251 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; // https://github.com/sebmarkbage/ecmascript-string-left-right-trim __webpack_require__(81)('trimRight', function($trim){ return function trimRight(){ return $trim(this, 2); }; }, 'trimEnd'); /***/ }, /* 252 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; // https://tc39.github.io/String.prototype.matchAll/ var $export = __webpack_require__(6) , defined = __webpack_require__(33) , toLength = __webpack_require__(35) , isRegExp = __webpack_require__(128) , getFlags = __webpack_require__(188) , RegExpProto = RegExp.prototype; var $RegExpStringIterator = function(regexp, string){ this._r = regexp; this._s = string; }; __webpack_require__(136)($RegExpStringIterator, 'RegExp String', function next(){ var match = this._r.exec(this._s); return {value: match, done: match === null}; }); $export($export.P, 'String', { matchAll: function matchAll(regexp){ defined(this); if(!isRegExp(regexp))throw TypeError(regexp + ' is not a regexp!'); var S = String(this) , flags = 'flags' in RegExpProto ? String(regexp.flags) : getFlags.call(regexp) , rx = new RegExp(regexp.source, ~flags.indexOf('g') ? flags : 'g' + flags); rx.lastIndex = toLength(regexp.lastIndex); return new $RegExpStringIterator(rx, S); } }); /***/ }, /* 253 */ /***/ function(module, exports, __webpack_require__) { __webpack_require__(25)('asyncIterator'); /***/ }, /* 254 */ /***/ function(module, exports, __webpack_require__) { __webpack_require__(25)('observable'); /***/ }, /* 255 */ /***/ function(module, exports, __webpack_require__) { // https://github.com/tc39/proposal-object-getownpropertydescriptors var $export = __webpack_require__(6) , ownKeys = __webpack_require__(221) , toIObject = __webpack_require__(30) , gOPD = __webpack_require__(49) , createProperty = __webpack_require__(155); $export($export.S, 'Object', { getOwnPropertyDescriptors: function getOwnPropertyDescriptors(object){ var O = toIObject(object) , getDesc = gOPD.f , keys = ownKeys(O) , result = {} , i = 0 , key; while(keys.length > i)createProperty(result, key = keys[i++], getDesc(O, key)); return result; } }); /***/ }, /* 256 */ /***/ function(module, exports, __webpack_require__) { // https://github.com/tc39/proposal-object-values-entries var $export = __webpack_require__(6) , $values = __webpack_require__(257)(false); $export($export.S, 'Object', { values: function values(it){ return $values(it); } }); /***/ }, /* 257 */ /***/ function(module, exports, __webpack_require__) { var getKeys = __webpack_require__(28) , toIObject = __webpack_require__(30) , isEnum = __webpack_require__(42).f; module.exports = function(isEntries){ return function(it){ var O = toIObject(it) , keys = getKeys(O) , length = keys.length , i = 0 , result = [] , key; while(length > i)if(isEnum.call(O, key = keys[i++])){ result.push(isEntries ? [key, O[key]] : O[key]); } return result; }; }; /***/ }, /* 258 */ /***/ function(module, exports, __webpack_require__) { // https://github.com/tc39/proposal-object-values-entries var $export = __webpack_require__(6) , $entries = __webpack_require__(257)(true); $export($export.S, 'Object', { entries: function entries(it){ return $entries(it); } }); /***/ }, /* 259 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; var $export = __webpack_require__(6) , toObject = __webpack_require__(56) , aFunction = __webpack_require__(19) , $defineProperty = __webpack_require__(9); // B.2.2.2 Object.prototype.__defineGetter__(P, getter) __webpack_require__(4) && $export($export.P + __webpack_require__(260), 'Object', { __defineGetter__: function __defineGetter__(P, getter){ $defineProperty.f(toObject(this), P, {get: aFunction(getter), enumerable: true, configurable: true}); } }); /***/ }, /* 260 */ /***/ function(module, exports, __webpack_require__) { // Forced replacement prototype accessors methods module.exports = __webpack_require__(26)|| !__webpack_require__(5)(function(){ var K = Math.random(); // In FF throws only define methods __defineSetter__.call(null, K, function(){ /* empty */}); delete __webpack_require__(2)[K]; }); /***/ }, /* 261 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; var $export = __webpack_require__(6) , toObject = __webpack_require__(56) , aFunction = __webpack_require__(19) , $defineProperty = __webpack_require__(9); // B.2.2.3 Object.prototype.__defineSetter__(P, setter) __webpack_require__(4) && $export($export.P + __webpack_require__(260), 'Object', { __defineSetter__: function __defineSetter__(P, setter){ $defineProperty.f(toObject(this), P, {set: aFunction(setter), enumerable: true, configurable: true}); } }); /***/ }, /* 262 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; var $export = __webpack_require__(6) , toObject = __webpack_require__(56) , toPrimitive = __webpack_require__(14) , getPrototypeOf = __webpack_require__(57) , getOwnPropertyDescriptor = __webpack_require__(49).f; // B.2.2.4 Object.prototype.__lookupGetter__(P) __webpack_require__(4) && $export($export.P + __webpack_require__(260), 'Object', { __lookupGetter__: function __lookupGetter__(P){ var O = toObject(this) , K = toPrimitive(P, true) , D; do { if(D = getOwnPropertyDescriptor(O, K))return D.get; } while(O = getPrototypeOf(O)); } }); /***/ }, /* 263 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; var $export = __webpack_require__(6) , toObject = __webpack_require__(56) , toPrimitive = __webpack_require__(14) , getPrototypeOf = __webpack_require__(57) , getOwnPropertyDescriptor = __webpack_require__(49).f; // B.2.2.5 Object.prototype.__lookupSetter__(P) __webpack_require__(4) && $export($export.P + __webpack_require__(260), 'Object', { __lookupSetter__: function __lookupSetter__(P){ var O = toObject(this) , K = toPrimitive(P, true) , D; do { if(D = getOwnPropertyDescriptor(O, K))return D.set; } while(O = getPrototypeOf(O)); } }); /***/ }, /* 264 */ /***/ function(module, exports, __webpack_require__) { // https://github.com/DavidBruant/Map-Set.prototype.toJSON var $export = __webpack_require__(6); $export($export.P + $export.R, 'Map', {toJSON: __webpack_require__(265)('Map')}); /***/ }, /* 265 */ /***/ function(module, exports, __webpack_require__) { // https://github.com/DavidBruant/Map-Set.prototype.toJSON var classof = __webpack_require__(73) , from = __webpack_require__(266); module.exports = function(NAME){ return function toJSON(){ if(classof(this) != NAME)throw TypeError(NAME + "#toJSON isn't generic"); return from(this); }; }; /***/ }, /* 266 */ /***/ function(module, exports, __webpack_require__) { var forOf = __webpack_require__(198); module.exports = function(iter, ITERATOR){ var result = []; forOf(iter, false, result.push, result, ITERATOR); return result; }; /***/ }, /* 267 */ /***/ function(module, exports, __webpack_require__) { // https://github.com/DavidBruant/Map-Set.prototype.toJSON var $export = __webpack_require__(6); $export($export.P + $export.R, 'Set', {toJSON: __webpack_require__(265)('Set')}); /***/ }, /* 268 */ /***/ function(module, exports, __webpack_require__) { // https://github.com/ljharb/proposal-global var $export = __webpack_require__(6); $export($export.S, 'System', {global: __webpack_require__(2)}); /***/ }, /* 269 */ /***/ function(module, exports, __webpack_require__) { // https://github.com/ljharb/proposal-is-error var $export = __webpack_require__(6) , cof = __webpack_require__(32); $export($export.S, 'Error', { isError: function isError(it){ return cof(it) === 'Error'; } }); /***/ }, /* 270 */ /***/ function(module, exports, __webpack_require__) { // https://gist.github.com/BrendanEich/4294d5c212a6d2254703 var $export = __webpack_require__(6); $export($export.S, 'Math', { iaddh: function iaddh(x0, x1, y0, y1){ var $x0 = x0 >>> 0 , $x1 = x1 >>> 0 , $y0 = y0 >>> 0; return $x1 + (y1 >>> 0) + (($x0 & $y0 | ($x0 | $y0) & ~($x0 + $y0 >>> 0)) >>> 31) | 0; } }); /***/ }, /* 271 */ /***/ function(module, exports, __webpack_require__) { // https://gist.github.com/BrendanEich/4294d5c212a6d2254703 var $export = __webpack_require__(6); $export($export.S, 'Math', { isubh: function isubh(x0, x1, y0, y1){ var $x0 = x0 >>> 0 , $x1 = x1 >>> 0 , $y0 = y0 >>> 0; return $x1 - (y1 >>> 0) - ((~$x0 & $y0 | ~($x0 ^ $y0) & $x0 - $y0 >>> 0) >>> 31) | 0; } }); /***/ }, /* 272 */ /***/ function(module, exports, __webpack_require__) { // https://gist.github.com/BrendanEich/4294d5c212a6d2254703 var $export = __webpack_require__(6); $export($export.S, 'Math', { imulh: function imulh(u, v){ var UINT16 = 0xffff , $u = +u , $v = +v , u0 = $u & UINT16 , v0 = $v & UINT16 , u1 = $u >> 16 , v1 = $v >> 16 , t = (u1 * v0 >>> 0) + (u0 * v0 >>> 16); return u1 * v1 + (t >> 16) + ((u0 * v1 >>> 0) + (t & UINT16) >> 16); } }); /***/ }, /* 273 */ /***/ function(module, exports, __webpack_require__) { // https://gist.github.com/BrendanEich/4294d5c212a6d2254703 var $export = __webpack_require__(6); $export($export.S, 'Math', { umulh: function umulh(u, v){ var UINT16 = 0xffff , $u = +u , $v = +v , u0 = $u & UINT16 , v0 = $v & UINT16 , u1 = $u >>> 16 , v1 = $v >>> 16 , t = (u1 * v0 >>> 0) + (u0 * v0 >>> 16); return u1 * v1 + (t >>> 16) + ((u0 * v1 >>> 0) + (t & UINT16) >>> 16); } }); /***/ }, /* 274 */ /***/ function(module, exports, __webpack_require__) { var metadata = __webpack_require__(275) , anObject = __webpack_require__(10) , toMetaKey = metadata.key , ordinaryDefineOwnMetadata = metadata.set; metadata.exp({defineMetadata: function defineMetadata(metadataKey, metadataValue, target, targetKey){ ordinaryDefineOwnMetadata(metadataKey, metadataValue, anObject(target), toMetaKey(targetKey)); }}); /***/ }, /* 275 */ /***/ function(module, exports, __webpack_require__) { var Map = __webpack_require__(203) , $export = __webpack_require__(6) , shared = __webpack_require__(21)('metadata') , store = shared.store || (shared.store = new (__webpack_require__(207))); var getOrCreateMetadataMap = function(target, targetKey, create){ var targetMetadata = store.get(target); if(!targetMetadata){ if(!create)return undefined; store.set(target, targetMetadata = new Map); } var keyMetadata = targetMetadata.get(targetKey); if(!keyMetadata){ if(!create)return undefined; targetMetadata.set(targetKey, keyMetadata = new Map); } return keyMetadata; }; var ordinaryHasOwnMetadata = function(MetadataKey, O, P){ var metadataMap = getOrCreateMetadataMap(O, P, false); return metadataMap === undefined ? false : metadataMap.has(MetadataKey); }; var ordinaryGetOwnMetadata = function(MetadataKey, O, P){ var metadataMap = getOrCreateMetadataMap(O, P, false); return metadataMap === undefined ? undefined : metadataMap.get(MetadataKey); }; var ordinaryDefineOwnMetadata = function(MetadataKey, MetadataValue, O, P){ getOrCreateMetadataMap(O, P, true).set(MetadataKey, MetadataValue); }; var ordinaryOwnMetadataKeys = function(target, targetKey){ var metadataMap = getOrCreateMetadataMap(target, targetKey, false) , keys = []; if(metadataMap)metadataMap.forEach(function(_, key){ keys.push(key); }); return keys; }; var toMetaKey = function(it){ return it === undefined || typeof it == 'symbol' ? it : String(it); }; var exp = function(O){ $export($export.S, 'Reflect', O); }; module.exports = { store: store, map: getOrCreateMetadataMap, has: ordinaryHasOwnMetadata, get: ordinaryGetOwnMetadata, set: ordinaryDefineOwnMetadata, keys: ordinaryOwnMetadataKeys, key: toMetaKey, exp: exp }; /***/ }, /* 276 */ /***/ function(module, exports, __webpack_require__) { var metadata = __webpack_require__(275) , anObject = __webpack_require__(10) , toMetaKey = metadata.key , getOrCreateMetadataMap = metadata.map , store = metadata.store; metadata.exp({deleteMetadata: function deleteMetadata(metadataKey, target /*, targetKey */){ var targetKey = arguments.length < 3 ? undefined : toMetaKey(arguments[2]) , metadataMap = getOrCreateMetadataMap(anObject(target), targetKey, false); if(metadataMap === undefined || !metadataMap['delete'](metadataKey))return false; if(metadataMap.size)return true; var targetMetadata = store.get(target); targetMetadata['delete'](targetKey); return !!targetMetadata.size || store['delete'](target); }}); /***/ }, /* 277 */ /***/ function(module, exports, __webpack_require__) { var metadata = __webpack_require__(275) , anObject = __webpack_require__(10) , getPrototypeOf = __webpack_require__(57) , ordinaryHasOwnMetadata = metadata.has , ordinaryGetOwnMetadata = metadata.get , toMetaKey = metadata.key; var ordinaryGetMetadata = function(MetadataKey, O, P){ var hasOwn = ordinaryHasOwnMetadata(MetadataKey, O, P); if(hasOwn)return ordinaryGetOwnMetadata(MetadataKey, O, P); var parent = getPrototypeOf(O); return parent !== null ? ordinaryGetMetadata(MetadataKey, parent, P) : undefined; }; metadata.exp({getMetadata: function getMetadata(metadataKey, target /*, targetKey */){ return ordinaryGetMetadata(metadataKey, anObject(target), arguments.length < 3 ? undefined : toMetaKey(arguments[2])); }}); /***/ }, /* 278 */ /***/ function(module, exports, __webpack_require__) { var Set = __webpack_require__(206) , from = __webpack_require__(266) , metadata = __webpack_require__(275) , anObject = __webpack_require__(10) , getPrototypeOf = __webpack_require__(57) , ordinaryOwnMetadataKeys = metadata.keys , toMetaKey = metadata.key; var ordinaryMetadataKeys = function(O, P){ var oKeys = ordinaryOwnMetadataKeys(O, P) , parent = getPrototypeOf(O); if(parent === null)return oKeys; var pKeys = ordinaryMetadataKeys(parent, P); return pKeys.length ? oKeys.length ? from(new Set(oKeys.concat(pKeys))) : pKeys : oKeys; }; metadata.exp({getMetadataKeys: function getMetadataKeys(target /*, targetKey */){ return ordinaryMetadataKeys(anObject(target), arguments.length < 2 ? undefined : toMetaKey(arguments[1])); }}); /***/ }, /* 279 */ /***/ function(module, exports, __webpack_require__) { var metadata = __webpack_require__(275) , anObject = __webpack_require__(10) , ordinaryGetOwnMetadata = metadata.get , toMetaKey = metadata.key; metadata.exp({getOwnMetadata: function getOwnMetadata(metadataKey, target /*, targetKey */){ return ordinaryGetOwnMetadata(metadataKey, anObject(target) , arguments.length < 3 ? undefined : toMetaKey(arguments[2])); }}); /***/ }, /* 280 */ /***/ function(module, exports, __webpack_require__) { var metadata = __webpack_require__(275) , anObject = __webpack_require__(10) , ordinaryOwnMetadataKeys = metadata.keys , toMetaKey = metadata.key; metadata.exp({getOwnMetadataKeys: function getOwnMetadataKeys(target /*, targetKey */){ return ordinaryOwnMetadataKeys(anObject(target), arguments.length < 2 ? undefined : toMetaKey(arguments[1])); }}); /***/ }, /* 281 */ /***/ function(module, exports, __webpack_require__) { var metadata = __webpack_require__(275) , anObject = __webpack_require__(10) , getPrototypeOf = __webpack_require__(57) , ordinaryHasOwnMetadata = metadata.has , toMetaKey = metadata.key; var ordinaryHasMetadata = function(MetadataKey, O, P){ var hasOwn = ordinaryHasOwnMetadata(MetadataKey, O, P); if(hasOwn)return true; var parent = getPrototypeOf(O); return parent !== null ? ordinaryHasMetadata(MetadataKey, parent, P) : false; }; metadata.exp({hasMetadata: function hasMetadata(metadataKey, target /*, targetKey */){ return ordinaryHasMetadata(metadataKey, anObject(target), arguments.length < 3 ? undefined : toMetaKey(arguments[2])); }}); /***/ }, /* 282 */ /***/ function(module, exports, __webpack_require__) { var metadata = __webpack_require__(275) , anObject = __webpack_require__(10) , ordinaryHasOwnMetadata = metadata.has , toMetaKey = metadata.key; metadata.exp({hasOwnMetadata: function hasOwnMetadata(metadataKey, target /*, targetKey */){ return ordinaryHasOwnMetadata(metadataKey, anObject(target) , arguments.length < 3 ? undefined : toMetaKey(arguments[2])); }}); /***/ }, /* 283 */ /***/ function(module, exports, __webpack_require__) { var metadata = __webpack_require__(275) , anObject = __webpack_require__(10) , aFunction = __webpack_require__(19) , toMetaKey = metadata.key , ordinaryDefineOwnMetadata = metadata.set; metadata.exp({metadata: function metadata(metadataKey, metadataValue){ return function decorator(target, targetKey){ ordinaryDefineOwnMetadata( metadataKey, metadataValue, (targetKey !== undefined ? anObject : aFunction)(target), toMetaKey(targetKey) ); }; }}); /***/ }, /* 284 */ /***/ function(module, exports, __webpack_require__) { // https://github.com/rwaldron/tc39-notes/blob/master/es6/2014-09/sept-25.md#510-globalasap-for-enqueuing-a-microtask var $export = __webpack_require__(6) , microtask = __webpack_require__(201)() , process = __webpack_require__(2).process , isNode = __webpack_require__(32)(process) == 'process'; $export($export.G, { asap: function asap(fn){ var domain = isNode && process.domain; microtask(domain ? domain.bind(fn) : fn); } }); /***/ }, /* 285 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; // https://github.com/zenparsing/es-observable var $export = __webpack_require__(6) , global = __webpack_require__(2) , core = __webpack_require__(7) , microtask = __webpack_require__(201)() , OBSERVABLE = __webpack_require__(23)('observable') , aFunction = __webpack_require__(19) , anObject = __webpack_require__(10) , anInstance = __webpack_require__(197) , redefineAll = __webpack_require__(202) , hide = __webpack_require__(8) , forOf = __webpack_require__(198) , RETURN = forOf.RETURN; var getMethod = function(fn){ return fn == null ? undefined : aFunction(fn); }; var cleanupSubscription = function(subscription){ var cleanup = subscription._c; if(cleanup){ subscription._c = undefined; cleanup(); } }; var subscriptionClosed = function(subscription){ return subscription._o === undefined; }; var closeSubscription = function(subscription){ if(!subscriptionClosed(subscription)){ subscription._o = undefined; cleanupSubscription(subscription); } }; var Subscription = function(observer, subscriber){ anObject(observer); this._c = undefined; this._o = observer; observer = new SubscriptionObserver(this); try { var cleanup = subscriber(observer) , subscription = cleanup; if(cleanup != null){ if(typeof cleanup.unsubscribe === 'function')cleanup = function(){ subscription.unsubscribe(); }; else aFunction(cleanup); this._c = cleanup; } } catch(e){ observer.error(e); return; } if(subscriptionClosed(this))cleanupSubscription(this); }; Subscription.prototype = redefineAll({}, { unsubscribe: function unsubscribe(){ closeSubscription(this); } }); var SubscriptionObserver = function(subscription){ this._s = subscription; }; SubscriptionObserver.prototype = redefineAll({}, { next: function next(value){ var subscription = this._s; if(!subscriptionClosed(subscription)){ var observer = subscription._o; try { var m = getMethod(observer.next); if(m)return m.call(observer, value); } catch(e){ try { closeSubscription(subscription); } finally { throw e; } } } }, error: function error(value){ var subscription = this._s; if(subscriptionClosed(subscription))throw value; var observer = subscription._o; subscription._o = undefined; try { var m = getMethod(observer.error); if(!m)throw value; value = m.call(observer, value); } catch(e){ try { cleanupSubscription(subscription); } finally { throw e; } } cleanupSubscription(subscription); return value; }, complete: function complete(value){ var subscription = this._s; if(!subscriptionClosed(subscription)){ var observer = subscription._o; subscription._o = undefined; try { var m = getMethod(observer.complete); value = m ? m.call(observer, value) : undefined; } catch(e){ try { cleanupSubscription(subscription); } finally { throw e; } } cleanupSubscription(subscription); return value; } } }); var $Observable = function Observable(subscriber){ anInstance(this, $Observable, 'Observable', '_f')._f = aFunction(subscriber); }; redefineAll($Observable.prototype, { subscribe: function subscribe(observer){ return new Subscription(observer, this._f); }, forEach: function forEach(fn){ var that = this; return new (core.Promise || global.Promise)(function(resolve, reject){ aFunction(fn); var subscription = that.subscribe({ next : function(value){ try { return fn(value); } catch(e){ reject(e); subscription.unsubscribe(); } }, error: reject, complete: resolve }); }); } }); redefineAll($Observable, { from: function from(x){ var C = typeof this === 'function' ? this : $Observable; var method = getMethod(anObject(x)[OBSERVABLE]); if(method){ var observable = anObject(method.call(x)); return observable.constructor === C ? observable : new C(function(observer){ return observable.subscribe(observer); }); } return new C(function(observer){ var done = false; microtask(function(){ if(!done){ try { if(forOf(x, false, function(it){ observer.next(it); if(done)return RETURN; }) === RETURN)return; } catch(e){ if(done)throw e; observer.error(e); return; } observer.complete(); } }); return function(){ done = true; }; }); }, of: function of(){ for(var i = 0, l = arguments.length, items = Array(l); i < l;)items[i] = arguments[i++]; return new (typeof this === 'function' ? this : $Observable)(function(observer){ var done = false; microtask(function(){ if(!done){ for(var i = 0; i < items.length; ++i){ observer.next(items[i]); if(done)return; } observer.complete(); } }); return function(){ done = true; }; }); } }); hide($Observable.prototype, OBSERVABLE, function(){ return this; }); $export($export.G, {Observable: $Observable}); __webpack_require__(186)('Observable'); /***/ }, /* 286 */ /***/ function(module, exports, __webpack_require__) { var $export = __webpack_require__(6) , $task = __webpack_require__(200); $export($export.G + $export.B, { setImmediate: $task.set, clearImmediate: $task.clear }); /***/ }, /* 287 */ /***/ function(module, exports, __webpack_require__) { var $iterators = __webpack_require__(183) , redefine = __webpack_require__(16) , global = __webpack_require__(2) , hide = __webpack_require__(8) , Iterators = __webpack_require__(135) , wks = __webpack_require__(23) , ITERATOR = wks('iterator') , TO_STRING_TAG = wks('toStringTag') , ArrayValues = Iterators.Array; for(var collections = ['NodeList', 'DOMTokenList', 'MediaList', 'StyleSheetList', 'CSSRuleList'], i = 0; i < 5; i++){ var NAME = collections[i] , Collection = global[NAME] , proto = Collection && Collection.prototype , key; if(proto){ if(!proto[ITERATOR])hide(proto, ITERATOR, ArrayValues); if(!proto[TO_STRING_TAG])hide(proto, TO_STRING_TAG, NAME); Iterators[NAME] = ArrayValues; for(key in $iterators)if(!proto[key])redefine(proto, key, $iterators[key], true); } } /***/ }, /* 288 */ /***/ function(module, exports, __webpack_require__) { // ie9- setTimeout & setInterval additional parameters fix var global = __webpack_require__(2) , $export = __webpack_require__(6) , invoke = __webpack_require__(76) , partial = __webpack_require__(289) , navigator = global.navigator , MSIE = !!navigator && /MSIE .\./.test(navigator.userAgent); // <- dirty ie9- check var wrap = function(set){ return MSIE ? function(fn, time /*, ...args */){ return set(invoke( partial, [].slice.call(arguments, 2), typeof fn == 'function' ? fn : Function(fn) ), time); } : set; }; $export($export.G + $export.B + $export.F * MSIE, { setTimeout: wrap(global.setTimeout), setInterval: wrap(global.setInterval) }); /***/ }, /* 289 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; var path = __webpack_require__(290) , invoke = __webpack_require__(76) , aFunction = __webpack_require__(19); module.exports = function(/* ...pargs */){ var fn = aFunction(this) , length = arguments.length , pargs = Array(length) , i = 0 , _ = path._ , holder = false; while(length > i)if((pargs[i] = arguments[i++]) === _)holder = true; return function(/* ...args */){ var that = this , aLen = arguments.length , j = 0, k = 0, args; if(!holder && !aLen)return invoke(fn, pargs, that); args = pargs.slice(); if(holder)for(;length > j; j++)if(args[j] === _)args[j] = arguments[k++]; while(aLen > k)args.push(arguments[k++]); return invoke(fn, args, that); }; }; /***/ }, /* 290 */ /***/ function(module, exports, __webpack_require__) { module.exports = __webpack_require__(2); /***/ } /******/ ]); // CommonJS export if(typeof module != 'undefined' && module.exports)module.exports = __e; // RequireJS export else if(typeof define == 'function' && define.amd)define(function(){return __e}); // Export to global object else __g.core = __e; }(1, 1);core-js-2.4.1/client/shim.min.js000066400000000000000000002323441274277553300164450ustar00rootroot00000000000000/** * core-js 2.4.1 * https://github.com/zloirock/core-js * License: http://rock.mit-license.org * © 2016 Denis Pushkarev */ !function(a,b,c){"use strict";!function(a){function __webpack_require__(c){if(b[c])return b[c].exports;var d=b[c]={exports:{},id:c,loaded:!1};return a[c].call(d.exports,d,d.exports,__webpack_require__),d.loaded=!0,d.exports}var b={};return __webpack_require__.m=a,__webpack_require__.c=b,__webpack_require__.p="",__webpack_require__(0)}([function(a,b,c){c(1),c(50),c(51),c(52),c(54),c(55),c(58),c(59),c(60),c(61),c(62),c(63),c(64),c(65),c(66),c(68),c(70),c(72),c(74),c(77),c(78),c(79),c(83),c(86),c(87),c(88),c(89),c(91),c(92),c(93),c(94),c(95),c(97),c(99),c(100),c(101),c(103),c(104),c(105),c(107),c(108),c(109),c(111),c(112),c(113),c(114),c(115),c(116),c(117),c(118),c(119),c(120),c(121),c(122),c(123),c(124),c(126),c(130),c(131),c(132),c(133),c(137),c(139),c(140),c(141),c(142),c(143),c(144),c(145),c(146),c(147),c(148),c(149),c(150),c(151),c(152),c(158),c(159),c(161),c(162),c(163),c(167),c(168),c(169),c(170),c(171),c(173),c(174),c(175),c(176),c(179),c(181),c(182),c(183),c(185),c(187),c(189),c(190),c(191),c(193),c(194),c(195),c(196),c(203),c(206),c(207),c(209),c(210),c(211),c(212),c(213),c(214),c(215),c(216),c(217),c(218),c(219),c(220),c(222),c(223),c(224),c(225),c(226),c(227),c(228),c(229),c(231),c(234),c(235),c(237),c(238),c(239),c(240),c(241),c(242),c(243),c(244),c(245),c(246),c(247),c(249),c(250),c(251),c(252),c(253),c(254),c(255),c(256),c(258),c(259),c(261),c(262),c(263),c(264),c(267),c(268),c(269),c(270),c(271),c(272),c(273),c(274),c(276),c(277),c(278),c(279),c(280),c(281),c(282),c(283),c(284),c(285),c(286),c(287),a.exports=c(288)},function(a,b,d){var e=d(2),f=d(3),g=d(4),h=d(6),i=d(16),j=d(20).KEY,k=d(5),l=d(21),m=d(22),n=d(17),o=d(23),p=d(24),q=d(25),r=d(27),s=d(40),t=d(43),u=d(10),v=d(30),w=d(14),x=d(15),y=d(44),z=d(47),A=d(49),B=d(9),C=d(28),D=A.f,E=B.f,F=z.f,G=e.Symbol,H=e.JSON,I=H&&H.stringify,J="prototype",K=o("_hidden"),L=o("toPrimitive"),M={}.propertyIsEnumerable,N=l("symbol-registry"),O=l("symbols"),P=l("op-symbols"),Q=Object[J],R="function"==typeof G,S=e.QObject,T=!S||!S[J]||!S[J].findChild,U=g&&k(function(){return 7!=y(E({},"a",{get:function(){return E(this,"a",{value:7}).a}})).a})?function(a,b,c){var d=D(Q,b);d&&delete Q[b],E(a,b,c),d&&a!==Q&&E(Q,b,d)}:E,V=function(a){var b=O[a]=y(G[J]);return b._k=a,b},W=R&&"symbol"==typeof G.iterator?function(a){return"symbol"==typeof a}:function(a){return a instanceof G},X=function defineProperty(a,b,c){return a===Q&&X(P,b,c),u(a),b=w(b,!0),u(c),f(O,b)?(c.enumerable?(f(a,K)&&a[K][b]&&(a[K][b]=!1),c=y(c,{enumerable:x(0,!1)})):(f(a,K)||E(a,K,x(1,{})),a[K][b]=!0),U(a,b,c)):E(a,b,c)},Y=function defineProperties(a,b){u(a);for(var c,d=s(b=v(b)),e=0,f=d.length;f>e;)X(a,c=d[e++],b[c]);return a},Z=function create(a,b){return b===c?y(a):Y(y(a),b)},$=function propertyIsEnumerable(a){var b=M.call(this,a=w(a,!0));return!(this===Q&&f(O,a)&&!f(P,a))&&(!(b||!f(this,a)||!f(O,a)||f(this,K)&&this[K][a])||b)},_=function getOwnPropertyDescriptor(a,b){if(a=v(a),b=w(b,!0),a!==Q||!f(O,b)||f(P,b)){var c=D(a,b);return!c||!f(O,b)||f(a,K)&&a[K][b]||(c.enumerable=!0),c}},aa=function getOwnPropertyNames(a){for(var b,c=F(v(a)),d=[],e=0;c.length>e;)f(O,b=c[e++])||b==K||b==j||d.push(b);return d},ba=function getOwnPropertySymbols(a){for(var b,c=a===Q,d=F(c?P:v(a)),e=[],g=0;d.length>g;)!f(O,b=d[g++])||c&&!f(Q,b)||e.push(O[b]);return e};R||(G=function Symbol(){if(this instanceof G)throw TypeError("Symbol is not a constructor!");var a=n(arguments.length>0?arguments[0]:c),b=function(c){this===Q&&b.call(P,c),f(this,K)&&f(this[K],a)&&(this[K][a]=!1),U(this,a,x(1,c))};return g&&T&&U(Q,a,{configurable:!0,set:b}),V(a)},i(G[J],"toString",function toString(){return this._k}),A.f=_,B.f=X,d(48).f=z.f=aa,d(42).f=$,d(41).f=ba,g&&!d(26)&&i(Q,"propertyIsEnumerable",$,!0),p.f=function(a){return V(o(a))}),h(h.G+h.W+h.F*!R,{Symbol:G});for(var ca="hasInstance,isConcatSpreadable,iterator,match,replace,search,species,split,toPrimitive,toStringTag,unscopables".split(","),da=0;ca.length>da;)o(ca[da++]);for(var ca=C(o.store),da=0;ca.length>da;)q(ca[da++]);h(h.S+h.F*!R,"Symbol",{"for":function(a){return f(N,a+="")?N[a]:N[a]=G(a)},keyFor:function keyFor(a){if(W(a))return r(N,a);throw TypeError(a+" is not a symbol!")},useSetter:function(){T=!0},useSimple:function(){T=!1}}),h(h.S+h.F*!R,"Object",{create:Z,defineProperty:X,defineProperties:Y,getOwnPropertyDescriptor:_,getOwnPropertyNames:aa,getOwnPropertySymbols:ba}),H&&h(h.S+h.F*(!R||k(function(){var a=G();return"[null]"!=I([a])||"{}"!=I({a:a})||"{}"!=I(Object(a))})),"JSON",{stringify:function stringify(a){if(a!==c&&!W(a)){for(var b,d,e=[a],f=1;arguments.length>f;)e.push(arguments[f++]);return b=e[1],"function"==typeof b&&(d=b),!d&&t(b)||(b=function(a,b){if(d&&(b=d.call(this,a,b)),!W(b))return b}),e[1]=b,I.apply(H,e)}}}),G[J][L]||d(8)(G[J],L,G[J].valueOf),m(G,"Symbol"),m(Math,"Math",!0),m(e.JSON,"JSON",!0)},function(a,c){var d=a.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof b&&(b=d)},function(a,b){var c={}.hasOwnProperty;a.exports=function(a,b){return c.call(a,b)}},function(a,b,c){a.exports=!c(5)(function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a})},function(a,b){a.exports=function(a){try{return!!a()}catch(b){return!0}}},function(a,b,d){var e=d(2),f=d(7),g=d(8),h=d(16),i=d(18),j="prototype",k=function(a,b,d){var l,m,n,o,p=a&k.F,q=a&k.G,r=a&k.S,s=a&k.P,t=a&k.B,u=q?e:r?e[b]||(e[b]={}):(e[b]||{})[j],v=q?f:f[b]||(f[b]={}),w=v[j]||(v[j]={});q&&(d=b);for(l in d)m=!p&&u&&u[l]!==c,n=(m?u:d)[l],o=t&&m?i(n,e):s&&"function"==typeof n?i(Function.call,n):n,u&&h(u,l,n,a&k.U),v[l]!=n&&g(v,l,o),s&&w[l]!=n&&(w[l]=n)};e.core=f,k.F=1,k.G=2,k.S=4,k.P=8,k.B=16,k.W=32,k.U=64,k.R=128,a.exports=k},function(b,c){var d=b.exports={version:"2.4.0"};"number"==typeof a&&(a=d)},function(a,b,c){var d=c(9),e=c(15);a.exports=c(4)?function(a,b,c){return d.f(a,b,e(1,c))}:function(a,b,c){return a[b]=c,a}},function(a,b,c){var d=c(10),e=c(12),f=c(14),g=Object.defineProperty;b.f=c(4)?Object.defineProperty:function defineProperty(a,b,c){if(d(a),b=f(b,!0),d(c),e)try{return g(a,b,c)}catch(h){}if("get"in c||"set"in c)throw TypeError("Accessors not supported!");return"value"in c&&(a[b]=c.value),a}},function(a,b,c){var d=c(11);a.exports=function(a){if(!d(a))throw TypeError(a+" is not an object!");return a}},function(a,b){a.exports=function(a){return"object"==typeof a?null!==a:"function"==typeof a}},function(a,b,c){a.exports=!c(4)&&!c(5)(function(){return 7!=Object.defineProperty(c(13)("div"),"a",{get:function(){return 7}}).a})},function(a,b,c){var d=c(11),e=c(2).document,f=d(e)&&d(e.createElement);a.exports=function(a){return f?e.createElement(a):{}}},function(a,b,c){var d=c(11);a.exports=function(a,b){if(!d(a))return a;var c,e;if(b&&"function"==typeof(c=a.toString)&&!d(e=c.call(a)))return e;if("function"==typeof(c=a.valueOf)&&!d(e=c.call(a)))return e;if(!b&&"function"==typeof(c=a.toString)&&!d(e=c.call(a)))return e;throw TypeError("Can't convert object to primitive value")}},function(a,b){a.exports=function(a,b){return{enumerable:!(1&a),configurable:!(2&a),writable:!(4&a),value:b}}},function(a,b,c){var d=c(2),e=c(8),f=c(3),g=c(17)("src"),h="toString",i=Function[h],j=(""+i).split(h);c(7).inspectSource=function(a){return i.call(a)},(a.exports=function(a,b,c,h){var i="function"==typeof c;i&&(f(c,"name")||e(c,"name",b)),a[b]!==c&&(i&&(f(c,g)||e(c,g,a[b]?""+a[b]:j.join(String(b)))),a===d?a[b]=c:h?a[b]?a[b]=c:e(a,b,c):(delete a[b],e(a,b,c)))})(Function.prototype,h,function toString(){return"function"==typeof this&&this[g]||i.call(this)})},function(a,b){var d=0,e=Math.random();a.exports=function(a){return"Symbol(".concat(a===c?"":a,")_",(++d+e).toString(36))}},function(a,b,d){var e=d(19);a.exports=function(a,b,d){if(e(a),b===c)return a;switch(d){case 1:return function(c){return a.call(b,c)};case 2:return function(c,d){return a.call(b,c,d)};case 3:return function(c,d,e){return a.call(b,c,d,e)}}return function(){return a.apply(b,arguments)}}},function(a,b){a.exports=function(a){if("function"!=typeof a)throw TypeError(a+" is not a function!");return a}},function(a,b,c){var d=c(17)("meta"),e=c(11),f=c(3),g=c(9).f,h=0,i=Object.isExtensible||function(){return!0},j=!c(5)(function(){return i(Object.preventExtensions({}))}),k=function(a){g(a,d,{value:{i:"O"+ ++h,w:{}}})},l=function(a,b){if(!e(a))return"symbol"==typeof a?a:("string"==typeof a?"S":"P")+a;if(!f(a,d)){if(!i(a))return"F";if(!b)return"E";k(a)}return a[d].i},m=function(a,b){if(!f(a,d)){if(!i(a))return!0;if(!b)return!1;k(a)}return a[d].w},n=function(a){return j&&o.NEED&&i(a)&&!f(a,d)&&k(a),a},o=a.exports={KEY:d,NEED:!1,fastKey:l,getWeak:m,onFreeze:n}},function(a,b,c){var d=c(2),e="__core-js_shared__",f=d[e]||(d[e]={});a.exports=function(a){return f[a]||(f[a]={})}},function(a,b,c){var d=c(9).f,e=c(3),f=c(23)("toStringTag");a.exports=function(a,b,c){a&&!e(a=c?a:a.prototype,f)&&d(a,f,{configurable:!0,value:b})}},function(a,b,c){var d=c(21)("wks"),e=c(17),f=c(2).Symbol,g="function"==typeof f,h=a.exports=function(a){return d[a]||(d[a]=g&&f[a]||(g?f:e)("Symbol."+a))};h.store=d},function(a,b,c){b.f=c(23)},function(a,b,c){var d=c(2),e=c(7),f=c(26),g=c(24),h=c(9).f;a.exports=function(a){var b=e.Symbol||(e.Symbol=f?{}:d.Symbol||{});"_"==a.charAt(0)||a in b||h(b,a,{value:g.f(a)})}},function(a,b){a.exports=!1},function(a,b,c){var d=c(28),e=c(30);a.exports=function(a,b){for(var c,f=e(a),g=d(f),h=g.length,i=0;h>i;)if(f[c=g[i++]]===b)return c}},function(a,b,c){var d=c(29),e=c(39);a.exports=Object.keys||function keys(a){return d(a,e)}},function(a,b,c){var d=c(3),e=c(30),f=c(34)(!1),g=c(38)("IE_PROTO");a.exports=function(a,b){var c,h=e(a),i=0,j=[];for(c in h)c!=g&&d(h,c)&&j.push(c);for(;b.length>i;)d(h,c=b[i++])&&(~f(j,c)||j.push(c));return j}},function(a,b,c){var d=c(31),e=c(33);a.exports=function(a){return d(e(a))}},function(a,b,c){var d=c(32);a.exports=Object("z").propertyIsEnumerable(0)?Object:function(a){return"String"==d(a)?a.split(""):Object(a)}},function(a,b){var c={}.toString;a.exports=function(a){return c.call(a).slice(8,-1)}},function(a,b){a.exports=function(a){if(a==c)throw TypeError("Can't call method on "+a);return a}},function(a,b,c){var d=c(30),e=c(35),f=c(37);a.exports=function(a){return function(b,c,g){var h,i=d(b),j=e(i.length),k=f(g,j);if(a&&c!=c){for(;j>k;)if(h=i[k++],h!=h)return!0}else for(;j>k;k++)if((a||k in i)&&i[k]===c)return a||k||0;return!a&&-1}}},function(a,b,c){var d=c(36),e=Math.min;a.exports=function(a){return a>0?e(d(a),9007199254740991):0}},function(a,b){var c=Math.ceil,d=Math.floor;a.exports=function(a){return isNaN(a=+a)?0:(a>0?d:c)(a)}},function(a,b,c){var d=c(36),e=Math.max,f=Math.min;a.exports=function(a,b){return a=d(a),a<0?e(a+b,0):f(a,b)}},function(a,b,c){var d=c(21)("keys"),e=c(17);a.exports=function(a){return d[a]||(d[a]=e(a))}},function(a,b){a.exports="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(",")},function(a,b,c){var d=c(28),e=c(41),f=c(42);a.exports=function(a){var b=d(a),c=e.f;if(c)for(var g,h=c(a),i=f.f,j=0;h.length>j;)i.call(a,g=h[j++])&&b.push(g);return b}},function(a,b){b.f=Object.getOwnPropertySymbols},function(a,b){b.f={}.propertyIsEnumerable},function(a,b,c){var d=c(32);a.exports=Array.isArray||function isArray(a){return"Array"==d(a)}},function(a,b,d){var e=d(10),f=d(45),g=d(39),h=d(38)("IE_PROTO"),i=function(){},j="prototype",k=function(){var a,b=d(13)("iframe"),c=g.length,e="<",f=">";for(b.style.display="none",d(46).appendChild(b),b.src="javascript:",a=b.contentWindow.document,a.open(),a.write(e+"script"+f+"document.F=Object"+e+"/script"+f),a.close(),k=a.F;c--;)delete k[j][g[c]];return k()};a.exports=Object.create||function create(a,b){var d;return null!==a?(i[j]=e(a),d=new i,i[j]=null,d[h]=a):d=k(),b===c?d:f(d,b)}},function(a,b,c){var d=c(9),e=c(10),f=c(28);a.exports=c(4)?Object.defineProperties:function defineProperties(a,b){e(a);for(var c,g=f(b),h=g.length,i=0;h>i;)d.f(a,c=g[i++],b[c]);return a}},function(a,b,c){a.exports=c(2).document&&document.documentElement},function(a,b,c){var d=c(30),e=c(48).f,f={}.toString,g="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],h=function(a){try{return e(a)}catch(b){return g.slice()}};a.exports.f=function getOwnPropertyNames(a){return g&&"[object Window]"==f.call(a)?h(a):e(d(a))}},function(a,b,c){var d=c(29),e=c(39).concat("length","prototype");b.f=Object.getOwnPropertyNames||function getOwnPropertyNames(a){return d(a,e)}},function(a,b,c){var d=c(42),e=c(15),f=c(30),g=c(14),h=c(3),i=c(12),j=Object.getOwnPropertyDescriptor;b.f=c(4)?j:function getOwnPropertyDescriptor(a,b){if(a=f(a),b=g(b,!0),i)try{return j(a,b)}catch(c){}if(h(a,b))return e(!d.f.call(a,b),a[b])}},function(a,b,c){var d=c(6);d(d.S+d.F*!c(4),"Object",{defineProperty:c(9).f})},function(a,b,c){var d=c(6);d(d.S+d.F*!c(4),"Object",{defineProperties:c(45)})},function(a,b,c){var d=c(30),e=c(49).f;c(53)("getOwnPropertyDescriptor",function(){return function getOwnPropertyDescriptor(a,b){return e(d(a),b)}})},function(a,b,c){var d=c(6),e=c(7),f=c(5);a.exports=function(a,b){var c=(e.Object||{})[a]||Object[a],g={};g[a]=b(c),d(d.S+d.F*f(function(){c(1)}),"Object",g)}},function(a,b,c){var d=c(6);d(d.S,"Object",{create:c(44)})},function(a,b,c){var d=c(56),e=c(57);c(53)("getPrototypeOf",function(){return function getPrototypeOf(a){return e(d(a))}})},function(a,b,c){var d=c(33);a.exports=function(a){return Object(d(a))}},function(a,b,c){var d=c(3),e=c(56),f=c(38)("IE_PROTO"),g=Object.prototype;a.exports=Object.getPrototypeOf||function(a){return a=e(a),d(a,f)?a[f]:"function"==typeof a.constructor&&a instanceof a.constructor?a.constructor.prototype:a instanceof Object?g:null}},function(a,b,c){var d=c(56),e=c(28);c(53)("keys",function(){return function keys(a){return e(d(a))}})},function(a,b,c){c(53)("getOwnPropertyNames",function(){return c(47).f})},function(a,b,c){var d=c(11),e=c(20).onFreeze;c(53)("freeze",function(a){return function freeze(b){return a&&d(b)?a(e(b)):b}})},function(a,b,c){var d=c(11),e=c(20).onFreeze;c(53)("seal",function(a){return function seal(b){return a&&d(b)?a(e(b)):b}})},function(a,b,c){var d=c(11),e=c(20).onFreeze;c(53)("preventExtensions",function(a){return function preventExtensions(b){return a&&d(b)?a(e(b)):b}})},function(a,b,c){var d=c(11);c(53)("isFrozen",function(a){return function isFrozen(b){return!d(b)||!!a&&a(b)}})},function(a,b,c){var d=c(11);c(53)("isSealed",function(a){return function isSealed(b){return!d(b)||!!a&&a(b)}})},function(a,b,c){var d=c(11);c(53)("isExtensible",function(a){return function isExtensible(b){return!!d(b)&&(!a||a(b))}})},function(a,b,c){var d=c(6);d(d.S+d.F,"Object",{assign:c(67)})},function(a,b,c){var d=c(28),e=c(41),f=c(42),g=c(56),h=c(31),i=Object.assign;a.exports=!i||c(5)(function(){var a={},b={},c=Symbol(),d="abcdefghijklmnopqrst";return a[c]=7,d.split("").forEach(function(a){b[a]=a}),7!=i({},a)[c]||Object.keys(i({},b)).join("")!=d})?function assign(a,b){for(var c=g(a),i=arguments.length,j=1,k=e.f,l=f.f;i>j;)for(var m,n=h(arguments[j++]),o=k?d(n).concat(k(n)):d(n),p=o.length,q=0;p>q;)l.call(n,m=o[q++])&&(c[m]=n[m]);return c}:i},function(a,b,c){var d=c(6);d(d.S,"Object",{is:c(69)})},function(a,b){a.exports=Object.is||function is(a,b){return a===b?0!==a||1/a===1/b:a!=a&&b!=b}},function(a,b,c){var d=c(6);d(d.S,"Object",{setPrototypeOf:c(71).set})},function(a,b,d){var e=d(11),f=d(10),g=function(a,b){if(f(a),!e(b)&&null!==b)throw TypeError(b+": can't set as prototype!")};a.exports={set:Object.setPrototypeOf||("__proto__"in{}?function(a,b,c){try{c=d(18)(Function.call,d(49).f(Object.prototype,"__proto__").set,2),c(a,[]),b=!(a instanceof Array)}catch(e){b=!0}return function setPrototypeOf(a,d){return g(a,d),b?a.__proto__=d:c(a,d),a}}({},!1):c),check:g}},function(a,b,c){var d=c(73),e={};e[c(23)("toStringTag")]="z",e+""!="[object z]"&&c(16)(Object.prototype,"toString",function toString(){return"[object "+d(this)+"]"},!0)},function(a,b,d){var e=d(32),f=d(23)("toStringTag"),g="Arguments"==e(function(){return arguments}()),h=function(a,b){try{return a[b]}catch(c){}};a.exports=function(a){var b,d,i;return a===c?"Undefined":null===a?"Null":"string"==typeof(d=h(b=Object(a),f))?d:g?e(b):"Object"==(i=e(b))&&"function"==typeof b.callee?"Arguments":i}},function(a,b,c){var d=c(6);d(d.P,"Function",{bind:c(75)})},function(a,b,c){var d=c(19),e=c(11),f=c(76),g=[].slice,h={},i=function(a,b,c){if(!(b in h)){for(var d=[],e=0;e2){b=s?b.trim():m(b,3);var c,d,e,f=b.charCodeAt(0);if(43===f||45===f){if(c=b.charCodeAt(2),88===c||120===c)return NaN}else if(48===f){switch(b.charCodeAt(1)){case 66:case 98:d=2,e=49;break;case 79:case 111:d=8,e=55;break;default:return+b}for(var g,i=b.slice(2),j=0,k=i.length;je)return NaN;return parseInt(i,d)}}return+b};if(!o(" 0o1")||!o("0b1")||o("+0x1")){o=function Number(a){var b=arguments.length<1?0:a,c=this;return c instanceof o&&(r?i(function(){q.valueOf.call(c)}):f(c)!=n)?g(new p(t(b)),c,o):t(b)};for(var u,v=c(4)?j(p):"MAX_VALUE,MIN_VALUE,NaN,NEGATIVE_INFINITY,POSITIVE_INFINITY,EPSILON,isFinite,isInteger,isNaN,isSafeInteger,MAX_SAFE_INTEGER,MIN_SAFE_INTEGER,parseFloat,parseInt,isInteger".split(","),w=0;v.length>w;w++)e(p,u=v[w])&&!e(o,u)&&l(o,u,k(p,u));o.prototype=q,q.constructor=o,c(16)(d,n,o)}},function(a,b,c){var d=c(11),e=c(71).set;a.exports=function(a,b,c){var f,g=b.constructor;return g!==c&&"function"==typeof g&&(f=g.prototype)!==c.prototype&&d(f)&&e&&e(a,f),a}},function(a,b,c){var d=c(6),e=c(33),f=c(5),g=c(82),h="["+g+"]",i="​…",j=RegExp("^"+h+h+"*"),k=RegExp(h+h+"*$"),l=function(a,b,c){var e={},h=f(function(){return!!g[a]()||i[a]()!=i}),j=e[a]=h?b(m):g[a];c&&(e[c]=j),d(d.P+d.F*h,"String",e)},m=l.trim=function(a,b){return a=String(e(a)),1&b&&(a=a.replace(j,"")),2&b&&(a=a.replace(k,"")),a};a.exports=l},function(a,b){a.exports="\t\n\x0B\f\r   ᠎              \u2028\u2029\ufeff"},function(a,b,c){var d=c(6),e=c(36),f=c(84),g=c(85),h=1..toFixed,i=Math.floor,j=[0,0,0,0,0,0],k="Number.toFixed: incorrect invocation!",l="0",m=function(a,b){for(var c=-1,d=b;++c<6;)d+=a*j[c],j[c]=d%1e7,d=i(d/1e7)},n=function(a){for(var b=6,c=0;--b>=0;)c+=j[b],j[b]=i(c/a),c=c%a*1e7},o=function(){for(var a=6,b="";--a>=0;)if(""!==b||0===a||0!==j[a]){var c=String(j[a]);b=""===b?c:b+g.call(l,7-c.length)+c}return b},p=function(a,b,c){return 0===b?c:b%2===1?p(a,b-1,c*a):p(a*a,b/2,c)},q=function(a){for(var b=0,c=a;c>=4096;)b+=12,c/=4096;for(;c>=2;)b+=1,c/=2;return b};d(d.P+d.F*(!!h&&("0.000"!==8e-5.toFixed(3)||"1"!==.9.toFixed(0)||"1.25"!==1.255.toFixed(2)||"1000000000000000128"!==(0xde0b6b3a7640080).toFixed(0))||!c(5)(function(){h.call({})})),"Number",{toFixed:function toFixed(a){var b,c,d,h,i=f(this,k),j=e(a),r="",s=l;if(j<0||j>20)throw RangeError(k);if(i!=i)return"NaN";if(i<=-1e21||i>=1e21)return String(i);if(i<0&&(r="-",i=-i),i>1e-21)if(b=q(i*p(2,69,1))-69,c=b<0?i*p(2,-b,1):i/p(2,b,1),c*=4503599627370496,b=52-b,b>0){for(m(0,c),d=j;d>=7;)m(1e7,0),d-=7;for(m(p(10,d,1),0),d=b-1;d>=23;)n(1<<23),d-=23;n(1<0?(h=s.length,s=r+(h<=j?"0."+g.call(l,j-h)+s:s.slice(0,h-j)+"."+s.slice(h-j))):s=r+s,s}})},function(a,b,c){var d=c(32);a.exports=function(a,b){if("number"!=typeof a&&"Number"!=d(a))throw TypeError(b);return+a}},function(a,b,c){var d=c(36),e=c(33);a.exports=function repeat(a){var b=String(e(this)),c="",f=d(a);if(f<0||f==1/0)throw RangeError("Count can't be negative");for(;f>0;(f>>>=1)&&(b+=b))1&f&&(c+=b);return c}},function(a,b,d){var e=d(6),f=d(5),g=d(84),h=1..toPrecision;e(e.P+e.F*(f(function(){return"1"!==h.call(1,c)})||!f(function(){h.call({})})),"Number",{toPrecision:function toPrecision(a){var b=g(this,"Number#toPrecision: incorrect invocation!");return a===c?h.call(b):h.call(b,a)}})},function(a,b,c){var d=c(6);d(d.S,"Number",{EPSILON:Math.pow(2,-52)})},function(a,b,c){var d=c(6),e=c(2).isFinite;d(d.S,"Number",{isFinite:function isFinite(a){return"number"==typeof a&&e(a)}})},function(a,b,c){var d=c(6);d(d.S,"Number",{isInteger:c(90)})},function(a,b,c){var d=c(11),e=Math.floor;a.exports=function isInteger(a){return!d(a)&&isFinite(a)&&e(a)===a}},function(a,b,c){var d=c(6);d(d.S,"Number",{isNaN:function isNaN(a){return a!=a}})},function(a,b,c){var d=c(6),e=c(90),f=Math.abs;d(d.S,"Number",{isSafeInteger:function isSafeInteger(a){return e(a)&&f(a)<=9007199254740991}})},function(a,b,c){var d=c(6);d(d.S,"Number",{MAX_SAFE_INTEGER:9007199254740991})},function(a,b,c){var d=c(6);d(d.S,"Number",{MIN_SAFE_INTEGER:-9007199254740991})},function(a,b,c){var d=c(6),e=c(96);d(d.S+d.F*(Number.parseFloat!=e),"Number",{parseFloat:e})},function(a,b,c){var d=c(2).parseFloat,e=c(81).trim;a.exports=1/d(c(82)+"-0")!==-(1/0)?function parseFloat(a){var b=e(String(a),3),c=d(b);return 0===c&&"-"==b.charAt(0)?-0:c}:d},function(a,b,c){var d=c(6),e=c(98);d(d.S+d.F*(Number.parseInt!=e),"Number",{parseInt:e})},function(a,b,c){var d=c(2).parseInt,e=c(81).trim,f=c(82),g=/^[\-+]?0[xX]/;a.exports=8!==d(f+"08")||22!==d(f+"0x16")?function parseInt(a,b){var c=e(String(a),3);return d(c,b>>>0||(g.test(c)?16:10))}:d},function(a,b,c){var d=c(6),e=c(98);d(d.G+d.F*(parseInt!=e),{parseInt:e})},function(a,b,c){var d=c(6),e=c(96);d(d.G+d.F*(parseFloat!=e),{parseFloat:e})},function(a,b,c){var d=c(6),e=c(102),f=Math.sqrt,g=Math.acosh;d(d.S+d.F*!(g&&710==Math.floor(g(Number.MAX_VALUE))&&g(1/0)==1/0),"Math",{acosh:function acosh(a){return(a=+a)<1?NaN:a>94906265.62425156?Math.log(a)+Math.LN2:e(a-1+f(a-1)*f(a+1))}})},function(a,b){a.exports=Math.log1p||function log1p(a){return(a=+a)>-1e-8&&a<1e-8?a-a*a/2:Math.log(1+a)}},function(a,b,c){function asinh(a){return isFinite(a=+a)&&0!=a?a<0?-asinh(-a):Math.log(a+Math.sqrt(a*a+1)):a}var d=c(6),e=Math.asinh;d(d.S+d.F*!(e&&1/e(0)>0),"Math",{asinh:asinh})},function(a,b,c){var d=c(6),e=Math.atanh;d(d.S+d.F*!(e&&1/e(-0)<0),"Math",{atanh:function atanh(a){return 0==(a=+a)?a:Math.log((1+a)/(1-a))/2}})},function(a,b,c){var d=c(6),e=c(106);d(d.S,"Math",{cbrt:function cbrt(a){return e(a=+a)*Math.pow(Math.abs(a),1/3)}})},function(a,b){a.exports=Math.sign||function sign(a){return 0==(a=+a)||a!=a?a:a<0?-1:1}},function(a,b,c){var d=c(6);d(d.S,"Math",{clz32:function clz32(a){return(a>>>=0)?31-Math.floor(Math.log(a+.5)*Math.LOG2E):32}})},function(a,b,c){var d=c(6),e=Math.exp;d(d.S,"Math",{cosh:function cosh(a){return(e(a=+a)+e(-a))/2}})},function(a,b,c){var d=c(6),e=c(110);d(d.S+d.F*(e!=Math.expm1),"Math",{expm1:e})},function(a,b){var c=Math.expm1;a.exports=!c||c(10)>22025.465794806718||c(10)<22025.465794806718||c(-2e-17)!=-2e-17?function expm1(a){return 0==(a=+a)?a:a>-1e-6&&a<1e-6?a+a*a/2:Math.exp(a)-1}:c},function(a,b,c){var d=c(6),e=c(106),f=Math.pow,g=f(2,-52),h=f(2,-23),i=f(2,127)*(2-h),j=f(2,-126),k=function(a){return a+1/g-1/g};d(d.S,"Math",{fround:function fround(a){var b,c,d=Math.abs(a),f=e(a);return di||c!=c?f*(1/0):f*c)}})},function(a,b,c){var d=c(6),e=Math.abs;d(d.S,"Math",{hypot:function hypot(a,b){for(var c,d,f=0,g=0,h=arguments.length,i=0;g0?(d=c/i,f+=d*d):f+=c;return i===1/0?1/0:i*Math.sqrt(f)}})},function(a,b,c){var d=c(6),e=Math.imul;d(d.S+d.F*c(5)(function(){return e(4294967295,5)!=-5||2!=e.length}),"Math",{imul:function imul(a,b){var c=65535,d=+a,e=+b,f=c&d,g=c&e;return 0|f*g+((c&d>>>16)*g+f*(c&e>>>16)<<16>>>0)}})},function(a,b,c){var d=c(6);d(d.S,"Math",{log10:function log10(a){return Math.log(a)/Math.LN10}})},function(a,b,c){var d=c(6);d(d.S,"Math",{log1p:c(102)})},function(a,b,c){var d=c(6);d(d.S,"Math",{log2:function log2(a){return Math.log(a)/Math.LN2}})},function(a,b,c){var d=c(6);d(d.S,"Math",{sign:c(106)})},function(a,b,c){var d=c(6),e=c(110),f=Math.exp;d(d.S+d.F*c(5)(function(){return!Math.sinh(-2e-17)!=-2e-17}),"Math",{sinh:function sinh(a){return Math.abs(a=+a)<1?(e(a)-e(-a))/2:(f(a-1)-f(-a-1))*(Math.E/2)}})},function(a,b,c){var d=c(6),e=c(110),f=Math.exp;d(d.S,"Math",{tanh:function tanh(a){var b=e(a=+a),c=e(-a);return b==1/0?1:c==1/0?-1:(b-c)/(f(a)+f(-a))}})},function(a,b,c){var d=c(6);d(d.S,"Math",{trunc:function trunc(a){return(a>0?Math.floor:Math.ceil)(a)}})},function(a,b,c){var d=c(6),e=c(37),f=String.fromCharCode,g=String.fromCodePoint;d(d.S+d.F*(!!g&&1!=g.length),"String",{fromCodePoint:function fromCodePoint(a){for(var b,c=[],d=arguments.length,g=0;d>g;){if(b=+arguments[g++],e(b,1114111)!==b)throw RangeError(b+" is not a valid code point");c.push(b<65536?f(b):f(((b-=65536)>>10)+55296,b%1024+56320))}return c.join("")}})},function(a,b,c){var d=c(6),e=c(30),f=c(35);d(d.S,"String",{raw:function raw(a){for(var b=e(a.raw),c=f(b.length),d=arguments.length,g=[],h=0;c>h;)g.push(String(b[h++])),h=k?a?"":c:(g=i.charCodeAt(j),g<55296||g>56319||j+1===k||(h=i.charCodeAt(j+1))<56320||h>57343?a?i.charAt(j):g:a?i.slice(j,j+2):(g-55296<<10)+(h-56320)+65536)}}},function(a,b,d){var e=d(6),f=d(35),g=d(127),h="endsWith",i=""[h];e(e.P+e.F*d(129)(h),"String",{endsWith:function endsWith(a){var b=g(this,a,h),d=arguments.length>1?arguments[1]:c,e=f(b.length),j=d===c?e:Math.min(f(d),e),k=String(a);return i?i.call(b,k,j):b.slice(j-k.length,j)===k}})},function(a,b,c){var d=c(128),e=c(33);a.exports=function(a,b,c){if(d(b))throw TypeError("String#"+c+" doesn't accept regex!");return String(e(a))}},function(a,b,d){var e=d(11),f=d(32),g=d(23)("match");a.exports=function(a){var b;return e(a)&&((b=a[g])!==c?!!b:"RegExp"==f(a))}},function(a,b,c){var d=c(23)("match");a.exports=function(a){var b=/./;try{"/./"[a](b)}catch(c){try{return b[d]=!1,!"/./"[a](b)}catch(e){}}return!0}},function(a,b,d){var e=d(6),f=d(127),g="includes";e(e.P+e.F*d(129)(g),"String",{includes:function includes(a){return!!~f(this,a,g).indexOf(a,arguments.length>1?arguments[1]:c)}})},function(a,b,c){var d=c(6);d(d.P,"String",{repeat:c(85)})},function(a,b,d){var e=d(6),f=d(35),g=d(127),h="startsWith",i=""[h];e(e.P+e.F*d(129)(h),"String",{startsWith:function startsWith(a){var b=g(this,a,h),d=f(Math.min(arguments.length>1?arguments[1]:c,b.length)),e=String(a);return i?i.call(b,e,d):b.slice(d,d+e.length)===e}})},function(a,b,d){var e=d(125)(!0);d(134)(String,"String",function(a){this._t=String(a),this._i=0},function(){var a,b=this._t,d=this._i;return d>=b.length?{value:c,done:!0}:(a=e(b,d),this._i+=a.length,{value:a,done:!1})})},function(a,b,d){var e=d(26),f=d(6),g=d(16),h=d(8),i=d(3),j=d(135),k=d(136),l=d(22),m=d(57),n=d(23)("iterator"),o=!([].keys&&"next"in[].keys()),p="@@iterator",q="keys",r="values",s=function(){return this};a.exports=function(a,b,d,t,u,v,w){k(d,b,t);var x,y,z,A=function(a){if(!o&&a in E)return E[a];switch(a){case q:return function keys(){return new d(this,a)};case r:return function values(){return new d(this,a)}}return function entries(){return new d(this,a)}},B=b+" Iterator",C=u==r,D=!1,E=a.prototype,F=E[n]||E[p]||u&&E[u],G=F||A(u),H=u?C?A("entries"):G:c,I="Array"==b?E.entries||F:F;if(I&&(z=m(I.call(new a)),z!==Object.prototype&&(l(z,B,!0),e||i(z,n)||h(z,n,s))),C&&F&&F.name!==r&&(D=!0,G=function values(){return F.call(this)}),e&&!w||!o&&!D&&E[n]||h(E,n,G),j[b]=G,j[B]=s,u)if(x={values:C?G:A(r),keys:v?G:A(q),entries:H},w)for(y in x)y in E||g(E,y,x[y]);else f(f.P+f.F*(o||D),b,x);return x}},function(a,b){a.exports={}},function(a,b,c){var d=c(44),e=c(15),f=c(22),g={};c(8)(g,c(23)("iterator"),function(){return this}),a.exports=function(a,b,c){a.prototype=d(g,{next:e(1,c)}),f(a,b+" Iterator")}},function(a,b,c){c(138)("anchor",function(a){return function anchor(b){return a(this,"a","name",b)}})},function(a,b,c){var d=c(6),e=c(5),f=c(33),g=/"/g,h=function(a,b,c,d){var e=String(f(a)),h="<"+b;return""!==c&&(h+=" "+c+'="'+String(d).replace(g,""")+'"'),h+">"+e+""};a.exports=function(a,b){var c={};c[a]=b(h),d(d.P+d.F*e(function(){var b=""[a]('"');return b!==b.toLowerCase()||b.split('"').length>3}),"String",c)}},function(a,b,c){c(138)("big",function(a){return function big(){return a(this,"big","","")}})},function(a,b,c){c(138)("blink",function(a){return function blink(){return a(this,"blink","","")}})},function(a,b,c){c(138)("bold",function(a){return function bold(){return a(this,"b","","")}})},function(a,b,c){c(138)("fixed",function(a){return function fixed(){return a(this,"tt","","")}})},function(a,b,c){c(138)("fontcolor",function(a){return function fontcolor(b){return a(this,"font","color",b)}})},function(a,b,c){c(138)("fontsize",function(a){return function fontsize(b){return a(this,"font","size",b)}})},function(a,b,c){c(138)("italics",function(a){return function italics(){return a(this,"i","","")}})},function(a,b,c){c(138)("link",function(a){return function link(b){return a(this,"a","href",b)}})},function(a,b,c){c(138)("small",function(a){return function small(){return a(this,"small","","")}})},function(a,b,c){c(138)("strike",function(a){return function strike(){return a(this,"strike","","")}})},function(a,b,c){c(138)("sub",function(a){return function sub(){return a(this,"sub","","")}})},function(a,b,c){c(138)("sup",function(a){return function sup(){return a(this,"sup","","")}})},function(a,b,c){var d=c(6);d(d.S,"Array",{isArray:c(43)})},function(a,b,d){var e=d(18),f=d(6),g=d(56),h=d(153),i=d(154),j=d(35),k=d(155),l=d(156);f(f.S+f.F*!d(157)(function(a){Array.from(a)}),"Array",{from:function from(a){var b,d,f,m,n=g(a),o="function"==typeof this?this:Array,p=arguments.length,q=p>1?arguments[1]:c,r=q!==c,s=0,t=l(n);if(r&&(q=e(q,p>2?arguments[2]:c,2)),t==c||o==Array&&i(t))for(b=j(n.length),d=new o(b);b>s;s++)k(d,s,r?q(n[s],s):n[s]);else for(m=t.call(n),d=new o;!(f=m.next()).done;s++)k(d,s,r?h(m,q,[f.value,s],!0):f.value);return d.length=s,d}})},function(a,b,d){var e=d(10);a.exports=function(a,b,d,f){try{return f?b(e(d)[0],d[1]):b(d)}catch(g){var h=a["return"];throw h!==c&&e(h.call(a)),g}}},function(a,b,d){var e=d(135),f=d(23)("iterator"),g=Array.prototype;a.exports=function(a){return a!==c&&(e.Array===a||g[f]===a)}},function(a,b,c){var d=c(9),e=c(15);a.exports=function(a,b,c){b in a?d.f(a,b,e(0,c)):a[b]=c}},function(a,b,d){var e=d(73),f=d(23)("iterator"),g=d(135);a.exports=d(7).getIteratorMethod=function(a){if(a!=c)return a[f]||a["@@iterator"]||g[e(a)]}},function(a,b,c){var d=c(23)("iterator"),e=!1; try{var f=[7][d]();f["return"]=function(){e=!0},Array.from(f,function(){throw 2})}catch(g){}a.exports=function(a,b){if(!b&&!e)return!1;var c=!1;try{var f=[7],g=f[d]();g.next=function(){return{done:c=!0}},f[d]=function(){return g},a(f)}catch(h){}return c}},function(a,b,c){var d=c(6),e=c(155);d(d.S+d.F*c(5)(function(){function F(){}return!(Array.of.call(F)instanceof F)}),"Array",{of:function of(){for(var a=0,b=arguments.length,c=new("function"==typeof this?this:Array)(b);b>a;)e(c,a,arguments[a++]);return c.length=b,c}})},function(a,b,d){var e=d(6),f=d(30),g=[].join;e(e.P+e.F*(d(31)!=Object||!d(160)(g)),"Array",{join:function join(a){return g.call(f(this),a===c?",":a)}})},function(a,b,c){var d=c(5);a.exports=function(a,b){return!!a&&d(function(){b?a.call(null,function(){},1):a.call(null)})}},function(a,b,d){var e=d(6),f=d(46),g=d(32),h=d(37),i=d(35),j=[].slice;e(e.P+e.F*d(5)(function(){f&&j.call(f)}),"Array",{slice:function slice(a,b){var d=i(this.length),e=g(this);if(b=b===c?d:b,"Array"==e)return j.call(this,a,b);for(var f=h(a,d),k=h(b,d),l=i(k-f),m=Array(l),n=0;nw;w++)if((n||w in t)&&(q=t[w],r=u(q,w,s),a))if(d)x[w]=r;else if(r)switch(a){case 3:return!0;case 5:return q;case 6:return w;case 2:x.push(q)}else if(l)return!1;return m?-1:k||l?l:x}}},function(a,b,c){var d=c(166);a.exports=function(a,b){return new(d(a))(b)}},function(a,b,d){var e=d(11),f=d(43),g=d(23)("species");a.exports=function(a){var b;return f(a)&&(b=a.constructor,"function"!=typeof b||b!==Array&&!f(b.prototype)||(b=c),e(b)&&(b=b[g],null===b&&(b=c))),b===c?Array:b}},function(a,b,c){var d=c(6),e=c(164)(1);d(d.P+d.F*!c(160)([].map,!0),"Array",{map:function map(a){return e(this,a,arguments[1])}})},function(a,b,c){var d=c(6),e=c(164)(2);d(d.P+d.F*!c(160)([].filter,!0),"Array",{filter:function filter(a){return e(this,a,arguments[1])}})},function(a,b,c){var d=c(6),e=c(164)(3);d(d.P+d.F*!c(160)([].some,!0),"Array",{some:function some(a){return e(this,a,arguments[1])}})},function(a,b,c){var d=c(6),e=c(164)(4);d(d.P+d.F*!c(160)([].every,!0),"Array",{every:function every(a){return e(this,a,arguments[1])}})},function(a,b,c){var d=c(6),e=c(172);d(d.P+d.F*!c(160)([].reduce,!0),"Array",{reduce:function reduce(a){return e(this,a,arguments.length,arguments[1],!1)}})},function(a,b,c){var d=c(19),e=c(56),f=c(31),g=c(35);a.exports=function(a,b,c,h,i){d(b);var j=e(a),k=f(j),l=g(j.length),m=i?l-1:0,n=i?-1:1;if(c<2)for(;;){if(m in k){h=k[m],m+=n;break}if(m+=n,i?m<0:l<=m)throw TypeError("Reduce of empty array with no initial value")}for(;i?m>=0:l>m;m+=n)m in k&&(h=b(h,k[m],m,j));return h}},function(a,b,c){var d=c(6),e=c(172);d(d.P+d.F*!c(160)([].reduceRight,!0),"Array",{reduceRight:function reduceRight(a){return e(this,a,arguments.length,arguments[1],!0)}})},function(a,b,c){var d=c(6),e=c(34)(!1),f=[].indexOf,g=!!f&&1/[1].indexOf(1,-0)<0;d(d.P+d.F*(g||!c(160)(f)),"Array",{indexOf:function indexOf(a){return g?f.apply(this,arguments)||0:e(this,a,arguments[1])}})},function(a,b,c){var d=c(6),e=c(30),f=c(36),g=c(35),h=[].lastIndexOf,i=!!h&&1/[1].lastIndexOf(1,-0)<0;d(d.P+d.F*(i||!c(160)(h)),"Array",{lastIndexOf:function lastIndexOf(a){if(i)return h.apply(this,arguments)||0;var b=e(this),c=g(b.length),d=c-1;for(arguments.length>1&&(d=Math.min(d,f(arguments[1]))),d<0&&(d=c+d);d>=0;d--)if(d in b&&b[d]===a)return d||0;return-1}})},function(a,b,c){var d=c(6);d(d.P,"Array",{copyWithin:c(177)}),c(178)("copyWithin")},function(a,b,d){var e=d(56),f=d(37),g=d(35);a.exports=[].copyWithin||function copyWithin(a,b){var d=e(this),h=g(d.length),i=f(a,h),j=f(b,h),k=arguments.length>2?arguments[2]:c,l=Math.min((k===c?h:f(k,h))-j,h-i),m=1;for(j0;)j in d?d[i]=d[j]:delete d[i],i+=m,j+=m;return d}},function(a,b,d){var e=d(23)("unscopables"),f=Array.prototype;f[e]==c&&d(8)(f,e,{}),a.exports=function(a){f[e][a]=!0}},function(a,b,c){var d=c(6);d(d.P,"Array",{fill:c(180)}),c(178)("fill")},function(a,b,d){var e=d(56),f=d(37),g=d(35);a.exports=function fill(a){for(var b=e(this),d=g(b.length),h=arguments.length,i=f(h>1?arguments[1]:c,d),j=h>2?arguments[2]:c,k=j===c?d:f(j,d);k>i;)b[i++]=a;return b}},function(a,b,d){var e=d(6),f=d(164)(5),g="find",h=!0;g in[]&&Array(1)[g](function(){h=!1}),e(e.P+e.F*h,"Array",{find:function find(a){return f(this,a,arguments.length>1?arguments[1]:c)}}),d(178)(g)},function(a,b,d){var e=d(6),f=d(164)(6),g="findIndex",h=!0;g in[]&&Array(1)[g](function(){h=!1}),e(e.P+e.F*h,"Array",{findIndex:function findIndex(a){return f(this,a,arguments.length>1?arguments[1]:c)}}),d(178)(g)},function(a,b,d){var e=d(178),f=d(184),g=d(135),h=d(30);a.exports=d(134)(Array,"Array",function(a,b){this._t=h(a),this._i=0,this._k=b},function(){var a=this._t,b=this._k,d=this._i++;return!a||d>=a.length?(this._t=c,f(1)):"keys"==b?f(0,d):"values"==b?f(0,a[d]):f(0,[d,a[d]])},"values"),g.Arguments=g.Array,e("keys"),e("values"),e("entries")},function(a,b){a.exports=function(a,b){return{value:b,done:!!a}}},function(a,b,c){c(186)("Array")},function(a,b,c){var d=c(2),e=c(9),f=c(4),g=c(23)("species");a.exports=function(a){var b=d[a];f&&b&&!b[g]&&e.f(b,g,{configurable:!0,get:function(){return this}})}},function(a,b,d){var e=d(2),f=d(80),g=d(9).f,h=d(48).f,i=d(128),j=d(188),k=e.RegExp,l=k,m=k.prototype,n=/a/g,o=/a/g,p=new k(n)!==n;if(d(4)&&(!p||d(5)(function(){return o[d(23)("match")]=!1,k(n)!=n||k(o)==o||"/a/i"!=k(n,"i")}))){k=function RegExp(a,b){var d=this instanceof k,e=i(a),g=b===c;return!d&&e&&a.constructor===k&&g?a:f(p?new l(e&&!g?a.source:a,b):l((e=a instanceof k)?a.source:a,e&&g?j.call(a):b),d?this:m,k)};for(var q=(function(a){a in k||g(k,a,{configurable:!0,get:function(){return l[a]},set:function(b){l[a]=b}})}),r=h(l),s=0;r.length>s;)q(r[s++]);m.constructor=k,k.prototype=m,d(16)(e,"RegExp",k)}d(186)("RegExp")},function(a,b,c){var d=c(10);a.exports=function(){var a=d(this),b="";return a.global&&(b+="g"),a.ignoreCase&&(b+="i"),a.multiline&&(b+="m"),a.unicode&&(b+="u"),a.sticky&&(b+="y"),b}},function(a,b,d){d(190);var e=d(10),f=d(188),g=d(4),h="toString",i=/./[h],j=function(a){d(16)(RegExp.prototype,h,a,!0)};d(5)(function(){return"/a/b"!=i.call({source:"a",flags:"b"})})?j(function toString(){var a=e(this);return"/".concat(a.source,"/","flags"in a?a.flags:!g&&a instanceof RegExp?f.call(a):c)}):i.name!=h&&j(function toString(){return i.call(this)})},function(a,b,c){c(4)&&"g"!=/./g.flags&&c(9).f(RegExp.prototype,"flags",{configurable:!0,get:c(188)})},function(a,b,d){d(192)("match",1,function(a,b,d){return[function match(d){var e=a(this),f=d==c?c:d[b];return f!==c?f.call(d,e):new RegExp(d)[b](String(e))},d]})},function(a,b,c){var d=c(8),e=c(16),f=c(5),g=c(33),h=c(23);a.exports=function(a,b,c){var i=h(a),j=c(g,i,""[a]),k=j[0],l=j[1];f(function(){var b={};return b[i]=function(){return 7},7!=""[a](b)})&&(e(String.prototype,a,k),d(RegExp.prototype,i,2==b?function(a,b){return l.call(a,this,b)}:function(a){return l.call(a,this)}))}},function(a,b,d){d(192)("replace",2,function(a,b,d){return[function replace(e,f){var g=a(this),h=e==c?c:e[b];return h!==c?h.call(e,g,f):d.call(String(g),e,f)},d]})},function(a,b,d){d(192)("search",1,function(a,b,d){return[function search(d){var e=a(this),f=d==c?c:d[b];return f!==c?f.call(d,e):new RegExp(d)[b](String(e))},d]})},function(a,b,d){d(192)("split",2,function(a,b,e){var f=d(128),g=e,h=[].push,i="split",j="length",k="lastIndex";if("c"=="abbc"[i](/(b)*/)[1]||4!="test"[i](/(?:)/,-1)[j]||2!="ab"[i](/(?:ab)*/)[j]||4!="."[i](/(.?)(.?)/)[j]||"."[i](/()()/)[j]>1||""[i](/.?/)[j]){var l=/()??/.exec("")[1]===c;e=function(a,b){var d=String(this);if(a===c&&0===b)return[];if(!f(a))return g.call(d,a,b);var e,i,m,n,o,p=[],q=(a.ignoreCase?"i":"")+(a.multiline?"m":"")+(a.unicode?"u":"")+(a.sticky?"y":""),r=0,s=b===c?4294967295:b>>>0,t=new RegExp(a.source,q+"g");for(l||(e=new RegExp("^"+t.source+"$(?!\\s)",q));(i=t.exec(d))&&(m=i.index+i[0][j],!(m>r&&(p.push(d.slice(r,i.index)),!l&&i[j]>1&&i[0].replace(e,function(){for(o=1;o1&&i.index=s)));)t[k]===i.index&&t[k]++;return r===d[j]?!n&&t.test("")||p.push(""):p.push(d.slice(r)),p[j]>s?p.slice(0,s):p}}else"0"[i](c,0)[j]&&(e=function(a,b){return a===c&&0===b?[]:g.call(this,a,b)});return[function split(d,f){var g=a(this),h=d==c?c:d[b];return h!==c?h.call(d,g,f):e.call(String(g),d,f)},e]})},function(a,b,d){var e,f,g,h=d(26),i=d(2),j=d(18),k=d(73),l=d(6),m=d(11),n=d(19),o=d(197),p=d(198),q=d(199),r=d(200).set,s=d(201)(),t="Promise",u=i.TypeError,v=i.process,w=i[t],v=i.process,x="process"==k(v),y=function(){},z=!!function(){try{var a=w.resolve(1),b=(a.constructor={})[d(23)("species")]=function(a){a(y,y)};return(x||"function"==typeof PromiseRejectionEvent)&&a.then(y)instanceof b}catch(c){}}(),A=function(a,b){return a===b||a===w&&b===g},B=function(a){var b;return!(!m(a)||"function"!=typeof(b=a.then))&&b},C=function(a){return A(w,a)?new D(a):new f(a)},D=f=function(a){var b,d;this.promise=new a(function(a,e){if(b!==c||d!==c)throw u("Bad Promise constructor");b=a,d=e}),this.resolve=n(b),this.reject=n(d)},E=function(a){try{a()}catch(b){return{error:b}}},F=function(a,b){if(!a._n){a._n=!0;var c=a._c;s(function(){for(var d=a._v,e=1==a._s,f=0,g=function(b){var c,f,g=e?b.ok:b.fail,h=b.resolve,i=b.reject,j=b.domain;try{g?(e||(2==a._h&&I(a),a._h=1),g===!0?c=d:(j&&j.enter(),c=g(d),j&&j.exit()),c===b.promise?i(u("Promise-chain cycle")):(f=B(c))?f.call(c,h,i):h(c)):i(d)}catch(k){i(k)}};c.length>f;)g(c[f++]);a._c=[],a._n=!1,b&&!a._h&&G(a)})}},G=function(a){r.call(i,function(){var b,d,e,f=a._v;if(H(a)&&(b=E(function(){x?v.emit("unhandledRejection",f,a):(d=i.onunhandledrejection)?d({promise:a,reason:f}):(e=i.console)&&e.error&&e.error("Unhandled promise rejection",f)}),a._h=x||H(a)?2:1),a._a=c,b)throw b.error})},H=function(a){if(1==a._h)return!1;for(var b,c=a._a||a._c,d=0;c.length>d;)if(b=c[d++],b.fail||!H(b.promise))return!1;return!0},I=function(a){r.call(i,function(){var b;x?v.emit("rejectionHandled",a):(b=i.onrejectionhandled)&&b({promise:a,reason:a._v})})},J=function(a){var b=this;b._d||(b._d=!0,b=b._w||b,b._v=a,b._s=2,b._a||(b._a=b._c.slice()),F(b,!0))},K=function(a){var b,c=this;if(!c._d){c._d=!0,c=c._w||c;try{if(c===a)throw u("Promise can't be resolved itself");(b=B(a))?s(function(){var d={_w:c,_d:!1};try{b.call(a,j(K,d,1),j(J,d,1))}catch(e){J.call(d,e)}}):(c._v=a,c._s=1,F(c,!1))}catch(d){J.call({_w:c,_d:!1},d)}}};z||(w=function Promise(a){o(this,w,t,"_h"),n(a),e.call(this);try{a(j(K,this,1),j(J,this,1))}catch(b){J.call(this,b)}},e=function Promise(a){this._c=[],this._a=c,this._s=0,this._d=!1,this._v=c,this._h=0,this._n=!1},e.prototype=d(202)(w.prototype,{then:function then(a,b){var d=C(q(this,w));return d.ok="function"!=typeof a||a,d.fail="function"==typeof b&&b,d.domain=x?v.domain:c,this._c.push(d),this._a&&this._a.push(d),this._s&&F(this,!1),d.promise},"catch":function(a){return this.then(c,a)}}),D=function(){var a=new e;this.promise=a,this.resolve=j(K,a,1),this.reject=j(J,a,1)}),l(l.G+l.W+l.F*!z,{Promise:w}),d(22)(w,t),d(186)(t),g=d(7)[t],l(l.S+l.F*!z,t,{reject:function reject(a){var b=C(this),c=b.reject;return c(a),b.promise}}),l(l.S+l.F*(h||!z),t,{resolve:function resolve(a){if(a instanceof w&&A(a.constructor,this))return a;var b=C(this),c=b.resolve;return c(a),b.promise}}),l(l.S+l.F*!(z&&d(157)(function(a){w.all(a)["catch"](y)})),t,{all:function all(a){var b=this,d=C(b),e=d.resolve,f=d.reject,g=E(function(){var d=[],g=0,h=1;p(a,!1,function(a){var i=g++,j=!1;d.push(c),h++,b.resolve(a).then(function(a){j||(j=!0,d[i]=a,--h||e(d))},f)}),--h||e(d)});return g&&f(g.error),d.promise},race:function race(a){var b=this,c=C(b),d=c.reject,e=E(function(){p(a,!1,function(a){b.resolve(a).then(c.resolve,d)})});return e&&d(e.error),c.promise}})},function(a,b){a.exports=function(a,b,d,e){if(!(a instanceof b)||e!==c&&e in a)throw TypeError(d+": incorrect invocation!");return a}},function(a,b,c){var d=c(18),e=c(153),f=c(154),g=c(10),h=c(35),i=c(156),j={},k={},b=a.exports=function(a,b,c,l,m){var n,o,p,q,r=m?function(){return a}:i(a),s=d(c,l,b?2:1),t=0;if("function"!=typeof r)throw TypeError(a+" is not iterable!");if(f(r)){for(n=h(a.length);n>t;t++)if(q=b?s(g(o=a[t])[0],o[1]):s(a[t]),q===j||q===k)return q}else for(p=r.call(a);!(o=p.next()).done;)if(q=e(p,s,o.value,b),q===j||q===k)return q};b.BREAK=j,b.RETURN=k},function(a,b,d){var e=d(10),f=d(19),g=d(23)("species");a.exports=function(a,b){var d,h=e(a).constructor;return h===c||(d=e(h)[g])==c?b:f(d)}},function(a,b,c){var d,e,f,g=c(18),h=c(76),i=c(46),j=c(13),k=c(2),l=k.process,m=k.setImmediate,n=k.clearImmediate,o=k.MessageChannel,p=0,q={},r="onreadystatechange",s=function(){var a=+this;if(q.hasOwnProperty(a)){var b=q[a];delete q[a],b()}},t=function(a){s.call(a.data)};m&&n||(m=function setImmediate(a){for(var b=[],c=1;arguments.length>c;)b.push(arguments[c++]);return q[++p]=function(){h("function"==typeof a?a:Function(a),b)},d(p),p},n=function clearImmediate(a){delete q[a]},"process"==c(32)(l)?d=function(a){l.nextTick(g(s,a,1))}:o?(e=new o,f=e.port2,e.port1.onmessage=t,d=g(f.postMessage,f,1)):k.addEventListener&&"function"==typeof postMessage&&!k.importScripts?(d=function(a){k.postMessage(a+"","*")},k.addEventListener("message",t,!1)):d=r in j("script")?function(a){i.appendChild(j("script"))[r]=function(){i.removeChild(this),s.call(a)}}:function(a){setTimeout(g(s,a,1),0)}),a.exports={set:m,clear:n}},function(a,b,d){var e=d(2),f=d(200).set,g=e.MutationObserver||e.WebKitMutationObserver,h=e.process,i=e.Promise,j="process"==d(32)(h);a.exports=function(){var a,b,d,k=function(){var e,f;for(j&&(e=h.domain)&&e.exit();a;){f=a.fn,a=a.next;try{f()}catch(g){throw a?d():b=c,g}}b=c,e&&e.enter()};if(j)d=function(){h.nextTick(k)};else if(g){var l=!0,m=document.createTextNode("");new g(k).observe(m,{characterData:!0}),d=function(){m.data=l=!l}}else if(i&&i.resolve){var n=i.resolve();d=function(){n.then(k)}}else d=function(){f.call(e,k)};return function(e){var f={fn:e,next:c};b&&(b.next=f),a||(a=f,d()),b=f}}},function(a,b,c){var d=c(16);a.exports=function(a,b,c){for(var e in b)d(a,e,b[e],c);return a}},function(a,b,d){var e=d(204);a.exports=d(205)("Map",function(a){return function Map(){return a(this,arguments.length>0?arguments[0]:c)}},{get:function get(a){var b=e.getEntry(this,a);return b&&b.v},set:function set(a,b){return e.def(this,0===a?0:a,b)}},e,!0)},function(a,b,d){var e=d(9).f,f=d(44),g=d(202),h=d(18),i=d(197),j=d(33),k=d(198),l=d(134),m=d(184),n=d(186),o=d(4),p=d(20).fastKey,q=o?"_s":"size",r=function(a,b){var c,d=p(b);if("F"!==d)return a._i[d];for(c=a._f;c;c=c.n)if(c.k==b)return c};a.exports={getConstructor:function(a,b,d,l){var m=a(function(a,e){i(a,m,b,"_i"),a._i=f(null),a._f=c,a._l=c,a[q]=0,e!=c&&k(e,d,a[l],a)});return g(m.prototype,{clear:function clear(){for(var a=this,b=a._i,d=a._f;d;d=d.n)d.r=!0,d.p&&(d.p=d.p.n=c),delete b[d.i];a._f=a._l=c,a[q]=0},"delete":function(a){var b=this,c=r(b,a);if(c){var d=c.n,e=c.p;delete b._i[c.i],c.r=!0,e&&(e.n=d),d&&(d.p=e),b._f==c&&(b._f=d),b._l==c&&(b._l=e),b[q]--}return!!c},forEach:function forEach(a){i(this,m,"forEach");for(var b,d=h(a,arguments.length>1?arguments[1]:c,3);b=b?b.n:this._f;)for(d(b.v,b.k,this);b&&b.r;)b=b.p},has:function has(a){return!!r(this,a)}}),o&&e(m.prototype,"size",{get:function(){return j(this[q])}}),m},def:function(a,b,d){var e,f,g=r(a,b);return g?g.v=d:(a._l=g={i:f=p(b,!0),k:b,v:d,p:e=a._l,n:c,r:!1},a._f||(a._f=g),e&&(e.n=g),a[q]++,"F"!==f&&(a._i[f]=g)),a},getEntry:r,setStrong:function(a,b,d){l(a,b,function(a,b){this._t=a,this._k=b,this._l=c},function(){for(var a=this,b=a._k,d=a._l;d&&d.r;)d=d.p;return a._t&&(a._l=d=d?d.n:a._t._f)?"keys"==b?m(0,d.k):"values"==b?m(0,d.v):m(0,[d.k,d.v]):(a._t=c,m(1))},d?"entries":"values",!d,!0),n(b)}}},function(a,b,d){var e=d(2),f=d(6),g=d(16),h=d(202),i=d(20),j=d(198),k=d(197),l=d(11),m=d(5),n=d(157),o=d(22),p=d(80);a.exports=function(a,b,d,q,r,s){var t=e[a],u=t,v=r?"set":"add",w=u&&u.prototype,x={},y=function(a){var b=w[a];g(w,a,"delete"==a?function(a){return!(s&&!l(a))&&b.call(this,0===a?0:a)}:"has"==a?function has(a){return!(s&&!l(a))&&b.call(this,0===a?0:a)}:"get"==a?function get(a){return s&&!l(a)?c:b.call(this,0===a?0:a)}:"add"==a?function add(a){return b.call(this,0===a?0:a),this}:function set(a,c){return b.call(this,0===a?0:a,c),this})};if("function"==typeof u&&(s||w.forEach&&!m(function(){(new u).entries().next()}))){var z=new u,A=z[v](s?{}:-0,1)!=z,B=m(function(){z.has(1)}),C=n(function(a){new u(a)}),D=!s&&m(function(){for(var a=new u,b=5;b--;)a[v](b,b);return!a.has(-0)});C||(u=b(function(b,d){k(b,u,a);var e=p(new t,b,u);return d!=c&&j(d,r,e[v],e),e}),u.prototype=w,w.constructor=u),(B||D)&&(y("delete"),y("has"),r&&y("get")),(D||A)&&y(v),s&&w.clear&&delete w.clear}else u=q.getConstructor(b,a,r,v),h(u.prototype,d),i.NEED=!0;return o(u,a),x[a]=u,f(f.G+f.W+f.F*(u!=t),x),s||q.setStrong(u,a,r),u}},function(a,b,d){var e=d(204);a.exports=d(205)("Set",function(a){return function Set(){return a(this,arguments.length>0?arguments[0]:c)}},{add:function add(a){return e.def(this,a=0===a?0:a,a)}},e)},function(a,b,d){var e,f=d(164)(0),g=d(16),h=d(20),i=d(67),j=d(208),k=d(11),l=h.getWeak,m=Object.isExtensible,n=j.ufstore,o={},p=function(a){return function WeakMap(){return a(this,arguments.length>0?arguments[0]:c)}},q={get:function get(a){if(k(a)){var b=l(a);return b===!0?n(this).get(a):b?b[this._i]:c}},set:function set(a,b){return j.def(this,a,b)}},r=a.exports=d(205)("WeakMap",p,q,j,!0,!0);7!=(new r).set((Object.freeze||Object)(o),7).get(o)&&(e=j.getConstructor(p),i(e.prototype,q),h.NEED=!0,f(["delete","has","get","set"],function(a){var b=r.prototype,c=b[a];g(b,a,function(b,d){if(k(b)&&!m(b)){this._f||(this._f=new e);var f=this._f[a](b,d);return"set"==a?this:f}return c.call(this,b,d)})}))},function(a,b,d){var e=d(202),f=d(20).getWeak,g=d(10),h=d(11),i=d(197),j=d(198),k=d(164),l=d(3),m=k(5),n=k(6),o=0,p=function(a){return a._l||(a._l=new q)},q=function(){this.a=[]},r=function(a,b){return m(a.a,function(a){return a[0]===b})};q.prototype={get:function(a){var b=r(this,a);if(b)return b[1]},has:function(a){return!!r(this,a)},set:function(a,b){var c=r(this,a);c?c[1]=b:this.a.push([a,b])},"delete":function(a){var b=n(this.a,function(b){return b[0]===a});return~b&&this.a.splice(b,1),!!~b}},a.exports={getConstructor:function(a,b,d,g){var k=a(function(a,e){i(a,k,b,"_i"),a._i=o++,a._l=c,e!=c&&j(e,d,a[g],a)});return e(k.prototype,{"delete":function(a){if(!h(a))return!1;var b=f(a);return b===!0?p(this)["delete"](a):b&&l(b,this._i)&&delete b[this._i]},has:function has(a){if(!h(a))return!1;var b=f(a);return b===!0?p(this).has(a):b&&l(b,this._i)}}),k},def:function(a,b,c){var d=f(g(b),!0);return d===!0?p(a).set(b,c):d[a._i]=c,a},ufstore:p}},function(a,b,d){var e=d(208);d(205)("WeakSet",function(a){return function WeakSet(){return a(this,arguments.length>0?arguments[0]:c)}},{add:function add(a){return e.def(this,a,!0)}},e,!1,!0)},function(a,b,c){var d=c(6),e=c(19),f=c(10),g=(c(2).Reflect||{}).apply,h=Function.apply;d(d.S+d.F*!c(5)(function(){g(function(){})}),"Reflect",{apply:function apply(a,b,c){var d=e(a),i=f(c);return g?g(d,b,i):h.call(d,b,i)}})},function(a,b,c){var d=c(6),e=c(44),f=c(19),g=c(10),h=c(11),i=c(5),j=c(75),k=(c(2).Reflect||{}).construct,l=i(function(){function F(){}return!(k(function(){},[],F)instanceof F)}),m=!i(function(){k(function(){})});d(d.S+d.F*(l||m),"Reflect",{construct:function construct(a,b){f(a),g(b);var c=arguments.length<3?a:f(arguments[2]);if(m&&!l)return k(a,b,c);if(a==c){switch(b.length){case 0:return new a;case 1:return new a(b[0]);case 2:return new a(b[0],b[1]);case 3:return new a(b[0],b[1],b[2]);case 4:return new a(b[0],b[1],b[2],b[3])}var d=[null];return d.push.apply(d,b),new(j.apply(a,d))}var i=c.prototype,n=e(h(i)?i:Object.prototype),o=Function.apply.call(a,n,b);return h(o)?o:n}})},function(a,b,c){var d=c(9),e=c(6),f=c(10),g=c(14);e(e.S+e.F*c(5)(function(){Reflect.defineProperty(d.f({},1,{value:1}),1,{value:2})}),"Reflect",{defineProperty:function defineProperty(a,b,c){f(a),b=g(b,!0),f(c);try{return d.f(a,b,c),!0}catch(e){return!1}}})},function(a,b,c){var d=c(6),e=c(49).f,f=c(10);d(d.S,"Reflect",{deleteProperty:function deleteProperty(a,b){var c=e(f(a),b);return!(c&&!c.configurable)&&delete a[b]}})},function(a,b,d){var e=d(6),f=d(10),g=function(a){this._t=f(a),this._i=0;var b,c=this._k=[];for(b in a)c.push(b)};d(136)(g,"Object",function(){var a,b=this,d=b._k;do if(b._i>=d.length)return{value:c,done:!0};while(!((a=d[b._i++])in b._t));return{value:a,done:!1}}),e(e.S,"Reflect",{enumerate:function enumerate(a){return new g(a)}})},function(a,b,d){function get(a,b){var d,h,k=arguments.length<3?a:arguments[2];return j(a)===k?a[b]:(d=e.f(a,b))?g(d,"value")?d.value:d.get!==c?d.get.call(k):c:i(h=f(a))?get(h,b,k):void 0}var e=d(49),f=d(57),g=d(3),h=d(6),i=d(11),j=d(10);h(h.S,"Reflect",{get:get})},function(a,b,c){var d=c(49),e=c(6),f=c(10);e(e.S,"Reflect",{getOwnPropertyDescriptor:function getOwnPropertyDescriptor(a,b){return d.f(f(a),b)}})},function(a,b,c){var d=c(6),e=c(57),f=c(10);d(d.S,"Reflect",{getPrototypeOf:function getPrototypeOf(a){return e(f(a))}})},function(a,b,c){var d=c(6);d(d.S,"Reflect",{has:function has(a,b){return b in a}})},function(a,b,c){var d=c(6),e=c(10),f=Object.isExtensible;d(d.S,"Reflect",{isExtensible:function isExtensible(a){return e(a),!f||f(a)}})},function(a,b,c){var d=c(6);d(d.S,"Reflect",{ownKeys:c(221)})},function(a,b,c){var d=c(48),e=c(41),f=c(10),g=c(2).Reflect;a.exports=g&&g.ownKeys||function ownKeys(a){var b=d.f(f(a)),c=e.f;return c?b.concat(c(a)):b}},function(a,b,c){var d=c(6),e=c(10),f=Object.preventExtensions;d(d.S,"Reflect",{preventExtensions:function preventExtensions(a){e(a);try{return f&&f(a),!0}catch(b){return!1}}})},function(a,b,d){function set(a,b,d){var i,m,n=arguments.length<4?a:arguments[3],o=f.f(k(a),b);if(!o){if(l(m=g(a)))return set(m,b,d,n);o=j(0)}return h(o,"value")?!(o.writable===!1||!l(n))&&(i=f.f(n,b)||j(0),i.value=d,e.f(n,b,i),!0):o.set!==c&&(o.set.call(n,d),!0)}var e=d(9),f=d(49),g=d(57),h=d(3),i=d(6),j=d(15),k=d(10),l=d(11);i(i.S,"Reflect",{set:set})},function(a,b,c){var d=c(6),e=c(71);e&&d(d.S,"Reflect",{setPrototypeOf:function setPrototypeOf(a,b){e.check(a,b);try{return e.set(a,b),!0}catch(c){return!1}}})},function(a,b,c){var d=c(6);d(d.S,"Date",{now:function(){return(new Date).getTime()}})},function(a,b,c){var d=c(6),e=c(56),f=c(14);d(d.P+d.F*c(5)(function(){return null!==new Date(NaN).toJSON()||1!==Date.prototype.toJSON.call({toISOString:function(){return 1}})}),"Date",{toJSON:function toJSON(a){var b=e(this),c=f(b);return"number"!=typeof c||isFinite(c)?b.toISOString():null}})},function(a,b,c){var d=c(6),e=c(5),f=Date.prototype.getTime,g=function(a){return a>9?a:"0"+a};d(d.P+d.F*(e(function(){return"0385-07-25T07:06:39.999Z"!=new Date(-5e13-1).toISOString()})||!e(function(){new Date(NaN).toISOString()})),"Date",{toISOString:function toISOString(){if(!isFinite(f.call(this)))throw RangeError("Invalid time value");var a=this,b=a.getUTCFullYear(),c=a.getUTCMilliseconds(),d=b<0?"-":b>9999?"+":"";return d+("00000"+Math.abs(b)).slice(d?-6:-4)+"-"+g(a.getUTCMonth()+1)+"-"+g(a.getUTCDate())+"T"+g(a.getUTCHours())+":"+g(a.getUTCMinutes())+":"+g(a.getUTCSeconds())+"."+(c>99?c:"0"+g(c))+"Z"}})},function(a,b,c){var d=Date.prototype,e="Invalid Date",f="toString",g=d[f],h=d.getTime;new Date(NaN)+""!=e&&c(16)(d,f,function toString(){var a=h.call(this);return a===a?g.call(this):e})},function(a,b,c){var d=c(23)("toPrimitive"),e=Date.prototype;d in e||c(8)(e,d,c(230))},function(a,b,c){var d=c(10),e=c(14),f="number";a.exports=function(a){if("string"!==a&&a!==f&&"default"!==a)throw TypeError("Incorrect hint");return e(d(this),a!=f)}},function(a,b,d){var e=d(6),f=d(232),g=d(233),h=d(10),i=d(37),j=d(35),k=d(11),l=d(2).ArrayBuffer,m=d(199),n=g.ArrayBuffer,o=g.DataView,p=f.ABV&&l.isView,q=n.prototype.slice,r=f.VIEW,s="ArrayBuffer";e(e.G+e.W+e.F*(l!==n),{ArrayBuffer:n}),e(e.S+e.F*!f.CONSTR,s,{isView:function isView(a){return p&&p(a)||k(a)&&r in a}}),e(e.P+e.U+e.F*d(5)(function(){return!new n(2).slice(1,c).byteLength}),s,{slice:function slice(a,b){if(q!==c&&b===c)return q.call(h(this),a);for(var d=h(this).byteLength,e=i(a,d),f=i(b===c?d:b,d),g=new(m(this,n))(j(f-e)),k=new o(this),l=new o(g),p=0;e>1,k=23===b?E(2,-24)-E(2,-77):0,l=0,m=a<0||0===a&&1/a<0?1:0;for(a=D(a),a!=a||a===B?(e=a!=a?1:0,d=i):(d=F(G(a)/H),a*(f=E(2,-d))<1&&(d--,f*=2),a+=d+j>=1?k/f:k*E(2,1-j),a*f>=2&&(d++,f/=2),d+j>=i?(e=0,d=i):d+j>=1?(e=(a*f-1)*E(2,b),d+=j):(e=a*E(2,j-1)*E(2,b),d=0));b>=8;g[l++]=255&e,e/=256,b-=8);for(d=d<0;g[l++]=255&d,d/=256,h-=8);return g[--l]|=128*m,g},P=function(a,b,c){var d,e=8*c-b-1,f=(1<>1,h=e-7,i=c-1,j=a[i--],k=127&j;for(j>>=7;h>0;k=256*k+a[i],i--,h-=8);for(d=k&(1<<-h)-1,k>>=-h,h+=b;h>0;d=256*d+a[i],i--,h-=8);if(0===k)k=1-g;else{if(k===f)return d?NaN:j?-B:B;d+=E(2,b),k-=g}return(j?-1:1)*d*E(2,k-b)},Q=function(a){return a[3]<<24|a[2]<<16|a[1]<<8|a[0]},R=function(a){return[255&a]},S=function(a){return[255&a,a>>8&255]},T=function(a){return[255&a,a>>8&255,a>>16&255,a>>24&255]},U=function(a){return O(a,52,8)},V=function(a){return O(a,23,4)},W=function(a,b,c){p(a[u],b,{get:function(){return this[c]}})},X=function(a,b,c,d){var e=+c,f=m(e);if(e!=f||f<0||f+b>a[M])throw A(w);var g=a[L]._b,h=f+a[N],i=g.slice(h,h+b);return d?i:i.reverse()},Y=function(a,b,c,d,e,f){var g=+c,h=m(g);if(g!=h||h<0||h+b>a[M])throw A(w);for(var i=a[L]._b,j=h+a[N],k=d(+e),l=0;lba;)($=aa[ba++])in x||i(x,$,C[$]);g||(_.constructor=x)}var ca=new y(new x(2)),da=y[u].setInt8;ca.setInt8(0,2147483648),ca.setInt8(1,2147483649),!ca.getInt8(0)&&ca.getInt8(1)||j(y[u],{setInt8:function setInt8(a,b){da.call(this,a,b<<24>>24)},setUint8:function setUint8(a,b){da.call(this,a,b<<24>>24)}},!0)}else x=function ArrayBuffer(a){var b=Z(this,a);this._b=q.call(Array(b),0),this[M]=b},y=function DataView(a,b,d){l(this,y,t),l(a,x,t);var e=a[M],f=m(b);if(f<0||f>e)throw A("Wrong offset!");if(d=d===c?e-f:n(d),f+d>e)throw A(v);this[L]=a,this[N]=f,this[M]=d},f&&(W(x,J,"_l"),W(y,I,"_b"),W(y,J,"_l"),W(y,K,"_o")),j(y[u],{getInt8:function getInt8(a){return X(this,1,a)[0]<<24>>24},getUint8:function getUint8(a){return X(this,1,a)[0]},getInt16:function getInt16(a){var b=X(this,2,a,arguments[1]);return(b[1]<<8|b[0])<<16>>16},getUint16:function getUint16(a){var b=X(this,2,a,arguments[1]);return b[1]<<8|b[0]},getInt32:function getInt32(a){return Q(X(this,4,a,arguments[1]))},getUint32:function getUint32(a){return Q(X(this,4,a,arguments[1]))>>>0},getFloat32:function getFloat32(a){return P(X(this,4,a,arguments[1]),23,4)},getFloat64:function getFloat64(a){return P(X(this,8,a,arguments[1]),52,8)},setInt8:function setInt8(a,b){Y(this,1,a,R,b)},setUint8:function setUint8(a,b){Y(this,1,a,R,b)},setInt16:function setInt16(a,b){Y(this,2,a,S,b,arguments[2])},setUint16:function setUint16(a,b){Y(this,2,a,S,b,arguments[2])},setInt32:function setInt32(a,b){Y(this,4,a,T,b,arguments[2])},setUint32:function setUint32(a,b){Y(this,4,a,T,b,arguments[2])},setFloat32:function setFloat32(a,b){Y(this,4,a,V,b,arguments[2])},setFloat64:function setFloat64(a,b){Y(this,8,a,U,b,arguments[2])}});r(x,s),r(y,t),i(y[u],h.VIEW,!0),b[s]=x,b[t]=y},function(a,b,c){var d=c(6);d(d.G+d.W+d.F*!c(232).ABV,{DataView:c(233).DataView})},function(a,b,c){c(236)("Int8",1,function(a){return function Int8Array(b,c,d){return a(this,b,c,d)}})},function(a,b,d){if(d(4)){var e=d(26),f=d(2),g=d(5),h=d(6),i=d(232),j=d(233),k=d(18),l=d(197),m=d(15),n=d(8),o=d(202),p=d(36),q=d(35),r=d(37),s=d(14),t=d(3),u=d(69),v=d(73),w=d(11),x=d(56),y=d(154),z=d(44),A=d(57),B=d(48).f,C=d(156),D=d(17),E=d(23),F=d(164),G=d(34),H=d(199),I=d(183),J=d(135),K=d(157),L=d(186),M=d(180),N=d(177),O=d(9),P=d(49),Q=O.f,R=P.f,S=f.RangeError,T=f.TypeError,U=f.Uint8Array,V="ArrayBuffer",W="Shared"+V,X="BYTES_PER_ELEMENT",Y="prototype",Z=Array[Y],$=j.ArrayBuffer,_=j.DataView,aa=F(0),ba=F(2),ca=F(3),da=F(4),ea=F(5),fa=F(6),ga=G(!0),ha=G(!1),ia=I.values,ja=I.keys,ka=I.entries,la=Z.lastIndexOf,ma=Z.reduce,na=Z.reduceRight,oa=Z.join,pa=Z.sort,qa=Z.slice,ra=Z.toString,sa=Z.toLocaleString,ta=E("iterator"),ua=E("toStringTag"),va=D("typed_constructor"),wa=D("def_constructor"),xa=i.CONSTR,ya=i.TYPED,za=i.VIEW,Aa="Wrong length!",Ba=F(1,function(a,b){return Ha(H(a,a[wa]),b)}),Ca=g(function(){return 1===new U(new Uint16Array([1]).buffer)[0]}),Da=!!U&&!!U[Y].set&&g(function(){new U(1).set({})}),Ea=function(a,b){if(a===c)throw T(Aa);var d=+a,e=q(a);if(b&&!u(d,e))throw S(Aa);return e},Fa=function(a,b){var c=p(a);if(c<0||c%b)throw S("Wrong offset!");return c},Ga=function(a){if(w(a)&&ya in a)return a;throw T(a+" is not a typed array!")},Ha=function(a,b){if(!(w(a)&&va in a))throw T("It is not a typed array constructor!");return new a(b)},Ia=function(a,b){return Ja(H(a,a[wa]),b)},Ja=function(a,b){for(var c=0,d=b.length,e=Ha(a,d);d>c;)e[c]=b[c++];return e},Ka=function(a,b,c){Q(a,b,{get:function(){return this._d[c]}})},La=function from(a){var b,d,e,f,g,h,i=x(a),j=arguments.length,l=j>1?arguments[1]:c,m=l!==c,n=C(i);if(n!=c&&!y(n)){for(h=n.call(i),e=[],b=0;!(g=h.next()).done;b++)e.push(g.value);i=e}for(m&&j>2&&(l=k(l,arguments[2],2)),b=0,d=q(i.length),f=Ha(this,d);d>b;b++)f[b]=m?l(i[b],b):i[b];return f},Ma=function of(){for(var a=0,b=arguments.length,c=Ha(this,b);b>a;)c[a]=arguments[a++];return c},Na=!!U&&g(function(){sa.call(new U(1))}),Oa=function toLocaleString(){return sa.apply(Na?qa.call(Ga(this)):Ga(this),arguments)},Pa={copyWithin:function copyWithin(a,b){return N.call(Ga(this),a,b,arguments.length>2?arguments[2]:c)},every:function every(a){return da(Ga(this),a,arguments.length>1?arguments[1]:c)},fill:function fill(a){return M.apply(Ga(this),arguments)},filter:function filter(a){return Ia(this,ba(Ga(this),a,arguments.length>1?arguments[1]:c))},find:function find(a){return ea(Ga(this),a,arguments.length>1?arguments[1]:c)},findIndex:function findIndex(a){return fa(Ga(this),a,arguments.length>1?arguments[1]:c)},forEach:function forEach(a){aa(Ga(this),a,arguments.length>1?arguments[1]:c)},indexOf:function indexOf(a){return ha(Ga(this),a,arguments.length>1?arguments[1]:c)},includes:function includes(a){return ga(Ga(this),a,arguments.length>1?arguments[1]:c)},join:function join(a){return oa.apply(Ga(this),arguments)},lastIndexOf:function lastIndexOf(a){ return la.apply(Ga(this),arguments)},map:function map(a){return Ba(Ga(this),a,arguments.length>1?arguments[1]:c)},reduce:function reduce(a){return ma.apply(Ga(this),arguments)},reduceRight:function reduceRight(a){return na.apply(Ga(this),arguments)},reverse:function reverse(){for(var a,b=this,c=Ga(b).length,d=Math.floor(c/2),e=0;e1?arguments[1]:c)},sort:function sort(a){return pa.call(Ga(this),a)},subarray:function subarray(a,b){var d=Ga(this),e=d.length,f=r(a,e);return new(H(d,d[wa]))(d.buffer,d.byteOffset+f*d.BYTES_PER_ELEMENT,q((b===c?e:r(b,e))-f))}},Qa=function slice(a,b){return Ia(this,qa.call(Ga(this),a,b))},Ra=function set(a){Ga(this);var b=Fa(arguments[1],1),c=this.length,d=x(a),e=q(d.length),f=0;if(e+b>c)throw S(Aa);for(;f255?255:255&d),e.v[p](c*b+e.o,d,Ca)},E=function(a,b){Q(a,b,{get:function(){return C(this,b)},set:function(a){return D(this,b,a)},enumerable:!0})};u?(r=d(function(a,d,e,f){l(a,r,k,"_d");var g,h,i,j,m=0,o=0;if(w(d)){if(!(d instanceof $||(j=v(d))==V||j==W))return ya in d?Ja(r,d):La.call(r,d);g=d,o=Fa(e,b);var p=d.byteLength;if(f===c){if(p%b)throw S(Aa);if(h=p-o,h<0)throw S(Aa)}else if(h=q(f)*b,h+o>p)throw S(Aa);i=h/b}else i=Ea(d,!0),h=i*b,g=new $(h);for(n(a,"_d",{b:g,o:o,l:h,e:i,v:new _(g)});m1?arguments[1]:c)}}),d(178)("includes")},function(a,b,c){var d=c(6),e=c(125)(!0);d(d.P,"String",{at:function at(a){return e(this,a)}})},function(a,b,d){var e=d(6),f=d(248);e(e.P,"String",{padStart:function padStart(a){return f(this,a,arguments.length>1?arguments[1]:c,!0)}})},function(a,b,d){var e=d(35),f=d(85),g=d(33);a.exports=function(a,b,d,h){var i=String(g(a)),j=i.length,k=d===c?" ":String(d),l=e(b);if(l<=j||""==k)return i;var m=l-j,n=f.call(k,Math.ceil(m/k.length));return n.length>m&&(n=n.slice(0,m)),h?n+i:i+n}},function(a,b,d){var e=d(6),f=d(248);e(e.P,"String",{padEnd:function padEnd(a){return f(this,a,arguments.length>1?arguments[1]:c,!1)}})},function(a,b,c){c(81)("trimLeft",function(a){return function trimLeft(){return a(this,1)}},"trimStart")},function(a,b,c){c(81)("trimRight",function(a){return function trimRight(){return a(this,2)}},"trimEnd")},function(a,b,c){var d=c(6),e=c(33),f=c(35),g=c(128),h=c(188),i=RegExp.prototype,j=function(a,b){this._r=a,this._s=b};c(136)(j,"RegExp String",function next(){var a=this._r.exec(this._s);return{value:a,done:null===a}}),d(d.P,"String",{matchAll:function matchAll(a){if(e(this),!g(a))throw TypeError(a+" is not a regexp!");var b=String(this),c="flags"in i?String(a.flags):h.call(a),d=new RegExp(a.source,~c.indexOf("g")?c:"g"+c);return d.lastIndex=f(a.lastIndex),new j(d,b)}})},function(a,b,c){c(25)("asyncIterator")},function(a,b,c){c(25)("observable")},function(a,b,c){var d=c(6),e=c(221),f=c(30),g=c(49),h=c(155);d(d.S,"Object",{getOwnPropertyDescriptors:function getOwnPropertyDescriptors(a){for(var b,c=f(a),d=g.f,i=e(c),j={},k=0;i.length>k;)h(j,b=i[k++],d(c,b));return j}})},function(a,b,c){var d=c(6),e=c(257)(!1);d(d.S,"Object",{values:function values(a){return e(a)}})},function(a,b,c){var d=c(28),e=c(30),f=c(42).f;a.exports=function(a){return function(b){for(var c,g=e(b),h=d(g),i=h.length,j=0,k=[];i>j;)f.call(g,c=h[j++])&&k.push(a?[c,g[c]]:g[c]);return k}}},function(a,b,c){var d=c(6),e=c(257)(!0);d(d.S,"Object",{entries:function entries(a){return e(a)}})},function(a,b,c){var d=c(6),e=c(56),f=c(19),g=c(9);c(4)&&d(d.P+c(260),"Object",{__defineGetter__:function __defineGetter__(a,b){g.f(e(this),a,{get:f(b),enumerable:!0,configurable:!0})}})},function(a,b,c){a.exports=c(26)||!c(5)(function(){var a=Math.random();__defineSetter__.call(null,a,function(){}),delete c(2)[a]})},function(a,b,c){var d=c(6),e=c(56),f=c(19),g=c(9);c(4)&&d(d.P+c(260),"Object",{__defineSetter__:function __defineSetter__(a,b){g.f(e(this),a,{set:f(b),enumerable:!0,configurable:!0})}})},function(a,b,c){var d=c(6),e=c(56),f=c(14),g=c(57),h=c(49).f;c(4)&&d(d.P+c(260),"Object",{__lookupGetter__:function __lookupGetter__(a){var b,c=e(this),d=f(a,!0);do if(b=h(c,d))return b.get;while(c=g(c))}})},function(a,b,c){var d=c(6),e=c(56),f=c(14),g=c(57),h=c(49).f;c(4)&&d(d.P+c(260),"Object",{__lookupSetter__:function __lookupSetter__(a){var b,c=e(this),d=f(a,!0);do if(b=h(c,d))return b.set;while(c=g(c))}})},function(a,b,c){var d=c(6);d(d.P+d.R,"Map",{toJSON:c(265)("Map")})},function(a,b,c){var d=c(73),e=c(266);a.exports=function(a){return function toJSON(){if(d(this)!=a)throw TypeError(a+"#toJSON isn't generic");return e(this)}}},function(a,b,c){var d=c(198);a.exports=function(a,b){var c=[];return d(a,!1,c.push,c,b),c}},function(a,b,c){var d=c(6);d(d.P+d.R,"Set",{toJSON:c(265)("Set")})},function(a,b,c){var d=c(6);d(d.S,"System",{global:c(2)})},function(a,b,c){var d=c(6),e=c(32);d(d.S,"Error",{isError:function isError(a){return"Error"===e(a)}})},function(a,b,c){var d=c(6);d(d.S,"Math",{iaddh:function iaddh(a,b,c,d){var e=a>>>0,f=b>>>0,g=c>>>0;return f+(d>>>0)+((e&g|(e|g)&~(e+g>>>0))>>>31)|0}})},function(a,b,c){var d=c(6);d(d.S,"Math",{isubh:function isubh(a,b,c,d){var e=a>>>0,f=b>>>0,g=c>>>0;return f-(d>>>0)-((~e&g|~(e^g)&e-g>>>0)>>>31)|0}})},function(a,b,c){var d=c(6);d(d.S,"Math",{imulh:function imulh(a,b){var c=65535,d=+a,e=+b,f=d&c,g=e&c,h=d>>16,i=e>>16,j=(h*g>>>0)+(f*g>>>16);return h*i+(j>>16)+((f*i>>>0)+(j&c)>>16)}})},function(a,b,c){var d=c(6);d(d.S,"Math",{umulh:function umulh(a,b){var c=65535,d=+a,e=+b,f=d&c,g=e&c,h=d>>>16,i=e>>>16,j=(h*g>>>0)+(f*g>>>16);return h*i+(j>>>16)+((f*i>>>0)+(j&c)>>>16)}})},function(a,b,c){var d=c(275),e=c(10),f=d.key,g=d.set;d.exp({defineMetadata:function defineMetadata(a,b,c,d){g(a,b,e(c),f(d))}})},function(a,b,d){var e=d(203),f=d(6),g=d(21)("metadata"),h=g.store||(g.store=new(d(207))),i=function(a,b,d){var f=h.get(a);if(!f){if(!d)return c;h.set(a,f=new e)}var g=f.get(b);if(!g){if(!d)return c;f.set(b,g=new e)}return g},j=function(a,b,d){var e=i(b,d,!1);return e!==c&&e.has(a)},k=function(a,b,d){var e=i(b,d,!1);return e===c?c:e.get(a)},l=function(a,b,c,d){i(c,d,!0).set(a,b)},m=function(a,b){var c=i(a,b,!1),d=[];return c&&c.forEach(function(a,b){d.push(b)}),d},n=function(a){return a===c||"symbol"==typeof a?a:String(a)},o=function(a){f(f.S,"Reflect",a)};a.exports={store:h,map:i,has:j,get:k,set:l,keys:m,key:n,exp:o}},function(a,b,d){var e=d(275),f=d(10),g=e.key,h=e.map,i=e.store;e.exp({deleteMetadata:function deleteMetadata(a,b){var d=arguments.length<3?c:g(arguments[2]),e=h(f(b),d,!1);if(e===c||!e["delete"](a))return!1;if(e.size)return!0;var j=i.get(b);return j["delete"](d),!!j.size||i["delete"](b)}})},function(a,b,d){var e=d(275),f=d(10),g=d(57),h=e.has,i=e.get,j=e.key,k=function(a,b,d){var e=h(a,b,d);if(e)return i(a,b,d);var f=g(b);return null!==f?k(a,f,d):c};e.exp({getMetadata:function getMetadata(a,b){return k(a,f(b),arguments.length<3?c:j(arguments[2]))}})},function(a,b,d){var e=d(206),f=d(266),g=d(275),h=d(10),i=d(57),j=g.keys,k=g.key,l=function(a,b){var c=j(a,b),d=i(a);if(null===d)return c;var g=l(d,b);return g.length?c.length?f(new e(c.concat(g))):g:c};g.exp({getMetadataKeys:function getMetadataKeys(a){return l(h(a),arguments.length<2?c:k(arguments[1]))}})},function(a,b,d){var e=d(275),f=d(10),g=e.get,h=e.key;e.exp({getOwnMetadata:function getOwnMetadata(a,b){return g(a,f(b),arguments.length<3?c:h(arguments[2]))}})},function(a,b,d){var e=d(275),f=d(10),g=e.keys,h=e.key;e.exp({getOwnMetadataKeys:function getOwnMetadataKeys(a){return g(f(a),arguments.length<2?c:h(arguments[1]))}})},function(a,b,d){var e=d(275),f=d(10),g=d(57),h=e.has,i=e.key,j=function(a,b,c){var d=h(a,b,c);if(d)return!0;var e=g(b);return null!==e&&j(a,e,c)};e.exp({hasMetadata:function hasMetadata(a,b){return j(a,f(b),arguments.length<3?c:i(arguments[2]))}})},function(a,b,d){var e=d(275),f=d(10),g=e.has,h=e.key;e.exp({hasOwnMetadata:function hasOwnMetadata(a,b){return g(a,f(b),arguments.length<3?c:h(arguments[2]))}})},function(a,b,d){var e=d(275),f=d(10),g=d(19),h=e.key,i=e.set;e.exp({metadata:function metadata(a,b){return function decorator(d,e){i(a,b,(e!==c?f:g)(d),h(e))}}})},function(a,b,c){var d=c(6),e=c(201)(),f=c(2).process,g="process"==c(32)(f);d(d.G,{asap:function asap(a){var b=g&&f.domain;e(b?b.bind(a):a)}})},function(a,b,d){var e=d(6),f=d(2),g=d(7),h=d(201)(),i=d(23)("observable"),j=d(19),k=d(10),l=d(197),m=d(202),n=d(8),o=d(198),p=o.RETURN,q=function(a){return null==a?c:j(a)},r=function(a){var b=a._c;b&&(a._c=c,b())},s=function(a){return a._o===c},t=function(a){s(a)||(a._o=c,r(a))},u=function(a,b){k(a),this._c=c,this._o=a,a=new v(this);try{var d=b(a),e=d;null!=d&&("function"==typeof d.unsubscribe?d=function(){e.unsubscribe()}:j(d),this._c=d)}catch(f){return void a.error(f)}s(this)&&r(this)};u.prototype=m({},{unsubscribe:function unsubscribe(){t(this)}});var v=function(a){this._s=a};v.prototype=m({},{next:function next(a){var b=this._s;if(!s(b)){var c=b._o;try{var d=q(c.next);if(d)return d.call(c,a)}catch(e){try{t(b)}finally{throw e}}}},error:function error(a){var b=this._s;if(s(b))throw a;var d=b._o;b._o=c;try{var e=q(d.error);if(!e)throw a;a=e.call(d,a)}catch(f){try{r(b)}finally{throw f}}return r(b),a},complete:function complete(a){var b=this._s;if(!s(b)){var d=b._o;b._o=c;try{var e=q(d.complete);a=e?e.call(d,a):c}catch(f){try{r(b)}finally{throw f}}return r(b),a}}});var w=function Observable(a){l(this,w,"Observable","_f")._f=j(a)};m(w.prototype,{subscribe:function subscribe(a){return new u(a,this._f)},forEach:function forEach(a){var b=this;return new(g.Promise||f.Promise)(function(c,d){j(a);var e=b.subscribe({next:function(b){try{return a(b)}catch(c){d(c),e.unsubscribe()}},error:d,complete:c})})}}),m(w,{from:function from(a){var b="function"==typeof this?this:w,c=q(k(a)[i]);if(c){var d=k(c.call(a));return d.constructor===b?d:new b(function(a){return d.subscribe(a)})}return new b(function(b){var c=!1;return h(function(){if(!c){try{if(o(a,!1,function(a){if(b.next(a),c)return p})===p)return}catch(d){if(c)throw d;return void b.error(d)}b.complete()}}),function(){c=!0}})},of:function of(){for(var a=0,b=arguments.length,c=Array(b);ag;)(c[g]=arguments[g++])===h&&(i=!0);return function(){var d,f=this,g=arguments.length,j=0,k=0;if(!i&&!g)return e(a,c,f);if(d=c.slice(),i)for(;b>j;j++)d[j]===h&&(d[j]=arguments[k++]);for(;g>k;)d.push(arguments[k++]);return e(a,d,f)}}},function(a,b,c){a.exports=c(2)}]),"undefined"!=typeof module&&module.exports?module.exports=a:"function"==typeof define&&define.amd?define(function(){return a}):b.core=a}(1,1); //# sourceMappingURL=shim.min.js.mapcore-js-2.4.1/client/shim.min.js.map000066400000000000000000004144641274277553300172260ustar00rootroot00000000000000{"version":3,"sources":["shim.js"],"names":["__e","__g","undefined","modules","__webpack_require__","moduleId","installedModules","exports","module","id","loaded","call","m","c","p","global","has","DESCRIPTORS","$export","redefine","META","KEY","$fails","shared","setToStringTag","uid","wks","wksExt","wksDefine","keyOf","enumKeys","isArray","anObject","toIObject","toPrimitive","createDesc","_create","gOPNExt","$GOPD","$DP","$keys","gOPD","f","dP","gOPN","$Symbol","Symbol","$JSON","JSON","_stringify","stringify","PROTOTYPE","HIDDEN","TO_PRIMITIVE","isEnum","propertyIsEnumerable","SymbolRegistry","AllSymbols","OPSymbols","ObjectProto","Object","USE_NATIVE","QObject","setter","findChild","setSymbolDesc","get","this","value","a","it","key","D","protoDesc","wrap","tag","sym","_k","isSymbol","iterator","$defineProperty","defineProperty","enumerable","$defineProperties","defineProperties","P","keys","i","l","length","$create","create","$propertyIsEnumerable","E","$getOwnPropertyDescriptor","getOwnPropertyDescriptor","$getOwnPropertyNames","getOwnPropertyNames","names","result","push","$getOwnPropertySymbols","getOwnPropertySymbols","IS_OP","TypeError","arguments","$set","configurable","set","toString","name","G","W","F","symbols","split","store","S","for","keyFor","useSetter","useSimple","replacer","$replacer","args","apply","valueOf","Math","window","self","Function","hasOwnProperty","exec","e","core","hide","ctx","type","source","own","out","exp","IS_FORCED","IS_GLOBAL","IS_STATIC","IS_PROTO","IS_BIND","B","target","expProto","U","R","version","object","IE8_DOM_DEFINE","O","Attributes","isObject","document","is","createElement","fn","val","bitmap","writable","SRC","TO_STRING","$toString","TPL","inspectSource","safe","isFunction","join","String","prototype","px","random","concat","aFunction","that","b","setDesc","isExtensible","FREEZE","preventExtensions","setMeta","w","fastKey","getWeak","onFreeze","meta","NEED","SHARED","def","TAG","stat","USE_SYMBOL","$exports","LIBRARY","charAt","getKeys","el","index","enumBugKeys","arrayIndexOf","IE_PROTO","IObject","defined","cof","slice","toLength","toIndex","IS_INCLUDES","$this","fromIndex","toInteger","min","ceil","floor","isNaN","max","gOPS","pIE","getSymbols","Array","arg","dPs","Empty","createDict","iframeDocument","iframe","lt","gt","style","display","appendChild","src","contentWindow","open","write","close","Properties","documentElement","windowNames","getWindowNames","hiddenKeys","fails","toObject","$getPrototypeOf","getPrototypeOf","constructor","$freeze","freeze","$seal","seal","$preventExtensions","$isFrozen","isFrozen","$isSealed","isSealed","$isExtensible","assign","$assign","A","K","forEach","k","T","aLen","j","x","y","setPrototypeOf","check","proto","test","buggy","__proto__","classof","ARG","tryGet","callee","bind","invoke","arraySlice","factories","construct","len","n","partArgs","bound","un","FProto","nameRE","NAME","match","HAS_INSTANCE","FunctionProto","inheritIfRequired","$trim","trim","NUMBER","$Number","Base","BROKEN_COF","TRIM","toNumber","argument","third","radix","maxCode","first","charCodeAt","NaN","code","digits","parseInt","Number","C","spaces","space","non","ltrim","RegExp","rtrim","exporter","ALIAS","FORCE","string","TYPE","replace","aNumberValue","repeat","$toFixed","toFixed","data","ERROR","ZERO","multiply","c2","divide","numToString","s","t","pow","acc","log","x2","fractionDigits","z","RangeError","msg","count","str","res","Infinity","$toPrecision","toPrecision","precision","EPSILON","_isFinite","isFinite","isInteger","number","abs","isSafeInteger","MAX_SAFE_INTEGER","MIN_SAFE_INTEGER","$parseFloat","parseFloat","$parseInt","ws","hex","log1p","sqrt","$acosh","acosh","MAX_VALUE","LN2","asinh","$asinh","$atanh","atanh","sign","cbrt","clz32","LOG2E","cosh","$expm1","expm1","EPSILON32","MAX32","MIN32","roundTiesToEven","fround","$abs","$sign","hypot","value1","value2","div","sum","larg","$imul","imul","UINT16","xn","yn","xl","yl","log10","LN10","log2","sinh","tanh","trunc","fromCharCode","$fromCodePoint","fromCodePoint","raw","callSite","tpl","$at","codePointAt","pos","context","ENDS_WITH","$endsWith","endsWith","searchString","endPosition","end","search","isRegExp","MATCH","re","INCLUDES","includes","indexOf","STARTS_WITH","$startsWith","startsWith","iterated","_t","_i","point","done","Iterators","$iterCreate","ITERATOR","BUGGY","FF_ITERATOR","KEYS","VALUES","returnThis","Constructor","next","DEFAULT","IS_SET","FORCED","methods","IteratorPrototype","getMethod","kind","values","entries","DEF_VALUES","VALUES_BUG","$native","$default","$entries","$anyNative","descriptor","createHTML","anchor","quot","attribute","p1","toLowerCase","big","blink","bold","fixed","fontcolor","color","fontsize","size","italics","link","url","small","strike","sub","sup","isArrayIter","createProperty","getIterFn","iter","from","arrayLike","step","mapfn","mapping","iterFn","ret","ArrayProto","getIteratorMethod","SAFE_CLOSING","riter","skipClosing","arr","of","arrayJoin","separator","method","html","begin","klass","start","upTo","cloned","$sort","sort","comparefn","$forEach","STRICT","callbackfn","asc","IS_MAP","IS_FILTER","IS_SOME","IS_EVERY","IS_FIND_INDEX","NO_HOLES","speciesConstructor","original","SPECIES","$map","map","$filter","filter","$some","some","$every","every","$reduce","reduce","memo","isRight","reduceRight","$indexOf","NEGATIVE_ZERO","searchElement","lastIndexOf","copyWithin","to","inc","UNSCOPABLES","fill","endPos","$find","forced","find","findIndex","addToUnscopables","Arguments","$flags","$RegExp","re1","re2","CORRECT_NEW","tiRE","piRE","fiU","proxy","ignoreCase","multiline","unicode","sticky","define","flags","$match","regexp","SYMBOL","fns","strfn","rxfn","REPLACE","$replace","searchValue","replaceValue","SEARCH","$search","SPLIT","$split","_split","$push","$SPLIT","LENGTH","LAST_INDEX","NPCG","limit","separator2","lastIndex","lastLength","output","lastLastIndex","splitLimit","separatorCopy","Internal","GenericPromiseCapability","Wrapper","anInstance","forOf","task","microtask","PROMISE","process","$Promise","isNode","empty","promise","resolve","FakePromise","PromiseRejectionEvent","then","sameConstructor","isThenable","newPromiseCapability","PromiseCapability","reject","$$resolve","$$reject","perform","error","notify","isReject","_n","chain","_c","_v","ok","_s","run","reaction","handler","fail","domain","_h","onHandleUnhandled","enter","exit","onUnhandled","abrupt","console","isUnhandled","emit","onunhandledrejection","reason","_a","onrejectionhandled","$reject","_d","_w","$resolve","wrapper","Promise","executor","err","onFulfilled","onRejected","catch","r","capability","all","iterable","remaining","$index","alreadyCalled","race","forbiddenField","BREAK","RETURN","defer","channel","port","cel","setTask","setImmediate","clearTask","clearImmediate","MessageChannel","counter","queue","ONREADYSTATECHANGE","listener","event","nextTick","port2","port1","onmessage","postMessage","addEventListener","importScripts","removeChild","setTimeout","clear","macrotask","Observer","MutationObserver","WebKitMutationObserver","head","last","flush","parent","toggle","node","createTextNode","observe","characterData","strong","Map","entry","getEntry","v","redefineAll","$iterDefine","setSpecies","SIZE","_f","getConstructor","ADDER","_l","delete","prev","setStrong","$iterDetect","common","IS_WEAK","fixMethod","add","instance","HASNT_CHAINING","THROWS_ON_PRIMITIVES","ACCEPT_ITERABLES","BUGGY_ZERO","$instance","Set","InternalMap","each","weak","uncaughtFrozenStore","ufstore","tmp","WeakMap","$WeakMap","createArrayMethod","$has","arrayFind","arrayFindIndex","UncaughtFrozenStore","findUncaughtFrozen","splice","WeakSet","rApply","Reflect","fApply","thisArgument","argumentsList","L","rConstruct","NEW_TARGET_BUG","ARGS_BUG","Target","newTarget","$args","propertyKey","attributes","deleteProperty","desc","Enumerate","enumerate","receiver","getProto","ownKeys","V","existingDescriptor","ownDesc","setProto","now","Date","getTime","toJSON","toISOString","pv","lz","num","d","getUTCFullYear","getUTCMilliseconds","getUTCMonth","getUTCDate","getUTCHours","getUTCMinutes","getUTCSeconds","DateProto","INVALID_DATE","hint","$typed","buffer","ArrayBuffer","$ArrayBuffer","$DataView","DataView","$isView","ABV","isView","$slice","VIEW","ARRAY_BUFFER","CONSTR","byteLength","final","viewS","viewT","setUint8","getUint8","Typed","TYPED","TypedArrayConstructors","arrayFill","DATA_VIEW","WRONG_LENGTH","WRONG_INDEX","BaseBuffer","BUFFER","BYTE_LENGTH","BYTE_OFFSET","$BUFFER","$LENGTH","$OFFSET","packIEEE754","mLen","nBytes","eLen","eMax","eBias","rt","unpackIEEE754","nBits","unpackI32","bytes","packI8","packI16","packI32","packF64","packF32","addGetter","internal","view","isLittleEndian","numIndex","intIndex","_b","pack","reverse","conversion","validateArrayBufferArguments","numberLength","ArrayBufferProto","$setInt8","setInt8","getInt8","byteOffset","bufferLength","offset","getInt16","getUint16","getInt32","getUint32","getFloat32","getFloat64","setInt16","setUint16","setInt32","setUint32","setFloat32","setFloat64","init","Int8Array","$buffer","propertyDesc","same","createArrayIncludes","ArrayIterators","arrayCopyWithin","Uint8Array","SHARED_BUFFER","BYTES_PER_ELEMENT","arrayForEach","arrayFilter","arraySome","arrayEvery","arrayIncludes","arrayValues","arrayKeys","arrayEntries","arrayLastIndexOf","arrayReduce","arrayReduceRight","arraySort","arrayToString","arrayToLocaleString","toLocaleString","TYPED_CONSTRUCTOR","DEF_CONSTRUCTOR","ALL_CONSTRUCTORS","TYPED_ARRAY","allocate","LITTLE_ENDIAN","Uint16Array","FORCED_SET","strictToLength","SAME","toOffset","BYTES","validate","speciesFromList","list","fromList","$from","$of","TO_LOCALE_BUG","$toLocaleString","predicate","middle","subarray","$begin","$iterators","isTAIndex","$getDesc","$setDesc","$TypedArrayPrototype$","CLAMPED","ISNT_UINT8","GETTER","SETTER","TypedArray","TAC","TypedArrayPrototype","getter","o","round","addElement","$offset","$length","$len","$nativeIterator","CORRECT_ITER_NAME","$iterator","Uint8ClampedArray","Int16Array","Int32Array","Uint32Array","Float32Array","Float64Array","$includes","at","$pad","padStart","maxLength","fillString","left","stringLength","fillStr","intMaxLength","fillLen","stringFiller","padEnd","trimLeft","trimRight","getFlags","RegExpProto","$RegExpStringIterator","_r","matchAll","rx","getOwnPropertyDescriptors","getDesc","$values","isEntries","__defineGetter__","__defineSetter__","__lookupGetter__","__lookupSetter__","isError","iaddh","x0","x1","y0","y1","$x0","$x1","$y0","isubh","imulh","u","$u","$v","u0","v0","u1","v1","umulh","metadata","toMetaKey","ordinaryDefineOwnMetadata","defineMetadata","metadataKey","metadataValue","targetKey","getOrCreateMetadataMap","targetMetadata","keyMetadata","ordinaryHasOwnMetadata","MetadataKey","metadataMap","ordinaryGetOwnMetadata","MetadataValue","ordinaryOwnMetadataKeys","_","deleteMetadata","ordinaryGetMetadata","hasOwn","getMetadata","ordinaryMetadataKeys","oKeys","pKeys","getMetadataKeys","getOwnMetadata","getOwnMetadataKeys","ordinaryHasMetadata","hasMetadata","hasOwnMetadata","decorator","asap","OBSERVABLE","cleanupSubscription","subscription","cleanup","subscriptionClosed","_o","closeSubscription","Subscription","observer","subscriber","SubscriptionObserver","unsubscribe","complete","$Observable","Observable","subscribe","observable","items","$task","TO_STRING_TAG","ArrayValues","collections","Collection","partial","navigator","MSIE","userAgent","time","setInterval","path","pargs","holder","amd"],"mappings":";;;;;;CAMC,SAASA,EAAKC,EAAKC,GACpB,cACS,SAAUC,GAKT,QAASC,qBAAoBC,GAG5B,GAA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AASH,GAE/BI,EAAOD,QAAUH,EAAoB,MAKlB,mBAAVI,SAAyBA,OAAOD,QAAQC,OAAOD,QAAUP,EAE1C,kBAAVmkB,SAAwBA,OAAOmf,IAAInf,OAAO,WAAW,MAAOnkB,KAEtEC,EAAIqI,KAAOtI,GACd,EAAG","file":"shim.min.js"}core-js-2.4.1/core/000077500000000000000000000000001274277553300140275ustar00rootroot00000000000000core-js-2.4.1/core/_.js000066400000000000000000000001311274277553300145760ustar00rootroot00000000000000require('../modules/core.function.part'); module.exports = require('../modules/_core')._;core-js-2.4.1/core/delay.js000066400000000000000000000001261274277553300154620ustar00rootroot00000000000000require('../modules/core.delay'); module.exports = require('../modules/_core').delay; core-js-2.4.1/core/dict.js000066400000000000000000000001231274277553300153040ustar00rootroot00000000000000require('../modules/core.dict'); module.exports = require('../modules/_core').Dict;core-js-2.4.1/core/function.js000066400000000000000000000001411274277553300162060ustar00rootroot00000000000000require('../modules/core.function.part'); module.exports = require('../modules/_core').Function; core-js-2.4.1/core/index.js000066400000000000000000000011741274277553300154770ustar00rootroot00000000000000require('../modules/core.dict'); require('../modules/core.get-iterator-method'); require('../modules/core.get-iterator'); require('../modules/core.is-iterable'); require('../modules/core.delay'); require('../modules/core.function.part'); require('../modules/core.object.is-object'); require('../modules/core.object.classof'); require('../modules/core.object.define'); require('../modules/core.object.make'); require('../modules/core.number.iterator'); require('../modules/core.regexp.escape'); require('../modules/core.string.escape-html'); require('../modules/core.string.unescape-html'); module.exports = require('../modules/_core'); core-js-2.4.1/core/number.js000066400000000000000000000001401274277553300156500ustar00rootroot00000000000000require('../modules/core.number.iterator'); module.exports = require('../modules/_core').Number;core-js-2.4.1/core/object.js000066400000000000000000000003371274277553300156360ustar00rootroot00000000000000require('../modules/core.object.is-object'); require('../modules/core.object.classof'); require('../modules/core.object.define'); require('../modules/core.object.make'); module.exports = require('../modules/_core').Object; core-js-2.4.1/core/regexp.js000066400000000000000000000001361274277553300156570ustar00rootroot00000000000000require('../modules/core.regexp.escape'); module.exports = require('../modules/_core').RegExp;core-js-2.4.1/core/string.js000066400000000000000000000002241274277553300156710ustar00rootroot00000000000000require('../modules/core.string.escape-html'); require('../modules/core.string.unescape-html'); module.exports = require('../modules/_core').String;core-js-2.4.1/es5/000077500000000000000000000000001274277553300135735ustar00rootroot00000000000000core-js-2.4.1/es5/index.js000066400000000000000000000031061274277553300152400ustar00rootroot00000000000000require('../modules/es6.object.create'); require('../modules/es6.object.define-property'); require('../modules/es6.object.define-properties'); require('../modules/es6.object.get-own-property-descriptor'); require('../modules/es6.object.get-prototype-of'); require('../modules/es6.object.keys'); require('../modules/es6.object.get-own-property-names'); require('../modules/es6.object.freeze'); require('../modules/es6.object.seal'); require('../modules/es6.object.prevent-extensions'); require('../modules/es6.object.is-frozen'); require('../modules/es6.object.is-sealed'); require('../modules/es6.object.is-extensible'); require('../modules/es6.function.bind'); require('../modules/es6.array.is-array'); require('../modules/es6.array.join'); require('../modules/es6.array.slice'); require('../modules/es6.array.sort'); require('../modules/es6.array.for-each'); require('../modules/es6.array.map'); require('../modules/es6.array.filter'); require('../modules/es6.array.some'); require('../modules/es6.array.every'); require('../modules/es6.array.reduce'); require('../modules/es6.array.reduce-right'); require('../modules/es6.array.index-of'); require('../modules/es6.array.last-index-of'); require('../modules/es6.number.to-fixed'); require('../modules/es6.number.to-precision'); require('../modules/es6.date.now'); require('../modules/es6.date.to-iso-string'); require('../modules/es6.date.to-json'); require('../modules/es6.parse-int'); require('../modules/es6.parse-float'); require('../modules/es6.string.trim'); require('../modules/es6.regexp.to-string'); module.exports = require('../modules/_core');core-js-2.4.1/es6/000077500000000000000000000000001274277553300135745ustar00rootroot00000000000000core-js-2.4.1/es6/array.js000066400000000000000000000016601274277553300152530ustar00rootroot00000000000000require('../modules/es6.string.iterator'); require('../modules/es6.array.is-array'); require('../modules/es6.array.from'); require('../modules/es6.array.of'); require('../modules/es6.array.join'); require('../modules/es6.array.slice'); require('../modules/es6.array.sort'); require('../modules/es6.array.for-each'); require('../modules/es6.array.map'); require('../modules/es6.array.filter'); require('../modules/es6.array.some'); require('../modules/es6.array.every'); require('../modules/es6.array.reduce'); require('../modules/es6.array.reduce-right'); require('../modules/es6.array.index-of'); require('../modules/es6.array.last-index-of'); require('../modules/es6.array.copy-within'); require('../modules/es6.array.fill'); require('../modules/es6.array.find'); require('../modules/es6.array.find-index'); require('../modules/es6.array.species'); require('../modules/es6.array.iterator'); module.exports = require('../modules/_core').Array;core-js-2.4.1/es6/date.js000066400000000000000000000003471274277553300150530ustar00rootroot00000000000000require('../modules/es6.date.now'); require('../modules/es6.date.to-json'); require('../modules/es6.date.to-iso-string'); require('../modules/es6.date.to-string'); require('../modules/es6.date.to-primitive'); module.exports = Date;core-js-2.4.1/es6/function.js000066400000000000000000000002711274277553300157570ustar00rootroot00000000000000require('../modules/es6.function.bind'); require('../modules/es6.function.name'); require('../modules/es6.function.has-instance'); module.exports = require('../modules/_core').Function;core-js-2.4.1/es6/index.js000066400000000000000000000133651274277553300152510ustar00rootroot00000000000000require('../modules/es6.symbol'); require('../modules/es6.object.create'); require('../modules/es6.object.define-property'); require('../modules/es6.object.define-properties'); require('../modules/es6.object.get-own-property-descriptor'); require('../modules/es6.object.get-prototype-of'); require('../modules/es6.object.keys'); require('../modules/es6.object.get-own-property-names'); require('../modules/es6.object.freeze'); require('../modules/es6.object.seal'); require('../modules/es6.object.prevent-extensions'); require('../modules/es6.object.is-frozen'); require('../modules/es6.object.is-sealed'); require('../modules/es6.object.is-extensible'); require('../modules/es6.object.assign'); require('../modules/es6.object.is'); require('../modules/es6.object.set-prototype-of'); require('../modules/es6.object.to-string'); require('../modules/es6.function.bind'); require('../modules/es6.function.name'); require('../modules/es6.function.has-instance'); require('../modules/es6.parse-int'); require('../modules/es6.parse-float'); require('../modules/es6.number.constructor'); require('../modules/es6.number.to-fixed'); require('../modules/es6.number.to-precision'); require('../modules/es6.number.epsilon'); require('../modules/es6.number.is-finite'); require('../modules/es6.number.is-integer'); require('../modules/es6.number.is-nan'); require('../modules/es6.number.is-safe-integer'); require('../modules/es6.number.max-safe-integer'); require('../modules/es6.number.min-safe-integer'); require('../modules/es6.number.parse-float'); require('../modules/es6.number.parse-int'); require('../modules/es6.math.acosh'); require('../modules/es6.math.asinh'); require('../modules/es6.math.atanh'); require('../modules/es6.math.cbrt'); require('../modules/es6.math.clz32'); require('../modules/es6.math.cosh'); require('../modules/es6.math.expm1'); require('../modules/es6.math.fround'); require('../modules/es6.math.hypot'); require('../modules/es6.math.imul'); require('../modules/es6.math.log10'); require('../modules/es6.math.log1p'); require('../modules/es6.math.log2'); require('../modules/es6.math.sign'); require('../modules/es6.math.sinh'); require('../modules/es6.math.tanh'); require('../modules/es6.math.trunc'); require('../modules/es6.string.from-code-point'); require('../modules/es6.string.raw'); require('../modules/es6.string.trim'); require('../modules/es6.string.iterator'); require('../modules/es6.string.code-point-at'); require('../modules/es6.string.ends-with'); require('../modules/es6.string.includes'); require('../modules/es6.string.repeat'); require('../modules/es6.string.starts-with'); require('../modules/es6.string.anchor'); require('../modules/es6.string.big'); require('../modules/es6.string.blink'); require('../modules/es6.string.bold'); require('../modules/es6.string.fixed'); require('../modules/es6.string.fontcolor'); require('../modules/es6.string.fontsize'); require('../modules/es6.string.italics'); require('../modules/es6.string.link'); require('../modules/es6.string.small'); require('../modules/es6.string.strike'); require('../modules/es6.string.sub'); require('../modules/es6.string.sup'); require('../modules/es6.date.now'); require('../modules/es6.date.to-json'); require('../modules/es6.date.to-iso-string'); require('../modules/es6.date.to-string'); require('../modules/es6.date.to-primitive'); require('../modules/es6.array.is-array'); require('../modules/es6.array.from'); require('../modules/es6.array.of'); require('../modules/es6.array.join'); require('../modules/es6.array.slice'); require('../modules/es6.array.sort'); require('../modules/es6.array.for-each'); require('../modules/es6.array.map'); require('../modules/es6.array.filter'); require('../modules/es6.array.some'); require('../modules/es6.array.every'); require('../modules/es6.array.reduce'); require('../modules/es6.array.reduce-right'); require('../modules/es6.array.index-of'); require('../modules/es6.array.last-index-of'); require('../modules/es6.array.copy-within'); require('../modules/es6.array.fill'); require('../modules/es6.array.find'); require('../modules/es6.array.find-index'); require('../modules/es6.array.species'); require('../modules/es6.array.iterator'); require('../modules/es6.regexp.constructor'); require('../modules/es6.regexp.to-string'); require('../modules/es6.regexp.flags'); require('../modules/es6.regexp.match'); require('../modules/es6.regexp.replace'); require('../modules/es6.regexp.search'); require('../modules/es6.regexp.split'); require('../modules/es6.promise'); require('../modules/es6.map'); require('../modules/es6.set'); require('../modules/es6.weak-map'); require('../modules/es6.weak-set'); require('../modules/es6.typed.array-buffer'); require('../modules/es6.typed.data-view'); require('../modules/es6.typed.int8-array'); require('../modules/es6.typed.uint8-array'); require('../modules/es6.typed.uint8-clamped-array'); require('../modules/es6.typed.int16-array'); require('../modules/es6.typed.uint16-array'); require('../modules/es6.typed.int32-array'); require('../modules/es6.typed.uint32-array'); require('../modules/es6.typed.float32-array'); require('../modules/es6.typed.float64-array'); require('../modules/es6.reflect.apply'); require('../modules/es6.reflect.construct'); require('../modules/es6.reflect.define-property'); require('../modules/es6.reflect.delete-property'); require('../modules/es6.reflect.enumerate'); require('../modules/es6.reflect.get'); require('../modules/es6.reflect.get-own-property-descriptor'); require('../modules/es6.reflect.get-prototype-of'); require('../modules/es6.reflect.has'); require('../modules/es6.reflect.is-extensible'); require('../modules/es6.reflect.own-keys'); require('../modules/es6.reflect.prevent-extensions'); require('../modules/es6.reflect.set'); require('../modules/es6.reflect.set-prototype-of'); module.exports = require('../modules/_core');core-js-2.4.1/es6/map.js000066400000000000000000000003171274277553300147100ustar00rootroot00000000000000require('../modules/es6.object.to-string'); require('../modules/es6.string.iterator'); require('../modules/web.dom.iterable'); require('../modules/es6.map'); module.exports = require('../modules/_core').Map;core-js-2.4.1/es6/math.js000066400000000000000000000012621274277553300150640ustar00rootroot00000000000000require('../modules/es6.math.acosh'); require('../modules/es6.math.asinh'); require('../modules/es6.math.atanh'); require('../modules/es6.math.cbrt'); require('../modules/es6.math.clz32'); require('../modules/es6.math.cosh'); require('../modules/es6.math.expm1'); require('../modules/es6.math.fround'); require('../modules/es6.math.hypot'); require('../modules/es6.math.imul'); require('../modules/es6.math.log10'); require('../modules/es6.math.log1p'); require('../modules/es6.math.log2'); require('../modules/es6.math.sign'); require('../modules/es6.math.sinh'); require('../modules/es6.math.tanh'); require('../modules/es6.math.trunc'); module.exports = require('../modules/_core').Math;core-js-2.4.1/es6/number.js000066400000000000000000000011321274277553300154170ustar00rootroot00000000000000require('../modules/es6.number.constructor'); require('../modules/es6.number.to-fixed'); require('../modules/es6.number.to-precision'); require('../modules/es6.number.epsilon'); require('../modules/es6.number.is-finite'); require('../modules/es6.number.is-integer'); require('../modules/es6.number.is-nan'); require('../modules/es6.number.is-safe-integer'); require('../modules/es6.number.max-safe-integer'); require('../modules/es6.number.min-safe-integer'); require('../modules/es6.number.parse-float'); require('../modules/es6.number.parse-int'); module.exports = require('../modules/_core').Number;core-js-2.4.1/es6/object.js000066400000000000000000000015611274277553300154030ustar00rootroot00000000000000require('../modules/es6.symbol'); require('../modules/es6.object.create'); require('../modules/es6.object.define-property'); require('../modules/es6.object.define-properties'); require('../modules/es6.object.get-own-property-descriptor'); require('../modules/es6.object.get-prototype-of'); require('../modules/es6.object.keys'); require('../modules/es6.object.get-own-property-names'); require('../modules/es6.object.freeze'); require('../modules/es6.object.seal'); require('../modules/es6.object.prevent-extensions'); require('../modules/es6.object.is-frozen'); require('../modules/es6.object.is-sealed'); require('../modules/es6.object.is-extensible'); require('../modules/es6.object.assign'); require('../modules/es6.object.is'); require('../modules/es6.object.set-prototype-of'); require('../modules/es6.object.to-string'); module.exports = require('../modules/_core').Object;core-js-2.4.1/es6/parse-float.js000066400000000000000000000001371274277553300163500ustar00rootroot00000000000000require('../modules/es6.parse-float'); module.exports = require('../modules/_core').parseFloat;core-js-2.4.1/es6/parse-int.js000066400000000000000000000001331274277553300160310ustar00rootroot00000000000000require('../modules/es6.parse-int'); module.exports = require('../modules/_core').parseInt;core-js-2.4.1/es6/promise.js000066400000000000000000000003271274277553300156120ustar00rootroot00000000000000require('../modules/es6.object.to-string'); require('../modules/es6.string.iterator'); require('../modules/web.dom.iterable'); require('../modules/es6.promise'); module.exports = require('../modules/_core').Promise;core-js-2.4.1/es6/reflect.js000066400000000000000000000013151274277553300155560ustar00rootroot00000000000000require('../modules/es6.reflect.apply'); require('../modules/es6.reflect.construct'); require('../modules/es6.reflect.define-property'); require('../modules/es6.reflect.delete-property'); require('../modules/es6.reflect.enumerate'); require('../modules/es6.reflect.get'); require('../modules/es6.reflect.get-own-property-descriptor'); require('../modules/es6.reflect.get-prototype-of'); require('../modules/es6.reflect.has'); require('../modules/es6.reflect.is-extensible'); require('../modules/es6.reflect.own-keys'); require('../modules/es6.reflect.prevent-extensions'); require('../modules/es6.reflect.set'); require('../modules/es6.reflect.set-prototype-of'); module.exports = require('../modules/_core').Reflect;core-js-2.4.1/es6/regexp.js000066400000000000000000000005311274277553300154230ustar00rootroot00000000000000require('../modules/es6.regexp.constructor'); require('../modules/es6.regexp.to-string'); require('../modules/es6.regexp.flags'); require('../modules/es6.regexp.match'); require('../modules/es6.regexp.replace'); require('../modules/es6.regexp.search'); require('../modules/es6.regexp.split'); module.exports = require('../modules/_core').RegExp;core-js-2.4.1/es6/set.js000066400000000000000000000003171274277553300147260ustar00rootroot00000000000000require('../modules/es6.object.to-string'); require('../modules/es6.string.iterator'); require('../modules/web.dom.iterable'); require('../modules/es6.set'); module.exports = require('../modules/_core').Set;core-js-2.4.1/es6/string.js000066400000000000000000000021521274277553300154400ustar00rootroot00000000000000require('../modules/es6.string.from-code-point'); require('../modules/es6.string.raw'); require('../modules/es6.string.trim'); require('../modules/es6.string.iterator'); require('../modules/es6.string.code-point-at'); require('../modules/es6.string.ends-with'); require('../modules/es6.string.includes'); require('../modules/es6.string.repeat'); require('../modules/es6.string.starts-with'); require('../modules/es6.string.anchor'); require('../modules/es6.string.big'); require('../modules/es6.string.blink'); require('../modules/es6.string.bold'); require('../modules/es6.string.fixed'); require('../modules/es6.string.fontcolor'); require('../modules/es6.string.fontsize'); require('../modules/es6.string.italics'); require('../modules/es6.string.link'); require('../modules/es6.string.small'); require('../modules/es6.string.strike'); require('../modules/es6.string.sub'); require('../modules/es6.string.sup'); require('../modules/es6.regexp.match'); require('../modules/es6.regexp.replace'); require('../modules/es6.regexp.search'); require('../modules/es6.regexp.split'); module.exports = require('../modules/_core').String;core-js-2.4.1/es6/symbol.js000066400000000000000000000002021274277553300154310ustar00rootroot00000000000000require('../modules/es6.symbol'); require('../modules/es6.object.to-string'); module.exports = require('../modules/_core').Symbol;core-js-2.4.1/es6/typed.js000066400000000000000000000011241274277553300152550ustar00rootroot00000000000000require('../modules/es6.typed.array-buffer'); require('../modules/es6.typed.data-view'); require('../modules/es6.typed.int8-array'); require('../modules/es6.typed.uint8-array'); require('../modules/es6.typed.uint8-clamped-array'); require('../modules/es6.typed.int16-array'); require('../modules/es6.typed.uint16-array'); require('../modules/es6.typed.int32-array'); require('../modules/es6.typed.uint32-array'); require('../modules/es6.typed.float32-array'); require('../modules/es6.typed.float64-array'); require('../modules/es6.object.to-string'); module.exports = require('../modules/_core');core-js-2.4.1/es6/weak-map.js000066400000000000000000000002571274277553300156400ustar00rootroot00000000000000require('../modules/es6.object.to-string'); require('../modules/es6.array.iterator'); require('../modules/es6.weak-map'); module.exports = require('../modules/_core').WeakMap;core-js-2.4.1/es6/weak-set.js000066400000000000000000000002551274277553300156540ustar00rootroot00000000000000require('../modules/es6.object.to-string'); require('../modules/web.dom.iterable'); require('../modules/es6.weak-set'); module.exports = require('../modules/_core').WeakSet;core-js-2.4.1/es7/000077500000000000000000000000001274277553300135755ustar00rootroot00000000000000core-js-2.4.1/es7/array.js000066400000000000000000000001351274277553300152500ustar00rootroot00000000000000require('../modules/es7.array.includes'); module.exports = require('../modules/_core').Array;core-js-2.4.1/es7/asap.js000066400000000000000000000001231274277553300150530ustar00rootroot00000000000000require('../modules/es7.asap'); module.exports = require('../modules/_core').asap; core-js-2.4.1/es7/error.js000066400000000000000000000001351274277553300152630ustar00rootroot00000000000000require('../modules/es7.error.is-error'); module.exports = require('../modules/_core').Error;core-js-2.4.1/es7/index.js000066400000000000000000000031171274277553300152440ustar00rootroot00000000000000require('../modules/es7.array.includes'); require('../modules/es7.string.at'); require('../modules/es7.string.pad-start'); require('../modules/es7.string.pad-end'); require('../modules/es7.string.trim-left'); require('../modules/es7.string.trim-right'); require('../modules/es7.string.match-all'); require('../modules/es7.symbol.async-iterator'); require('../modules/es7.symbol.observable'); require('../modules/es7.object.get-own-property-descriptors'); require('../modules/es7.object.values'); require('../modules/es7.object.entries'); require('../modules/es7.object.define-getter'); require('../modules/es7.object.define-setter'); require('../modules/es7.object.lookup-getter'); require('../modules/es7.object.lookup-setter'); require('../modules/es7.map.to-json'); require('../modules/es7.set.to-json'); require('../modules/es7.system.global'); require('../modules/es7.error.is-error'); require('../modules/es7.math.iaddh'); require('../modules/es7.math.isubh'); require('../modules/es7.math.imulh'); require('../modules/es7.math.umulh'); require('../modules/es7.reflect.define-metadata'); require('../modules/es7.reflect.delete-metadata'); require('../modules/es7.reflect.get-metadata'); require('../modules/es7.reflect.get-metadata-keys'); require('../modules/es7.reflect.get-own-metadata'); require('../modules/es7.reflect.get-own-metadata-keys'); require('../modules/es7.reflect.has-metadata'); require('../modules/es7.reflect.has-own-metadata'); require('../modules/es7.reflect.metadata'); require('../modules/es7.asap'); require('../modules/es7.observable'); module.exports = require('../modules/_core'); core-js-2.4.1/es7/map.js000066400000000000000000000001301274277553300147020ustar00rootroot00000000000000require('../modules/es7.map.to-json'); module.exports = require('../modules/_core').Map;core-js-2.4.1/es7/math.js000066400000000000000000000003131274277553300150610ustar00rootroot00000000000000require('../modules/es7.math.iaddh'); require('../modules/es7.math.isubh'); require('../modules/es7.math.imulh'); require('../modules/es7.math.umulh'); module.exports = require('../modules/_core').Math; core-js-2.4.1/es7/object.js000066400000000000000000000006061274277553300154030ustar00rootroot00000000000000require('../modules/es7.object.get-own-property-descriptors'); require('../modules/es7.object.values'); require('../modules/es7.object.entries'); require('../modules/es7.object.define-getter'); require('../modules/es7.object.define-setter'); require('../modules/es7.object.lookup-getter'); require('../modules/es7.object.lookup-setter'); module.exports = require('../modules/_core').Object;core-js-2.4.1/es7/observable.js000066400000000000000000000004551274277553300162630ustar00rootroot00000000000000require('../modules/es6.object.to-string'); require('../modules/es6.string.iterator'); require('../modules/web.dom.iterable'); require('../modules/es6.promise'); require('../modules/es7.symbol.observable'); require('../modules/es7.observable'); module.exports = require('../modules/_core').Observable;core-js-2.4.1/es7/reflect.js000066400000000000000000000007761274277553300155710ustar00rootroot00000000000000require('../modules/es7.reflect.define-metadata'); require('../modules/es7.reflect.delete-metadata'); require('../modules/es7.reflect.get-metadata'); require('../modules/es7.reflect.get-metadata-keys'); require('../modules/es7.reflect.get-own-metadata'); require('../modules/es7.reflect.get-own-metadata-keys'); require('../modules/es7.reflect.has-metadata'); require('../modules/es7.reflect.has-own-metadata'); require('../modules/es7.reflect.metadata'); module.exports = require('../modules/_core').Reflect; core-js-2.4.1/es7/set.js000066400000000000000000000001301274277553300147200ustar00rootroot00000000000000require('../modules/es7.set.to-json'); module.exports = require('../modules/_core').Set;core-js-2.4.1/es7/string.js000066400000000000000000000004651274277553300154460ustar00rootroot00000000000000require('../modules/es7.string.at'); require('../modules/es7.string.pad-start'); require('../modules/es7.string.pad-end'); require('../modules/es7.string.trim-left'); require('../modules/es7.string.trim-right'); require('../modules/es7.string.match-all'); module.exports = require('../modules/_core').String; core-js-2.4.1/es7/symbol.js000066400000000000000000000002221274277553300154340ustar00rootroot00000000000000require('../modules/es7.symbol.async-iterator'); require('../modules/es7.symbol.observable'); module.exports = require('../modules/_core').Symbol;core-js-2.4.1/es7/system.js000066400000000000000000000001351274277553300154560ustar00rootroot00000000000000require('../modules/es7.system.global'); module.exports = require('../modules/_core').System;core-js-2.4.1/fn/000077500000000000000000000000001274277553300135025ustar00rootroot00000000000000core-js-2.4.1/fn/_.js000066400000000000000000000001311274277553300142510ustar00rootroot00000000000000require('../modules/core.function.part'); module.exports = require('../modules/_core')._;core-js-2.4.1/fn/array/000077500000000000000000000000001274277553300146205ustar00rootroot00000000000000core-js-2.4.1/fn/array/concat.js000066400000000000000000000002061274277553300164230ustar00rootroot00000000000000// for a legacy code and future fixes module.exports = function(){ return Function.call.apply(Array.prototype.concat, arguments); };core-js-2.4.1/fn/array/copy-within.js000066400000000000000000000001611274277553300174260ustar00rootroot00000000000000require('../../modules/es6.array.copy-within'); module.exports = require('../../modules/_core').Array.copyWithin;core-js-2.4.1/fn/array/entries.js000066400000000000000000000001531274277553300166260ustar00rootroot00000000000000require('../../modules/es6.array.iterator'); module.exports = require('../../modules/_core').Array.entries;core-js-2.4.1/fn/array/every.js000066400000000000000000000001461274277553300163110ustar00rootroot00000000000000require('../../modules/es6.array.every'); module.exports = require('../../modules/_core').Array.every;core-js-2.4.1/fn/array/fill.js000066400000000000000000000001441274277553300161030ustar00rootroot00000000000000require('../../modules/es6.array.fill'); module.exports = require('../../modules/_core').Array.fill;core-js-2.4.1/fn/array/filter.js000066400000000000000000000001501274277553300164370ustar00rootroot00000000000000require('../../modules/es6.array.filter'); module.exports = require('../../modules/_core').Array.filter;core-js-2.4.1/fn/array/find-index.js000066400000000000000000000001571274277553300172060ustar00rootroot00000000000000require('../../modules/es6.array.find-index'); module.exports = require('../../modules/_core').Array.findIndex;core-js-2.4.1/fn/array/find.js000066400000000000000000000001441274277553300160750ustar00rootroot00000000000000require('../../modules/es6.array.find'); module.exports = require('../../modules/_core').Array.find;core-js-2.4.1/fn/array/for-each.js000066400000000000000000000001531274277553300166410ustar00rootroot00000000000000require('../../modules/es6.array.for-each'); module.exports = require('../../modules/_core').Array.forEach;core-js-2.4.1/fn/array/from.js000066400000000000000000000002221274277553300161150ustar00rootroot00000000000000require('../../modules/es6.string.iterator'); require('../../modules/es6.array.from'); module.exports = require('../../modules/_core').Array.from;core-js-2.4.1/fn/array/includes.js000066400000000000000000000001541274277553300167640ustar00rootroot00000000000000require('../../modules/es7.array.includes'); module.exports = require('../../modules/_core').Array.includes;core-js-2.4.1/fn/array/index-of.js000066400000000000000000000001531274277553300166660ustar00rootroot00000000000000require('../../modules/es6.array.index-of'); module.exports = require('../../modules/_core').Array.indexOf;core-js-2.4.1/fn/array/index.js000066400000000000000000000020421274277553300162630ustar00rootroot00000000000000require('../../modules/es6.string.iterator'); require('../../modules/es6.array.is-array'); require('../../modules/es6.array.from'); require('../../modules/es6.array.of'); require('../../modules/es6.array.join'); require('../../modules/es6.array.slice'); require('../../modules/es6.array.sort'); require('../../modules/es6.array.for-each'); require('../../modules/es6.array.map'); require('../../modules/es6.array.filter'); require('../../modules/es6.array.some'); require('../../modules/es6.array.every'); require('../../modules/es6.array.reduce'); require('../../modules/es6.array.reduce-right'); require('../../modules/es6.array.index-of'); require('../../modules/es6.array.last-index-of'); require('../../modules/es6.array.copy-within'); require('../../modules/es6.array.fill'); require('../../modules/es6.array.find'); require('../../modules/es6.array.find-index'); require('../../modules/es6.array.species'); require('../../modules/es6.array.iterator'); require('../../modules/es7.array.includes'); module.exports = require('../../modules/_core').Array;core-js-2.4.1/fn/array/is-array.js000066400000000000000000000001531274277553300167040ustar00rootroot00000000000000require('../../modules/es6.array.is-array'); module.exports = require('../../modules/_core').Array.isArray;core-js-2.4.1/fn/array/iterator.js000066400000000000000000000001521274277553300170050ustar00rootroot00000000000000require('../../modules/es6.array.iterator'); module.exports = require('../../modules/_core').Array.values;core-js-2.4.1/fn/array/join.js000066400000000000000000000001441274277553300161140ustar00rootroot00000000000000require('../../modules/es6.array.join'); module.exports = require('../../modules/_core').Array.join;core-js-2.4.1/fn/array/keys.js000066400000000000000000000001501274277553300161250ustar00rootroot00000000000000require('../../modules/es6.array.iterator'); module.exports = require('../../modules/_core').Array.keys;core-js-2.4.1/fn/array/last-index-of.js000066400000000000000000000001641274277553300176310ustar00rootroot00000000000000require('../../modules/es6.array.last-index-of'); module.exports = require('../../modules/_core').Array.lastIndexOf;core-js-2.4.1/fn/array/map.js000066400000000000000000000001421274277553300157300ustar00rootroot00000000000000require('../../modules/es6.array.map'); module.exports = require('../../modules/_core').Array.map;core-js-2.4.1/fn/array/of.js000066400000000000000000000001401274277553300155550ustar00rootroot00000000000000require('../../modules/es6.array.of'); module.exports = require('../../modules/_core').Array.of;core-js-2.4.1/fn/array/pop.js000066400000000000000000000002031274277553300157470ustar00rootroot00000000000000// for a legacy code and future fixes module.exports = function(){ return Function.call.apply(Array.prototype.pop, arguments); };core-js-2.4.1/fn/array/push.js000066400000000000000000000002041274277553300161310ustar00rootroot00000000000000// for a legacy code and future fixes module.exports = function(){ return Function.call.apply(Array.prototype.push, arguments); };core-js-2.4.1/fn/array/reduce-right.js000066400000000000000000000001631274277553300175400ustar00rootroot00000000000000require('../../modules/es6.array.reduce-right'); module.exports = require('../../modules/_core').Array.reduceRight;core-js-2.4.1/fn/array/reduce.js000066400000000000000000000001501274277553300164210ustar00rootroot00000000000000require('../../modules/es6.array.reduce'); module.exports = require('../../modules/_core').Array.reduce;core-js-2.4.1/fn/array/reverse.js000066400000000000000000000002071274277553300166300ustar00rootroot00000000000000// for a legacy code and future fixes module.exports = function(){ return Function.call.apply(Array.prototype.reverse, arguments); };core-js-2.4.1/fn/array/shift.js000066400000000000000000000002051274277553300162700ustar00rootroot00000000000000// for a legacy code and future fixes module.exports = function(){ return Function.call.apply(Array.prototype.shift, arguments); };core-js-2.4.1/fn/array/slice.js000066400000000000000000000001461274277553300162560ustar00rootroot00000000000000require('../../modules/es6.array.slice'); module.exports = require('../../modules/_core').Array.slice;core-js-2.4.1/fn/array/some.js000066400000000000000000000001441274277553300161200ustar00rootroot00000000000000require('../../modules/es6.array.some'); module.exports = require('../../modules/_core').Array.some;core-js-2.4.1/fn/array/sort.js000066400000000000000000000001441274277553300161440ustar00rootroot00000000000000require('../../modules/es6.array.sort'); module.exports = require('../../modules/_core').Array.sort;core-js-2.4.1/fn/array/splice.js000066400000000000000000000002061274277553300164330ustar00rootroot00000000000000// for a legacy code and future fixes module.exports = function(){ return Function.call.apply(Array.prototype.splice, arguments); };core-js-2.4.1/fn/array/unshift.js000066400000000000000000000002071274277553300166350ustar00rootroot00000000000000// for a legacy code and future fixes module.exports = function(){ return Function.call.apply(Array.prototype.unshift, arguments); };core-js-2.4.1/fn/array/values.js000066400000000000000000000001521274277553300164530ustar00rootroot00000000000000require('../../modules/es6.array.iterator'); module.exports = require('../../modules/_core').Array.values;core-js-2.4.1/fn/array/virtual/000077500000000000000000000000001274277553300163065ustar00rootroot00000000000000core-js-2.4.1/fn/array/virtual/copy-within.js000066400000000000000000000002031274277553300211110ustar00rootroot00000000000000require('../../../modules/es6.array.copy-within'); module.exports = require('../../../modules/_entry-virtual')('Array').copyWithin;core-js-2.4.1/fn/array/virtual/entries.js000066400000000000000000000001751274277553300203200ustar00rootroot00000000000000require('../../../modules/es6.array.iterator'); module.exports = require('../../../modules/_entry-virtual')('Array').entries;core-js-2.4.1/fn/array/virtual/every.js000066400000000000000000000001701274277553300177740ustar00rootroot00000000000000require('../../../modules/es6.array.every'); module.exports = require('../../../modules/_entry-virtual')('Array').every;core-js-2.4.1/fn/array/virtual/fill.js000066400000000000000000000001661274277553300175750ustar00rootroot00000000000000require('../../../modules/es6.array.fill'); module.exports = require('../../../modules/_entry-virtual')('Array').fill;core-js-2.4.1/fn/array/virtual/filter.js000066400000000000000000000001721274277553300201310ustar00rootroot00000000000000require('../../../modules/es6.array.filter'); module.exports = require('../../../modules/_entry-virtual')('Array').filter;core-js-2.4.1/fn/array/virtual/find-index.js000066400000000000000000000002011274277553300206620ustar00rootroot00000000000000require('../../../modules/es6.array.find-index'); module.exports = require('../../../modules/_entry-virtual')('Array').findIndex;core-js-2.4.1/fn/array/virtual/find.js000066400000000000000000000001661274277553300175670ustar00rootroot00000000000000require('../../../modules/es6.array.find'); module.exports = require('../../../modules/_entry-virtual')('Array').find;core-js-2.4.1/fn/array/virtual/for-each.js000066400000000000000000000001751274277553300203330ustar00rootroot00000000000000require('../../../modules/es6.array.for-each'); module.exports = require('../../../modules/_entry-virtual')('Array').forEach;core-js-2.4.1/fn/array/virtual/includes.js000066400000000000000000000001761274277553300204560ustar00rootroot00000000000000require('../../../modules/es7.array.includes'); module.exports = require('../../../modules/_entry-virtual')('Array').includes;core-js-2.4.1/fn/array/virtual/index-of.js000066400000000000000000000001751274277553300203600ustar00rootroot00000000000000require('../../../modules/es6.array.index-of'); module.exports = require('../../../modules/_entry-virtual')('Array').indexOf;core-js-2.4.1/fn/array/virtual/index.js000066400000000000000000000017011274277553300177520ustar00rootroot00000000000000require('../../../modules/es6.array.join'); require('../../../modules/es6.array.slice'); require('../../../modules/es6.array.sort'); require('../../../modules/es6.array.for-each'); require('../../../modules/es6.array.map'); require('../../../modules/es6.array.filter'); require('../../../modules/es6.array.some'); require('../../../modules/es6.array.every'); require('../../../modules/es6.array.reduce'); require('../../../modules/es6.array.reduce-right'); require('../../../modules/es6.array.index-of'); require('../../../modules/es6.array.last-index-of'); require('../../../modules/es6.string.iterator'); require('../../../modules/es6.array.iterator'); require('../../../modules/es6.array.copy-within'); require('../../../modules/es6.array.fill'); require('../../../modules/es6.array.find'); require('../../../modules/es6.array.find-index'); require('../../../modules/es7.array.includes'); module.exports = require('../../../modules/_entry-virtual')('Array');core-js-2.4.1/fn/array/virtual/iterator.js000066400000000000000000000001601274277553300204720ustar00rootroot00000000000000require('../../../modules/core.number.iterator'); module.exports = require('../../../modules/_iterators').Array;core-js-2.4.1/fn/array/virtual/join.js000066400000000000000000000001661274277553300176060ustar00rootroot00000000000000require('../../../modules/es6.array.join'); module.exports = require('../../../modules/_entry-virtual')('Array').join;core-js-2.4.1/fn/array/virtual/keys.js000066400000000000000000000001721274277553300176170ustar00rootroot00000000000000require('../../../modules/es6.array.iterator'); module.exports = require('../../../modules/_entry-virtual')('Array').keys;core-js-2.4.1/fn/array/virtual/last-index-of.js000066400000000000000000000002061274277553300213140ustar00rootroot00000000000000require('../../../modules/es6.array.last-index-of'); module.exports = require('../../../modules/_entry-virtual')('Array').lastIndexOf;core-js-2.4.1/fn/array/virtual/map.js000066400000000000000000000001641274277553300174220ustar00rootroot00000000000000require('../../../modules/es6.array.map'); module.exports = require('../../../modules/_entry-virtual')('Array').map;core-js-2.4.1/fn/array/virtual/reduce-right.js000066400000000000000000000002051274277553300212230ustar00rootroot00000000000000require('../../../modules/es6.array.reduce-right'); module.exports = require('../../../modules/_entry-virtual')('Array').reduceRight;core-js-2.4.1/fn/array/virtual/reduce.js000066400000000000000000000001721274277553300201130ustar00rootroot00000000000000require('../../../modules/es6.array.reduce'); module.exports = require('../../../modules/_entry-virtual')('Array').reduce;core-js-2.4.1/fn/array/virtual/slice.js000066400000000000000000000001701274277553300177410ustar00rootroot00000000000000require('../../../modules/es6.array.slice'); module.exports = require('../../../modules/_entry-virtual')('Array').slice;core-js-2.4.1/fn/array/virtual/some.js000066400000000000000000000001661274277553300176120ustar00rootroot00000000000000require('../../../modules/es6.array.some'); module.exports = require('../../../modules/_entry-virtual')('Array').some;core-js-2.4.1/fn/array/virtual/sort.js000066400000000000000000000001661274277553300176360ustar00rootroot00000000000000require('../../../modules/es6.array.sort'); module.exports = require('../../../modules/_entry-virtual')('Array').sort;core-js-2.4.1/fn/array/virtual/values.js000066400000000000000000000001601274277553300201400ustar00rootroot00000000000000require('../../../modules/core.number.iterator'); module.exports = require('../../../modules/_iterators').Array;core-js-2.4.1/fn/asap.js000066400000000000000000000001221274277553300147570ustar00rootroot00000000000000require('../modules/es7.asap'); module.exports = require('../modules/_core').asap;core-js-2.4.1/fn/clear-immediate.js000066400000000000000000000001411274277553300170560ustar00rootroot00000000000000require('../modules/web.immediate'); module.exports = require('../modules/_core').clearImmediate;core-js-2.4.1/fn/date/000077500000000000000000000000001274277553300144175ustar00rootroot00000000000000core-js-2.4.1/fn/date/index.js000066400000000000000000000004251274277553300160650ustar00rootroot00000000000000require('../../modules/es6.date.now'); require('../../modules/es6.date.to-json'); require('../../modules/es6.date.to-iso-string'); require('../../modules/es6.date.to-string'); require('../../modules/es6.date.to-primitive'); module.exports = require('../../modules/_core').Date;core-js-2.4.1/fn/date/now.js000066400000000000000000000001401274277553300155530ustar00rootroot00000000000000require('../../modules/es6.date.now'); module.exports = require('../../modules/_core').Date.now;core-js-2.4.1/fn/date/to-iso-string.js000066400000000000000000000002351274277553300174730ustar00rootroot00000000000000require('../../modules/es6.date.to-json'); require('../../modules/es6.date.to-iso-string'); module.exports = require('../../modules/_core').Date.toISOString;core-js-2.4.1/fn/date/to-json.js000066400000000000000000000001471274277553300163500ustar00rootroot00000000000000require('../../modules/es6.date.to-json'); module.exports = require('../../modules/_core').Date.toJSON;core-js-2.4.1/fn/date/to-primitive.js000066400000000000000000000002731274277553300174070ustar00rootroot00000000000000require('../../modules/es6.date.to-primitive'); var toPrimitive = require('../../modules/_date-to-primitive'); module.exports = function(it, hint){ return toPrimitive.call(it, hint); };core-js-2.4.1/fn/date/to-string.js000066400000000000000000000002341274277553300167020ustar00rootroot00000000000000require('../../modules/es6.date.to-string') var $toString = Date.prototype.toString; module.exports = function toString(it){ return $toString.call(it); };core-js-2.4.1/fn/delay.js000066400000000000000000000001261274277553300151350ustar00rootroot00000000000000require('../modules/core.delay'); module.exports = require('../modules/_core').delay; core-js-2.4.1/fn/dict.js000066400000000000000000000001231274277553300147570ustar00rootroot00000000000000require('../modules/core.dict'); module.exports = require('../modules/_core').Dict;core-js-2.4.1/fn/dom-collections/000077500000000000000000000000001274277553300165755ustar00rootroot00000000000000core-js-2.4.1/fn/dom-collections/index.js000066400000000000000000000003701274277553300202420ustar00rootroot00000000000000require('../../modules/web.dom.iterable'); var $iterators = require('../../modules/es6.array.iterator'); module.exports = { keys: $iterators.keys, values: $iterators.values, entries: $iterators.entries, iterator: $iterators.values };core-js-2.4.1/fn/dom-collections/iterator.js000066400000000000000000000001501274277553300207600ustar00rootroot00000000000000require('../../modules/web.dom.iterable'); module.exports = require('../../modules/_core').Array.values;core-js-2.4.1/fn/error/000077500000000000000000000000001274277553300146335ustar00rootroot00000000000000core-js-2.4.1/fn/error/index.js000066400000000000000000000001431274277553300162760ustar00rootroot00000000000000require('../../modules/es7.error.is-error'); module.exports = require('../../modules/_core').Error;core-js-2.4.1/fn/error/is-error.js000066400000000000000000000001531274277553300167320ustar00rootroot00000000000000require('../../modules/es7.error.is-error'); module.exports = require('../../modules/_core').Error.isError;core-js-2.4.1/fn/function/000077500000000000000000000000001274277553300153275ustar00rootroot00000000000000core-js-2.4.1/fn/function/bind.js000066400000000000000000000001521274277553300165770ustar00rootroot00000000000000require('../../modules/es6.function.bind'); module.exports = require('../../modules/_core').Function.bind;core-js-2.4.1/fn/function/has-instance.js000066400000000000000000000001741274277553300202440ustar00rootroot00000000000000require('../../modules/es6.function.has-instance'); module.exports = Function[require('../../modules/_wks')('hasInstance')];core-js-2.4.1/fn/function/index.js000066400000000000000000000003631274277553300167760ustar00rootroot00000000000000require('../../modules/es6.function.bind'); require('../../modules/es6.function.name'); require('../../modules/es6.function.has-instance'); require('../../modules/core.function.part'); module.exports = require('../../modules/_core').Function; core-js-2.4.1/fn/function/name.js000066400000000000000000000000531274277553300166030ustar00rootroot00000000000000require('../../modules/es6.function.name');core-js-2.4.1/fn/function/part.js000066400000000000000000000001531274277553300166320ustar00rootroot00000000000000require('../../modules/core.function.part'); module.exports = require('../../modules/_core').Function.part;core-js-2.4.1/fn/function/virtual/000077500000000000000000000000001274277553300170155ustar00rootroot00000000000000core-js-2.4.1/fn/function/virtual/bind.js000066400000000000000000000001741274277553300202710ustar00rootroot00000000000000require('../../../modules/es6.function.bind'); module.exports = require('../../../modules/_entry-virtual')('Function').bind;core-js-2.4.1/fn/function/virtual/index.js000066400000000000000000000002471274277553300204650ustar00rootroot00000000000000require('../../../modules/es6.function.bind'); require('../../../modules/core.function.part'); module.exports = require('../../../modules/_entry-virtual')('Function');core-js-2.4.1/fn/function/virtual/part.js000066400000000000000000000001751274277553300203240ustar00rootroot00000000000000require('../../../modules/core.function.part'); module.exports = require('../../../modules/_entry-virtual')('Function').part;core-js-2.4.1/fn/get-iterator-method.js000066400000000000000000000002231274277553300177210ustar00rootroot00000000000000require('../modules/web.dom.iterable'); require('../modules/es6.string.iterator'); module.exports = require('../modules/core.get-iterator-method');core-js-2.4.1/fn/get-iterator.js000066400000000000000000000002141274277553300164430ustar00rootroot00000000000000require('../modules/web.dom.iterable'); require('../modules/es6.string.iterator'); module.exports = require('../modules/core.get-iterator');core-js-2.4.1/fn/is-iterable.js000066400000000000000000000002131274277553300162340ustar00rootroot00000000000000require('../modules/web.dom.iterable'); require('../modules/es6.string.iterator'); module.exports = require('../modules/core.is-iterable');core-js-2.4.1/fn/json/000077500000000000000000000000001274277553300144535ustar00rootroot00000000000000core-js-2.4.1/fn/json/index.js000066400000000000000000000001631274277553300161200ustar00rootroot00000000000000var core = require('../../modules/_core'); module.exports = core.JSON || (core.JSON = {stringify: JSON.stringify});core-js-2.4.1/fn/json/stringify.js000066400000000000000000000003621274277553300170300ustar00rootroot00000000000000var core = require('../../modules/_core') , $JSON = core.JSON || (core.JSON = {stringify: JSON.stringify}); module.exports = function stringify(it){ // eslint-disable-line no-unused-vars return $JSON.stringify.apply($JSON, arguments); };core-js-2.4.1/fn/map.js000066400000000000000000000003661274277553300146220ustar00rootroot00000000000000require('../modules/es6.object.to-string'); require('../modules/es6.string.iterator'); require('../modules/web.dom.iterable'); require('../modules/es6.map'); require('../modules/es7.map.to-json'); module.exports = require('../modules/_core').Map;core-js-2.4.1/fn/math/000077500000000000000000000000001274277553300144335ustar00rootroot00000000000000core-js-2.4.1/fn/math/acosh.js000066400000000000000000000001441274277553300160650ustar00rootroot00000000000000require('../../modules/es6.math.acosh'); module.exports = require('../../modules/_core').Math.acosh;core-js-2.4.1/fn/math/asinh.js000066400000000000000000000001441274277553300160720ustar00rootroot00000000000000require('../../modules/es6.math.asinh'); module.exports = require('../../modules/_core').Math.asinh;core-js-2.4.1/fn/math/atanh.js000066400000000000000000000001441274277553300160630ustar00rootroot00000000000000require('../../modules/es6.math.atanh'); module.exports = require('../../modules/_core').Math.atanh;core-js-2.4.1/fn/math/cbrt.js000066400000000000000000000001421274277553300157200ustar00rootroot00000000000000require('../../modules/es6.math.cbrt'); module.exports = require('../../modules/_core').Math.cbrt;core-js-2.4.1/fn/math/clz32.js000066400000000000000000000001441274277553300157250ustar00rootroot00000000000000require('../../modules/es6.math.clz32'); module.exports = require('../../modules/_core').Math.clz32;core-js-2.4.1/fn/math/cosh.js000066400000000000000000000001421274277553300157220ustar00rootroot00000000000000require('../../modules/es6.math.cosh'); module.exports = require('../../modules/_core').Math.cosh;core-js-2.4.1/fn/math/expm1.js000066400000000000000000000001441274277553300160220ustar00rootroot00000000000000require('../../modules/es6.math.expm1'); module.exports = require('../../modules/_core').Math.expm1;core-js-2.4.1/fn/math/fround.js000066400000000000000000000001461274277553300162670ustar00rootroot00000000000000require('../../modules/es6.math.fround'); module.exports = require('../../modules/_core').Math.fround;core-js-2.4.1/fn/math/hypot.js000066400000000000000000000001441274277553300161330ustar00rootroot00000000000000require('../../modules/es6.math.hypot'); module.exports = require('../../modules/_core').Math.hypot;core-js-2.4.1/fn/math/iaddh.js000066400000000000000000000001441274277553300160410ustar00rootroot00000000000000require('../../modules/es7.math.iaddh'); module.exports = require('../../modules/_core').Math.iaddh;core-js-2.4.1/fn/math/imul.js000066400000000000000000000001421274277553300157340ustar00rootroot00000000000000require('../../modules/es6.math.imul'); module.exports = require('../../modules/_core').Math.imul;core-js-2.4.1/fn/math/imulh.js000066400000000000000000000001441274277553300161060ustar00rootroot00000000000000require('../../modules/es7.math.imulh'); module.exports = require('../../modules/_core').Math.imulh;core-js-2.4.1/fn/math/index.js000066400000000000000000000016141274277553300161020ustar00rootroot00000000000000require('../../modules/es6.math.acosh'); require('../../modules/es6.math.asinh'); require('../../modules/es6.math.atanh'); require('../../modules/es6.math.cbrt'); require('../../modules/es6.math.clz32'); require('../../modules/es6.math.cosh'); require('../../modules/es6.math.expm1'); require('../../modules/es6.math.fround'); require('../../modules/es6.math.hypot'); require('../../modules/es6.math.imul'); require('../../modules/es6.math.log10'); require('../../modules/es6.math.log1p'); require('../../modules/es6.math.log2'); require('../../modules/es6.math.sign'); require('../../modules/es6.math.sinh'); require('../../modules/es6.math.tanh'); require('../../modules/es6.math.trunc'); require('../../modules/es7.math.iaddh'); require('../../modules/es7.math.isubh'); require('../../modules/es7.math.imulh'); require('../../modules/es7.math.umulh'); module.exports = require('../../modules/_core').Math;core-js-2.4.1/fn/math/isubh.js000066400000000000000000000001441274277553300161020ustar00rootroot00000000000000require('../../modules/es7.math.isubh'); module.exports = require('../../modules/_core').Math.isubh;core-js-2.4.1/fn/math/log10.js000066400000000000000000000001441274277553300157120ustar00rootroot00000000000000require('../../modules/es6.math.log10'); module.exports = require('../../modules/_core').Math.log10;core-js-2.4.1/fn/math/log1p.js000066400000000000000000000001441274277553300160120ustar00rootroot00000000000000require('../../modules/es6.math.log1p'); module.exports = require('../../modules/_core').Math.log1p;core-js-2.4.1/fn/math/log2.js000066400000000000000000000001421274277553300156310ustar00rootroot00000000000000require('../../modules/es6.math.log2'); module.exports = require('../../modules/_core').Math.log2;core-js-2.4.1/fn/math/sign.js000066400000000000000000000001421274277553300157260ustar00rootroot00000000000000require('../../modules/es6.math.sign'); module.exports = require('../../modules/_core').Math.sign;core-js-2.4.1/fn/math/sinh.js000066400000000000000000000001421274277553300157270ustar00rootroot00000000000000require('../../modules/es6.math.sinh'); module.exports = require('../../modules/_core').Math.sinh;core-js-2.4.1/fn/math/tanh.js000066400000000000000000000001421274277553300157200ustar00rootroot00000000000000require('../../modules/es6.math.tanh'); module.exports = require('../../modules/_core').Math.tanh;core-js-2.4.1/fn/math/trunc.js000066400000000000000000000001441274277553300161230ustar00rootroot00000000000000require('../../modules/es6.math.trunc'); module.exports = require('../../modules/_core').Math.trunc;core-js-2.4.1/fn/math/umulh.js000066400000000000000000000001441274277553300161220ustar00rootroot00000000000000require('../../modules/es7.math.umulh'); module.exports = require('../../modules/_core').Math.umulh;core-js-2.4.1/fn/number/000077500000000000000000000000001274277553300147725ustar00rootroot00000000000000core-js-2.4.1/fn/number/constructor.js000066400000000000000000000001111274277553300177060ustar00rootroot00000000000000require('../../modules/es6.number.constructor'); module.exports = Number;core-js-2.4.1/fn/number/epsilon.js000066400000000000000000000001171274277553300170000ustar00rootroot00000000000000require('../../modules/es6.number.epsilon'); module.exports = Math.pow(2, -52);core-js-2.4.1/fn/number/index.js000066400000000000000000000012601274277553300164360ustar00rootroot00000000000000require('../../modules/es6.number.constructor'); require('../../modules/es6.number.epsilon'); require('../../modules/es6.number.is-finite'); require('../../modules/es6.number.is-integer'); require('../../modules/es6.number.is-nan'); require('../../modules/es6.number.is-safe-integer'); require('../../modules/es6.number.max-safe-integer'); require('../../modules/es6.number.min-safe-integer'); require('../../modules/es6.number.parse-float'); require('../../modules/es6.number.parse-int'); require('../../modules/es6.number.to-fixed'); require('../../modules/es6.number.to-precision'); require('../../modules/core.number.iterator'); module.exports = require('../../modules/_core').Number;core-js-2.4.1/fn/number/is-finite.js000066400000000000000000000001571274277553300172220ustar00rootroot00000000000000require('../../modules/es6.number.is-finite'); module.exports = require('../../modules/_core').Number.isFinite;core-js-2.4.1/fn/number/is-integer.js000066400000000000000000000001611274277553300173740ustar00rootroot00000000000000require('../../modules/es6.number.is-integer'); module.exports = require('../../modules/_core').Number.isInteger;core-js-2.4.1/fn/number/is-nan.js000066400000000000000000000001511274277553300165120ustar00rootroot00000000000000require('../../modules/es6.number.is-nan'); module.exports = require('../../modules/_core').Number.isNaN;core-js-2.4.1/fn/number/is-safe-integer.js000066400000000000000000000001721274277553300203120ustar00rootroot00000000000000require('../../modules/es6.number.is-safe-integer'); module.exports = require('../../modules/_core').Number.isSafeInteger;core-js-2.4.1/fn/number/iterator.js000066400000000000000000000002351274277553300171610ustar00rootroot00000000000000require('../../modules/core.number.iterator'); var get = require('../../modules/_iterators').Number; module.exports = function(it){ return get.call(it); };core-js-2.4.1/fn/number/max-safe-integer.js000066400000000000000000000001301274277553300204560ustar00rootroot00000000000000require('../../modules/es6.number.max-safe-integer'); module.exports = 0x1fffffffffffff;core-js-2.4.1/fn/number/min-safe-integer.js000066400000000000000000000001311274277553300204550ustar00rootroot00000000000000require('../../modules/es6.number.min-safe-integer'); module.exports = -0x1fffffffffffff;core-js-2.4.1/fn/number/parse-float.js000066400000000000000000000001151274277553300175420ustar00rootroot00000000000000require('../../modules/es6.number.parse-float'); module.exports = parseFloat;core-js-2.4.1/fn/number/parse-int.js000066400000000000000000000001111274277553300172230ustar00rootroot00000000000000require('../../modules/es6.number.parse-int'); module.exports = parseInt;core-js-2.4.1/fn/number/to-fixed.js000066400000000000000000000001551274277553300170500ustar00rootroot00000000000000require('../../modules/es6.number.to-fixed'); module.exports = require('../../modules/_core').Number.toFixed;core-js-2.4.1/fn/number/to-precision.js000066400000000000000000000001651274277553300177450ustar00rootroot00000000000000require('../../modules/es6.number.to-precision'); module.exports = require('../../modules/_core').Number.toPrecision;core-js-2.4.1/fn/number/virtual/000077500000000000000000000000001274277553300164605ustar00rootroot00000000000000core-js-2.4.1/fn/number/virtual/index.js000066400000000000000000000003211274277553300201210ustar00rootroot00000000000000require('../../../modules/core.number.iterator'); var $Number = require('../../../modules/_entry-virtual')('Number'); $Number.iterator = require('../../../modules/_iterators').Number; module.exports = $Number;core-js-2.4.1/fn/number/virtual/iterator.js000066400000000000000000000001611274277553300206450ustar00rootroot00000000000000require('../../../modules/core.number.iterator'); module.exports = require('../../../modules/_iterators').Number;core-js-2.4.1/fn/number/virtual/to-fixed.js000066400000000000000000000001771274277553300205420ustar00rootroot00000000000000require('../../../modules/es6.number.to-fixed'); module.exports = require('../../../modules/_entry-virtual')('Number').toFixed;core-js-2.4.1/fn/number/virtual/to-precision.js000066400000000000000000000002071274277553300214300ustar00rootroot00000000000000require('../../../modules/es6.number.to-precision'); module.exports = require('../../../modules/_entry-virtual')('Number').toPrecision;core-js-2.4.1/fn/object/000077500000000000000000000000001274277553300147505ustar00rootroot00000000000000core-js-2.4.1/fn/object/assign.js000066400000000000000000000001521274277553300165700ustar00rootroot00000000000000require('../../modules/es6.object.assign'); module.exports = require('../../modules/_core').Object.assign;core-js-2.4.1/fn/object/classof.js000066400000000000000000000001551274277553300167410ustar00rootroot00000000000000require('../../modules/core.object.classof'); module.exports = require('../../modules/_core').Object.classof;core-js-2.4.1/fn/object/create.js000066400000000000000000000002521274277553300165500ustar00rootroot00000000000000require('../../modules/es6.object.create'); var $Object = require('../../modules/_core').Object; module.exports = function create(P, D){ return $Object.create(P, D); };core-js-2.4.1/fn/object/define-getter.js000066400000000000000000000001731274277553300200310ustar00rootroot00000000000000require('../../modules/es7.object.define-getter'); module.exports = require('../../modules/_core').Object.__defineGetter__;core-js-2.4.1/fn/object/define-properties.js000066400000000000000000000003111274277553300207250ustar00rootroot00000000000000require('../../modules/es6.object.define-properties'); var $Object = require('../../modules/_core').Object; module.exports = function defineProperties(T, D){ return $Object.defineProperties(T, D); };core-js-2.4.1/fn/object/define-property.js000066400000000000000000000003251274277553300204220ustar00rootroot00000000000000require('../../modules/es6.object.define-property'); var $Object = require('../../modules/_core').Object; module.exports = function defineProperty(it, key, desc){ return $Object.defineProperty(it, key, desc); };core-js-2.4.1/fn/object/define-setter.js000066400000000000000000000001731274277553300200450ustar00rootroot00000000000000require('../../modules/es7.object.define-setter'); module.exports = require('../../modules/_core').Object.__defineSetter__;core-js-2.4.1/fn/object/define.js000066400000000000000000000001531274277553300165370ustar00rootroot00000000000000require('../../modules/core.object.define'); module.exports = require('../../modules/_core').Object.define;core-js-2.4.1/fn/object/entries.js000066400000000000000000000001541274277553300167570ustar00rootroot00000000000000require('../../modules/es7.object.entries'); module.exports = require('../../modules/_core').Object.entries;core-js-2.4.1/fn/object/freeze.js000066400000000000000000000001521274277553300165640ustar00rootroot00000000000000require('../../modules/es6.object.freeze'); module.exports = require('../../modules/_core').Object.freeze;core-js-2.4.1/fn/object/get-own-property-descriptor.js000066400000000000000000000003511274277553300227230ustar00rootroot00000000000000require('../../modules/es6.object.get-own-property-descriptor'); var $Object = require('../../modules/_core').Object; module.exports = function getOwnPropertyDescriptor(it, key){ return $Object.getOwnPropertyDescriptor(it, key); };core-js-2.4.1/fn/object/get-own-property-descriptors.js000066400000000000000000000002231274277553300231040ustar00rootroot00000000000000require('../../modules/es7.object.get-own-property-descriptors'); module.exports = require('../../modules/_core').Object.getOwnPropertyDescriptors;core-js-2.4.1/fn/object/get-own-property-names.js000066400000000000000000000003201274277553300216440ustar00rootroot00000000000000require('../../modules/es6.object.get-own-property-names'); var $Object = require('../../modules/_core').Object; module.exports = function getOwnPropertyNames(it){ return $Object.getOwnPropertyNames(it); };core-js-2.4.1/fn/object/get-own-property-symbols.js000066400000000000000000000001621274277553300222350ustar00rootroot00000000000000require('../../modules/es6.symbol'); module.exports = require('../../modules/_core').Object.getOwnPropertySymbols;core-js-2.4.1/fn/object/get-prototype-of.js000066400000000000000000000001741274277553300205340ustar00rootroot00000000000000require('../../modules/es6.object.get-prototype-of'); module.exports = require('../../modules/_core').Object.getPrototypeOf;core-js-2.4.1/fn/object/index.js000066400000000000000000000027061274277553300164220ustar00rootroot00000000000000require('../../modules/es6.symbol'); require('../../modules/es6.object.create'); require('../../modules/es6.object.define-property'); require('../../modules/es6.object.define-properties'); require('../../modules/es6.object.get-own-property-descriptor'); require('../../modules/es6.object.get-prototype-of'); require('../../modules/es6.object.keys'); require('../../modules/es6.object.get-own-property-names'); require('../../modules/es6.object.freeze'); require('../../modules/es6.object.seal'); require('../../modules/es6.object.prevent-extensions'); require('../../modules/es6.object.is-frozen'); require('../../modules/es6.object.is-sealed'); require('../../modules/es6.object.is-extensible'); require('../../modules/es6.object.assign'); require('../../modules/es6.object.is'); require('../../modules/es6.object.set-prototype-of'); require('../../modules/es6.object.to-string'); require('../../modules/es7.object.get-own-property-descriptors'); require('../../modules/es7.object.values'); require('../../modules/es7.object.entries'); require('../../modules/es7.object.define-getter'); require('../../modules/es7.object.define-setter'); require('../../modules/es7.object.lookup-getter'); require('../../modules/es7.object.lookup-setter'); require('../../modules/core.object.is-object'); require('../../modules/core.object.classof'); require('../../modules/core.object.define'); require('../../modules/core.object.make'); module.exports = require('../../modules/_core').Object;core-js-2.4.1/fn/object/is-extensible.js000066400000000000000000000001671274277553300200650ustar00rootroot00000000000000require('../../modules/es6.object.is-extensible'); module.exports = require('../../modules/_core').Object.isExtensible;core-js-2.4.1/fn/object/is-frozen.js000066400000000000000000000001571274277553300172250ustar00rootroot00000000000000require('../../modules/es6.object.is-frozen'); module.exports = require('../../modules/_core').Object.isFrozen;core-js-2.4.1/fn/object/is-object.js000066400000000000000000000001601274277553300171620ustar00rootroot00000000000000require('../../modules/core.object.is-object'); module.exports = require('../../modules/_core').Object.isObject;core-js-2.4.1/fn/object/is-sealed.js000066400000000000000000000001571274277553300171570ustar00rootroot00000000000000require('../../modules/es6.object.is-sealed'); module.exports = require('../../modules/_core').Object.isSealed;core-js-2.4.1/fn/object/is.js000066400000000000000000000001421274277553300157160ustar00rootroot00000000000000require('../../modules/es6.object.is'); module.exports = require('../../modules/_core').Object.is;core-js-2.4.1/fn/object/keys.js000066400000000000000000000001461274277553300162620ustar00rootroot00000000000000require('../../modules/es6.object.keys'); module.exports = require('../../modules/_core').Object.keys;core-js-2.4.1/fn/object/lookup-getter.js000066400000000000000000000001731274277553300201100ustar00rootroot00000000000000require('../../modules/es7.object.lookup-setter'); module.exports = require('../../modules/_core').Object.__lookupGetter__;core-js-2.4.1/fn/object/lookup-setter.js000066400000000000000000000001731274277553300201240ustar00rootroot00000000000000require('../../modules/es7.object.lookup-setter'); module.exports = require('../../modules/_core').Object.__lookupSetter__;core-js-2.4.1/fn/object/make.js000066400000000000000000000001471274277553300162250ustar00rootroot00000000000000require('../../modules/core.object.make'); module.exports = require('../../modules/_core').Object.make;core-js-2.4.1/fn/object/prevent-extensions.js000066400000000000000000000002011274277553300211570ustar00rootroot00000000000000require('../../modules/es6.object.prevent-extensions'); module.exports = require('../../modules/_core').Object.preventExtensions;core-js-2.4.1/fn/object/seal.js000066400000000000000000000001461274277553300162330ustar00rootroot00000000000000require('../../modules/es6.object.seal'); module.exports = require('../../modules/_core').Object.seal;core-js-2.4.1/fn/object/set-prototype-of.js000066400000000000000000000001741274277553300205500ustar00rootroot00000000000000require('../../modules/es6.object.set-prototype-of'); module.exports = require('../../modules/_core').Object.setPrototypeOf;core-js-2.4.1/fn/object/values.js000066400000000000000000000001521274277553300166030ustar00rootroot00000000000000require('../../modules/es7.object.values'); module.exports = require('../../modules/_core').Object.values;core-js-2.4.1/fn/observable.js000066400000000000000000000004551274277553300161700ustar00rootroot00000000000000require('../modules/es6.object.to-string'); require('../modules/es6.string.iterator'); require('../modules/web.dom.iterable'); require('../modules/es6.promise'); require('../modules/es7.symbol.observable'); require('../modules/es7.observable'); module.exports = require('../modules/_core').Observable;core-js-2.4.1/fn/parse-float.js000066400000000000000000000001371274277553300162560ustar00rootroot00000000000000require('../modules/es6.parse-float'); module.exports = require('../modules/_core').parseFloat;core-js-2.4.1/fn/parse-int.js000066400000000000000000000001331274277553300157370ustar00rootroot00000000000000require('../modules/es6.parse-int'); module.exports = require('../modules/_core').parseInt;core-js-2.4.1/fn/promise.js000066400000000000000000000003271274277553300155200ustar00rootroot00000000000000require('../modules/es6.object.to-string'); require('../modules/es6.string.iterator'); require('../modules/web.dom.iterable'); require('../modules/es6.promise'); module.exports = require('../modules/_core').Promise;core-js-2.4.1/fn/reflect/000077500000000000000000000000001274277553300151265ustar00rootroot00000000000000core-js-2.4.1/fn/reflect/apply.js000066400000000000000000000001521274277553300166070ustar00rootroot00000000000000require('../../modules/es6.reflect.apply'); module.exports = require('../../modules/_core').Reflect.apply;core-js-2.4.1/fn/reflect/construct.js000066400000000000000000000001621274277553300175070ustar00rootroot00000000000000require('../../modules/es6.reflect.construct'); module.exports = require('../../modules/_core').Reflect.construct;core-js-2.4.1/fn/reflect/define-metadata.js000066400000000000000000000001751274277553300204770ustar00rootroot00000000000000require('../../modules/es7.reflect.define-metadata'); module.exports = require('../../modules/_core').Reflect.defineMetadata;core-js-2.4.1/fn/reflect/define-property.js000066400000000000000000000001751274277553300206030ustar00rootroot00000000000000require('../../modules/es6.reflect.define-property'); module.exports = require('../../modules/_core').Reflect.defineProperty;core-js-2.4.1/fn/reflect/delete-metadata.js000066400000000000000000000001751274277553300205070ustar00rootroot00000000000000require('../../modules/es7.reflect.delete-metadata'); module.exports = require('../../modules/_core').Reflect.deleteMetadata;core-js-2.4.1/fn/reflect/delete-property.js000066400000000000000000000001751274277553300206130ustar00rootroot00000000000000require('../../modules/es6.reflect.delete-property'); module.exports = require('../../modules/_core').Reflect.deleteProperty;core-js-2.4.1/fn/reflect/enumerate.js000066400000000000000000000001621274277553300174500ustar00rootroot00000000000000require('../../modules/es6.reflect.enumerate'); module.exports = require('../../modules/_core').Reflect.enumerate;core-js-2.4.1/fn/reflect/get-metadata-keys.js000066400000000000000000000002001274277553300207620ustar00rootroot00000000000000require('../../modules/es7.reflect.get-metadata-keys'); module.exports = require('../../modules/_core').Reflect.getMetadataKeys;core-js-2.4.1/fn/reflect/get-metadata.js000066400000000000000000000001671274277553300200250ustar00rootroot00000000000000require('../../modules/es7.reflect.get-metadata'); module.exports = require('../../modules/_core').Reflect.getMetadata;core-js-2.4.1/fn/reflect/get-own-metadata-keys.js000066400000000000000000000002071274277553300215720ustar00rootroot00000000000000require('../../modules/es7.reflect.get-own-metadata-keys'); module.exports = require('../../modules/_core').Reflect.getOwnMetadataKeys;core-js-2.4.1/fn/reflect/get-own-metadata.js000066400000000000000000000001761274277553300206260ustar00rootroot00000000000000require('../../modules/es7.reflect.get-own-metadata'); module.exports = require('../../modules/_core').Reflect.getOwnMetadata;core-js-2.4.1/fn/reflect/get-own-property-descriptor.js000066400000000000000000000002231274277553300230770ustar00rootroot00000000000000require('../../modules/es6.reflect.get-own-property-descriptor'); module.exports = require('../../modules/_core').Reflect.getOwnPropertyDescriptor;core-js-2.4.1/fn/reflect/get-prototype-of.js000066400000000000000000000001761274277553300207140ustar00rootroot00000000000000require('../../modules/es6.reflect.get-prototype-of'); module.exports = require('../../modules/_core').Reflect.getPrototypeOf;core-js-2.4.1/fn/reflect/get.js000066400000000000000000000001461274277553300162440ustar00rootroot00000000000000require('../../modules/es6.reflect.get'); module.exports = require('../../modules/_core').Reflect.get;core-js-2.4.1/fn/reflect/has-metadata.js000066400000000000000000000001671274277553300200210ustar00rootroot00000000000000require('../../modules/es7.reflect.has-metadata'); module.exports = require('../../modules/_core').Reflect.hasMetadata;core-js-2.4.1/fn/reflect/has-own-metadata.js000066400000000000000000000001761274277553300206220ustar00rootroot00000000000000require('../../modules/es7.reflect.has-own-metadata'); module.exports = require('../../modules/_core').Reflect.hasOwnMetadata;core-js-2.4.1/fn/reflect/has.js000066400000000000000000000001461274277553300162400ustar00rootroot00000000000000require('../../modules/es6.reflect.has'); module.exports = require('../../modules/_core').Reflect.has;core-js-2.4.1/fn/reflect/index.js000066400000000000000000000023351274277553300165760ustar00rootroot00000000000000require('../../modules/es6.reflect.apply'); require('../../modules/es6.reflect.construct'); require('../../modules/es6.reflect.define-property'); require('../../modules/es6.reflect.delete-property'); require('../../modules/es6.reflect.enumerate'); require('../../modules/es6.reflect.get'); require('../../modules/es6.reflect.get-own-property-descriptor'); require('../../modules/es6.reflect.get-prototype-of'); require('../../modules/es6.reflect.has'); require('../../modules/es6.reflect.is-extensible'); require('../../modules/es6.reflect.own-keys'); require('../../modules/es6.reflect.prevent-extensions'); require('../../modules/es6.reflect.set'); require('../../modules/es6.reflect.set-prototype-of'); require('../../modules/es7.reflect.define-metadata'); require('../../modules/es7.reflect.delete-metadata'); require('../../modules/es7.reflect.get-metadata'); require('../../modules/es7.reflect.get-metadata-keys'); require('../../modules/es7.reflect.get-own-metadata'); require('../../modules/es7.reflect.get-own-metadata-keys'); require('../../modules/es7.reflect.has-metadata'); require('../../modules/es7.reflect.has-own-metadata'); require('../../modules/es7.reflect.metadata'); module.exports = require('../../modules/_core').Reflect;core-js-2.4.1/fn/reflect/is-extensible.js000066400000000000000000000001711274277553300202360ustar00rootroot00000000000000require('../../modules/es6.reflect.is-extensible'); module.exports = require('../../modules/_core').Reflect.isExtensible;core-js-2.4.1/fn/reflect/metadata.js000066400000000000000000000001601274277553300172410ustar00rootroot00000000000000require('../../modules/es7.reflect.metadata'); module.exports = require('../../modules/_core').Reflect.metadata;core-js-2.4.1/fn/reflect/own-keys.js000066400000000000000000000001571274277553300172430ustar00rootroot00000000000000require('../../modules/es6.reflect.own-keys'); module.exports = require('../../modules/_core').Reflect.ownKeys;core-js-2.4.1/fn/reflect/prevent-extensions.js000066400000000000000000000002031274277553300213370ustar00rootroot00000000000000require('../../modules/es6.reflect.prevent-extensions'); module.exports = require('../../modules/_core').Reflect.preventExtensions;core-js-2.4.1/fn/reflect/set-prototype-of.js000066400000000000000000000001761274277553300207300ustar00rootroot00000000000000require('../../modules/es6.reflect.set-prototype-of'); module.exports = require('../../modules/_core').Reflect.setPrototypeOf;core-js-2.4.1/fn/reflect/set.js000066400000000000000000000001461274277553300162600ustar00rootroot00000000000000require('../../modules/es6.reflect.set'); module.exports = require('../../modules/_core').Reflect.set;core-js-2.4.1/fn/regexp/000077500000000000000000000000001274277553300147745ustar00rootroot00000000000000core-js-2.4.1/fn/regexp/constructor.js000066400000000000000000000001111274277553300177100ustar00rootroot00000000000000require('../../modules/es6.regexp.constructor'); module.exports = RegExp;core-js-2.4.1/fn/regexp/escape.js000066400000000000000000000001531274277553300165710ustar00rootroot00000000000000require('../../modules/core.regexp.escape'); module.exports = require('../../modules/_core').RegExp.escape;core-js-2.4.1/fn/regexp/flags.js000066400000000000000000000002221274277553300164220ustar00rootroot00000000000000require('../../modules/es6.regexp.flags'); var flags = require('../../modules/_flags'); module.exports = function(it){ return flags.call(it); };core-js-2.4.1/fn/regexp/index.js000066400000000000000000000006361274277553300164460ustar00rootroot00000000000000require('../../modules/es6.regexp.constructor'); require('../../modules/es6.regexp.to-string'); require('../../modules/es6.regexp.flags'); require('../../modules/es6.regexp.match'); require('../../modules/es6.regexp.replace'); require('../../modules/es6.regexp.search'); require('../../modules/es6.regexp.split'); require('../../modules/core.regexp.escape'); module.exports = require('../../modules/_core').RegExp;core-js-2.4.1/fn/regexp/match.js000066400000000000000000000002651274277553300164310ustar00rootroot00000000000000require('../../modules/es6.regexp.match'); var MATCH = require('../../modules/_wks')('match'); module.exports = function(it, str){ return RegExp.prototype[MATCH].call(it, str); };core-js-2.4.1/fn/regexp/replace.js000066400000000000000000000003211274277553300167410ustar00rootroot00000000000000require('../../modules/es6.regexp.replace'); var REPLACE = require('../../modules/_wks')('replace'); module.exports = function(it, str, replacer){ return RegExp.prototype[REPLACE].call(it, str, replacer); };core-js-2.4.1/fn/regexp/search.js000066400000000000000000000002711274277553300165770ustar00rootroot00000000000000require('../../modules/es6.regexp.search'); var SEARCH = require('../../modules/_wks')('search'); module.exports = function(it, str){ return RegExp.prototype[SEARCH].call(it, str); };core-js-2.4.1/fn/regexp/split.js000066400000000000000000000003031274277553300164610ustar00rootroot00000000000000require('../../modules/es6.regexp.split'); var SPLIT = require('../../modules/_wks')('split'); module.exports = function(it, str, limit){ return RegExp.prototype[SPLIT].call(it, str, limit); };core-js-2.4.1/fn/regexp/to-string.js000066400000000000000000000002241274277553300172560ustar00rootroot00000000000000'use strict'; require('../../modules/es6.regexp.to-string'); module.exports = function toString(it){ return RegExp.prototype.toString.call(it); };core-js-2.4.1/fn/set-immediate.js000066400000000000000000000001371274277553300165700ustar00rootroot00000000000000require('../modules/web.immediate'); module.exports = require('../modules/_core').setImmediate;core-js-2.4.1/fn/set-interval.js000066400000000000000000000001331274277553300164520ustar00rootroot00000000000000require('../modules/web.timers'); module.exports = require('../modules/_core').setInterval;core-js-2.4.1/fn/set-timeout.js000066400000000000000000000001321274277553300163130ustar00rootroot00000000000000require('../modules/web.timers'); module.exports = require('../modules/_core').setTimeout;core-js-2.4.1/fn/set.js000066400000000000000000000003661274277553300146400ustar00rootroot00000000000000require('../modules/es6.object.to-string'); require('../modules/es6.string.iterator'); require('../modules/web.dom.iterable'); require('../modules/es6.set'); require('../modules/es7.set.to-json'); module.exports = require('../modules/_core').Set;core-js-2.4.1/fn/string/000077500000000000000000000000001274277553300150105ustar00rootroot00000000000000core-js-2.4.1/fn/string/anchor.js000066400000000000000000000001521274277553300166160ustar00rootroot00000000000000require('../../modules/es6.string.anchor'); module.exports = require('../../modules/_core').String.anchor;core-js-2.4.1/fn/string/at.js000066400000000000000000000001421274277553300157470ustar00rootroot00000000000000require('../../modules/es7.string.at'); module.exports = require('../../modules/_core').String.at;core-js-2.4.1/fn/string/big.js000066400000000000000000000001441274277553300161060ustar00rootroot00000000000000require('../../modules/es6.string.big'); module.exports = require('../../modules/_core').String.big;core-js-2.4.1/fn/string/blink.js000066400000000000000000000001501274277553300164410ustar00rootroot00000000000000require('../../modules/es6.string.blink'); module.exports = require('../../modules/_core').String.blink;core-js-2.4.1/fn/string/bold.js000066400000000000000000000001461274277553300162670ustar00rootroot00000000000000require('../../modules/es6.string.bold'); module.exports = require('../../modules/_core').String.bold;core-js-2.4.1/fn/string/code-point-at.js000066400000000000000000000001661274277553300200140ustar00rootroot00000000000000require('../../modules/es6.string.code-point-at'); module.exports = require('../../modules/_core').String.codePointAt;core-js-2.4.1/fn/string/ends-with.js000066400000000000000000000001571274277553300172530ustar00rootroot00000000000000require('../../modules/es6.string.ends-with'); module.exports = require('../../modules/_core').String.endsWith;core-js-2.4.1/fn/string/escape-html.js000066400000000000000000000001641274277553300175510ustar00rootroot00000000000000require('../../modules/core.string.escape-html'); module.exports = require('../../modules/_core').String.escapeHTML;core-js-2.4.1/fn/string/fixed.js000066400000000000000000000001501274277553300164410ustar00rootroot00000000000000require('../../modules/es6.string.fixed'); module.exports = require('../../modules/_core').String.fixed;core-js-2.4.1/fn/string/fontcolor.js000066400000000000000000000001601274277553300173500ustar00rootroot00000000000000require('../../modules/es6.string.fontcolor'); module.exports = require('../../modules/_core').String.fontcolor;core-js-2.4.1/fn/string/fontsize.js000066400000000000000000000001561274277553300172110ustar00rootroot00000000000000require('../../modules/es6.string.fontsize'); module.exports = require('../../modules/_core').String.fontsize;core-js-2.4.1/fn/string/from-code-point.js000066400000000000000000000001721274277553300203500ustar00rootroot00000000000000require('../../modules/es6.string.from-code-point'); module.exports = require('../../modules/_core').String.fromCodePoint;core-js-2.4.1/fn/string/includes.js000066400000000000000000000001561274277553300171560ustar00rootroot00000000000000require('../../modules/es6.string.includes'); module.exports = require('../../modules/_core').String.includes;core-js-2.4.1/fn/string/index.js000066400000000000000000000030641274277553300164600ustar00rootroot00000000000000require('../../modules/es6.string.from-code-point'); require('../../modules/es6.string.raw'); require('../../modules/es6.string.trim'); require('../../modules/es6.string.iterator'); require('../../modules/es6.string.code-point-at'); require('../../modules/es6.string.ends-with'); require('../../modules/es6.string.includes'); require('../../modules/es6.string.repeat'); require('../../modules/es6.string.starts-with'); require('../../modules/es6.regexp.match'); require('../../modules/es6.regexp.replace'); require('../../modules/es6.regexp.search'); require('../../modules/es6.regexp.split'); require('../../modules/es6.string.anchor'); require('../../modules/es6.string.big'); require('../../modules/es6.string.blink'); require('../../modules/es6.string.bold'); require('../../modules/es6.string.fixed'); require('../../modules/es6.string.fontcolor'); require('../../modules/es6.string.fontsize'); require('../../modules/es6.string.italics'); require('../../modules/es6.string.link'); require('../../modules/es6.string.small'); require('../../modules/es6.string.strike'); require('../../modules/es6.string.sub'); require('../../modules/es6.string.sup'); require('../../modules/es7.string.at'); require('../../modules/es7.string.pad-start'); require('../../modules/es7.string.pad-end'); require('../../modules/es7.string.trim-left'); require('../../modules/es7.string.trim-right'); require('../../modules/es7.string.match-all'); require('../../modules/core.string.escape-html'); require('../../modules/core.string.unescape-html'); module.exports = require('../../modules/_core').String; core-js-2.4.1/fn/string/italics.js000066400000000000000000000001541274277553300167760ustar00rootroot00000000000000require('../../modules/es6.string.italics'); module.exports = require('../../modules/_core').String.italics;core-js-2.4.1/fn/string/iterator.js000066400000000000000000000002341274277553300171760ustar00rootroot00000000000000require('../../modules/es6.string.iterator'); var get = require('../../modules/_iterators').String; module.exports = function(it){ return get.call(it); };core-js-2.4.1/fn/string/link.js000066400000000000000000000001461274277553300163040ustar00rootroot00000000000000require('../../modules/es6.string.link'); module.exports = require('../../modules/_core').String.link;core-js-2.4.1/fn/string/match-all.js000066400000000000000000000001571274277553300172130ustar00rootroot00000000000000require('../../modules/es7.string.match-all'); module.exports = require('../../modules/_core').String.matchAll;core-js-2.4.1/fn/string/pad-end.js000066400000000000000000000001541274277553300166560ustar00rootroot00000000000000require('../../modules/es7.string.pad-end'); module.exports = require('../../modules/_core').String.padEnd; core-js-2.4.1/fn/string/pad-start.js000066400000000000000000000001601274277553300172420ustar00rootroot00000000000000require('../../modules/es7.string.pad-start'); module.exports = require('../../modules/_core').String.padStart; core-js-2.4.1/fn/string/raw.js000066400000000000000000000001441274277553300161360ustar00rootroot00000000000000require('../../modules/es6.string.raw'); module.exports = require('../../modules/_core').String.raw;core-js-2.4.1/fn/string/repeat.js000066400000000000000000000001521274277553300166240ustar00rootroot00000000000000require('../../modules/es6.string.repeat'); module.exports = require('../../modules/_core').String.repeat;core-js-2.4.1/fn/string/small.js000066400000000000000000000001501274277553300164520ustar00rootroot00000000000000require('../../modules/es6.string.small'); module.exports = require('../../modules/_core').String.small;core-js-2.4.1/fn/string/starts-with.js000066400000000000000000000001631274277553300176370ustar00rootroot00000000000000require('../../modules/es6.string.starts-with'); module.exports = require('../../modules/_core').String.startsWith;core-js-2.4.1/fn/string/strike.js000066400000000000000000000001521274277553300166450ustar00rootroot00000000000000require('../../modules/es6.string.strike'); module.exports = require('../../modules/_core').String.strike;core-js-2.4.1/fn/string/sub.js000066400000000000000000000001441274277553300161360ustar00rootroot00000000000000require('../../modules/es6.string.sub'); module.exports = require('../../modules/_core').String.sub;core-js-2.4.1/fn/string/sup.js000066400000000000000000000001441274277553300161540ustar00rootroot00000000000000require('../../modules/es6.string.sup'); module.exports = require('../../modules/_core').String.sup;core-js-2.4.1/fn/string/trim-end.js000066400000000000000000000001611274277553300170630ustar00rootroot00000000000000require('../../modules/es7.string.trim-right'); module.exports = require('../../modules/_core').String.trimRight;core-js-2.4.1/fn/string/trim-left.js000066400000000000000000000001571274277553300172540ustar00rootroot00000000000000require('../../modules/es7.string.trim-left'); module.exports = require('../../modules/_core').String.trimLeft;core-js-2.4.1/fn/string/trim-right.js000066400000000000000000000001611274277553300174320ustar00rootroot00000000000000require('../../modules/es7.string.trim-right'); module.exports = require('../../modules/_core').String.trimRight;core-js-2.4.1/fn/string/trim-start.js000066400000000000000000000001571274277553300174570ustar00rootroot00000000000000require('../../modules/es7.string.trim-left'); module.exports = require('../../modules/_core').String.trimLeft;core-js-2.4.1/fn/string/trim.js000066400000000000000000000001461274277553300163220ustar00rootroot00000000000000require('../../modules/es6.string.trim'); module.exports = require('../../modules/_core').String.trim;core-js-2.4.1/fn/string/unescape-html.js000066400000000000000000000001701274277553300201110ustar00rootroot00000000000000require('../../modules/core.string.unescape-html'); module.exports = require('../../modules/_core').String.unescapeHTML;core-js-2.4.1/fn/string/virtual/000077500000000000000000000000001274277553300164765ustar00rootroot00000000000000core-js-2.4.1/fn/string/virtual/anchor.js000066400000000000000000000001741274277553300203100ustar00rootroot00000000000000require('../../../modules/es6.string.anchor'); module.exports = require('../../../modules/_entry-virtual')('String').anchor;core-js-2.4.1/fn/string/virtual/at.js000066400000000000000000000001641274277553300174410ustar00rootroot00000000000000require('../../../modules/es7.string.at'); module.exports = require('../../../modules/_entry-virtual')('String').at;core-js-2.4.1/fn/string/virtual/big.js000066400000000000000000000001661274277553300176000ustar00rootroot00000000000000require('../../../modules/es6.string.big'); module.exports = require('../../../modules/_entry-virtual')('String').big;core-js-2.4.1/fn/string/virtual/blink.js000066400000000000000000000001721274277553300201330ustar00rootroot00000000000000require('../../../modules/es6.string.blink'); module.exports = require('../../../modules/_entry-virtual')('String').blink;core-js-2.4.1/fn/string/virtual/bold.js000066400000000000000000000001701274277553300177520ustar00rootroot00000000000000require('../../../modules/es6.string.bold'); module.exports = require('../../../modules/_entry-virtual')('String').bold;core-js-2.4.1/fn/string/virtual/code-point-at.js000066400000000000000000000002101274277553300214700ustar00rootroot00000000000000require('../../../modules/es6.string.code-point-at'); module.exports = require('../../../modules/_entry-virtual')('String').codePointAt;core-js-2.4.1/fn/string/virtual/ends-with.js000066400000000000000000000002011274277553300207270ustar00rootroot00000000000000require('../../../modules/es6.string.ends-with'); module.exports = require('../../../modules/_entry-virtual')('String').endsWith;core-js-2.4.1/fn/string/virtual/escape-html.js000066400000000000000000000002061274277553300212340ustar00rootroot00000000000000require('../../../modules/core.string.escape-html'); module.exports = require('../../../modules/_entry-virtual')('String').escapeHTML;core-js-2.4.1/fn/string/virtual/fixed.js000066400000000000000000000001721274277553300201330ustar00rootroot00000000000000require('../../../modules/es6.string.fixed'); module.exports = require('../../../modules/_entry-virtual')('String').fixed;core-js-2.4.1/fn/string/virtual/fontcolor.js000066400000000000000000000002021274277553300210330ustar00rootroot00000000000000require('../../../modules/es6.string.fontcolor'); module.exports = require('../../../modules/_entry-virtual')('String').fontcolor;core-js-2.4.1/fn/string/virtual/fontsize.js000066400000000000000000000002001274277553300206650ustar00rootroot00000000000000require('../../../modules/es6.string.fontsize'); module.exports = require('../../../modules/_entry-virtual')('String').fontsize;core-js-2.4.1/fn/string/virtual/includes.js000066400000000000000000000002001274277553300206320ustar00rootroot00000000000000require('../../../modules/es6.string.includes'); module.exports = require('../../../modules/_entry-virtual')('String').includes;core-js-2.4.1/fn/string/virtual/index.js000066400000000000000000000031051274277553300201420ustar00rootroot00000000000000require('../../../modules/es6.string.trim'); require('../../../modules/es6.string.iterator'); require('../../../modules/es6.string.code-point-at'); require('../../../modules/es6.string.ends-with'); require('../../../modules/es6.string.includes'); require('../../../modules/es6.string.repeat'); require('../../../modules/es6.string.starts-with'); require('../../../modules/es6.regexp.match'); require('../../../modules/es6.regexp.replace'); require('../../../modules/es6.regexp.search'); require('../../../modules/es6.regexp.split'); require('../../../modules/es6.string.anchor'); require('../../../modules/es6.string.big'); require('../../../modules/es6.string.blink'); require('../../../modules/es6.string.bold'); require('../../../modules/es6.string.fixed'); require('../../../modules/es6.string.fontcolor'); require('../../../modules/es6.string.fontsize'); require('../../../modules/es6.string.italics'); require('../../../modules/es6.string.link'); require('../../../modules/es6.string.small'); require('../../../modules/es6.string.strike'); require('../../../modules/es6.string.sub'); require('../../../modules/es6.string.sup'); require('../../../modules/es7.string.at'); require('../../../modules/es7.string.pad-start'); require('../../../modules/es7.string.pad-end'); require('../../../modules/es7.string.trim-left'); require('../../../modules/es7.string.trim-right'); require('../../../modules/es7.string.match-all'); require('../../../modules/core.string.escape-html'); require('../../../modules/core.string.unescape-html'); module.exports = require('../../../modules/_entry-virtual')('String'); core-js-2.4.1/fn/string/virtual/italics.js000066400000000000000000000001761274277553300204700ustar00rootroot00000000000000require('../../../modules/es6.string.italics'); module.exports = require('../../../modules/_entry-virtual')('String').italics;core-js-2.4.1/fn/string/virtual/iterator.js000066400000000000000000000001611274277553300206630ustar00rootroot00000000000000require('../../../modules/core.number.iterator'); module.exports = require('../../../modules/_iterators').String;core-js-2.4.1/fn/string/virtual/link.js000066400000000000000000000001701274277553300177670ustar00rootroot00000000000000require('../../../modules/es6.string.link'); module.exports = require('../../../modules/_entry-virtual')('String').link;core-js-2.4.1/fn/string/virtual/match-all.js000066400000000000000000000002011274277553300206670ustar00rootroot00000000000000require('../../../modules/es7.string.match-all'); module.exports = require('../../../modules/_entry-virtual')('String').matchAll;core-js-2.4.1/fn/string/virtual/pad-end.js000066400000000000000000000001751274277553300203470ustar00rootroot00000000000000require('../../../modules/es7.string.pad-end'); module.exports = require('../../../modules/_entry-virtual')('String').padEnd;core-js-2.4.1/fn/string/virtual/pad-start.js000066400000000000000000000002011274277553300207240ustar00rootroot00000000000000require('../../../modules/es7.string.pad-start'); module.exports = require('../../../modules/_entry-virtual')('String').padStart;core-js-2.4.1/fn/string/virtual/repeat.js000066400000000000000000000001741274277553300203160ustar00rootroot00000000000000require('../../../modules/es6.string.repeat'); module.exports = require('../../../modules/_entry-virtual')('String').repeat;core-js-2.4.1/fn/string/virtual/small.js000066400000000000000000000001721274277553300201440ustar00rootroot00000000000000require('../../../modules/es6.string.small'); module.exports = require('../../../modules/_entry-virtual')('String').small;core-js-2.4.1/fn/string/virtual/starts-with.js000066400000000000000000000002051274277553300213220ustar00rootroot00000000000000require('../../../modules/es6.string.starts-with'); module.exports = require('../../../modules/_entry-virtual')('String').startsWith;core-js-2.4.1/fn/string/virtual/strike.js000066400000000000000000000001741274277553300203370ustar00rootroot00000000000000require('../../../modules/es6.string.strike'); module.exports = require('../../../modules/_entry-virtual')('String').strike;core-js-2.4.1/fn/string/virtual/sub.js000066400000000000000000000001661274277553300176300ustar00rootroot00000000000000require('../../../modules/es6.string.sub'); module.exports = require('../../../modules/_entry-virtual')('String').sub;core-js-2.4.1/fn/string/virtual/sup.js000066400000000000000000000001661274277553300176460ustar00rootroot00000000000000require('../../../modules/es6.string.sup'); module.exports = require('../../../modules/_entry-virtual')('String').sup;core-js-2.4.1/fn/string/virtual/trim-end.js000066400000000000000000000002031274277553300205460ustar00rootroot00000000000000require('../../../modules/es7.string.trim-right'); module.exports = require('../../../modules/_entry-virtual')('String').trimRight;core-js-2.4.1/fn/string/virtual/trim-left.js000066400000000000000000000002011274277553300207300ustar00rootroot00000000000000require('../../../modules/es7.string.trim-left'); module.exports = require('../../../modules/_entry-virtual')('String').trimLeft;core-js-2.4.1/fn/string/virtual/trim-right.js000066400000000000000000000002031274277553300211150ustar00rootroot00000000000000require('../../../modules/es7.string.trim-right'); module.exports = require('../../../modules/_entry-virtual')('String').trimRight;core-js-2.4.1/fn/string/virtual/trim-start.js000066400000000000000000000002011274277553300211330ustar00rootroot00000000000000require('../../../modules/es7.string.trim-left'); module.exports = require('../../../modules/_entry-virtual')('String').trimLeft;core-js-2.4.1/fn/string/virtual/trim.js000066400000000000000000000001701274277553300200050ustar00rootroot00000000000000require('../../../modules/es6.string.trim'); module.exports = require('../../../modules/_entry-virtual')('String').trim;core-js-2.4.1/fn/string/virtual/unescape-html.js000066400000000000000000000002121274277553300215740ustar00rootroot00000000000000require('../../../modules/core.string.unescape-html'); module.exports = require('../../../modules/_entry-virtual')('String').unescapeHTML;core-js-2.4.1/fn/symbol/000077500000000000000000000000001274277553300150075ustar00rootroot00000000000000core-js-2.4.1/fn/symbol/async-iterator.js000066400000000000000000000001721274277553300203110ustar00rootroot00000000000000require('../../modules/es7.symbol.async-iterator'); module.exports = require('../../modules/_wks-ext').f('asyncIterator');core-js-2.4.1/fn/symbol/for.js000066400000000000000000000001431274277553300161310ustar00rootroot00000000000000require('../../modules/es6.symbol'); module.exports = require('../../modules/_core').Symbol['for'];core-js-2.4.1/fn/symbol/has-instance.js000066400000000000000000000001701274277553300177200ustar00rootroot00000000000000require('../../modules/es6.function.has-instance'); module.exports = require('../../modules/_wks-ext').f('hasInstance');core-js-2.4.1/fn/symbol/index.js000066400000000000000000000003571274277553300164610ustar00rootroot00000000000000require('../../modules/es6.symbol'); require('../../modules/es6.object.to-string'); require('../../modules/es7.symbol.async-iterator'); require('../../modules/es7.symbol.observable'); module.exports = require('../../modules/_core').Symbol;core-js-2.4.1/fn/symbol/is-concat-spreadable.js000066400000000000000000000001131274277553300213200ustar00rootroot00000000000000module.exports = require('../../modules/_wks-ext').f('isConcatSpreadable');core-js-2.4.1/fn/symbol/iterator.js000066400000000000000000000002321274277553300171730ustar00rootroot00000000000000require('../../modules/es6.string.iterator'); require('../../modules/web.dom.iterable'); module.exports = require('../../modules/_wks-ext').f('iterator');core-js-2.4.1/fn/symbol/key-for.js000066400000000000000000000001431274277553300167170ustar00rootroot00000000000000require('../../modules/es6.symbol'); module.exports = require('../../modules/_core').Symbol.keyFor;core-js-2.4.1/fn/symbol/match.js000066400000000000000000000001511274277553300164360ustar00rootroot00000000000000require('../../modules/es6.regexp.match'); module.exports = require('../../modules/_wks-ext').f('match');core-js-2.4.1/fn/symbol/observable.js000066400000000000000000000001631274277553300174710ustar00rootroot00000000000000require('../../modules/es7.symbol.observable'); module.exports = require('../../modules/_wks-ext').f('observable');core-js-2.4.1/fn/symbol/replace.js000066400000000000000000000001551274277553300167610ustar00rootroot00000000000000require('../../modules/es6.regexp.replace'); module.exports = require('../../modules/_wks-ext').f('replace');core-js-2.4.1/fn/symbol/search.js000066400000000000000000000001531274277553300166110ustar00rootroot00000000000000require('../../modules/es6.regexp.search'); module.exports = require('../../modules/_wks-ext').f('search');core-js-2.4.1/fn/symbol/species.js000066400000000000000000000001001274277553300167670ustar00rootroot00000000000000module.exports = require('../../modules/_wks-ext').f('species');core-js-2.4.1/fn/symbol/split.js000066400000000000000000000001511274277553300164750ustar00rootroot00000000000000require('../../modules/es6.regexp.split'); module.exports = require('../../modules/_wks-ext').f('split');core-js-2.4.1/fn/symbol/to-primitive.js000066400000000000000000000001041274277553300177700ustar00rootroot00000000000000module.exports = require('../../modules/_wks-ext').f('toPrimitive');core-js-2.4.1/fn/symbol/to-string-tag.js000066400000000000000000000001631274277553300200440ustar00rootroot00000000000000require('../../modules/es6.object.to-string'); module.exports = require('../../modules/_wks-ext').f('toStringTag');core-js-2.4.1/fn/symbol/unscopables.js000066400000000000000000000001041274277553300176560ustar00rootroot00000000000000module.exports = require('../../modules/_wks-ext').f('unscopables');core-js-2.4.1/fn/system/000077500000000000000000000000001274277553300150265ustar00rootroot00000000000000core-js-2.4.1/fn/system/global.js000066400000000000000000000001521274277553300166220ustar00rootroot00000000000000require('../../modules/es7.system.global'); module.exports = require('../../modules/_core').System.global;core-js-2.4.1/fn/system/index.js000066400000000000000000000001431274277553300164710ustar00rootroot00000000000000require('../../modules/es7.system.global'); module.exports = require('../../modules/_core').System;core-js-2.4.1/fn/typed/000077500000000000000000000000001274277553300146275ustar00rootroot00000000000000core-js-2.4.1/fn/typed/array-buffer.js000066400000000000000000000002341274277553300175510ustar00rootroot00000000000000require('../../modules/es6.typed.array-buffer'); require('../../modules/es6.object.to-string'); module.exports = require('../../modules/_core').ArrayBuffer;core-js-2.4.1/fn/typed/data-view.js000066400000000000000000000002261274277553300170460ustar00rootroot00000000000000require('../../modules/es6.typed.data-view'); require('../../modules/es6.object.to-string'); module.exports = require('../../modules/_core').DataView;core-js-2.4.1/fn/typed/float32-array.js000066400000000000000000000001571274277553300175560ustar00rootroot00000000000000require('../../modules/es6.typed.float32-array'); module.exports = require('../../modules/_core').Float32Array;core-js-2.4.1/fn/typed/float64-array.js000066400000000000000000000001571274277553300175630ustar00rootroot00000000000000require('../../modules/es6.typed.float64-array'); module.exports = require('../../modules/_core').Float64Array;core-js-2.4.1/fn/typed/index.js000066400000000000000000000011731274277553300162760ustar00rootroot00000000000000require('../../modules/es6.typed.array-buffer'); require('../../modules/es6.typed.data-view'); require('../../modules/es6.typed.int8-array'); require('../../modules/es6.typed.uint8-array'); require('../../modules/es6.typed.uint8-clamped-array'); require('../../modules/es6.typed.int16-array'); require('../../modules/es6.typed.uint16-array'); require('../../modules/es6.typed.int32-array'); require('../../modules/es6.typed.uint32-array'); require('../../modules/es6.typed.float32-array'); require('../../modules/es6.typed.float64-array'); require('../../modules/es6.object.to-string'); module.exports = require('../../modules/_core');core-js-2.4.1/fn/typed/int16-array.js000066400000000000000000000001531274277553300172410ustar00rootroot00000000000000require('../../modules/es6.typed.int16-array'); module.exports = require('../../modules/_core').Int16Array;core-js-2.4.1/fn/typed/int32-array.js000066400000000000000000000001531274277553300172370ustar00rootroot00000000000000require('../../modules/es6.typed.int32-array'); module.exports = require('../../modules/_core').Int32Array;core-js-2.4.1/fn/typed/int8-array.js000066400000000000000000000001511274277553300171600ustar00rootroot00000000000000require('../../modules/es6.typed.int8-array'); module.exports = require('../../modules/_core').Int8Array;core-js-2.4.1/fn/typed/uint16-array.js000066400000000000000000000001551274277553300174300ustar00rootroot00000000000000require('../../modules/es6.typed.uint16-array'); module.exports = require('../../modules/_core').Uint16Array;core-js-2.4.1/fn/typed/uint32-array.js000066400000000000000000000001551274277553300174260ustar00rootroot00000000000000require('../../modules/es6.typed.uint32-array'); module.exports = require('../../modules/_core').Uint32Array;core-js-2.4.1/fn/typed/uint8-array.js000066400000000000000000000001531274277553300173470ustar00rootroot00000000000000require('../../modules/es6.typed.uint8-array'); module.exports = require('../../modules/_core').Uint8Array;core-js-2.4.1/fn/typed/uint8-clamped-array.js000066400000000000000000000001721274277553300207530ustar00rootroot00000000000000require('../../modules/es6.typed.uint8-clamped-array'); module.exports = require('../../modules/_core').Uint8ClampedArray;core-js-2.4.1/fn/weak-map.js000066400000000000000000000002551274277553300155440ustar00rootroot00000000000000require('../modules/es6.object.to-string'); require('../modules/web.dom.iterable'); require('../modules/es6.weak-map'); module.exports = require('../modules/_core').WeakMap;core-js-2.4.1/fn/weak-set.js000066400000000000000000000002551274277553300155620ustar00rootroot00000000000000require('../modules/es6.object.to-string'); require('../modules/web.dom.iterable'); require('../modules/es6.weak-set'); module.exports = require('../modules/_core').WeakSet;core-js-2.4.1/index.js000066400000000000000000000011771274277553300145520ustar00rootroot00000000000000require('./shim'); require('./modules/core.dict'); require('./modules/core.get-iterator-method'); require('./modules/core.get-iterator'); require('./modules/core.is-iterable'); require('./modules/core.delay'); require('./modules/core.function.part'); require('./modules/core.object.is-object'); require('./modules/core.object.classof'); require('./modules/core.object.define'); require('./modules/core.object.make'); require('./modules/core.number.iterator'); require('./modules/core.regexp.escape'); require('./modules/core.string.escape-html'); require('./modules/core.string.unescape-html'); module.exports = require('./modules/_core');core-js-2.4.1/library/000077500000000000000000000000001274277553300145435ustar00rootroot00000000000000core-js-2.4.1/library/core/000077500000000000000000000000001274277553300154735ustar00rootroot00000000000000core-js-2.4.1/library/core/_.js000066400000000000000000000001311274277553300162420ustar00rootroot00000000000000require('../modules/core.function.part'); module.exports = require('../modules/_core')._;core-js-2.4.1/library/core/delay.js000066400000000000000000000001261274277553300171260ustar00rootroot00000000000000require('../modules/core.delay'); module.exports = require('../modules/_core').delay; core-js-2.4.1/library/core/dict.js000066400000000000000000000001231274277553300167500ustar00rootroot00000000000000require('../modules/core.dict'); module.exports = require('../modules/_core').Dict;core-js-2.4.1/library/core/function.js000066400000000000000000000001411274277553300176520ustar00rootroot00000000000000require('../modules/core.function.part'); module.exports = require('../modules/_core').Function; core-js-2.4.1/library/core/index.js000066400000000000000000000011741274277553300171430ustar00rootroot00000000000000require('../modules/core.dict'); require('../modules/core.get-iterator-method'); require('../modules/core.get-iterator'); require('../modules/core.is-iterable'); require('../modules/core.delay'); require('../modules/core.function.part'); require('../modules/core.object.is-object'); require('../modules/core.object.classof'); require('../modules/core.object.define'); require('../modules/core.object.make'); require('../modules/core.number.iterator'); require('../modules/core.regexp.escape'); require('../modules/core.string.escape-html'); require('../modules/core.string.unescape-html'); module.exports = require('../modules/_core'); core-js-2.4.1/library/core/number.js000066400000000000000000000001401274277553300173140ustar00rootroot00000000000000require('../modules/core.number.iterator'); module.exports = require('../modules/_core').Number;core-js-2.4.1/library/core/object.js000066400000000000000000000003371274277553300173020ustar00rootroot00000000000000require('../modules/core.object.is-object'); require('../modules/core.object.classof'); require('../modules/core.object.define'); require('../modules/core.object.make'); module.exports = require('../modules/_core').Object; core-js-2.4.1/library/core/regexp.js000066400000000000000000000001361274277553300173230ustar00rootroot00000000000000require('../modules/core.regexp.escape'); module.exports = require('../modules/_core').RegExp;core-js-2.4.1/library/core/string.js000066400000000000000000000002241274277553300173350ustar00rootroot00000000000000require('../modules/core.string.escape-html'); require('../modules/core.string.unescape-html'); module.exports = require('../modules/_core').String;core-js-2.4.1/library/es5/000077500000000000000000000000001274277553300152375ustar00rootroot00000000000000core-js-2.4.1/library/es5/index.js000066400000000000000000000031061274277553300167040ustar00rootroot00000000000000require('../modules/es6.object.create'); require('../modules/es6.object.define-property'); require('../modules/es6.object.define-properties'); require('../modules/es6.object.get-own-property-descriptor'); require('../modules/es6.object.get-prototype-of'); require('../modules/es6.object.keys'); require('../modules/es6.object.get-own-property-names'); require('../modules/es6.object.freeze'); require('../modules/es6.object.seal'); require('../modules/es6.object.prevent-extensions'); require('../modules/es6.object.is-frozen'); require('../modules/es6.object.is-sealed'); require('../modules/es6.object.is-extensible'); require('../modules/es6.function.bind'); require('../modules/es6.array.is-array'); require('../modules/es6.array.join'); require('../modules/es6.array.slice'); require('../modules/es6.array.sort'); require('../modules/es6.array.for-each'); require('../modules/es6.array.map'); require('../modules/es6.array.filter'); require('../modules/es6.array.some'); require('../modules/es6.array.every'); require('../modules/es6.array.reduce'); require('../modules/es6.array.reduce-right'); require('../modules/es6.array.index-of'); require('../modules/es6.array.last-index-of'); require('../modules/es6.number.to-fixed'); require('../modules/es6.number.to-precision'); require('../modules/es6.date.now'); require('../modules/es6.date.to-iso-string'); require('../modules/es6.date.to-json'); require('../modules/es6.parse-int'); require('../modules/es6.parse-float'); require('../modules/es6.string.trim'); require('../modules/es6.regexp.to-string'); module.exports = require('../modules/_core');core-js-2.4.1/library/es6/000077500000000000000000000000001274277553300152405ustar00rootroot00000000000000core-js-2.4.1/library/es6/array.js000066400000000000000000000016601274277553300167170ustar00rootroot00000000000000require('../modules/es6.string.iterator'); require('../modules/es6.array.is-array'); require('../modules/es6.array.from'); require('../modules/es6.array.of'); require('../modules/es6.array.join'); require('../modules/es6.array.slice'); require('../modules/es6.array.sort'); require('../modules/es6.array.for-each'); require('../modules/es6.array.map'); require('../modules/es6.array.filter'); require('../modules/es6.array.some'); require('../modules/es6.array.every'); require('../modules/es6.array.reduce'); require('../modules/es6.array.reduce-right'); require('../modules/es6.array.index-of'); require('../modules/es6.array.last-index-of'); require('../modules/es6.array.copy-within'); require('../modules/es6.array.fill'); require('../modules/es6.array.find'); require('../modules/es6.array.find-index'); require('../modules/es6.array.species'); require('../modules/es6.array.iterator'); module.exports = require('../modules/_core').Array;core-js-2.4.1/library/es6/date.js000066400000000000000000000003471274277553300165170ustar00rootroot00000000000000require('../modules/es6.date.now'); require('../modules/es6.date.to-json'); require('../modules/es6.date.to-iso-string'); require('../modules/es6.date.to-string'); require('../modules/es6.date.to-primitive'); module.exports = Date;core-js-2.4.1/library/es6/function.js000066400000000000000000000002711274277553300174230ustar00rootroot00000000000000require('../modules/es6.function.bind'); require('../modules/es6.function.name'); require('../modules/es6.function.has-instance'); module.exports = require('../modules/_core').Function;core-js-2.4.1/library/es6/index.js000066400000000000000000000133651274277553300167150ustar00rootroot00000000000000require('../modules/es6.symbol'); require('../modules/es6.object.create'); require('../modules/es6.object.define-property'); require('../modules/es6.object.define-properties'); require('../modules/es6.object.get-own-property-descriptor'); require('../modules/es6.object.get-prototype-of'); require('../modules/es6.object.keys'); require('../modules/es6.object.get-own-property-names'); require('../modules/es6.object.freeze'); require('../modules/es6.object.seal'); require('../modules/es6.object.prevent-extensions'); require('../modules/es6.object.is-frozen'); require('../modules/es6.object.is-sealed'); require('../modules/es6.object.is-extensible'); require('../modules/es6.object.assign'); require('../modules/es6.object.is'); require('../modules/es6.object.set-prototype-of'); require('../modules/es6.object.to-string'); require('../modules/es6.function.bind'); require('../modules/es6.function.name'); require('../modules/es6.function.has-instance'); require('../modules/es6.parse-int'); require('../modules/es6.parse-float'); require('../modules/es6.number.constructor'); require('../modules/es6.number.to-fixed'); require('../modules/es6.number.to-precision'); require('../modules/es6.number.epsilon'); require('../modules/es6.number.is-finite'); require('../modules/es6.number.is-integer'); require('../modules/es6.number.is-nan'); require('../modules/es6.number.is-safe-integer'); require('../modules/es6.number.max-safe-integer'); require('../modules/es6.number.min-safe-integer'); require('../modules/es6.number.parse-float'); require('../modules/es6.number.parse-int'); require('../modules/es6.math.acosh'); require('../modules/es6.math.asinh'); require('../modules/es6.math.atanh'); require('../modules/es6.math.cbrt'); require('../modules/es6.math.clz32'); require('../modules/es6.math.cosh'); require('../modules/es6.math.expm1'); require('../modules/es6.math.fround'); require('../modules/es6.math.hypot'); require('../modules/es6.math.imul'); require('../modules/es6.math.log10'); require('../modules/es6.math.log1p'); require('../modules/es6.math.log2'); require('../modules/es6.math.sign'); require('../modules/es6.math.sinh'); require('../modules/es6.math.tanh'); require('../modules/es6.math.trunc'); require('../modules/es6.string.from-code-point'); require('../modules/es6.string.raw'); require('../modules/es6.string.trim'); require('../modules/es6.string.iterator'); require('../modules/es6.string.code-point-at'); require('../modules/es6.string.ends-with'); require('../modules/es6.string.includes'); require('../modules/es6.string.repeat'); require('../modules/es6.string.starts-with'); require('../modules/es6.string.anchor'); require('../modules/es6.string.big'); require('../modules/es6.string.blink'); require('../modules/es6.string.bold'); require('../modules/es6.string.fixed'); require('../modules/es6.string.fontcolor'); require('../modules/es6.string.fontsize'); require('../modules/es6.string.italics'); require('../modules/es6.string.link'); require('../modules/es6.string.small'); require('../modules/es6.string.strike'); require('../modules/es6.string.sub'); require('../modules/es6.string.sup'); require('../modules/es6.date.now'); require('../modules/es6.date.to-json'); require('../modules/es6.date.to-iso-string'); require('../modules/es6.date.to-string'); require('../modules/es6.date.to-primitive'); require('../modules/es6.array.is-array'); require('../modules/es6.array.from'); require('../modules/es6.array.of'); require('../modules/es6.array.join'); require('../modules/es6.array.slice'); require('../modules/es6.array.sort'); require('../modules/es6.array.for-each'); require('../modules/es6.array.map'); require('../modules/es6.array.filter'); require('../modules/es6.array.some'); require('../modules/es6.array.every'); require('../modules/es6.array.reduce'); require('../modules/es6.array.reduce-right'); require('../modules/es6.array.index-of'); require('../modules/es6.array.last-index-of'); require('../modules/es6.array.copy-within'); require('../modules/es6.array.fill'); require('../modules/es6.array.find'); require('../modules/es6.array.find-index'); require('../modules/es6.array.species'); require('../modules/es6.array.iterator'); require('../modules/es6.regexp.constructor'); require('../modules/es6.regexp.to-string'); require('../modules/es6.regexp.flags'); require('../modules/es6.regexp.match'); require('../modules/es6.regexp.replace'); require('../modules/es6.regexp.search'); require('../modules/es6.regexp.split'); require('../modules/es6.promise'); require('../modules/es6.map'); require('../modules/es6.set'); require('../modules/es6.weak-map'); require('../modules/es6.weak-set'); require('../modules/es6.typed.array-buffer'); require('../modules/es6.typed.data-view'); require('../modules/es6.typed.int8-array'); require('../modules/es6.typed.uint8-array'); require('../modules/es6.typed.uint8-clamped-array'); require('../modules/es6.typed.int16-array'); require('../modules/es6.typed.uint16-array'); require('../modules/es6.typed.int32-array'); require('../modules/es6.typed.uint32-array'); require('../modules/es6.typed.float32-array'); require('../modules/es6.typed.float64-array'); require('../modules/es6.reflect.apply'); require('../modules/es6.reflect.construct'); require('../modules/es6.reflect.define-property'); require('../modules/es6.reflect.delete-property'); require('../modules/es6.reflect.enumerate'); require('../modules/es6.reflect.get'); require('../modules/es6.reflect.get-own-property-descriptor'); require('../modules/es6.reflect.get-prototype-of'); require('../modules/es6.reflect.has'); require('../modules/es6.reflect.is-extensible'); require('../modules/es6.reflect.own-keys'); require('../modules/es6.reflect.prevent-extensions'); require('../modules/es6.reflect.set'); require('../modules/es6.reflect.set-prototype-of'); module.exports = require('../modules/_core');core-js-2.4.1/library/es6/map.js000066400000000000000000000003171274277553300163540ustar00rootroot00000000000000require('../modules/es6.object.to-string'); require('../modules/es6.string.iterator'); require('../modules/web.dom.iterable'); require('../modules/es6.map'); module.exports = require('../modules/_core').Map;core-js-2.4.1/library/es6/math.js000066400000000000000000000012621274277553300165300ustar00rootroot00000000000000require('../modules/es6.math.acosh'); require('../modules/es6.math.asinh'); require('../modules/es6.math.atanh'); require('../modules/es6.math.cbrt'); require('../modules/es6.math.clz32'); require('../modules/es6.math.cosh'); require('../modules/es6.math.expm1'); require('../modules/es6.math.fround'); require('../modules/es6.math.hypot'); require('../modules/es6.math.imul'); require('../modules/es6.math.log10'); require('../modules/es6.math.log1p'); require('../modules/es6.math.log2'); require('../modules/es6.math.sign'); require('../modules/es6.math.sinh'); require('../modules/es6.math.tanh'); require('../modules/es6.math.trunc'); module.exports = require('../modules/_core').Math;core-js-2.4.1/library/es6/number.js000066400000000000000000000011321274277553300170630ustar00rootroot00000000000000require('../modules/es6.number.constructor'); require('../modules/es6.number.to-fixed'); require('../modules/es6.number.to-precision'); require('../modules/es6.number.epsilon'); require('../modules/es6.number.is-finite'); require('../modules/es6.number.is-integer'); require('../modules/es6.number.is-nan'); require('../modules/es6.number.is-safe-integer'); require('../modules/es6.number.max-safe-integer'); require('../modules/es6.number.min-safe-integer'); require('../modules/es6.number.parse-float'); require('../modules/es6.number.parse-int'); module.exports = require('../modules/_core').Number;core-js-2.4.1/library/es6/object.js000066400000000000000000000015611274277553300170470ustar00rootroot00000000000000require('../modules/es6.symbol'); require('../modules/es6.object.create'); require('../modules/es6.object.define-property'); require('../modules/es6.object.define-properties'); require('../modules/es6.object.get-own-property-descriptor'); require('../modules/es6.object.get-prototype-of'); require('../modules/es6.object.keys'); require('../modules/es6.object.get-own-property-names'); require('../modules/es6.object.freeze'); require('../modules/es6.object.seal'); require('../modules/es6.object.prevent-extensions'); require('../modules/es6.object.is-frozen'); require('../modules/es6.object.is-sealed'); require('../modules/es6.object.is-extensible'); require('../modules/es6.object.assign'); require('../modules/es6.object.is'); require('../modules/es6.object.set-prototype-of'); require('../modules/es6.object.to-string'); module.exports = require('../modules/_core').Object;core-js-2.4.1/library/es6/parse-float.js000066400000000000000000000001371274277553300200140ustar00rootroot00000000000000require('../modules/es6.parse-float'); module.exports = require('../modules/_core').parseFloat;core-js-2.4.1/library/es6/parse-int.js000066400000000000000000000001331274277553300174750ustar00rootroot00000000000000require('../modules/es6.parse-int'); module.exports = require('../modules/_core').parseInt;core-js-2.4.1/library/es6/promise.js000066400000000000000000000003271274277553300172560ustar00rootroot00000000000000require('../modules/es6.object.to-string'); require('../modules/es6.string.iterator'); require('../modules/web.dom.iterable'); require('../modules/es6.promise'); module.exports = require('../modules/_core').Promise;core-js-2.4.1/library/es6/reflect.js000066400000000000000000000013151274277553300172220ustar00rootroot00000000000000require('../modules/es6.reflect.apply'); require('../modules/es6.reflect.construct'); require('../modules/es6.reflect.define-property'); require('../modules/es6.reflect.delete-property'); require('../modules/es6.reflect.enumerate'); require('../modules/es6.reflect.get'); require('../modules/es6.reflect.get-own-property-descriptor'); require('../modules/es6.reflect.get-prototype-of'); require('../modules/es6.reflect.has'); require('../modules/es6.reflect.is-extensible'); require('../modules/es6.reflect.own-keys'); require('../modules/es6.reflect.prevent-extensions'); require('../modules/es6.reflect.set'); require('../modules/es6.reflect.set-prototype-of'); module.exports = require('../modules/_core').Reflect;core-js-2.4.1/library/es6/regexp.js000066400000000000000000000005311274277553300170670ustar00rootroot00000000000000require('../modules/es6.regexp.constructor'); require('../modules/es6.regexp.to-string'); require('../modules/es6.regexp.flags'); require('../modules/es6.regexp.match'); require('../modules/es6.regexp.replace'); require('../modules/es6.regexp.search'); require('../modules/es6.regexp.split'); module.exports = require('../modules/_core').RegExp;core-js-2.4.1/library/es6/set.js000066400000000000000000000003171274277553300163720ustar00rootroot00000000000000require('../modules/es6.object.to-string'); require('../modules/es6.string.iterator'); require('../modules/web.dom.iterable'); require('../modules/es6.set'); module.exports = require('../modules/_core').Set;core-js-2.4.1/library/es6/string.js000066400000000000000000000021521274277553300171040ustar00rootroot00000000000000require('../modules/es6.string.from-code-point'); require('../modules/es6.string.raw'); require('../modules/es6.string.trim'); require('../modules/es6.string.iterator'); require('../modules/es6.string.code-point-at'); require('../modules/es6.string.ends-with'); require('../modules/es6.string.includes'); require('../modules/es6.string.repeat'); require('../modules/es6.string.starts-with'); require('../modules/es6.string.anchor'); require('../modules/es6.string.big'); require('../modules/es6.string.blink'); require('../modules/es6.string.bold'); require('../modules/es6.string.fixed'); require('../modules/es6.string.fontcolor'); require('../modules/es6.string.fontsize'); require('../modules/es6.string.italics'); require('../modules/es6.string.link'); require('../modules/es6.string.small'); require('../modules/es6.string.strike'); require('../modules/es6.string.sub'); require('../modules/es6.string.sup'); require('../modules/es6.regexp.match'); require('../modules/es6.regexp.replace'); require('../modules/es6.regexp.search'); require('../modules/es6.regexp.split'); module.exports = require('../modules/_core').String;core-js-2.4.1/library/es6/symbol.js000066400000000000000000000002021274277553300170750ustar00rootroot00000000000000require('../modules/es6.symbol'); require('../modules/es6.object.to-string'); module.exports = require('../modules/_core').Symbol;core-js-2.4.1/library/es6/typed.js000066400000000000000000000011241274277553300167210ustar00rootroot00000000000000require('../modules/es6.typed.array-buffer'); require('../modules/es6.typed.data-view'); require('../modules/es6.typed.int8-array'); require('../modules/es6.typed.uint8-array'); require('../modules/es6.typed.uint8-clamped-array'); require('../modules/es6.typed.int16-array'); require('../modules/es6.typed.uint16-array'); require('../modules/es6.typed.int32-array'); require('../modules/es6.typed.uint32-array'); require('../modules/es6.typed.float32-array'); require('../modules/es6.typed.float64-array'); require('../modules/es6.object.to-string'); module.exports = require('../modules/_core');core-js-2.4.1/library/es6/weak-map.js000066400000000000000000000002571274277553300173040ustar00rootroot00000000000000require('../modules/es6.object.to-string'); require('../modules/es6.array.iterator'); require('../modules/es6.weak-map'); module.exports = require('../modules/_core').WeakMap;core-js-2.4.1/library/es6/weak-set.js000066400000000000000000000002551274277553300173200ustar00rootroot00000000000000require('../modules/es6.object.to-string'); require('../modules/web.dom.iterable'); require('../modules/es6.weak-set'); module.exports = require('../modules/_core').WeakSet;core-js-2.4.1/library/es7/000077500000000000000000000000001274277553300152415ustar00rootroot00000000000000core-js-2.4.1/library/es7/array.js000066400000000000000000000001351274277553300167140ustar00rootroot00000000000000require('../modules/es7.array.includes'); module.exports = require('../modules/_core').Array;core-js-2.4.1/library/es7/asap.js000066400000000000000000000001231274277553300165170ustar00rootroot00000000000000require('../modules/es7.asap'); module.exports = require('../modules/_core').asap; core-js-2.4.1/library/es7/error.js000066400000000000000000000001351274277553300167270ustar00rootroot00000000000000require('../modules/es7.error.is-error'); module.exports = require('../modules/_core').Error;core-js-2.4.1/library/es7/index.js000066400000000000000000000031171274277553300167100ustar00rootroot00000000000000require('../modules/es7.array.includes'); require('../modules/es7.string.at'); require('../modules/es7.string.pad-start'); require('../modules/es7.string.pad-end'); require('../modules/es7.string.trim-left'); require('../modules/es7.string.trim-right'); require('../modules/es7.string.match-all'); require('../modules/es7.symbol.async-iterator'); require('../modules/es7.symbol.observable'); require('../modules/es7.object.get-own-property-descriptors'); require('../modules/es7.object.values'); require('../modules/es7.object.entries'); require('../modules/es7.object.define-getter'); require('../modules/es7.object.define-setter'); require('../modules/es7.object.lookup-getter'); require('../modules/es7.object.lookup-setter'); require('../modules/es7.map.to-json'); require('../modules/es7.set.to-json'); require('../modules/es7.system.global'); require('../modules/es7.error.is-error'); require('../modules/es7.math.iaddh'); require('../modules/es7.math.isubh'); require('../modules/es7.math.imulh'); require('../modules/es7.math.umulh'); require('../modules/es7.reflect.define-metadata'); require('../modules/es7.reflect.delete-metadata'); require('../modules/es7.reflect.get-metadata'); require('../modules/es7.reflect.get-metadata-keys'); require('../modules/es7.reflect.get-own-metadata'); require('../modules/es7.reflect.get-own-metadata-keys'); require('../modules/es7.reflect.has-metadata'); require('../modules/es7.reflect.has-own-metadata'); require('../modules/es7.reflect.metadata'); require('../modules/es7.asap'); require('../modules/es7.observable'); module.exports = require('../modules/_core'); core-js-2.4.1/library/es7/map.js000066400000000000000000000001301274277553300163460ustar00rootroot00000000000000require('../modules/es7.map.to-json'); module.exports = require('../modules/_core').Map;core-js-2.4.1/library/es7/math.js000066400000000000000000000003131274277553300165250ustar00rootroot00000000000000require('../modules/es7.math.iaddh'); require('../modules/es7.math.isubh'); require('../modules/es7.math.imulh'); require('../modules/es7.math.umulh'); module.exports = require('../modules/_core').Math; core-js-2.4.1/library/es7/object.js000066400000000000000000000006061274277553300170470ustar00rootroot00000000000000require('../modules/es7.object.get-own-property-descriptors'); require('../modules/es7.object.values'); require('../modules/es7.object.entries'); require('../modules/es7.object.define-getter'); require('../modules/es7.object.define-setter'); require('../modules/es7.object.lookup-getter'); require('../modules/es7.object.lookup-setter'); module.exports = require('../modules/_core').Object;core-js-2.4.1/library/es7/observable.js000066400000000000000000000004551274277553300177270ustar00rootroot00000000000000require('../modules/es6.object.to-string'); require('../modules/es6.string.iterator'); require('../modules/web.dom.iterable'); require('../modules/es6.promise'); require('../modules/es7.symbol.observable'); require('../modules/es7.observable'); module.exports = require('../modules/_core').Observable;core-js-2.4.1/library/es7/reflect.js000066400000000000000000000007761274277553300172350ustar00rootroot00000000000000require('../modules/es7.reflect.define-metadata'); require('../modules/es7.reflect.delete-metadata'); require('../modules/es7.reflect.get-metadata'); require('../modules/es7.reflect.get-metadata-keys'); require('../modules/es7.reflect.get-own-metadata'); require('../modules/es7.reflect.get-own-metadata-keys'); require('../modules/es7.reflect.has-metadata'); require('../modules/es7.reflect.has-own-metadata'); require('../modules/es7.reflect.metadata'); module.exports = require('../modules/_core').Reflect; core-js-2.4.1/library/es7/set.js000066400000000000000000000001301274277553300163640ustar00rootroot00000000000000require('../modules/es7.set.to-json'); module.exports = require('../modules/_core').Set;core-js-2.4.1/library/es7/string.js000066400000000000000000000004651274277553300171120ustar00rootroot00000000000000require('../modules/es7.string.at'); require('../modules/es7.string.pad-start'); require('../modules/es7.string.pad-end'); require('../modules/es7.string.trim-left'); require('../modules/es7.string.trim-right'); require('../modules/es7.string.match-all'); module.exports = require('../modules/_core').String; core-js-2.4.1/library/es7/symbol.js000066400000000000000000000002221274277553300171000ustar00rootroot00000000000000require('../modules/es7.symbol.async-iterator'); require('../modules/es7.symbol.observable'); module.exports = require('../modules/_core').Symbol;core-js-2.4.1/library/es7/system.js000066400000000000000000000001351274277553300171220ustar00rootroot00000000000000require('../modules/es7.system.global'); module.exports = require('../modules/_core').System;core-js-2.4.1/library/fn/000077500000000000000000000000001274277553300151465ustar00rootroot00000000000000core-js-2.4.1/library/fn/_.js000066400000000000000000000001311274277553300157150ustar00rootroot00000000000000require('../modules/core.function.part'); module.exports = require('../modules/_core')._;core-js-2.4.1/library/fn/array/000077500000000000000000000000001274277553300162645ustar00rootroot00000000000000core-js-2.4.1/library/fn/array/concat.js000066400000000000000000000002061274277553300200670ustar00rootroot00000000000000// for a legacy code and future fixes module.exports = function(){ return Function.call.apply(Array.prototype.concat, arguments); };core-js-2.4.1/library/fn/array/copy-within.js000066400000000000000000000001611274277553300210720ustar00rootroot00000000000000require('../../modules/es6.array.copy-within'); module.exports = require('../../modules/_core').Array.copyWithin;core-js-2.4.1/library/fn/array/entries.js000066400000000000000000000001531274277553300202720ustar00rootroot00000000000000require('../../modules/es6.array.iterator'); module.exports = require('../../modules/_core').Array.entries;core-js-2.4.1/library/fn/array/every.js000066400000000000000000000001461274277553300177550ustar00rootroot00000000000000require('../../modules/es6.array.every'); module.exports = require('../../modules/_core').Array.every;core-js-2.4.1/library/fn/array/fill.js000066400000000000000000000001441274277553300175470ustar00rootroot00000000000000require('../../modules/es6.array.fill'); module.exports = require('../../modules/_core').Array.fill;core-js-2.4.1/library/fn/array/filter.js000066400000000000000000000001501274277553300201030ustar00rootroot00000000000000require('../../modules/es6.array.filter'); module.exports = require('../../modules/_core').Array.filter;core-js-2.4.1/library/fn/array/find-index.js000066400000000000000000000001571274277553300206520ustar00rootroot00000000000000require('../../modules/es6.array.find-index'); module.exports = require('../../modules/_core').Array.findIndex;core-js-2.4.1/library/fn/array/find.js000066400000000000000000000001441274277553300175410ustar00rootroot00000000000000require('../../modules/es6.array.find'); module.exports = require('../../modules/_core').Array.find;core-js-2.4.1/library/fn/array/for-each.js000066400000000000000000000001531274277553300203050ustar00rootroot00000000000000require('../../modules/es6.array.for-each'); module.exports = require('../../modules/_core').Array.forEach;core-js-2.4.1/library/fn/array/from.js000066400000000000000000000002221274277553300175610ustar00rootroot00000000000000require('../../modules/es6.string.iterator'); require('../../modules/es6.array.from'); module.exports = require('../../modules/_core').Array.from;core-js-2.4.1/library/fn/array/includes.js000066400000000000000000000001541274277553300204300ustar00rootroot00000000000000require('../../modules/es7.array.includes'); module.exports = require('../../modules/_core').Array.includes;core-js-2.4.1/library/fn/array/index-of.js000066400000000000000000000001531274277553300203320ustar00rootroot00000000000000require('../../modules/es6.array.index-of'); module.exports = require('../../modules/_core').Array.indexOf;core-js-2.4.1/library/fn/array/index.js000066400000000000000000000020421274277553300177270ustar00rootroot00000000000000require('../../modules/es6.string.iterator'); require('../../modules/es6.array.is-array'); require('../../modules/es6.array.from'); require('../../modules/es6.array.of'); require('../../modules/es6.array.join'); require('../../modules/es6.array.slice'); require('../../modules/es6.array.sort'); require('../../modules/es6.array.for-each'); require('../../modules/es6.array.map'); require('../../modules/es6.array.filter'); require('../../modules/es6.array.some'); require('../../modules/es6.array.every'); require('../../modules/es6.array.reduce'); require('../../modules/es6.array.reduce-right'); require('../../modules/es6.array.index-of'); require('../../modules/es6.array.last-index-of'); require('../../modules/es6.array.copy-within'); require('../../modules/es6.array.fill'); require('../../modules/es6.array.find'); require('../../modules/es6.array.find-index'); require('../../modules/es6.array.species'); require('../../modules/es6.array.iterator'); require('../../modules/es7.array.includes'); module.exports = require('../../modules/_core').Array;core-js-2.4.1/library/fn/array/is-array.js000066400000000000000000000001531274277553300203500ustar00rootroot00000000000000require('../../modules/es6.array.is-array'); module.exports = require('../../modules/_core').Array.isArray;core-js-2.4.1/library/fn/array/iterator.js000066400000000000000000000001521274277553300204510ustar00rootroot00000000000000require('../../modules/es6.array.iterator'); module.exports = require('../../modules/_core').Array.values;core-js-2.4.1/library/fn/array/join.js000066400000000000000000000001441274277553300175600ustar00rootroot00000000000000require('../../modules/es6.array.join'); module.exports = require('../../modules/_core').Array.join;core-js-2.4.1/library/fn/array/keys.js000066400000000000000000000001501274277553300175710ustar00rootroot00000000000000require('../../modules/es6.array.iterator'); module.exports = require('../../modules/_core').Array.keys;core-js-2.4.1/library/fn/array/last-index-of.js000066400000000000000000000001641274277553300212750ustar00rootroot00000000000000require('../../modules/es6.array.last-index-of'); module.exports = require('../../modules/_core').Array.lastIndexOf;core-js-2.4.1/library/fn/array/map.js000066400000000000000000000001421274277553300173740ustar00rootroot00000000000000require('../../modules/es6.array.map'); module.exports = require('../../modules/_core').Array.map;core-js-2.4.1/library/fn/array/of.js000066400000000000000000000001401274277553300172210ustar00rootroot00000000000000require('../../modules/es6.array.of'); module.exports = require('../../modules/_core').Array.of;core-js-2.4.1/library/fn/array/pop.js000066400000000000000000000002031274277553300174130ustar00rootroot00000000000000// for a legacy code and future fixes module.exports = function(){ return Function.call.apply(Array.prototype.pop, arguments); };core-js-2.4.1/library/fn/array/push.js000066400000000000000000000002041274277553300175750ustar00rootroot00000000000000// for a legacy code and future fixes module.exports = function(){ return Function.call.apply(Array.prototype.push, arguments); };core-js-2.4.1/library/fn/array/reduce-right.js000066400000000000000000000001631274277553300212040ustar00rootroot00000000000000require('../../modules/es6.array.reduce-right'); module.exports = require('../../modules/_core').Array.reduceRight;core-js-2.4.1/library/fn/array/reduce.js000066400000000000000000000001501274277553300200650ustar00rootroot00000000000000require('../../modules/es6.array.reduce'); module.exports = require('../../modules/_core').Array.reduce;core-js-2.4.1/library/fn/array/reverse.js000066400000000000000000000002071274277553300202740ustar00rootroot00000000000000// for a legacy code and future fixes module.exports = function(){ return Function.call.apply(Array.prototype.reverse, arguments); };core-js-2.4.1/library/fn/array/shift.js000066400000000000000000000002051274277553300177340ustar00rootroot00000000000000// for a legacy code and future fixes module.exports = function(){ return Function.call.apply(Array.prototype.shift, arguments); };core-js-2.4.1/library/fn/array/slice.js000066400000000000000000000001461274277553300177220ustar00rootroot00000000000000require('../../modules/es6.array.slice'); module.exports = require('../../modules/_core').Array.slice;core-js-2.4.1/library/fn/array/some.js000066400000000000000000000001441274277553300175640ustar00rootroot00000000000000require('../../modules/es6.array.some'); module.exports = require('../../modules/_core').Array.some;core-js-2.4.1/library/fn/array/sort.js000066400000000000000000000001441274277553300176100ustar00rootroot00000000000000require('../../modules/es6.array.sort'); module.exports = require('../../modules/_core').Array.sort;core-js-2.4.1/library/fn/array/splice.js000066400000000000000000000002061274277553300200770ustar00rootroot00000000000000// for a legacy code and future fixes module.exports = function(){ return Function.call.apply(Array.prototype.splice, arguments); };core-js-2.4.1/library/fn/array/unshift.js000066400000000000000000000002071274277553300203010ustar00rootroot00000000000000// for a legacy code and future fixes module.exports = function(){ return Function.call.apply(Array.prototype.unshift, arguments); };core-js-2.4.1/library/fn/array/values.js000066400000000000000000000001521274277553300201170ustar00rootroot00000000000000require('../../modules/es6.array.iterator'); module.exports = require('../../modules/_core').Array.values;core-js-2.4.1/library/fn/array/virtual/000077500000000000000000000000001274277553300177525ustar00rootroot00000000000000core-js-2.4.1/library/fn/array/virtual/copy-within.js000066400000000000000000000002031274277553300225550ustar00rootroot00000000000000require('../../../modules/es6.array.copy-within'); module.exports = require('../../../modules/_entry-virtual')('Array').copyWithin;core-js-2.4.1/library/fn/array/virtual/entries.js000066400000000000000000000001751274277553300217640ustar00rootroot00000000000000require('../../../modules/es6.array.iterator'); module.exports = require('../../../modules/_entry-virtual')('Array').entries;core-js-2.4.1/library/fn/array/virtual/every.js000066400000000000000000000001701274277553300214400ustar00rootroot00000000000000require('../../../modules/es6.array.every'); module.exports = require('../../../modules/_entry-virtual')('Array').every;core-js-2.4.1/library/fn/array/virtual/fill.js000066400000000000000000000001661274277553300212410ustar00rootroot00000000000000require('../../../modules/es6.array.fill'); module.exports = require('../../../modules/_entry-virtual')('Array').fill;core-js-2.4.1/library/fn/array/virtual/filter.js000066400000000000000000000001721274277553300215750ustar00rootroot00000000000000require('../../../modules/es6.array.filter'); module.exports = require('../../../modules/_entry-virtual')('Array').filter;core-js-2.4.1/library/fn/array/virtual/find-index.js000066400000000000000000000002011274277553300223260ustar00rootroot00000000000000require('../../../modules/es6.array.find-index'); module.exports = require('../../../modules/_entry-virtual')('Array').findIndex;core-js-2.4.1/library/fn/array/virtual/find.js000066400000000000000000000001661274277553300212330ustar00rootroot00000000000000require('../../../modules/es6.array.find'); module.exports = require('../../../modules/_entry-virtual')('Array').find;core-js-2.4.1/library/fn/array/virtual/for-each.js000066400000000000000000000001751274277553300217770ustar00rootroot00000000000000require('../../../modules/es6.array.for-each'); module.exports = require('../../../modules/_entry-virtual')('Array').forEach;core-js-2.4.1/library/fn/array/virtual/includes.js000066400000000000000000000001761274277553300221220ustar00rootroot00000000000000require('../../../modules/es7.array.includes'); module.exports = require('../../../modules/_entry-virtual')('Array').includes;core-js-2.4.1/library/fn/array/virtual/index-of.js000066400000000000000000000001751274277553300220240ustar00rootroot00000000000000require('../../../modules/es6.array.index-of'); module.exports = require('../../../modules/_entry-virtual')('Array').indexOf;core-js-2.4.1/library/fn/array/virtual/index.js000066400000000000000000000017011274277553300214160ustar00rootroot00000000000000require('../../../modules/es6.array.join'); require('../../../modules/es6.array.slice'); require('../../../modules/es6.array.sort'); require('../../../modules/es6.array.for-each'); require('../../../modules/es6.array.map'); require('../../../modules/es6.array.filter'); require('../../../modules/es6.array.some'); require('../../../modules/es6.array.every'); require('../../../modules/es6.array.reduce'); require('../../../modules/es6.array.reduce-right'); require('../../../modules/es6.array.index-of'); require('../../../modules/es6.array.last-index-of'); require('../../../modules/es6.string.iterator'); require('../../../modules/es6.array.iterator'); require('../../../modules/es6.array.copy-within'); require('../../../modules/es6.array.fill'); require('../../../modules/es6.array.find'); require('../../../modules/es6.array.find-index'); require('../../../modules/es7.array.includes'); module.exports = require('../../../modules/_entry-virtual')('Array');core-js-2.4.1/library/fn/array/virtual/iterator.js000066400000000000000000000001601274277553300221360ustar00rootroot00000000000000require('../../../modules/core.number.iterator'); module.exports = require('../../../modules/_iterators').Array;core-js-2.4.1/library/fn/array/virtual/join.js000066400000000000000000000001661274277553300212520ustar00rootroot00000000000000require('../../../modules/es6.array.join'); module.exports = require('../../../modules/_entry-virtual')('Array').join;core-js-2.4.1/library/fn/array/virtual/keys.js000066400000000000000000000001721274277553300212630ustar00rootroot00000000000000require('../../../modules/es6.array.iterator'); module.exports = require('../../../modules/_entry-virtual')('Array').keys;core-js-2.4.1/library/fn/array/virtual/last-index-of.js000066400000000000000000000002061274277553300227600ustar00rootroot00000000000000require('../../../modules/es6.array.last-index-of'); module.exports = require('../../../modules/_entry-virtual')('Array').lastIndexOf;core-js-2.4.1/library/fn/array/virtual/map.js000066400000000000000000000001641274277553300210660ustar00rootroot00000000000000require('../../../modules/es6.array.map'); module.exports = require('../../../modules/_entry-virtual')('Array').map;core-js-2.4.1/library/fn/array/virtual/reduce-right.js000066400000000000000000000002051274277553300226670ustar00rootroot00000000000000require('../../../modules/es6.array.reduce-right'); module.exports = require('../../../modules/_entry-virtual')('Array').reduceRight;core-js-2.4.1/library/fn/array/virtual/reduce.js000066400000000000000000000001721274277553300215570ustar00rootroot00000000000000require('../../../modules/es6.array.reduce'); module.exports = require('../../../modules/_entry-virtual')('Array').reduce;core-js-2.4.1/library/fn/array/virtual/slice.js000066400000000000000000000001701274277553300214050ustar00rootroot00000000000000require('../../../modules/es6.array.slice'); module.exports = require('../../../modules/_entry-virtual')('Array').slice;core-js-2.4.1/library/fn/array/virtual/some.js000066400000000000000000000001661274277553300212560ustar00rootroot00000000000000require('../../../modules/es6.array.some'); module.exports = require('../../../modules/_entry-virtual')('Array').some;core-js-2.4.1/library/fn/array/virtual/sort.js000066400000000000000000000001661274277553300213020ustar00rootroot00000000000000require('../../../modules/es6.array.sort'); module.exports = require('../../../modules/_entry-virtual')('Array').sort;core-js-2.4.1/library/fn/array/virtual/values.js000066400000000000000000000001601274277553300216040ustar00rootroot00000000000000require('../../../modules/core.number.iterator'); module.exports = require('../../../modules/_iterators').Array;core-js-2.4.1/library/fn/asap.js000066400000000000000000000001221274277553300164230ustar00rootroot00000000000000require('../modules/es7.asap'); module.exports = require('../modules/_core').asap;core-js-2.4.1/library/fn/clear-immediate.js000066400000000000000000000001411274277553300205220ustar00rootroot00000000000000require('../modules/web.immediate'); module.exports = require('../modules/_core').clearImmediate;core-js-2.4.1/library/fn/date/000077500000000000000000000000001274277553300160635ustar00rootroot00000000000000core-js-2.4.1/library/fn/date/index.js000066400000000000000000000004251274277553300175310ustar00rootroot00000000000000require('../../modules/es6.date.now'); require('../../modules/es6.date.to-json'); require('../../modules/es6.date.to-iso-string'); require('../../modules/es6.date.to-string'); require('../../modules/es6.date.to-primitive'); module.exports = require('../../modules/_core').Date;core-js-2.4.1/library/fn/date/now.js000066400000000000000000000001401274277553300172170ustar00rootroot00000000000000require('../../modules/es6.date.now'); module.exports = require('../../modules/_core').Date.now;core-js-2.4.1/library/fn/date/to-iso-string.js000066400000000000000000000002351274277553300211370ustar00rootroot00000000000000require('../../modules/es6.date.to-json'); require('../../modules/es6.date.to-iso-string'); module.exports = require('../../modules/_core').Date.toISOString;core-js-2.4.1/library/fn/date/to-json.js000066400000000000000000000001471274277553300200140ustar00rootroot00000000000000require('../../modules/es6.date.to-json'); module.exports = require('../../modules/_core').Date.toJSON;core-js-2.4.1/library/fn/date/to-primitive.js000066400000000000000000000002731274277553300210530ustar00rootroot00000000000000require('../../modules/es6.date.to-primitive'); var toPrimitive = require('../../modules/_date-to-primitive'); module.exports = function(it, hint){ return toPrimitive.call(it, hint); };core-js-2.4.1/library/fn/date/to-string.js000066400000000000000000000002341274277553300203460ustar00rootroot00000000000000require('../../modules/es6.date.to-string') var $toString = Date.prototype.toString; module.exports = function toString(it){ return $toString.call(it); };core-js-2.4.1/library/fn/delay.js000066400000000000000000000001261274277553300166010ustar00rootroot00000000000000require('../modules/core.delay'); module.exports = require('../modules/_core').delay; core-js-2.4.1/library/fn/dict.js000066400000000000000000000001231274277553300164230ustar00rootroot00000000000000require('../modules/core.dict'); module.exports = require('../modules/_core').Dict;core-js-2.4.1/library/fn/dom-collections/000077500000000000000000000000001274277553300202415ustar00rootroot00000000000000core-js-2.4.1/library/fn/dom-collections/index.js000066400000000000000000000003701274277553300217060ustar00rootroot00000000000000require('../../modules/web.dom.iterable'); var $iterators = require('../../modules/es6.array.iterator'); module.exports = { keys: $iterators.keys, values: $iterators.values, entries: $iterators.entries, iterator: $iterators.values };core-js-2.4.1/library/fn/dom-collections/iterator.js000066400000000000000000000001501274277553300224240ustar00rootroot00000000000000require('../../modules/web.dom.iterable'); module.exports = require('../../modules/_core').Array.values;core-js-2.4.1/library/fn/error/000077500000000000000000000000001274277553300162775ustar00rootroot00000000000000core-js-2.4.1/library/fn/error/index.js000066400000000000000000000001431274277553300177420ustar00rootroot00000000000000require('../../modules/es7.error.is-error'); module.exports = require('../../modules/_core').Error;core-js-2.4.1/library/fn/error/is-error.js000066400000000000000000000001531274277553300203760ustar00rootroot00000000000000require('../../modules/es7.error.is-error'); module.exports = require('../../modules/_core').Error.isError;core-js-2.4.1/library/fn/function/000077500000000000000000000000001274277553300167735ustar00rootroot00000000000000core-js-2.4.1/library/fn/function/bind.js000066400000000000000000000001521274277553300202430ustar00rootroot00000000000000require('../../modules/es6.function.bind'); module.exports = require('../../modules/_core').Function.bind;core-js-2.4.1/library/fn/function/has-instance.js000066400000000000000000000001741274277553300217100ustar00rootroot00000000000000require('../../modules/es6.function.has-instance'); module.exports = Function[require('../../modules/_wks')('hasInstance')];core-js-2.4.1/library/fn/function/index.js000066400000000000000000000003631274277553300204420ustar00rootroot00000000000000require('../../modules/es6.function.bind'); require('../../modules/es6.function.name'); require('../../modules/es6.function.has-instance'); require('../../modules/core.function.part'); module.exports = require('../../modules/_core').Function; core-js-2.4.1/library/fn/function/name.js000066400000000000000000000000531274277553300202470ustar00rootroot00000000000000require('../../modules/es6.function.name');core-js-2.4.1/library/fn/function/part.js000066400000000000000000000001531274277553300202760ustar00rootroot00000000000000require('../../modules/core.function.part'); module.exports = require('../../modules/_core').Function.part;core-js-2.4.1/library/fn/function/virtual/000077500000000000000000000000001274277553300204615ustar00rootroot00000000000000core-js-2.4.1/library/fn/function/virtual/bind.js000066400000000000000000000001741274277553300217350ustar00rootroot00000000000000require('../../../modules/es6.function.bind'); module.exports = require('../../../modules/_entry-virtual')('Function').bind;core-js-2.4.1/library/fn/function/virtual/index.js000066400000000000000000000002471274277553300221310ustar00rootroot00000000000000require('../../../modules/es6.function.bind'); require('../../../modules/core.function.part'); module.exports = require('../../../modules/_entry-virtual')('Function');core-js-2.4.1/library/fn/function/virtual/part.js000066400000000000000000000001751274277553300217700ustar00rootroot00000000000000require('../../../modules/core.function.part'); module.exports = require('../../../modules/_entry-virtual')('Function').part;core-js-2.4.1/library/fn/get-iterator-method.js000066400000000000000000000002231274277553300213650ustar00rootroot00000000000000require('../modules/web.dom.iterable'); require('../modules/es6.string.iterator'); module.exports = require('../modules/core.get-iterator-method');core-js-2.4.1/library/fn/get-iterator.js000066400000000000000000000002141274277553300201070ustar00rootroot00000000000000require('../modules/web.dom.iterable'); require('../modules/es6.string.iterator'); module.exports = require('../modules/core.get-iterator');core-js-2.4.1/library/fn/is-iterable.js000066400000000000000000000002131274277553300177000ustar00rootroot00000000000000require('../modules/web.dom.iterable'); require('../modules/es6.string.iterator'); module.exports = require('../modules/core.is-iterable');core-js-2.4.1/library/fn/json/000077500000000000000000000000001274277553300161175ustar00rootroot00000000000000core-js-2.4.1/library/fn/json/index.js000066400000000000000000000001631274277553300175640ustar00rootroot00000000000000var core = require('../../modules/_core'); module.exports = core.JSON || (core.JSON = {stringify: JSON.stringify});core-js-2.4.1/library/fn/json/stringify.js000066400000000000000000000003621274277553300204740ustar00rootroot00000000000000var core = require('../../modules/_core') , $JSON = core.JSON || (core.JSON = {stringify: JSON.stringify}); module.exports = function stringify(it){ // eslint-disable-line no-unused-vars return $JSON.stringify.apply($JSON, arguments); };core-js-2.4.1/library/fn/map.js000066400000000000000000000003661274277553300162660ustar00rootroot00000000000000require('../modules/es6.object.to-string'); require('../modules/es6.string.iterator'); require('../modules/web.dom.iterable'); require('../modules/es6.map'); require('../modules/es7.map.to-json'); module.exports = require('../modules/_core').Map;core-js-2.4.1/library/fn/math/000077500000000000000000000000001274277553300160775ustar00rootroot00000000000000core-js-2.4.1/library/fn/math/acosh.js000066400000000000000000000001441274277553300175310ustar00rootroot00000000000000require('../../modules/es6.math.acosh'); module.exports = require('../../modules/_core').Math.acosh;core-js-2.4.1/library/fn/math/asinh.js000066400000000000000000000001441274277553300175360ustar00rootroot00000000000000require('../../modules/es6.math.asinh'); module.exports = require('../../modules/_core').Math.asinh;core-js-2.4.1/library/fn/math/atanh.js000066400000000000000000000001441274277553300175270ustar00rootroot00000000000000require('../../modules/es6.math.atanh'); module.exports = require('../../modules/_core').Math.atanh;core-js-2.4.1/library/fn/math/cbrt.js000066400000000000000000000001421274277553300173640ustar00rootroot00000000000000require('../../modules/es6.math.cbrt'); module.exports = require('../../modules/_core').Math.cbrt;core-js-2.4.1/library/fn/math/clz32.js000066400000000000000000000001441274277553300173710ustar00rootroot00000000000000require('../../modules/es6.math.clz32'); module.exports = require('../../modules/_core').Math.clz32;core-js-2.4.1/library/fn/math/cosh.js000066400000000000000000000001421274277553300173660ustar00rootroot00000000000000require('../../modules/es6.math.cosh'); module.exports = require('../../modules/_core').Math.cosh;core-js-2.4.1/library/fn/math/expm1.js000066400000000000000000000001441274277553300174660ustar00rootroot00000000000000require('../../modules/es6.math.expm1'); module.exports = require('../../modules/_core').Math.expm1;core-js-2.4.1/library/fn/math/fround.js000066400000000000000000000001461274277553300177330ustar00rootroot00000000000000require('../../modules/es6.math.fround'); module.exports = require('../../modules/_core').Math.fround;core-js-2.4.1/library/fn/math/hypot.js000066400000000000000000000001441274277553300175770ustar00rootroot00000000000000require('../../modules/es6.math.hypot'); module.exports = require('../../modules/_core').Math.hypot;core-js-2.4.1/library/fn/math/iaddh.js000066400000000000000000000001441274277553300175050ustar00rootroot00000000000000require('../../modules/es7.math.iaddh'); module.exports = require('../../modules/_core').Math.iaddh;core-js-2.4.1/library/fn/math/imul.js000066400000000000000000000001421274277553300174000ustar00rootroot00000000000000require('../../modules/es6.math.imul'); module.exports = require('../../modules/_core').Math.imul;core-js-2.4.1/library/fn/math/imulh.js000066400000000000000000000001441274277553300175520ustar00rootroot00000000000000require('../../modules/es7.math.imulh'); module.exports = require('../../modules/_core').Math.imulh;core-js-2.4.1/library/fn/math/index.js000066400000000000000000000016141274277553300175460ustar00rootroot00000000000000require('../../modules/es6.math.acosh'); require('../../modules/es6.math.asinh'); require('../../modules/es6.math.atanh'); require('../../modules/es6.math.cbrt'); require('../../modules/es6.math.clz32'); require('../../modules/es6.math.cosh'); require('../../modules/es6.math.expm1'); require('../../modules/es6.math.fround'); require('../../modules/es6.math.hypot'); require('../../modules/es6.math.imul'); require('../../modules/es6.math.log10'); require('../../modules/es6.math.log1p'); require('../../modules/es6.math.log2'); require('../../modules/es6.math.sign'); require('../../modules/es6.math.sinh'); require('../../modules/es6.math.tanh'); require('../../modules/es6.math.trunc'); require('../../modules/es7.math.iaddh'); require('../../modules/es7.math.isubh'); require('../../modules/es7.math.imulh'); require('../../modules/es7.math.umulh'); module.exports = require('../../modules/_core').Math;core-js-2.4.1/library/fn/math/isubh.js000066400000000000000000000001441274277553300175460ustar00rootroot00000000000000require('../../modules/es7.math.isubh'); module.exports = require('../../modules/_core').Math.isubh;core-js-2.4.1/library/fn/math/log10.js000066400000000000000000000001441274277553300173560ustar00rootroot00000000000000require('../../modules/es6.math.log10'); module.exports = require('../../modules/_core').Math.log10;core-js-2.4.1/library/fn/math/log1p.js000066400000000000000000000001441274277553300174560ustar00rootroot00000000000000require('../../modules/es6.math.log1p'); module.exports = require('../../modules/_core').Math.log1p;core-js-2.4.1/library/fn/math/log2.js000066400000000000000000000001421274277553300172750ustar00rootroot00000000000000require('../../modules/es6.math.log2'); module.exports = require('../../modules/_core').Math.log2;core-js-2.4.1/library/fn/math/sign.js000066400000000000000000000001421274277553300173720ustar00rootroot00000000000000require('../../modules/es6.math.sign'); module.exports = require('../../modules/_core').Math.sign;core-js-2.4.1/library/fn/math/sinh.js000066400000000000000000000001421274277553300173730ustar00rootroot00000000000000require('../../modules/es6.math.sinh'); module.exports = require('../../modules/_core').Math.sinh;core-js-2.4.1/library/fn/math/tanh.js000066400000000000000000000001421274277553300173640ustar00rootroot00000000000000require('../../modules/es6.math.tanh'); module.exports = require('../../modules/_core').Math.tanh;core-js-2.4.1/library/fn/math/trunc.js000066400000000000000000000001441274277553300175670ustar00rootroot00000000000000require('../../modules/es6.math.trunc'); module.exports = require('../../modules/_core').Math.trunc;core-js-2.4.1/library/fn/math/umulh.js000066400000000000000000000001441274277553300175660ustar00rootroot00000000000000require('../../modules/es7.math.umulh'); module.exports = require('../../modules/_core').Math.umulh;core-js-2.4.1/library/fn/number/000077500000000000000000000000001274277553300164365ustar00rootroot00000000000000core-js-2.4.1/library/fn/number/constructor.js000066400000000000000000000001111274277553300213520ustar00rootroot00000000000000require('../../modules/es6.number.constructor'); module.exports = Number;core-js-2.4.1/library/fn/number/epsilon.js000066400000000000000000000001171274277553300204440ustar00rootroot00000000000000require('../../modules/es6.number.epsilon'); module.exports = Math.pow(2, -52);core-js-2.4.1/library/fn/number/index.js000066400000000000000000000012601274277553300201020ustar00rootroot00000000000000require('../../modules/es6.number.constructor'); require('../../modules/es6.number.epsilon'); require('../../modules/es6.number.is-finite'); require('../../modules/es6.number.is-integer'); require('../../modules/es6.number.is-nan'); require('../../modules/es6.number.is-safe-integer'); require('../../modules/es6.number.max-safe-integer'); require('../../modules/es6.number.min-safe-integer'); require('../../modules/es6.number.parse-float'); require('../../modules/es6.number.parse-int'); require('../../modules/es6.number.to-fixed'); require('../../modules/es6.number.to-precision'); require('../../modules/core.number.iterator'); module.exports = require('../../modules/_core').Number;core-js-2.4.1/library/fn/number/is-finite.js000066400000000000000000000001571274277553300206660ustar00rootroot00000000000000require('../../modules/es6.number.is-finite'); module.exports = require('../../modules/_core').Number.isFinite;core-js-2.4.1/library/fn/number/is-integer.js000066400000000000000000000001611274277553300210400ustar00rootroot00000000000000require('../../modules/es6.number.is-integer'); module.exports = require('../../modules/_core').Number.isInteger;core-js-2.4.1/library/fn/number/is-nan.js000066400000000000000000000001511274277553300201560ustar00rootroot00000000000000require('../../modules/es6.number.is-nan'); module.exports = require('../../modules/_core').Number.isNaN;core-js-2.4.1/library/fn/number/is-safe-integer.js000066400000000000000000000001721274277553300217560ustar00rootroot00000000000000require('../../modules/es6.number.is-safe-integer'); module.exports = require('../../modules/_core').Number.isSafeInteger;core-js-2.4.1/library/fn/number/iterator.js000066400000000000000000000002351274277553300206250ustar00rootroot00000000000000require('../../modules/core.number.iterator'); var get = require('../../modules/_iterators').Number; module.exports = function(it){ return get.call(it); };core-js-2.4.1/library/fn/number/max-safe-integer.js000066400000000000000000000001301274277553300221220ustar00rootroot00000000000000require('../../modules/es6.number.max-safe-integer'); module.exports = 0x1fffffffffffff;core-js-2.4.1/library/fn/number/min-safe-integer.js000066400000000000000000000001311274277553300221210ustar00rootroot00000000000000require('../../modules/es6.number.min-safe-integer'); module.exports = -0x1fffffffffffff;core-js-2.4.1/library/fn/number/parse-float.js000066400000000000000000000001151274277553300212060ustar00rootroot00000000000000require('../../modules/es6.number.parse-float'); module.exports = parseFloat;core-js-2.4.1/library/fn/number/parse-int.js000066400000000000000000000001111274277553300206670ustar00rootroot00000000000000require('../../modules/es6.number.parse-int'); module.exports = parseInt;core-js-2.4.1/library/fn/number/to-fixed.js000066400000000000000000000001551274277553300205140ustar00rootroot00000000000000require('../../modules/es6.number.to-fixed'); module.exports = require('../../modules/_core').Number.toFixed;core-js-2.4.1/library/fn/number/to-precision.js000066400000000000000000000001651274277553300214110ustar00rootroot00000000000000require('../../modules/es6.number.to-precision'); module.exports = require('../../modules/_core').Number.toPrecision;core-js-2.4.1/library/fn/number/virtual/000077500000000000000000000000001274277553300201245ustar00rootroot00000000000000core-js-2.4.1/library/fn/number/virtual/index.js000066400000000000000000000003211274277553300215650ustar00rootroot00000000000000require('../../../modules/core.number.iterator'); var $Number = require('../../../modules/_entry-virtual')('Number'); $Number.iterator = require('../../../modules/_iterators').Number; module.exports = $Number;core-js-2.4.1/library/fn/number/virtual/iterator.js000066400000000000000000000001611274277553300223110ustar00rootroot00000000000000require('../../../modules/core.number.iterator'); module.exports = require('../../../modules/_iterators').Number;core-js-2.4.1/library/fn/number/virtual/to-fixed.js000066400000000000000000000001771274277553300222060ustar00rootroot00000000000000require('../../../modules/es6.number.to-fixed'); module.exports = require('../../../modules/_entry-virtual')('Number').toFixed;core-js-2.4.1/library/fn/number/virtual/to-precision.js000066400000000000000000000002071274277553300230740ustar00rootroot00000000000000require('../../../modules/es6.number.to-precision'); module.exports = require('../../../modules/_entry-virtual')('Number').toPrecision;core-js-2.4.1/library/fn/object/000077500000000000000000000000001274277553300164145ustar00rootroot00000000000000core-js-2.4.1/library/fn/object/assign.js000066400000000000000000000001521274277553300202340ustar00rootroot00000000000000require('../../modules/es6.object.assign'); module.exports = require('../../modules/_core').Object.assign;core-js-2.4.1/library/fn/object/classof.js000066400000000000000000000001551274277553300204050ustar00rootroot00000000000000require('../../modules/core.object.classof'); module.exports = require('../../modules/_core').Object.classof;core-js-2.4.1/library/fn/object/create.js000066400000000000000000000002521274277553300202140ustar00rootroot00000000000000require('../../modules/es6.object.create'); var $Object = require('../../modules/_core').Object; module.exports = function create(P, D){ return $Object.create(P, D); };core-js-2.4.1/library/fn/object/define-getter.js000066400000000000000000000001731274277553300214750ustar00rootroot00000000000000require('../../modules/es7.object.define-getter'); module.exports = require('../../modules/_core').Object.__defineGetter__;core-js-2.4.1/library/fn/object/define-properties.js000066400000000000000000000003111274277553300223710ustar00rootroot00000000000000require('../../modules/es6.object.define-properties'); var $Object = require('../../modules/_core').Object; module.exports = function defineProperties(T, D){ return $Object.defineProperties(T, D); };core-js-2.4.1/library/fn/object/define-property.js000066400000000000000000000003251274277553300220660ustar00rootroot00000000000000require('../../modules/es6.object.define-property'); var $Object = require('../../modules/_core').Object; module.exports = function defineProperty(it, key, desc){ return $Object.defineProperty(it, key, desc); };core-js-2.4.1/library/fn/object/define-setter.js000066400000000000000000000001731274277553300215110ustar00rootroot00000000000000require('../../modules/es7.object.define-setter'); module.exports = require('../../modules/_core').Object.__defineSetter__;core-js-2.4.1/library/fn/object/define.js000066400000000000000000000001531274277553300202030ustar00rootroot00000000000000require('../../modules/core.object.define'); module.exports = require('../../modules/_core').Object.define;core-js-2.4.1/library/fn/object/entries.js000066400000000000000000000001541274277553300204230ustar00rootroot00000000000000require('../../modules/es7.object.entries'); module.exports = require('../../modules/_core').Object.entries;core-js-2.4.1/library/fn/object/freeze.js000066400000000000000000000001521274277553300202300ustar00rootroot00000000000000require('../../modules/es6.object.freeze'); module.exports = require('../../modules/_core').Object.freeze;core-js-2.4.1/library/fn/object/get-own-property-descriptor.js000066400000000000000000000003511274277553300243670ustar00rootroot00000000000000require('../../modules/es6.object.get-own-property-descriptor'); var $Object = require('../../modules/_core').Object; module.exports = function getOwnPropertyDescriptor(it, key){ return $Object.getOwnPropertyDescriptor(it, key); };core-js-2.4.1/library/fn/object/get-own-property-descriptors.js000066400000000000000000000002231274277553300245500ustar00rootroot00000000000000require('../../modules/es7.object.get-own-property-descriptors'); module.exports = require('../../modules/_core').Object.getOwnPropertyDescriptors;core-js-2.4.1/library/fn/object/get-own-property-names.js000066400000000000000000000003201274277553300233100ustar00rootroot00000000000000require('../../modules/es6.object.get-own-property-names'); var $Object = require('../../modules/_core').Object; module.exports = function getOwnPropertyNames(it){ return $Object.getOwnPropertyNames(it); };core-js-2.4.1/library/fn/object/get-own-property-symbols.js000066400000000000000000000001621274277553300237010ustar00rootroot00000000000000require('../../modules/es6.symbol'); module.exports = require('../../modules/_core').Object.getOwnPropertySymbols;core-js-2.4.1/library/fn/object/get-prototype-of.js000066400000000000000000000001741274277553300222000ustar00rootroot00000000000000require('../../modules/es6.object.get-prototype-of'); module.exports = require('../../modules/_core').Object.getPrototypeOf;core-js-2.4.1/library/fn/object/index.js000066400000000000000000000027061274277553300200660ustar00rootroot00000000000000require('../../modules/es6.symbol'); require('../../modules/es6.object.create'); require('../../modules/es6.object.define-property'); require('../../modules/es6.object.define-properties'); require('../../modules/es6.object.get-own-property-descriptor'); require('../../modules/es6.object.get-prototype-of'); require('../../modules/es6.object.keys'); require('../../modules/es6.object.get-own-property-names'); require('../../modules/es6.object.freeze'); require('../../modules/es6.object.seal'); require('../../modules/es6.object.prevent-extensions'); require('../../modules/es6.object.is-frozen'); require('../../modules/es6.object.is-sealed'); require('../../modules/es6.object.is-extensible'); require('../../modules/es6.object.assign'); require('../../modules/es6.object.is'); require('../../modules/es6.object.set-prototype-of'); require('../../modules/es6.object.to-string'); require('../../modules/es7.object.get-own-property-descriptors'); require('../../modules/es7.object.values'); require('../../modules/es7.object.entries'); require('../../modules/es7.object.define-getter'); require('../../modules/es7.object.define-setter'); require('../../modules/es7.object.lookup-getter'); require('../../modules/es7.object.lookup-setter'); require('../../modules/core.object.is-object'); require('../../modules/core.object.classof'); require('../../modules/core.object.define'); require('../../modules/core.object.make'); module.exports = require('../../modules/_core').Object;core-js-2.4.1/library/fn/object/is-extensible.js000066400000000000000000000001671274277553300215310ustar00rootroot00000000000000require('../../modules/es6.object.is-extensible'); module.exports = require('../../modules/_core').Object.isExtensible;core-js-2.4.1/library/fn/object/is-frozen.js000066400000000000000000000001571274277553300206710ustar00rootroot00000000000000require('../../modules/es6.object.is-frozen'); module.exports = require('../../modules/_core').Object.isFrozen;core-js-2.4.1/library/fn/object/is-object.js000066400000000000000000000001601274277553300206260ustar00rootroot00000000000000require('../../modules/core.object.is-object'); module.exports = require('../../modules/_core').Object.isObject;core-js-2.4.1/library/fn/object/is-sealed.js000066400000000000000000000001571274277553300206230ustar00rootroot00000000000000require('../../modules/es6.object.is-sealed'); module.exports = require('../../modules/_core').Object.isSealed;core-js-2.4.1/library/fn/object/is.js000066400000000000000000000001421274277553300173620ustar00rootroot00000000000000require('../../modules/es6.object.is'); module.exports = require('../../modules/_core').Object.is;core-js-2.4.1/library/fn/object/keys.js000066400000000000000000000001461274277553300177260ustar00rootroot00000000000000require('../../modules/es6.object.keys'); module.exports = require('../../modules/_core').Object.keys;core-js-2.4.1/library/fn/object/lookup-getter.js000066400000000000000000000001731274277553300215540ustar00rootroot00000000000000require('../../modules/es7.object.lookup-setter'); module.exports = require('../../modules/_core').Object.__lookupGetter__;core-js-2.4.1/library/fn/object/lookup-setter.js000066400000000000000000000001731274277553300215700ustar00rootroot00000000000000require('../../modules/es7.object.lookup-setter'); module.exports = require('../../modules/_core').Object.__lookupSetter__;core-js-2.4.1/library/fn/object/make.js000066400000000000000000000001471274277553300176710ustar00rootroot00000000000000require('../../modules/core.object.make'); module.exports = require('../../modules/_core').Object.make;core-js-2.4.1/library/fn/object/prevent-extensions.js000066400000000000000000000002011274277553300226230ustar00rootroot00000000000000require('../../modules/es6.object.prevent-extensions'); module.exports = require('../../modules/_core').Object.preventExtensions;core-js-2.4.1/library/fn/object/seal.js000066400000000000000000000001461274277553300176770ustar00rootroot00000000000000require('../../modules/es6.object.seal'); module.exports = require('../../modules/_core').Object.seal;core-js-2.4.1/library/fn/object/set-prototype-of.js000066400000000000000000000001741274277553300222140ustar00rootroot00000000000000require('../../modules/es6.object.set-prototype-of'); module.exports = require('../../modules/_core').Object.setPrototypeOf;core-js-2.4.1/library/fn/object/values.js000066400000000000000000000001521274277553300202470ustar00rootroot00000000000000require('../../modules/es7.object.values'); module.exports = require('../../modules/_core').Object.values;core-js-2.4.1/library/fn/observable.js000066400000000000000000000004551274277553300176340ustar00rootroot00000000000000require('../modules/es6.object.to-string'); require('../modules/es6.string.iterator'); require('../modules/web.dom.iterable'); require('../modules/es6.promise'); require('../modules/es7.symbol.observable'); require('../modules/es7.observable'); module.exports = require('../modules/_core').Observable;core-js-2.4.1/library/fn/parse-float.js000066400000000000000000000001371274277553300177220ustar00rootroot00000000000000require('../modules/es6.parse-float'); module.exports = require('../modules/_core').parseFloat;core-js-2.4.1/library/fn/parse-int.js000066400000000000000000000001331274277553300174030ustar00rootroot00000000000000require('../modules/es6.parse-int'); module.exports = require('../modules/_core').parseInt;core-js-2.4.1/library/fn/promise.js000066400000000000000000000003271274277553300171640ustar00rootroot00000000000000require('../modules/es6.object.to-string'); require('../modules/es6.string.iterator'); require('../modules/web.dom.iterable'); require('../modules/es6.promise'); module.exports = require('../modules/_core').Promise;core-js-2.4.1/library/fn/reflect/000077500000000000000000000000001274277553300165725ustar00rootroot00000000000000core-js-2.4.1/library/fn/reflect/apply.js000066400000000000000000000001521274277553300202530ustar00rootroot00000000000000require('../../modules/es6.reflect.apply'); module.exports = require('../../modules/_core').Reflect.apply;core-js-2.4.1/library/fn/reflect/construct.js000066400000000000000000000001621274277553300211530ustar00rootroot00000000000000require('../../modules/es6.reflect.construct'); module.exports = require('../../modules/_core').Reflect.construct;core-js-2.4.1/library/fn/reflect/define-metadata.js000066400000000000000000000001751274277553300221430ustar00rootroot00000000000000require('../../modules/es7.reflect.define-metadata'); module.exports = require('../../modules/_core').Reflect.defineMetadata;core-js-2.4.1/library/fn/reflect/define-property.js000066400000000000000000000001751274277553300222470ustar00rootroot00000000000000require('../../modules/es6.reflect.define-property'); module.exports = require('../../modules/_core').Reflect.defineProperty;core-js-2.4.1/library/fn/reflect/delete-metadata.js000066400000000000000000000001751274277553300221530ustar00rootroot00000000000000require('../../modules/es7.reflect.delete-metadata'); module.exports = require('../../modules/_core').Reflect.deleteMetadata;core-js-2.4.1/library/fn/reflect/delete-property.js000066400000000000000000000001751274277553300222570ustar00rootroot00000000000000require('../../modules/es6.reflect.delete-property'); module.exports = require('../../modules/_core').Reflect.deleteProperty;core-js-2.4.1/library/fn/reflect/enumerate.js000066400000000000000000000001621274277553300211140ustar00rootroot00000000000000require('../../modules/es6.reflect.enumerate'); module.exports = require('../../modules/_core').Reflect.enumerate;core-js-2.4.1/library/fn/reflect/get-metadata-keys.js000066400000000000000000000002001274277553300224260ustar00rootroot00000000000000require('../../modules/es7.reflect.get-metadata-keys'); module.exports = require('../../modules/_core').Reflect.getMetadataKeys;core-js-2.4.1/library/fn/reflect/get-metadata.js000066400000000000000000000001671274277553300214710ustar00rootroot00000000000000require('../../modules/es7.reflect.get-metadata'); module.exports = require('../../modules/_core').Reflect.getMetadata;core-js-2.4.1/library/fn/reflect/get-own-metadata-keys.js000066400000000000000000000002071274277553300232360ustar00rootroot00000000000000require('../../modules/es7.reflect.get-own-metadata-keys'); module.exports = require('../../modules/_core').Reflect.getOwnMetadataKeys;core-js-2.4.1/library/fn/reflect/get-own-metadata.js000066400000000000000000000001761274277553300222720ustar00rootroot00000000000000require('../../modules/es7.reflect.get-own-metadata'); module.exports = require('../../modules/_core').Reflect.getOwnMetadata;core-js-2.4.1/library/fn/reflect/get-own-property-descriptor.js000066400000000000000000000002231274277553300245430ustar00rootroot00000000000000require('../../modules/es6.reflect.get-own-property-descriptor'); module.exports = require('../../modules/_core').Reflect.getOwnPropertyDescriptor;core-js-2.4.1/library/fn/reflect/get-prototype-of.js000066400000000000000000000001761274277553300223600ustar00rootroot00000000000000require('../../modules/es6.reflect.get-prototype-of'); module.exports = require('../../modules/_core').Reflect.getPrototypeOf;core-js-2.4.1/library/fn/reflect/get.js000066400000000000000000000001461274277553300177100ustar00rootroot00000000000000require('../../modules/es6.reflect.get'); module.exports = require('../../modules/_core').Reflect.get;core-js-2.4.1/library/fn/reflect/has-metadata.js000066400000000000000000000001671274277553300214650ustar00rootroot00000000000000require('../../modules/es7.reflect.has-metadata'); module.exports = require('../../modules/_core').Reflect.hasMetadata;core-js-2.4.1/library/fn/reflect/has-own-metadata.js000066400000000000000000000001761274277553300222660ustar00rootroot00000000000000require('../../modules/es7.reflect.has-own-metadata'); module.exports = require('../../modules/_core').Reflect.hasOwnMetadata;core-js-2.4.1/library/fn/reflect/has.js000066400000000000000000000001461274277553300177040ustar00rootroot00000000000000require('../../modules/es6.reflect.has'); module.exports = require('../../modules/_core').Reflect.has;core-js-2.4.1/library/fn/reflect/index.js000066400000000000000000000023351274277553300202420ustar00rootroot00000000000000require('../../modules/es6.reflect.apply'); require('../../modules/es6.reflect.construct'); require('../../modules/es6.reflect.define-property'); require('../../modules/es6.reflect.delete-property'); require('../../modules/es6.reflect.enumerate'); require('../../modules/es6.reflect.get'); require('../../modules/es6.reflect.get-own-property-descriptor'); require('../../modules/es6.reflect.get-prototype-of'); require('../../modules/es6.reflect.has'); require('../../modules/es6.reflect.is-extensible'); require('../../modules/es6.reflect.own-keys'); require('../../modules/es6.reflect.prevent-extensions'); require('../../modules/es6.reflect.set'); require('../../modules/es6.reflect.set-prototype-of'); require('../../modules/es7.reflect.define-metadata'); require('../../modules/es7.reflect.delete-metadata'); require('../../modules/es7.reflect.get-metadata'); require('../../modules/es7.reflect.get-metadata-keys'); require('../../modules/es7.reflect.get-own-metadata'); require('../../modules/es7.reflect.get-own-metadata-keys'); require('../../modules/es7.reflect.has-metadata'); require('../../modules/es7.reflect.has-own-metadata'); require('../../modules/es7.reflect.metadata'); module.exports = require('../../modules/_core').Reflect;core-js-2.4.1/library/fn/reflect/is-extensible.js000066400000000000000000000001711274277553300217020ustar00rootroot00000000000000require('../../modules/es6.reflect.is-extensible'); module.exports = require('../../modules/_core').Reflect.isExtensible;core-js-2.4.1/library/fn/reflect/metadata.js000066400000000000000000000001601274277553300207050ustar00rootroot00000000000000require('../../modules/es7.reflect.metadata'); module.exports = require('../../modules/_core').Reflect.metadata;core-js-2.4.1/library/fn/reflect/own-keys.js000066400000000000000000000001571274277553300207070ustar00rootroot00000000000000require('../../modules/es6.reflect.own-keys'); module.exports = require('../../modules/_core').Reflect.ownKeys;core-js-2.4.1/library/fn/reflect/prevent-extensions.js000066400000000000000000000002031274277553300230030ustar00rootroot00000000000000require('../../modules/es6.reflect.prevent-extensions'); module.exports = require('../../modules/_core').Reflect.preventExtensions;core-js-2.4.1/library/fn/reflect/set-prototype-of.js000066400000000000000000000001761274277553300223740ustar00rootroot00000000000000require('../../modules/es6.reflect.set-prototype-of'); module.exports = require('../../modules/_core').Reflect.setPrototypeOf;core-js-2.4.1/library/fn/reflect/set.js000066400000000000000000000001461274277553300177240ustar00rootroot00000000000000require('../../modules/es6.reflect.set'); module.exports = require('../../modules/_core').Reflect.set;core-js-2.4.1/library/fn/regexp/000077500000000000000000000000001274277553300164405ustar00rootroot00000000000000core-js-2.4.1/library/fn/regexp/constructor.js000066400000000000000000000001111274277553300213540ustar00rootroot00000000000000require('../../modules/es6.regexp.constructor'); module.exports = RegExp;core-js-2.4.1/library/fn/regexp/escape.js000066400000000000000000000001531274277553300202350ustar00rootroot00000000000000require('../../modules/core.regexp.escape'); module.exports = require('../../modules/_core').RegExp.escape;core-js-2.4.1/library/fn/regexp/flags.js000066400000000000000000000002221274277553300200660ustar00rootroot00000000000000require('../../modules/es6.regexp.flags'); var flags = require('../../modules/_flags'); module.exports = function(it){ return flags.call(it); };core-js-2.4.1/library/fn/regexp/index.js000066400000000000000000000006361274277553300201120ustar00rootroot00000000000000require('../../modules/es6.regexp.constructor'); require('../../modules/es6.regexp.to-string'); require('../../modules/es6.regexp.flags'); require('../../modules/es6.regexp.match'); require('../../modules/es6.regexp.replace'); require('../../modules/es6.regexp.search'); require('../../modules/es6.regexp.split'); require('../../modules/core.regexp.escape'); module.exports = require('../../modules/_core').RegExp;core-js-2.4.1/library/fn/regexp/match.js000066400000000000000000000002651274277553300200750ustar00rootroot00000000000000require('../../modules/es6.regexp.match'); var MATCH = require('../../modules/_wks')('match'); module.exports = function(it, str){ return RegExp.prototype[MATCH].call(it, str); };core-js-2.4.1/library/fn/regexp/replace.js000066400000000000000000000003211274277553300204050ustar00rootroot00000000000000require('../../modules/es6.regexp.replace'); var REPLACE = require('../../modules/_wks')('replace'); module.exports = function(it, str, replacer){ return RegExp.prototype[REPLACE].call(it, str, replacer); };core-js-2.4.1/library/fn/regexp/search.js000066400000000000000000000002711274277553300202430ustar00rootroot00000000000000require('../../modules/es6.regexp.search'); var SEARCH = require('../../modules/_wks')('search'); module.exports = function(it, str){ return RegExp.prototype[SEARCH].call(it, str); };core-js-2.4.1/library/fn/regexp/split.js000066400000000000000000000003031274277553300201250ustar00rootroot00000000000000require('../../modules/es6.regexp.split'); var SPLIT = require('../../modules/_wks')('split'); module.exports = function(it, str, limit){ return RegExp.prototype[SPLIT].call(it, str, limit); };core-js-2.4.1/library/fn/regexp/to-string.js000066400000000000000000000002241274277553300207220ustar00rootroot00000000000000'use strict'; require('../../modules/es6.regexp.to-string'); module.exports = function toString(it){ return RegExp.prototype.toString.call(it); };core-js-2.4.1/library/fn/set-immediate.js000066400000000000000000000001371274277553300202340ustar00rootroot00000000000000require('../modules/web.immediate'); module.exports = require('../modules/_core').setImmediate;core-js-2.4.1/library/fn/set-interval.js000066400000000000000000000001331274277553300201160ustar00rootroot00000000000000require('../modules/web.timers'); module.exports = require('../modules/_core').setInterval;core-js-2.4.1/library/fn/set-timeout.js000066400000000000000000000001321274277553300177570ustar00rootroot00000000000000require('../modules/web.timers'); module.exports = require('../modules/_core').setTimeout;core-js-2.4.1/library/fn/set.js000066400000000000000000000003661274277553300163040ustar00rootroot00000000000000require('../modules/es6.object.to-string'); require('../modules/es6.string.iterator'); require('../modules/web.dom.iterable'); require('../modules/es6.set'); require('../modules/es7.set.to-json'); module.exports = require('../modules/_core').Set;core-js-2.4.1/library/fn/string/000077500000000000000000000000001274277553300164545ustar00rootroot00000000000000core-js-2.4.1/library/fn/string/anchor.js000066400000000000000000000001521274277553300202620ustar00rootroot00000000000000require('../../modules/es6.string.anchor'); module.exports = require('../../modules/_core').String.anchor;core-js-2.4.1/library/fn/string/at.js000066400000000000000000000001421274277553300174130ustar00rootroot00000000000000require('../../modules/es7.string.at'); module.exports = require('../../modules/_core').String.at;core-js-2.4.1/library/fn/string/big.js000066400000000000000000000001441274277553300175520ustar00rootroot00000000000000require('../../modules/es6.string.big'); module.exports = require('../../modules/_core').String.big;core-js-2.4.1/library/fn/string/blink.js000066400000000000000000000001501274277553300201050ustar00rootroot00000000000000require('../../modules/es6.string.blink'); module.exports = require('../../modules/_core').String.blink;core-js-2.4.1/library/fn/string/bold.js000066400000000000000000000001461274277553300177330ustar00rootroot00000000000000require('../../modules/es6.string.bold'); module.exports = require('../../modules/_core').String.bold;core-js-2.4.1/library/fn/string/code-point-at.js000066400000000000000000000001661274277553300214600ustar00rootroot00000000000000require('../../modules/es6.string.code-point-at'); module.exports = require('../../modules/_core').String.codePointAt;core-js-2.4.1/library/fn/string/ends-with.js000066400000000000000000000001571274277553300207170ustar00rootroot00000000000000require('../../modules/es6.string.ends-with'); module.exports = require('../../modules/_core').String.endsWith;core-js-2.4.1/library/fn/string/escape-html.js000066400000000000000000000001641274277553300212150ustar00rootroot00000000000000require('../../modules/core.string.escape-html'); module.exports = require('../../modules/_core').String.escapeHTML;core-js-2.4.1/library/fn/string/fixed.js000066400000000000000000000001501274277553300201050ustar00rootroot00000000000000require('../../modules/es6.string.fixed'); module.exports = require('../../modules/_core').String.fixed;core-js-2.4.1/library/fn/string/fontcolor.js000066400000000000000000000001601274277553300210140ustar00rootroot00000000000000require('../../modules/es6.string.fontcolor'); module.exports = require('../../modules/_core').String.fontcolor;core-js-2.4.1/library/fn/string/fontsize.js000066400000000000000000000001561274277553300206550ustar00rootroot00000000000000require('../../modules/es6.string.fontsize'); module.exports = require('../../modules/_core').String.fontsize;core-js-2.4.1/library/fn/string/from-code-point.js000066400000000000000000000001721274277553300220140ustar00rootroot00000000000000require('../../modules/es6.string.from-code-point'); module.exports = require('../../modules/_core').String.fromCodePoint;core-js-2.4.1/library/fn/string/includes.js000066400000000000000000000001561274277553300206220ustar00rootroot00000000000000require('../../modules/es6.string.includes'); module.exports = require('../../modules/_core').String.includes;core-js-2.4.1/library/fn/string/index.js000066400000000000000000000030641274277553300201240ustar00rootroot00000000000000require('../../modules/es6.string.from-code-point'); require('../../modules/es6.string.raw'); require('../../modules/es6.string.trim'); require('../../modules/es6.string.iterator'); require('../../modules/es6.string.code-point-at'); require('../../modules/es6.string.ends-with'); require('../../modules/es6.string.includes'); require('../../modules/es6.string.repeat'); require('../../modules/es6.string.starts-with'); require('../../modules/es6.regexp.match'); require('../../modules/es6.regexp.replace'); require('../../modules/es6.regexp.search'); require('../../modules/es6.regexp.split'); require('../../modules/es6.string.anchor'); require('../../modules/es6.string.big'); require('../../modules/es6.string.blink'); require('../../modules/es6.string.bold'); require('../../modules/es6.string.fixed'); require('../../modules/es6.string.fontcolor'); require('../../modules/es6.string.fontsize'); require('../../modules/es6.string.italics'); require('../../modules/es6.string.link'); require('../../modules/es6.string.small'); require('../../modules/es6.string.strike'); require('../../modules/es6.string.sub'); require('../../modules/es6.string.sup'); require('../../modules/es7.string.at'); require('../../modules/es7.string.pad-start'); require('../../modules/es7.string.pad-end'); require('../../modules/es7.string.trim-left'); require('../../modules/es7.string.trim-right'); require('../../modules/es7.string.match-all'); require('../../modules/core.string.escape-html'); require('../../modules/core.string.unescape-html'); module.exports = require('../../modules/_core').String; core-js-2.4.1/library/fn/string/italics.js000066400000000000000000000001541274277553300204420ustar00rootroot00000000000000require('../../modules/es6.string.italics'); module.exports = require('../../modules/_core').String.italics;core-js-2.4.1/library/fn/string/iterator.js000066400000000000000000000002341274277553300206420ustar00rootroot00000000000000require('../../modules/es6.string.iterator'); var get = require('../../modules/_iterators').String; module.exports = function(it){ return get.call(it); };core-js-2.4.1/library/fn/string/link.js000066400000000000000000000001461274277553300177500ustar00rootroot00000000000000require('../../modules/es6.string.link'); module.exports = require('../../modules/_core').String.link;core-js-2.4.1/library/fn/string/match-all.js000066400000000000000000000001571274277553300206570ustar00rootroot00000000000000require('../../modules/es7.string.match-all'); module.exports = require('../../modules/_core').String.matchAll;core-js-2.4.1/library/fn/string/pad-end.js000066400000000000000000000001541274277553300203220ustar00rootroot00000000000000require('../../modules/es7.string.pad-end'); module.exports = require('../../modules/_core').String.padEnd; core-js-2.4.1/library/fn/string/pad-start.js000066400000000000000000000001601274277553300207060ustar00rootroot00000000000000require('../../modules/es7.string.pad-start'); module.exports = require('../../modules/_core').String.padStart; core-js-2.4.1/library/fn/string/raw.js000066400000000000000000000001441274277553300176020ustar00rootroot00000000000000require('../../modules/es6.string.raw'); module.exports = require('../../modules/_core').String.raw;core-js-2.4.1/library/fn/string/repeat.js000066400000000000000000000001521274277553300202700ustar00rootroot00000000000000require('../../modules/es6.string.repeat'); module.exports = require('../../modules/_core').String.repeat;core-js-2.4.1/library/fn/string/small.js000066400000000000000000000001501274277553300201160ustar00rootroot00000000000000require('../../modules/es6.string.small'); module.exports = require('../../modules/_core').String.small;core-js-2.4.1/library/fn/string/starts-with.js000066400000000000000000000001631274277553300213030ustar00rootroot00000000000000require('../../modules/es6.string.starts-with'); module.exports = require('../../modules/_core').String.startsWith;core-js-2.4.1/library/fn/string/strike.js000066400000000000000000000001521274277553300203110ustar00rootroot00000000000000require('../../modules/es6.string.strike'); module.exports = require('../../modules/_core').String.strike;core-js-2.4.1/library/fn/string/sub.js000066400000000000000000000001441274277553300176020ustar00rootroot00000000000000require('../../modules/es6.string.sub'); module.exports = require('../../modules/_core').String.sub;core-js-2.4.1/library/fn/string/sup.js000066400000000000000000000001441274277553300176200ustar00rootroot00000000000000require('../../modules/es6.string.sup'); module.exports = require('../../modules/_core').String.sup;core-js-2.4.1/library/fn/string/trim-end.js000066400000000000000000000001611274277553300205270ustar00rootroot00000000000000require('../../modules/es7.string.trim-right'); module.exports = require('../../modules/_core').String.trimRight;core-js-2.4.1/library/fn/string/trim-left.js000066400000000000000000000001571274277553300207200ustar00rootroot00000000000000require('../../modules/es7.string.trim-left'); module.exports = require('../../modules/_core').String.trimLeft;core-js-2.4.1/library/fn/string/trim-right.js000066400000000000000000000001611274277553300210760ustar00rootroot00000000000000require('../../modules/es7.string.trim-right'); module.exports = require('../../modules/_core').String.trimRight;core-js-2.4.1/library/fn/string/trim-start.js000066400000000000000000000001571274277553300211230ustar00rootroot00000000000000require('../../modules/es7.string.trim-left'); module.exports = require('../../modules/_core').String.trimLeft;core-js-2.4.1/library/fn/string/trim.js000066400000000000000000000001461274277553300177660ustar00rootroot00000000000000require('../../modules/es6.string.trim'); module.exports = require('../../modules/_core').String.trim;core-js-2.4.1/library/fn/string/unescape-html.js000066400000000000000000000001701274277553300215550ustar00rootroot00000000000000require('../../modules/core.string.unescape-html'); module.exports = require('../../modules/_core').String.unescapeHTML;core-js-2.4.1/library/fn/string/virtual/000077500000000000000000000000001274277553300201425ustar00rootroot00000000000000core-js-2.4.1/library/fn/string/virtual/anchor.js000066400000000000000000000001741274277553300217540ustar00rootroot00000000000000require('../../../modules/es6.string.anchor'); module.exports = require('../../../modules/_entry-virtual')('String').anchor;core-js-2.4.1/library/fn/string/virtual/at.js000066400000000000000000000001641274277553300211050ustar00rootroot00000000000000require('../../../modules/es7.string.at'); module.exports = require('../../../modules/_entry-virtual')('String').at;core-js-2.4.1/library/fn/string/virtual/big.js000066400000000000000000000001661274277553300212440ustar00rootroot00000000000000require('../../../modules/es6.string.big'); module.exports = require('../../../modules/_entry-virtual')('String').big;core-js-2.4.1/library/fn/string/virtual/blink.js000066400000000000000000000001721274277553300215770ustar00rootroot00000000000000require('../../../modules/es6.string.blink'); module.exports = require('../../../modules/_entry-virtual')('String').blink;core-js-2.4.1/library/fn/string/virtual/bold.js000066400000000000000000000001701274277553300214160ustar00rootroot00000000000000require('../../../modules/es6.string.bold'); module.exports = require('../../../modules/_entry-virtual')('String').bold;core-js-2.4.1/library/fn/string/virtual/code-point-at.js000066400000000000000000000002101274277553300231340ustar00rootroot00000000000000require('../../../modules/es6.string.code-point-at'); module.exports = require('../../../modules/_entry-virtual')('String').codePointAt;core-js-2.4.1/library/fn/string/virtual/ends-with.js000066400000000000000000000002011274277553300223730ustar00rootroot00000000000000require('../../../modules/es6.string.ends-with'); module.exports = require('../../../modules/_entry-virtual')('String').endsWith;core-js-2.4.1/library/fn/string/virtual/escape-html.js000066400000000000000000000002061274277553300227000ustar00rootroot00000000000000require('../../../modules/core.string.escape-html'); module.exports = require('../../../modules/_entry-virtual')('String').escapeHTML;core-js-2.4.1/library/fn/string/virtual/fixed.js000066400000000000000000000001721274277553300215770ustar00rootroot00000000000000require('../../../modules/es6.string.fixed'); module.exports = require('../../../modules/_entry-virtual')('String').fixed;core-js-2.4.1/library/fn/string/virtual/fontcolor.js000066400000000000000000000002021274277553300224770ustar00rootroot00000000000000require('../../../modules/es6.string.fontcolor'); module.exports = require('../../../modules/_entry-virtual')('String').fontcolor;core-js-2.4.1/library/fn/string/virtual/fontsize.js000066400000000000000000000002001274277553300223310ustar00rootroot00000000000000require('../../../modules/es6.string.fontsize'); module.exports = require('../../../modules/_entry-virtual')('String').fontsize;core-js-2.4.1/library/fn/string/virtual/includes.js000066400000000000000000000002001274277553300222760ustar00rootroot00000000000000require('../../../modules/es6.string.includes'); module.exports = require('../../../modules/_entry-virtual')('String').includes;core-js-2.4.1/library/fn/string/virtual/index.js000066400000000000000000000031051274277553300216060ustar00rootroot00000000000000require('../../../modules/es6.string.trim'); require('../../../modules/es6.string.iterator'); require('../../../modules/es6.string.code-point-at'); require('../../../modules/es6.string.ends-with'); require('../../../modules/es6.string.includes'); require('../../../modules/es6.string.repeat'); require('../../../modules/es6.string.starts-with'); require('../../../modules/es6.regexp.match'); require('../../../modules/es6.regexp.replace'); require('../../../modules/es6.regexp.search'); require('../../../modules/es6.regexp.split'); require('../../../modules/es6.string.anchor'); require('../../../modules/es6.string.big'); require('../../../modules/es6.string.blink'); require('../../../modules/es6.string.bold'); require('../../../modules/es6.string.fixed'); require('../../../modules/es6.string.fontcolor'); require('../../../modules/es6.string.fontsize'); require('../../../modules/es6.string.italics'); require('../../../modules/es6.string.link'); require('../../../modules/es6.string.small'); require('../../../modules/es6.string.strike'); require('../../../modules/es6.string.sub'); require('../../../modules/es6.string.sup'); require('../../../modules/es7.string.at'); require('../../../modules/es7.string.pad-start'); require('../../../modules/es7.string.pad-end'); require('../../../modules/es7.string.trim-left'); require('../../../modules/es7.string.trim-right'); require('../../../modules/es7.string.match-all'); require('../../../modules/core.string.escape-html'); require('../../../modules/core.string.unescape-html'); module.exports = require('../../../modules/_entry-virtual')('String'); core-js-2.4.1/library/fn/string/virtual/italics.js000066400000000000000000000001761274277553300221340ustar00rootroot00000000000000require('../../../modules/es6.string.italics'); module.exports = require('../../../modules/_entry-virtual')('String').italics;core-js-2.4.1/library/fn/string/virtual/iterator.js000066400000000000000000000001611274277553300223270ustar00rootroot00000000000000require('../../../modules/core.number.iterator'); module.exports = require('../../../modules/_iterators').String;core-js-2.4.1/library/fn/string/virtual/link.js000066400000000000000000000001701274277553300214330ustar00rootroot00000000000000require('../../../modules/es6.string.link'); module.exports = require('../../../modules/_entry-virtual')('String').link;core-js-2.4.1/library/fn/string/virtual/match-all.js000066400000000000000000000002011274277553300223330ustar00rootroot00000000000000require('../../../modules/es7.string.match-all'); module.exports = require('../../../modules/_entry-virtual')('String').matchAll;core-js-2.4.1/library/fn/string/virtual/pad-end.js000066400000000000000000000001751274277553300220130ustar00rootroot00000000000000require('../../../modules/es7.string.pad-end'); module.exports = require('../../../modules/_entry-virtual')('String').padEnd;core-js-2.4.1/library/fn/string/virtual/pad-start.js000066400000000000000000000002011274277553300223700ustar00rootroot00000000000000require('../../../modules/es7.string.pad-start'); module.exports = require('../../../modules/_entry-virtual')('String').padStart;core-js-2.4.1/library/fn/string/virtual/repeat.js000066400000000000000000000001741274277553300217620ustar00rootroot00000000000000require('../../../modules/es6.string.repeat'); module.exports = require('../../../modules/_entry-virtual')('String').repeat;core-js-2.4.1/library/fn/string/virtual/small.js000066400000000000000000000001721274277553300216100ustar00rootroot00000000000000require('../../../modules/es6.string.small'); module.exports = require('../../../modules/_entry-virtual')('String').small;core-js-2.4.1/library/fn/string/virtual/starts-with.js000066400000000000000000000002051274277553300227660ustar00rootroot00000000000000require('../../../modules/es6.string.starts-with'); module.exports = require('../../../modules/_entry-virtual')('String').startsWith;core-js-2.4.1/library/fn/string/virtual/strike.js000066400000000000000000000001741274277553300220030ustar00rootroot00000000000000require('../../../modules/es6.string.strike'); module.exports = require('../../../modules/_entry-virtual')('String').strike;core-js-2.4.1/library/fn/string/virtual/sub.js000066400000000000000000000001661274277553300212740ustar00rootroot00000000000000require('../../../modules/es6.string.sub'); module.exports = require('../../../modules/_entry-virtual')('String').sub;core-js-2.4.1/library/fn/string/virtual/sup.js000066400000000000000000000001661274277553300213120ustar00rootroot00000000000000require('../../../modules/es6.string.sup'); module.exports = require('../../../modules/_entry-virtual')('String').sup;core-js-2.4.1/library/fn/string/virtual/trim-end.js000066400000000000000000000002031274277553300222120ustar00rootroot00000000000000require('../../../modules/es7.string.trim-right'); module.exports = require('../../../modules/_entry-virtual')('String').trimRight;core-js-2.4.1/library/fn/string/virtual/trim-left.js000066400000000000000000000002011274277553300223740ustar00rootroot00000000000000require('../../../modules/es7.string.trim-left'); module.exports = require('../../../modules/_entry-virtual')('String').trimLeft;core-js-2.4.1/library/fn/string/virtual/trim-right.js000066400000000000000000000002031274277553300225610ustar00rootroot00000000000000require('../../../modules/es7.string.trim-right'); module.exports = require('../../../modules/_entry-virtual')('String').trimRight;core-js-2.4.1/library/fn/string/virtual/trim-start.js000066400000000000000000000002011274277553300225770ustar00rootroot00000000000000require('../../../modules/es7.string.trim-left'); module.exports = require('../../../modules/_entry-virtual')('String').trimLeft;core-js-2.4.1/library/fn/string/virtual/trim.js000066400000000000000000000001701274277553300214510ustar00rootroot00000000000000require('../../../modules/es6.string.trim'); module.exports = require('../../../modules/_entry-virtual')('String').trim;core-js-2.4.1/library/fn/string/virtual/unescape-html.js000066400000000000000000000002121274277553300232400ustar00rootroot00000000000000require('../../../modules/core.string.unescape-html'); module.exports = require('../../../modules/_entry-virtual')('String').unescapeHTML;core-js-2.4.1/library/fn/symbol/000077500000000000000000000000001274277553300164535ustar00rootroot00000000000000core-js-2.4.1/library/fn/symbol/async-iterator.js000066400000000000000000000001721274277553300217550ustar00rootroot00000000000000require('../../modules/es7.symbol.async-iterator'); module.exports = require('../../modules/_wks-ext').f('asyncIterator');core-js-2.4.1/library/fn/symbol/for.js000066400000000000000000000001431274277553300175750ustar00rootroot00000000000000require('../../modules/es6.symbol'); module.exports = require('../../modules/_core').Symbol['for'];core-js-2.4.1/library/fn/symbol/has-instance.js000066400000000000000000000001701274277553300213640ustar00rootroot00000000000000require('../../modules/es6.function.has-instance'); module.exports = require('../../modules/_wks-ext').f('hasInstance');core-js-2.4.1/library/fn/symbol/index.js000066400000000000000000000003571274277553300201250ustar00rootroot00000000000000require('../../modules/es6.symbol'); require('../../modules/es6.object.to-string'); require('../../modules/es7.symbol.async-iterator'); require('../../modules/es7.symbol.observable'); module.exports = require('../../modules/_core').Symbol;core-js-2.4.1/library/fn/symbol/is-concat-spreadable.js000066400000000000000000000001131274277553300227640ustar00rootroot00000000000000module.exports = require('../../modules/_wks-ext').f('isConcatSpreadable');core-js-2.4.1/library/fn/symbol/iterator.js000066400000000000000000000002321274277553300206370ustar00rootroot00000000000000require('../../modules/es6.string.iterator'); require('../../modules/web.dom.iterable'); module.exports = require('../../modules/_wks-ext').f('iterator');core-js-2.4.1/library/fn/symbol/key-for.js000066400000000000000000000001431274277553300203630ustar00rootroot00000000000000require('../../modules/es6.symbol'); module.exports = require('../../modules/_core').Symbol.keyFor;core-js-2.4.1/library/fn/symbol/match.js000066400000000000000000000001511274277553300201020ustar00rootroot00000000000000require('../../modules/es6.regexp.match'); module.exports = require('../../modules/_wks-ext').f('match');core-js-2.4.1/library/fn/symbol/observable.js000066400000000000000000000001631274277553300211350ustar00rootroot00000000000000require('../../modules/es7.symbol.observable'); module.exports = require('../../modules/_wks-ext').f('observable');core-js-2.4.1/library/fn/symbol/replace.js000066400000000000000000000001551274277553300204250ustar00rootroot00000000000000require('../../modules/es6.regexp.replace'); module.exports = require('../../modules/_wks-ext').f('replace');core-js-2.4.1/library/fn/symbol/search.js000066400000000000000000000001531274277553300202550ustar00rootroot00000000000000require('../../modules/es6.regexp.search'); module.exports = require('../../modules/_wks-ext').f('search');core-js-2.4.1/library/fn/symbol/species.js000066400000000000000000000001001274277553300204330ustar00rootroot00000000000000module.exports = require('../../modules/_wks-ext').f('species');core-js-2.4.1/library/fn/symbol/split.js000066400000000000000000000001511274277553300201410ustar00rootroot00000000000000require('../../modules/es6.regexp.split'); module.exports = require('../../modules/_wks-ext').f('split');core-js-2.4.1/library/fn/symbol/to-primitive.js000066400000000000000000000001041274277553300214340ustar00rootroot00000000000000module.exports = require('../../modules/_wks-ext').f('toPrimitive');core-js-2.4.1/library/fn/symbol/to-string-tag.js000066400000000000000000000001631274277553300215100ustar00rootroot00000000000000require('../../modules/es6.object.to-string'); module.exports = require('../../modules/_wks-ext').f('toStringTag');core-js-2.4.1/library/fn/symbol/unscopables.js000066400000000000000000000001041274277553300213220ustar00rootroot00000000000000module.exports = require('../../modules/_wks-ext').f('unscopables');core-js-2.4.1/library/fn/system/000077500000000000000000000000001274277553300164725ustar00rootroot00000000000000core-js-2.4.1/library/fn/system/global.js000066400000000000000000000001521274277553300202660ustar00rootroot00000000000000require('../../modules/es7.system.global'); module.exports = require('../../modules/_core').System.global;core-js-2.4.1/library/fn/system/index.js000066400000000000000000000001431274277553300201350ustar00rootroot00000000000000require('../../modules/es7.system.global'); module.exports = require('../../modules/_core').System;core-js-2.4.1/library/fn/typed/000077500000000000000000000000001274277553300162735ustar00rootroot00000000000000core-js-2.4.1/library/fn/typed/array-buffer.js000066400000000000000000000002341274277553300212150ustar00rootroot00000000000000require('../../modules/es6.typed.array-buffer'); require('../../modules/es6.object.to-string'); module.exports = require('../../modules/_core').ArrayBuffer;core-js-2.4.1/library/fn/typed/data-view.js000066400000000000000000000002261274277553300205120ustar00rootroot00000000000000require('../../modules/es6.typed.data-view'); require('../../modules/es6.object.to-string'); module.exports = require('../../modules/_core').DataView;core-js-2.4.1/library/fn/typed/float32-array.js000066400000000000000000000001571274277553300212220ustar00rootroot00000000000000require('../../modules/es6.typed.float32-array'); module.exports = require('../../modules/_core').Float32Array;core-js-2.4.1/library/fn/typed/float64-array.js000066400000000000000000000001571274277553300212270ustar00rootroot00000000000000require('../../modules/es6.typed.float64-array'); module.exports = require('../../modules/_core').Float64Array;core-js-2.4.1/library/fn/typed/index.js000066400000000000000000000011731274277553300177420ustar00rootroot00000000000000require('../../modules/es6.typed.array-buffer'); require('../../modules/es6.typed.data-view'); require('../../modules/es6.typed.int8-array'); require('../../modules/es6.typed.uint8-array'); require('../../modules/es6.typed.uint8-clamped-array'); require('../../modules/es6.typed.int16-array'); require('../../modules/es6.typed.uint16-array'); require('../../modules/es6.typed.int32-array'); require('../../modules/es6.typed.uint32-array'); require('../../modules/es6.typed.float32-array'); require('../../modules/es6.typed.float64-array'); require('../../modules/es6.object.to-string'); module.exports = require('../../modules/_core');core-js-2.4.1/library/fn/typed/int16-array.js000066400000000000000000000001531274277553300207050ustar00rootroot00000000000000require('../../modules/es6.typed.int16-array'); module.exports = require('../../modules/_core').Int16Array;core-js-2.4.1/library/fn/typed/int32-array.js000066400000000000000000000001531274277553300207030ustar00rootroot00000000000000require('../../modules/es6.typed.int32-array'); module.exports = require('../../modules/_core').Int32Array;core-js-2.4.1/library/fn/typed/int8-array.js000066400000000000000000000001511274277553300206240ustar00rootroot00000000000000require('../../modules/es6.typed.int8-array'); module.exports = require('../../modules/_core').Int8Array;core-js-2.4.1/library/fn/typed/uint16-array.js000066400000000000000000000001551274277553300210740ustar00rootroot00000000000000require('../../modules/es6.typed.uint16-array'); module.exports = require('../../modules/_core').Uint16Array;core-js-2.4.1/library/fn/typed/uint32-array.js000066400000000000000000000001551274277553300210720ustar00rootroot00000000000000require('../../modules/es6.typed.uint32-array'); module.exports = require('../../modules/_core').Uint32Array;core-js-2.4.1/library/fn/typed/uint8-array.js000066400000000000000000000001531274277553300210130ustar00rootroot00000000000000require('../../modules/es6.typed.uint8-array'); module.exports = require('../../modules/_core').Uint8Array;core-js-2.4.1/library/fn/typed/uint8-clamped-array.js000066400000000000000000000001721274277553300224170ustar00rootroot00000000000000require('../../modules/es6.typed.uint8-clamped-array'); module.exports = require('../../modules/_core').Uint8ClampedArray;core-js-2.4.1/library/fn/weak-map.js000066400000000000000000000002551274277553300172100ustar00rootroot00000000000000require('../modules/es6.object.to-string'); require('../modules/web.dom.iterable'); require('../modules/es6.weak-map'); module.exports = require('../modules/_core').WeakMap;core-js-2.4.1/library/fn/weak-set.js000066400000000000000000000002551274277553300172260ustar00rootroot00000000000000require('../modules/es6.object.to-string'); require('../modules/web.dom.iterable'); require('../modules/es6.weak-set'); module.exports = require('../modules/_core').WeakSet;core-js-2.4.1/library/index.js000066400000000000000000000011771274277553300162160ustar00rootroot00000000000000require('./shim'); require('./modules/core.dict'); require('./modules/core.get-iterator-method'); require('./modules/core.get-iterator'); require('./modules/core.is-iterable'); require('./modules/core.delay'); require('./modules/core.function.part'); require('./modules/core.object.is-object'); require('./modules/core.object.classof'); require('./modules/core.object.define'); require('./modules/core.object.make'); require('./modules/core.number.iterator'); require('./modules/core.regexp.escape'); require('./modules/core.string.escape-html'); require('./modules/core.string.unescape-html'); module.exports = require('./modules/_core');core-js-2.4.1/library/modules/000077500000000000000000000000001274277553300162135ustar00rootroot00000000000000core-js-2.4.1/library/modules/_a-function.js000066400000000000000000000001701274277553300207510ustar00rootroot00000000000000module.exports = function(it){ if(typeof it != 'function')throw TypeError(it + ' is not a function!'); return it; };core-js-2.4.1/library/modules/_a-number-value.js000066400000000000000000000002311274277553300215240ustar00rootroot00000000000000var cof = require('./_cof'); module.exports = function(it, msg){ if(typeof it != 'number' && cof(it) != 'Number')throw TypeError(msg); return +it; };core-js-2.4.1/library/modules/_add-to-unscopables.js000066400000000000000000000000531274277553300223720ustar00rootroot00000000000000module.exports = function(){ /* empty */ };core-js-2.4.1/library/modules/_an-instance.js000066400000000000000000000003501274277553300211060ustar00rootroot00000000000000module.exports = function(it, Constructor, name, forbiddenField){ if(!(it instanceof Constructor) || (forbiddenField !== undefined && forbiddenField in it)){ throw TypeError(name + ': incorrect invocation!'); } return it; };core-js-2.4.1/library/modules/_an-object.js000066400000000000000000000002251274277553300205510ustar00rootroot00000000000000var isObject = require('./_is-object'); module.exports = function(it){ if(!isObject(it))throw TypeError(it + ' is not an object!'); return it; };core-js-2.4.1/library/modules/_array-copy-within.js000066400000000000000000000015011274277553300222730ustar00rootroot00000000000000// 22.1.3.3 Array.prototype.copyWithin(target, start, end = this.length) 'use strict'; var toObject = require('./_to-object') , toIndex = require('./_to-index') , toLength = require('./_to-length'); module.exports = [].copyWithin || function copyWithin(target/*= 0*/, start/*= 0, end = @length*/){ var O = toObject(this) , len = toLength(O.length) , to = toIndex(target, len) , from = toIndex(start, len) , end = arguments.length > 2 ? arguments[2] : undefined , count = Math.min((end === undefined ? len : toIndex(end, len)) - from, len - to) , inc = 1; if(from < to && to < from + count){ inc = -1; from += count - 1; to += count - 1; } while(count-- > 0){ if(from in O)O[to] = O[from]; else delete O[to]; to += inc; from += inc; } return O; };core-js-2.4.1/library/modules/_array-fill.js000066400000000000000000000011421274277553300207500ustar00rootroot00000000000000// 22.1.3.6 Array.prototype.fill(value, start = 0, end = this.length) 'use strict'; var toObject = require('./_to-object') , toIndex = require('./_to-index') , toLength = require('./_to-length'); module.exports = function fill(value /*, start = 0, end = @length */){ var O = toObject(this) , length = toLength(O.length) , aLen = arguments.length , index = toIndex(aLen > 1 ? arguments[1] : undefined, length) , end = aLen > 2 ? arguments[2] : undefined , endPos = end === undefined ? length : toIndex(end, length); while(endPos > index)O[index++] = value; return O; };core-js-2.4.1/library/modules/_array-from-iterable.js000066400000000000000000000002521274277553300225530ustar00rootroot00000000000000var forOf = require('./_for-of'); module.exports = function(iter, ITERATOR){ var result = []; forOf(iter, false, result.push, result, ITERATOR); return result; }; core-js-2.4.1/library/modules/_array-includes.js000066400000000000000000000014241274277553300216330ustar00rootroot00000000000000// false -> Array#indexOf // true -> Array#includes var toIObject = require('./_to-iobject') , toLength = require('./_to-length') , toIndex = require('./_to-index'); module.exports = function(IS_INCLUDES){ return function($this, el, fromIndex){ var O = toIObject($this) , length = toLength(O.length) , index = toIndex(fromIndex, length) , value; // Array#includes uses SameValueZero equality algorithm if(IS_INCLUDES && el != el)while(length > index){ value = O[index++]; if(value != value)return true; // Array#toIndex ignores holes, Array#includes - not } else for(;length > index; index++)if(IS_INCLUDES || index in O){ if(O[index] === el)return IS_INCLUDES || index || 0; } return !IS_INCLUDES && -1; }; };core-js-2.4.1/library/modules/_array-methods.js000066400000000000000000000030331274277553300214660ustar00rootroot00000000000000// 0 -> Array#forEach // 1 -> Array#map // 2 -> Array#filter // 3 -> Array#some // 4 -> Array#every // 5 -> Array#find // 6 -> Array#findIndex var ctx = require('./_ctx') , IObject = require('./_iobject') , toObject = require('./_to-object') , toLength = require('./_to-length') , asc = require('./_array-species-create'); module.exports = function(TYPE, $create){ var IS_MAP = TYPE == 1 , IS_FILTER = TYPE == 2 , IS_SOME = TYPE == 3 , IS_EVERY = TYPE == 4 , IS_FIND_INDEX = TYPE == 6 , NO_HOLES = TYPE == 5 || IS_FIND_INDEX , create = $create || asc; return function($this, callbackfn, that){ var O = toObject($this) , self = IObject(O) , f = ctx(callbackfn, that, 3) , length = toLength(self.length) , index = 0 , result = IS_MAP ? create($this, length) : IS_FILTER ? create($this, 0) : undefined , val, res; for(;length > index; index++)if(NO_HOLES || index in self){ val = self[index]; res = f(val, index, O); if(TYPE){ if(IS_MAP)result[index] = res; // map else if(res)switch(TYPE){ case 3: return true; // some case 5: return val; // find case 6: return index; // findIndex case 2: result.push(val); // filter } else if(IS_EVERY)return false; // every } } return IS_FIND_INDEX ? -1 : IS_SOME || IS_EVERY ? IS_EVERY : result; }; };core-js-2.4.1/library/modules/_array-reduce.js000066400000000000000000000014601274277553300212740ustar00rootroot00000000000000var aFunction = require('./_a-function') , toObject = require('./_to-object') , IObject = require('./_iobject') , toLength = require('./_to-length'); module.exports = function(that, callbackfn, aLen, memo, isRight){ aFunction(callbackfn); var O = toObject(that) , self = IObject(O) , length = toLength(O.length) , index = isRight ? length - 1 : 0 , i = isRight ? -1 : 1; if(aLen < 2)for(;;){ if(index in self){ memo = self[index]; index += i; break; } index += i; if(isRight ? index < 0 : length <= index){ throw TypeError('Reduce of empty array with no initial value'); } } for(;isRight ? index >= 0 : length > index; index += i)if(index in self){ memo = callbackfn(memo, self[index], index, O); } return memo; };core-js-2.4.1/library/modules/_array-species-constructor.js000066400000000000000000000007201274277553300240410ustar00rootroot00000000000000var isObject = require('./_is-object') , isArray = require('./_is-array') , SPECIES = require('./_wks')('species'); module.exports = function(original){ var C; if(isArray(original)){ C = original.constructor; // cross-realm fallback if(typeof C == 'function' && (C === Array || isArray(C.prototype)))C = undefined; if(isObject(C)){ C = C[SPECIES]; if(C === null)C = undefined; } } return C === undefined ? Array : C; };core-js-2.4.1/library/modules/_array-species-create.js000066400000000000000000000003341274277553300227200ustar00rootroot00000000000000// 9.4.2.3 ArraySpeciesCreate(originalArray, length) var speciesConstructor = require('./_array-species-constructor'); module.exports = function(original, length){ return new (speciesConstructor(original))(length); };core-js-2.4.1/library/modules/_bind.js000066400000000000000000000015271274277553300176310ustar00rootroot00000000000000'use strict'; var aFunction = require('./_a-function') , isObject = require('./_is-object') , invoke = require('./_invoke') , arraySlice = [].slice , factories = {}; var construct = function(F, len, args){ if(!(len in factories)){ for(var n = [], i = 0; i < len; i++)n[i] = 'a[' + i + ']'; factories[len] = Function('F,a', 'return new F(' + n.join(',') + ')'); } return factories[len](F, args); }; module.exports = Function.bind || function bind(that /*, args... */){ var fn = aFunction(this) , partArgs = arraySlice.call(arguments, 1); var bound = function(/* args... */){ var args = partArgs.concat(arraySlice.call(arguments)); return this instanceof bound ? construct(fn, args.length, args) : invoke(fn, args, that); }; if(isObject(fn.prototype))bound.prototype = fn.prototype; return bound; };core-js-2.4.1/library/modules/_classof.js000066400000000000000000000013051274277553300203410ustar00rootroot00000000000000// getting tag from 19.1.3.6 Object.prototype.toString() var cof = require('./_cof') , TAG = require('./_wks')('toStringTag') // ES3 wrong here , ARG = cof(function(){ return arguments; }()) == 'Arguments'; // fallback for IE11 Script Access Denied error var tryGet = function(it, key){ try { return it[key]; } catch(e){ /* empty */ } }; module.exports = function(it){ var O, T, B; return it === undefined ? 'Undefined' : it === null ? 'Null' // @@toStringTag case : typeof (T = tryGet(O = Object(it), TAG)) == 'string' ? T // builtinTag case : ARG ? cof(O) // ES3 arguments fallback : (B = cof(O)) == 'Object' && typeof O.callee == 'function' ? 'Arguments' : B; };core-js-2.4.1/library/modules/_cof.js000066400000000000000000000001471274277553300174610ustar00rootroot00000000000000var toString = {}.toString; module.exports = function(it){ return toString.call(it).slice(8, -1); };core-js-2.4.1/library/modules/_collection-strong.js000066400000000000000000000113421274277553300223560ustar00rootroot00000000000000'use strict'; var dP = require('./_object-dp').f , create = require('./_object-create') , redefineAll = require('./_redefine-all') , ctx = require('./_ctx') , anInstance = require('./_an-instance') , defined = require('./_defined') , forOf = require('./_for-of') , $iterDefine = require('./_iter-define') , step = require('./_iter-step') , setSpecies = require('./_set-species') , DESCRIPTORS = require('./_descriptors') , fastKey = require('./_meta').fastKey , SIZE = DESCRIPTORS ? '_s' : 'size'; var getEntry = function(that, key){ // fast case var index = fastKey(key), entry; if(index !== 'F')return that._i[index]; // frozen object case for(entry = that._f; entry; entry = entry.n){ if(entry.k == key)return entry; } }; module.exports = { getConstructor: function(wrapper, NAME, IS_MAP, ADDER){ var C = wrapper(function(that, iterable){ anInstance(that, C, NAME, '_i'); that._i = create(null); // index that._f = undefined; // first entry that._l = undefined; // last entry that[SIZE] = 0; // size if(iterable != undefined)forOf(iterable, IS_MAP, that[ADDER], that); }); redefineAll(C.prototype, { // 23.1.3.1 Map.prototype.clear() // 23.2.3.2 Set.prototype.clear() clear: function clear(){ for(var that = this, data = that._i, entry = that._f; entry; entry = entry.n){ entry.r = true; if(entry.p)entry.p = entry.p.n = undefined; delete data[entry.i]; } that._f = that._l = undefined; that[SIZE] = 0; }, // 23.1.3.3 Map.prototype.delete(key) // 23.2.3.4 Set.prototype.delete(value) 'delete': function(key){ var that = this , entry = getEntry(that, key); if(entry){ var next = entry.n , prev = entry.p; delete that._i[entry.i]; entry.r = true; if(prev)prev.n = next; if(next)next.p = prev; if(that._f == entry)that._f = next; if(that._l == entry)that._l = prev; that[SIZE]--; } return !!entry; }, // 23.2.3.6 Set.prototype.forEach(callbackfn, thisArg = undefined) // 23.1.3.5 Map.prototype.forEach(callbackfn, thisArg = undefined) forEach: function forEach(callbackfn /*, that = undefined */){ anInstance(this, C, 'forEach'); var f = ctx(callbackfn, arguments.length > 1 ? arguments[1] : undefined, 3) , entry; while(entry = entry ? entry.n : this._f){ f(entry.v, entry.k, this); // revert to the last existing entry while(entry && entry.r)entry = entry.p; } }, // 23.1.3.7 Map.prototype.has(key) // 23.2.3.7 Set.prototype.has(value) has: function has(key){ return !!getEntry(this, key); } }); if(DESCRIPTORS)dP(C.prototype, 'size', { get: function(){ return defined(this[SIZE]); } }); return C; }, def: function(that, key, value){ var entry = getEntry(that, key) , prev, index; // change existing entry if(entry){ entry.v = value; // create new entry } else { that._l = entry = { i: index = fastKey(key, true), // <- index k: key, // <- key v: value, // <- value p: prev = that._l, // <- previous entry n: undefined, // <- next entry r: false // <- removed }; if(!that._f)that._f = entry; if(prev)prev.n = entry; that[SIZE]++; // add to index if(index !== 'F')that._i[index] = entry; } return that; }, getEntry: getEntry, setStrong: function(C, NAME, IS_MAP){ // add .keys, .values, .entries, [@@iterator] // 23.1.3.4, 23.1.3.8, 23.1.3.11, 23.1.3.12, 23.2.3.5, 23.2.3.8, 23.2.3.10, 23.2.3.11 $iterDefine(C, NAME, function(iterated, kind){ this._t = iterated; // target this._k = kind; // kind this._l = undefined; // previous }, function(){ var that = this , kind = that._k , entry = that._l; // revert to the last existing entry while(entry && entry.r)entry = entry.p; // get next entry if(!that._t || !(that._l = entry = entry ? entry.n : that._t._f)){ // or finish the iteration that._t = undefined; return step(1); } // return step by kind if(kind == 'keys' )return step(0, entry.k); if(kind == 'values')return step(0, entry.v); return step(0, [entry.k, entry.v]); }, IS_MAP ? 'entries' : 'values' , !IS_MAP, true); // add [@@species], 23.1.2.2, 23.2.2.2 setSpecies(NAME); } };core-js-2.4.1/library/modules/_collection-to-json.js000066400000000000000000000004711274277553300224340ustar00rootroot00000000000000// https://github.com/DavidBruant/Map-Set.prototype.toJSON var classof = require('./_classof') , from = require('./_array-from-iterable'); module.exports = function(NAME){ return function toJSON(){ if(classof(this) != NAME)throw TypeError(NAME + "#toJSON isn't generic"); return from(this); }; };core-js-2.4.1/library/modules/_collection-weak.js000066400000000000000000000052061274277553300217730ustar00rootroot00000000000000'use strict'; var redefineAll = require('./_redefine-all') , getWeak = require('./_meta').getWeak , anObject = require('./_an-object') , isObject = require('./_is-object') , anInstance = require('./_an-instance') , forOf = require('./_for-of') , createArrayMethod = require('./_array-methods') , $has = require('./_has') , arrayFind = createArrayMethod(5) , arrayFindIndex = createArrayMethod(6) , id = 0; // fallback for uncaught frozen keys var uncaughtFrozenStore = function(that){ return that._l || (that._l = new UncaughtFrozenStore); }; var UncaughtFrozenStore = function(){ this.a = []; }; var findUncaughtFrozen = function(store, key){ return arrayFind(store.a, function(it){ return it[0] === key; }); }; UncaughtFrozenStore.prototype = { get: function(key){ var entry = findUncaughtFrozen(this, key); if(entry)return entry[1]; }, has: function(key){ return !!findUncaughtFrozen(this, key); }, set: function(key, value){ var entry = findUncaughtFrozen(this, key); if(entry)entry[1] = value; else this.a.push([key, value]); }, 'delete': function(key){ var index = arrayFindIndex(this.a, function(it){ return it[0] === key; }); if(~index)this.a.splice(index, 1); return !!~index; } }; module.exports = { getConstructor: function(wrapper, NAME, IS_MAP, ADDER){ var C = wrapper(function(that, iterable){ anInstance(that, C, NAME, '_i'); that._i = id++; // collection id that._l = undefined; // leak store for uncaught frozen objects if(iterable != undefined)forOf(iterable, IS_MAP, that[ADDER], that); }); redefineAll(C.prototype, { // 23.3.3.2 WeakMap.prototype.delete(key) // 23.4.3.3 WeakSet.prototype.delete(value) 'delete': function(key){ if(!isObject(key))return false; var data = getWeak(key); if(data === true)return uncaughtFrozenStore(this)['delete'](key); return data && $has(data, this._i) && delete data[this._i]; }, // 23.3.3.4 WeakMap.prototype.has(key) // 23.4.3.4 WeakSet.prototype.has(value) has: function has(key){ if(!isObject(key))return false; var data = getWeak(key); if(data === true)return uncaughtFrozenStore(this).has(key); return data && $has(data, this._i); } }); return C; }, def: function(that, key, value){ var data = getWeak(anObject(key), true); if(data === true)uncaughtFrozenStore(that).set(key, value); else data[that._i] = value; return that; }, ufstore: uncaughtFrozenStore };core-js-2.4.1/library/modules/_collection.js000066400000000000000000000040331274277553300210430ustar00rootroot00000000000000'use strict'; var global = require('./_global') , $export = require('./_export') , meta = require('./_meta') , fails = require('./_fails') , hide = require('./_hide') , redefineAll = require('./_redefine-all') , forOf = require('./_for-of') , anInstance = require('./_an-instance') , isObject = require('./_is-object') , setToStringTag = require('./_set-to-string-tag') , dP = require('./_object-dp').f , each = require('./_array-methods')(0) , DESCRIPTORS = require('./_descriptors'); module.exports = function(NAME, wrapper, methods, common, IS_MAP, IS_WEAK){ var Base = global[NAME] , C = Base , ADDER = IS_MAP ? 'set' : 'add' , proto = C && C.prototype , O = {}; if(!DESCRIPTORS || typeof C != 'function' || !(IS_WEAK || proto.forEach && !fails(function(){ new C().entries().next(); }))){ // create collection constructor C = common.getConstructor(wrapper, NAME, IS_MAP, ADDER); redefineAll(C.prototype, methods); meta.NEED = true; } else { C = wrapper(function(target, iterable){ anInstance(target, C, NAME, '_c'); target._c = new Base; if(iterable != undefined)forOf(iterable, IS_MAP, target[ADDER], target); }); each('add,clear,delete,forEach,get,has,set,keys,values,entries,toJSON'.split(','),function(KEY){ var IS_ADDER = KEY == 'add' || KEY == 'set'; if(KEY in proto && !(IS_WEAK && KEY == 'clear'))hide(C.prototype, KEY, function(a, b){ anInstance(this, C, KEY); if(!IS_ADDER && IS_WEAK && !isObject(a))return KEY == 'get' ? undefined : false; var result = this._c[KEY](a === 0 ? 0 : a, b); return IS_ADDER ? this : result; }); }); if('size' in proto)dP(C.prototype, 'size', { get: function(){ return this._c.size; } }); } setToStringTag(C, NAME); O[NAME] = C; $export($export.G + $export.W + $export.F, O); if(!IS_WEAK)common.setStrong(C, NAME, IS_MAP); return C; };core-js-2.4.1/library/modules/_core.js000066400000000000000000000001651274277553300176420ustar00rootroot00000000000000var core = module.exports = {version: '2.4.0'}; if(typeof __e == 'number')__e = core; // eslint-disable-line no-undefcore-js-2.4.1/library/modules/_create-property.js000066400000000000000000000004161274277553300220360ustar00rootroot00000000000000'use strict'; var $defineProperty = require('./_object-dp') , createDesc = require('./_property-desc'); module.exports = function(object, index, value){ if(index in object)$defineProperty.f(object, index, createDesc(0, value)); else object[index] = value; };core-js-2.4.1/library/modules/_ctx.js000066400000000000000000000007711274277553300175130ustar00rootroot00000000000000// optional / simple context binding var aFunction = require('./_a-function'); module.exports = function(fn, that, length){ aFunction(fn); if(that === undefined)return fn; switch(length){ case 1: return function(a){ return fn.call(that, a); }; case 2: return function(a, b){ return fn.call(that, a, b); }; case 3: return function(a, b, c){ return fn.call(that, a, b, c); }; } return function(/* ...args */){ return fn.apply(that, arguments); }; };core-js-2.4.1/library/modules/_date-to-primitive.js000066400000000000000000000004761274277553300222620ustar00rootroot00000000000000'use strict'; var anObject = require('./_an-object') , toPrimitive = require('./_to-primitive') , NUMBER = 'number'; module.exports = function(hint){ if(hint !== 'string' && hint !== NUMBER && hint !== 'default')throw TypeError('Incorrect hint'); return toPrimitive(anObject(this), hint != NUMBER); };core-js-2.4.1/library/modules/_defined.js000066400000000000000000000002351274277553300203060ustar00rootroot00000000000000// 7.2.1 RequireObjectCoercible(argument) module.exports = function(it){ if(it == undefined)throw TypeError("Can't call method on " + it); return it; };core-js-2.4.1/library/modules/_descriptors.js000066400000000000000000000002611274277553300212500ustar00rootroot00000000000000// Thank's IE8 for his funny defineProperty module.exports = !require('./_fails')(function(){ return Object.defineProperty({}, 'a', {get: function(){ return 7; }}).a != 7; });core-js-2.4.1/library/modules/_dom-create.js000066400000000000000000000004361274277553300207330ustar00rootroot00000000000000var isObject = require('./_is-object') , document = require('./_global').document // in old IE typeof document.createElement is 'object' , is = isObject(document) && isObject(document.createElement); module.exports = function(it){ return is ? document.createElement(it) : {}; };core-js-2.4.1/library/modules/_entry-virtual.js000066400000000000000000000002131274277553300215310ustar00rootroot00000000000000var core = require('./_core'); module.exports = function(CONSTRUCTOR){ var C = core[CONSTRUCTOR]; return (C.virtual || C.prototype); };core-js-2.4.1/library/modules/_enum-bug-keys.js000066400000000000000000000002371274277553300214020ustar00rootroot00000000000000// IE 8- don't enum bug keys module.exports = ( 'constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf' ).split(',');core-js-2.4.1/library/modules/_enum-keys.js000066400000000000000000000007301274277553300206250ustar00rootroot00000000000000// all enumerable object keys, includes symbols var getKeys = require('./_object-keys') , gOPS = require('./_object-gops') , pIE = require('./_object-pie'); module.exports = function(it){ var result = getKeys(it) , getSymbols = gOPS.f; if(getSymbols){ var symbols = getSymbols(it) , isEnum = pIE.f , i = 0 , key; while(symbols.length > i)if(isEnum.call(it, key = symbols[i++]))result.push(key); } return result; };core-js-2.4.1/library/modules/_export.js000066400000000000000000000044101274277553300202300ustar00rootroot00000000000000var global = require('./_global') , core = require('./_core') , ctx = require('./_ctx') , hide = require('./_hide') , PROTOTYPE = 'prototype'; var $export = function(type, name, source){ var IS_FORCED = type & $export.F , IS_GLOBAL = type & $export.G , IS_STATIC = type & $export.S , IS_PROTO = type & $export.P , IS_BIND = type & $export.B , IS_WRAP = type & $export.W , exports = IS_GLOBAL ? core : core[name] || (core[name] = {}) , expProto = exports[PROTOTYPE] , target = IS_GLOBAL ? global : IS_STATIC ? global[name] : (global[name] || {})[PROTOTYPE] , key, own, out; if(IS_GLOBAL)source = name; for(key in source){ // contains in native own = !IS_FORCED && target && target[key] !== undefined; if(own && key in exports)continue; // export native or passed out = own ? target[key] : source[key]; // prevent global pollution for namespaces exports[key] = IS_GLOBAL && typeof target[key] != 'function' ? source[key] // bind timers to global for call from export context : IS_BIND && own ? ctx(out, global) // wrap global constructors for prevent change them in library : IS_WRAP && target[key] == out ? (function(C){ var F = function(a, b, c){ if(this instanceof C){ switch(arguments.length){ case 0: return new C; case 1: return new C(a); case 2: return new C(a, b); } return new C(a, b, c); } return C.apply(this, arguments); }; F[PROTOTYPE] = C[PROTOTYPE]; return F; // make static versions for prototype methods })(out) : IS_PROTO && typeof out == 'function' ? ctx(Function.call, out) : out; // export proto methods to core.%CONSTRUCTOR%.methods.%NAME% if(IS_PROTO){ (exports.virtual || (exports.virtual = {}))[key] = out; // export proto methods to core.%CONSTRUCTOR%.prototype.%NAME% if(type & $export.R && expProto && !expProto[key])hide(expProto, key, out); } } }; // type bitmap $export.F = 1; // forced $export.G = 2; // global $export.S = 4; // static $export.P = 8; // proto $export.B = 16; // bind $export.W = 32; // wrap $export.U = 64; // safe $export.R = 128; // real proto method for `library` module.exports = $export;core-js-2.4.1/library/modules/_fails-is-regexp.js000066400000000000000000000003641274277553300217120ustar00rootroot00000000000000var MATCH = require('./_wks')('match'); module.exports = function(KEY){ var re = /./; try { '/./'[KEY](re); } catch(e){ try { re[MATCH] = false; return !'/./'[KEY](re); } catch(f){ /* empty */ } } return true; };core-js-2.4.1/library/modules/_fails.js000066400000000000000000000001431274277553300200040ustar00rootroot00000000000000module.exports = function(exec){ try { return !!exec(); } catch(e){ return true; } };core-js-2.4.1/library/modules/_fix-re-wks.js000066400000000000000000000016601274277553300207070ustar00rootroot00000000000000'use strict'; var hide = require('./_hide') , redefine = require('./_redefine') , fails = require('./_fails') , defined = require('./_defined') , wks = require('./_wks'); module.exports = function(KEY, length, exec){ var SYMBOL = wks(KEY) , fns = exec(defined, SYMBOL, ''[KEY]) , strfn = fns[0] , rxfn = fns[1]; if(fails(function(){ var O = {}; O[SYMBOL] = function(){ return 7; }; return ''[KEY](O) != 7; })){ redefine(String.prototype, KEY, strfn); hide(RegExp.prototype, SYMBOL, length == 2 // 21.2.5.8 RegExp.prototype[@@replace](string, replaceValue) // 21.2.5.11 RegExp.prototype[@@split](string, limit) ? function(string, arg){ return rxfn.call(string, this, arg); } // 21.2.5.6 RegExp.prototype[@@match](string) // 21.2.5.9 RegExp.prototype[@@search](string) : function(string){ return rxfn.call(string, this); } ); } };core-js-2.4.1/library/modules/_flags.js000066400000000000000000000005671274277553300200140ustar00rootroot00000000000000'use strict'; // 21.2.5.3 get RegExp.prototype.flags var anObject = require('./_an-object'); module.exports = function(){ var that = anObject(this) , result = ''; if(that.global) result += 'g'; if(that.ignoreCase) result += 'i'; if(that.multiline) result += 'm'; if(that.unicode) result += 'u'; if(that.sticky) result += 'y'; return result; };core-js-2.4.1/library/modules/_for-of.js000066400000000000000000000022471274277553300201050ustar00rootroot00000000000000var ctx = require('./_ctx') , call = require('./_iter-call') , isArrayIter = require('./_is-array-iter') , anObject = require('./_an-object') , toLength = require('./_to-length') , getIterFn = require('./core.get-iterator-method') , BREAK = {} , RETURN = {}; var exports = module.exports = function(iterable, entries, fn, that, ITERATOR){ var iterFn = ITERATOR ? function(){ return iterable; } : getIterFn(iterable) , f = ctx(fn, that, entries ? 2 : 1) , index = 0 , length, step, iterator, result; if(typeof iterFn != 'function')throw TypeError(iterable + ' is not iterable!'); // fast case for arrays with default iterator if(isArrayIter(iterFn))for(length = toLength(iterable.length); length > index; index++){ result = entries ? f(anObject(step = iterable[index])[0], step[1]) : f(iterable[index]); if(result === BREAK || result === RETURN)return result; } else for(iterator = iterFn.call(iterable); !(step = iterator.next()).done; ){ result = call(iterator, f, step.value, entries); if(result === BREAK || result === RETURN)return result; } }; exports.BREAK = BREAK; exports.RETURN = RETURN;core-js-2.4.1/library/modules/_global.js000066400000000000000000000005021274277553300201450ustar00rootroot00000000000000// https://github.com/zloirock/core-js/issues/86#issuecomment-115759028 var global = module.exports = typeof window != 'undefined' && window.Math == Math ? window : typeof self != 'undefined' && self.Math == Math ? self : Function('return this')(); if(typeof __g == 'number')__g = global; // eslint-disable-line no-undefcore-js-2.4.1/library/modules/_has.js000066400000000000000000000001651274277553300174650ustar00rootroot00000000000000var hasOwnProperty = {}.hasOwnProperty; module.exports = function(it, key){ return hasOwnProperty.call(it, key); };core-js-2.4.1/library/modules/_hide.js000066400000000000000000000004401274277553300176170ustar00rootroot00000000000000var dP = require('./_object-dp') , createDesc = require('./_property-desc'); module.exports = require('./_descriptors') ? function(object, key, value){ return dP.f(object, key, createDesc(1, value)); } : function(object, key, value){ object[key] = value; return object; };core-js-2.4.1/library/modules/_html.js000066400000000000000000000001131274277553300176470ustar00rootroot00000000000000module.exports = require('./_global').document && document.documentElement;core-js-2.4.1/library/modules/_ie8-dom-define.js000066400000000000000000000003001274277553300213730ustar00rootroot00000000000000module.exports = !require('./_descriptors') && !require('./_fails')(function(){ return Object.defineProperty(require('./_dom-create')('div'), 'a', {get: function(){ return 7; }}).a != 7; });core-js-2.4.1/library/modules/_inherit-if-required.js000066400000000000000000000005131274277553300225630ustar00rootroot00000000000000var isObject = require('./_is-object') , setPrototypeOf = require('./_set-proto').set; module.exports = function(that, target, C){ var P, S = target.constructor; if(S !== C && typeof S == 'function' && (P = S.prototype) !== C.prototype && isObject(P) && setPrototypeOf){ setPrototypeOf(that, P); } return that; };core-js-2.4.1/library/modules/_invoke.js000066400000000000000000000013051274277553300202020ustar00rootroot00000000000000// fast apply, http://jsperf.lnkit.com/fast-apply/5 module.exports = function(fn, args, that){ var un = that === undefined; switch(args.length){ case 0: return un ? fn() : fn.call(that); case 1: return un ? fn(args[0]) : fn.call(that, args[0]); case 2: return un ? fn(args[0], args[1]) : fn.call(that, args[0], args[1]); case 3: return un ? fn(args[0], args[1], args[2]) : fn.call(that, args[0], args[1], args[2]); case 4: return un ? fn(args[0], args[1], args[2], args[3]) : fn.call(that, args[0], args[1], args[2], args[3]); } return fn.apply(that, args); };core-js-2.4.1/library/modules/_iobject.js000066400000000000000000000003541274277553300203310ustar00rootroot00000000000000// fallback for non-array-like ES3 and non-enumerable old V8 strings var cof = require('./_cof'); module.exports = Object('z').propertyIsEnumerable(0) ? Object : function(it){ return cof(it) == 'String' ? it.split('') : Object(it); };core-js-2.4.1/library/modules/_is-array-iter.js000066400000000000000000000004251274277553300214010ustar00rootroot00000000000000// check on default Array iterator var Iterators = require('./_iterators') , ITERATOR = require('./_wks')('iterator') , ArrayProto = Array.prototype; module.exports = function(it){ return it !== undefined && (Iterators.Array === it || ArrayProto[ITERATOR] === it); };core-js-2.4.1/library/modules/_is-array.js000066400000000000000000000002211274277553300204320ustar00rootroot00000000000000// 7.2.2 IsArray(argument) var cof = require('./_cof'); module.exports = Array.isArray || function isArray(arg){ return cof(arg) == 'Array'; };core-js-2.4.1/library/modules/_is-integer.js000066400000000000000000000003161274277553300207560ustar00rootroot00000000000000// 20.1.2.3 Number.isInteger(number) var isObject = require('./_is-object') , floor = Math.floor; module.exports = function isInteger(it){ return !isObject(it) && isFinite(it) && floor(it) === it; };core-js-2.4.1/library/modules/_is-object.js000066400000000000000000000001531274277553300205660ustar00rootroot00000000000000module.exports = function(it){ return typeof it === 'object' ? it !== null : typeof it === 'function'; };core-js-2.4.1/library/modules/_is-regexp.js000066400000000000000000000004441274277553300206150ustar00rootroot00000000000000// 7.2.8 IsRegExp(argument) var isObject = require('./_is-object') , cof = require('./_cof') , MATCH = require('./_wks')('match'); module.exports = function(it){ var isRegExp; return isObject(it) && ((isRegExp = it[MATCH]) !== undefined ? !!isRegExp : cof(it) == 'RegExp'); };core-js-2.4.1/library/modules/_iter-call.js000066400000000000000000000006231274277553300205650ustar00rootroot00000000000000// call something on iterator step with safe closing on error var anObject = require('./_an-object'); module.exports = function(iterator, fn, value, entries){ try { return entries ? fn(anObject(value)[0], value[1]) : fn(value); // 7.4.6 IteratorClose(iterator, completion) } catch(e){ var ret = iterator['return']; if(ret !== undefined)anObject(ret.call(iterator)); throw e; } };core-js-2.4.1/library/modules/_iter-create.js000066400000000000000000000010201274277553300211050ustar00rootroot00000000000000'use strict'; var create = require('./_object-create') , descriptor = require('./_property-desc') , setToStringTag = require('./_set-to-string-tag') , IteratorPrototype = {}; // 25.1.2.1.1 %IteratorPrototype%[@@iterator]() require('./_hide')(IteratorPrototype, require('./_wks')('iterator'), function(){ return this; }); module.exports = function(Constructor, NAME, next){ Constructor.prototype = create(IteratorPrototype, {next: descriptor(1, next)}); setToStringTag(Constructor, NAME + ' Iterator'); };core-js-2.4.1/library/modules/_iter-define.js000066400000000000000000000054101274277553300211030ustar00rootroot00000000000000'use strict'; var LIBRARY = require('./_library') , $export = require('./_export') , redefine = require('./_redefine') , hide = require('./_hide') , has = require('./_has') , Iterators = require('./_iterators') , $iterCreate = require('./_iter-create') , setToStringTag = require('./_set-to-string-tag') , getPrototypeOf = require('./_object-gpo') , ITERATOR = require('./_wks')('iterator') , BUGGY = !([].keys && 'next' in [].keys()) // Safari has buggy iterators w/o `next` , FF_ITERATOR = '@@iterator' , KEYS = 'keys' , VALUES = 'values'; var returnThis = function(){ return this; }; module.exports = function(Base, NAME, Constructor, next, DEFAULT, IS_SET, FORCED){ $iterCreate(Constructor, NAME, next); var getMethod = function(kind){ if(!BUGGY && kind in proto)return proto[kind]; switch(kind){ case KEYS: return function keys(){ return new Constructor(this, kind); }; case VALUES: return function values(){ return new Constructor(this, kind); }; } return function entries(){ return new Constructor(this, kind); }; }; var TAG = NAME + ' Iterator' , DEF_VALUES = DEFAULT == VALUES , VALUES_BUG = false , proto = Base.prototype , $native = proto[ITERATOR] || proto[FF_ITERATOR] || DEFAULT && proto[DEFAULT] , $default = $native || getMethod(DEFAULT) , $entries = DEFAULT ? !DEF_VALUES ? $default : getMethod('entries') : undefined , $anyNative = NAME == 'Array' ? proto.entries || $native : $native , methods, key, IteratorPrototype; // Fix native if($anyNative){ IteratorPrototype = getPrototypeOf($anyNative.call(new Base)); if(IteratorPrototype !== Object.prototype){ // Set @@toStringTag to native iterators setToStringTag(IteratorPrototype, TAG, true); // fix for some old engines if(!LIBRARY && !has(IteratorPrototype, ITERATOR))hide(IteratorPrototype, ITERATOR, returnThis); } } // fix Array#{values, @@iterator}.name in V8 / FF if(DEF_VALUES && $native && $native.name !== VALUES){ VALUES_BUG = true; $default = function values(){ return $native.call(this); }; } // Define iterator if((!LIBRARY || FORCED) && (BUGGY || VALUES_BUG || !proto[ITERATOR])){ hide(proto, ITERATOR, $default); } // Plug for library Iterators[NAME] = $default; Iterators[TAG] = returnThis; if(DEFAULT){ methods = { values: DEF_VALUES ? $default : getMethod(VALUES), keys: IS_SET ? $default : getMethod(KEYS), entries: $entries }; if(FORCED)for(key in methods){ if(!(key in proto))redefine(proto, key, methods[key]); } else $export($export.P + $export.F * (BUGGY || VALUES_BUG), NAME, methods); } return methods; };core-js-2.4.1/library/modules/_iter-detect.js000066400000000000000000000011061274277553300211170ustar00rootroot00000000000000var ITERATOR = require('./_wks')('iterator') , SAFE_CLOSING = false; try { var riter = [7][ITERATOR](); riter['return'] = function(){ SAFE_CLOSING = true; }; Array.from(riter, function(){ throw 2; }); } catch(e){ /* empty */ } module.exports = function(exec, skipClosing){ if(!skipClosing && !SAFE_CLOSING)return false; var safe = false; try { var arr = [7] , iter = arr[ITERATOR](); iter.next = function(){ return {done: safe = true}; }; arr[ITERATOR] = function(){ return iter; }; exec(arr); } catch(e){ /* empty */ } return safe; };core-js-2.4.1/library/modules/_iter-step.js000066400000000000000000000001211274277553300206160ustar00rootroot00000000000000module.exports = function(done, value){ return {value: value, done: !!done}; };core-js-2.4.1/library/modules/_iterators.js000066400000000000000000000000241274277553300207200ustar00rootroot00000000000000module.exports = {};core-js-2.4.1/library/modules/_keyof.js000066400000000000000000000004631274277553300200300ustar00rootroot00000000000000var getKeys = require('./_object-keys') , toIObject = require('./_to-iobject'); module.exports = function(object, el){ var O = toIObject(object) , keys = getKeys(O) , length = keys.length , index = 0 , key; while(length > index)if(O[key = keys[index++]] === el)return key; };core-js-2.4.1/library/modules/_library.js000066400000000000000000000000261274277553300203520ustar00rootroot00000000000000module.exports = true;core-js-2.4.1/library/modules/_math-expm1.js000066400000000000000000000005251274277553300206730ustar00rootroot00000000000000// 20.2.2.14 Math.expm1(x) var $expm1 = Math.expm1; module.exports = (!$expm1 // Old FF bug || $expm1(10) > 22025.465794806719 || $expm1(10) < 22025.4657948067165168 // Tor Browser bug || $expm1(-2e-17) != -2e-17 ) ? function expm1(x){ return (x = +x) == 0 ? x : x > -1e-6 && x < 1e-6 ? x + x * x / 2 : Math.exp(x) - 1; } : $expm1;core-js-2.4.1/library/modules/_math-log1p.js000066400000000000000000000002301274277553300206540ustar00rootroot00000000000000// 20.2.2.20 Math.log1p(x) module.exports = Math.log1p || function log1p(x){ return (x = +x) > -1e-8 && x < 1e-8 ? x - x * x / 2 : Math.log(1 + x); };core-js-2.4.1/library/modules/_math-sign.js000066400000000000000000000002031274277553300205720ustar00rootroot00000000000000// 20.2.2.28 Math.sign(x) module.exports = Math.sign || function sign(x){ return (x = +x) == 0 || x != x ? x : x < 0 ? -1 : 1; };core-js-2.4.1/library/modules/_meta.js000066400000000000000000000030161274277553300176360ustar00rootroot00000000000000var META = require('./_uid')('meta') , isObject = require('./_is-object') , has = require('./_has') , setDesc = require('./_object-dp').f , id = 0; var isExtensible = Object.isExtensible || function(){ return true; }; var FREEZE = !require('./_fails')(function(){ return isExtensible(Object.preventExtensions({})); }); var setMeta = function(it){ setDesc(it, META, {value: { i: 'O' + ++id, // object ID w: {} // weak collections IDs }}); }; var fastKey = function(it, create){ // return primitive with prefix if(!isObject(it))return typeof it == 'symbol' ? it : (typeof it == 'string' ? 'S' : 'P') + it; if(!has(it, META)){ // can't set metadata to uncaught frozen object if(!isExtensible(it))return 'F'; // not necessary to add metadata if(!create)return 'E'; // add missing metadata setMeta(it); // return object ID } return it[META].i; }; var getWeak = function(it, create){ if(!has(it, META)){ // can't set metadata to uncaught frozen object if(!isExtensible(it))return true; // not necessary to add metadata if(!create)return false; // add missing metadata setMeta(it); // return hash weak collections IDs } return it[META].w; }; // add metadata on freeze-family methods calling var onFreeze = function(it){ if(FREEZE && meta.NEED && isExtensible(it) && !has(it, META))setMeta(it); return it; }; var meta = module.exports = { KEY: META, NEED: false, fastKey: fastKey, getWeak: getWeak, onFreeze: onFreeze };core-js-2.4.1/library/modules/_metadata.js000066400000000000000000000033641274277553300204760ustar00rootroot00000000000000var Map = require('./es6.map') , $export = require('./_export') , shared = require('./_shared')('metadata') , store = shared.store || (shared.store = new (require('./es6.weak-map'))); var getOrCreateMetadataMap = function(target, targetKey, create){ var targetMetadata = store.get(target); if(!targetMetadata){ if(!create)return undefined; store.set(target, targetMetadata = new Map); } var keyMetadata = targetMetadata.get(targetKey); if(!keyMetadata){ if(!create)return undefined; targetMetadata.set(targetKey, keyMetadata = new Map); } return keyMetadata; }; var ordinaryHasOwnMetadata = function(MetadataKey, O, P){ var metadataMap = getOrCreateMetadataMap(O, P, false); return metadataMap === undefined ? false : metadataMap.has(MetadataKey); }; var ordinaryGetOwnMetadata = function(MetadataKey, O, P){ var metadataMap = getOrCreateMetadataMap(O, P, false); return metadataMap === undefined ? undefined : metadataMap.get(MetadataKey); }; var ordinaryDefineOwnMetadata = function(MetadataKey, MetadataValue, O, P){ getOrCreateMetadataMap(O, P, true).set(MetadataKey, MetadataValue); }; var ordinaryOwnMetadataKeys = function(target, targetKey){ var metadataMap = getOrCreateMetadataMap(target, targetKey, false) , keys = []; if(metadataMap)metadataMap.forEach(function(_, key){ keys.push(key); }); return keys; }; var toMetaKey = function(it){ return it === undefined || typeof it == 'symbol' ? it : String(it); }; var exp = function(O){ $export($export.S, 'Reflect', O); }; module.exports = { store: store, map: getOrCreateMetadataMap, has: ordinaryHasOwnMetadata, get: ordinaryGetOwnMetadata, set: ordinaryDefineOwnMetadata, keys: ordinaryOwnMetadataKeys, key: toMetaKey, exp: exp };core-js-2.4.1/library/modules/_microtask.js000066400000000000000000000033241274277553300207060ustar00rootroot00000000000000var global = require('./_global') , macrotask = require('./_task').set , Observer = global.MutationObserver || global.WebKitMutationObserver , process = global.process , Promise = global.Promise , isNode = require('./_cof')(process) == 'process'; module.exports = function(){ var head, last, notify; var flush = function(){ var parent, fn; if(isNode && (parent = process.domain))parent.exit(); while(head){ fn = head.fn; head = head.next; try { fn(); } catch(e){ if(head)notify(); else last = undefined; throw e; } } last = undefined; if(parent)parent.enter(); }; // Node.js if(isNode){ notify = function(){ process.nextTick(flush); }; // browsers with MutationObserver } else if(Observer){ var toggle = true , node = document.createTextNode(''); new Observer(flush).observe(node, {characterData: true}); // eslint-disable-line no-new notify = function(){ node.data = toggle = !toggle; }; // environments with maybe non-completely correct, but existent Promise } else if(Promise && Promise.resolve){ var promise = Promise.resolve(); notify = function(){ promise.then(flush); }; // for other environments - macrotask based on: // - setImmediate // - MessageChannel // - window.postMessag // - onreadystatechange // - setTimeout } else { notify = function(){ // strange IE + webpack dev server bug - use .call(global) macrotask.call(global, flush); }; } return function(fn){ var task = {fn: fn, next: undefined}; if(last)last.next = task; if(!head){ head = task; notify(); } last = task; }; };core-js-2.4.1/library/modules/_object-assign.js000066400000000000000000000022111274277553300214340ustar00rootroot00000000000000'use strict'; // 19.1.2.1 Object.assign(target, source, ...) var getKeys = require('./_object-keys') , gOPS = require('./_object-gops') , pIE = require('./_object-pie') , toObject = require('./_to-object') , IObject = require('./_iobject') , $assign = Object.assign; // should work with symbols and should have deterministic property order (V8 bug) module.exports = !$assign || require('./_fails')(function(){ var A = {} , B = {} , S = Symbol() , K = 'abcdefghijklmnopqrst'; A[S] = 7; K.split('').forEach(function(k){ B[k] = k; }); return $assign({}, A)[S] != 7 || Object.keys($assign({}, B)).join('') != K; }) ? function assign(target, source){ // eslint-disable-line no-unused-vars var T = toObject(target) , aLen = arguments.length , index = 1 , getSymbols = gOPS.f , isEnum = pIE.f; while(aLen > index){ var S = IObject(arguments[index++]) , keys = getSymbols ? getKeys(S).concat(getSymbols(S)) : getKeys(S) , length = keys.length , j = 0 , key; while(length > j)if(isEnum.call(S, key = keys[j++]))T[key] = S[key]; } return T; } : $assign;core-js-2.4.1/library/modules/_object-create.js000066400000000000000000000027601274277553300214240ustar00rootroot00000000000000// 19.1.2.2 / 15.2.3.5 Object.create(O [, Properties]) var anObject = require('./_an-object') , dPs = require('./_object-dps') , enumBugKeys = require('./_enum-bug-keys') , IE_PROTO = require('./_shared-key')('IE_PROTO') , Empty = function(){ /* empty */ } , PROTOTYPE = 'prototype'; // Create object with fake `null` prototype: use iframe Object with cleared prototype var createDict = function(){ // Thrash, waste and sodomy: IE GC bug var iframe = require('./_dom-create')('iframe') , i = enumBugKeys.length , lt = '<' , gt = '>' , iframeDocument; iframe.style.display = 'none'; require('./_html').appendChild(iframe); iframe.src = 'javascript:'; // eslint-disable-line no-script-url // createDict = iframe.contentWindow.Object; // html.removeChild(iframe); iframeDocument = iframe.contentWindow.document; iframeDocument.open(); iframeDocument.write(lt + 'script' + gt + 'document.F=Object' + lt + '/script' + gt); iframeDocument.close(); createDict = iframeDocument.F; while(i--)delete createDict[PROTOTYPE][enumBugKeys[i]]; return createDict(); }; module.exports = Object.create || function create(O, Properties){ var result; if(O !== null){ Empty[PROTOTYPE] = anObject(O); result = new Empty; Empty[PROTOTYPE] = null; // add "__proto__" for Object.getPrototypeOf polyfill result[IE_PROTO] = O; } else result = createDict(); return Properties === undefined ? result : dPs(result, Properties); }; core-js-2.4.1/library/modules/_object-define.js000066400000000000000000000006041274277553300214060ustar00rootroot00000000000000var dP = require('./_object-dp') , gOPD = require('./_object-gopd') , ownKeys = require('./_own-keys') , toIObject = require('./_to-iobject'); module.exports = function define(target, mixin){ var keys = ownKeys(toIObject(mixin)) , length = keys.length , i = 0, key; while(length > i)dP.f(target, key = keys[i++], gOPD.f(mixin, key)); return target; };core-js-2.4.1/library/modules/_object-dp.js000066400000000000000000000011401274277553300205530ustar00rootroot00000000000000var anObject = require('./_an-object') , IE8_DOM_DEFINE = require('./_ie8-dom-define') , toPrimitive = require('./_to-primitive') , dP = Object.defineProperty; exports.f = require('./_descriptors') ? Object.defineProperty : function defineProperty(O, P, Attributes){ anObject(O); P = toPrimitive(P, true); anObject(Attributes); if(IE8_DOM_DEFINE)try { return dP(O, P, Attributes); } catch(e){ /* empty */ } if('get' in Attributes || 'set' in Attributes)throw TypeError('Accessors not supported!'); if('value' in Attributes)O[P] = Attributes.value; return O; };core-js-2.4.1/library/modules/_object-dps.js000066400000000000000000000006241274277553300207440ustar00rootroot00000000000000var dP = require('./_object-dp') , anObject = require('./_an-object') , getKeys = require('./_object-keys'); module.exports = require('./_descriptors') ? Object.defineProperties : function defineProperties(O, Properties){ anObject(O); var keys = getKeys(Properties) , length = keys.length , i = 0 , P; while(length > i)dP.f(O, P = keys[i++], Properties[P]); return O; };core-js-2.4.1/library/modules/_object-forced-pam.js000066400000000000000000000004341274277553300221720ustar00rootroot00000000000000// Forced replacement prototype accessors methods module.exports = require('./_library')|| !require('./_fails')(function(){ var K = Math.random(); // In FF throws only define methods __defineSetter__.call(null, K, function(){ /* empty */}); delete require('./_global')[K]; });core-js-2.4.1/library/modules/_object-gopd.js000066400000000000000000000011371274277553300211070ustar00rootroot00000000000000var pIE = require('./_object-pie') , createDesc = require('./_property-desc') , toIObject = require('./_to-iobject') , toPrimitive = require('./_to-primitive') , has = require('./_has') , IE8_DOM_DEFINE = require('./_ie8-dom-define') , gOPD = Object.getOwnPropertyDescriptor; exports.f = require('./_descriptors') ? gOPD : function getOwnPropertyDescriptor(O, P){ O = toIObject(O); P = toPrimitive(P, true); if(IE8_DOM_DEFINE)try { return gOPD(O, P); } catch(e){ /* empty */ } if(has(O, P))return createDesc(!pIE.f.call(O, P), O[P]); };core-js-2.4.1/library/modules/_object-gopn-ext.js000066400000000000000000000011331274277553300217130ustar00rootroot00000000000000// fallback for IE11 buggy Object.getOwnPropertyNames with iframe and window var toIObject = require('./_to-iobject') , gOPN = require('./_object-gopn').f , toString = {}.toString; var windowNames = typeof window == 'object' && window && Object.getOwnPropertyNames ? Object.getOwnPropertyNames(window) : []; var getWindowNames = function(it){ try { return gOPN(it); } catch(e){ return windowNames.slice(); } }; module.exports.f = function getOwnPropertyNames(it){ return windowNames && toString.call(it) == '[object Window]' ? getWindowNames(it) : gOPN(toIObject(it)); }; core-js-2.4.1/library/modules/_object-gopn.js000066400000000000000000000004421274277553300211170ustar00rootroot00000000000000// 19.1.2.7 / 15.2.3.4 Object.getOwnPropertyNames(O) var $keys = require('./_object-keys-internal') , hiddenKeys = require('./_enum-bug-keys').concat('length', 'prototype'); exports.f = Object.getOwnPropertyNames || function getOwnPropertyNames(O){ return $keys(O, hiddenKeys); };core-js-2.4.1/library/modules/_object-gops.js000066400000000000000000000000511274277553300211200ustar00rootroot00000000000000exports.f = Object.getOwnPropertySymbols;core-js-2.4.1/library/modules/_object-gpo.js000066400000000000000000000007611274277553300207450ustar00rootroot00000000000000// 19.1.2.9 / 15.2.3.2 Object.getPrototypeOf(O) var has = require('./_has') , toObject = require('./_to-object') , IE_PROTO = require('./_shared-key')('IE_PROTO') , ObjectProto = Object.prototype; module.exports = Object.getPrototypeOf || function(O){ O = toObject(O); if(has(O, IE_PROTO))return O[IE_PROTO]; if(typeof O.constructor == 'function' && O instanceof O.constructor){ return O.constructor.prototype; } return O instanceof Object ? ObjectProto : null; };core-js-2.4.1/library/modules/_object-keys-internal.js000066400000000000000000000010421274277553300227360ustar00rootroot00000000000000var has = require('./_has') , toIObject = require('./_to-iobject') , arrayIndexOf = require('./_array-includes')(false) , IE_PROTO = require('./_shared-key')('IE_PROTO'); module.exports = function(object, names){ var O = toIObject(object) , i = 0 , result = [] , key; for(key in O)if(key != IE_PROTO)has(O, key) && result.push(key); // Don't enum bug & hidden keys while(names.length > i)if(has(O, key = names[i++])){ ~arrayIndexOf(result, key) || result.push(key); } return result; };core-js-2.4.1/library/modules/_object-keys.js000066400000000000000000000003411274277553300211250ustar00rootroot00000000000000// 19.1.2.14 / 15.2.3.14 Object.keys(O) var $keys = require('./_object-keys-internal') , enumBugKeys = require('./_enum-bug-keys'); module.exports = Object.keys || function keys(O){ return $keys(O, enumBugKeys); };core-js-2.4.1/library/modules/_object-pie.js000066400000000000000000000000441274277553300207270ustar00rootroot00000000000000exports.f = {}.propertyIsEnumerable;core-js-2.4.1/library/modules/_object-sap.js000066400000000000000000000005601274277553300207400ustar00rootroot00000000000000// most Object methods by ES6 should accept primitives var $export = require('./_export') , core = require('./_core') , fails = require('./_fails'); module.exports = function(KEY, exec){ var fn = (core.Object || {})[KEY] || Object[KEY] , exp = {}; exp[KEY] = exec(fn); $export($export.S + $export.F * fails(function(){ fn(1); }), 'Object', exp); };core-js-2.4.1/library/modules/_object-to-array.js000066400000000000000000000007251274277553300217160ustar00rootroot00000000000000var getKeys = require('./_object-keys') , toIObject = require('./_to-iobject') , isEnum = require('./_object-pie').f; module.exports = function(isEntries){ return function(it){ var O = toIObject(it) , keys = getKeys(O) , length = keys.length , i = 0 , result = [] , key; while(length > i)if(isEnum.call(O, key = keys[i++])){ result.push(isEntries ? [key, O[key]] : O[key]); } return result; }; };core-js-2.4.1/library/modules/_own-keys.js000066400000000000000000000006421274277553300204660ustar00rootroot00000000000000// all object keys, includes non-enumerable and symbols var gOPN = require('./_object-gopn') , gOPS = require('./_object-gops') , anObject = require('./_an-object') , Reflect = require('./_global').Reflect; module.exports = Reflect && Reflect.ownKeys || function ownKeys(it){ var keys = gOPN.f(anObject(it)) , getSymbols = gOPS.f; return getSymbols ? keys.concat(getSymbols(it)) : keys; };core-js-2.4.1/library/modules/_parse-float.js000066400000000000000000000005511274277553300211260ustar00rootroot00000000000000var $parseFloat = require('./_global').parseFloat , $trim = require('./_string-trim').trim; module.exports = 1 / $parseFloat(require('./_string-ws') + '-0') !== -Infinity ? function parseFloat(str){ var string = $trim(String(str), 3) , result = $parseFloat(string); return result === 0 && string.charAt(0) == '-' ? -0 : result; } : $parseFloat;core-js-2.4.1/library/modules/_parse-int.js000066400000000000000000000006231274277553300206130ustar00rootroot00000000000000var $parseInt = require('./_global').parseInt , $trim = require('./_string-trim').trim , ws = require('./_string-ws') , hex = /^[\-+]?0[xX]/; module.exports = $parseInt(ws + '08') !== 8 || $parseInt(ws + '0x16') !== 22 ? function parseInt(str, radix){ var string = $trim(String(str), 3); return $parseInt(string, (radix >>> 0) || (hex.test(string) ? 16 : 10)); } : $parseInt;core-js-2.4.1/library/modules/_partial.js000066400000000000000000000013651274277553300203510ustar00rootroot00000000000000'use strict'; var path = require('./_path') , invoke = require('./_invoke') , aFunction = require('./_a-function'); module.exports = function(/* ...pargs */){ var fn = aFunction(this) , length = arguments.length , pargs = Array(length) , i = 0 , _ = path._ , holder = false; while(length > i)if((pargs[i] = arguments[i++]) === _)holder = true; return function(/* ...args */){ var that = this , aLen = arguments.length , j = 0, k = 0, args; if(!holder && !aLen)return invoke(fn, pargs, that); args = pargs.slice(); if(holder)for(;length > j; j++)if(args[j] === _)args[j] = arguments[k++]; while(aLen > k)args.push(arguments[k++]); return invoke(fn, args, that); }; };core-js-2.4.1/library/modules/_path.js000066400000000000000000000000441274277553300176420ustar00rootroot00000000000000module.exports = require('./_core');core-js-2.4.1/library/modules/_property-desc.js000066400000000000000000000002671274277553300215150ustar00rootroot00000000000000module.exports = function(bitmap, value){ return { enumerable : !(bitmap & 1), configurable: !(bitmap & 2), writable : !(bitmap & 4), value : value }; };core-js-2.4.1/library/modules/_redefine-all.js000066400000000000000000000003221274277553300212340ustar00rootroot00000000000000var hide = require('./_hide'); module.exports = function(target, src, safe){ for(var key in src){ if(safe && target[key])target[key] = src[key]; else hide(target, key, src[key]); } return target; };core-js-2.4.1/library/modules/_redefine.js000066400000000000000000000000441274277553300204670ustar00rootroot00000000000000module.exports = require('./_hide');core-js-2.4.1/library/modules/_replacer.js000066400000000000000000000003431274277553300205050ustar00rootroot00000000000000module.exports = function(regExp, replace){ var replacer = replace === Object(replace) ? function(part){ return replace[part]; } : replace; return function(it){ return String(it).replace(regExp, replacer); }; };core-js-2.4.1/library/modules/_same-value.js000066400000000000000000000002161274277553300207460ustar00rootroot00000000000000// 7.2.9 SameValue(x, y) module.exports = Object.is || function is(x, y){ return x === y ? x !== 0 || 1 / x === 1 / y : x != x && y != y; };core-js-2.4.1/library/modules/_set-proto.js000066400000000000000000000015751274277553300206540ustar00rootroot00000000000000// Works with __proto__ only. Old v8 can't work with null proto objects. /* eslint-disable no-proto */ var isObject = require('./_is-object') , anObject = require('./_an-object'); var check = function(O, proto){ anObject(O); if(!isObject(proto) && proto !== null)throw TypeError(proto + ": can't set as prototype!"); }; module.exports = { set: Object.setPrototypeOf || ('__proto__' in {} ? // eslint-disable-line function(test, buggy, set){ try { set = require('./_ctx')(Function.call, require('./_object-gopd').f(Object.prototype, '__proto__').set, 2); set(test, []); buggy = !(test instanceof Array); } catch(e){ buggy = true; } return function setPrototypeOf(O, proto){ check(O, proto); if(buggy)O.__proto__ = proto; else set(O, proto); return O; }; }({}, false) : undefined), check: check };core-js-2.4.1/library/modules/_set-species.js000066400000000000000000000007011274277553300211320ustar00rootroot00000000000000'use strict'; var global = require('./_global') , core = require('./_core') , dP = require('./_object-dp') , DESCRIPTORS = require('./_descriptors') , SPECIES = require('./_wks')('species'); module.exports = function(KEY){ var C = typeof core[KEY] == 'function' ? core[KEY] : global[KEY]; if(DESCRIPTORS && C && !C[SPECIES])dP.f(C, SPECIES, { configurable: true, get: function(){ return this; } }); };core-js-2.4.1/library/modules/_set-to-string-tag.js000066400000000000000000000003751274277553300222050ustar00rootroot00000000000000var def = require('./_object-dp').f , has = require('./_has') , TAG = require('./_wks')('toStringTag'); module.exports = function(it, tag, stat){ if(it && !has(it = stat ? it : it.prototype, TAG))def(it, TAG, {configurable: true, value: tag}); };core-js-2.4.1/library/modules/_shared-key.js000066400000000000000000000002361274277553300207450ustar00rootroot00000000000000var shared = require('./_shared')('keys') , uid = require('./_uid'); module.exports = function(key){ return shared[key] || (shared[key] = uid(key)); };core-js-2.4.1/library/modules/_shared.js000066400000000000000000000003061274277553300201550ustar00rootroot00000000000000var global = require('./_global') , SHARED = '__core-js_shared__' , store = global[SHARED] || (global[SHARED] = {}); module.exports = function(key){ return store[key] || (store[key] = {}); };core-js-2.4.1/library/modules/_species-constructor.js000066400000000000000000000005241274277553300227270ustar00rootroot00000000000000// 7.3.20 SpeciesConstructor(O, defaultConstructor) var anObject = require('./_an-object') , aFunction = require('./_a-function') , SPECIES = require('./_wks')('species'); module.exports = function(O, D){ var C = anObject(O).constructor, S; return C === undefined || (S = anObject(C)[SPECIES]) == undefined ? D : aFunction(S); };core-js-2.4.1/library/modules/_strict-method.js000066400000000000000000000002731274277553300215000ustar00rootroot00000000000000var fails = require('./_fails'); module.exports = function(method, arg){ return !!method && fails(function(){ arg ? method.call(null, function(){}, 1) : method.call(null); }); };core-js-2.4.1/library/modules/_string-at.js000066400000000000000000000011431274277553300206170ustar00rootroot00000000000000var toInteger = require('./_to-integer') , defined = require('./_defined'); // true -> String#at // false -> String#codePointAt module.exports = function(TO_STRING){ return function(that, pos){ var s = String(defined(that)) , i = toInteger(pos) , l = s.length , a, b; if(i < 0 || i >= l)return TO_STRING ? '' : undefined; a = s.charCodeAt(i); return a < 0xd800 || a > 0xdbff || i + 1 === l || (b = s.charCodeAt(i + 1)) < 0xdc00 || b > 0xdfff ? TO_STRING ? s.charAt(i) : a : TO_STRING ? s.slice(i, i + 2) : (a - 0xd800 << 10) + (b - 0xdc00) + 0x10000; }; };core-js-2.4.1/library/modules/_string-context.js000066400000000000000000000004651274277553300217050ustar00rootroot00000000000000// helper for String#{startsWith, endsWith, includes} var isRegExp = require('./_is-regexp') , defined = require('./_defined'); module.exports = function(that, searchString, NAME){ if(isRegExp(searchString))throw TypeError('String#' + NAME + " doesn't accept regex!"); return String(defined(that)); };core-js-2.4.1/library/modules/_string-html.js000066400000000000000000000012701274277553300211600ustar00rootroot00000000000000var $export = require('./_export') , fails = require('./_fails') , defined = require('./_defined') , quot = /"/g; // B.2.3.2.1 CreateHTML(string, tag, attribute, value) var createHTML = function(string, tag, attribute, value) { var S = String(defined(string)) , p1 = '<' + tag; if(attribute !== '')p1 += ' ' + attribute + '="' + String(value).replace(quot, '"') + '"'; return p1 + '>' + S + ''; }; module.exports = function(NAME, exec){ var O = {}; O[NAME] = exec(createHTML); $export($export.P + $export.F * fails(function(){ var test = ''[NAME]('"'); return test !== test.toLowerCase() || test.split('"').length > 3; }), 'String', O); };core-js-2.4.1/library/modules/_string-pad.js000066400000000000000000000013571274277553300207660ustar00rootroot00000000000000// https://github.com/tc39/proposal-string-pad-start-end var toLength = require('./_to-length') , repeat = require('./_string-repeat') , defined = require('./_defined'); module.exports = function(that, maxLength, fillString, left){ var S = String(defined(that)) , stringLength = S.length , fillStr = fillString === undefined ? ' ' : String(fillString) , intMaxLength = toLength(maxLength); if(intMaxLength <= stringLength || fillStr == '')return S; var fillLen = intMaxLength - stringLength , stringFiller = repeat.call(fillStr, Math.ceil(fillLen / fillStr.length)); if(stringFiller.length > fillLen)stringFiller = stringFiller.slice(0, fillLen); return left ? stringFiller + S : S + stringFiller; }; core-js-2.4.1/library/modules/_string-repeat.js000066400000000000000000000005561274277553300215020ustar00rootroot00000000000000'use strict'; var toInteger = require('./_to-integer') , defined = require('./_defined'); module.exports = function repeat(count){ var str = String(defined(this)) , res = '' , n = toInteger(count); if(n < 0 || n == Infinity)throw RangeError("Count can't be negative"); for(;n > 0; (n >>>= 1) && (str += str))if(n & 1)res += str; return res; };core-js-2.4.1/library/modules/_string-trim.js000066400000000000000000000015761274277553300212000ustar00rootroot00000000000000var $export = require('./_export') , defined = require('./_defined') , fails = require('./_fails') , spaces = require('./_string-ws') , space = '[' + spaces + ']' , non = '\u200b\u0085' , ltrim = RegExp('^' + space + space + '*') , rtrim = RegExp(space + space + '*$'); var exporter = function(KEY, exec, ALIAS){ var exp = {}; var FORCE = fails(function(){ return !!spaces[KEY]() || non[KEY]() != non; }); var fn = exp[KEY] = FORCE ? exec(trim) : spaces[KEY]; if(ALIAS)exp[ALIAS] = fn; $export($export.P + $export.F * FORCE, 'String', exp); }; // 1 -> String#trimLeft // 2 -> String#trimRight // 3 -> String#trim var trim = exporter.trim = function(string, TYPE){ string = String(defined(string)); if(TYPE & 1)string = string.replace(ltrim, ''); if(TYPE & 2)string = string.replace(rtrim, ''); return string; }; module.exports = exporter;core-js-2.4.1/library/modules/_string-ws.js000066400000000000000000000002511274277553300206430ustar00rootroot00000000000000module.exports = '\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u180E\u2000\u2001\u2002\u2003' + '\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF';core-js-2.4.1/library/modules/_task.js000066400000000000000000000043441274277553300176570ustar00rootroot00000000000000var ctx = require('./_ctx') , invoke = require('./_invoke') , html = require('./_html') , cel = require('./_dom-create') , global = require('./_global') , process = global.process , setTask = global.setImmediate , clearTask = global.clearImmediate , MessageChannel = global.MessageChannel , counter = 0 , queue = {} , ONREADYSTATECHANGE = 'onreadystatechange' , defer, channel, port; var run = function(){ var id = +this; if(queue.hasOwnProperty(id)){ var fn = queue[id]; delete queue[id]; fn(); } }; var listener = function(event){ run.call(event.data); }; // Node.js 0.9+ & IE10+ has setImmediate, otherwise: if(!setTask || !clearTask){ setTask = function setImmediate(fn){ var args = [], i = 1; while(arguments.length > i)args.push(arguments[i++]); queue[++counter] = function(){ invoke(typeof fn == 'function' ? fn : Function(fn), args); }; defer(counter); return counter; }; clearTask = function clearImmediate(id){ delete queue[id]; }; // Node.js 0.8- if(require('./_cof')(process) == 'process'){ defer = function(id){ process.nextTick(ctx(run, id, 1)); }; // Browsers with MessageChannel, includes WebWorkers } else if(MessageChannel){ channel = new MessageChannel; port = channel.port2; channel.port1.onmessage = listener; defer = ctx(port.postMessage, port, 1); // Browsers with postMessage, skip WebWorkers // IE8 has postMessage, but it's sync & typeof its postMessage is 'object' } else if(global.addEventListener && typeof postMessage == 'function' && !global.importScripts){ defer = function(id){ global.postMessage(id + '', '*'); }; global.addEventListener('message', listener, false); // IE8- } else if(ONREADYSTATECHANGE in cel('script')){ defer = function(id){ html.appendChild(cel('script'))[ONREADYSTATECHANGE] = function(){ html.removeChild(this); run.call(id); }; }; // Rest old browsers } else { defer = function(id){ setTimeout(ctx(run, id, 1), 0); }; } } module.exports = { set: setTask, clear: clearTask };core-js-2.4.1/library/modules/_to-index.js000066400000000000000000000003461274277553300204420ustar00rootroot00000000000000var toInteger = require('./_to-integer') , max = Math.max , min = Math.min; module.exports = function(index, length){ index = toInteger(index); return index < 0 ? max(index + length, 0) : min(index, length); };core-js-2.4.1/library/modules/_to-integer.js000066400000000000000000000002361274277553300207660ustar00rootroot00000000000000// 7.1.4 ToInteger var ceil = Math.ceil , floor = Math.floor; module.exports = function(it){ return isNaN(it = +it) ? 0 : (it > 0 ? floor : ceil)(it); };core-js-2.4.1/library/modules/_to-iobject.js000066400000000000000000000003251274277553300207470ustar00rootroot00000000000000// to indexed object, toObject with fallback for non-array-like ES3 strings var IObject = require('./_iobject') , defined = require('./_defined'); module.exports = function(it){ return IObject(defined(it)); };core-js-2.4.1/library/modules/_to-length.js000066400000000000000000000003311274277553300206060ustar00rootroot00000000000000// 7.1.15 ToLength var toInteger = require('./_to-integer') , min = Math.min; module.exports = function(it){ return it > 0 ? min(toInteger(it), 0x1fffffffffffff) : 0; // pow(2, 53) - 1 == 9007199254740991 };core-js-2.4.1/library/modules/_to-object.js000066400000000000000000000002011274277553300205670ustar00rootroot00000000000000// 7.1.13 ToObject(argument) var defined = require('./_defined'); module.exports = function(it){ return Object(defined(it)); };core-js-2.4.1/library/modules/_to-primitive.js000066400000000000000000000012041274277553300213350ustar00rootroot00000000000000// 7.1.1 ToPrimitive(input [, PreferredType]) var isObject = require('./_is-object'); // instead of the ES6 spec version, we didn't implement @@toPrimitive case // and the second argument - flag - preferred type is a string module.exports = function(it, S){ if(!isObject(it))return it; var fn, val; if(S && typeof (fn = it.toString) == 'function' && !isObject(val = fn.call(it)))return val; if(typeof (fn = it.valueOf) == 'function' && !isObject(val = fn.call(it)))return val; if(!S && typeof (fn = it.toString) == 'function' && !isObject(val = fn.call(it)))return val; throw TypeError("Can't convert object to primitive value"); };core-js-2.4.1/library/modules/_typed-array.js000066400000000000000000000445741274277553300211670ustar00rootroot00000000000000'use strict'; if(require('./_descriptors')){ var LIBRARY = require('./_library') , global = require('./_global') , fails = require('./_fails') , $export = require('./_export') , $typed = require('./_typed') , $buffer = require('./_typed-buffer') , ctx = require('./_ctx') , anInstance = require('./_an-instance') , propertyDesc = require('./_property-desc') , hide = require('./_hide') , redefineAll = require('./_redefine-all') , toInteger = require('./_to-integer') , toLength = require('./_to-length') , toIndex = require('./_to-index') , toPrimitive = require('./_to-primitive') , has = require('./_has') , same = require('./_same-value') , classof = require('./_classof') , isObject = require('./_is-object') , toObject = require('./_to-object') , isArrayIter = require('./_is-array-iter') , create = require('./_object-create') , getPrototypeOf = require('./_object-gpo') , gOPN = require('./_object-gopn').f , getIterFn = require('./core.get-iterator-method') , uid = require('./_uid') , wks = require('./_wks') , createArrayMethod = require('./_array-methods') , createArrayIncludes = require('./_array-includes') , speciesConstructor = require('./_species-constructor') , ArrayIterators = require('./es6.array.iterator') , Iterators = require('./_iterators') , $iterDetect = require('./_iter-detect') , setSpecies = require('./_set-species') , arrayFill = require('./_array-fill') , arrayCopyWithin = require('./_array-copy-within') , $DP = require('./_object-dp') , $GOPD = require('./_object-gopd') , dP = $DP.f , gOPD = $GOPD.f , RangeError = global.RangeError , TypeError = global.TypeError , Uint8Array = global.Uint8Array , ARRAY_BUFFER = 'ArrayBuffer' , SHARED_BUFFER = 'Shared' + ARRAY_BUFFER , BYTES_PER_ELEMENT = 'BYTES_PER_ELEMENT' , PROTOTYPE = 'prototype' , ArrayProto = Array[PROTOTYPE] , $ArrayBuffer = $buffer.ArrayBuffer , $DataView = $buffer.DataView , arrayForEach = createArrayMethod(0) , arrayFilter = createArrayMethod(2) , arraySome = createArrayMethod(3) , arrayEvery = createArrayMethod(4) , arrayFind = createArrayMethod(5) , arrayFindIndex = createArrayMethod(6) , arrayIncludes = createArrayIncludes(true) , arrayIndexOf = createArrayIncludes(false) , arrayValues = ArrayIterators.values , arrayKeys = ArrayIterators.keys , arrayEntries = ArrayIterators.entries , arrayLastIndexOf = ArrayProto.lastIndexOf , arrayReduce = ArrayProto.reduce , arrayReduceRight = ArrayProto.reduceRight , arrayJoin = ArrayProto.join , arraySort = ArrayProto.sort , arraySlice = ArrayProto.slice , arrayToString = ArrayProto.toString , arrayToLocaleString = ArrayProto.toLocaleString , ITERATOR = wks('iterator') , TAG = wks('toStringTag') , TYPED_CONSTRUCTOR = uid('typed_constructor') , DEF_CONSTRUCTOR = uid('def_constructor') , ALL_CONSTRUCTORS = $typed.CONSTR , TYPED_ARRAY = $typed.TYPED , VIEW = $typed.VIEW , WRONG_LENGTH = 'Wrong length!'; var $map = createArrayMethod(1, function(O, length){ return allocate(speciesConstructor(O, O[DEF_CONSTRUCTOR]), length); }); var LITTLE_ENDIAN = fails(function(){ return new Uint8Array(new Uint16Array([1]).buffer)[0] === 1; }); var FORCED_SET = !!Uint8Array && !!Uint8Array[PROTOTYPE].set && fails(function(){ new Uint8Array(1).set({}); }); var strictToLength = function(it, SAME){ if(it === undefined)throw TypeError(WRONG_LENGTH); var number = +it , length = toLength(it); if(SAME && !same(number, length))throw RangeError(WRONG_LENGTH); return length; }; var toOffset = function(it, BYTES){ var offset = toInteger(it); if(offset < 0 || offset % BYTES)throw RangeError('Wrong offset!'); return offset; }; var validate = function(it){ if(isObject(it) && TYPED_ARRAY in it)return it; throw TypeError(it + ' is not a typed array!'); }; var allocate = function(C, length){ if(!(isObject(C) && TYPED_CONSTRUCTOR in C)){ throw TypeError('It is not a typed array constructor!'); } return new C(length); }; var speciesFromList = function(O, list){ return fromList(speciesConstructor(O, O[DEF_CONSTRUCTOR]), list); }; var fromList = function(C, list){ var index = 0 , length = list.length , result = allocate(C, length); while(length > index)result[index] = list[index++]; return result; }; var addGetter = function(it, key, internal){ dP(it, key, {get: function(){ return this._d[internal]; }}); }; var $from = function from(source /*, mapfn, thisArg */){ var O = toObject(source) , aLen = arguments.length , mapfn = aLen > 1 ? arguments[1] : undefined , mapping = mapfn !== undefined , iterFn = getIterFn(O) , i, length, values, result, step, iterator; if(iterFn != undefined && !isArrayIter(iterFn)){ for(iterator = iterFn.call(O), values = [], i = 0; !(step = iterator.next()).done; i++){ values.push(step.value); } O = values; } if(mapping && aLen > 2)mapfn = ctx(mapfn, arguments[2], 2); for(i = 0, length = toLength(O.length), result = allocate(this, length); length > i; i++){ result[i] = mapping ? mapfn(O[i], i) : O[i]; } return result; }; var $of = function of(/*...items*/){ var index = 0 , length = arguments.length , result = allocate(this, length); while(length > index)result[index] = arguments[index++]; return result; }; // iOS Safari 6.x fails here var TO_LOCALE_BUG = !!Uint8Array && fails(function(){ arrayToLocaleString.call(new Uint8Array(1)); }); var $toLocaleString = function toLocaleString(){ return arrayToLocaleString.apply(TO_LOCALE_BUG ? arraySlice.call(validate(this)) : validate(this), arguments); }; var proto = { copyWithin: function copyWithin(target, start /*, end */){ return arrayCopyWithin.call(validate(this), target, start, arguments.length > 2 ? arguments[2] : undefined); }, every: function every(callbackfn /*, thisArg */){ return arrayEvery(validate(this), callbackfn, arguments.length > 1 ? arguments[1] : undefined); }, fill: function fill(value /*, start, end */){ // eslint-disable-line no-unused-vars return arrayFill.apply(validate(this), arguments); }, filter: function filter(callbackfn /*, thisArg */){ return speciesFromList(this, arrayFilter(validate(this), callbackfn, arguments.length > 1 ? arguments[1] : undefined)); }, find: function find(predicate /*, thisArg */){ return arrayFind(validate(this), predicate, arguments.length > 1 ? arguments[1] : undefined); }, findIndex: function findIndex(predicate /*, thisArg */){ return arrayFindIndex(validate(this), predicate, arguments.length > 1 ? arguments[1] : undefined); }, forEach: function forEach(callbackfn /*, thisArg */){ arrayForEach(validate(this), callbackfn, arguments.length > 1 ? arguments[1] : undefined); }, indexOf: function indexOf(searchElement /*, fromIndex */){ return arrayIndexOf(validate(this), searchElement, arguments.length > 1 ? arguments[1] : undefined); }, includes: function includes(searchElement /*, fromIndex */){ return arrayIncludes(validate(this), searchElement, arguments.length > 1 ? arguments[1] : undefined); }, join: function join(separator){ // eslint-disable-line no-unused-vars return arrayJoin.apply(validate(this), arguments); }, lastIndexOf: function lastIndexOf(searchElement /*, fromIndex */){ // eslint-disable-line no-unused-vars return arrayLastIndexOf.apply(validate(this), arguments); }, map: function map(mapfn /*, thisArg */){ return $map(validate(this), mapfn, arguments.length > 1 ? arguments[1] : undefined); }, reduce: function reduce(callbackfn /*, initialValue */){ // eslint-disable-line no-unused-vars return arrayReduce.apply(validate(this), arguments); }, reduceRight: function reduceRight(callbackfn /*, initialValue */){ // eslint-disable-line no-unused-vars return arrayReduceRight.apply(validate(this), arguments); }, reverse: function reverse(){ var that = this , length = validate(that).length , middle = Math.floor(length / 2) , index = 0 , value; while(index < middle){ value = that[index]; that[index++] = that[--length]; that[length] = value; } return that; }, some: function some(callbackfn /*, thisArg */){ return arraySome(validate(this), callbackfn, arguments.length > 1 ? arguments[1] : undefined); }, sort: function sort(comparefn){ return arraySort.call(validate(this), comparefn); }, subarray: function subarray(begin, end){ var O = validate(this) , length = O.length , $begin = toIndex(begin, length); return new (speciesConstructor(O, O[DEF_CONSTRUCTOR]))( O.buffer, O.byteOffset + $begin * O.BYTES_PER_ELEMENT, toLength((end === undefined ? length : toIndex(end, length)) - $begin) ); } }; var $slice = function slice(start, end){ return speciesFromList(this, arraySlice.call(validate(this), start, end)); }; var $set = function set(arrayLike /*, offset */){ validate(this); var offset = toOffset(arguments[1], 1) , length = this.length , src = toObject(arrayLike) , len = toLength(src.length) , index = 0; if(len + offset > length)throw RangeError(WRONG_LENGTH); while(index < len)this[offset + index] = src[index++]; }; var $iterators = { entries: function entries(){ return arrayEntries.call(validate(this)); }, keys: function keys(){ return arrayKeys.call(validate(this)); }, values: function values(){ return arrayValues.call(validate(this)); } }; var isTAIndex = function(target, key){ return isObject(target) && target[TYPED_ARRAY] && typeof key != 'symbol' && key in target && String(+key) == String(key); }; var $getDesc = function getOwnPropertyDescriptor(target, key){ return isTAIndex(target, key = toPrimitive(key, true)) ? propertyDesc(2, target[key]) : gOPD(target, key); }; var $setDesc = function defineProperty(target, key, desc){ if(isTAIndex(target, key = toPrimitive(key, true)) && isObject(desc) && has(desc, 'value') && !has(desc, 'get') && !has(desc, 'set') // TODO: add validation descriptor w/o calling accessors && !desc.configurable && (!has(desc, 'writable') || desc.writable) && (!has(desc, 'enumerable') || desc.enumerable) ){ target[key] = desc.value; return target; } else return dP(target, key, desc); }; if(!ALL_CONSTRUCTORS){ $GOPD.f = $getDesc; $DP.f = $setDesc; } $export($export.S + $export.F * !ALL_CONSTRUCTORS, 'Object', { getOwnPropertyDescriptor: $getDesc, defineProperty: $setDesc }); if(fails(function(){ arrayToString.call({}); })){ arrayToString = arrayToLocaleString = function toString(){ return arrayJoin.call(this); } } var $TypedArrayPrototype$ = redefineAll({}, proto); redefineAll($TypedArrayPrototype$, $iterators); hide($TypedArrayPrototype$, ITERATOR, $iterators.values); redefineAll($TypedArrayPrototype$, { slice: $slice, set: $set, constructor: function(){ /* noop */ }, toString: arrayToString, toLocaleString: $toLocaleString }); addGetter($TypedArrayPrototype$, 'buffer', 'b'); addGetter($TypedArrayPrototype$, 'byteOffset', 'o'); addGetter($TypedArrayPrototype$, 'byteLength', 'l'); addGetter($TypedArrayPrototype$, 'length', 'e'); dP($TypedArrayPrototype$, TAG, { get: function(){ return this[TYPED_ARRAY]; } }); module.exports = function(KEY, BYTES, wrapper, CLAMPED){ CLAMPED = !!CLAMPED; var NAME = KEY + (CLAMPED ? 'Clamped' : '') + 'Array' , ISNT_UINT8 = NAME != 'Uint8Array' , GETTER = 'get' + KEY , SETTER = 'set' + KEY , TypedArray = global[NAME] , Base = TypedArray || {} , TAC = TypedArray && getPrototypeOf(TypedArray) , FORCED = !TypedArray || !$typed.ABV , O = {} , TypedArrayPrototype = TypedArray && TypedArray[PROTOTYPE]; var getter = function(that, index){ var data = that._d; return data.v[GETTER](index * BYTES + data.o, LITTLE_ENDIAN); }; var setter = function(that, index, value){ var data = that._d; if(CLAMPED)value = (value = Math.round(value)) < 0 ? 0 : value > 0xff ? 0xff : value & 0xff; data.v[SETTER](index * BYTES + data.o, value, LITTLE_ENDIAN); }; var addElement = function(that, index){ dP(that, index, { get: function(){ return getter(this, index); }, set: function(value){ return setter(this, index, value); }, enumerable: true }); }; if(FORCED){ TypedArray = wrapper(function(that, data, $offset, $length){ anInstance(that, TypedArray, NAME, '_d'); var index = 0 , offset = 0 , buffer, byteLength, length, klass; if(!isObject(data)){ length = strictToLength(data, true) byteLength = length * BYTES; buffer = new $ArrayBuffer(byteLength); } else if(data instanceof $ArrayBuffer || (klass = classof(data)) == ARRAY_BUFFER || klass == SHARED_BUFFER){ buffer = data; offset = toOffset($offset, BYTES); var $len = data.byteLength; if($length === undefined){ if($len % BYTES)throw RangeError(WRONG_LENGTH); byteLength = $len - offset; if(byteLength < 0)throw RangeError(WRONG_LENGTH); } else { byteLength = toLength($length) * BYTES; if(byteLength + offset > $len)throw RangeError(WRONG_LENGTH); } length = byteLength / BYTES; } else if(TYPED_ARRAY in data){ return fromList(TypedArray, data); } else { return $from.call(TypedArray, data); } hide(that, '_d', { b: buffer, o: offset, l: byteLength, e: length, v: new $DataView(buffer) }); while(index < length)addElement(that, index++); }); TypedArrayPrototype = TypedArray[PROTOTYPE] = create($TypedArrayPrototype$); hide(TypedArrayPrototype, 'constructor', TypedArray); } else if(!$iterDetect(function(iter){ // V8 works with iterators, but fails in many other cases // https://code.google.com/p/v8/issues/detail?id=4552 new TypedArray(null); // eslint-disable-line no-new new TypedArray(iter); // eslint-disable-line no-new }, true)){ TypedArray = wrapper(function(that, data, $offset, $length){ anInstance(that, TypedArray, NAME); var klass; // `ws` module bug, temporarily remove validation length for Uint8Array // https://github.com/websockets/ws/pull/645 if(!isObject(data))return new Base(strictToLength(data, ISNT_UINT8)); if(data instanceof $ArrayBuffer || (klass = classof(data)) == ARRAY_BUFFER || klass == SHARED_BUFFER){ return $length !== undefined ? new Base(data, toOffset($offset, BYTES), $length) : $offset !== undefined ? new Base(data, toOffset($offset, BYTES)) : new Base(data); } if(TYPED_ARRAY in data)return fromList(TypedArray, data); return $from.call(TypedArray, data); }); arrayForEach(TAC !== Function.prototype ? gOPN(Base).concat(gOPN(TAC)) : gOPN(Base), function(key){ if(!(key in TypedArray))hide(TypedArray, key, Base[key]); }); TypedArray[PROTOTYPE] = TypedArrayPrototype; if(!LIBRARY)TypedArrayPrototype.constructor = TypedArray; } var $nativeIterator = TypedArrayPrototype[ITERATOR] , CORRECT_ITER_NAME = !!$nativeIterator && ($nativeIterator.name == 'values' || $nativeIterator.name == undefined) , $iterator = $iterators.values; hide(TypedArray, TYPED_CONSTRUCTOR, true); hide(TypedArrayPrototype, TYPED_ARRAY, NAME); hide(TypedArrayPrototype, VIEW, true); hide(TypedArrayPrototype, DEF_CONSTRUCTOR, TypedArray); if(CLAMPED ? new TypedArray(1)[TAG] != NAME : !(TAG in TypedArrayPrototype)){ dP(TypedArrayPrototype, TAG, { get: function(){ return NAME; } }); } O[NAME] = TypedArray; $export($export.G + $export.W + $export.F * (TypedArray != Base), O); $export($export.S, NAME, { BYTES_PER_ELEMENT: BYTES, from: $from, of: $of }); if(!(BYTES_PER_ELEMENT in TypedArrayPrototype))hide(TypedArrayPrototype, BYTES_PER_ELEMENT, BYTES); $export($export.P, NAME, proto); setSpecies(NAME); $export($export.P + $export.F * FORCED_SET, NAME, {set: $set}); $export($export.P + $export.F * !CORRECT_ITER_NAME, NAME, $iterators); $export($export.P + $export.F * (TypedArrayPrototype.toString != arrayToString), NAME, {toString: arrayToString}); $export($export.P + $export.F * fails(function(){ new TypedArray(1).slice(); }), NAME, {slice: $slice}); $export($export.P + $export.F * (fails(function(){ return [1, 2].toLocaleString() != new TypedArray([1, 2]).toLocaleString() }) || !fails(function(){ TypedArrayPrototype.toLocaleString.call([1, 2]); })), NAME, {toLocaleString: $toLocaleString}); Iterators[NAME] = CORRECT_ITER_NAME ? $nativeIterator : $iterator; if(!LIBRARY && !CORRECT_ITER_NAME)hide(TypedArrayPrototype, ITERATOR, $iterator); }; } else module.exports = function(){ /* empty */ };core-js-2.4.1/library/modules/_typed-buffer.js000066400000000000000000000225721274277553300213140ustar00rootroot00000000000000'use strict'; var global = require('./_global') , DESCRIPTORS = require('./_descriptors') , LIBRARY = require('./_library') , $typed = require('./_typed') , hide = require('./_hide') , redefineAll = require('./_redefine-all') , fails = require('./_fails') , anInstance = require('./_an-instance') , toInteger = require('./_to-integer') , toLength = require('./_to-length') , gOPN = require('./_object-gopn').f , dP = require('./_object-dp').f , arrayFill = require('./_array-fill') , setToStringTag = require('./_set-to-string-tag') , ARRAY_BUFFER = 'ArrayBuffer' , DATA_VIEW = 'DataView' , PROTOTYPE = 'prototype' , WRONG_LENGTH = 'Wrong length!' , WRONG_INDEX = 'Wrong index!' , $ArrayBuffer = global[ARRAY_BUFFER] , $DataView = global[DATA_VIEW] , Math = global.Math , RangeError = global.RangeError , Infinity = global.Infinity , BaseBuffer = $ArrayBuffer , abs = Math.abs , pow = Math.pow , floor = Math.floor , log = Math.log , LN2 = Math.LN2 , BUFFER = 'buffer' , BYTE_LENGTH = 'byteLength' , BYTE_OFFSET = 'byteOffset' , $BUFFER = DESCRIPTORS ? '_b' : BUFFER , $LENGTH = DESCRIPTORS ? '_l' : BYTE_LENGTH , $OFFSET = DESCRIPTORS ? '_o' : BYTE_OFFSET; // IEEE754 conversions based on https://github.com/feross/ieee754 var packIEEE754 = function(value, mLen, nBytes){ var buffer = Array(nBytes) , eLen = nBytes * 8 - mLen - 1 , eMax = (1 << eLen) - 1 , eBias = eMax >> 1 , rt = mLen === 23 ? pow(2, -24) - pow(2, -77) : 0 , i = 0 , s = value < 0 || value === 0 && 1 / value < 0 ? 1 : 0 , e, m, c; value = abs(value) if(value != value || value === Infinity){ m = value != value ? 1 : 0; e = eMax; } else { e = floor(log(value) / LN2); if(value * (c = pow(2, -e)) < 1){ e--; c *= 2; } if(e + eBias >= 1){ value += rt / c; } else { value += rt * pow(2, 1 - eBias); } if(value * c >= 2){ e++; c /= 2; } if(e + eBias >= eMax){ m = 0; e = eMax; } else if(e + eBias >= 1){ m = (value * c - 1) * pow(2, mLen); e = e + eBias; } else { m = value * pow(2, eBias - 1) * pow(2, mLen); e = 0; } } for(; mLen >= 8; buffer[i++] = m & 255, m /= 256, mLen -= 8); e = e << mLen | m; eLen += mLen; for(; eLen > 0; buffer[i++] = e & 255, e /= 256, eLen -= 8); buffer[--i] |= s * 128; return buffer; }; var unpackIEEE754 = function(buffer, mLen, nBytes){ var eLen = nBytes * 8 - mLen - 1 , eMax = (1 << eLen) - 1 , eBias = eMax >> 1 , nBits = eLen - 7 , i = nBytes - 1 , s = buffer[i--] , e = s & 127 , m; s >>= 7; for(; nBits > 0; e = e * 256 + buffer[i], i--, nBits -= 8); m = e & (1 << -nBits) - 1; e >>= -nBits; nBits += mLen; for(; nBits > 0; m = m * 256 + buffer[i], i--, nBits -= 8); if(e === 0){ e = 1 - eBias; } else if(e === eMax){ return m ? NaN : s ? -Infinity : Infinity; } else { m = m + pow(2, mLen); e = e - eBias; } return (s ? -1 : 1) * m * pow(2, e - mLen); }; var unpackI32 = function(bytes){ return bytes[3] << 24 | bytes[2] << 16 | bytes[1] << 8 | bytes[0]; }; var packI8 = function(it){ return [it & 0xff]; }; var packI16 = function(it){ return [it & 0xff, it >> 8 & 0xff]; }; var packI32 = function(it){ return [it & 0xff, it >> 8 & 0xff, it >> 16 & 0xff, it >> 24 & 0xff]; }; var packF64 = function(it){ return packIEEE754(it, 52, 8); }; var packF32 = function(it){ return packIEEE754(it, 23, 4); }; var addGetter = function(C, key, internal){ dP(C[PROTOTYPE], key, {get: function(){ return this[internal]; }}); }; var get = function(view, bytes, index, isLittleEndian){ var numIndex = +index , intIndex = toInteger(numIndex); if(numIndex != intIndex || intIndex < 0 || intIndex + bytes > view[$LENGTH])throw RangeError(WRONG_INDEX); var store = view[$BUFFER]._b , start = intIndex + view[$OFFSET] , pack = store.slice(start, start + bytes); return isLittleEndian ? pack : pack.reverse(); }; var set = function(view, bytes, index, conversion, value, isLittleEndian){ var numIndex = +index , intIndex = toInteger(numIndex); if(numIndex != intIndex || intIndex < 0 || intIndex + bytes > view[$LENGTH])throw RangeError(WRONG_INDEX); var store = view[$BUFFER]._b , start = intIndex + view[$OFFSET] , pack = conversion(+value); for(var i = 0; i < bytes; i++)store[start + i] = pack[isLittleEndian ? i : bytes - i - 1]; }; var validateArrayBufferArguments = function(that, length){ anInstance(that, $ArrayBuffer, ARRAY_BUFFER); var numberLength = +length , byteLength = toLength(numberLength); if(numberLength != byteLength)throw RangeError(WRONG_LENGTH); return byteLength; }; if(!$typed.ABV){ $ArrayBuffer = function ArrayBuffer(length){ var byteLength = validateArrayBufferArguments(this, length); this._b = arrayFill.call(Array(byteLength), 0); this[$LENGTH] = byteLength; }; $DataView = function DataView(buffer, byteOffset, byteLength){ anInstance(this, $DataView, DATA_VIEW); anInstance(buffer, $ArrayBuffer, DATA_VIEW); var bufferLength = buffer[$LENGTH] , offset = toInteger(byteOffset); if(offset < 0 || offset > bufferLength)throw RangeError('Wrong offset!'); byteLength = byteLength === undefined ? bufferLength - offset : toLength(byteLength); if(offset + byteLength > bufferLength)throw RangeError(WRONG_LENGTH); this[$BUFFER] = buffer; this[$OFFSET] = offset; this[$LENGTH] = byteLength; }; if(DESCRIPTORS){ addGetter($ArrayBuffer, BYTE_LENGTH, '_l'); addGetter($DataView, BUFFER, '_b'); addGetter($DataView, BYTE_LENGTH, '_l'); addGetter($DataView, BYTE_OFFSET, '_o'); } redefineAll($DataView[PROTOTYPE], { getInt8: function getInt8(byteOffset){ return get(this, 1, byteOffset)[0] << 24 >> 24; }, getUint8: function getUint8(byteOffset){ return get(this, 1, byteOffset)[0]; }, getInt16: function getInt16(byteOffset /*, littleEndian */){ var bytes = get(this, 2, byteOffset, arguments[1]); return (bytes[1] << 8 | bytes[0]) << 16 >> 16; }, getUint16: function getUint16(byteOffset /*, littleEndian */){ var bytes = get(this, 2, byteOffset, arguments[1]); return bytes[1] << 8 | bytes[0]; }, getInt32: function getInt32(byteOffset /*, littleEndian */){ return unpackI32(get(this, 4, byteOffset, arguments[1])); }, getUint32: function getUint32(byteOffset /*, littleEndian */){ return unpackI32(get(this, 4, byteOffset, arguments[1])) >>> 0; }, getFloat32: function getFloat32(byteOffset /*, littleEndian */){ return unpackIEEE754(get(this, 4, byteOffset, arguments[1]), 23, 4); }, getFloat64: function getFloat64(byteOffset /*, littleEndian */){ return unpackIEEE754(get(this, 8, byteOffset, arguments[1]), 52, 8); }, setInt8: function setInt8(byteOffset, value){ set(this, 1, byteOffset, packI8, value); }, setUint8: function setUint8(byteOffset, value){ set(this, 1, byteOffset, packI8, value); }, setInt16: function setInt16(byteOffset, value /*, littleEndian */){ set(this, 2, byteOffset, packI16, value, arguments[2]); }, setUint16: function setUint16(byteOffset, value /*, littleEndian */){ set(this, 2, byteOffset, packI16, value, arguments[2]); }, setInt32: function setInt32(byteOffset, value /*, littleEndian */){ set(this, 4, byteOffset, packI32, value, arguments[2]); }, setUint32: function setUint32(byteOffset, value /*, littleEndian */){ set(this, 4, byteOffset, packI32, value, arguments[2]); }, setFloat32: function setFloat32(byteOffset, value /*, littleEndian */){ set(this, 4, byteOffset, packF32, value, arguments[2]); }, setFloat64: function setFloat64(byteOffset, value /*, littleEndian */){ set(this, 8, byteOffset, packF64, value, arguments[2]); } }); } else { if(!fails(function(){ new $ArrayBuffer; // eslint-disable-line no-new }) || !fails(function(){ new $ArrayBuffer(.5); // eslint-disable-line no-new })){ $ArrayBuffer = function ArrayBuffer(length){ return new BaseBuffer(validateArrayBufferArguments(this, length)); }; var ArrayBufferProto = $ArrayBuffer[PROTOTYPE] = BaseBuffer[PROTOTYPE]; for(var keys = gOPN(BaseBuffer), j = 0, key; keys.length > j; ){ if(!((key = keys[j++]) in $ArrayBuffer))hide($ArrayBuffer, key, BaseBuffer[key]); }; if(!LIBRARY)ArrayBufferProto.constructor = $ArrayBuffer; } // iOS Safari 7.x bug var view = new $DataView(new $ArrayBuffer(2)) , $setInt8 = $DataView[PROTOTYPE].setInt8; view.setInt8(0, 2147483648); view.setInt8(1, 2147483649); if(view.getInt8(0) || !view.getInt8(1))redefineAll($DataView[PROTOTYPE], { setInt8: function setInt8(byteOffset, value){ $setInt8.call(this, byteOffset, value << 24 >> 24); }, setUint8: function setUint8(byteOffset, value){ $setInt8.call(this, byteOffset, value << 24 >> 24); } }, true); } setToStringTag($ArrayBuffer, ARRAY_BUFFER); setToStringTag($DataView, DATA_VIEW); hide($DataView[PROTOTYPE], $typed.VIEW, true); exports[ARRAY_BUFFER] = $ArrayBuffer; exports[DATA_VIEW] = $DataView;core-js-2.4.1/library/modules/_typed.js000066400000000000000000000012371274277553300200400ustar00rootroot00000000000000var global = require('./_global') , hide = require('./_hide') , uid = require('./_uid') , TYPED = uid('typed_array') , VIEW = uid('view') , ABV = !!(global.ArrayBuffer && global.DataView) , CONSTR = ABV , i = 0, l = 9, Typed; var TypedArrayConstructors = ( 'Int8Array,Uint8Array,Uint8ClampedArray,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array' ).split(','); while(i < l){ if(Typed = global[TypedArrayConstructors[i++]]){ hide(Typed.prototype, TYPED, true); hide(Typed.prototype, VIEW, true); } else CONSTR = false; } module.exports = { ABV: ABV, CONSTR: CONSTR, TYPED: TYPED, VIEW: VIEW };core-js-2.4.1/library/modules/_uid.js000066400000000000000000000002361274277553300174720ustar00rootroot00000000000000var id = 0 , px = Math.random(); module.exports = function(key){ return 'Symbol('.concat(key === undefined ? '' : key, ')_', (++id + px).toString(36)); };core-js-2.4.1/library/modules/_wks-define.js000066400000000000000000000006671274277553300207550ustar00rootroot00000000000000var global = require('./_global') , core = require('./_core') , LIBRARY = require('./_library') , wksExt = require('./_wks-ext') , defineProperty = require('./_object-dp').f; module.exports = function(name){ var $Symbol = core.Symbol || (core.Symbol = LIBRARY ? {} : global.Symbol || {}); if(name.charAt(0) != '_' && !(name in $Symbol))defineProperty($Symbol, name, {value: wksExt.f(name)}); };core-js-2.4.1/library/modules/_wks-ext.js000066400000000000000000000000361274277553300203110ustar00rootroot00000000000000exports.f = require('./_wks');core-js-2.4.1/library/modules/_wks.js000066400000000000000000000005601274277553300175150ustar00rootroot00000000000000var store = require('./_shared')('wks') , uid = require('./_uid') , Symbol = require('./_global').Symbol , USE_SYMBOL = typeof Symbol == 'function'; var $exports = module.exports = function(name){ return store[name] || (store[name] = USE_SYMBOL && Symbol[name] || (USE_SYMBOL ? Symbol : uid)('Symbol.' + name)); }; $exports.store = store;core-js-2.4.1/library/modules/core.delay.js000066400000000000000000000006231274277553300205770ustar00rootroot00000000000000var global = require('./_global') , core = require('./_core') , $export = require('./_export') , partial = require('./_partial'); // https://esdiscuss.org/topic/promise-returning-delay-function $export($export.G + $export.F, { delay: function delay(time){ return new (core.Promise || global.Promise)(function(resolve){ setTimeout(partial.call(resolve, true), time); }); } });core-js-2.4.1/library/modules/core.dict.js000066400000000000000000000106431274277553300204270ustar00rootroot00000000000000'use strict'; var ctx = require('./_ctx') , $export = require('./_export') , createDesc = require('./_property-desc') , assign = require('./_object-assign') , create = require('./_object-create') , getPrototypeOf = require('./_object-gpo') , getKeys = require('./_object-keys') , dP = require('./_object-dp') , keyOf = require('./_keyof') , aFunction = require('./_a-function') , forOf = require('./_for-of') , isIterable = require('./core.is-iterable') , $iterCreate = require('./_iter-create') , step = require('./_iter-step') , isObject = require('./_is-object') , toIObject = require('./_to-iobject') , DESCRIPTORS = require('./_descriptors') , has = require('./_has'); // 0 -> Dict.forEach // 1 -> Dict.map // 2 -> Dict.filter // 3 -> Dict.some // 4 -> Dict.every // 5 -> Dict.find // 6 -> Dict.findKey // 7 -> Dict.mapPairs var createDictMethod = function(TYPE){ var IS_MAP = TYPE == 1 , IS_EVERY = TYPE == 4; return function(object, callbackfn, that /* = undefined */){ var f = ctx(callbackfn, that, 3) , O = toIObject(object) , result = IS_MAP || TYPE == 7 || TYPE == 2 ? new (typeof this == 'function' ? this : Dict) : undefined , key, val, res; for(key in O)if(has(O, key)){ val = O[key]; res = f(val, key, object); if(TYPE){ if(IS_MAP)result[key] = res; // map else if(res)switch(TYPE){ case 2: result[key] = val; break; // filter case 3: return true; // some case 5: return val; // find case 6: return key; // findKey case 7: result[res[0]] = res[1]; // mapPairs } else if(IS_EVERY)return false; // every } } return TYPE == 3 || IS_EVERY ? IS_EVERY : result; }; }; var findKey = createDictMethod(6); var createDictIter = function(kind){ return function(it){ return new DictIterator(it, kind); }; }; var DictIterator = function(iterated, kind){ this._t = toIObject(iterated); // target this._a = getKeys(iterated); // keys this._i = 0; // next index this._k = kind; // kind }; $iterCreate(DictIterator, 'Dict', function(){ var that = this , O = that._t , keys = that._a , kind = that._k , key; do { if(that._i >= keys.length){ that._t = undefined; return step(1); } } while(!has(O, key = keys[that._i++])); if(kind == 'keys' )return step(0, key); if(kind == 'values')return step(0, O[key]); return step(0, [key, O[key]]); }); function Dict(iterable){ var dict = create(null); if(iterable != undefined){ if(isIterable(iterable)){ forOf(iterable, true, function(key, value){ dict[key] = value; }); } else assign(dict, iterable); } return dict; } Dict.prototype = null; function reduce(object, mapfn, init){ aFunction(mapfn); var O = toIObject(object) , keys = getKeys(O) , length = keys.length , i = 0 , memo, key; if(arguments.length < 3){ if(!length)throw TypeError('Reduce of empty object with no initial value'); memo = O[keys[i++]]; } else memo = Object(init); while(length > i)if(has(O, key = keys[i++])){ memo = mapfn(memo, O[key], key, object); } return memo; } function includes(object, el){ return (el == el ? keyOf(object, el) : findKey(object, function(it){ return it != it; })) !== undefined; } function get(object, key){ if(has(object, key))return object[key]; } function set(object, key, value){ if(DESCRIPTORS && key in Object)dP.f(object, key, createDesc(0, value)); else object[key] = value; return object; } function isDict(it){ return isObject(it) && getPrototypeOf(it) === Dict.prototype; } $export($export.G + $export.F, {Dict: Dict}); $export($export.S, 'Dict', { keys: createDictIter('keys'), values: createDictIter('values'), entries: createDictIter('entries'), forEach: createDictMethod(0), map: createDictMethod(1), filter: createDictMethod(2), some: createDictMethod(3), every: createDictMethod(4), find: createDictMethod(5), findKey: findKey, mapPairs: createDictMethod(7), reduce: reduce, keyOf: keyOf, includes: includes, has: has, get: get, set: set, isDict: isDict });core-js-2.4.1/library/modules/core.function.part.js000066400000000000000000000003161274277553300222720ustar00rootroot00000000000000var path = require('./_path') , $export = require('./_export'); // Placeholder require('./_core')._ = path._ = path._ || {}; $export($export.P + $export.F, 'Function', {part: require('./_partial')});core-js-2.4.1/library/modules/core.get-iterator-method.js000066400000000000000000000004451274277553300233670ustar00rootroot00000000000000var classof = require('./_classof') , ITERATOR = require('./_wks')('iterator') , Iterators = require('./_iterators'); module.exports = require('./_core').getIteratorMethod = function(it){ if(it != undefined)return it[ITERATOR] || it['@@iterator'] || Iterators[classof(it)]; };core-js-2.4.1/library/modules/core.get-iterator.js000066400000000000000000000004471274277553300221130ustar00rootroot00000000000000var anObject = require('./_an-object') , get = require('./core.get-iterator-method'); module.exports = require('./_core').getIterator = function(it){ var iterFn = get(it); if(typeof iterFn != 'function')throw TypeError(it + ' is not iterable!'); return anObject(iterFn.call(it)); };core-js-2.4.1/library/modules/core.is-iterable.js000066400000000000000000000004751274277553300217060ustar00rootroot00000000000000var classof = require('./_classof') , ITERATOR = require('./_wks')('iterator') , Iterators = require('./_iterators'); module.exports = require('./_core').isIterable = function(it){ var O = Object(it); return O[ITERATOR] !== undefined || '@@iterator' in O || Iterators.hasOwnProperty(classof(O)); };core-js-2.4.1/library/modules/core.number.iterator.js000066400000000000000000000003561274277553300226240ustar00rootroot00000000000000'use strict'; require('./_iter-define')(Number, 'Number', function(iterated){ this._l = +iterated; this._i = 0; }, function(){ var i = this._i++ , done = !(i < this._l); return {done: done, value: done ? undefined : i}; });core-js-2.4.1/library/modules/core.object.classof.js000066400000000000000000000001601274277553300223740ustar00rootroot00000000000000var $export = require('./_export'); $export($export.S + $export.F, 'Object', {classof: require('./_classof')});core-js-2.4.1/library/modules/core.object.define.js000066400000000000000000000002121274277553300221720ustar00rootroot00000000000000var $export = require('./_export') , define = require('./_object-define'); $export($export.S + $export.F, 'Object', {define: define});core-js-2.4.1/library/modules/core.object.is-object.js000066400000000000000000000001631274277553300226240ustar00rootroot00000000000000var $export = require('./_export'); $export($export.S + $export.F, 'Object', {isObject: require('./_is-object')});core-js-2.4.1/library/modules/core.object.make.js000066400000000000000000000003641274277553300216650ustar00rootroot00000000000000var $export = require('./_export') , define = require('./_object-define') , create = require('./_object-create'); $export($export.S + $export.F, 'Object', { make: function(proto, mixin){ return define(create(proto), mixin); } });core-js-2.4.1/library/modules/core.regexp.escape.js000066400000000000000000000003501274277553300222270ustar00rootroot00000000000000// https://github.com/benjamingr/RexExp.escape var $export = require('./_export') , $re = require('./_replacer')(/[\\^$*+?.()|[\]{}]/g, '\\$&'); $export($export.S, 'RegExp', {escape: function escape(it){ return $re(it); }}); core-js-2.4.1/library/modules/core.string.escape-html.js000066400000000000000000000004301274277553300232040ustar00rootroot00000000000000'use strict'; var $export = require('./_export'); var $re = require('./_replacer')(/[&<>"']/g, { '&': '&', '<': '<', '>': '>', '"': '"', "'": ''' }); $export($export.P + $export.F, 'String', {escapeHTML: function escapeHTML(){ return $re(this); }});core-js-2.4.1/library/modules/core.string.unescape-html.js000066400000000000000000000004641274277553300235560ustar00rootroot00000000000000'use strict'; var $export = require('./_export'); var $re = require('./_replacer')(/&(?:amp|lt|gt|quot|apos);/g, { '&': '&', '<': '<', '>': '>', '"': '"', ''': "'" }); $export($export.P + $export.F, 'String', {unescapeHTML: function unescapeHTML(){ return $re(this); }});core-js-2.4.1/library/modules/es5.js000066400000000000000000000023311274277553300172440ustar00rootroot00000000000000// This file still here for a legacy code and will be removed in a near time require('./es6.object.create'); require('./es6.object.define-property'); require('./es6.object.define-properties'); require('./es6.object.get-own-property-descriptor'); require('./es6.object.get-prototype-of'); require('./es6.object.keys'); require('./es6.object.get-own-property-names'); require('./es6.object.freeze'); require('./es6.object.seal'); require('./es6.object.prevent-extensions'); require('./es6.object.is-frozen'); require('./es6.object.is-sealed'); require('./es6.object.is-extensible'); require('./es6.function.bind'); require('./es6.array.is-array'); require('./es6.array.join'); require('./es6.array.slice'); require('./es6.array.sort'); require('./es6.array.for-each'); require('./es6.array.map'); require('./es6.array.filter'); require('./es6.array.some'); require('./es6.array.every'); require('./es6.array.reduce'); require('./es6.array.reduce-right'); require('./es6.array.index-of'); require('./es6.array.last-index-of'); require('./es6.date.now'); require('./es6.date.to-iso-string'); require('./es6.date.to-json'); require('./es6.parse-int'); require('./es6.parse-float'); require('./es6.string.trim'); require('./es6.regexp.to-string');core-js-2.4.1/library/modules/es6.array.copy-within.js000066400000000000000000000003521274277553300226340ustar00rootroot00000000000000// 22.1.3.3 Array.prototype.copyWithin(target, start, end = this.length) var $export = require('./_export'); $export($export.P, 'Array', {copyWithin: require('./_array-copy-within')}); require('./_add-to-unscopables')('copyWithin');core-js-2.4.1/library/modules/es6.array.every.js000066400000000000000000000005601274277553300215150ustar00rootroot00000000000000'use strict'; var $export = require('./_export') , $every = require('./_array-methods')(4); $export($export.P + $export.F * !require('./_strict-method')([].every, true), 'Array', { // 22.1.3.5 / 15.4.4.16 Array.prototype.every(callbackfn [, thisArg]) every: function every(callbackfn /* , thisArg */){ return $every(this, callbackfn, arguments[1]); } });core-js-2.4.1/library/modules/es6.array.fill.js000066400000000000000000000003241274277553300213070ustar00rootroot00000000000000// 22.1.3.6 Array.prototype.fill(value, start = 0, end = this.length) var $export = require('./_export'); $export($export.P, 'Array', {fill: require('./_array-fill')}); require('./_add-to-unscopables')('fill');core-js-2.4.1/library/modules/es6.array.filter.js000066400000000000000000000005651274277553300216550ustar00rootroot00000000000000'use strict'; var $export = require('./_export') , $filter = require('./_array-methods')(2); $export($export.P + $export.F * !require('./_strict-method')([].filter, true), 'Array', { // 22.1.3.7 / 15.4.4.20 Array.prototype.filter(callbackfn [, thisArg]) filter: function filter(callbackfn /* , thisArg */){ return $filter(this, callbackfn, arguments[1]); } });core-js-2.4.1/library/modules/es6.array.find-index.js000066400000000000000000000010371274277553300224100ustar00rootroot00000000000000'use strict'; // 22.1.3.9 Array.prototype.findIndex(predicate, thisArg = undefined) var $export = require('./_export') , $find = require('./_array-methods')(6) , KEY = 'findIndex' , forced = true; // Shouldn't skip holes if(KEY in [])Array(1)[KEY](function(){ forced = false; }); $export($export.P + $export.F * forced, 'Array', { findIndex: function findIndex(callbackfn/*, that = undefined */){ return $find(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined); } }); require('./_add-to-unscopables')(KEY);core-js-2.4.1/library/modules/es6.array.find.js000066400000000000000000000010131274277553300212750ustar00rootroot00000000000000'use strict'; // 22.1.3.8 Array.prototype.find(predicate, thisArg = undefined) var $export = require('./_export') , $find = require('./_array-methods')(5) , KEY = 'find' , forced = true; // Shouldn't skip holes if(KEY in [])Array(1)[KEY](function(){ forced = false; }); $export($export.P + $export.F * forced, 'Array', { find: function find(callbackfn/*, that = undefined */){ return $find(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined); } }); require('./_add-to-unscopables')(KEY);core-js-2.4.1/library/modules/es6.array.for-each.js000066400000000000000000000006231274277553300220470ustar00rootroot00000000000000'use strict'; var $export = require('./_export') , $forEach = require('./_array-methods')(0) , STRICT = require('./_strict-method')([].forEach, true); $export($export.P + $export.F * !STRICT, 'Array', { // 22.1.3.10 / 15.4.4.18 Array.prototype.forEach(callbackfn [, thisArg]) forEach: function forEach(callbackfn /* , thisArg */){ return $forEach(this, callbackfn, arguments[1]); } });core-js-2.4.1/library/modules/es6.array.from.js000066400000000000000000000032111274277553300213220ustar00rootroot00000000000000'use strict'; var ctx = require('./_ctx') , $export = require('./_export') , toObject = require('./_to-object') , call = require('./_iter-call') , isArrayIter = require('./_is-array-iter') , toLength = require('./_to-length') , createProperty = require('./_create-property') , getIterFn = require('./core.get-iterator-method'); $export($export.S + $export.F * !require('./_iter-detect')(function(iter){ Array.from(iter); }), 'Array', { // 22.1.2.1 Array.from(arrayLike, mapfn = undefined, thisArg = undefined) from: function from(arrayLike/*, mapfn = undefined, thisArg = undefined*/){ var O = toObject(arrayLike) , C = typeof this == 'function' ? this : Array , aLen = arguments.length , mapfn = aLen > 1 ? arguments[1] : undefined , mapping = mapfn !== undefined , index = 0 , iterFn = getIterFn(O) , length, result, step, iterator; if(mapping)mapfn = ctx(mapfn, aLen > 2 ? arguments[2] : undefined, 2); // if object isn't iterable or it's array with default iterator - use simple case if(iterFn != undefined && !(C == Array && isArrayIter(iterFn))){ for(iterator = iterFn.call(O), result = new C; !(step = iterator.next()).done; index++){ createProperty(result, index, mapping ? call(iterator, mapfn, [step.value, index], true) : step.value); } } else { length = toLength(O.length); for(result = new C(length); length > index; index++){ createProperty(result, index, mapping ? mapfn(O[index], index) : O[index]); } } result.length = index; return result; } }); core-js-2.4.1/library/modules/es6.array.index-of.js000066400000000000000000000011351274277553300220730ustar00rootroot00000000000000'use strict'; var $export = require('./_export') , $indexOf = require('./_array-includes')(false) , $native = [].indexOf , NEGATIVE_ZERO = !!$native && 1 / [1].indexOf(1, -0) < 0; $export($export.P + $export.F * (NEGATIVE_ZERO || !require('./_strict-method')($native)), 'Array', { // 22.1.3.11 / 15.4.4.14 Array.prototype.indexOf(searchElement [, fromIndex]) indexOf: function indexOf(searchElement /*, fromIndex = 0 */){ return NEGATIVE_ZERO // convert -0 to +0 ? $native.apply(this, arguments) || 0 : $indexOf(this, searchElement, arguments[1]); } });core-js-2.4.1/library/modules/es6.array.is-array.js000066400000000000000000000002161274277553300221100ustar00rootroot00000000000000// 22.1.2.2 / 15.4.3.2 Array.isArray(arg) var $export = require('./_export'); $export($export.S, 'Array', {isArray: require('./_is-array')});core-js-2.4.1/library/modules/es6.array.iterator.js000066400000000000000000000021551274277553300222160ustar00rootroot00000000000000'use strict'; var addToUnscopables = require('./_add-to-unscopables') , step = require('./_iter-step') , Iterators = require('./_iterators') , toIObject = require('./_to-iobject'); // 22.1.3.4 Array.prototype.entries() // 22.1.3.13 Array.prototype.keys() // 22.1.3.29 Array.prototype.values() // 22.1.3.30 Array.prototype[@@iterator]() module.exports = require('./_iter-define')(Array, 'Array', function(iterated, kind){ this._t = toIObject(iterated); // target this._i = 0; // next index this._k = kind; // kind // 22.1.5.2.1 %ArrayIteratorPrototype%.next() }, function(){ var O = this._t , kind = this._k , index = this._i++; if(!O || index >= O.length){ this._t = undefined; return step(1); } if(kind == 'keys' )return step(0, index); if(kind == 'values')return step(0, O[index]); return step(0, [index, O[index]]); }, 'values'); // argumentsList[@@iterator] is %ArrayProto_values% (9.4.4.6, 9.4.4.7) Iterators.Arguments = Iterators.Array; addToUnscopables('keys'); addToUnscopables('values'); addToUnscopables('entries');core-js-2.4.1/library/modules/es6.array.join.js000066400000000000000000000007031274277553300213210ustar00rootroot00000000000000'use strict'; // 22.1.3.13 Array.prototype.join(separator) var $export = require('./_export') , toIObject = require('./_to-iobject') , arrayJoin = [].join; // fallback for not array-like strings $export($export.P + $export.F * (require('./_iobject') != Object || !require('./_strict-method')(arrayJoin)), 'Array', { join: function join(separator){ return arrayJoin.call(toIObject(this), separator === undefined ? ',' : separator); } });core-js-2.4.1/library/modules/es6.array.last-index-of.js000066400000000000000000000017151274277553300230400ustar00rootroot00000000000000'use strict'; var $export = require('./_export') , toIObject = require('./_to-iobject') , toInteger = require('./_to-integer') , toLength = require('./_to-length') , $native = [].lastIndexOf , NEGATIVE_ZERO = !!$native && 1 / [1].lastIndexOf(1, -0) < 0; $export($export.P + $export.F * (NEGATIVE_ZERO || !require('./_strict-method')($native)), 'Array', { // 22.1.3.14 / 15.4.4.15 Array.prototype.lastIndexOf(searchElement [, fromIndex]) lastIndexOf: function lastIndexOf(searchElement /*, fromIndex = @[*-1] */){ // convert -0 to +0 if(NEGATIVE_ZERO)return $native.apply(this, arguments) || 0; var O = toIObject(this) , length = toLength(O.length) , index = length - 1; if(arguments.length > 1)index = Math.min(index, toInteger(arguments[1])); if(index < 0)index = length + index; for(;index >= 0; index--)if(index in O)if(O[index] === searchElement)return index || 0; return -1; } });core-js-2.4.1/library/modules/es6.array.map.js000066400000000000000000000005471274277553300211450ustar00rootroot00000000000000'use strict'; var $export = require('./_export') , $map = require('./_array-methods')(1); $export($export.P + $export.F * !require('./_strict-method')([].map, true), 'Array', { // 22.1.3.15 / 15.4.4.19 Array.prototype.map(callbackfn [, thisArg]) map: function map(callbackfn /* , thisArg */){ return $map(this, callbackfn, arguments[1]); } });core-js-2.4.1/library/modules/es6.array.of.js000066400000000000000000000011271274277553300207670ustar00rootroot00000000000000'use strict'; var $export = require('./_export') , createProperty = require('./_create-property'); // WebKit Array.of isn't generic $export($export.S + $export.F * require('./_fails')(function(){ function F(){} return !(Array.of.call(F) instanceof F); }), 'Array', { // 22.1.2.3 Array.of( ...items) of: function of(/* ...args */){ var index = 0 , aLen = arguments.length , result = new (typeof this == 'function' ? this : Array)(aLen); while(aLen > index)createProperty(result, index, arguments[index++]); result.length = aLen; return result; } });core-js-2.4.1/library/modules/es6.array.reduce-right.js000066400000000000000000000006501274277553300227450ustar00rootroot00000000000000'use strict'; var $export = require('./_export') , $reduce = require('./_array-reduce'); $export($export.P + $export.F * !require('./_strict-method')([].reduceRight, true), 'Array', { // 22.1.3.19 / 15.4.4.22 Array.prototype.reduceRight(callbackfn [, initialValue]) reduceRight: function reduceRight(callbackfn /* , initialValue */){ return $reduce(this, callbackfn, arguments.length, arguments[1], true); } });core-js-2.4.1/library/modules/es6.array.reduce.js000066400000000000000000000006251274277553300216340ustar00rootroot00000000000000'use strict'; var $export = require('./_export') , $reduce = require('./_array-reduce'); $export($export.P + $export.F * !require('./_strict-method')([].reduce, true), 'Array', { // 22.1.3.18 / 15.4.4.21 Array.prototype.reduce(callbackfn [, initialValue]) reduce: function reduce(callbackfn /* , initialValue */){ return $reduce(this, callbackfn, arguments.length, arguments[1], false); } });core-js-2.4.1/library/modules/es6.array.slice.js000066400000000000000000000016151274277553300214640ustar00rootroot00000000000000'use strict'; var $export = require('./_export') , html = require('./_html') , cof = require('./_cof') , toIndex = require('./_to-index') , toLength = require('./_to-length') , arraySlice = [].slice; // fallback for not array-like ES3 strings and DOM objects $export($export.P + $export.F * require('./_fails')(function(){ if(html)arraySlice.call(html); }), 'Array', { slice: function slice(begin, end){ var len = toLength(this.length) , klass = cof(this); end = end === undefined ? len : end; if(klass == 'Array')return arraySlice.call(this, begin, end); var start = toIndex(begin, len) , upTo = toIndex(end, len) , size = toLength(upTo - start) , cloned = Array(size) , i = 0; for(; i < size; i++)cloned[i] = klass == 'String' ? this.charAt(start + i) : this[start + i]; return cloned; } });core-js-2.4.1/library/modules/es6.array.some.js000066400000000000000000000005541274277553300213310ustar00rootroot00000000000000'use strict'; var $export = require('./_export') , $some = require('./_array-methods')(3); $export($export.P + $export.F * !require('./_strict-method')([].some, true), 'Array', { // 22.1.3.23 / 15.4.4.17 Array.prototype.some(callbackfn [, thisArg]) some: function some(callbackfn /* , thisArg */){ return $some(this, callbackfn, arguments[1]); } });core-js-2.4.1/library/modules/es6.array.sort.js000066400000000000000000000012101274277553300213430ustar00rootroot00000000000000'use strict'; var $export = require('./_export') , aFunction = require('./_a-function') , toObject = require('./_to-object') , fails = require('./_fails') , $sort = [].sort , test = [1, 2, 3]; $export($export.P + $export.F * (fails(function(){ // IE8- test.sort(undefined); }) || !fails(function(){ // V8 bug test.sort(null); // Old WebKit }) || !require('./_strict-method')($sort)), 'Array', { // 22.1.3.25 Array.prototype.sort(comparefn) sort: function sort(comparefn){ return comparefn === undefined ? $sort.call(toObject(this)) : $sort.call(toObject(this), aFunction(comparefn)); } });core-js-2.4.1/library/modules/es6.array.species.js000066400000000000000000000000431274277553300220120ustar00rootroot00000000000000require('./_set-species')('Array');core-js-2.4.1/library/modules/es6.date.now.js000066400000000000000000000002251274277553300207630ustar00rootroot00000000000000// 20.3.3.1 / 15.9.4.4 Date.now() var $export = require('./_export'); $export($export.S, 'Date', {now: function(){ return new Date().getTime(); }});core-js-2.4.1/library/modules/es6.date.to-iso-string.js000066400000000000000000000017611274277553300227040ustar00rootroot00000000000000'use strict'; // 20.3.4.36 / 15.9.5.43 Date.prototype.toISOString() var $export = require('./_export') , fails = require('./_fails') , getTime = Date.prototype.getTime; var lz = function(num){ return num > 9 ? num : '0' + num; }; // PhantomJS / old WebKit has a broken implementations $export($export.P + $export.F * (fails(function(){ return new Date(-5e13 - 1).toISOString() != '0385-07-25T07:06:39.999Z'; }) || !fails(function(){ new Date(NaN).toISOString(); })), 'Date', { toISOString: function toISOString(){ if(!isFinite(getTime.call(this)))throw RangeError('Invalid time value'); var d = this , y = d.getUTCFullYear() , m = d.getUTCMilliseconds() , s = y < 0 ? '-' : y > 9999 ? '+' : ''; return s + ('00000' + Math.abs(y)).slice(s ? -6 : -4) + '-' + lz(d.getUTCMonth() + 1) + '-' + lz(d.getUTCDate()) + 'T' + lz(d.getUTCHours()) + ':' + lz(d.getUTCMinutes()) + ':' + lz(d.getUTCSeconds()) + '.' + (m > 99 ? m : '0' + lz(m)) + 'Z'; } });core-js-2.4.1/library/modules/es6.date.to-json.js000066400000000000000000000007761274277553300215640ustar00rootroot00000000000000'use strict'; var $export = require('./_export') , toObject = require('./_to-object') , toPrimitive = require('./_to-primitive'); $export($export.P + $export.F * require('./_fails')(function(){ return new Date(NaN).toJSON() !== null || Date.prototype.toJSON.call({toISOString: function(){ return 1; }}) !== 1; }), 'Date', { toJSON: function toJSON(key){ var O = toObject(this) , pv = toPrimitive(O); return typeof pv == 'number' && !isFinite(pv) ? null : O.toISOString(); } });core-js-2.4.1/library/modules/es6.date.to-primitive.js000066400000000000000000000000001274277553300225770ustar00rootroot00000000000000core-js-2.4.1/library/modules/es6.date.to-string.js000066400000000000000000000000001274277553300220750ustar00rootroot00000000000000core-js-2.4.1/library/modules/es6.function.bind.js000066400000000000000000000002411274277553300220020ustar00rootroot00000000000000// 19.2.3.2 / 15.3.4.5 Function.prototype.bind(thisArg, args...) var $export = require('./_export'); $export($export.P, 'Function', {bind: require('./_bind')});core-js-2.4.1/library/modules/es6.function.has-instance.js000066400000000000000000000012171274277553300234470ustar00rootroot00000000000000'use strict'; var isObject = require('./_is-object') , getPrototypeOf = require('./_object-gpo') , HAS_INSTANCE = require('./_wks')('hasInstance') , FunctionProto = Function.prototype; // 19.2.3.6 Function.prototype[@@hasInstance](V) if(!(HAS_INSTANCE in FunctionProto))require('./_object-dp').f(FunctionProto, HAS_INSTANCE, {value: function(O){ if(typeof this != 'function' || !isObject(O))return false; if(!isObject(this.prototype))return O instanceof this; // for environment w/o native `@@hasInstance` logic enough `instanceof`, but add this: while(O = getPrototypeOf(O))if(this.prototype === O)return true; return false; }});core-js-2.4.1/library/modules/es6.function.name.js000066400000000000000000000000001274277553300217770ustar00rootroot00000000000000core-js-2.4.1/library/modules/es6.map.js000066400000000000000000000010351274277553300200210ustar00rootroot00000000000000'use strict'; var strong = require('./_collection-strong'); // 23.1 Map Objects module.exports = require('./_collection')('Map', function(get){ return function Map(){ return get(this, arguments.length > 0 ? arguments[0] : undefined); }; }, { // 23.1.3.6 Map.prototype.get(key) get: function get(key){ var entry = strong.getEntry(this, key); return entry && entry.v; }, // 23.1.3.9 Map.prototype.set(key, value) set: function set(key, value){ return strong.def(this, key === 0 ? 0 : key, value); } }, strong, true);core-js-2.4.1/library/modules/es6.math.acosh.js000066400000000000000000000010751274277553300212750ustar00rootroot00000000000000// 20.2.2.3 Math.acosh(x) var $export = require('./_export') , log1p = require('./_math-log1p') , sqrt = Math.sqrt , $acosh = Math.acosh; $export($export.S + $export.F * !($acosh // V8 bug: https://code.google.com/p/v8/issues/detail?id=3509 && Math.floor($acosh(Number.MAX_VALUE)) == 710 // Tor Browser bug: Math.acosh(Infinity) -> NaN && $acosh(Infinity) == Infinity ), 'Math', { acosh: function acosh(x){ return (x = +x) < 1 ? NaN : x > 94906265.62425156 ? Math.log(x) + Math.LN2 : log1p(x - 1 + sqrt(x - 1) * sqrt(x + 1)); } });core-js-2.4.1/library/modules/es6.math.asinh.js000066400000000000000000000005231274277553300212770ustar00rootroot00000000000000// 20.2.2.5 Math.asinh(x) var $export = require('./_export') , $asinh = Math.asinh; function asinh(x){ return !isFinite(x = +x) || x == 0 ? x : x < 0 ? -asinh(-x) : Math.log(x + Math.sqrt(x * x + 1)); } // Tor Browser bug: Math.asinh(0) -> -0 $export($export.S + $export.F * !($asinh && 1 / $asinh(0) > 0), 'Math', {asinh: asinh});core-js-2.4.1/library/modules/es6.math.atanh.js000066400000000000000000000004571274277553300212760ustar00rootroot00000000000000// 20.2.2.7 Math.atanh(x) var $export = require('./_export') , $atanh = Math.atanh; // Tor Browser bug: Math.atanh(-0) -> 0 $export($export.S + $export.F * !($atanh && 1 / $atanh(-0) < 0), 'Math', { atanh: function atanh(x){ return (x = +x) == 0 ? x : Math.log((1 + x) / (1 - x)) / 2; } });core-js-2.4.1/library/modules/es6.math.cbrt.js000066400000000000000000000003321274277553300211250ustar00rootroot00000000000000// 20.2.2.9 Math.cbrt(x) var $export = require('./_export') , sign = require('./_math-sign'); $export($export.S, 'Math', { cbrt: function cbrt(x){ return sign(x = +x) * Math.pow(Math.abs(x), 1 / 3); } });core-js-2.4.1/library/modules/es6.math.clz32.js000066400000000000000000000003161274277553300211320ustar00rootroot00000000000000// 20.2.2.11 Math.clz32(x) var $export = require('./_export'); $export($export.S, 'Math', { clz32: function clz32(x){ return (x >>>= 0) ? 31 - Math.floor(Math.log(x + 0.5) * Math.LOG2E) : 32; } });core-js-2.4.1/library/modules/es6.math.cosh.js000066400000000000000000000002741274277553300211340ustar00rootroot00000000000000// 20.2.2.12 Math.cosh(x) var $export = require('./_export') , exp = Math.exp; $export($export.S, 'Math', { cosh: function cosh(x){ return (exp(x = +x) + exp(-x)) / 2; } });core-js-2.4.1/library/modules/es6.math.expm1.js000066400000000000000000000002701274277553300212260ustar00rootroot00000000000000// 20.2.2.14 Math.expm1(x) var $export = require('./_export') , $expm1 = require('./_math-expm1'); $export($export.S + $export.F * ($expm1 != Math.expm1), 'Math', {expm1: $expm1});core-js-2.4.1/library/modules/es6.math.fround.js000066400000000000000000000013471274277553300214770ustar00rootroot00000000000000// 20.2.2.16 Math.fround(x) var $export = require('./_export') , sign = require('./_math-sign') , pow = Math.pow , EPSILON = pow(2, -52) , EPSILON32 = pow(2, -23) , MAX32 = pow(2, 127) * (2 - EPSILON32) , MIN32 = pow(2, -126); var roundTiesToEven = function(n){ return n + 1 / EPSILON - 1 / EPSILON; }; $export($export.S, 'Math', { fround: function fround(x){ var $abs = Math.abs(x) , $sign = sign(x) , a, result; if($abs < MIN32)return $sign * roundTiesToEven($abs / MIN32 / EPSILON32) * MIN32 * EPSILON32; a = (1 + EPSILON32 / EPSILON) * $abs; result = a - (a - $abs); if(result > MAX32 || result != result)return $sign * Infinity; return $sign * result; } });core-js-2.4.1/library/modules/es6.math.hypot.js000066400000000000000000000012261274277553300213410ustar00rootroot00000000000000// 20.2.2.17 Math.hypot([value1[, value2[, … ]]]) var $export = require('./_export') , abs = Math.abs; $export($export.S, 'Math', { hypot: function hypot(value1, value2){ // eslint-disable-line no-unused-vars var sum = 0 , i = 0 , aLen = arguments.length , larg = 0 , arg, div; while(i < aLen){ arg = abs(arguments[i++]); if(larg < arg){ div = larg / arg; sum = sum * div * div + 1; larg = arg; } else if(arg > 0){ div = arg / larg; sum += div * div; } else sum += arg; } return larg === Infinity ? Infinity : larg * Math.sqrt(sum); } });core-js-2.4.1/library/modules/es6.math.imul.js000066400000000000000000000010241274277553300211400ustar00rootroot00000000000000// 20.2.2.18 Math.imul(x, y) var $export = require('./_export') , $imul = Math.imul; // some WebKit versions fails with big numbers, some has wrong arity $export($export.S + $export.F * require('./_fails')(function(){ return $imul(0xffffffff, 5) != -5 || $imul.length != 2; }), 'Math', { imul: function imul(x, y){ var UINT16 = 0xffff , xn = +x , yn = +y , xl = UINT16 & xn , yl = UINT16 & yn; return 0 | xl * yl + ((UINT16 & xn >>> 16) * yl + xl * (UINT16 & yn >>> 16) << 16 >>> 0); } });core-js-2.4.1/library/modules/es6.math.log10.js000066400000000000000000000002441274277553300211170ustar00rootroot00000000000000// 20.2.2.21 Math.log10(x) var $export = require('./_export'); $export($export.S, 'Math', { log10: function log10(x){ return Math.log(x) / Math.LN10; } });core-js-2.4.1/library/modules/es6.math.log1p.js000066400000000000000000000001761274277553300212230ustar00rootroot00000000000000// 20.2.2.20 Math.log1p(x) var $export = require('./_export'); $export($export.S, 'Math', {log1p: require('./_math-log1p')});core-js-2.4.1/library/modules/es6.math.log2.js000066400000000000000000000002401274277553300210340ustar00rootroot00000000000000// 20.2.2.22 Math.log2(x) var $export = require('./_export'); $export($export.S, 'Math', { log2: function log2(x){ return Math.log(x) / Math.LN2; } });core-js-2.4.1/library/modules/es6.math.sign.js000066400000000000000000000001731274277553300211360ustar00rootroot00000000000000// 20.2.2.28 Math.sign(x) var $export = require('./_export'); $export($export.S, 'Math', {sign: require('./_math-sign')});core-js-2.4.1/library/modules/es6.math.sinh.js000066400000000000000000000007061274277553300211410ustar00rootroot00000000000000// 20.2.2.30 Math.sinh(x) var $export = require('./_export') , expm1 = require('./_math-expm1') , exp = Math.exp; // V8 near Chromium 38 has a problem with very small numbers $export($export.S + $export.F * require('./_fails')(function(){ return !Math.sinh(-2e-17) != -2e-17; }), 'Math', { sinh: function sinh(x){ return Math.abs(x = +x) < 1 ? (expm1(x) - expm1(-x)) / 2 : (exp(x - 1) - exp(-x - 1)) * (Math.E / 2); } });core-js-2.4.1/library/modules/es6.math.tanh.js000066400000000000000000000004761274277553300211360ustar00rootroot00000000000000// 20.2.2.33 Math.tanh(x) var $export = require('./_export') , expm1 = require('./_math-expm1') , exp = Math.exp; $export($export.S, 'Math', { tanh: function tanh(x){ var a = expm1(x = +x) , b = expm1(-x); return a == Infinity ? 1 : b == Infinity ? -1 : (a - b) / (exp(x) + exp(-x)); } });core-js-2.4.1/library/modules/es6.math.trunc.js000066400000000000000000000002631274277553300213310ustar00rootroot00000000000000// 20.2.2.34 Math.trunc(x) var $export = require('./_export'); $export($export.S, 'Math', { trunc: function trunc(it){ return (it > 0 ? Math.floor : Math.ceil)(it); } });core-js-2.4.1/library/modules/es6.number.constructor.js000066400000000000000000000000001274277553300231070ustar00rootroot00000000000000core-js-2.4.1/library/modules/es6.number.epsilon.js000066400000000000000000000001721274277553300222050ustar00rootroot00000000000000// 20.1.2.1 Number.EPSILON var $export = require('./_export'); $export($export.S, 'Number', {EPSILON: Math.pow(2, -52)});core-js-2.4.1/library/modules/es6.number.is-finite.js000066400000000000000000000003651274277553300224270ustar00rootroot00000000000000// 20.1.2.2 Number.isFinite(number) var $export = require('./_export') , _isFinite = require('./_global').isFinite; $export($export.S, 'Number', { isFinite: function isFinite(it){ return typeof it == 'number' && _isFinite(it); } });core-js-2.4.1/library/modules/es6.number.is-integer.js000066400000000000000000000002161274277553300226010ustar00rootroot00000000000000// 20.1.2.3 Number.isInteger(number) var $export = require('./_export'); $export($export.S, 'Number', {isInteger: require('./_is-integer')});core-js-2.4.1/library/modules/es6.number.is-nan.js000066400000000000000000000002521274277553300217200ustar00rootroot00000000000000// 20.1.2.4 Number.isNaN(number) var $export = require('./_export'); $export($export.S, 'Number', { isNaN: function isNaN(number){ return number != number; } });core-js-2.4.1/library/modules/es6.number.is-safe-integer.js000066400000000000000000000004521274277553300235170ustar00rootroot00000000000000// 20.1.2.5 Number.isSafeInteger(number) var $export = require('./_export') , isInteger = require('./_is-integer') , abs = Math.abs; $export($export.S, 'Number', { isSafeInteger: function isSafeInteger(number){ return isInteger(number) && abs(number) <= 0x1fffffffffffff; } });core-js-2.4.1/library/modules/es6.number.max-safe-integer.js000066400000000000000000000002141274277553300236650ustar00rootroot00000000000000// 20.1.2.6 Number.MAX_SAFE_INTEGER var $export = require('./_export'); $export($export.S, 'Number', {MAX_SAFE_INTEGER: 0x1fffffffffffff});core-js-2.4.1/library/modules/es6.number.min-safe-integer.js000066400000000000000000000002161274277553300236650ustar00rootroot00000000000000// 20.1.2.10 Number.MIN_SAFE_INTEGER var $export = require('./_export'); $export($export.S, 'Number', {MIN_SAFE_INTEGER: -0x1fffffffffffff});core-js-2.4.1/library/modules/es6.number.parse-float.js000066400000000000000000000003441274277553300227520ustar00rootroot00000000000000var $export = require('./_export') , $parseFloat = require('./_parse-float'); // 20.1.2.12 Number.parseFloat(string) $export($export.S + $export.F * (Number.parseFloat != $parseFloat), 'Number', {parseFloat: $parseFloat});core-js-2.4.1/library/modules/es6.number.parse-int.js000066400000000000000000000003331274277553300224350ustar00rootroot00000000000000var $export = require('./_export') , $parseInt = require('./_parse-int'); // 20.1.2.13 Number.parseInt(string, radix) $export($export.S + $export.F * (Number.parseInt != $parseInt), 'Number', {parseInt: $parseInt});core-js-2.4.1/library/modules/es6.number.to-fixed.js000066400000000000000000000052271274277553300222610ustar00rootroot00000000000000'use strict'; var $export = require('./_export') , toInteger = require('./_to-integer') , aNumberValue = require('./_a-number-value') , repeat = require('./_string-repeat') , $toFixed = 1..toFixed , floor = Math.floor , data = [0, 0, 0, 0, 0, 0] , ERROR = 'Number.toFixed: incorrect invocation!' , ZERO = '0'; var multiply = function(n, c){ var i = -1 , c2 = c; while(++i < 6){ c2 += n * data[i]; data[i] = c2 % 1e7; c2 = floor(c2 / 1e7); } }; var divide = function(n){ var i = 6 , c = 0; while(--i >= 0){ c += data[i]; data[i] = floor(c / n); c = (c % n) * 1e7; } }; var numToString = function(){ var i = 6 , s = ''; while(--i >= 0){ if(s !== '' || i === 0 || data[i] !== 0){ var t = String(data[i]); s = s === '' ? t : s + repeat.call(ZERO, 7 - t.length) + t; } } return s; }; var pow = function(x, n, acc){ return n === 0 ? acc : n % 2 === 1 ? pow(x, n - 1, acc * x) : pow(x * x, n / 2, acc); }; var log = function(x){ var n = 0 , x2 = x; while(x2 >= 4096){ n += 12; x2 /= 4096; } while(x2 >= 2){ n += 1; x2 /= 2; } return n; }; $export($export.P + $export.F * (!!$toFixed && ( 0.00008.toFixed(3) !== '0.000' || 0.9.toFixed(0) !== '1' || 1.255.toFixed(2) !== '1.25' || 1000000000000000128..toFixed(0) !== '1000000000000000128' ) || !require('./_fails')(function(){ // V8 ~ Android 4.3- $toFixed.call({}); })), 'Number', { toFixed: function toFixed(fractionDigits){ var x = aNumberValue(this, ERROR) , f = toInteger(fractionDigits) , s = '' , m = ZERO , e, z, j, k; if(f < 0 || f > 20)throw RangeError(ERROR); if(x != x)return 'NaN'; if(x <= -1e21 || x >= 1e21)return String(x); if(x < 0){ s = '-'; x = -x; } if(x > 1e-21){ e = log(x * pow(2, 69, 1)) - 69; z = e < 0 ? x * pow(2, -e, 1) : x / pow(2, e, 1); z *= 0x10000000000000; e = 52 - e; if(e > 0){ multiply(0, z); j = f; while(j >= 7){ multiply(1e7, 0); j -= 7; } multiply(pow(10, j, 1), 0); j = e - 1; while(j >= 23){ divide(1 << 23); j -= 23; } divide(1 << j); multiply(1, 1); divide(2); m = numToString(); } else { multiply(0, z); multiply(1 << -e, 0); m = numToString() + repeat.call(ZERO, f); } } if(f > 0){ k = m.length; m = s + (k <= f ? '0.' + repeat.call(ZERO, f - k) + m : m.slice(0, k - f) + '.' + m.slice(k - f)); } else { m = s + m; } return m; } });core-js-2.4.1/library/modules/es6.number.to-precision.js000066400000000000000000000011471274277553300231520ustar00rootroot00000000000000'use strict'; var $export = require('./_export') , $fails = require('./_fails') , aNumberValue = require('./_a-number-value') , $toPrecision = 1..toPrecision; $export($export.P + $export.F * ($fails(function(){ // IE7- return $toPrecision.call(1, undefined) !== '1'; }) || !$fails(function(){ // V8 ~ Android 4.3- $toPrecision.call({}); })), 'Number', { toPrecision: function toPrecision(precision){ var that = aNumberValue(this, 'Number#toPrecision: incorrect invocation!'); return precision === undefined ? $toPrecision.call(that) : $toPrecision.call(that, precision); } });core-js-2.4.1/library/modules/es6.object.assign.js000066400000000000000000000002371274277553300220000ustar00rootroot00000000000000// 19.1.3.1 Object.assign(target, source) var $export = require('./_export'); $export($export.S + $export.F, 'Object', {assign: require('./_object-assign')});core-js-2.4.1/library/modules/es6.object.create.js000066400000000000000000000002361274277553300217560ustar00rootroot00000000000000var $export = require('./_export') // 19.1.2.2 / 15.2.3.5 Object.create(O [, Properties]) $export($export.S, 'Object', {create: require('./_object-create')});core-js-2.4.1/library/modules/es6.object.define-properties.js000066400000000000000000000003261274277553300241370ustar00rootroot00000000000000var $export = require('./_export'); // 19.1.2.3 / 15.2.3.7 Object.defineProperties(O, Properties) $export($export.S + $export.F * !require('./_descriptors'), 'Object', {defineProperties: require('./_object-dps')});core-js-2.4.1/library/modules/es6.object.define-property.js000066400000000000000000000003261274277553300236270ustar00rootroot00000000000000var $export = require('./_export'); // 19.1.2.4 / 15.2.3.6 Object.defineProperty(O, P, Attributes) $export($export.S + $export.F * !require('./_descriptors'), 'Object', {defineProperty: require('./_object-dp').f});core-js-2.4.1/library/modules/es6.object.freeze.js000066400000000000000000000004121274277553300217670ustar00rootroot00000000000000// 19.1.2.5 Object.freeze(O) var isObject = require('./_is-object') , meta = require('./_meta').onFreeze; require('./_object-sap')('freeze', function($freeze){ return function freeze(it){ return $freeze && isObject(it) ? $freeze(meta(it)) : it; }; });core-js-2.4.1/library/modules/es6.object.get-own-property-descriptor.js000066400000000000000000000005411274277553300261300ustar00rootroot00000000000000// 19.1.2.6 Object.getOwnPropertyDescriptor(O, P) var toIObject = require('./_to-iobject') , $getOwnPropertyDescriptor = require('./_object-gopd').f; require('./_object-sap')('getOwnPropertyDescriptor', function(){ return function getOwnPropertyDescriptor(it, key){ return $getOwnPropertyDescriptor(toIObject(it), key); }; });core-js-2.4.1/library/modules/es6.object.get-own-property-names.js000066400000000000000000000002231274277553300250520ustar00rootroot00000000000000// 19.1.2.7 Object.getOwnPropertyNames(O) require('./_object-sap')('getOwnPropertyNames', function(){ return require('./_object-gopn-ext').f; });core-js-2.4.1/library/modules/es6.object.get-prototype-of.js000066400000000000000000000004231274277553300237350ustar00rootroot00000000000000// 19.1.2.9 Object.getPrototypeOf(O) var toObject = require('./_to-object') , $getPrototypeOf = require('./_object-gpo'); require('./_object-sap')('getPrototypeOf', function(){ return function getPrototypeOf(it){ return $getPrototypeOf(toObject(it)); }; });core-js-2.4.1/library/modules/es6.object.is-extensible.js000066400000000000000000000004071274277553300232660ustar00rootroot00000000000000// 19.1.2.11 Object.isExtensible(O) var isObject = require('./_is-object'); require('./_object-sap')('isExtensible', function($isExtensible){ return function isExtensible(it){ return isObject(it) ? $isExtensible ? $isExtensible(it) : true : false; }; });core-js-2.4.1/library/modules/es6.object.is-frozen.js000066400000000000000000000003571274277553300224330ustar00rootroot00000000000000// 19.1.2.12 Object.isFrozen(O) var isObject = require('./_is-object'); require('./_object-sap')('isFrozen', function($isFrozen){ return function isFrozen(it){ return isObject(it) ? $isFrozen ? $isFrozen(it) : false : true; }; });core-js-2.4.1/library/modules/es6.object.is-sealed.js000066400000000000000000000003571274277553300223650ustar00rootroot00000000000000// 19.1.2.13 Object.isSealed(O) var isObject = require('./_is-object'); require('./_object-sap')('isSealed', function($isSealed){ return function isSealed(it){ return isObject(it) ? $isSealed ? $isSealed(it) : false : true; }; });core-js-2.4.1/library/modules/es6.object.is.js000066400000000000000000000002101274277553300211160ustar00rootroot00000000000000// 19.1.3.10 Object.is(value1, value2) var $export = require('./_export'); $export($export.S, 'Object', {is: require('./_same-value')});core-js-2.4.1/library/modules/es6.object.keys.js000066400000000000000000000003371274277553300214700ustar00rootroot00000000000000// 19.1.2.14 Object.keys(O) var toObject = require('./_to-object') , $keys = require('./_object-keys'); require('./_object-sap')('keys', function(){ return function keys(it){ return $keys(toObject(it)); }; });core-js-2.4.1/library/modules/es6.object.prevent-extensions.js000066400000000000000000000005151274277553300243730ustar00rootroot00000000000000// 19.1.2.15 Object.preventExtensions(O) var isObject = require('./_is-object') , meta = require('./_meta').onFreeze; require('./_object-sap')('preventExtensions', function($preventExtensions){ return function preventExtensions(it){ return $preventExtensions && isObject(it) ? $preventExtensions(meta(it)) : it; }; });core-js-2.4.1/library/modules/es6.object.seal.js000066400000000000000000000003771274277553300214450ustar00rootroot00000000000000// 19.1.2.17 Object.seal(O) var isObject = require('./_is-object') , meta = require('./_meta').onFreeze; require('./_object-sap')('seal', function($seal){ return function seal(it){ return $seal && isObject(it) ? $seal(meta(it)) : it; }; });core-js-2.4.1/library/modules/es6.object.set-prototype-of.js000066400000000000000000000002351274277553300237520ustar00rootroot00000000000000// 19.1.3.19 Object.setPrototypeOf(O, proto) var $export = require('./_export'); $export($export.S, 'Object', {setPrototypeOf: require('./_set-proto').set});core-js-2.4.1/library/modules/es6.object.to-string.js000066400000000000000000000000001274277553300224260ustar00rootroot00000000000000core-js-2.4.1/library/modules/es6.parse-float.js000066400000000000000000000003111274277553300214550ustar00rootroot00000000000000var $export = require('./_export') , $parseFloat = require('./_parse-float'); // 18.2.4 parseFloat(string) $export($export.G + $export.F * (parseFloat != $parseFloat), {parseFloat: $parseFloat});core-js-2.4.1/library/modules/es6.parse-int.js000066400000000000000000000003001274277553300211400ustar00rootroot00000000000000var $export = require('./_export') , $parseInt = require('./_parse-int'); // 18.2.5 parseInt(string, radix) $export($export.G + $export.F * (parseInt != $parseInt), {parseInt: $parseInt});core-js-2.4.1/library/modules/es6.promise.js000066400000000000000000000234141274277553300207270ustar00rootroot00000000000000'use strict'; var LIBRARY = require('./_library') , global = require('./_global') , ctx = require('./_ctx') , classof = require('./_classof') , $export = require('./_export') , isObject = require('./_is-object') , aFunction = require('./_a-function') , anInstance = require('./_an-instance') , forOf = require('./_for-of') , speciesConstructor = require('./_species-constructor') , task = require('./_task').set , microtask = require('./_microtask')() , PROMISE = 'Promise' , TypeError = global.TypeError , process = global.process , $Promise = global[PROMISE] , process = global.process , isNode = classof(process) == 'process' , empty = function(){ /* empty */ } , Internal, GenericPromiseCapability, Wrapper; var USE_NATIVE = !!function(){ try { // correct subclassing with @@species support var promise = $Promise.resolve(1) , FakePromise = (promise.constructor = {})[require('./_wks')('species')] = function(exec){ exec(empty, empty); }; // unhandled rejections tracking support, NodeJS Promise without it fails @@species test return (isNode || typeof PromiseRejectionEvent == 'function') && promise.then(empty) instanceof FakePromise; } catch(e){ /* empty */ } }(); // helpers var sameConstructor = function(a, b){ // with library wrapper special case return a === b || a === $Promise && b === Wrapper; }; var isThenable = function(it){ var then; return isObject(it) && typeof (then = it.then) == 'function' ? then : false; }; var newPromiseCapability = function(C){ return sameConstructor($Promise, C) ? new PromiseCapability(C) : new GenericPromiseCapability(C); }; var PromiseCapability = GenericPromiseCapability = function(C){ var resolve, reject; this.promise = new C(function($$resolve, $$reject){ if(resolve !== undefined || reject !== undefined)throw TypeError('Bad Promise constructor'); resolve = $$resolve; reject = $$reject; }); this.resolve = aFunction(resolve); this.reject = aFunction(reject); }; var perform = function(exec){ try { exec(); } catch(e){ return {error: e}; } }; var notify = function(promise, isReject){ if(promise._n)return; promise._n = true; var chain = promise._c; microtask(function(){ var value = promise._v , ok = promise._s == 1 , i = 0; var run = function(reaction){ var handler = ok ? reaction.ok : reaction.fail , resolve = reaction.resolve , reject = reaction.reject , domain = reaction.domain , result, then; try { if(handler){ if(!ok){ if(promise._h == 2)onHandleUnhandled(promise); promise._h = 1; } if(handler === true)result = value; else { if(domain)domain.enter(); result = handler(value); if(domain)domain.exit(); } if(result === reaction.promise){ reject(TypeError('Promise-chain cycle')); } else if(then = isThenable(result)){ then.call(result, resolve, reject); } else resolve(result); } else reject(value); } catch(e){ reject(e); } }; while(chain.length > i)run(chain[i++]); // variable length - can't use forEach promise._c = []; promise._n = false; if(isReject && !promise._h)onUnhandled(promise); }); }; var onUnhandled = function(promise){ task.call(global, function(){ var value = promise._v , abrupt, handler, console; if(isUnhandled(promise)){ abrupt = perform(function(){ if(isNode){ process.emit('unhandledRejection', value, promise); } else if(handler = global.onunhandledrejection){ handler({promise: promise, reason: value}); } else if((console = global.console) && console.error){ console.error('Unhandled promise rejection', value); } }); // Browsers should not trigger `rejectionHandled` event if it was handled here, NodeJS - should promise._h = isNode || isUnhandled(promise) ? 2 : 1; } promise._a = undefined; if(abrupt)throw abrupt.error; }); }; var isUnhandled = function(promise){ if(promise._h == 1)return false; var chain = promise._a || promise._c , i = 0 , reaction; while(chain.length > i){ reaction = chain[i++]; if(reaction.fail || !isUnhandled(reaction.promise))return false; } return true; }; var onHandleUnhandled = function(promise){ task.call(global, function(){ var handler; if(isNode){ process.emit('rejectionHandled', promise); } else if(handler = global.onrejectionhandled){ handler({promise: promise, reason: promise._v}); } }); }; var $reject = function(value){ var promise = this; if(promise._d)return; promise._d = true; promise = promise._w || promise; // unwrap promise._v = value; promise._s = 2; if(!promise._a)promise._a = promise._c.slice(); notify(promise, true); }; var $resolve = function(value){ var promise = this , then; if(promise._d)return; promise._d = true; promise = promise._w || promise; // unwrap try { if(promise === value)throw TypeError("Promise can't be resolved itself"); if(then = isThenable(value)){ microtask(function(){ var wrapper = {_w: promise, _d: false}; // wrap try { then.call(value, ctx($resolve, wrapper, 1), ctx($reject, wrapper, 1)); } catch(e){ $reject.call(wrapper, e); } }); } else { promise._v = value; promise._s = 1; notify(promise, false); } } catch(e){ $reject.call({_w: promise, _d: false}, e); // wrap } }; // constructor polyfill if(!USE_NATIVE){ // 25.4.3.1 Promise(executor) $Promise = function Promise(executor){ anInstance(this, $Promise, PROMISE, '_h'); aFunction(executor); Internal.call(this); try { executor(ctx($resolve, this, 1), ctx($reject, this, 1)); } catch(err){ $reject.call(this, err); } }; Internal = function Promise(executor){ this._c = []; // <- awaiting reactions this._a = undefined; // <- checked in isUnhandled reactions this._s = 0; // <- state this._d = false; // <- done this._v = undefined; // <- value this._h = 0; // <- rejection state, 0 - default, 1 - handled, 2 - unhandled this._n = false; // <- notify }; Internal.prototype = require('./_redefine-all')($Promise.prototype, { // 25.4.5.3 Promise.prototype.then(onFulfilled, onRejected) then: function then(onFulfilled, onRejected){ var reaction = newPromiseCapability(speciesConstructor(this, $Promise)); reaction.ok = typeof onFulfilled == 'function' ? onFulfilled : true; reaction.fail = typeof onRejected == 'function' && onRejected; reaction.domain = isNode ? process.domain : undefined; this._c.push(reaction); if(this._a)this._a.push(reaction); if(this._s)notify(this, false); return reaction.promise; }, // 25.4.5.1 Promise.prototype.catch(onRejected) 'catch': function(onRejected){ return this.then(undefined, onRejected); } }); PromiseCapability = function(){ var promise = new Internal; this.promise = promise; this.resolve = ctx($resolve, promise, 1); this.reject = ctx($reject, promise, 1); }; } $export($export.G + $export.W + $export.F * !USE_NATIVE, {Promise: $Promise}); require('./_set-to-string-tag')($Promise, PROMISE); require('./_set-species')(PROMISE); Wrapper = require('./_core')[PROMISE]; // statics $export($export.S + $export.F * !USE_NATIVE, PROMISE, { // 25.4.4.5 Promise.reject(r) reject: function reject(r){ var capability = newPromiseCapability(this) , $$reject = capability.reject; $$reject(r); return capability.promise; } }); $export($export.S + $export.F * (LIBRARY || !USE_NATIVE), PROMISE, { // 25.4.4.6 Promise.resolve(x) resolve: function resolve(x){ // instanceof instead of internal slot check because we should fix it without replacement native Promise core if(x instanceof $Promise && sameConstructor(x.constructor, this))return x; var capability = newPromiseCapability(this) , $$resolve = capability.resolve; $$resolve(x); return capability.promise; } }); $export($export.S + $export.F * !(USE_NATIVE && require('./_iter-detect')(function(iter){ $Promise.all(iter)['catch'](empty); })), PROMISE, { // 25.4.4.1 Promise.all(iterable) all: function all(iterable){ var C = this , capability = newPromiseCapability(C) , resolve = capability.resolve , reject = capability.reject; var abrupt = perform(function(){ var values = [] , index = 0 , remaining = 1; forOf(iterable, false, function(promise){ var $index = index++ , alreadyCalled = false; values.push(undefined); remaining++; C.resolve(promise).then(function(value){ if(alreadyCalled)return; alreadyCalled = true; values[$index] = value; --remaining || resolve(values); }, reject); }); --remaining || resolve(values); }); if(abrupt)reject(abrupt.error); return capability.promise; }, // 25.4.4.4 Promise.race(iterable) race: function race(iterable){ var C = this , capability = newPromiseCapability(C) , reject = capability.reject; var abrupt = perform(function(){ forOf(iterable, false, function(promise){ C.resolve(promise).then(capability.resolve, reject); }); }); if(abrupt)reject(abrupt.error); return capability.promise; } });core-js-2.4.1/library/modules/es6.reflect.apply.js000066400000000000000000000012001274277553300220060ustar00rootroot00000000000000// 26.1.1 Reflect.apply(target, thisArgument, argumentsList) var $export = require('./_export') , aFunction = require('./_a-function') , anObject = require('./_an-object') , rApply = (require('./_global').Reflect || {}).apply , fApply = Function.apply; // MS Edge argumentsList argument is optional $export($export.S + $export.F * !require('./_fails')(function(){ rApply(function(){}); }), 'Reflect', { apply: function apply(target, thisArgument, argumentsList){ var T = aFunction(target) , L = anObject(argumentsList); return rApply ? rApply(T, thisArgument, L) : fApply.call(T, thisArgument, L); } });core-js-2.4.1/library/modules/es6.reflect.construct.js000066400000000000000000000036361274277553300227240ustar00rootroot00000000000000// 26.1.2 Reflect.construct(target, argumentsList [, newTarget]) var $export = require('./_export') , create = require('./_object-create') , aFunction = require('./_a-function') , anObject = require('./_an-object') , isObject = require('./_is-object') , fails = require('./_fails') , bind = require('./_bind') , rConstruct = (require('./_global').Reflect || {}).construct; // MS Edge supports only 2 arguments and argumentsList argument is optional // FF Nightly sets third argument as `new.target`, but does not create `this` from it var NEW_TARGET_BUG = fails(function(){ function F(){} return !(rConstruct(function(){}, [], F) instanceof F); }); var ARGS_BUG = !fails(function(){ rConstruct(function(){}); }); $export($export.S + $export.F * (NEW_TARGET_BUG || ARGS_BUG), 'Reflect', { construct: function construct(Target, args /*, newTarget*/){ aFunction(Target); anObject(args); var newTarget = arguments.length < 3 ? Target : aFunction(arguments[2]); if(ARGS_BUG && !NEW_TARGET_BUG)return rConstruct(Target, args, newTarget); if(Target == newTarget){ // w/o altered newTarget, optimization for 0-4 arguments switch(args.length){ case 0: return new Target; case 1: return new Target(args[0]); case 2: return new Target(args[0], args[1]); case 3: return new Target(args[0], args[1], args[2]); case 4: return new Target(args[0], args[1], args[2], args[3]); } // w/o altered newTarget, lot of arguments case var $args = [null]; $args.push.apply($args, args); return new (bind.apply(Target, $args)); } // with altered newTarget, not support built-in constructors var proto = newTarget.prototype , instance = create(isObject(proto) ? proto : Object.prototype) , result = Function.apply.call(Target, instance, args); return isObject(result) ? result : instance; } });core-js-2.4.1/library/modules/es6.reflect.define-property.js000066400000000000000000000013731274277553300240100ustar00rootroot00000000000000// 26.1.3 Reflect.defineProperty(target, propertyKey, attributes) var dP = require('./_object-dp') , $export = require('./_export') , anObject = require('./_an-object') , toPrimitive = require('./_to-primitive'); // MS Edge has broken Reflect.defineProperty - throwing instead of returning false $export($export.S + $export.F * require('./_fails')(function(){ Reflect.defineProperty(dP.f({}, 1, {value: 1}), 1, {value: 2}); }), 'Reflect', { defineProperty: function defineProperty(target, propertyKey, attributes){ anObject(target); propertyKey = toPrimitive(propertyKey, true); anObject(attributes); try { dP.f(target, propertyKey, attributes); return true; } catch(e){ return false; } } });core-js-2.4.1/library/modules/es6.reflect.delete-property.js000066400000000000000000000006251274277553300240170ustar00rootroot00000000000000// 26.1.4 Reflect.deleteProperty(target, propertyKey) var $export = require('./_export') , gOPD = require('./_object-gopd').f , anObject = require('./_an-object'); $export($export.S, 'Reflect', { deleteProperty: function deleteProperty(target, propertyKey){ var desc = gOPD(anObject(target), propertyKey); return desc && !desc.configurable ? false : delete target[propertyKey]; } });core-js-2.4.1/library/modules/es6.reflect.enumerate.js000066400000000000000000000013341274277553300226560ustar00rootroot00000000000000'use strict'; // 26.1.5 Reflect.enumerate(target) var $export = require('./_export') , anObject = require('./_an-object'); var Enumerate = function(iterated){ this._t = anObject(iterated); // target this._i = 0; // next index var keys = this._k = [] // keys , key; for(key in iterated)keys.push(key); }; require('./_iter-create')(Enumerate, 'Object', function(){ var that = this , keys = that._k , key; do { if(that._i >= keys.length)return {value: undefined, done: true}; } while(!((key = keys[that._i++]) in that._t)); return {value: key, done: false}; }); $export($export.S, 'Reflect', { enumerate: function enumerate(target){ return new Enumerate(target); } });core-js-2.4.1/library/modules/es6.reflect.get-own-property-descriptor.js000066400000000000000000000005431274277553300263100ustar00rootroot00000000000000// 26.1.7 Reflect.getOwnPropertyDescriptor(target, propertyKey) var gOPD = require('./_object-gopd') , $export = require('./_export') , anObject = require('./_an-object'); $export($export.S, 'Reflect', { getOwnPropertyDescriptor: function getOwnPropertyDescriptor(target, propertyKey){ return gOPD.f(anObject(target), propertyKey); } });core-js-2.4.1/library/modules/es6.reflect.get-prototype-of.js000066400000000000000000000004371274277553300241200ustar00rootroot00000000000000// 26.1.8 Reflect.getPrototypeOf(target) var $export = require('./_export') , getProto = require('./_object-gpo') , anObject = require('./_an-object'); $export($export.S, 'Reflect', { getPrototypeOf: function getPrototypeOf(target){ return getProto(anObject(target)); } });core-js-2.4.1/library/modules/es6.reflect.get.js000066400000000000000000000014531274277553300214520ustar00rootroot00000000000000// 26.1.6 Reflect.get(target, propertyKey [, receiver]) var gOPD = require('./_object-gopd') , getPrototypeOf = require('./_object-gpo') , has = require('./_has') , $export = require('./_export') , isObject = require('./_is-object') , anObject = require('./_an-object'); function get(target, propertyKey/*, receiver*/){ var receiver = arguments.length < 3 ? target : arguments[2] , desc, proto; if(anObject(target) === receiver)return target[propertyKey]; if(desc = gOPD.f(target, propertyKey))return has(desc, 'value') ? desc.value : desc.get !== undefined ? desc.get.call(receiver) : undefined; if(isObject(proto = getPrototypeOf(target)))return get(proto, propertyKey, receiver); } $export($export.S, 'Reflect', {get: get});core-js-2.4.1/library/modules/es6.reflect.has.js000066400000000000000000000003031274277553300214370ustar00rootroot00000000000000// 26.1.9 Reflect.has(target, propertyKey) var $export = require('./_export'); $export($export.S, 'Reflect', { has: function has(target, propertyKey){ return propertyKey in target; } });core-js-2.4.1/library/modules/es6.reflect.is-extensible.js000066400000000000000000000005141274277553300234430ustar00rootroot00000000000000// 26.1.10 Reflect.isExtensible(target) var $export = require('./_export') , anObject = require('./_an-object') , $isExtensible = Object.isExtensible; $export($export.S, 'Reflect', { isExtensible: function isExtensible(target){ anObject(target); return $isExtensible ? $isExtensible(target) : true; } });core-js-2.4.1/library/modules/es6.reflect.own-keys.js000066400000000000000000000002111274277553300224360ustar00rootroot00000000000000// 26.1.11 Reflect.ownKeys(target) var $export = require('./_export'); $export($export.S, 'Reflect', {ownKeys: require('./_own-keys')});core-js-2.4.1/library/modules/es6.reflect.prevent-extensions.js000066400000000000000000000006651274277553300245570ustar00rootroot00000000000000// 26.1.12 Reflect.preventExtensions(target) var $export = require('./_export') , anObject = require('./_an-object') , $preventExtensions = Object.preventExtensions; $export($export.S, 'Reflect', { preventExtensions: function preventExtensions(target){ anObject(target); try { if($preventExtensions)$preventExtensions(target); return true; } catch(e){ return false; } } });core-js-2.4.1/library/modules/es6.reflect.set-prototype-of.js000066400000000000000000000005701274277553300241320ustar00rootroot00000000000000// 26.1.14 Reflect.setPrototypeOf(target, proto) var $export = require('./_export') , setProto = require('./_set-proto'); if(setProto)$export($export.S, 'Reflect', { setPrototypeOf: function setPrototypeOf(target, proto){ setProto.check(target, proto); try { setProto.set(target, proto); return true; } catch(e){ return false; } } });core-js-2.4.1/library/modules/es6.reflect.set.js000066400000000000000000000022441274277553300214650ustar00rootroot00000000000000// 26.1.13 Reflect.set(target, propertyKey, V [, receiver]) var dP = require('./_object-dp') , gOPD = require('./_object-gopd') , getPrototypeOf = require('./_object-gpo') , has = require('./_has') , $export = require('./_export') , createDesc = require('./_property-desc') , anObject = require('./_an-object') , isObject = require('./_is-object'); function set(target, propertyKey, V/*, receiver*/){ var receiver = arguments.length < 4 ? target : arguments[3] , ownDesc = gOPD.f(anObject(target), propertyKey) , existingDescriptor, proto; if(!ownDesc){ if(isObject(proto = getPrototypeOf(target))){ return set(proto, propertyKey, V, receiver); } ownDesc = createDesc(0); } if(has(ownDesc, 'value')){ if(ownDesc.writable === false || !isObject(receiver))return false; existingDescriptor = gOPD.f(receiver, propertyKey) || createDesc(0); existingDescriptor.value = V; dP.f(receiver, propertyKey, existingDescriptor); return true; } return ownDesc.set === undefined ? false : (ownDesc.set.call(receiver, V), true); } $export($export.S, 'Reflect', {set: set});core-js-2.4.1/library/modules/es6.regexp.constructor.js000066400000000000000000000000441274277553300231210ustar00rootroot00000000000000require('./_set-species')('RegExp');core-js-2.4.1/library/modules/es6.regexp.flags.js000066400000000000000000000000001274277553300216200ustar00rootroot00000000000000core-js-2.4.1/library/modules/es6.regexp.match.js000066400000000000000000000000001274277553300216200ustar00rootroot00000000000000core-js-2.4.1/library/modules/es6.regexp.replace.js000066400000000000000000000000001274277553300221370ustar00rootroot00000000000000core-js-2.4.1/library/modules/es6.regexp.search.js000066400000000000000000000000001274277553300217710ustar00rootroot00000000000000core-js-2.4.1/library/modules/es6.regexp.split.js000066400000000000000000000000001274277553300216570ustar00rootroot00000000000000core-js-2.4.1/library/modules/es6.regexp.to-string.js000066400000000000000000000000001274277553300224520ustar00rootroot00000000000000core-js-2.4.1/library/modules/es6.set.js000066400000000000000000000006141274277553300200410ustar00rootroot00000000000000'use strict'; var strong = require('./_collection-strong'); // 23.2 Set Objects module.exports = require('./_collection')('Set', function(get){ return function Set(){ return get(this, arguments.length > 0 ? arguments[0] : undefined); }; }, { // 23.2.3.1 Set.prototype.add(value) add: function add(value){ return strong.def(this, value = value === 0 ? 0 : value, value); } }, strong);core-js-2.4.1/library/modules/es6.string.anchor.js000066400000000000000000000003101274277553300220160ustar00rootroot00000000000000'use strict'; // B.2.3.2 String.prototype.anchor(name) require('./_string-html')('anchor', function(createHTML){ return function anchor(name){ return createHTML(this, 'a', 'name', name); } });core-js-2.4.1/library/modules/es6.string.big.js000066400000000000000000000002631274277553300213140ustar00rootroot00000000000000'use strict'; // B.2.3.3 String.prototype.big() require('./_string-html')('big', function(createHTML){ return function big(){ return createHTML(this, 'big', '', ''); } });core-js-2.4.1/library/modules/es6.string.blink.js000066400000000000000000000002731274277553300216530ustar00rootroot00000000000000'use strict'; // B.2.3.4 String.prototype.blink() require('./_string-html')('blink', function(createHTML){ return function blink(){ return createHTML(this, 'blink', '', ''); } });core-js-2.4.1/library/modules/es6.string.bold.js000066400000000000000000000002641274277553300214740ustar00rootroot00000000000000'use strict'; // B.2.3.5 String.prototype.bold() require('./_string-html')('bold', function(createHTML){ return function bold(){ return createHTML(this, 'b', '', ''); } });core-js-2.4.1/library/modules/es6.string.code-point-at.js000066400000000000000000000003721274277553300232170ustar00rootroot00000000000000'use strict'; var $export = require('./_export') , $at = require('./_string-at')(false); $export($export.P, 'String', { // 21.1.3.3 String.prototype.codePointAt(pos) codePointAt: function codePointAt(pos){ return $at(this, pos); } });core-js-2.4.1/library/modules/es6.string.ends-with.js000066400000000000000000000015101274277553300224510ustar00rootroot00000000000000// 21.1.3.6 String.prototype.endsWith(searchString [, endPosition]) 'use strict'; var $export = require('./_export') , toLength = require('./_to-length') , context = require('./_string-context') , ENDS_WITH = 'endsWith' , $endsWith = ''[ENDS_WITH]; $export($export.P + $export.F * require('./_fails-is-regexp')(ENDS_WITH), 'String', { endsWith: function endsWith(searchString /*, endPosition = @length */){ var that = context(this, searchString, ENDS_WITH) , endPosition = arguments.length > 1 ? arguments[1] : undefined , len = toLength(that.length) , end = endPosition === undefined ? len : Math.min(toLength(endPosition), len) , search = String(searchString); return $endsWith ? $endsWith.call(that, search, end) : that.slice(end - search.length, end) === search; } });core-js-2.4.1/library/modules/es6.string.fixed.js000066400000000000000000000002701274277553300216500ustar00rootroot00000000000000'use strict'; // B.2.3.6 String.prototype.fixed() require('./_string-html')('fixed', function(createHTML){ return function fixed(){ return createHTML(this, 'tt', '', ''); } });core-js-2.4.1/library/modules/es6.string.fontcolor.js000066400000000000000000000003301274277553300225530ustar00rootroot00000000000000'use strict'; // B.2.3.7 String.prototype.fontcolor(color) require('./_string-html')('fontcolor', function(createHTML){ return function fontcolor(color){ return createHTML(this, 'font', 'color', color); } });core-js-2.4.1/library/modules/es6.string.fontsize.js000066400000000000000000000003211274277553300224070ustar00rootroot00000000000000'use strict'; // B.2.3.8 String.prototype.fontsize(size) require('./_string-html')('fontsize', function(createHTML){ return function fontsize(size){ return createHTML(this, 'font', 'size', size); } });core-js-2.4.1/library/modules/es6.string.from-code-point.js000066400000000000000000000015201274277553300235520ustar00rootroot00000000000000var $export = require('./_export') , toIndex = require('./_to-index') , fromCharCode = String.fromCharCode , $fromCodePoint = String.fromCodePoint; // length should be 1, old FF problem $export($export.S + $export.F * (!!$fromCodePoint && $fromCodePoint.length != 1), 'String', { // 21.1.2.2 String.fromCodePoint(...codePoints) fromCodePoint: function fromCodePoint(x){ // eslint-disable-line no-unused-vars var res = [] , aLen = arguments.length , i = 0 , code; while(aLen > i){ code = +arguments[i++]; if(toIndex(code, 0x10ffff) !== code)throw RangeError(code + ' is not a valid code point'); res.push(code < 0x10000 ? fromCharCode(code) : fromCharCode(((code -= 0x10000) >> 10) + 0xd800, code % 0x400 + 0xdc00) ); } return res.join(''); } });core-js-2.4.1/library/modules/es6.string.includes.js000066400000000000000000000007341274277553300223640ustar00rootroot00000000000000// 21.1.3.7 String.prototype.includes(searchString, position = 0) 'use strict'; var $export = require('./_export') , context = require('./_string-context') , INCLUDES = 'includes'; $export($export.P + $export.F * require('./_fails-is-regexp')(INCLUDES), 'String', { includes: function includes(searchString /*, position = 0 */){ return !!~context(this, searchString, INCLUDES) .indexOf(searchString, arguments.length > 1 ? arguments[1] : undefined); } });core-js-2.4.1/library/modules/es6.string.italics.js000066400000000000000000000002751274277553300222060ustar00rootroot00000000000000'use strict'; // B.2.3.9 String.prototype.italics() require('./_string-html')('italics', function(createHTML){ return function italics(){ return createHTML(this, 'i', '', ''); } });core-js-2.4.1/library/modules/es6.string.iterator.js000066400000000000000000000010131274277553300223760ustar00rootroot00000000000000'use strict'; var $at = require('./_string-at')(true); // 21.1.3.27 String.prototype[@@iterator]() require('./_iter-define')(String, 'String', function(iterated){ this._t = String(iterated); // target this._i = 0; // next index // 21.1.5.2.1 %StringIteratorPrototype%.next() }, function(){ var O = this._t , index = this._i , point; if(index >= O.length)return {value: undefined, done: true}; point = $at(O, index); this._i += point.length; return {value: point, done: false}; });core-js-2.4.1/library/modules/es6.string.link.js000066400000000000000000000003001274277553300215000ustar00rootroot00000000000000'use strict'; // B.2.3.10 String.prototype.link(url) require('./_string-html')('link', function(createHTML){ return function link(url){ return createHTML(this, 'a', 'href', url); } });core-js-2.4.1/library/modules/es6.string.raw.js000066400000000000000000000010041274277553300213360ustar00rootroot00000000000000var $export = require('./_export') , toIObject = require('./_to-iobject') , toLength = require('./_to-length'); $export($export.S, 'String', { // 21.1.2.4 String.raw(callSite, ...substitutions) raw: function raw(callSite){ var tpl = toIObject(callSite.raw) , len = toLength(tpl.length) , aLen = arguments.length , res = [] , i = 0; while(len > i){ res.push(String(tpl[i++])); if(i < aLen)res.push(String(arguments[i])); } return res.join(''); } });core-js-2.4.1/library/modules/es6.string.repeat.js000066400000000000000000000002331274277553300220300ustar00rootroot00000000000000var $export = require('./_export'); $export($export.P, 'String', { // 21.1.3.13 String.prototype.repeat(count) repeat: require('./_string-repeat') });core-js-2.4.1/library/modules/es6.string.small.js000066400000000000000000000002741274277553300216650ustar00rootroot00000000000000'use strict'; // B.2.3.11 String.prototype.small() require('./_string-html')('small', function(createHTML){ return function small(){ return createHTML(this, 'small', '', ''); } });core-js-2.4.1/library/modules/es6.string.starts-with.js000066400000000000000000000013771274277553300230530ustar00rootroot00000000000000// 21.1.3.18 String.prototype.startsWith(searchString [, position ]) 'use strict'; var $export = require('./_export') , toLength = require('./_to-length') , context = require('./_string-context') , STARTS_WITH = 'startsWith' , $startsWith = ''[STARTS_WITH]; $export($export.P + $export.F * require('./_fails-is-regexp')(STARTS_WITH), 'String', { startsWith: function startsWith(searchString /*, position = 0 */){ var that = context(this, searchString, STARTS_WITH) , index = toLength(Math.min(arguments.length > 1 ? arguments[1] : undefined, that.length)) , search = String(searchString); return $startsWith ? $startsWith.call(that, search, index) : that.slice(index, index + search.length) === search; } });core-js-2.4.1/library/modules/es6.string.strike.js000066400000000000000000000003001274277553300220440ustar00rootroot00000000000000'use strict'; // B.2.3.12 String.prototype.strike() require('./_string-html')('strike', function(createHTML){ return function strike(){ return createHTML(this, 'strike', '', ''); } });core-js-2.4.1/library/modules/es6.string.sub.js000066400000000000000000000002641274277553300213450ustar00rootroot00000000000000'use strict'; // B.2.3.13 String.prototype.sub() require('./_string-html')('sub', function(createHTML){ return function sub(){ return createHTML(this, 'sub', '', ''); } });core-js-2.4.1/library/modules/es6.string.sup.js000066400000000000000000000002641274277553300213630ustar00rootroot00000000000000'use strict'; // B.2.3.14 String.prototype.sup() require('./_string-html')('sup', function(createHTML){ return function sup(){ return createHTML(this, 'sup', '', ''); } });core-js-2.4.1/library/modules/es6.string.trim.js000066400000000000000000000002431274277553300215240ustar00rootroot00000000000000'use strict'; // 21.1.3.25 String.prototype.trim() require('./_string-trim')('trim', function($trim){ return function trim(){ return $trim(this, 3); }; });core-js-2.4.1/library/modules/es6.symbol.js000066400000000000000000000213351274277553300205560ustar00rootroot00000000000000'use strict'; // ECMAScript 6 symbols shim var global = require('./_global') , has = require('./_has') , DESCRIPTORS = require('./_descriptors') , $export = require('./_export') , redefine = require('./_redefine') , META = require('./_meta').KEY , $fails = require('./_fails') , shared = require('./_shared') , setToStringTag = require('./_set-to-string-tag') , uid = require('./_uid') , wks = require('./_wks') , wksExt = require('./_wks-ext') , wksDefine = require('./_wks-define') , keyOf = require('./_keyof') , enumKeys = require('./_enum-keys') , isArray = require('./_is-array') , anObject = require('./_an-object') , toIObject = require('./_to-iobject') , toPrimitive = require('./_to-primitive') , createDesc = require('./_property-desc') , _create = require('./_object-create') , gOPNExt = require('./_object-gopn-ext') , $GOPD = require('./_object-gopd') , $DP = require('./_object-dp') , $keys = require('./_object-keys') , gOPD = $GOPD.f , dP = $DP.f , gOPN = gOPNExt.f , $Symbol = global.Symbol , $JSON = global.JSON , _stringify = $JSON && $JSON.stringify , PROTOTYPE = 'prototype' , HIDDEN = wks('_hidden') , TO_PRIMITIVE = wks('toPrimitive') , isEnum = {}.propertyIsEnumerable , SymbolRegistry = shared('symbol-registry') , AllSymbols = shared('symbols') , OPSymbols = shared('op-symbols') , ObjectProto = Object[PROTOTYPE] , USE_NATIVE = typeof $Symbol == 'function' , QObject = global.QObject; // Don't use setters in Qt Script, https://github.com/zloirock/core-js/issues/173 var setter = !QObject || !QObject[PROTOTYPE] || !QObject[PROTOTYPE].findChild; // fallback for old Android, https://code.google.com/p/v8/issues/detail?id=687 var setSymbolDesc = DESCRIPTORS && $fails(function(){ return _create(dP({}, 'a', { get: function(){ return dP(this, 'a', {value: 7}).a; } })).a != 7; }) ? function(it, key, D){ var protoDesc = gOPD(ObjectProto, key); if(protoDesc)delete ObjectProto[key]; dP(it, key, D); if(protoDesc && it !== ObjectProto)dP(ObjectProto, key, protoDesc); } : dP; var wrap = function(tag){ var sym = AllSymbols[tag] = _create($Symbol[PROTOTYPE]); sym._k = tag; return sym; }; var isSymbol = USE_NATIVE && typeof $Symbol.iterator == 'symbol' ? function(it){ return typeof it == 'symbol'; } : function(it){ return it instanceof $Symbol; }; var $defineProperty = function defineProperty(it, key, D){ if(it === ObjectProto)$defineProperty(OPSymbols, key, D); anObject(it); key = toPrimitive(key, true); anObject(D); if(has(AllSymbols, key)){ if(!D.enumerable){ if(!has(it, HIDDEN))dP(it, HIDDEN, createDesc(1, {})); it[HIDDEN][key] = true; } else { if(has(it, HIDDEN) && it[HIDDEN][key])it[HIDDEN][key] = false; D = _create(D, {enumerable: createDesc(0, false)}); } return setSymbolDesc(it, key, D); } return dP(it, key, D); }; var $defineProperties = function defineProperties(it, P){ anObject(it); var keys = enumKeys(P = toIObject(P)) , i = 0 , l = keys.length , key; while(l > i)$defineProperty(it, key = keys[i++], P[key]); return it; }; var $create = function create(it, P){ return P === undefined ? _create(it) : $defineProperties(_create(it), P); }; var $propertyIsEnumerable = function propertyIsEnumerable(key){ var E = isEnum.call(this, key = toPrimitive(key, true)); if(this === ObjectProto && has(AllSymbols, key) && !has(OPSymbols, key))return false; return E || !has(this, key) || !has(AllSymbols, key) || has(this, HIDDEN) && this[HIDDEN][key] ? E : true; }; var $getOwnPropertyDescriptor = function getOwnPropertyDescriptor(it, key){ it = toIObject(it); key = toPrimitive(key, true); if(it === ObjectProto && has(AllSymbols, key) && !has(OPSymbols, key))return; var D = gOPD(it, key); if(D && has(AllSymbols, key) && !(has(it, HIDDEN) && it[HIDDEN][key]))D.enumerable = true; return D; }; var $getOwnPropertyNames = function getOwnPropertyNames(it){ var names = gOPN(toIObject(it)) , result = [] , i = 0 , key; while(names.length > i){ if(!has(AllSymbols, key = names[i++]) && key != HIDDEN && key != META)result.push(key); } return result; }; var $getOwnPropertySymbols = function getOwnPropertySymbols(it){ var IS_OP = it === ObjectProto , names = gOPN(IS_OP ? OPSymbols : toIObject(it)) , result = [] , i = 0 , key; while(names.length > i){ if(has(AllSymbols, key = names[i++]) && (IS_OP ? has(ObjectProto, key) : true))result.push(AllSymbols[key]); } return result; }; // 19.4.1.1 Symbol([description]) if(!USE_NATIVE){ $Symbol = function Symbol(){ if(this instanceof $Symbol)throw TypeError('Symbol is not a constructor!'); var tag = uid(arguments.length > 0 ? arguments[0] : undefined); var $set = function(value){ if(this === ObjectProto)$set.call(OPSymbols, value); if(has(this, HIDDEN) && has(this[HIDDEN], tag))this[HIDDEN][tag] = false; setSymbolDesc(this, tag, createDesc(1, value)); }; if(DESCRIPTORS && setter)setSymbolDesc(ObjectProto, tag, {configurable: true, set: $set}); return wrap(tag); }; redefine($Symbol[PROTOTYPE], 'toString', function toString(){ return this._k; }); $GOPD.f = $getOwnPropertyDescriptor; $DP.f = $defineProperty; require('./_object-gopn').f = gOPNExt.f = $getOwnPropertyNames; require('./_object-pie').f = $propertyIsEnumerable; require('./_object-gops').f = $getOwnPropertySymbols; if(DESCRIPTORS && !require('./_library')){ redefine(ObjectProto, 'propertyIsEnumerable', $propertyIsEnumerable, true); } wksExt.f = function(name){ return wrap(wks(name)); } } $export($export.G + $export.W + $export.F * !USE_NATIVE, {Symbol: $Symbol}); for(var symbols = ( // 19.4.2.2, 19.4.2.3, 19.4.2.4, 19.4.2.6, 19.4.2.8, 19.4.2.9, 19.4.2.10, 19.4.2.11, 19.4.2.12, 19.4.2.13, 19.4.2.14 'hasInstance,isConcatSpreadable,iterator,match,replace,search,species,split,toPrimitive,toStringTag,unscopables' ).split(','), i = 0; symbols.length > i; )wks(symbols[i++]); for(var symbols = $keys(wks.store), i = 0; symbols.length > i; )wksDefine(symbols[i++]); $export($export.S + $export.F * !USE_NATIVE, 'Symbol', { // 19.4.2.1 Symbol.for(key) 'for': function(key){ return has(SymbolRegistry, key += '') ? SymbolRegistry[key] : SymbolRegistry[key] = $Symbol(key); }, // 19.4.2.5 Symbol.keyFor(sym) keyFor: function keyFor(key){ if(isSymbol(key))return keyOf(SymbolRegistry, key); throw TypeError(key + ' is not a symbol!'); }, useSetter: function(){ setter = true; }, useSimple: function(){ setter = false; } }); $export($export.S + $export.F * !USE_NATIVE, 'Object', { // 19.1.2.2 Object.create(O [, Properties]) create: $create, // 19.1.2.4 Object.defineProperty(O, P, Attributes) defineProperty: $defineProperty, // 19.1.2.3 Object.defineProperties(O, Properties) defineProperties: $defineProperties, // 19.1.2.6 Object.getOwnPropertyDescriptor(O, P) getOwnPropertyDescriptor: $getOwnPropertyDescriptor, // 19.1.2.7 Object.getOwnPropertyNames(O) getOwnPropertyNames: $getOwnPropertyNames, // 19.1.2.8 Object.getOwnPropertySymbols(O) getOwnPropertySymbols: $getOwnPropertySymbols }); // 24.3.2 JSON.stringify(value [, replacer [, space]]) $JSON && $export($export.S + $export.F * (!USE_NATIVE || $fails(function(){ var S = $Symbol(); // MS Edge converts symbol values to JSON as {} // WebKit converts symbol values to JSON as null // V8 throws on boxed symbols return _stringify([S]) != '[null]' || _stringify({a: S}) != '{}' || _stringify(Object(S)) != '{}'; })), 'JSON', { stringify: function stringify(it){ if(it === undefined || isSymbol(it))return; // IE8 returns string on undefined var args = [it] , i = 1 , replacer, $replacer; while(arguments.length > i)args.push(arguments[i++]); replacer = args[1]; if(typeof replacer == 'function')$replacer = replacer; if($replacer || !isArray(replacer))replacer = function(key, value){ if($replacer)value = $replacer.call(this, key, value); if(!isSymbol(value))return value; }; args[1] = replacer; return _stringify.apply($JSON, args); } }); // 19.4.3.4 Symbol.prototype[@@toPrimitive](hint) $Symbol[PROTOTYPE][TO_PRIMITIVE] || require('./_hide')($Symbol[PROTOTYPE], TO_PRIMITIVE, $Symbol[PROTOTYPE].valueOf); // 19.4.3.5 Symbol.prototype[@@toStringTag] setToStringTag($Symbol, 'Symbol'); // 20.2.1.9 Math[@@toStringTag] setToStringTag(Math, 'Math', true); // 24.3.3 JSON[@@toStringTag] setToStringTag(global.JSON, 'JSON', true);core-js-2.4.1/library/modules/es6.typed.array-buffer.js000066400000000000000000000034111274277553300227550ustar00rootroot00000000000000'use strict'; var $export = require('./_export') , $typed = require('./_typed') , buffer = require('./_typed-buffer') , anObject = require('./_an-object') , toIndex = require('./_to-index') , toLength = require('./_to-length') , isObject = require('./_is-object') , ArrayBuffer = require('./_global').ArrayBuffer , speciesConstructor = require('./_species-constructor') , $ArrayBuffer = buffer.ArrayBuffer , $DataView = buffer.DataView , $isView = $typed.ABV && ArrayBuffer.isView , $slice = $ArrayBuffer.prototype.slice , VIEW = $typed.VIEW , ARRAY_BUFFER = 'ArrayBuffer'; $export($export.G + $export.W + $export.F * (ArrayBuffer !== $ArrayBuffer), {ArrayBuffer: $ArrayBuffer}); $export($export.S + $export.F * !$typed.CONSTR, ARRAY_BUFFER, { // 24.1.3.1 ArrayBuffer.isView(arg) isView: function isView(it){ return $isView && $isView(it) || isObject(it) && VIEW in it; } }); $export($export.P + $export.U + $export.F * require('./_fails')(function(){ return !new $ArrayBuffer(2).slice(1, undefined).byteLength; }), ARRAY_BUFFER, { // 24.1.4.3 ArrayBuffer.prototype.slice(start, end) slice: function slice(start, end){ if($slice !== undefined && end === undefined)return $slice.call(anObject(this), start); // FF fix var len = anObject(this).byteLength , first = toIndex(start, len) , final = toIndex(end === undefined ? len : end, len) , result = new (speciesConstructor(this, $ArrayBuffer))(toLength(final - first)) , viewS = new $DataView(this) , viewT = new $DataView(result) , index = 0; while(first < final){ viewT.setUint8(index++, viewS.getUint8(first++)); } return result; } }); require('./_set-species')(ARRAY_BUFFER);core-js-2.4.1/library/modules/es6.typed.data-view.js000066400000000000000000000002371274277553300222540ustar00rootroot00000000000000var $export = require('./_export'); $export($export.G + $export.W + $export.F * !require('./_typed').ABV, { DataView: require('./_typed-buffer').DataView });core-js-2.4.1/library/modules/es6.typed.float32-array.js000066400000000000000000000002531274277553300227570ustar00rootroot00000000000000require('./_typed-array')('Float32', 4, function(init){ return function Float32Array(data, byteOffset, length){ return init(this, data, byteOffset, length); }; });core-js-2.4.1/library/modules/es6.typed.float64-array.js000066400000000000000000000002531274277553300227640ustar00rootroot00000000000000require('./_typed-array')('Float64', 8, function(init){ return function Float64Array(data, byteOffset, length){ return init(this, data, byteOffset, length); }; });core-js-2.4.1/library/modules/es6.typed.int16-array.js000066400000000000000000000002471274277553300224510ustar00rootroot00000000000000require('./_typed-array')('Int16', 2, function(init){ return function Int16Array(data, byteOffset, length){ return init(this, data, byteOffset, length); }; });core-js-2.4.1/library/modules/es6.typed.int32-array.js000066400000000000000000000002471274277553300224470ustar00rootroot00000000000000require('./_typed-array')('Int32', 4, function(init){ return function Int32Array(data, byteOffset, length){ return init(this, data, byteOffset, length); }; });core-js-2.4.1/library/modules/es6.typed.int8-array.js000066400000000000000000000002451274277553300223700ustar00rootroot00000000000000require('./_typed-array')('Int8', 1, function(init){ return function Int8Array(data, byteOffset, length){ return init(this, data, byteOffset, length); }; });core-js-2.4.1/library/modules/es6.typed.uint16-array.js000066400000000000000000000002511274277553300226310ustar00rootroot00000000000000require('./_typed-array')('Uint16', 2, function(init){ return function Uint16Array(data, byteOffset, length){ return init(this, data, byteOffset, length); }; });core-js-2.4.1/library/modules/es6.typed.uint32-array.js000066400000000000000000000002511274277553300226270ustar00rootroot00000000000000require('./_typed-array')('Uint32', 4, function(init){ return function Uint32Array(data, byteOffset, length){ return init(this, data, byteOffset, length); }; });core-js-2.4.1/library/modules/es6.typed.uint8-array.js000066400000000000000000000002471274277553300225570ustar00rootroot00000000000000require('./_typed-array')('Uint8', 1, function(init){ return function Uint8Array(data, byteOffset, length){ return init(this, data, byteOffset, length); }; });core-js-2.4.1/library/modules/es6.typed.uint8-clamped-array.js000066400000000000000000000002641274277553300241610ustar00rootroot00000000000000require('./_typed-array')('Uint8', 1, function(init){ return function Uint8ClampedArray(data, byteOffset, length){ return init(this, data, byteOffset, length); }; }, true);core-js-2.4.1/library/modules/es6.weak-map.js000066400000000000000000000034041274277553300207500ustar00rootroot00000000000000'use strict'; var each = require('./_array-methods')(0) , redefine = require('./_redefine') , meta = require('./_meta') , assign = require('./_object-assign') , weak = require('./_collection-weak') , isObject = require('./_is-object') , getWeak = meta.getWeak , isExtensible = Object.isExtensible , uncaughtFrozenStore = weak.ufstore , tmp = {} , InternalMap; var wrapper = function(get){ return function WeakMap(){ return get(this, arguments.length > 0 ? arguments[0] : undefined); }; }; var methods = { // 23.3.3.3 WeakMap.prototype.get(key) get: function get(key){ if(isObject(key)){ var data = getWeak(key); if(data === true)return uncaughtFrozenStore(this).get(key); return data ? data[this._i] : undefined; } }, // 23.3.3.5 WeakMap.prototype.set(key, value) set: function set(key, value){ return weak.def(this, key, value); } }; // 23.3 WeakMap Objects var $WeakMap = module.exports = require('./_collection')('WeakMap', wrapper, methods, weak, true, true); // IE11 WeakMap frozen keys fix if(new $WeakMap().set((Object.freeze || Object)(tmp), 7).get(tmp) != 7){ InternalMap = weak.getConstructor(wrapper); assign(InternalMap.prototype, methods); meta.NEED = true; each(['delete', 'has', 'get', 'set'], function(key){ var proto = $WeakMap.prototype , method = proto[key]; redefine(proto, key, function(a, b){ // store frozen objects on internal weakmap shim if(isObject(a) && !isExtensible(a)){ if(!this._f)this._f = new InternalMap; var result = this._f[key](a, b); return key == 'set' ? this : result; // store all the rest on native weakmap } return method.call(this, a, b); }); }); }core-js-2.4.1/library/modules/es6.weak-set.js000066400000000000000000000005651274277553300207730ustar00rootroot00000000000000'use strict'; var weak = require('./_collection-weak'); // 23.4 WeakSet Objects require('./_collection')('WeakSet', function(get){ return function WeakSet(){ return get(this, arguments.length > 0 ? arguments[0] : undefined); }; }, { // 23.4.3.1 WeakSet.prototype.add(value) add: function add(value){ return weak.def(this, value, true); } }, weak, false, true);core-js-2.4.1/library/modules/es7.array.includes.js000066400000000000000000000005711274277553300221740ustar00rootroot00000000000000'use strict'; // https://github.com/tc39/Array.prototype.includes var $export = require('./_export') , $includes = require('./_array-includes')(true); $export($export.P, 'Array', { includes: function includes(el /*, fromIndex = 0 */){ return $includes(this, el, arguments.length > 1 ? arguments[1] : undefined); } }); require('./_add-to-unscopables')('includes');core-js-2.4.1/library/modules/es7.asap.js000066400000000000000000000006741274277553300202010ustar00rootroot00000000000000// https://github.com/rwaldron/tc39-notes/blob/master/es6/2014-09/sept-25.md#510-globalasap-for-enqueuing-a-microtask var $export = require('./_export') , microtask = require('./_microtask')() , process = require('./_global').process , isNode = require('./_cof')(process) == 'process'; $export($export.G, { asap: function asap(fn){ var domain = isNode && process.domain; microtask(domain ? domain.bind(fn) : fn); } });core-js-2.4.1/library/modules/es7.error.is-error.js000066400000000000000000000003321274277553300221360ustar00rootroot00000000000000// https://github.com/ljharb/proposal-is-error var $export = require('./_export') , cof = require('./_cof'); $export($export.S, 'Error', { isError: function isError(it){ return cof(it) === 'Error'; } });core-js-2.4.1/library/modules/es7.map.to-json.js000066400000000000000000000002721274277553300214140ustar00rootroot00000000000000// https://github.com/DavidBruant/Map-Set.prototype.toJSON var $export = require('./_export'); $export($export.P + $export.R, 'Map', {toJSON: require('./_collection-to-json')('Map')});core-js-2.4.1/library/modules/es7.math.iaddh.js000066400000000000000000000005171274277553300212520ustar00rootroot00000000000000// https://gist.github.com/BrendanEich/4294d5c212a6d2254703 var $export = require('./_export'); $export($export.S, 'Math', { iaddh: function iaddh(x0, x1, y0, y1){ var $x0 = x0 >>> 0 , $x1 = x1 >>> 0 , $y0 = y0 >>> 0; return $x1 + (y1 >>> 0) + (($x0 & $y0 | ($x0 | $y0) & ~($x0 + $y0 >>> 0)) >>> 31) | 0; } });core-js-2.4.1/library/modules/es7.math.imulh.js000066400000000000000000000006641274277553300213220ustar00rootroot00000000000000// https://gist.github.com/BrendanEich/4294d5c212a6d2254703 var $export = require('./_export'); $export($export.S, 'Math', { imulh: function imulh(u, v){ var UINT16 = 0xffff , $u = +u , $v = +v , u0 = $u & UINT16 , v0 = $v & UINT16 , u1 = $u >> 16 , v1 = $v >> 16 , t = (u1 * v0 >>> 0) + (u0 * v0 >>> 16); return u1 * v1 + (t >> 16) + ((u0 * v1 >>> 0) + (t & UINT16) >> 16); } });core-js-2.4.1/library/modules/es7.math.isubh.js000066400000000000000000000005161274277553300213120ustar00rootroot00000000000000// https://gist.github.com/BrendanEich/4294d5c212a6d2254703 var $export = require('./_export'); $export($export.S, 'Math', { isubh: function isubh(x0, x1, y0, y1){ var $x0 = x0 >>> 0 , $x1 = x1 >>> 0 , $y0 = y0 >>> 0; return $x1 - (y1 >>> 0) - ((~$x0 & $y0 | ~($x0 ^ $y0) & $x0 - $y0 >>> 0) >>> 31) | 0; } });core-js-2.4.1/library/modules/es7.math.umulh.js000066400000000000000000000006701274277553300213330ustar00rootroot00000000000000// https://gist.github.com/BrendanEich/4294d5c212a6d2254703 var $export = require('./_export'); $export($export.S, 'Math', { umulh: function umulh(u, v){ var UINT16 = 0xffff , $u = +u , $v = +v , u0 = $u & UINT16 , v0 = $v & UINT16 , u1 = $u >>> 16 , v1 = $v >>> 16 , t = (u1 * v0 >>> 0) + (u0 * v0 >>> 16); return u1 * v1 + (t >>> 16) + ((u0 * v1 >>> 0) + (t & UINT16) >>> 16); } });core-js-2.4.1/library/modules/es7.object.define-getter.js000066400000000000000000000010071274277553300232330ustar00rootroot00000000000000'use strict'; var $export = require('./_export') , toObject = require('./_to-object') , aFunction = require('./_a-function') , $defineProperty = require('./_object-dp'); // B.2.2.2 Object.prototype.__defineGetter__(P, getter) require('./_descriptors') && $export($export.P + require('./_object-forced-pam'), 'Object', { __defineGetter__: function __defineGetter__(P, getter){ $defineProperty.f(toObject(this), P, {get: aFunction(getter), enumerable: true, configurable: true}); } });core-js-2.4.1/library/modules/es7.object.define-setter.js000066400000000000000000000010071274277553300232470ustar00rootroot00000000000000'use strict'; var $export = require('./_export') , toObject = require('./_to-object') , aFunction = require('./_a-function') , $defineProperty = require('./_object-dp'); // B.2.2.3 Object.prototype.__defineSetter__(P, setter) require('./_descriptors') && $export($export.P + require('./_object-forced-pam'), 'Object', { __defineSetter__: function __defineSetter__(P, setter){ $defineProperty.f(toObject(this), P, {set: aFunction(setter), enumerable: true, configurable: true}); } });core-js-2.4.1/library/modules/es7.object.entries.js000066400000000000000000000003631274277553300221660ustar00rootroot00000000000000// https://github.com/tc39/proposal-object-values-entries var $export = require('./_export') , $entries = require('./_object-to-array')(true); $export($export.S, 'Object', { entries: function entries(it){ return $entries(it); } });core-js-2.4.1/library/modules/es7.object.enumerable-entries.js000066400000000000000000000005401274277553300243000ustar00rootroot00000000000000// https://github.com/leobalter/object-enumerables var $export = require('./_export') , toObject = require('./_to-object'); $export($export.S, 'Object', { enumerableEntries: function enumerableEntries(O){ var T = toObject(O) , properties = []; for(var key in T)properties.push([key, T[key]]); return properties; } });core-js-2.4.1/library/modules/es7.object.enumerable-keys.js000066400000000000000000000005201274277553300236000ustar00rootroot00000000000000// https://github.com/leobalter/object-enumerables var $export = require('./_export') , toObject = require('./_to-object'); $export($export.S, 'Object', { enumerableKeys: function enumerableKeys(O){ var T = toObject(O) , properties = []; for(var key in T)properties.push(key); return properties; } });core-js-2.4.1/library/modules/es7.object.enumerable-values.js000066400000000000000000000005271274277553300241330ustar00rootroot00000000000000// https://github.com/leobalter/object-enumerables var $export = require('./_export') , toObject = require('./_to-object'); $export($export.S, 'Object', { enumerableValues: function enumerableValues(O){ var T = toObject(O) , properties = []; for(var key in T)properties.push(T[key]); return properties; } });core-js-2.4.1/library/modules/es7.object.get-own-property-descriptors.js000066400000000000000000000012231274277553300263120ustar00rootroot00000000000000// https://github.com/tc39/proposal-object-getownpropertydescriptors var $export = require('./_export') , ownKeys = require('./_own-keys') , toIObject = require('./_to-iobject') , gOPD = require('./_object-gopd') , createProperty = require('./_create-property'); $export($export.S, 'Object', { getOwnPropertyDescriptors: function getOwnPropertyDescriptors(object){ var O = toIObject(object) , getDesc = gOPD.f , keys = ownKeys(O) , result = {} , i = 0 , key; while(keys.length > i)createProperty(result, key = keys[i++], getDesc(O, key)); return result; } });core-js-2.4.1/library/modules/es7.object.lookup-getter.js000066400000000000000000000012351274277553300233150ustar00rootroot00000000000000'use strict'; var $export = require('./_export') , toObject = require('./_to-object') , toPrimitive = require('./_to-primitive') , getPrototypeOf = require('./_object-gpo') , getOwnPropertyDescriptor = require('./_object-gopd').f; // B.2.2.4 Object.prototype.__lookupGetter__(P) require('./_descriptors') && $export($export.P + require('./_object-forced-pam'), 'Object', { __lookupGetter__: function __lookupGetter__(P){ var O = toObject(this) , K = toPrimitive(P, true) , D; do { if(D = getOwnPropertyDescriptor(O, K))return D.get; } while(O = getPrototypeOf(O)); } });core-js-2.4.1/library/modules/es7.object.lookup-setter.js000066400000000000000000000012351274277553300233310ustar00rootroot00000000000000'use strict'; var $export = require('./_export') , toObject = require('./_to-object') , toPrimitive = require('./_to-primitive') , getPrototypeOf = require('./_object-gpo') , getOwnPropertyDescriptor = require('./_object-gopd').f; // B.2.2.5 Object.prototype.__lookupSetter__(P) require('./_descriptors') && $export($export.P + require('./_object-forced-pam'), 'Object', { __lookupSetter__: function __lookupSetter__(P){ var O = toObject(this) , K = toPrimitive(P, true) , D; do { if(D = getOwnPropertyDescriptor(O, K))return D.set; } while(O = getPrototypeOf(O)); } });core-js-2.4.1/library/modules/es7.object.values.js000066400000000000000000000003571274277553300220170ustar00rootroot00000000000000// https://github.com/tc39/proposal-object-values-entries var $export = require('./_export') , $values = require('./_object-to-array')(false); $export($export.S, 'Object', { values: function values(it){ return $values(it); } });core-js-2.4.1/library/modules/es7.observable.js000066400000000000000000000125141274277553300213750ustar00rootroot00000000000000'use strict'; // https://github.com/zenparsing/es-observable var $export = require('./_export') , global = require('./_global') , core = require('./_core') , microtask = require('./_microtask')() , OBSERVABLE = require('./_wks')('observable') , aFunction = require('./_a-function') , anObject = require('./_an-object') , anInstance = require('./_an-instance') , redefineAll = require('./_redefine-all') , hide = require('./_hide') , forOf = require('./_for-of') , RETURN = forOf.RETURN; var getMethod = function(fn){ return fn == null ? undefined : aFunction(fn); }; var cleanupSubscription = function(subscription){ var cleanup = subscription._c; if(cleanup){ subscription._c = undefined; cleanup(); } }; var subscriptionClosed = function(subscription){ return subscription._o === undefined; }; var closeSubscription = function(subscription){ if(!subscriptionClosed(subscription)){ subscription._o = undefined; cleanupSubscription(subscription); } }; var Subscription = function(observer, subscriber){ anObject(observer); this._c = undefined; this._o = observer; observer = new SubscriptionObserver(this); try { var cleanup = subscriber(observer) , subscription = cleanup; if(cleanup != null){ if(typeof cleanup.unsubscribe === 'function')cleanup = function(){ subscription.unsubscribe(); }; else aFunction(cleanup); this._c = cleanup; } } catch(e){ observer.error(e); return; } if(subscriptionClosed(this))cleanupSubscription(this); }; Subscription.prototype = redefineAll({}, { unsubscribe: function unsubscribe(){ closeSubscription(this); } }); var SubscriptionObserver = function(subscription){ this._s = subscription; }; SubscriptionObserver.prototype = redefineAll({}, { next: function next(value){ var subscription = this._s; if(!subscriptionClosed(subscription)){ var observer = subscription._o; try { var m = getMethod(observer.next); if(m)return m.call(observer, value); } catch(e){ try { closeSubscription(subscription); } finally { throw e; } } } }, error: function error(value){ var subscription = this._s; if(subscriptionClosed(subscription))throw value; var observer = subscription._o; subscription._o = undefined; try { var m = getMethod(observer.error); if(!m)throw value; value = m.call(observer, value); } catch(e){ try { cleanupSubscription(subscription); } finally { throw e; } } cleanupSubscription(subscription); return value; }, complete: function complete(value){ var subscription = this._s; if(!subscriptionClosed(subscription)){ var observer = subscription._o; subscription._o = undefined; try { var m = getMethod(observer.complete); value = m ? m.call(observer, value) : undefined; } catch(e){ try { cleanupSubscription(subscription); } finally { throw e; } } cleanupSubscription(subscription); return value; } } }); var $Observable = function Observable(subscriber){ anInstance(this, $Observable, 'Observable', '_f')._f = aFunction(subscriber); }; redefineAll($Observable.prototype, { subscribe: function subscribe(observer){ return new Subscription(observer, this._f); }, forEach: function forEach(fn){ var that = this; return new (core.Promise || global.Promise)(function(resolve, reject){ aFunction(fn); var subscription = that.subscribe({ next : function(value){ try { return fn(value); } catch(e){ reject(e); subscription.unsubscribe(); } }, error: reject, complete: resolve }); }); } }); redefineAll($Observable, { from: function from(x){ var C = typeof this === 'function' ? this : $Observable; var method = getMethod(anObject(x)[OBSERVABLE]); if(method){ var observable = anObject(method.call(x)); return observable.constructor === C ? observable : new C(function(observer){ return observable.subscribe(observer); }); } return new C(function(observer){ var done = false; microtask(function(){ if(!done){ try { if(forOf(x, false, function(it){ observer.next(it); if(done)return RETURN; }) === RETURN)return; } catch(e){ if(done)throw e; observer.error(e); return; } observer.complete(); } }); return function(){ done = true; }; }); }, of: function of(){ for(var i = 0, l = arguments.length, items = Array(l); i < l;)items[i] = arguments[i++]; return new (typeof this === 'function' ? this : $Observable)(function(observer){ var done = false; microtask(function(){ if(!done){ for(var i = 0; i < items.length; ++i){ observer.next(items[i]); if(done)return; } observer.complete(); } }); return function(){ done = true; }; }); } }); hide($Observable.prototype, OBSERVABLE, function(){ return this; }); $export($export.G, {Observable: $Observable}); require('./_set-species')('Observable');core-js-2.4.1/library/modules/es7.reflect.define-metadata.js000066400000000000000000000006261274277553300237050ustar00rootroot00000000000000var metadata = require('./_metadata') , anObject = require('./_an-object') , toMetaKey = metadata.key , ordinaryDefineOwnMetadata = metadata.set; metadata.exp({defineMetadata: function defineMetadata(metadataKey, metadataValue, target, targetKey){ ordinaryDefineOwnMetadata(metadataKey, metadataValue, anObject(target), toMetaKey(targetKey)); }});core-js-2.4.1/library/modules/es7.reflect.delete-metadata.js000066400000000000000000000013561274277553300237160ustar00rootroot00000000000000var metadata = require('./_metadata') , anObject = require('./_an-object') , toMetaKey = metadata.key , getOrCreateMetadataMap = metadata.map , store = metadata.store; metadata.exp({deleteMetadata: function deleteMetadata(metadataKey, target /*, targetKey */){ var targetKey = arguments.length < 3 ? undefined : toMetaKey(arguments[2]) , metadataMap = getOrCreateMetadataMap(anObject(target), targetKey, false); if(metadataMap === undefined || !metadataMap['delete'](metadataKey))return false; if(metadataMap.size)return true; var targetMetadata = store.get(target); targetMetadata['delete'](targetKey); return !!targetMetadata.size || store['delete'](target); }});core-js-2.4.1/library/modules/es7.reflect.get-metadata-keys.js000066400000000000000000000015351274277553300242030ustar00rootroot00000000000000var Set = require('./es6.set') , from = require('./_array-from-iterable') , metadata = require('./_metadata') , anObject = require('./_an-object') , getPrototypeOf = require('./_object-gpo') , ordinaryOwnMetadataKeys = metadata.keys , toMetaKey = metadata.key; var ordinaryMetadataKeys = function(O, P){ var oKeys = ordinaryOwnMetadataKeys(O, P) , parent = getPrototypeOf(O); if(parent === null)return oKeys; var pKeys = ordinaryMetadataKeys(parent, P); return pKeys.length ? oKeys.length ? from(new Set(oKeys.concat(pKeys))) : pKeys : oKeys; }; metadata.exp({getMetadataKeys: function getMetadataKeys(target /*, targetKey */){ return ordinaryMetadataKeys(anObject(target), arguments.length < 2 ? undefined : toMetaKey(arguments[1])); }});core-js-2.4.1/library/modules/es7.reflect.get-metadata.js000066400000000000000000000014341274277553300232300ustar00rootroot00000000000000var metadata = require('./_metadata') , anObject = require('./_an-object') , getPrototypeOf = require('./_object-gpo') , ordinaryHasOwnMetadata = metadata.has , ordinaryGetOwnMetadata = metadata.get , toMetaKey = metadata.key; var ordinaryGetMetadata = function(MetadataKey, O, P){ var hasOwn = ordinaryHasOwnMetadata(MetadataKey, O, P); if(hasOwn)return ordinaryGetOwnMetadata(MetadataKey, O, P); var parent = getPrototypeOf(O); return parent !== null ? ordinaryGetMetadata(MetadataKey, parent, P) : undefined; }; metadata.exp({getMetadata: function getMetadata(metadataKey, target /*, targetKey */){ return ordinaryGetMetadata(metadataKey, anObject(target), arguments.length < 3 ? undefined : toMetaKey(arguments[2])); }});core-js-2.4.1/library/modules/es7.reflect.get-own-metadata-keys.js000066400000000000000000000006201274277553300247760ustar00rootroot00000000000000var metadata = require('./_metadata') , anObject = require('./_an-object') , ordinaryOwnMetadataKeys = metadata.keys , toMetaKey = metadata.key; metadata.exp({getOwnMetadataKeys: function getOwnMetadataKeys(target /*, targetKey */){ return ordinaryOwnMetadataKeys(anObject(target), arguments.length < 2 ? undefined : toMetaKey(arguments[1])); }});core-js-2.4.1/library/modules/es7.reflect.get-own-metadata.js000066400000000000000000000006411274277553300240300ustar00rootroot00000000000000var metadata = require('./_metadata') , anObject = require('./_an-object') , ordinaryGetOwnMetadata = metadata.get , toMetaKey = metadata.key; metadata.exp({getOwnMetadata: function getOwnMetadata(metadataKey, target /*, targetKey */){ return ordinaryGetOwnMetadata(metadataKey, anObject(target) , arguments.length < 3 ? undefined : toMetaKey(arguments[2])); }});core-js-2.4.1/library/modules/es7.reflect.has-metadata.js000066400000000000000000000013111274277553300232160ustar00rootroot00000000000000var metadata = require('./_metadata') , anObject = require('./_an-object') , getPrototypeOf = require('./_object-gpo') , ordinaryHasOwnMetadata = metadata.has , toMetaKey = metadata.key; var ordinaryHasMetadata = function(MetadataKey, O, P){ var hasOwn = ordinaryHasOwnMetadata(MetadataKey, O, P); if(hasOwn)return true; var parent = getPrototypeOf(O); return parent !== null ? ordinaryHasMetadata(MetadataKey, parent, P) : false; }; metadata.exp({hasMetadata: function hasMetadata(metadataKey, target /*, targetKey */){ return ordinaryHasMetadata(metadataKey, anObject(target), arguments.length < 3 ? undefined : toMetaKey(arguments[2])); }});core-js-2.4.1/library/modules/es7.reflect.has-own-metadata.js000066400000000000000000000006411274277553300240240ustar00rootroot00000000000000var metadata = require('./_metadata') , anObject = require('./_an-object') , ordinaryHasOwnMetadata = metadata.has , toMetaKey = metadata.key; metadata.exp({hasOwnMetadata: function hasOwnMetadata(metadataKey, target /*, targetKey */){ return ordinaryHasOwnMetadata(metadataKey, anObject(target) , arguments.length < 3 ? undefined : toMetaKey(arguments[2])); }});core-js-2.4.1/library/modules/es7.reflect.metadata.js000066400000000000000000000010471274277553300224530ustar00rootroot00000000000000var metadata = require('./_metadata') , anObject = require('./_an-object') , aFunction = require('./_a-function') , toMetaKey = metadata.key , ordinaryDefineOwnMetadata = metadata.set; metadata.exp({metadata: function metadata(metadataKey, metadataValue){ return function decorator(target, targetKey){ ordinaryDefineOwnMetadata( metadataKey, metadataValue, (targetKey !== undefined ? anObject : aFunction)(target), toMetaKey(targetKey) ); }; }});core-js-2.4.1/library/modules/es7.set.to-json.js000066400000000000000000000002721274277553300214320ustar00rootroot00000000000000// https://github.com/DavidBruant/Map-Set.prototype.toJSON var $export = require('./_export'); $export($export.P + $export.R, 'Set', {toJSON: require('./_collection-to-json')('Set')});core-js-2.4.1/library/modules/es7.string.at.js000066400000000000000000000003601274277553300211560ustar00rootroot00000000000000'use strict'; // https://github.com/mathiasbynens/String.prototype.at var $export = require('./_export') , $at = require('./_string-at')(true); $export($export.P, 'String', { at: function at(pos){ return $at(this, pos); } });core-js-2.4.1/library/modules/es7.string.match-all.js000066400000000000000000000020141274277553300224120ustar00rootroot00000000000000'use strict'; // https://tc39.github.io/String.prototype.matchAll/ var $export = require('./_export') , defined = require('./_defined') , toLength = require('./_to-length') , isRegExp = require('./_is-regexp') , getFlags = require('./_flags') , RegExpProto = RegExp.prototype; var $RegExpStringIterator = function(regexp, string){ this._r = regexp; this._s = string; }; require('./_iter-create')($RegExpStringIterator, 'RegExp String', function next(){ var match = this._r.exec(this._s); return {value: match, done: match === null}; }); $export($export.P, 'String', { matchAll: function matchAll(regexp){ defined(this); if(!isRegExp(regexp))throw TypeError(regexp + ' is not a regexp!'); var S = String(this) , flags = 'flags' in RegExpProto ? String(regexp.flags) : getFlags.call(regexp) , rx = new RegExp(regexp.source, ~flags.indexOf('g') ? flags : 'g' + flags); rx.lastIndex = toLength(regexp.lastIndex); return new $RegExpStringIterator(rx, S); } });core-js-2.4.1/library/modules/es7.string.pad-end.js000066400000000000000000000005211274277553300220610ustar00rootroot00000000000000'use strict'; // https://github.com/tc39/proposal-string-pad-start-end var $export = require('./_export') , $pad = require('./_string-pad'); $export($export.P, 'String', { padEnd: function padEnd(maxLength /*, fillString = ' ' */){ return $pad(this, maxLength, arguments.length > 1 ? arguments[1] : undefined, false); } });core-js-2.4.1/library/modules/es7.string.pad-start.js000066400000000000000000000005241274277553300224530ustar00rootroot00000000000000'use strict'; // https://github.com/tc39/proposal-string-pad-start-end var $export = require('./_export') , $pad = require('./_string-pad'); $export($export.P, 'String', { padStart: function padStart(maxLength /*, fillString = ' ' */){ return $pad(this, maxLength, arguments.length > 1 ? arguments[1] : undefined, true); } });core-js-2.4.1/library/modules/es7.string.trim-left.js000066400000000000000000000003271274277553300224600ustar00rootroot00000000000000'use strict'; // https://github.com/sebmarkbage/ecmascript-string-left-right-trim require('./_string-trim')('trimLeft', function($trim){ return function trimLeft(){ return $trim(this, 1); }; }, 'trimStart');core-js-2.4.1/library/modules/es7.string.trim-right.js000066400000000000000000000003271274277553300226430ustar00rootroot00000000000000'use strict'; // https://github.com/sebmarkbage/ecmascript-string-left-right-trim require('./_string-trim')('trimRight', function($trim){ return function trimRight(){ return $trim(this, 2); }; }, 'trimEnd');core-js-2.4.1/library/modules/es7.symbol.async-iterator.js000066400000000000000000000000521274277553300235130ustar00rootroot00000000000000require('./_wks-define')('asyncIterator');core-js-2.4.1/library/modules/es7.symbol.observable.js000066400000000000000000000000471274277553300226770ustar00rootroot00000000000000require('./_wks-define')('observable');core-js-2.4.1/library/modules/es7.system.global.js000066400000000000000000000002171274277553300220310ustar00rootroot00000000000000// https://github.com/ljharb/proposal-global var $export = require('./_export'); $export($export.S, 'System', {global: require('./_global')});core-js-2.4.1/library/modules/web.dom.iterable.js000066400000000000000000000010571274277553300216750ustar00rootroot00000000000000require('./es6.array.iterator'); var global = require('./_global') , hide = require('./_hide') , Iterators = require('./_iterators') , TO_STRING_TAG = require('./_wks')('toStringTag'); for(var collections = ['NodeList', 'DOMTokenList', 'MediaList', 'StyleSheetList', 'CSSRuleList'], i = 0; i < 5; i++){ var NAME = collections[i] , Collection = global[NAME] , proto = Collection && Collection.prototype; if(proto && !proto[TO_STRING_TAG])hide(proto, TO_STRING_TAG, NAME); Iterators[NAME] = Iterators.Array; }core-js-2.4.1/library/modules/web.immediate.js000066400000000000000000000002441274277553300212630ustar00rootroot00000000000000var $export = require('./_export') , $task = require('./_task'); $export($export.G + $export.B, { setImmediate: $task.set, clearImmediate: $task.clear });core-js-2.4.1/library/modules/web.timers.js000066400000000000000000000012761274277553300206360ustar00rootroot00000000000000// ie9- setTimeout & setInterval additional parameters fix var global = require('./_global') , $export = require('./_export') , invoke = require('./_invoke') , partial = require('./_partial') , navigator = global.navigator , MSIE = !!navigator && /MSIE .\./.test(navigator.userAgent); // <- dirty ie9- check var wrap = function(set){ return MSIE ? function(fn, time /*, ...args */){ return set(invoke( partial, [].slice.call(arguments, 2), typeof fn == 'function' ? fn : Function(fn) ), time); } : set; }; $export($export.G + $export.B + $export.F * MSIE, { setTimeout: wrap(global.setTimeout), setInterval: wrap(global.setInterval) });core-js-2.4.1/library/shim.js000066400000000000000000000163251274277553300160500ustar00rootroot00000000000000require('./modules/es6.symbol'); require('./modules/es6.object.create'); require('./modules/es6.object.define-property'); require('./modules/es6.object.define-properties'); require('./modules/es6.object.get-own-property-descriptor'); require('./modules/es6.object.get-prototype-of'); require('./modules/es6.object.keys'); require('./modules/es6.object.get-own-property-names'); require('./modules/es6.object.freeze'); require('./modules/es6.object.seal'); require('./modules/es6.object.prevent-extensions'); require('./modules/es6.object.is-frozen'); require('./modules/es6.object.is-sealed'); require('./modules/es6.object.is-extensible'); require('./modules/es6.object.assign'); require('./modules/es6.object.is'); require('./modules/es6.object.set-prototype-of'); require('./modules/es6.object.to-string'); require('./modules/es6.function.bind'); require('./modules/es6.function.name'); require('./modules/es6.function.has-instance'); require('./modules/es6.parse-int'); require('./modules/es6.parse-float'); require('./modules/es6.number.constructor'); require('./modules/es6.number.to-fixed'); require('./modules/es6.number.to-precision'); require('./modules/es6.number.epsilon'); require('./modules/es6.number.is-finite'); require('./modules/es6.number.is-integer'); require('./modules/es6.number.is-nan'); require('./modules/es6.number.is-safe-integer'); require('./modules/es6.number.max-safe-integer'); require('./modules/es6.number.min-safe-integer'); require('./modules/es6.number.parse-float'); require('./modules/es6.number.parse-int'); require('./modules/es6.math.acosh'); require('./modules/es6.math.asinh'); require('./modules/es6.math.atanh'); require('./modules/es6.math.cbrt'); require('./modules/es6.math.clz32'); require('./modules/es6.math.cosh'); require('./modules/es6.math.expm1'); require('./modules/es6.math.fround'); require('./modules/es6.math.hypot'); require('./modules/es6.math.imul'); require('./modules/es6.math.log10'); require('./modules/es6.math.log1p'); require('./modules/es6.math.log2'); require('./modules/es6.math.sign'); require('./modules/es6.math.sinh'); require('./modules/es6.math.tanh'); require('./modules/es6.math.trunc'); require('./modules/es6.string.from-code-point'); require('./modules/es6.string.raw'); require('./modules/es6.string.trim'); require('./modules/es6.string.iterator'); require('./modules/es6.string.code-point-at'); require('./modules/es6.string.ends-with'); require('./modules/es6.string.includes'); require('./modules/es6.string.repeat'); require('./modules/es6.string.starts-with'); require('./modules/es6.string.anchor'); require('./modules/es6.string.big'); require('./modules/es6.string.blink'); require('./modules/es6.string.bold'); require('./modules/es6.string.fixed'); require('./modules/es6.string.fontcolor'); require('./modules/es6.string.fontsize'); require('./modules/es6.string.italics'); require('./modules/es6.string.link'); require('./modules/es6.string.small'); require('./modules/es6.string.strike'); require('./modules/es6.string.sub'); require('./modules/es6.string.sup'); require('./modules/es6.date.now'); require('./modules/es6.date.to-json'); require('./modules/es6.date.to-iso-string'); require('./modules/es6.date.to-string'); require('./modules/es6.date.to-primitive'); require('./modules/es6.array.is-array'); require('./modules/es6.array.from'); require('./modules/es6.array.of'); require('./modules/es6.array.join'); require('./modules/es6.array.slice'); require('./modules/es6.array.sort'); require('./modules/es6.array.for-each'); require('./modules/es6.array.map'); require('./modules/es6.array.filter'); require('./modules/es6.array.some'); require('./modules/es6.array.every'); require('./modules/es6.array.reduce'); require('./modules/es6.array.reduce-right'); require('./modules/es6.array.index-of'); require('./modules/es6.array.last-index-of'); require('./modules/es6.array.copy-within'); require('./modules/es6.array.fill'); require('./modules/es6.array.find'); require('./modules/es6.array.find-index'); require('./modules/es6.array.species'); require('./modules/es6.array.iterator'); require('./modules/es6.regexp.constructor'); require('./modules/es6.regexp.to-string'); require('./modules/es6.regexp.flags'); require('./modules/es6.regexp.match'); require('./modules/es6.regexp.replace'); require('./modules/es6.regexp.search'); require('./modules/es6.regexp.split'); require('./modules/es6.promise'); require('./modules/es6.map'); require('./modules/es6.set'); require('./modules/es6.weak-map'); require('./modules/es6.weak-set'); require('./modules/es6.typed.array-buffer'); require('./modules/es6.typed.data-view'); require('./modules/es6.typed.int8-array'); require('./modules/es6.typed.uint8-array'); require('./modules/es6.typed.uint8-clamped-array'); require('./modules/es6.typed.int16-array'); require('./modules/es6.typed.uint16-array'); require('./modules/es6.typed.int32-array'); require('./modules/es6.typed.uint32-array'); require('./modules/es6.typed.float32-array'); require('./modules/es6.typed.float64-array'); require('./modules/es6.reflect.apply'); require('./modules/es6.reflect.construct'); require('./modules/es6.reflect.define-property'); require('./modules/es6.reflect.delete-property'); require('./modules/es6.reflect.enumerate'); require('./modules/es6.reflect.get'); require('./modules/es6.reflect.get-own-property-descriptor'); require('./modules/es6.reflect.get-prototype-of'); require('./modules/es6.reflect.has'); require('./modules/es6.reflect.is-extensible'); require('./modules/es6.reflect.own-keys'); require('./modules/es6.reflect.prevent-extensions'); require('./modules/es6.reflect.set'); require('./modules/es6.reflect.set-prototype-of'); require('./modules/es7.array.includes'); require('./modules/es7.string.at'); require('./modules/es7.string.pad-start'); require('./modules/es7.string.pad-end'); require('./modules/es7.string.trim-left'); require('./modules/es7.string.trim-right'); require('./modules/es7.string.match-all'); require('./modules/es7.symbol.async-iterator'); require('./modules/es7.symbol.observable'); require('./modules/es7.object.get-own-property-descriptors'); require('./modules/es7.object.values'); require('./modules/es7.object.entries'); require('./modules/es7.object.define-getter'); require('./modules/es7.object.define-setter'); require('./modules/es7.object.lookup-getter'); require('./modules/es7.object.lookup-setter'); require('./modules/es7.map.to-json'); require('./modules/es7.set.to-json'); require('./modules/es7.system.global'); require('./modules/es7.error.is-error'); require('./modules/es7.math.iaddh'); require('./modules/es7.math.isubh'); require('./modules/es7.math.imulh'); require('./modules/es7.math.umulh'); require('./modules/es7.reflect.define-metadata'); require('./modules/es7.reflect.delete-metadata'); require('./modules/es7.reflect.get-metadata'); require('./modules/es7.reflect.get-metadata-keys'); require('./modules/es7.reflect.get-own-metadata'); require('./modules/es7.reflect.get-own-metadata-keys'); require('./modules/es7.reflect.has-metadata'); require('./modules/es7.reflect.has-own-metadata'); require('./modules/es7.reflect.metadata'); require('./modules/es7.asap'); require('./modules/es7.observable'); require('./modules/web.timers'); require('./modules/web.immediate'); require('./modules/web.dom.iterable'); module.exports = require('./modules/_core');core-js-2.4.1/library/stage/000077500000000000000000000000001274277553300156465ustar00rootroot00000000000000core-js-2.4.1/library/stage/0.js000066400000000000000000000005651274277553300163510ustar00rootroot00000000000000require('../modules/es7.string.at'); require('../modules/es7.map.to-json'); require('../modules/es7.set.to-json'); require('../modules/es7.error.is-error'); require('../modules/es7.math.iaddh'); require('../modules/es7.math.isubh'); require('../modules/es7.math.imulh'); require('../modules/es7.math.umulh'); require('../modules/es7.asap'); module.exports = require('./1');core-js-2.4.1/library/stage/1.js000066400000000000000000000003711274277553300163450ustar00rootroot00000000000000require('../modules/es7.string.trim-left'); require('../modules/es7.string.trim-right'); require('../modules/es7.string.match-all'); require('../modules/es7.symbol.observable'); require('../modules/es7.observable'); module.exports = require('./2'); core-js-2.4.1/library/stage/2.js000066400000000000000000000001731274277553300163460ustar00rootroot00000000000000require('../modules/es7.system.global'); require('../modules/es7.symbol.async-iterator'); module.exports = require('./3'); core-js-2.4.1/library/stage/3.js000066400000000000000000000002661274277553300163520ustar00rootroot00000000000000require('../modules/es7.object.get-own-property-descriptors'); require('../modules/es7.string.pad-start'); require('../modules/es7.string.pad-end'); module.exports = require('./4'); core-js-2.4.1/library/stage/4.js000066400000000000000000000005531274277553300163520ustar00rootroot00000000000000require('../modules/es7.object.define-getter'); require('../modules/es7.object.define-setter'); require('../modules/es7.object.lookup-getter'); require('../modules/es7.object.lookup-setter'); require('../modules/es7.object.values'); require('../modules/es7.object.entries'); require('../modules/es7.array.includes'); module.exports = require('../modules/_core'); core-js-2.4.1/library/stage/index.js000066400000000000000000000000421274277553300173070ustar00rootroot00000000000000module.exports = require('./pre');core-js-2.4.1/library/stage/pre.js000066400000000000000000000007501274277553300167740ustar00rootroot00000000000000require('../modules/es7.reflect.define-metadata'); require('../modules/es7.reflect.delete-metadata'); require('../modules/es7.reflect.get-metadata'); require('../modules/es7.reflect.get-metadata-keys'); require('../modules/es7.reflect.get-own-metadata'); require('../modules/es7.reflect.get-own-metadata-keys'); require('../modules/es7.reflect.has-metadata'); require('../modules/es7.reflect.has-own-metadata'); require('../modules/es7.reflect.metadata'); module.exports = require('./0');core-js-2.4.1/library/web/000077500000000000000000000000001274277553300153205ustar00rootroot00000000000000core-js-2.4.1/library/web/dom-collections.js000066400000000000000000000001251274277553300207470ustar00rootroot00000000000000require('../modules/web.dom.iterable'); module.exports = require('../modules/_core');core-js-2.4.1/library/web/immediate.js000066400000000000000000000001221274277553300176070ustar00rootroot00000000000000require('../modules/web.immediate'); module.exports = require('../modules/_core');core-js-2.4.1/library/web/index.js000066400000000000000000000002341274277553300167640ustar00rootroot00000000000000require('../modules/web.timers'); require('../modules/web.immediate'); require('../modules/web.dom.iterable'); module.exports = require('../modules/_core');core-js-2.4.1/library/web/timers.js000066400000000000000000000001171274277553300171600ustar00rootroot00000000000000require('../modules/web.timers'); module.exports = require('../modules/_core');core-js-2.4.1/modules/000077500000000000000000000000001274277553300145475ustar00rootroot00000000000000core-js-2.4.1/modules/_a-function.js000066400000000000000000000001701274277553300173050ustar00rootroot00000000000000module.exports = function(it){ if(typeof it != 'function')throw TypeError(it + ' is not a function!'); return it; };core-js-2.4.1/modules/_a-number-value.js000066400000000000000000000002311274277553300200600ustar00rootroot00000000000000var cof = require('./_cof'); module.exports = function(it, msg){ if(typeof it != 'number' && cof(it) != 'Number')throw TypeError(msg); return +it; };core-js-2.4.1/modules/_add-to-unscopables.js000066400000000000000000000004441274277553300207320ustar00rootroot00000000000000// 22.1.3.31 Array.prototype[@@unscopables] var UNSCOPABLES = require('./_wks')('unscopables') , ArrayProto = Array.prototype; if(ArrayProto[UNSCOPABLES] == undefined)require('./_hide')(ArrayProto, UNSCOPABLES, {}); module.exports = function(key){ ArrayProto[UNSCOPABLES][key] = true; };core-js-2.4.1/modules/_an-instance.js000066400000000000000000000003501274277553300174420ustar00rootroot00000000000000module.exports = function(it, Constructor, name, forbiddenField){ if(!(it instanceof Constructor) || (forbiddenField !== undefined && forbiddenField in it)){ throw TypeError(name + ': incorrect invocation!'); } return it; };core-js-2.4.1/modules/_an-object.js000066400000000000000000000002251274277553300171050ustar00rootroot00000000000000var isObject = require('./_is-object'); module.exports = function(it){ if(!isObject(it))throw TypeError(it + ' is not an object!'); return it; };core-js-2.4.1/modules/_array-copy-within.js000066400000000000000000000015011274277553300206270ustar00rootroot00000000000000// 22.1.3.3 Array.prototype.copyWithin(target, start, end = this.length) 'use strict'; var toObject = require('./_to-object') , toIndex = require('./_to-index') , toLength = require('./_to-length'); module.exports = [].copyWithin || function copyWithin(target/*= 0*/, start/*= 0, end = @length*/){ var O = toObject(this) , len = toLength(O.length) , to = toIndex(target, len) , from = toIndex(start, len) , end = arguments.length > 2 ? arguments[2] : undefined , count = Math.min((end === undefined ? len : toIndex(end, len)) - from, len - to) , inc = 1; if(from < to && to < from + count){ inc = -1; from += count - 1; to += count - 1; } while(count-- > 0){ if(from in O)O[to] = O[from]; else delete O[to]; to += inc; from += inc; } return O; };core-js-2.4.1/modules/_array-fill.js000066400000000000000000000011421274277553300173040ustar00rootroot00000000000000// 22.1.3.6 Array.prototype.fill(value, start = 0, end = this.length) 'use strict'; var toObject = require('./_to-object') , toIndex = require('./_to-index') , toLength = require('./_to-length'); module.exports = function fill(value /*, start = 0, end = @length */){ var O = toObject(this) , length = toLength(O.length) , aLen = arguments.length , index = toIndex(aLen > 1 ? arguments[1] : undefined, length) , end = aLen > 2 ? arguments[2] : undefined , endPos = end === undefined ? length : toIndex(end, length); while(endPos > index)O[index++] = value; return O; };core-js-2.4.1/modules/_array-from-iterable.js000066400000000000000000000002521274277553300211070ustar00rootroot00000000000000var forOf = require('./_for-of'); module.exports = function(iter, ITERATOR){ var result = []; forOf(iter, false, result.push, result, ITERATOR); return result; }; core-js-2.4.1/modules/_array-includes.js000066400000000000000000000014241274277553300201670ustar00rootroot00000000000000// false -> Array#indexOf // true -> Array#includes var toIObject = require('./_to-iobject') , toLength = require('./_to-length') , toIndex = require('./_to-index'); module.exports = function(IS_INCLUDES){ return function($this, el, fromIndex){ var O = toIObject($this) , length = toLength(O.length) , index = toIndex(fromIndex, length) , value; // Array#includes uses SameValueZero equality algorithm if(IS_INCLUDES && el != el)while(length > index){ value = O[index++]; if(value != value)return true; // Array#toIndex ignores holes, Array#includes - not } else for(;length > index; index++)if(IS_INCLUDES || index in O){ if(O[index] === el)return IS_INCLUDES || index || 0; } return !IS_INCLUDES && -1; }; };core-js-2.4.1/modules/_array-methods.js000066400000000000000000000030331274277553300200220ustar00rootroot00000000000000// 0 -> Array#forEach // 1 -> Array#map // 2 -> Array#filter // 3 -> Array#some // 4 -> Array#every // 5 -> Array#find // 6 -> Array#findIndex var ctx = require('./_ctx') , IObject = require('./_iobject') , toObject = require('./_to-object') , toLength = require('./_to-length') , asc = require('./_array-species-create'); module.exports = function(TYPE, $create){ var IS_MAP = TYPE == 1 , IS_FILTER = TYPE == 2 , IS_SOME = TYPE == 3 , IS_EVERY = TYPE == 4 , IS_FIND_INDEX = TYPE == 6 , NO_HOLES = TYPE == 5 || IS_FIND_INDEX , create = $create || asc; return function($this, callbackfn, that){ var O = toObject($this) , self = IObject(O) , f = ctx(callbackfn, that, 3) , length = toLength(self.length) , index = 0 , result = IS_MAP ? create($this, length) : IS_FILTER ? create($this, 0) : undefined , val, res; for(;length > index; index++)if(NO_HOLES || index in self){ val = self[index]; res = f(val, index, O); if(TYPE){ if(IS_MAP)result[index] = res; // map else if(res)switch(TYPE){ case 3: return true; // some case 5: return val; // find case 6: return index; // findIndex case 2: result.push(val); // filter } else if(IS_EVERY)return false; // every } } return IS_FIND_INDEX ? -1 : IS_SOME || IS_EVERY ? IS_EVERY : result; }; };core-js-2.4.1/modules/_array-reduce.js000066400000000000000000000014601274277553300176300ustar00rootroot00000000000000var aFunction = require('./_a-function') , toObject = require('./_to-object') , IObject = require('./_iobject') , toLength = require('./_to-length'); module.exports = function(that, callbackfn, aLen, memo, isRight){ aFunction(callbackfn); var O = toObject(that) , self = IObject(O) , length = toLength(O.length) , index = isRight ? length - 1 : 0 , i = isRight ? -1 : 1; if(aLen < 2)for(;;){ if(index in self){ memo = self[index]; index += i; break; } index += i; if(isRight ? index < 0 : length <= index){ throw TypeError('Reduce of empty array with no initial value'); } } for(;isRight ? index >= 0 : length > index; index += i)if(index in self){ memo = callbackfn(memo, self[index], index, O); } return memo; };core-js-2.4.1/modules/_array-species-constructor.js000066400000000000000000000007201274277553300223750ustar00rootroot00000000000000var isObject = require('./_is-object') , isArray = require('./_is-array') , SPECIES = require('./_wks')('species'); module.exports = function(original){ var C; if(isArray(original)){ C = original.constructor; // cross-realm fallback if(typeof C == 'function' && (C === Array || isArray(C.prototype)))C = undefined; if(isObject(C)){ C = C[SPECIES]; if(C === null)C = undefined; } } return C === undefined ? Array : C; };core-js-2.4.1/modules/_array-species-create.js000066400000000000000000000003341274277553300212540ustar00rootroot00000000000000// 9.4.2.3 ArraySpeciesCreate(originalArray, length) var speciesConstructor = require('./_array-species-constructor'); module.exports = function(original, length){ return new (speciesConstructor(original))(length); };core-js-2.4.1/modules/_bind.js000066400000000000000000000015271274277553300161650ustar00rootroot00000000000000'use strict'; var aFunction = require('./_a-function') , isObject = require('./_is-object') , invoke = require('./_invoke') , arraySlice = [].slice , factories = {}; var construct = function(F, len, args){ if(!(len in factories)){ for(var n = [], i = 0; i < len; i++)n[i] = 'a[' + i + ']'; factories[len] = Function('F,a', 'return new F(' + n.join(',') + ')'); } return factories[len](F, args); }; module.exports = Function.bind || function bind(that /*, args... */){ var fn = aFunction(this) , partArgs = arraySlice.call(arguments, 1); var bound = function(/* args... */){ var args = partArgs.concat(arraySlice.call(arguments)); return this instanceof bound ? construct(fn, args.length, args) : invoke(fn, args, that); }; if(isObject(fn.prototype))bound.prototype = fn.prototype; return bound; };core-js-2.4.1/modules/_classof.js000066400000000000000000000013051274277553300166750ustar00rootroot00000000000000// getting tag from 19.1.3.6 Object.prototype.toString() var cof = require('./_cof') , TAG = require('./_wks')('toStringTag') // ES3 wrong here , ARG = cof(function(){ return arguments; }()) == 'Arguments'; // fallback for IE11 Script Access Denied error var tryGet = function(it, key){ try { return it[key]; } catch(e){ /* empty */ } }; module.exports = function(it){ var O, T, B; return it === undefined ? 'Undefined' : it === null ? 'Null' // @@toStringTag case : typeof (T = tryGet(O = Object(it), TAG)) == 'string' ? T // builtinTag case : ARG ? cof(O) // ES3 arguments fallback : (B = cof(O)) == 'Object' && typeof O.callee == 'function' ? 'Arguments' : B; };core-js-2.4.1/modules/_cof.js000066400000000000000000000001471274277553300160150ustar00rootroot00000000000000var toString = {}.toString; module.exports = function(it){ return toString.call(it).slice(8, -1); };core-js-2.4.1/modules/_collection-strong.js000066400000000000000000000113421274277553300207120ustar00rootroot00000000000000'use strict'; var dP = require('./_object-dp').f , create = require('./_object-create') , redefineAll = require('./_redefine-all') , ctx = require('./_ctx') , anInstance = require('./_an-instance') , defined = require('./_defined') , forOf = require('./_for-of') , $iterDefine = require('./_iter-define') , step = require('./_iter-step') , setSpecies = require('./_set-species') , DESCRIPTORS = require('./_descriptors') , fastKey = require('./_meta').fastKey , SIZE = DESCRIPTORS ? '_s' : 'size'; var getEntry = function(that, key){ // fast case var index = fastKey(key), entry; if(index !== 'F')return that._i[index]; // frozen object case for(entry = that._f; entry; entry = entry.n){ if(entry.k == key)return entry; } }; module.exports = { getConstructor: function(wrapper, NAME, IS_MAP, ADDER){ var C = wrapper(function(that, iterable){ anInstance(that, C, NAME, '_i'); that._i = create(null); // index that._f = undefined; // first entry that._l = undefined; // last entry that[SIZE] = 0; // size if(iterable != undefined)forOf(iterable, IS_MAP, that[ADDER], that); }); redefineAll(C.prototype, { // 23.1.3.1 Map.prototype.clear() // 23.2.3.2 Set.prototype.clear() clear: function clear(){ for(var that = this, data = that._i, entry = that._f; entry; entry = entry.n){ entry.r = true; if(entry.p)entry.p = entry.p.n = undefined; delete data[entry.i]; } that._f = that._l = undefined; that[SIZE] = 0; }, // 23.1.3.3 Map.prototype.delete(key) // 23.2.3.4 Set.prototype.delete(value) 'delete': function(key){ var that = this , entry = getEntry(that, key); if(entry){ var next = entry.n , prev = entry.p; delete that._i[entry.i]; entry.r = true; if(prev)prev.n = next; if(next)next.p = prev; if(that._f == entry)that._f = next; if(that._l == entry)that._l = prev; that[SIZE]--; } return !!entry; }, // 23.2.3.6 Set.prototype.forEach(callbackfn, thisArg = undefined) // 23.1.3.5 Map.prototype.forEach(callbackfn, thisArg = undefined) forEach: function forEach(callbackfn /*, that = undefined */){ anInstance(this, C, 'forEach'); var f = ctx(callbackfn, arguments.length > 1 ? arguments[1] : undefined, 3) , entry; while(entry = entry ? entry.n : this._f){ f(entry.v, entry.k, this); // revert to the last existing entry while(entry && entry.r)entry = entry.p; } }, // 23.1.3.7 Map.prototype.has(key) // 23.2.3.7 Set.prototype.has(value) has: function has(key){ return !!getEntry(this, key); } }); if(DESCRIPTORS)dP(C.prototype, 'size', { get: function(){ return defined(this[SIZE]); } }); return C; }, def: function(that, key, value){ var entry = getEntry(that, key) , prev, index; // change existing entry if(entry){ entry.v = value; // create new entry } else { that._l = entry = { i: index = fastKey(key, true), // <- index k: key, // <- key v: value, // <- value p: prev = that._l, // <- previous entry n: undefined, // <- next entry r: false // <- removed }; if(!that._f)that._f = entry; if(prev)prev.n = entry; that[SIZE]++; // add to index if(index !== 'F')that._i[index] = entry; } return that; }, getEntry: getEntry, setStrong: function(C, NAME, IS_MAP){ // add .keys, .values, .entries, [@@iterator] // 23.1.3.4, 23.1.3.8, 23.1.3.11, 23.1.3.12, 23.2.3.5, 23.2.3.8, 23.2.3.10, 23.2.3.11 $iterDefine(C, NAME, function(iterated, kind){ this._t = iterated; // target this._k = kind; // kind this._l = undefined; // previous }, function(){ var that = this , kind = that._k , entry = that._l; // revert to the last existing entry while(entry && entry.r)entry = entry.p; // get next entry if(!that._t || !(that._l = entry = entry ? entry.n : that._t._f)){ // or finish the iteration that._t = undefined; return step(1); } // return step by kind if(kind == 'keys' )return step(0, entry.k); if(kind == 'values')return step(0, entry.v); return step(0, [entry.k, entry.v]); }, IS_MAP ? 'entries' : 'values' , !IS_MAP, true); // add [@@species], 23.1.2.2, 23.2.2.2 setSpecies(NAME); } };core-js-2.4.1/modules/_collection-to-json.js000066400000000000000000000004711274277553300207700ustar00rootroot00000000000000// https://github.com/DavidBruant/Map-Set.prototype.toJSON var classof = require('./_classof') , from = require('./_array-from-iterable'); module.exports = function(NAME){ return function toJSON(){ if(classof(this) != NAME)throw TypeError(NAME + "#toJSON isn't generic"); return from(this); }; };core-js-2.4.1/modules/_collection-weak.js000066400000000000000000000052061274277553300203270ustar00rootroot00000000000000'use strict'; var redefineAll = require('./_redefine-all') , getWeak = require('./_meta').getWeak , anObject = require('./_an-object') , isObject = require('./_is-object') , anInstance = require('./_an-instance') , forOf = require('./_for-of') , createArrayMethod = require('./_array-methods') , $has = require('./_has') , arrayFind = createArrayMethod(5) , arrayFindIndex = createArrayMethod(6) , id = 0; // fallback for uncaught frozen keys var uncaughtFrozenStore = function(that){ return that._l || (that._l = new UncaughtFrozenStore); }; var UncaughtFrozenStore = function(){ this.a = []; }; var findUncaughtFrozen = function(store, key){ return arrayFind(store.a, function(it){ return it[0] === key; }); }; UncaughtFrozenStore.prototype = { get: function(key){ var entry = findUncaughtFrozen(this, key); if(entry)return entry[1]; }, has: function(key){ return !!findUncaughtFrozen(this, key); }, set: function(key, value){ var entry = findUncaughtFrozen(this, key); if(entry)entry[1] = value; else this.a.push([key, value]); }, 'delete': function(key){ var index = arrayFindIndex(this.a, function(it){ return it[0] === key; }); if(~index)this.a.splice(index, 1); return !!~index; } }; module.exports = { getConstructor: function(wrapper, NAME, IS_MAP, ADDER){ var C = wrapper(function(that, iterable){ anInstance(that, C, NAME, '_i'); that._i = id++; // collection id that._l = undefined; // leak store for uncaught frozen objects if(iterable != undefined)forOf(iterable, IS_MAP, that[ADDER], that); }); redefineAll(C.prototype, { // 23.3.3.2 WeakMap.prototype.delete(key) // 23.4.3.3 WeakSet.prototype.delete(value) 'delete': function(key){ if(!isObject(key))return false; var data = getWeak(key); if(data === true)return uncaughtFrozenStore(this)['delete'](key); return data && $has(data, this._i) && delete data[this._i]; }, // 23.3.3.4 WeakMap.prototype.has(key) // 23.4.3.4 WeakSet.prototype.has(value) has: function has(key){ if(!isObject(key))return false; var data = getWeak(key); if(data === true)return uncaughtFrozenStore(this).has(key); return data && $has(data, this._i); } }); return C; }, def: function(that, key, value){ var data = getWeak(anObject(key), true); if(data === true)uncaughtFrozenStore(that).set(key, value); else data[that._i] = value; return that; }, ufstore: uncaughtFrozenStore };core-js-2.4.1/modules/_collection.js000066400000000000000000000065101274277553300174010ustar00rootroot00000000000000'use strict'; var global = require('./_global') , $export = require('./_export') , redefine = require('./_redefine') , redefineAll = require('./_redefine-all') , meta = require('./_meta') , forOf = require('./_for-of') , anInstance = require('./_an-instance') , isObject = require('./_is-object') , fails = require('./_fails') , $iterDetect = require('./_iter-detect') , setToStringTag = require('./_set-to-string-tag') , inheritIfRequired = require('./_inherit-if-required'); module.exports = function(NAME, wrapper, methods, common, IS_MAP, IS_WEAK){ var Base = global[NAME] , C = Base , ADDER = IS_MAP ? 'set' : 'add' , proto = C && C.prototype , O = {}; var fixMethod = function(KEY){ var fn = proto[KEY]; redefine(proto, KEY, KEY == 'delete' ? function(a){ return IS_WEAK && !isObject(a) ? false : fn.call(this, a === 0 ? 0 : a); } : KEY == 'has' ? function has(a){ return IS_WEAK && !isObject(a) ? false : fn.call(this, a === 0 ? 0 : a); } : KEY == 'get' ? function get(a){ return IS_WEAK && !isObject(a) ? undefined : fn.call(this, a === 0 ? 0 : a); } : KEY == 'add' ? function add(a){ fn.call(this, a === 0 ? 0 : a); return this; } : function set(a, b){ fn.call(this, a === 0 ? 0 : a, b); return this; } ); }; if(typeof C != 'function' || !(IS_WEAK || proto.forEach && !fails(function(){ new C().entries().next(); }))){ // create collection constructor C = common.getConstructor(wrapper, NAME, IS_MAP, ADDER); redefineAll(C.prototype, methods); meta.NEED = true; } else { var instance = new C // early implementations not supports chaining , HASNT_CHAINING = instance[ADDER](IS_WEAK ? {} : -0, 1) != instance // V8 ~ Chromium 40- weak-collections throws on primitives, but should return false , THROWS_ON_PRIMITIVES = fails(function(){ instance.has(1); }) // most early implementations doesn't supports iterables, most modern - not close it correctly , ACCEPT_ITERABLES = $iterDetect(function(iter){ new C(iter); }) // eslint-disable-line no-new // for early implementations -0 and +0 not the same , BUGGY_ZERO = !IS_WEAK && fails(function(){ // V8 ~ Chromium 42- fails only with 5+ elements var $instance = new C() , index = 5; while(index--)$instance[ADDER](index, index); return !$instance.has(-0); }); if(!ACCEPT_ITERABLES){ C = wrapper(function(target, iterable){ anInstance(target, C, NAME); var that = inheritIfRequired(new Base, target, C); if(iterable != undefined)forOf(iterable, IS_MAP, that[ADDER], that); return that; }); C.prototype = proto; proto.constructor = C; } if(THROWS_ON_PRIMITIVES || BUGGY_ZERO){ fixMethod('delete'); fixMethod('has'); IS_MAP && fixMethod('get'); } if(BUGGY_ZERO || HASNT_CHAINING)fixMethod(ADDER); // weak collections should not contains .clear method if(IS_WEAK && proto.clear)delete proto.clear; } setToStringTag(C, NAME); O[NAME] = C; $export($export.G + $export.W + $export.F * (C != Base), O); if(!IS_WEAK)common.setStrong(C, NAME, IS_MAP); return C; };core-js-2.4.1/modules/_core.js000066400000000000000000000001651274277553300161760ustar00rootroot00000000000000var core = module.exports = {version: '2.4.0'}; if(typeof __e == 'number')__e = core; // eslint-disable-line no-undefcore-js-2.4.1/modules/_create-property.js000066400000000000000000000004161274277553300203720ustar00rootroot00000000000000'use strict'; var $defineProperty = require('./_object-dp') , createDesc = require('./_property-desc'); module.exports = function(object, index, value){ if(index in object)$defineProperty.f(object, index, createDesc(0, value)); else object[index] = value; };core-js-2.4.1/modules/_ctx.js000066400000000000000000000007711274277553300160470ustar00rootroot00000000000000// optional / simple context binding var aFunction = require('./_a-function'); module.exports = function(fn, that, length){ aFunction(fn); if(that === undefined)return fn; switch(length){ case 1: return function(a){ return fn.call(that, a); }; case 2: return function(a, b){ return fn.call(that, a, b); }; case 3: return function(a, b, c){ return fn.call(that, a, b, c); }; } return function(/* ...args */){ return fn.apply(that, arguments); }; };core-js-2.4.1/modules/_date-to-primitive.js000066400000000000000000000004761274277553300206160ustar00rootroot00000000000000'use strict'; var anObject = require('./_an-object') , toPrimitive = require('./_to-primitive') , NUMBER = 'number'; module.exports = function(hint){ if(hint !== 'string' && hint !== NUMBER && hint !== 'default')throw TypeError('Incorrect hint'); return toPrimitive(anObject(this), hint != NUMBER); };core-js-2.4.1/modules/_defined.js000066400000000000000000000002351274277553300166420ustar00rootroot00000000000000// 7.2.1 RequireObjectCoercible(argument) module.exports = function(it){ if(it == undefined)throw TypeError("Can't call method on " + it); return it; };core-js-2.4.1/modules/_descriptors.js000066400000000000000000000002611274277553300176040ustar00rootroot00000000000000// Thank's IE8 for his funny defineProperty module.exports = !require('./_fails')(function(){ return Object.defineProperty({}, 'a', {get: function(){ return 7; }}).a != 7; });core-js-2.4.1/modules/_dom-create.js000066400000000000000000000004361274277553300172670ustar00rootroot00000000000000var isObject = require('./_is-object') , document = require('./_global').document // in old IE typeof document.createElement is 'object' , is = isObject(document) && isObject(document.createElement); module.exports = function(it){ return is ? document.createElement(it) : {}; };core-js-2.4.1/modules/_entry-virtual.js000066400000000000000000000002131274277553300200650ustar00rootroot00000000000000var core = require('./_core'); module.exports = function(CONSTRUCTOR){ var C = core[CONSTRUCTOR]; return (C.virtual || C.prototype); };core-js-2.4.1/modules/_enum-bug-keys.js000066400000000000000000000002371274277553300177360ustar00rootroot00000000000000// IE 8- don't enum bug keys module.exports = ( 'constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf' ).split(',');core-js-2.4.1/modules/_enum-keys.js000066400000000000000000000007301274277553300171610ustar00rootroot00000000000000// all enumerable object keys, includes symbols var getKeys = require('./_object-keys') , gOPS = require('./_object-gops') , pIE = require('./_object-pie'); module.exports = function(it){ var result = getKeys(it) , getSymbols = gOPS.f; if(getSymbols){ var symbols = getSymbols(it) , isEnum = pIE.f , i = 0 , key; while(symbols.length > i)if(isEnum.call(it, key = symbols[i++]))result.push(key); } return result; };core-js-2.4.1/modules/_export.js000066400000000000000000000031051274277553300165640ustar00rootroot00000000000000var global = require('./_global') , core = require('./_core') , hide = require('./_hide') , redefine = require('./_redefine') , ctx = require('./_ctx') , PROTOTYPE = 'prototype'; var $export = function(type, name, source){ var IS_FORCED = type & $export.F , IS_GLOBAL = type & $export.G , IS_STATIC = type & $export.S , IS_PROTO = type & $export.P , IS_BIND = type & $export.B , target = IS_GLOBAL ? global : IS_STATIC ? global[name] || (global[name] = {}) : (global[name] || {})[PROTOTYPE] , exports = IS_GLOBAL ? core : core[name] || (core[name] = {}) , expProto = exports[PROTOTYPE] || (exports[PROTOTYPE] = {}) , key, own, out, exp; if(IS_GLOBAL)source = name; for(key in source){ // contains in native own = !IS_FORCED && target && target[key] !== undefined; // export native or passed out = (own ? target : source)[key]; // bind timers to global for call from export context exp = IS_BIND && own ? ctx(out, global) : IS_PROTO && typeof out == 'function' ? ctx(Function.call, out) : out; // extend global if(target)redefine(target, key, out, type & $export.U); // export if(exports[key] != out)hide(exports, key, exp); if(IS_PROTO && expProto[key] != out)expProto[key] = out; } }; global.core = core; // type bitmap $export.F = 1; // forced $export.G = 2; // global $export.S = 4; // static $export.P = 8; // proto $export.B = 16; // bind $export.W = 32; // wrap $export.U = 64; // safe $export.R = 128; // real proto method for `library` module.exports = $export;core-js-2.4.1/modules/_fails-is-regexp.js000066400000000000000000000003641274277553300202460ustar00rootroot00000000000000var MATCH = require('./_wks')('match'); module.exports = function(KEY){ var re = /./; try { '/./'[KEY](re); } catch(e){ try { re[MATCH] = false; return !'/./'[KEY](re); } catch(f){ /* empty */ } } return true; };core-js-2.4.1/modules/_fails.js000066400000000000000000000001431274277553300163400ustar00rootroot00000000000000module.exports = function(exec){ try { return !!exec(); } catch(e){ return true; } };core-js-2.4.1/modules/_fix-re-wks.js000066400000000000000000000016601274277553300172430ustar00rootroot00000000000000'use strict'; var hide = require('./_hide') , redefine = require('./_redefine') , fails = require('./_fails') , defined = require('./_defined') , wks = require('./_wks'); module.exports = function(KEY, length, exec){ var SYMBOL = wks(KEY) , fns = exec(defined, SYMBOL, ''[KEY]) , strfn = fns[0] , rxfn = fns[1]; if(fails(function(){ var O = {}; O[SYMBOL] = function(){ return 7; }; return ''[KEY](O) != 7; })){ redefine(String.prototype, KEY, strfn); hide(RegExp.prototype, SYMBOL, length == 2 // 21.2.5.8 RegExp.prototype[@@replace](string, replaceValue) // 21.2.5.11 RegExp.prototype[@@split](string, limit) ? function(string, arg){ return rxfn.call(string, this, arg); } // 21.2.5.6 RegExp.prototype[@@match](string) // 21.2.5.9 RegExp.prototype[@@search](string) : function(string){ return rxfn.call(string, this); } ); } };core-js-2.4.1/modules/_flags.js000066400000000000000000000005671274277553300163500ustar00rootroot00000000000000'use strict'; // 21.2.5.3 get RegExp.prototype.flags var anObject = require('./_an-object'); module.exports = function(){ var that = anObject(this) , result = ''; if(that.global) result += 'g'; if(that.ignoreCase) result += 'i'; if(that.multiline) result += 'm'; if(that.unicode) result += 'u'; if(that.sticky) result += 'y'; return result; };core-js-2.4.1/modules/_for-of.js000066400000000000000000000022471274277553300164410ustar00rootroot00000000000000var ctx = require('./_ctx') , call = require('./_iter-call') , isArrayIter = require('./_is-array-iter') , anObject = require('./_an-object') , toLength = require('./_to-length') , getIterFn = require('./core.get-iterator-method') , BREAK = {} , RETURN = {}; var exports = module.exports = function(iterable, entries, fn, that, ITERATOR){ var iterFn = ITERATOR ? function(){ return iterable; } : getIterFn(iterable) , f = ctx(fn, that, entries ? 2 : 1) , index = 0 , length, step, iterator, result; if(typeof iterFn != 'function')throw TypeError(iterable + ' is not iterable!'); // fast case for arrays with default iterator if(isArrayIter(iterFn))for(length = toLength(iterable.length); length > index; index++){ result = entries ? f(anObject(step = iterable[index])[0], step[1]) : f(iterable[index]); if(result === BREAK || result === RETURN)return result; } else for(iterator = iterFn.call(iterable); !(step = iterator.next()).done; ){ result = call(iterator, f, step.value, entries); if(result === BREAK || result === RETURN)return result; } }; exports.BREAK = BREAK; exports.RETURN = RETURN;core-js-2.4.1/modules/_global.js000066400000000000000000000005021274277553300165010ustar00rootroot00000000000000// https://github.com/zloirock/core-js/issues/86#issuecomment-115759028 var global = module.exports = typeof window != 'undefined' && window.Math == Math ? window : typeof self != 'undefined' && self.Math == Math ? self : Function('return this')(); if(typeof __g == 'number')__g = global; // eslint-disable-line no-undefcore-js-2.4.1/modules/_has.js000066400000000000000000000001651274277553300160210ustar00rootroot00000000000000var hasOwnProperty = {}.hasOwnProperty; module.exports = function(it, key){ return hasOwnProperty.call(it, key); };core-js-2.4.1/modules/_hide.js000066400000000000000000000004401274277553300161530ustar00rootroot00000000000000var dP = require('./_object-dp') , createDesc = require('./_property-desc'); module.exports = require('./_descriptors') ? function(object, key, value){ return dP.f(object, key, createDesc(1, value)); } : function(object, key, value){ object[key] = value; return object; };core-js-2.4.1/modules/_html.js000066400000000000000000000001131274277553300162030ustar00rootroot00000000000000module.exports = require('./_global').document && document.documentElement;core-js-2.4.1/modules/_ie8-dom-define.js000066400000000000000000000003001274277553300177270ustar00rootroot00000000000000module.exports = !require('./_descriptors') && !require('./_fails')(function(){ return Object.defineProperty(require('./_dom-create')('div'), 'a', {get: function(){ return 7; }}).a != 7; });core-js-2.4.1/modules/_inherit-if-required.js000066400000000000000000000005131274277553300211170ustar00rootroot00000000000000var isObject = require('./_is-object') , setPrototypeOf = require('./_set-proto').set; module.exports = function(that, target, C){ var P, S = target.constructor; if(S !== C && typeof S == 'function' && (P = S.prototype) !== C.prototype && isObject(P) && setPrototypeOf){ setPrototypeOf(that, P); } return that; };core-js-2.4.1/modules/_invoke.js000066400000000000000000000013051274277553300165360ustar00rootroot00000000000000// fast apply, http://jsperf.lnkit.com/fast-apply/5 module.exports = function(fn, args, that){ var un = that === undefined; switch(args.length){ case 0: return un ? fn() : fn.call(that); case 1: return un ? fn(args[0]) : fn.call(that, args[0]); case 2: return un ? fn(args[0], args[1]) : fn.call(that, args[0], args[1]); case 3: return un ? fn(args[0], args[1], args[2]) : fn.call(that, args[0], args[1], args[2]); case 4: return un ? fn(args[0], args[1], args[2], args[3]) : fn.call(that, args[0], args[1], args[2], args[3]); } return fn.apply(that, args); };core-js-2.4.1/modules/_iobject.js000066400000000000000000000003541274277553300166650ustar00rootroot00000000000000// fallback for non-array-like ES3 and non-enumerable old V8 strings var cof = require('./_cof'); module.exports = Object('z').propertyIsEnumerable(0) ? Object : function(it){ return cof(it) == 'String' ? it.split('') : Object(it); };core-js-2.4.1/modules/_is-array-iter.js000066400000000000000000000004251274277553300177350ustar00rootroot00000000000000// check on default Array iterator var Iterators = require('./_iterators') , ITERATOR = require('./_wks')('iterator') , ArrayProto = Array.prototype; module.exports = function(it){ return it !== undefined && (Iterators.Array === it || ArrayProto[ITERATOR] === it); };core-js-2.4.1/modules/_is-array.js000066400000000000000000000002211274277553300167660ustar00rootroot00000000000000// 7.2.2 IsArray(argument) var cof = require('./_cof'); module.exports = Array.isArray || function isArray(arg){ return cof(arg) == 'Array'; };core-js-2.4.1/modules/_is-integer.js000066400000000000000000000003161274277553300173120ustar00rootroot00000000000000// 20.1.2.3 Number.isInteger(number) var isObject = require('./_is-object') , floor = Math.floor; module.exports = function isInteger(it){ return !isObject(it) && isFinite(it) && floor(it) === it; };core-js-2.4.1/modules/_is-object.js000066400000000000000000000001531274277553300171220ustar00rootroot00000000000000module.exports = function(it){ return typeof it === 'object' ? it !== null : typeof it === 'function'; };core-js-2.4.1/modules/_is-regexp.js000066400000000000000000000004441274277553300171510ustar00rootroot00000000000000// 7.2.8 IsRegExp(argument) var isObject = require('./_is-object') , cof = require('./_cof') , MATCH = require('./_wks')('match'); module.exports = function(it){ var isRegExp; return isObject(it) && ((isRegExp = it[MATCH]) !== undefined ? !!isRegExp : cof(it) == 'RegExp'); };core-js-2.4.1/modules/_iter-call.js000066400000000000000000000006231274277553300171210ustar00rootroot00000000000000// call something on iterator step with safe closing on error var anObject = require('./_an-object'); module.exports = function(iterator, fn, value, entries){ try { return entries ? fn(anObject(value)[0], value[1]) : fn(value); // 7.4.6 IteratorClose(iterator, completion) } catch(e){ var ret = iterator['return']; if(ret !== undefined)anObject(ret.call(iterator)); throw e; } };core-js-2.4.1/modules/_iter-create.js000066400000000000000000000010201274277553300174410ustar00rootroot00000000000000'use strict'; var create = require('./_object-create') , descriptor = require('./_property-desc') , setToStringTag = require('./_set-to-string-tag') , IteratorPrototype = {}; // 25.1.2.1.1 %IteratorPrototype%[@@iterator]() require('./_hide')(IteratorPrototype, require('./_wks')('iterator'), function(){ return this; }); module.exports = function(Constructor, NAME, next){ Constructor.prototype = create(IteratorPrototype, {next: descriptor(1, next)}); setToStringTag(Constructor, NAME + ' Iterator'); };core-js-2.4.1/modules/_iter-define.js000066400000000000000000000054101274277553300174370ustar00rootroot00000000000000'use strict'; var LIBRARY = require('./_library') , $export = require('./_export') , redefine = require('./_redefine') , hide = require('./_hide') , has = require('./_has') , Iterators = require('./_iterators') , $iterCreate = require('./_iter-create') , setToStringTag = require('./_set-to-string-tag') , getPrototypeOf = require('./_object-gpo') , ITERATOR = require('./_wks')('iterator') , BUGGY = !([].keys && 'next' in [].keys()) // Safari has buggy iterators w/o `next` , FF_ITERATOR = '@@iterator' , KEYS = 'keys' , VALUES = 'values'; var returnThis = function(){ return this; }; module.exports = function(Base, NAME, Constructor, next, DEFAULT, IS_SET, FORCED){ $iterCreate(Constructor, NAME, next); var getMethod = function(kind){ if(!BUGGY && kind in proto)return proto[kind]; switch(kind){ case KEYS: return function keys(){ return new Constructor(this, kind); }; case VALUES: return function values(){ return new Constructor(this, kind); }; } return function entries(){ return new Constructor(this, kind); }; }; var TAG = NAME + ' Iterator' , DEF_VALUES = DEFAULT == VALUES , VALUES_BUG = false , proto = Base.prototype , $native = proto[ITERATOR] || proto[FF_ITERATOR] || DEFAULT && proto[DEFAULT] , $default = $native || getMethod(DEFAULT) , $entries = DEFAULT ? !DEF_VALUES ? $default : getMethod('entries') : undefined , $anyNative = NAME == 'Array' ? proto.entries || $native : $native , methods, key, IteratorPrototype; // Fix native if($anyNative){ IteratorPrototype = getPrototypeOf($anyNative.call(new Base)); if(IteratorPrototype !== Object.prototype){ // Set @@toStringTag to native iterators setToStringTag(IteratorPrototype, TAG, true); // fix for some old engines if(!LIBRARY && !has(IteratorPrototype, ITERATOR))hide(IteratorPrototype, ITERATOR, returnThis); } } // fix Array#{values, @@iterator}.name in V8 / FF if(DEF_VALUES && $native && $native.name !== VALUES){ VALUES_BUG = true; $default = function values(){ return $native.call(this); }; } // Define iterator if((!LIBRARY || FORCED) && (BUGGY || VALUES_BUG || !proto[ITERATOR])){ hide(proto, ITERATOR, $default); } // Plug for library Iterators[NAME] = $default; Iterators[TAG] = returnThis; if(DEFAULT){ methods = { values: DEF_VALUES ? $default : getMethod(VALUES), keys: IS_SET ? $default : getMethod(KEYS), entries: $entries }; if(FORCED)for(key in methods){ if(!(key in proto))redefine(proto, key, methods[key]); } else $export($export.P + $export.F * (BUGGY || VALUES_BUG), NAME, methods); } return methods; };core-js-2.4.1/modules/_iter-detect.js000066400000000000000000000011061274277553300174530ustar00rootroot00000000000000var ITERATOR = require('./_wks')('iterator') , SAFE_CLOSING = false; try { var riter = [7][ITERATOR](); riter['return'] = function(){ SAFE_CLOSING = true; }; Array.from(riter, function(){ throw 2; }); } catch(e){ /* empty */ } module.exports = function(exec, skipClosing){ if(!skipClosing && !SAFE_CLOSING)return false; var safe = false; try { var arr = [7] , iter = arr[ITERATOR](); iter.next = function(){ return {done: safe = true}; }; arr[ITERATOR] = function(){ return iter; }; exec(arr); } catch(e){ /* empty */ } return safe; };core-js-2.4.1/modules/_iter-step.js000066400000000000000000000001211274277553300171520ustar00rootroot00000000000000module.exports = function(done, value){ return {value: value, done: !!done}; };core-js-2.4.1/modules/_iterators.js000066400000000000000000000000241274277553300172540ustar00rootroot00000000000000module.exports = {};core-js-2.4.1/modules/_keyof.js000066400000000000000000000004631274277553300163640ustar00rootroot00000000000000var getKeys = require('./_object-keys') , toIObject = require('./_to-iobject'); module.exports = function(object, el){ var O = toIObject(object) , keys = getKeys(O) , length = keys.length , index = 0 , key; while(length > index)if(O[key = keys[index++]] === el)return key; };core-js-2.4.1/modules/_library.js000066400000000000000000000000271274277553300167070ustar00rootroot00000000000000module.exports = false;core-js-2.4.1/modules/_math-expm1.js000066400000000000000000000005251274277553300172270ustar00rootroot00000000000000// 20.2.2.14 Math.expm1(x) var $expm1 = Math.expm1; module.exports = (!$expm1 // Old FF bug || $expm1(10) > 22025.465794806719 || $expm1(10) < 22025.4657948067165168 // Tor Browser bug || $expm1(-2e-17) != -2e-17 ) ? function expm1(x){ return (x = +x) == 0 ? x : x > -1e-6 && x < 1e-6 ? x + x * x / 2 : Math.exp(x) - 1; } : $expm1;core-js-2.4.1/modules/_math-log1p.js000066400000000000000000000002301274277553300172100ustar00rootroot00000000000000// 20.2.2.20 Math.log1p(x) module.exports = Math.log1p || function log1p(x){ return (x = +x) > -1e-8 && x < 1e-8 ? x - x * x / 2 : Math.log(1 + x); };core-js-2.4.1/modules/_math-sign.js000066400000000000000000000002031274277553300171260ustar00rootroot00000000000000// 20.2.2.28 Math.sign(x) module.exports = Math.sign || function sign(x){ return (x = +x) == 0 || x != x ? x : x < 0 ? -1 : 1; };core-js-2.4.1/modules/_meta.js000066400000000000000000000030161274277553300161720ustar00rootroot00000000000000var META = require('./_uid')('meta') , isObject = require('./_is-object') , has = require('./_has') , setDesc = require('./_object-dp').f , id = 0; var isExtensible = Object.isExtensible || function(){ return true; }; var FREEZE = !require('./_fails')(function(){ return isExtensible(Object.preventExtensions({})); }); var setMeta = function(it){ setDesc(it, META, {value: { i: 'O' + ++id, // object ID w: {} // weak collections IDs }}); }; var fastKey = function(it, create){ // return primitive with prefix if(!isObject(it))return typeof it == 'symbol' ? it : (typeof it == 'string' ? 'S' : 'P') + it; if(!has(it, META)){ // can't set metadata to uncaught frozen object if(!isExtensible(it))return 'F'; // not necessary to add metadata if(!create)return 'E'; // add missing metadata setMeta(it); // return object ID } return it[META].i; }; var getWeak = function(it, create){ if(!has(it, META)){ // can't set metadata to uncaught frozen object if(!isExtensible(it))return true; // not necessary to add metadata if(!create)return false; // add missing metadata setMeta(it); // return hash weak collections IDs } return it[META].w; }; // add metadata on freeze-family methods calling var onFreeze = function(it){ if(FREEZE && meta.NEED && isExtensible(it) && !has(it, META))setMeta(it); return it; }; var meta = module.exports = { KEY: META, NEED: false, fastKey: fastKey, getWeak: getWeak, onFreeze: onFreeze };core-js-2.4.1/modules/_metadata.js000066400000000000000000000033641274277553300170320ustar00rootroot00000000000000var Map = require('./es6.map') , $export = require('./_export') , shared = require('./_shared')('metadata') , store = shared.store || (shared.store = new (require('./es6.weak-map'))); var getOrCreateMetadataMap = function(target, targetKey, create){ var targetMetadata = store.get(target); if(!targetMetadata){ if(!create)return undefined; store.set(target, targetMetadata = new Map); } var keyMetadata = targetMetadata.get(targetKey); if(!keyMetadata){ if(!create)return undefined; targetMetadata.set(targetKey, keyMetadata = new Map); } return keyMetadata; }; var ordinaryHasOwnMetadata = function(MetadataKey, O, P){ var metadataMap = getOrCreateMetadataMap(O, P, false); return metadataMap === undefined ? false : metadataMap.has(MetadataKey); }; var ordinaryGetOwnMetadata = function(MetadataKey, O, P){ var metadataMap = getOrCreateMetadataMap(O, P, false); return metadataMap === undefined ? undefined : metadataMap.get(MetadataKey); }; var ordinaryDefineOwnMetadata = function(MetadataKey, MetadataValue, O, P){ getOrCreateMetadataMap(O, P, true).set(MetadataKey, MetadataValue); }; var ordinaryOwnMetadataKeys = function(target, targetKey){ var metadataMap = getOrCreateMetadataMap(target, targetKey, false) , keys = []; if(metadataMap)metadataMap.forEach(function(_, key){ keys.push(key); }); return keys; }; var toMetaKey = function(it){ return it === undefined || typeof it == 'symbol' ? it : String(it); }; var exp = function(O){ $export($export.S, 'Reflect', O); }; module.exports = { store: store, map: getOrCreateMetadataMap, has: ordinaryHasOwnMetadata, get: ordinaryGetOwnMetadata, set: ordinaryDefineOwnMetadata, keys: ordinaryOwnMetadataKeys, key: toMetaKey, exp: exp };core-js-2.4.1/modules/_microtask.js000066400000000000000000000033241274277553300172420ustar00rootroot00000000000000var global = require('./_global') , macrotask = require('./_task').set , Observer = global.MutationObserver || global.WebKitMutationObserver , process = global.process , Promise = global.Promise , isNode = require('./_cof')(process) == 'process'; module.exports = function(){ var head, last, notify; var flush = function(){ var parent, fn; if(isNode && (parent = process.domain))parent.exit(); while(head){ fn = head.fn; head = head.next; try { fn(); } catch(e){ if(head)notify(); else last = undefined; throw e; } } last = undefined; if(parent)parent.enter(); }; // Node.js if(isNode){ notify = function(){ process.nextTick(flush); }; // browsers with MutationObserver } else if(Observer){ var toggle = true , node = document.createTextNode(''); new Observer(flush).observe(node, {characterData: true}); // eslint-disable-line no-new notify = function(){ node.data = toggle = !toggle; }; // environments with maybe non-completely correct, but existent Promise } else if(Promise && Promise.resolve){ var promise = Promise.resolve(); notify = function(){ promise.then(flush); }; // for other environments - macrotask based on: // - setImmediate // - MessageChannel // - window.postMessag // - onreadystatechange // - setTimeout } else { notify = function(){ // strange IE + webpack dev server bug - use .call(global) macrotask.call(global, flush); }; } return function(fn){ var task = {fn: fn, next: undefined}; if(last)last.next = task; if(!head){ head = task; notify(); } last = task; }; };core-js-2.4.1/modules/_object-assign.js000066400000000000000000000022111274277553300177700ustar00rootroot00000000000000'use strict'; // 19.1.2.1 Object.assign(target, source, ...) var getKeys = require('./_object-keys') , gOPS = require('./_object-gops') , pIE = require('./_object-pie') , toObject = require('./_to-object') , IObject = require('./_iobject') , $assign = Object.assign; // should work with symbols and should have deterministic property order (V8 bug) module.exports = !$assign || require('./_fails')(function(){ var A = {} , B = {} , S = Symbol() , K = 'abcdefghijklmnopqrst'; A[S] = 7; K.split('').forEach(function(k){ B[k] = k; }); return $assign({}, A)[S] != 7 || Object.keys($assign({}, B)).join('') != K; }) ? function assign(target, source){ // eslint-disable-line no-unused-vars var T = toObject(target) , aLen = arguments.length , index = 1 , getSymbols = gOPS.f , isEnum = pIE.f; while(aLen > index){ var S = IObject(arguments[index++]) , keys = getSymbols ? getKeys(S).concat(getSymbols(S)) : getKeys(S) , length = keys.length , j = 0 , key; while(length > j)if(isEnum.call(S, key = keys[j++]))T[key] = S[key]; } return T; } : $assign;core-js-2.4.1/modules/_object-create.js000066400000000000000000000027601274277553300177600ustar00rootroot00000000000000// 19.1.2.2 / 15.2.3.5 Object.create(O [, Properties]) var anObject = require('./_an-object') , dPs = require('./_object-dps') , enumBugKeys = require('./_enum-bug-keys') , IE_PROTO = require('./_shared-key')('IE_PROTO') , Empty = function(){ /* empty */ } , PROTOTYPE = 'prototype'; // Create object with fake `null` prototype: use iframe Object with cleared prototype var createDict = function(){ // Thrash, waste and sodomy: IE GC bug var iframe = require('./_dom-create')('iframe') , i = enumBugKeys.length , lt = '<' , gt = '>' , iframeDocument; iframe.style.display = 'none'; require('./_html').appendChild(iframe); iframe.src = 'javascript:'; // eslint-disable-line no-script-url // createDict = iframe.contentWindow.Object; // html.removeChild(iframe); iframeDocument = iframe.contentWindow.document; iframeDocument.open(); iframeDocument.write(lt + 'script' + gt + 'document.F=Object' + lt + '/script' + gt); iframeDocument.close(); createDict = iframeDocument.F; while(i--)delete createDict[PROTOTYPE][enumBugKeys[i]]; return createDict(); }; module.exports = Object.create || function create(O, Properties){ var result; if(O !== null){ Empty[PROTOTYPE] = anObject(O); result = new Empty; Empty[PROTOTYPE] = null; // add "__proto__" for Object.getPrototypeOf polyfill result[IE_PROTO] = O; } else result = createDict(); return Properties === undefined ? result : dPs(result, Properties); }; core-js-2.4.1/modules/_object-define.js000066400000000000000000000006041274277553300177420ustar00rootroot00000000000000var dP = require('./_object-dp') , gOPD = require('./_object-gopd') , ownKeys = require('./_own-keys') , toIObject = require('./_to-iobject'); module.exports = function define(target, mixin){ var keys = ownKeys(toIObject(mixin)) , length = keys.length , i = 0, key; while(length > i)dP.f(target, key = keys[i++], gOPD.f(mixin, key)); return target; };core-js-2.4.1/modules/_object-dp.js000066400000000000000000000011401274277553300171070ustar00rootroot00000000000000var anObject = require('./_an-object') , IE8_DOM_DEFINE = require('./_ie8-dom-define') , toPrimitive = require('./_to-primitive') , dP = Object.defineProperty; exports.f = require('./_descriptors') ? Object.defineProperty : function defineProperty(O, P, Attributes){ anObject(O); P = toPrimitive(P, true); anObject(Attributes); if(IE8_DOM_DEFINE)try { return dP(O, P, Attributes); } catch(e){ /* empty */ } if('get' in Attributes || 'set' in Attributes)throw TypeError('Accessors not supported!'); if('value' in Attributes)O[P] = Attributes.value; return O; };core-js-2.4.1/modules/_object-dps.js000066400000000000000000000006241274277553300173000ustar00rootroot00000000000000var dP = require('./_object-dp') , anObject = require('./_an-object') , getKeys = require('./_object-keys'); module.exports = require('./_descriptors') ? Object.defineProperties : function defineProperties(O, Properties){ anObject(O); var keys = getKeys(Properties) , length = keys.length , i = 0 , P; while(length > i)dP.f(O, P = keys[i++], Properties[P]); return O; };core-js-2.4.1/modules/_object-forced-pam.js000066400000000000000000000004341274277553300205260ustar00rootroot00000000000000// Forced replacement prototype accessors methods module.exports = require('./_library')|| !require('./_fails')(function(){ var K = Math.random(); // In FF throws only define methods __defineSetter__.call(null, K, function(){ /* empty */}); delete require('./_global')[K]; });core-js-2.4.1/modules/_object-gopd.js000066400000000000000000000011371274277553300174430ustar00rootroot00000000000000var pIE = require('./_object-pie') , createDesc = require('./_property-desc') , toIObject = require('./_to-iobject') , toPrimitive = require('./_to-primitive') , has = require('./_has') , IE8_DOM_DEFINE = require('./_ie8-dom-define') , gOPD = Object.getOwnPropertyDescriptor; exports.f = require('./_descriptors') ? gOPD : function getOwnPropertyDescriptor(O, P){ O = toIObject(O); P = toPrimitive(P, true); if(IE8_DOM_DEFINE)try { return gOPD(O, P); } catch(e){ /* empty */ } if(has(O, P))return createDesc(!pIE.f.call(O, P), O[P]); };core-js-2.4.1/modules/_object-gopn-ext.js000066400000000000000000000011331274277553300202470ustar00rootroot00000000000000// fallback for IE11 buggy Object.getOwnPropertyNames with iframe and window var toIObject = require('./_to-iobject') , gOPN = require('./_object-gopn').f , toString = {}.toString; var windowNames = typeof window == 'object' && window && Object.getOwnPropertyNames ? Object.getOwnPropertyNames(window) : []; var getWindowNames = function(it){ try { return gOPN(it); } catch(e){ return windowNames.slice(); } }; module.exports.f = function getOwnPropertyNames(it){ return windowNames && toString.call(it) == '[object Window]' ? getWindowNames(it) : gOPN(toIObject(it)); }; core-js-2.4.1/modules/_object-gopn.js000066400000000000000000000004421274277553300174530ustar00rootroot00000000000000// 19.1.2.7 / 15.2.3.4 Object.getOwnPropertyNames(O) var $keys = require('./_object-keys-internal') , hiddenKeys = require('./_enum-bug-keys').concat('length', 'prototype'); exports.f = Object.getOwnPropertyNames || function getOwnPropertyNames(O){ return $keys(O, hiddenKeys); };core-js-2.4.1/modules/_object-gops.js000066400000000000000000000000511274277553300174540ustar00rootroot00000000000000exports.f = Object.getOwnPropertySymbols;core-js-2.4.1/modules/_object-gpo.js000066400000000000000000000007611274277553300173010ustar00rootroot00000000000000// 19.1.2.9 / 15.2.3.2 Object.getPrototypeOf(O) var has = require('./_has') , toObject = require('./_to-object') , IE_PROTO = require('./_shared-key')('IE_PROTO') , ObjectProto = Object.prototype; module.exports = Object.getPrototypeOf || function(O){ O = toObject(O); if(has(O, IE_PROTO))return O[IE_PROTO]; if(typeof O.constructor == 'function' && O instanceof O.constructor){ return O.constructor.prototype; } return O instanceof Object ? ObjectProto : null; };core-js-2.4.1/modules/_object-keys-internal.js000066400000000000000000000010421274277553300212720ustar00rootroot00000000000000var has = require('./_has') , toIObject = require('./_to-iobject') , arrayIndexOf = require('./_array-includes')(false) , IE_PROTO = require('./_shared-key')('IE_PROTO'); module.exports = function(object, names){ var O = toIObject(object) , i = 0 , result = [] , key; for(key in O)if(key != IE_PROTO)has(O, key) && result.push(key); // Don't enum bug & hidden keys while(names.length > i)if(has(O, key = names[i++])){ ~arrayIndexOf(result, key) || result.push(key); } return result; };core-js-2.4.1/modules/_object-keys.js000066400000000000000000000003411274277553300174610ustar00rootroot00000000000000// 19.1.2.14 / 15.2.3.14 Object.keys(O) var $keys = require('./_object-keys-internal') , enumBugKeys = require('./_enum-bug-keys'); module.exports = Object.keys || function keys(O){ return $keys(O, enumBugKeys); };core-js-2.4.1/modules/_object-pie.js000066400000000000000000000000441274277553300172630ustar00rootroot00000000000000exports.f = {}.propertyIsEnumerable;core-js-2.4.1/modules/_object-sap.js000066400000000000000000000005601274277553300172740ustar00rootroot00000000000000// most Object methods by ES6 should accept primitives var $export = require('./_export') , core = require('./_core') , fails = require('./_fails'); module.exports = function(KEY, exec){ var fn = (core.Object || {})[KEY] || Object[KEY] , exp = {}; exp[KEY] = exec(fn); $export($export.S + $export.F * fails(function(){ fn(1); }), 'Object', exp); };core-js-2.4.1/modules/_object-to-array.js000066400000000000000000000007251274277553300202520ustar00rootroot00000000000000var getKeys = require('./_object-keys') , toIObject = require('./_to-iobject') , isEnum = require('./_object-pie').f; module.exports = function(isEntries){ return function(it){ var O = toIObject(it) , keys = getKeys(O) , length = keys.length , i = 0 , result = [] , key; while(length > i)if(isEnum.call(O, key = keys[i++])){ result.push(isEntries ? [key, O[key]] : O[key]); } return result; }; };core-js-2.4.1/modules/_own-keys.js000066400000000000000000000006421274277553300170220ustar00rootroot00000000000000// all object keys, includes non-enumerable and symbols var gOPN = require('./_object-gopn') , gOPS = require('./_object-gops') , anObject = require('./_an-object') , Reflect = require('./_global').Reflect; module.exports = Reflect && Reflect.ownKeys || function ownKeys(it){ var keys = gOPN.f(anObject(it)) , getSymbols = gOPS.f; return getSymbols ? keys.concat(getSymbols(it)) : keys; };core-js-2.4.1/modules/_parse-float.js000066400000000000000000000005511274277553300174620ustar00rootroot00000000000000var $parseFloat = require('./_global').parseFloat , $trim = require('./_string-trim').trim; module.exports = 1 / $parseFloat(require('./_string-ws') + '-0') !== -Infinity ? function parseFloat(str){ var string = $trim(String(str), 3) , result = $parseFloat(string); return result === 0 && string.charAt(0) == '-' ? -0 : result; } : $parseFloat;core-js-2.4.1/modules/_parse-int.js000066400000000000000000000006231274277553300171470ustar00rootroot00000000000000var $parseInt = require('./_global').parseInt , $trim = require('./_string-trim').trim , ws = require('./_string-ws') , hex = /^[\-+]?0[xX]/; module.exports = $parseInt(ws + '08') !== 8 || $parseInt(ws + '0x16') !== 22 ? function parseInt(str, radix){ var string = $trim(String(str), 3); return $parseInt(string, (radix >>> 0) || (hex.test(string) ? 16 : 10)); } : $parseInt;core-js-2.4.1/modules/_partial.js000066400000000000000000000013651274277553300167050ustar00rootroot00000000000000'use strict'; var path = require('./_path') , invoke = require('./_invoke') , aFunction = require('./_a-function'); module.exports = function(/* ...pargs */){ var fn = aFunction(this) , length = arguments.length , pargs = Array(length) , i = 0 , _ = path._ , holder = false; while(length > i)if((pargs[i] = arguments[i++]) === _)holder = true; return function(/* ...args */){ var that = this , aLen = arguments.length , j = 0, k = 0, args; if(!holder && !aLen)return invoke(fn, pargs, that); args = pargs.slice(); if(holder)for(;length > j; j++)if(args[j] === _)args[j] = arguments[k++]; while(aLen > k)args.push(arguments[k++]); return invoke(fn, args, that); }; };core-js-2.4.1/modules/_path.js000066400000000000000000000000461274277553300162000ustar00rootroot00000000000000module.exports = require('./_global');core-js-2.4.1/modules/_property-desc.js000066400000000000000000000002671274277553300200510ustar00rootroot00000000000000module.exports = function(bitmap, value){ return { enumerable : !(bitmap & 1), configurable: !(bitmap & 2), writable : !(bitmap & 4), value : value }; };core-js-2.4.1/modules/_redefine-all.js000066400000000000000000000002441274277553300175730ustar00rootroot00000000000000var redefine = require('./_redefine'); module.exports = function(target, src, safe){ for(var key in src)redefine(target, key, src[key], safe); return target; };core-js-2.4.1/modules/_redefine.js000066400000000000000000000020371274277553300170270ustar00rootroot00000000000000var global = require('./_global') , hide = require('./_hide') , has = require('./_has') , SRC = require('./_uid')('src') , TO_STRING = 'toString' , $toString = Function[TO_STRING] , TPL = ('' + $toString).split(TO_STRING); require('./_core').inspectSource = function(it){ return $toString.call(it); }; (module.exports = function(O, key, val, safe){ var isFunction = typeof val == 'function'; if(isFunction)has(val, 'name') || hide(val, 'name', key); if(O[key] === val)return; if(isFunction)has(val, SRC) || hide(val, SRC, O[key] ? '' + O[key] : TPL.join(String(key))); if(O === global){ O[key] = val; } else { if(!safe){ delete O[key]; hide(O, key, val); } else { if(O[key])O[key] = val; else hide(O, key, val); } } // add fake Function#toString for correct work wrapped methods / constructors with methods like LoDash isNative })(Function.prototype, TO_STRING, function toString(){ return typeof this == 'function' && this[SRC] || $toString.call(this); });core-js-2.4.1/modules/_replacer.js000066400000000000000000000003431274277553300170410ustar00rootroot00000000000000module.exports = function(regExp, replace){ var replacer = replace === Object(replace) ? function(part){ return replace[part]; } : replace; return function(it){ return String(it).replace(regExp, replacer); }; };core-js-2.4.1/modules/_same-value.js000066400000000000000000000002161274277553300173020ustar00rootroot00000000000000// 7.2.9 SameValue(x, y) module.exports = Object.is || function is(x, y){ return x === y ? x !== 0 || 1 / x === 1 / y : x != x && y != y; };core-js-2.4.1/modules/_set-proto.js000066400000000000000000000015751274277553300172100ustar00rootroot00000000000000// Works with __proto__ only. Old v8 can't work with null proto objects. /* eslint-disable no-proto */ var isObject = require('./_is-object') , anObject = require('./_an-object'); var check = function(O, proto){ anObject(O); if(!isObject(proto) && proto !== null)throw TypeError(proto + ": can't set as prototype!"); }; module.exports = { set: Object.setPrototypeOf || ('__proto__' in {} ? // eslint-disable-line function(test, buggy, set){ try { set = require('./_ctx')(Function.call, require('./_object-gopd').f(Object.prototype, '__proto__').set, 2); set(test, []); buggy = !(test instanceof Array); } catch(e){ buggy = true; } return function setPrototypeOf(O, proto){ check(O, proto); if(buggy)O.__proto__ = proto; else set(O, proto); return O; }; }({}, false) : undefined), check: check };core-js-2.4.1/modules/_set-species.js000066400000000000000000000005571274277553300174770ustar00rootroot00000000000000'use strict'; var global = require('./_global') , dP = require('./_object-dp') , DESCRIPTORS = require('./_descriptors') , SPECIES = require('./_wks')('species'); module.exports = function(KEY){ var C = global[KEY]; if(DESCRIPTORS && C && !C[SPECIES])dP.f(C, SPECIES, { configurable: true, get: function(){ return this; } }); };core-js-2.4.1/modules/_set-to-string-tag.js000066400000000000000000000003751274277553300205410ustar00rootroot00000000000000var def = require('./_object-dp').f , has = require('./_has') , TAG = require('./_wks')('toStringTag'); module.exports = function(it, tag, stat){ if(it && !has(it = stat ? it : it.prototype, TAG))def(it, TAG, {configurable: true, value: tag}); };core-js-2.4.1/modules/_shared-key.js000066400000000000000000000002361274277553300173010ustar00rootroot00000000000000var shared = require('./_shared')('keys') , uid = require('./_uid'); module.exports = function(key){ return shared[key] || (shared[key] = uid(key)); };core-js-2.4.1/modules/_shared.js000066400000000000000000000003061274277553300165110ustar00rootroot00000000000000var global = require('./_global') , SHARED = '__core-js_shared__' , store = global[SHARED] || (global[SHARED] = {}); module.exports = function(key){ return store[key] || (store[key] = {}); };core-js-2.4.1/modules/_species-constructor.js000066400000000000000000000005241274277553300212630ustar00rootroot00000000000000// 7.3.20 SpeciesConstructor(O, defaultConstructor) var anObject = require('./_an-object') , aFunction = require('./_a-function') , SPECIES = require('./_wks')('species'); module.exports = function(O, D){ var C = anObject(O).constructor, S; return C === undefined || (S = anObject(C)[SPECIES]) == undefined ? D : aFunction(S); };core-js-2.4.1/modules/_strict-method.js000066400000000000000000000002731274277553300200340ustar00rootroot00000000000000var fails = require('./_fails'); module.exports = function(method, arg){ return !!method && fails(function(){ arg ? method.call(null, function(){}, 1) : method.call(null); }); };core-js-2.4.1/modules/_string-at.js000066400000000000000000000011431274277553300171530ustar00rootroot00000000000000var toInteger = require('./_to-integer') , defined = require('./_defined'); // true -> String#at // false -> String#codePointAt module.exports = function(TO_STRING){ return function(that, pos){ var s = String(defined(that)) , i = toInteger(pos) , l = s.length , a, b; if(i < 0 || i >= l)return TO_STRING ? '' : undefined; a = s.charCodeAt(i); return a < 0xd800 || a > 0xdbff || i + 1 === l || (b = s.charCodeAt(i + 1)) < 0xdc00 || b > 0xdfff ? TO_STRING ? s.charAt(i) : a : TO_STRING ? s.slice(i, i + 2) : (a - 0xd800 << 10) + (b - 0xdc00) + 0x10000; }; };core-js-2.4.1/modules/_string-context.js000066400000000000000000000004651274277553300202410ustar00rootroot00000000000000// helper for String#{startsWith, endsWith, includes} var isRegExp = require('./_is-regexp') , defined = require('./_defined'); module.exports = function(that, searchString, NAME){ if(isRegExp(searchString))throw TypeError('String#' + NAME + " doesn't accept regex!"); return String(defined(that)); };core-js-2.4.1/modules/_string-html.js000066400000000000000000000012701274277553300175140ustar00rootroot00000000000000var $export = require('./_export') , fails = require('./_fails') , defined = require('./_defined') , quot = /"/g; // B.2.3.2.1 CreateHTML(string, tag, attribute, value) var createHTML = function(string, tag, attribute, value) { var S = String(defined(string)) , p1 = '<' + tag; if(attribute !== '')p1 += ' ' + attribute + '="' + String(value).replace(quot, '"') + '"'; return p1 + '>' + S + ''; }; module.exports = function(NAME, exec){ var O = {}; O[NAME] = exec(createHTML); $export($export.P + $export.F * fails(function(){ var test = ''[NAME]('"'); return test !== test.toLowerCase() || test.split('"').length > 3; }), 'String', O); };core-js-2.4.1/modules/_string-pad.js000066400000000000000000000013571274277553300173220ustar00rootroot00000000000000// https://github.com/tc39/proposal-string-pad-start-end var toLength = require('./_to-length') , repeat = require('./_string-repeat') , defined = require('./_defined'); module.exports = function(that, maxLength, fillString, left){ var S = String(defined(that)) , stringLength = S.length , fillStr = fillString === undefined ? ' ' : String(fillString) , intMaxLength = toLength(maxLength); if(intMaxLength <= stringLength || fillStr == '')return S; var fillLen = intMaxLength - stringLength , stringFiller = repeat.call(fillStr, Math.ceil(fillLen / fillStr.length)); if(stringFiller.length > fillLen)stringFiller = stringFiller.slice(0, fillLen); return left ? stringFiller + S : S + stringFiller; }; core-js-2.4.1/modules/_string-repeat.js000066400000000000000000000005561274277553300200360ustar00rootroot00000000000000'use strict'; var toInteger = require('./_to-integer') , defined = require('./_defined'); module.exports = function repeat(count){ var str = String(defined(this)) , res = '' , n = toInteger(count); if(n < 0 || n == Infinity)throw RangeError("Count can't be negative"); for(;n > 0; (n >>>= 1) && (str += str))if(n & 1)res += str; return res; };core-js-2.4.1/modules/_string-trim.js000066400000000000000000000015761274277553300175340ustar00rootroot00000000000000var $export = require('./_export') , defined = require('./_defined') , fails = require('./_fails') , spaces = require('./_string-ws') , space = '[' + spaces + ']' , non = '\u200b\u0085' , ltrim = RegExp('^' + space + space + '*') , rtrim = RegExp(space + space + '*$'); var exporter = function(KEY, exec, ALIAS){ var exp = {}; var FORCE = fails(function(){ return !!spaces[KEY]() || non[KEY]() != non; }); var fn = exp[KEY] = FORCE ? exec(trim) : spaces[KEY]; if(ALIAS)exp[ALIAS] = fn; $export($export.P + $export.F * FORCE, 'String', exp); }; // 1 -> String#trimLeft // 2 -> String#trimRight // 3 -> String#trim var trim = exporter.trim = function(string, TYPE){ string = String(defined(string)); if(TYPE & 1)string = string.replace(ltrim, ''); if(TYPE & 2)string = string.replace(rtrim, ''); return string; }; module.exports = exporter;core-js-2.4.1/modules/_string-ws.js000066400000000000000000000002511274277553300171770ustar00rootroot00000000000000module.exports = '\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u180E\u2000\u2001\u2002\u2003' + '\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF';core-js-2.4.1/modules/_task.js000066400000000000000000000043441274277553300162130ustar00rootroot00000000000000var ctx = require('./_ctx') , invoke = require('./_invoke') , html = require('./_html') , cel = require('./_dom-create') , global = require('./_global') , process = global.process , setTask = global.setImmediate , clearTask = global.clearImmediate , MessageChannel = global.MessageChannel , counter = 0 , queue = {} , ONREADYSTATECHANGE = 'onreadystatechange' , defer, channel, port; var run = function(){ var id = +this; if(queue.hasOwnProperty(id)){ var fn = queue[id]; delete queue[id]; fn(); } }; var listener = function(event){ run.call(event.data); }; // Node.js 0.9+ & IE10+ has setImmediate, otherwise: if(!setTask || !clearTask){ setTask = function setImmediate(fn){ var args = [], i = 1; while(arguments.length > i)args.push(arguments[i++]); queue[++counter] = function(){ invoke(typeof fn == 'function' ? fn : Function(fn), args); }; defer(counter); return counter; }; clearTask = function clearImmediate(id){ delete queue[id]; }; // Node.js 0.8- if(require('./_cof')(process) == 'process'){ defer = function(id){ process.nextTick(ctx(run, id, 1)); }; // Browsers with MessageChannel, includes WebWorkers } else if(MessageChannel){ channel = new MessageChannel; port = channel.port2; channel.port1.onmessage = listener; defer = ctx(port.postMessage, port, 1); // Browsers with postMessage, skip WebWorkers // IE8 has postMessage, but it's sync & typeof its postMessage is 'object' } else if(global.addEventListener && typeof postMessage == 'function' && !global.importScripts){ defer = function(id){ global.postMessage(id + '', '*'); }; global.addEventListener('message', listener, false); // IE8- } else if(ONREADYSTATECHANGE in cel('script')){ defer = function(id){ html.appendChild(cel('script'))[ONREADYSTATECHANGE] = function(){ html.removeChild(this); run.call(id); }; }; // Rest old browsers } else { defer = function(id){ setTimeout(ctx(run, id, 1), 0); }; } } module.exports = { set: setTask, clear: clearTask };core-js-2.4.1/modules/_to-index.js000066400000000000000000000003461274277553300167760ustar00rootroot00000000000000var toInteger = require('./_to-integer') , max = Math.max , min = Math.min; module.exports = function(index, length){ index = toInteger(index); return index < 0 ? max(index + length, 0) : min(index, length); };core-js-2.4.1/modules/_to-integer.js000066400000000000000000000002361274277553300173220ustar00rootroot00000000000000// 7.1.4 ToInteger var ceil = Math.ceil , floor = Math.floor; module.exports = function(it){ return isNaN(it = +it) ? 0 : (it > 0 ? floor : ceil)(it); };core-js-2.4.1/modules/_to-iobject.js000066400000000000000000000003251274277553300173030ustar00rootroot00000000000000// to indexed object, toObject with fallback for non-array-like ES3 strings var IObject = require('./_iobject') , defined = require('./_defined'); module.exports = function(it){ return IObject(defined(it)); };core-js-2.4.1/modules/_to-length.js000066400000000000000000000003311274277553300171420ustar00rootroot00000000000000// 7.1.15 ToLength var toInteger = require('./_to-integer') , min = Math.min; module.exports = function(it){ return it > 0 ? min(toInteger(it), 0x1fffffffffffff) : 0; // pow(2, 53) - 1 == 9007199254740991 };core-js-2.4.1/modules/_to-object.js000066400000000000000000000002011274277553300171230ustar00rootroot00000000000000// 7.1.13 ToObject(argument) var defined = require('./_defined'); module.exports = function(it){ return Object(defined(it)); };core-js-2.4.1/modules/_to-primitive.js000066400000000000000000000012041274277553300176710ustar00rootroot00000000000000// 7.1.1 ToPrimitive(input [, PreferredType]) var isObject = require('./_is-object'); // instead of the ES6 spec version, we didn't implement @@toPrimitive case // and the second argument - flag - preferred type is a string module.exports = function(it, S){ if(!isObject(it))return it; var fn, val; if(S && typeof (fn = it.toString) == 'function' && !isObject(val = fn.call(it)))return val; if(typeof (fn = it.valueOf) == 'function' && !isObject(val = fn.call(it)))return val; if(!S && typeof (fn = it.toString) == 'function' && !isObject(val = fn.call(it)))return val; throw TypeError("Can't convert object to primitive value"); };core-js-2.4.1/modules/_typed-array.js000066400000000000000000000445741274277553300175230ustar00rootroot00000000000000'use strict'; if(require('./_descriptors')){ var LIBRARY = require('./_library') , global = require('./_global') , fails = require('./_fails') , $export = require('./_export') , $typed = require('./_typed') , $buffer = require('./_typed-buffer') , ctx = require('./_ctx') , anInstance = require('./_an-instance') , propertyDesc = require('./_property-desc') , hide = require('./_hide') , redefineAll = require('./_redefine-all') , toInteger = require('./_to-integer') , toLength = require('./_to-length') , toIndex = require('./_to-index') , toPrimitive = require('./_to-primitive') , has = require('./_has') , same = require('./_same-value') , classof = require('./_classof') , isObject = require('./_is-object') , toObject = require('./_to-object') , isArrayIter = require('./_is-array-iter') , create = require('./_object-create') , getPrototypeOf = require('./_object-gpo') , gOPN = require('./_object-gopn').f , getIterFn = require('./core.get-iterator-method') , uid = require('./_uid') , wks = require('./_wks') , createArrayMethod = require('./_array-methods') , createArrayIncludes = require('./_array-includes') , speciesConstructor = require('./_species-constructor') , ArrayIterators = require('./es6.array.iterator') , Iterators = require('./_iterators') , $iterDetect = require('./_iter-detect') , setSpecies = require('./_set-species') , arrayFill = require('./_array-fill') , arrayCopyWithin = require('./_array-copy-within') , $DP = require('./_object-dp') , $GOPD = require('./_object-gopd') , dP = $DP.f , gOPD = $GOPD.f , RangeError = global.RangeError , TypeError = global.TypeError , Uint8Array = global.Uint8Array , ARRAY_BUFFER = 'ArrayBuffer' , SHARED_BUFFER = 'Shared' + ARRAY_BUFFER , BYTES_PER_ELEMENT = 'BYTES_PER_ELEMENT' , PROTOTYPE = 'prototype' , ArrayProto = Array[PROTOTYPE] , $ArrayBuffer = $buffer.ArrayBuffer , $DataView = $buffer.DataView , arrayForEach = createArrayMethod(0) , arrayFilter = createArrayMethod(2) , arraySome = createArrayMethod(3) , arrayEvery = createArrayMethod(4) , arrayFind = createArrayMethod(5) , arrayFindIndex = createArrayMethod(6) , arrayIncludes = createArrayIncludes(true) , arrayIndexOf = createArrayIncludes(false) , arrayValues = ArrayIterators.values , arrayKeys = ArrayIterators.keys , arrayEntries = ArrayIterators.entries , arrayLastIndexOf = ArrayProto.lastIndexOf , arrayReduce = ArrayProto.reduce , arrayReduceRight = ArrayProto.reduceRight , arrayJoin = ArrayProto.join , arraySort = ArrayProto.sort , arraySlice = ArrayProto.slice , arrayToString = ArrayProto.toString , arrayToLocaleString = ArrayProto.toLocaleString , ITERATOR = wks('iterator') , TAG = wks('toStringTag') , TYPED_CONSTRUCTOR = uid('typed_constructor') , DEF_CONSTRUCTOR = uid('def_constructor') , ALL_CONSTRUCTORS = $typed.CONSTR , TYPED_ARRAY = $typed.TYPED , VIEW = $typed.VIEW , WRONG_LENGTH = 'Wrong length!'; var $map = createArrayMethod(1, function(O, length){ return allocate(speciesConstructor(O, O[DEF_CONSTRUCTOR]), length); }); var LITTLE_ENDIAN = fails(function(){ return new Uint8Array(new Uint16Array([1]).buffer)[0] === 1; }); var FORCED_SET = !!Uint8Array && !!Uint8Array[PROTOTYPE].set && fails(function(){ new Uint8Array(1).set({}); }); var strictToLength = function(it, SAME){ if(it === undefined)throw TypeError(WRONG_LENGTH); var number = +it , length = toLength(it); if(SAME && !same(number, length))throw RangeError(WRONG_LENGTH); return length; }; var toOffset = function(it, BYTES){ var offset = toInteger(it); if(offset < 0 || offset % BYTES)throw RangeError('Wrong offset!'); return offset; }; var validate = function(it){ if(isObject(it) && TYPED_ARRAY in it)return it; throw TypeError(it + ' is not a typed array!'); }; var allocate = function(C, length){ if(!(isObject(C) && TYPED_CONSTRUCTOR in C)){ throw TypeError('It is not a typed array constructor!'); } return new C(length); }; var speciesFromList = function(O, list){ return fromList(speciesConstructor(O, O[DEF_CONSTRUCTOR]), list); }; var fromList = function(C, list){ var index = 0 , length = list.length , result = allocate(C, length); while(length > index)result[index] = list[index++]; return result; }; var addGetter = function(it, key, internal){ dP(it, key, {get: function(){ return this._d[internal]; }}); }; var $from = function from(source /*, mapfn, thisArg */){ var O = toObject(source) , aLen = arguments.length , mapfn = aLen > 1 ? arguments[1] : undefined , mapping = mapfn !== undefined , iterFn = getIterFn(O) , i, length, values, result, step, iterator; if(iterFn != undefined && !isArrayIter(iterFn)){ for(iterator = iterFn.call(O), values = [], i = 0; !(step = iterator.next()).done; i++){ values.push(step.value); } O = values; } if(mapping && aLen > 2)mapfn = ctx(mapfn, arguments[2], 2); for(i = 0, length = toLength(O.length), result = allocate(this, length); length > i; i++){ result[i] = mapping ? mapfn(O[i], i) : O[i]; } return result; }; var $of = function of(/*...items*/){ var index = 0 , length = arguments.length , result = allocate(this, length); while(length > index)result[index] = arguments[index++]; return result; }; // iOS Safari 6.x fails here var TO_LOCALE_BUG = !!Uint8Array && fails(function(){ arrayToLocaleString.call(new Uint8Array(1)); }); var $toLocaleString = function toLocaleString(){ return arrayToLocaleString.apply(TO_LOCALE_BUG ? arraySlice.call(validate(this)) : validate(this), arguments); }; var proto = { copyWithin: function copyWithin(target, start /*, end */){ return arrayCopyWithin.call(validate(this), target, start, arguments.length > 2 ? arguments[2] : undefined); }, every: function every(callbackfn /*, thisArg */){ return arrayEvery(validate(this), callbackfn, arguments.length > 1 ? arguments[1] : undefined); }, fill: function fill(value /*, start, end */){ // eslint-disable-line no-unused-vars return arrayFill.apply(validate(this), arguments); }, filter: function filter(callbackfn /*, thisArg */){ return speciesFromList(this, arrayFilter(validate(this), callbackfn, arguments.length > 1 ? arguments[1] : undefined)); }, find: function find(predicate /*, thisArg */){ return arrayFind(validate(this), predicate, arguments.length > 1 ? arguments[1] : undefined); }, findIndex: function findIndex(predicate /*, thisArg */){ return arrayFindIndex(validate(this), predicate, arguments.length > 1 ? arguments[1] : undefined); }, forEach: function forEach(callbackfn /*, thisArg */){ arrayForEach(validate(this), callbackfn, arguments.length > 1 ? arguments[1] : undefined); }, indexOf: function indexOf(searchElement /*, fromIndex */){ return arrayIndexOf(validate(this), searchElement, arguments.length > 1 ? arguments[1] : undefined); }, includes: function includes(searchElement /*, fromIndex */){ return arrayIncludes(validate(this), searchElement, arguments.length > 1 ? arguments[1] : undefined); }, join: function join(separator){ // eslint-disable-line no-unused-vars return arrayJoin.apply(validate(this), arguments); }, lastIndexOf: function lastIndexOf(searchElement /*, fromIndex */){ // eslint-disable-line no-unused-vars return arrayLastIndexOf.apply(validate(this), arguments); }, map: function map(mapfn /*, thisArg */){ return $map(validate(this), mapfn, arguments.length > 1 ? arguments[1] : undefined); }, reduce: function reduce(callbackfn /*, initialValue */){ // eslint-disable-line no-unused-vars return arrayReduce.apply(validate(this), arguments); }, reduceRight: function reduceRight(callbackfn /*, initialValue */){ // eslint-disable-line no-unused-vars return arrayReduceRight.apply(validate(this), arguments); }, reverse: function reverse(){ var that = this , length = validate(that).length , middle = Math.floor(length / 2) , index = 0 , value; while(index < middle){ value = that[index]; that[index++] = that[--length]; that[length] = value; } return that; }, some: function some(callbackfn /*, thisArg */){ return arraySome(validate(this), callbackfn, arguments.length > 1 ? arguments[1] : undefined); }, sort: function sort(comparefn){ return arraySort.call(validate(this), comparefn); }, subarray: function subarray(begin, end){ var O = validate(this) , length = O.length , $begin = toIndex(begin, length); return new (speciesConstructor(O, O[DEF_CONSTRUCTOR]))( O.buffer, O.byteOffset + $begin * O.BYTES_PER_ELEMENT, toLength((end === undefined ? length : toIndex(end, length)) - $begin) ); } }; var $slice = function slice(start, end){ return speciesFromList(this, arraySlice.call(validate(this), start, end)); }; var $set = function set(arrayLike /*, offset */){ validate(this); var offset = toOffset(arguments[1], 1) , length = this.length , src = toObject(arrayLike) , len = toLength(src.length) , index = 0; if(len + offset > length)throw RangeError(WRONG_LENGTH); while(index < len)this[offset + index] = src[index++]; }; var $iterators = { entries: function entries(){ return arrayEntries.call(validate(this)); }, keys: function keys(){ return arrayKeys.call(validate(this)); }, values: function values(){ return arrayValues.call(validate(this)); } }; var isTAIndex = function(target, key){ return isObject(target) && target[TYPED_ARRAY] && typeof key != 'symbol' && key in target && String(+key) == String(key); }; var $getDesc = function getOwnPropertyDescriptor(target, key){ return isTAIndex(target, key = toPrimitive(key, true)) ? propertyDesc(2, target[key]) : gOPD(target, key); }; var $setDesc = function defineProperty(target, key, desc){ if(isTAIndex(target, key = toPrimitive(key, true)) && isObject(desc) && has(desc, 'value') && !has(desc, 'get') && !has(desc, 'set') // TODO: add validation descriptor w/o calling accessors && !desc.configurable && (!has(desc, 'writable') || desc.writable) && (!has(desc, 'enumerable') || desc.enumerable) ){ target[key] = desc.value; return target; } else return dP(target, key, desc); }; if(!ALL_CONSTRUCTORS){ $GOPD.f = $getDesc; $DP.f = $setDesc; } $export($export.S + $export.F * !ALL_CONSTRUCTORS, 'Object', { getOwnPropertyDescriptor: $getDesc, defineProperty: $setDesc }); if(fails(function(){ arrayToString.call({}); })){ arrayToString = arrayToLocaleString = function toString(){ return arrayJoin.call(this); } } var $TypedArrayPrototype$ = redefineAll({}, proto); redefineAll($TypedArrayPrototype$, $iterators); hide($TypedArrayPrototype$, ITERATOR, $iterators.values); redefineAll($TypedArrayPrototype$, { slice: $slice, set: $set, constructor: function(){ /* noop */ }, toString: arrayToString, toLocaleString: $toLocaleString }); addGetter($TypedArrayPrototype$, 'buffer', 'b'); addGetter($TypedArrayPrototype$, 'byteOffset', 'o'); addGetter($TypedArrayPrototype$, 'byteLength', 'l'); addGetter($TypedArrayPrototype$, 'length', 'e'); dP($TypedArrayPrototype$, TAG, { get: function(){ return this[TYPED_ARRAY]; } }); module.exports = function(KEY, BYTES, wrapper, CLAMPED){ CLAMPED = !!CLAMPED; var NAME = KEY + (CLAMPED ? 'Clamped' : '') + 'Array' , ISNT_UINT8 = NAME != 'Uint8Array' , GETTER = 'get' + KEY , SETTER = 'set' + KEY , TypedArray = global[NAME] , Base = TypedArray || {} , TAC = TypedArray && getPrototypeOf(TypedArray) , FORCED = !TypedArray || !$typed.ABV , O = {} , TypedArrayPrototype = TypedArray && TypedArray[PROTOTYPE]; var getter = function(that, index){ var data = that._d; return data.v[GETTER](index * BYTES + data.o, LITTLE_ENDIAN); }; var setter = function(that, index, value){ var data = that._d; if(CLAMPED)value = (value = Math.round(value)) < 0 ? 0 : value > 0xff ? 0xff : value & 0xff; data.v[SETTER](index * BYTES + data.o, value, LITTLE_ENDIAN); }; var addElement = function(that, index){ dP(that, index, { get: function(){ return getter(this, index); }, set: function(value){ return setter(this, index, value); }, enumerable: true }); }; if(FORCED){ TypedArray = wrapper(function(that, data, $offset, $length){ anInstance(that, TypedArray, NAME, '_d'); var index = 0 , offset = 0 , buffer, byteLength, length, klass; if(!isObject(data)){ length = strictToLength(data, true) byteLength = length * BYTES; buffer = new $ArrayBuffer(byteLength); } else if(data instanceof $ArrayBuffer || (klass = classof(data)) == ARRAY_BUFFER || klass == SHARED_BUFFER){ buffer = data; offset = toOffset($offset, BYTES); var $len = data.byteLength; if($length === undefined){ if($len % BYTES)throw RangeError(WRONG_LENGTH); byteLength = $len - offset; if(byteLength < 0)throw RangeError(WRONG_LENGTH); } else { byteLength = toLength($length) * BYTES; if(byteLength + offset > $len)throw RangeError(WRONG_LENGTH); } length = byteLength / BYTES; } else if(TYPED_ARRAY in data){ return fromList(TypedArray, data); } else { return $from.call(TypedArray, data); } hide(that, '_d', { b: buffer, o: offset, l: byteLength, e: length, v: new $DataView(buffer) }); while(index < length)addElement(that, index++); }); TypedArrayPrototype = TypedArray[PROTOTYPE] = create($TypedArrayPrototype$); hide(TypedArrayPrototype, 'constructor', TypedArray); } else if(!$iterDetect(function(iter){ // V8 works with iterators, but fails in many other cases // https://code.google.com/p/v8/issues/detail?id=4552 new TypedArray(null); // eslint-disable-line no-new new TypedArray(iter); // eslint-disable-line no-new }, true)){ TypedArray = wrapper(function(that, data, $offset, $length){ anInstance(that, TypedArray, NAME); var klass; // `ws` module bug, temporarily remove validation length for Uint8Array // https://github.com/websockets/ws/pull/645 if(!isObject(data))return new Base(strictToLength(data, ISNT_UINT8)); if(data instanceof $ArrayBuffer || (klass = classof(data)) == ARRAY_BUFFER || klass == SHARED_BUFFER){ return $length !== undefined ? new Base(data, toOffset($offset, BYTES), $length) : $offset !== undefined ? new Base(data, toOffset($offset, BYTES)) : new Base(data); } if(TYPED_ARRAY in data)return fromList(TypedArray, data); return $from.call(TypedArray, data); }); arrayForEach(TAC !== Function.prototype ? gOPN(Base).concat(gOPN(TAC)) : gOPN(Base), function(key){ if(!(key in TypedArray))hide(TypedArray, key, Base[key]); }); TypedArray[PROTOTYPE] = TypedArrayPrototype; if(!LIBRARY)TypedArrayPrototype.constructor = TypedArray; } var $nativeIterator = TypedArrayPrototype[ITERATOR] , CORRECT_ITER_NAME = !!$nativeIterator && ($nativeIterator.name == 'values' || $nativeIterator.name == undefined) , $iterator = $iterators.values; hide(TypedArray, TYPED_CONSTRUCTOR, true); hide(TypedArrayPrototype, TYPED_ARRAY, NAME); hide(TypedArrayPrototype, VIEW, true); hide(TypedArrayPrototype, DEF_CONSTRUCTOR, TypedArray); if(CLAMPED ? new TypedArray(1)[TAG] != NAME : !(TAG in TypedArrayPrototype)){ dP(TypedArrayPrototype, TAG, { get: function(){ return NAME; } }); } O[NAME] = TypedArray; $export($export.G + $export.W + $export.F * (TypedArray != Base), O); $export($export.S, NAME, { BYTES_PER_ELEMENT: BYTES, from: $from, of: $of }); if(!(BYTES_PER_ELEMENT in TypedArrayPrototype))hide(TypedArrayPrototype, BYTES_PER_ELEMENT, BYTES); $export($export.P, NAME, proto); setSpecies(NAME); $export($export.P + $export.F * FORCED_SET, NAME, {set: $set}); $export($export.P + $export.F * !CORRECT_ITER_NAME, NAME, $iterators); $export($export.P + $export.F * (TypedArrayPrototype.toString != arrayToString), NAME, {toString: arrayToString}); $export($export.P + $export.F * fails(function(){ new TypedArray(1).slice(); }), NAME, {slice: $slice}); $export($export.P + $export.F * (fails(function(){ return [1, 2].toLocaleString() != new TypedArray([1, 2]).toLocaleString() }) || !fails(function(){ TypedArrayPrototype.toLocaleString.call([1, 2]); })), NAME, {toLocaleString: $toLocaleString}); Iterators[NAME] = CORRECT_ITER_NAME ? $nativeIterator : $iterator; if(!LIBRARY && !CORRECT_ITER_NAME)hide(TypedArrayPrototype, ITERATOR, $iterator); }; } else module.exports = function(){ /* empty */ };core-js-2.4.1/modules/_typed-buffer.js000066400000000000000000000225721274277553300176500ustar00rootroot00000000000000'use strict'; var global = require('./_global') , DESCRIPTORS = require('./_descriptors') , LIBRARY = require('./_library') , $typed = require('./_typed') , hide = require('./_hide') , redefineAll = require('./_redefine-all') , fails = require('./_fails') , anInstance = require('./_an-instance') , toInteger = require('./_to-integer') , toLength = require('./_to-length') , gOPN = require('./_object-gopn').f , dP = require('./_object-dp').f , arrayFill = require('./_array-fill') , setToStringTag = require('./_set-to-string-tag') , ARRAY_BUFFER = 'ArrayBuffer' , DATA_VIEW = 'DataView' , PROTOTYPE = 'prototype' , WRONG_LENGTH = 'Wrong length!' , WRONG_INDEX = 'Wrong index!' , $ArrayBuffer = global[ARRAY_BUFFER] , $DataView = global[DATA_VIEW] , Math = global.Math , RangeError = global.RangeError , Infinity = global.Infinity , BaseBuffer = $ArrayBuffer , abs = Math.abs , pow = Math.pow , floor = Math.floor , log = Math.log , LN2 = Math.LN2 , BUFFER = 'buffer' , BYTE_LENGTH = 'byteLength' , BYTE_OFFSET = 'byteOffset' , $BUFFER = DESCRIPTORS ? '_b' : BUFFER , $LENGTH = DESCRIPTORS ? '_l' : BYTE_LENGTH , $OFFSET = DESCRIPTORS ? '_o' : BYTE_OFFSET; // IEEE754 conversions based on https://github.com/feross/ieee754 var packIEEE754 = function(value, mLen, nBytes){ var buffer = Array(nBytes) , eLen = nBytes * 8 - mLen - 1 , eMax = (1 << eLen) - 1 , eBias = eMax >> 1 , rt = mLen === 23 ? pow(2, -24) - pow(2, -77) : 0 , i = 0 , s = value < 0 || value === 0 && 1 / value < 0 ? 1 : 0 , e, m, c; value = abs(value) if(value != value || value === Infinity){ m = value != value ? 1 : 0; e = eMax; } else { e = floor(log(value) / LN2); if(value * (c = pow(2, -e)) < 1){ e--; c *= 2; } if(e + eBias >= 1){ value += rt / c; } else { value += rt * pow(2, 1 - eBias); } if(value * c >= 2){ e++; c /= 2; } if(e + eBias >= eMax){ m = 0; e = eMax; } else if(e + eBias >= 1){ m = (value * c - 1) * pow(2, mLen); e = e + eBias; } else { m = value * pow(2, eBias - 1) * pow(2, mLen); e = 0; } } for(; mLen >= 8; buffer[i++] = m & 255, m /= 256, mLen -= 8); e = e << mLen | m; eLen += mLen; for(; eLen > 0; buffer[i++] = e & 255, e /= 256, eLen -= 8); buffer[--i] |= s * 128; return buffer; }; var unpackIEEE754 = function(buffer, mLen, nBytes){ var eLen = nBytes * 8 - mLen - 1 , eMax = (1 << eLen) - 1 , eBias = eMax >> 1 , nBits = eLen - 7 , i = nBytes - 1 , s = buffer[i--] , e = s & 127 , m; s >>= 7; for(; nBits > 0; e = e * 256 + buffer[i], i--, nBits -= 8); m = e & (1 << -nBits) - 1; e >>= -nBits; nBits += mLen; for(; nBits > 0; m = m * 256 + buffer[i], i--, nBits -= 8); if(e === 0){ e = 1 - eBias; } else if(e === eMax){ return m ? NaN : s ? -Infinity : Infinity; } else { m = m + pow(2, mLen); e = e - eBias; } return (s ? -1 : 1) * m * pow(2, e - mLen); }; var unpackI32 = function(bytes){ return bytes[3] << 24 | bytes[2] << 16 | bytes[1] << 8 | bytes[0]; }; var packI8 = function(it){ return [it & 0xff]; }; var packI16 = function(it){ return [it & 0xff, it >> 8 & 0xff]; }; var packI32 = function(it){ return [it & 0xff, it >> 8 & 0xff, it >> 16 & 0xff, it >> 24 & 0xff]; }; var packF64 = function(it){ return packIEEE754(it, 52, 8); }; var packF32 = function(it){ return packIEEE754(it, 23, 4); }; var addGetter = function(C, key, internal){ dP(C[PROTOTYPE], key, {get: function(){ return this[internal]; }}); }; var get = function(view, bytes, index, isLittleEndian){ var numIndex = +index , intIndex = toInteger(numIndex); if(numIndex != intIndex || intIndex < 0 || intIndex + bytes > view[$LENGTH])throw RangeError(WRONG_INDEX); var store = view[$BUFFER]._b , start = intIndex + view[$OFFSET] , pack = store.slice(start, start + bytes); return isLittleEndian ? pack : pack.reverse(); }; var set = function(view, bytes, index, conversion, value, isLittleEndian){ var numIndex = +index , intIndex = toInteger(numIndex); if(numIndex != intIndex || intIndex < 0 || intIndex + bytes > view[$LENGTH])throw RangeError(WRONG_INDEX); var store = view[$BUFFER]._b , start = intIndex + view[$OFFSET] , pack = conversion(+value); for(var i = 0; i < bytes; i++)store[start + i] = pack[isLittleEndian ? i : bytes - i - 1]; }; var validateArrayBufferArguments = function(that, length){ anInstance(that, $ArrayBuffer, ARRAY_BUFFER); var numberLength = +length , byteLength = toLength(numberLength); if(numberLength != byteLength)throw RangeError(WRONG_LENGTH); return byteLength; }; if(!$typed.ABV){ $ArrayBuffer = function ArrayBuffer(length){ var byteLength = validateArrayBufferArguments(this, length); this._b = arrayFill.call(Array(byteLength), 0); this[$LENGTH] = byteLength; }; $DataView = function DataView(buffer, byteOffset, byteLength){ anInstance(this, $DataView, DATA_VIEW); anInstance(buffer, $ArrayBuffer, DATA_VIEW); var bufferLength = buffer[$LENGTH] , offset = toInteger(byteOffset); if(offset < 0 || offset > bufferLength)throw RangeError('Wrong offset!'); byteLength = byteLength === undefined ? bufferLength - offset : toLength(byteLength); if(offset + byteLength > bufferLength)throw RangeError(WRONG_LENGTH); this[$BUFFER] = buffer; this[$OFFSET] = offset; this[$LENGTH] = byteLength; }; if(DESCRIPTORS){ addGetter($ArrayBuffer, BYTE_LENGTH, '_l'); addGetter($DataView, BUFFER, '_b'); addGetter($DataView, BYTE_LENGTH, '_l'); addGetter($DataView, BYTE_OFFSET, '_o'); } redefineAll($DataView[PROTOTYPE], { getInt8: function getInt8(byteOffset){ return get(this, 1, byteOffset)[0] << 24 >> 24; }, getUint8: function getUint8(byteOffset){ return get(this, 1, byteOffset)[0]; }, getInt16: function getInt16(byteOffset /*, littleEndian */){ var bytes = get(this, 2, byteOffset, arguments[1]); return (bytes[1] << 8 | bytes[0]) << 16 >> 16; }, getUint16: function getUint16(byteOffset /*, littleEndian */){ var bytes = get(this, 2, byteOffset, arguments[1]); return bytes[1] << 8 | bytes[0]; }, getInt32: function getInt32(byteOffset /*, littleEndian */){ return unpackI32(get(this, 4, byteOffset, arguments[1])); }, getUint32: function getUint32(byteOffset /*, littleEndian */){ return unpackI32(get(this, 4, byteOffset, arguments[1])) >>> 0; }, getFloat32: function getFloat32(byteOffset /*, littleEndian */){ return unpackIEEE754(get(this, 4, byteOffset, arguments[1]), 23, 4); }, getFloat64: function getFloat64(byteOffset /*, littleEndian */){ return unpackIEEE754(get(this, 8, byteOffset, arguments[1]), 52, 8); }, setInt8: function setInt8(byteOffset, value){ set(this, 1, byteOffset, packI8, value); }, setUint8: function setUint8(byteOffset, value){ set(this, 1, byteOffset, packI8, value); }, setInt16: function setInt16(byteOffset, value /*, littleEndian */){ set(this, 2, byteOffset, packI16, value, arguments[2]); }, setUint16: function setUint16(byteOffset, value /*, littleEndian */){ set(this, 2, byteOffset, packI16, value, arguments[2]); }, setInt32: function setInt32(byteOffset, value /*, littleEndian */){ set(this, 4, byteOffset, packI32, value, arguments[2]); }, setUint32: function setUint32(byteOffset, value /*, littleEndian */){ set(this, 4, byteOffset, packI32, value, arguments[2]); }, setFloat32: function setFloat32(byteOffset, value /*, littleEndian */){ set(this, 4, byteOffset, packF32, value, arguments[2]); }, setFloat64: function setFloat64(byteOffset, value /*, littleEndian */){ set(this, 8, byteOffset, packF64, value, arguments[2]); } }); } else { if(!fails(function(){ new $ArrayBuffer; // eslint-disable-line no-new }) || !fails(function(){ new $ArrayBuffer(.5); // eslint-disable-line no-new })){ $ArrayBuffer = function ArrayBuffer(length){ return new BaseBuffer(validateArrayBufferArguments(this, length)); }; var ArrayBufferProto = $ArrayBuffer[PROTOTYPE] = BaseBuffer[PROTOTYPE]; for(var keys = gOPN(BaseBuffer), j = 0, key; keys.length > j; ){ if(!((key = keys[j++]) in $ArrayBuffer))hide($ArrayBuffer, key, BaseBuffer[key]); }; if(!LIBRARY)ArrayBufferProto.constructor = $ArrayBuffer; } // iOS Safari 7.x bug var view = new $DataView(new $ArrayBuffer(2)) , $setInt8 = $DataView[PROTOTYPE].setInt8; view.setInt8(0, 2147483648); view.setInt8(1, 2147483649); if(view.getInt8(0) || !view.getInt8(1))redefineAll($DataView[PROTOTYPE], { setInt8: function setInt8(byteOffset, value){ $setInt8.call(this, byteOffset, value << 24 >> 24); }, setUint8: function setUint8(byteOffset, value){ $setInt8.call(this, byteOffset, value << 24 >> 24); } }, true); } setToStringTag($ArrayBuffer, ARRAY_BUFFER); setToStringTag($DataView, DATA_VIEW); hide($DataView[PROTOTYPE], $typed.VIEW, true); exports[ARRAY_BUFFER] = $ArrayBuffer; exports[DATA_VIEW] = $DataView;core-js-2.4.1/modules/_typed.js000066400000000000000000000012371274277553300163740ustar00rootroot00000000000000var global = require('./_global') , hide = require('./_hide') , uid = require('./_uid') , TYPED = uid('typed_array') , VIEW = uid('view') , ABV = !!(global.ArrayBuffer && global.DataView) , CONSTR = ABV , i = 0, l = 9, Typed; var TypedArrayConstructors = ( 'Int8Array,Uint8Array,Uint8ClampedArray,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array' ).split(','); while(i < l){ if(Typed = global[TypedArrayConstructors[i++]]){ hide(Typed.prototype, TYPED, true); hide(Typed.prototype, VIEW, true); } else CONSTR = false; } module.exports = { ABV: ABV, CONSTR: CONSTR, TYPED: TYPED, VIEW: VIEW };core-js-2.4.1/modules/_uid.js000066400000000000000000000002361274277553300160260ustar00rootroot00000000000000var id = 0 , px = Math.random(); module.exports = function(key){ return 'Symbol('.concat(key === undefined ? '' : key, ')_', (++id + px).toString(36)); };core-js-2.4.1/modules/_wks-define.js000066400000000000000000000006671274277553300173110ustar00rootroot00000000000000var global = require('./_global') , core = require('./_core') , LIBRARY = require('./_library') , wksExt = require('./_wks-ext') , defineProperty = require('./_object-dp').f; module.exports = function(name){ var $Symbol = core.Symbol || (core.Symbol = LIBRARY ? {} : global.Symbol || {}); if(name.charAt(0) != '_' && !(name in $Symbol))defineProperty($Symbol, name, {value: wksExt.f(name)}); };core-js-2.4.1/modules/_wks-ext.js000066400000000000000000000000361274277553300166450ustar00rootroot00000000000000exports.f = require('./_wks');core-js-2.4.1/modules/_wks.js000066400000000000000000000005601274277553300160510ustar00rootroot00000000000000var store = require('./_shared')('wks') , uid = require('./_uid') , Symbol = require('./_global').Symbol , USE_SYMBOL = typeof Symbol == 'function'; var $exports = module.exports = function(name){ return store[name] || (store[name] = USE_SYMBOL && Symbol[name] || (USE_SYMBOL ? Symbol : uid)('Symbol.' + name)); }; $exports.store = store;core-js-2.4.1/modules/core.delay.js000066400000000000000000000006231274277553300171330ustar00rootroot00000000000000var global = require('./_global') , core = require('./_core') , $export = require('./_export') , partial = require('./_partial'); // https://esdiscuss.org/topic/promise-returning-delay-function $export($export.G + $export.F, { delay: function delay(time){ return new (core.Promise || global.Promise)(function(resolve){ setTimeout(partial.call(resolve, true), time); }); } });core-js-2.4.1/modules/core.dict.js000066400000000000000000000106431274277553300167630ustar00rootroot00000000000000'use strict'; var ctx = require('./_ctx') , $export = require('./_export') , createDesc = require('./_property-desc') , assign = require('./_object-assign') , create = require('./_object-create') , getPrototypeOf = require('./_object-gpo') , getKeys = require('./_object-keys') , dP = require('./_object-dp') , keyOf = require('./_keyof') , aFunction = require('./_a-function') , forOf = require('./_for-of') , isIterable = require('./core.is-iterable') , $iterCreate = require('./_iter-create') , step = require('./_iter-step') , isObject = require('./_is-object') , toIObject = require('./_to-iobject') , DESCRIPTORS = require('./_descriptors') , has = require('./_has'); // 0 -> Dict.forEach // 1 -> Dict.map // 2 -> Dict.filter // 3 -> Dict.some // 4 -> Dict.every // 5 -> Dict.find // 6 -> Dict.findKey // 7 -> Dict.mapPairs var createDictMethod = function(TYPE){ var IS_MAP = TYPE == 1 , IS_EVERY = TYPE == 4; return function(object, callbackfn, that /* = undefined */){ var f = ctx(callbackfn, that, 3) , O = toIObject(object) , result = IS_MAP || TYPE == 7 || TYPE == 2 ? new (typeof this == 'function' ? this : Dict) : undefined , key, val, res; for(key in O)if(has(O, key)){ val = O[key]; res = f(val, key, object); if(TYPE){ if(IS_MAP)result[key] = res; // map else if(res)switch(TYPE){ case 2: result[key] = val; break; // filter case 3: return true; // some case 5: return val; // find case 6: return key; // findKey case 7: result[res[0]] = res[1]; // mapPairs } else if(IS_EVERY)return false; // every } } return TYPE == 3 || IS_EVERY ? IS_EVERY : result; }; }; var findKey = createDictMethod(6); var createDictIter = function(kind){ return function(it){ return new DictIterator(it, kind); }; }; var DictIterator = function(iterated, kind){ this._t = toIObject(iterated); // target this._a = getKeys(iterated); // keys this._i = 0; // next index this._k = kind; // kind }; $iterCreate(DictIterator, 'Dict', function(){ var that = this , O = that._t , keys = that._a , kind = that._k , key; do { if(that._i >= keys.length){ that._t = undefined; return step(1); } } while(!has(O, key = keys[that._i++])); if(kind == 'keys' )return step(0, key); if(kind == 'values')return step(0, O[key]); return step(0, [key, O[key]]); }); function Dict(iterable){ var dict = create(null); if(iterable != undefined){ if(isIterable(iterable)){ forOf(iterable, true, function(key, value){ dict[key] = value; }); } else assign(dict, iterable); } return dict; } Dict.prototype = null; function reduce(object, mapfn, init){ aFunction(mapfn); var O = toIObject(object) , keys = getKeys(O) , length = keys.length , i = 0 , memo, key; if(arguments.length < 3){ if(!length)throw TypeError('Reduce of empty object with no initial value'); memo = O[keys[i++]]; } else memo = Object(init); while(length > i)if(has(O, key = keys[i++])){ memo = mapfn(memo, O[key], key, object); } return memo; } function includes(object, el){ return (el == el ? keyOf(object, el) : findKey(object, function(it){ return it != it; })) !== undefined; } function get(object, key){ if(has(object, key))return object[key]; } function set(object, key, value){ if(DESCRIPTORS && key in Object)dP.f(object, key, createDesc(0, value)); else object[key] = value; return object; } function isDict(it){ return isObject(it) && getPrototypeOf(it) === Dict.prototype; } $export($export.G + $export.F, {Dict: Dict}); $export($export.S, 'Dict', { keys: createDictIter('keys'), values: createDictIter('values'), entries: createDictIter('entries'), forEach: createDictMethod(0), map: createDictMethod(1), filter: createDictMethod(2), some: createDictMethod(3), every: createDictMethod(4), find: createDictMethod(5), findKey: findKey, mapPairs: createDictMethod(7), reduce: reduce, keyOf: keyOf, includes: includes, has: has, get: get, set: set, isDict: isDict });core-js-2.4.1/modules/core.function.part.js000066400000000000000000000003161274277553300206260ustar00rootroot00000000000000var path = require('./_path') , $export = require('./_export'); // Placeholder require('./_core')._ = path._ = path._ || {}; $export($export.P + $export.F, 'Function', {part: require('./_partial')});core-js-2.4.1/modules/core.get-iterator-method.js000066400000000000000000000004451274277553300217230ustar00rootroot00000000000000var classof = require('./_classof') , ITERATOR = require('./_wks')('iterator') , Iterators = require('./_iterators'); module.exports = require('./_core').getIteratorMethod = function(it){ if(it != undefined)return it[ITERATOR] || it['@@iterator'] || Iterators[classof(it)]; };core-js-2.4.1/modules/core.get-iterator.js000066400000000000000000000004471274277553300204470ustar00rootroot00000000000000var anObject = require('./_an-object') , get = require('./core.get-iterator-method'); module.exports = require('./_core').getIterator = function(it){ var iterFn = get(it); if(typeof iterFn != 'function')throw TypeError(it + ' is not iterable!'); return anObject(iterFn.call(it)); };core-js-2.4.1/modules/core.is-iterable.js000066400000000000000000000004751274277553300202420ustar00rootroot00000000000000var classof = require('./_classof') , ITERATOR = require('./_wks')('iterator') , Iterators = require('./_iterators'); module.exports = require('./_core').isIterable = function(it){ var O = Object(it); return O[ITERATOR] !== undefined || '@@iterator' in O || Iterators.hasOwnProperty(classof(O)); };core-js-2.4.1/modules/core.number.iterator.js000066400000000000000000000003561274277553300211600ustar00rootroot00000000000000'use strict'; require('./_iter-define')(Number, 'Number', function(iterated){ this._l = +iterated; this._i = 0; }, function(){ var i = this._i++ , done = !(i < this._l); return {done: done, value: done ? undefined : i}; });core-js-2.4.1/modules/core.object.classof.js000066400000000000000000000001601274277553300207300ustar00rootroot00000000000000var $export = require('./_export'); $export($export.S + $export.F, 'Object', {classof: require('./_classof')});core-js-2.4.1/modules/core.object.define.js000066400000000000000000000002121274277553300205260ustar00rootroot00000000000000var $export = require('./_export') , define = require('./_object-define'); $export($export.S + $export.F, 'Object', {define: define});core-js-2.4.1/modules/core.object.is-object.js000066400000000000000000000001631274277553300211600ustar00rootroot00000000000000var $export = require('./_export'); $export($export.S + $export.F, 'Object', {isObject: require('./_is-object')});core-js-2.4.1/modules/core.object.make.js000066400000000000000000000003641274277553300202210ustar00rootroot00000000000000var $export = require('./_export') , define = require('./_object-define') , create = require('./_object-create'); $export($export.S + $export.F, 'Object', { make: function(proto, mixin){ return define(create(proto), mixin); } });core-js-2.4.1/modules/core.regexp.escape.js000066400000000000000000000003501274277553300205630ustar00rootroot00000000000000// https://github.com/benjamingr/RexExp.escape var $export = require('./_export') , $re = require('./_replacer')(/[\\^$*+?.()|[\]{}]/g, '\\$&'); $export($export.S, 'RegExp', {escape: function escape(it){ return $re(it); }}); core-js-2.4.1/modules/core.string.escape-html.js000066400000000000000000000004301274277553300215400ustar00rootroot00000000000000'use strict'; var $export = require('./_export'); var $re = require('./_replacer')(/[&<>"']/g, { '&': '&', '<': '<', '>': '>', '"': '"', "'": ''' }); $export($export.P + $export.F, 'String', {escapeHTML: function escapeHTML(){ return $re(this); }});core-js-2.4.1/modules/core.string.unescape-html.js000066400000000000000000000004641274277553300221120ustar00rootroot00000000000000'use strict'; var $export = require('./_export'); var $re = require('./_replacer')(/&(?:amp|lt|gt|quot|apos);/g, { '&': '&', '<': '<', '>': '>', '"': '"', ''': "'" }); $export($export.P + $export.F, 'String', {unescapeHTML: function unescapeHTML(){ return $re(this); }});core-js-2.4.1/modules/es5.js000066400000000000000000000023311274277553300156000ustar00rootroot00000000000000// This file still here for a legacy code and will be removed in a near time require('./es6.object.create'); require('./es6.object.define-property'); require('./es6.object.define-properties'); require('./es6.object.get-own-property-descriptor'); require('./es6.object.get-prototype-of'); require('./es6.object.keys'); require('./es6.object.get-own-property-names'); require('./es6.object.freeze'); require('./es6.object.seal'); require('./es6.object.prevent-extensions'); require('./es6.object.is-frozen'); require('./es6.object.is-sealed'); require('./es6.object.is-extensible'); require('./es6.function.bind'); require('./es6.array.is-array'); require('./es6.array.join'); require('./es6.array.slice'); require('./es6.array.sort'); require('./es6.array.for-each'); require('./es6.array.map'); require('./es6.array.filter'); require('./es6.array.some'); require('./es6.array.every'); require('./es6.array.reduce'); require('./es6.array.reduce-right'); require('./es6.array.index-of'); require('./es6.array.last-index-of'); require('./es6.date.now'); require('./es6.date.to-iso-string'); require('./es6.date.to-json'); require('./es6.parse-int'); require('./es6.parse-float'); require('./es6.string.trim'); require('./es6.regexp.to-string');core-js-2.4.1/modules/es6.array.copy-within.js000066400000000000000000000003521274277553300211700ustar00rootroot00000000000000// 22.1.3.3 Array.prototype.copyWithin(target, start, end = this.length) var $export = require('./_export'); $export($export.P, 'Array', {copyWithin: require('./_array-copy-within')}); require('./_add-to-unscopables')('copyWithin');core-js-2.4.1/modules/es6.array.every.js000066400000000000000000000005601274277553300200510ustar00rootroot00000000000000'use strict'; var $export = require('./_export') , $every = require('./_array-methods')(4); $export($export.P + $export.F * !require('./_strict-method')([].every, true), 'Array', { // 22.1.3.5 / 15.4.4.16 Array.prototype.every(callbackfn [, thisArg]) every: function every(callbackfn /* , thisArg */){ return $every(this, callbackfn, arguments[1]); } });core-js-2.4.1/modules/es6.array.fill.js000066400000000000000000000003241274277553300176430ustar00rootroot00000000000000// 22.1.3.6 Array.prototype.fill(value, start = 0, end = this.length) var $export = require('./_export'); $export($export.P, 'Array', {fill: require('./_array-fill')}); require('./_add-to-unscopables')('fill');core-js-2.4.1/modules/es6.array.filter.js000066400000000000000000000005651274277553300202110ustar00rootroot00000000000000'use strict'; var $export = require('./_export') , $filter = require('./_array-methods')(2); $export($export.P + $export.F * !require('./_strict-method')([].filter, true), 'Array', { // 22.1.3.7 / 15.4.4.20 Array.prototype.filter(callbackfn [, thisArg]) filter: function filter(callbackfn /* , thisArg */){ return $filter(this, callbackfn, arguments[1]); } });core-js-2.4.1/modules/es6.array.find-index.js000066400000000000000000000010371274277553300207440ustar00rootroot00000000000000'use strict'; // 22.1.3.9 Array.prototype.findIndex(predicate, thisArg = undefined) var $export = require('./_export') , $find = require('./_array-methods')(6) , KEY = 'findIndex' , forced = true; // Shouldn't skip holes if(KEY in [])Array(1)[KEY](function(){ forced = false; }); $export($export.P + $export.F * forced, 'Array', { findIndex: function findIndex(callbackfn/*, that = undefined */){ return $find(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined); } }); require('./_add-to-unscopables')(KEY);core-js-2.4.1/modules/es6.array.find.js000066400000000000000000000010131274277553300176310ustar00rootroot00000000000000'use strict'; // 22.1.3.8 Array.prototype.find(predicate, thisArg = undefined) var $export = require('./_export') , $find = require('./_array-methods')(5) , KEY = 'find' , forced = true; // Shouldn't skip holes if(KEY in [])Array(1)[KEY](function(){ forced = false; }); $export($export.P + $export.F * forced, 'Array', { find: function find(callbackfn/*, that = undefined */){ return $find(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined); } }); require('./_add-to-unscopables')(KEY);core-js-2.4.1/modules/es6.array.for-each.js000066400000000000000000000006231274277553300204030ustar00rootroot00000000000000'use strict'; var $export = require('./_export') , $forEach = require('./_array-methods')(0) , STRICT = require('./_strict-method')([].forEach, true); $export($export.P + $export.F * !STRICT, 'Array', { // 22.1.3.10 / 15.4.4.18 Array.prototype.forEach(callbackfn [, thisArg]) forEach: function forEach(callbackfn /* , thisArg */){ return $forEach(this, callbackfn, arguments[1]); } });core-js-2.4.1/modules/es6.array.from.js000066400000000000000000000032111274277553300176560ustar00rootroot00000000000000'use strict'; var ctx = require('./_ctx') , $export = require('./_export') , toObject = require('./_to-object') , call = require('./_iter-call') , isArrayIter = require('./_is-array-iter') , toLength = require('./_to-length') , createProperty = require('./_create-property') , getIterFn = require('./core.get-iterator-method'); $export($export.S + $export.F * !require('./_iter-detect')(function(iter){ Array.from(iter); }), 'Array', { // 22.1.2.1 Array.from(arrayLike, mapfn = undefined, thisArg = undefined) from: function from(arrayLike/*, mapfn = undefined, thisArg = undefined*/){ var O = toObject(arrayLike) , C = typeof this == 'function' ? this : Array , aLen = arguments.length , mapfn = aLen > 1 ? arguments[1] : undefined , mapping = mapfn !== undefined , index = 0 , iterFn = getIterFn(O) , length, result, step, iterator; if(mapping)mapfn = ctx(mapfn, aLen > 2 ? arguments[2] : undefined, 2); // if object isn't iterable or it's array with default iterator - use simple case if(iterFn != undefined && !(C == Array && isArrayIter(iterFn))){ for(iterator = iterFn.call(O), result = new C; !(step = iterator.next()).done; index++){ createProperty(result, index, mapping ? call(iterator, mapfn, [step.value, index], true) : step.value); } } else { length = toLength(O.length); for(result = new C(length); length > index; index++){ createProperty(result, index, mapping ? mapfn(O[index], index) : O[index]); } } result.length = index; return result; } }); core-js-2.4.1/modules/es6.array.index-of.js000066400000000000000000000011351274277553300204270ustar00rootroot00000000000000'use strict'; var $export = require('./_export') , $indexOf = require('./_array-includes')(false) , $native = [].indexOf , NEGATIVE_ZERO = !!$native && 1 / [1].indexOf(1, -0) < 0; $export($export.P + $export.F * (NEGATIVE_ZERO || !require('./_strict-method')($native)), 'Array', { // 22.1.3.11 / 15.4.4.14 Array.prototype.indexOf(searchElement [, fromIndex]) indexOf: function indexOf(searchElement /*, fromIndex = 0 */){ return NEGATIVE_ZERO // convert -0 to +0 ? $native.apply(this, arguments) || 0 : $indexOf(this, searchElement, arguments[1]); } });core-js-2.4.1/modules/es6.array.is-array.js000066400000000000000000000002161274277553300204440ustar00rootroot00000000000000// 22.1.2.2 / 15.4.3.2 Array.isArray(arg) var $export = require('./_export'); $export($export.S, 'Array', {isArray: require('./_is-array')});core-js-2.4.1/modules/es6.array.iterator.js000066400000000000000000000021551274277553300205520ustar00rootroot00000000000000'use strict'; var addToUnscopables = require('./_add-to-unscopables') , step = require('./_iter-step') , Iterators = require('./_iterators') , toIObject = require('./_to-iobject'); // 22.1.3.4 Array.prototype.entries() // 22.1.3.13 Array.prototype.keys() // 22.1.3.29 Array.prototype.values() // 22.1.3.30 Array.prototype[@@iterator]() module.exports = require('./_iter-define')(Array, 'Array', function(iterated, kind){ this._t = toIObject(iterated); // target this._i = 0; // next index this._k = kind; // kind // 22.1.5.2.1 %ArrayIteratorPrototype%.next() }, function(){ var O = this._t , kind = this._k , index = this._i++; if(!O || index >= O.length){ this._t = undefined; return step(1); } if(kind == 'keys' )return step(0, index); if(kind == 'values')return step(0, O[index]); return step(0, [index, O[index]]); }, 'values'); // argumentsList[@@iterator] is %ArrayProto_values% (9.4.4.6, 9.4.4.7) Iterators.Arguments = Iterators.Array; addToUnscopables('keys'); addToUnscopables('values'); addToUnscopables('entries');core-js-2.4.1/modules/es6.array.join.js000066400000000000000000000007031274277553300176550ustar00rootroot00000000000000'use strict'; // 22.1.3.13 Array.prototype.join(separator) var $export = require('./_export') , toIObject = require('./_to-iobject') , arrayJoin = [].join; // fallback for not array-like strings $export($export.P + $export.F * (require('./_iobject') != Object || !require('./_strict-method')(arrayJoin)), 'Array', { join: function join(separator){ return arrayJoin.call(toIObject(this), separator === undefined ? ',' : separator); } });core-js-2.4.1/modules/es6.array.last-index-of.js000066400000000000000000000017151274277553300213740ustar00rootroot00000000000000'use strict'; var $export = require('./_export') , toIObject = require('./_to-iobject') , toInteger = require('./_to-integer') , toLength = require('./_to-length') , $native = [].lastIndexOf , NEGATIVE_ZERO = !!$native && 1 / [1].lastIndexOf(1, -0) < 0; $export($export.P + $export.F * (NEGATIVE_ZERO || !require('./_strict-method')($native)), 'Array', { // 22.1.3.14 / 15.4.4.15 Array.prototype.lastIndexOf(searchElement [, fromIndex]) lastIndexOf: function lastIndexOf(searchElement /*, fromIndex = @[*-1] */){ // convert -0 to +0 if(NEGATIVE_ZERO)return $native.apply(this, arguments) || 0; var O = toIObject(this) , length = toLength(O.length) , index = length - 1; if(arguments.length > 1)index = Math.min(index, toInteger(arguments[1])); if(index < 0)index = length + index; for(;index >= 0; index--)if(index in O)if(O[index] === searchElement)return index || 0; return -1; } });core-js-2.4.1/modules/es6.array.map.js000066400000000000000000000005471274277553300175010ustar00rootroot00000000000000'use strict'; var $export = require('./_export') , $map = require('./_array-methods')(1); $export($export.P + $export.F * !require('./_strict-method')([].map, true), 'Array', { // 22.1.3.15 / 15.4.4.19 Array.prototype.map(callbackfn [, thisArg]) map: function map(callbackfn /* , thisArg */){ return $map(this, callbackfn, arguments[1]); } });core-js-2.4.1/modules/es6.array.of.js000066400000000000000000000011271274277553300173230ustar00rootroot00000000000000'use strict'; var $export = require('./_export') , createProperty = require('./_create-property'); // WebKit Array.of isn't generic $export($export.S + $export.F * require('./_fails')(function(){ function F(){} return !(Array.of.call(F) instanceof F); }), 'Array', { // 22.1.2.3 Array.of( ...items) of: function of(/* ...args */){ var index = 0 , aLen = arguments.length , result = new (typeof this == 'function' ? this : Array)(aLen); while(aLen > index)createProperty(result, index, arguments[index++]); result.length = aLen; return result; } });core-js-2.4.1/modules/es6.array.reduce-right.js000066400000000000000000000006501274277553300213010ustar00rootroot00000000000000'use strict'; var $export = require('./_export') , $reduce = require('./_array-reduce'); $export($export.P + $export.F * !require('./_strict-method')([].reduceRight, true), 'Array', { // 22.1.3.19 / 15.4.4.22 Array.prototype.reduceRight(callbackfn [, initialValue]) reduceRight: function reduceRight(callbackfn /* , initialValue */){ return $reduce(this, callbackfn, arguments.length, arguments[1], true); } });core-js-2.4.1/modules/es6.array.reduce.js000066400000000000000000000006251274277553300201700ustar00rootroot00000000000000'use strict'; var $export = require('./_export') , $reduce = require('./_array-reduce'); $export($export.P + $export.F * !require('./_strict-method')([].reduce, true), 'Array', { // 22.1.3.18 / 15.4.4.21 Array.prototype.reduce(callbackfn [, initialValue]) reduce: function reduce(callbackfn /* , initialValue */){ return $reduce(this, callbackfn, arguments.length, arguments[1], false); } });core-js-2.4.1/modules/es6.array.slice.js000066400000000000000000000016151274277553300200200ustar00rootroot00000000000000'use strict'; var $export = require('./_export') , html = require('./_html') , cof = require('./_cof') , toIndex = require('./_to-index') , toLength = require('./_to-length') , arraySlice = [].slice; // fallback for not array-like ES3 strings and DOM objects $export($export.P + $export.F * require('./_fails')(function(){ if(html)arraySlice.call(html); }), 'Array', { slice: function slice(begin, end){ var len = toLength(this.length) , klass = cof(this); end = end === undefined ? len : end; if(klass == 'Array')return arraySlice.call(this, begin, end); var start = toIndex(begin, len) , upTo = toIndex(end, len) , size = toLength(upTo - start) , cloned = Array(size) , i = 0; for(; i < size; i++)cloned[i] = klass == 'String' ? this.charAt(start + i) : this[start + i]; return cloned; } });core-js-2.4.1/modules/es6.array.some.js000066400000000000000000000005541274277553300176650ustar00rootroot00000000000000'use strict'; var $export = require('./_export') , $some = require('./_array-methods')(3); $export($export.P + $export.F * !require('./_strict-method')([].some, true), 'Array', { // 22.1.3.23 / 15.4.4.17 Array.prototype.some(callbackfn [, thisArg]) some: function some(callbackfn /* , thisArg */){ return $some(this, callbackfn, arguments[1]); } });core-js-2.4.1/modules/es6.array.sort.js000066400000000000000000000012101274277553300176770ustar00rootroot00000000000000'use strict'; var $export = require('./_export') , aFunction = require('./_a-function') , toObject = require('./_to-object') , fails = require('./_fails') , $sort = [].sort , test = [1, 2, 3]; $export($export.P + $export.F * (fails(function(){ // IE8- test.sort(undefined); }) || !fails(function(){ // V8 bug test.sort(null); // Old WebKit }) || !require('./_strict-method')($sort)), 'Array', { // 22.1.3.25 Array.prototype.sort(comparefn) sort: function sort(comparefn){ return comparefn === undefined ? $sort.call(toObject(this)) : $sort.call(toObject(this), aFunction(comparefn)); } });core-js-2.4.1/modules/es6.array.species.js000066400000000000000000000000431274277553300203460ustar00rootroot00000000000000require('./_set-species')('Array');core-js-2.4.1/modules/es6.date.now.js000066400000000000000000000002251274277553300173170ustar00rootroot00000000000000// 20.3.3.1 / 15.9.4.4 Date.now() var $export = require('./_export'); $export($export.S, 'Date', {now: function(){ return new Date().getTime(); }});core-js-2.4.1/modules/es6.date.to-iso-string.js000066400000000000000000000017611274277553300212400ustar00rootroot00000000000000'use strict'; // 20.3.4.36 / 15.9.5.43 Date.prototype.toISOString() var $export = require('./_export') , fails = require('./_fails') , getTime = Date.prototype.getTime; var lz = function(num){ return num > 9 ? num : '0' + num; }; // PhantomJS / old WebKit has a broken implementations $export($export.P + $export.F * (fails(function(){ return new Date(-5e13 - 1).toISOString() != '0385-07-25T07:06:39.999Z'; }) || !fails(function(){ new Date(NaN).toISOString(); })), 'Date', { toISOString: function toISOString(){ if(!isFinite(getTime.call(this)))throw RangeError('Invalid time value'); var d = this , y = d.getUTCFullYear() , m = d.getUTCMilliseconds() , s = y < 0 ? '-' : y > 9999 ? '+' : ''; return s + ('00000' + Math.abs(y)).slice(s ? -6 : -4) + '-' + lz(d.getUTCMonth() + 1) + '-' + lz(d.getUTCDate()) + 'T' + lz(d.getUTCHours()) + ':' + lz(d.getUTCMinutes()) + ':' + lz(d.getUTCSeconds()) + '.' + (m > 99 ? m : '0' + lz(m)) + 'Z'; } });core-js-2.4.1/modules/es6.date.to-json.js000066400000000000000000000007761274277553300201200ustar00rootroot00000000000000'use strict'; var $export = require('./_export') , toObject = require('./_to-object') , toPrimitive = require('./_to-primitive'); $export($export.P + $export.F * require('./_fails')(function(){ return new Date(NaN).toJSON() !== null || Date.prototype.toJSON.call({toISOString: function(){ return 1; }}) !== 1; }), 'Date', { toJSON: function toJSON(key){ var O = toObject(this) , pv = toPrimitive(O); return typeof pv == 'number' && !isFinite(pv) ? null : O.toISOString(); } });core-js-2.4.1/modules/es6.date.to-primitive.js000066400000000000000000000002751274277553300211510ustar00rootroot00000000000000var TO_PRIMITIVE = require('./_wks')('toPrimitive') , proto = Date.prototype; if(!(TO_PRIMITIVE in proto))require('./_hide')(proto, TO_PRIMITIVE, require('./_date-to-primitive'));core-js-2.4.1/modules/es6.date.to-string.js000066400000000000000000000006111274277553300204410ustar00rootroot00000000000000var DateProto = Date.prototype , INVALID_DATE = 'Invalid Date' , TO_STRING = 'toString' , $toString = DateProto[TO_STRING] , getTime = DateProto.getTime; if(new Date(NaN) + '' != INVALID_DATE){ require('./_redefine')(DateProto, TO_STRING, function toString(){ var value = getTime.call(this); return value === value ? $toString.call(this) : INVALID_DATE; }); }core-js-2.4.1/modules/es6.function.bind.js000066400000000000000000000002411274277553300203360ustar00rootroot00000000000000// 19.2.3.2 / 15.3.4.5 Function.prototype.bind(thisArg, args...) var $export = require('./_export'); $export($export.P, 'Function', {bind: require('./_bind')});core-js-2.4.1/modules/es6.function.has-instance.js000066400000000000000000000012171274277553300220030ustar00rootroot00000000000000'use strict'; var isObject = require('./_is-object') , getPrototypeOf = require('./_object-gpo') , HAS_INSTANCE = require('./_wks')('hasInstance') , FunctionProto = Function.prototype; // 19.2.3.6 Function.prototype[@@hasInstance](V) if(!(HAS_INSTANCE in FunctionProto))require('./_object-dp').f(FunctionProto, HAS_INSTANCE, {value: function(O){ if(typeof this != 'function' || !isObject(O))return false; if(!isObject(this.prototype))return O instanceof this; // for environment w/o native `@@hasInstance` logic enough `instanceof`, but add this: while(O = getPrototypeOf(O))if(this.prototype === O)return true; return false; }});core-js-2.4.1/modules/es6.function.name.js000066400000000000000000000012141274277553300203430ustar00rootroot00000000000000var dP = require('./_object-dp').f , createDesc = require('./_property-desc') , has = require('./_has') , FProto = Function.prototype , nameRE = /^\s*function ([^ (]*)/ , NAME = 'name'; var isExtensible = Object.isExtensible || function(){ return true; }; // 19.2.4.2 name NAME in FProto || require('./_descriptors') && dP(FProto, NAME, { configurable: true, get: function(){ try { var that = this , name = ('' + that).match(nameRE)[1]; has(that, NAME) || !isExtensible(that) || dP(that, NAME, createDesc(5, name)); return name; } catch(e){ return ''; } } });core-js-2.4.1/modules/es6.map.js000066400000000000000000000010351274277553300163550ustar00rootroot00000000000000'use strict'; var strong = require('./_collection-strong'); // 23.1 Map Objects module.exports = require('./_collection')('Map', function(get){ return function Map(){ return get(this, arguments.length > 0 ? arguments[0] : undefined); }; }, { // 23.1.3.6 Map.prototype.get(key) get: function get(key){ var entry = strong.getEntry(this, key); return entry && entry.v; }, // 23.1.3.9 Map.prototype.set(key, value) set: function set(key, value){ return strong.def(this, key === 0 ? 0 : key, value); } }, strong, true);core-js-2.4.1/modules/es6.math.acosh.js000066400000000000000000000010751274277553300176310ustar00rootroot00000000000000// 20.2.2.3 Math.acosh(x) var $export = require('./_export') , log1p = require('./_math-log1p') , sqrt = Math.sqrt , $acosh = Math.acosh; $export($export.S + $export.F * !($acosh // V8 bug: https://code.google.com/p/v8/issues/detail?id=3509 && Math.floor($acosh(Number.MAX_VALUE)) == 710 // Tor Browser bug: Math.acosh(Infinity) -> NaN && $acosh(Infinity) == Infinity ), 'Math', { acosh: function acosh(x){ return (x = +x) < 1 ? NaN : x > 94906265.62425156 ? Math.log(x) + Math.LN2 : log1p(x - 1 + sqrt(x - 1) * sqrt(x + 1)); } });core-js-2.4.1/modules/es6.math.asinh.js000066400000000000000000000005231274277553300176330ustar00rootroot00000000000000// 20.2.2.5 Math.asinh(x) var $export = require('./_export') , $asinh = Math.asinh; function asinh(x){ return !isFinite(x = +x) || x == 0 ? x : x < 0 ? -asinh(-x) : Math.log(x + Math.sqrt(x * x + 1)); } // Tor Browser bug: Math.asinh(0) -> -0 $export($export.S + $export.F * !($asinh && 1 / $asinh(0) > 0), 'Math', {asinh: asinh});core-js-2.4.1/modules/es6.math.atanh.js000066400000000000000000000004571274277553300176320ustar00rootroot00000000000000// 20.2.2.7 Math.atanh(x) var $export = require('./_export') , $atanh = Math.atanh; // Tor Browser bug: Math.atanh(-0) -> 0 $export($export.S + $export.F * !($atanh && 1 / $atanh(-0) < 0), 'Math', { atanh: function atanh(x){ return (x = +x) == 0 ? x : Math.log((1 + x) / (1 - x)) / 2; } });core-js-2.4.1/modules/es6.math.cbrt.js000066400000000000000000000003321274277553300174610ustar00rootroot00000000000000// 20.2.2.9 Math.cbrt(x) var $export = require('./_export') , sign = require('./_math-sign'); $export($export.S, 'Math', { cbrt: function cbrt(x){ return sign(x = +x) * Math.pow(Math.abs(x), 1 / 3); } });core-js-2.4.1/modules/es6.math.clz32.js000066400000000000000000000003161274277553300174660ustar00rootroot00000000000000// 20.2.2.11 Math.clz32(x) var $export = require('./_export'); $export($export.S, 'Math', { clz32: function clz32(x){ return (x >>>= 0) ? 31 - Math.floor(Math.log(x + 0.5) * Math.LOG2E) : 32; } });core-js-2.4.1/modules/es6.math.cosh.js000066400000000000000000000002741274277553300174700ustar00rootroot00000000000000// 20.2.2.12 Math.cosh(x) var $export = require('./_export') , exp = Math.exp; $export($export.S, 'Math', { cosh: function cosh(x){ return (exp(x = +x) + exp(-x)) / 2; } });core-js-2.4.1/modules/es6.math.expm1.js000066400000000000000000000002701274277553300175620ustar00rootroot00000000000000// 20.2.2.14 Math.expm1(x) var $export = require('./_export') , $expm1 = require('./_math-expm1'); $export($export.S + $export.F * ($expm1 != Math.expm1), 'Math', {expm1: $expm1});core-js-2.4.1/modules/es6.math.fround.js000066400000000000000000000013471274277553300200330ustar00rootroot00000000000000// 20.2.2.16 Math.fround(x) var $export = require('./_export') , sign = require('./_math-sign') , pow = Math.pow , EPSILON = pow(2, -52) , EPSILON32 = pow(2, -23) , MAX32 = pow(2, 127) * (2 - EPSILON32) , MIN32 = pow(2, -126); var roundTiesToEven = function(n){ return n + 1 / EPSILON - 1 / EPSILON; }; $export($export.S, 'Math', { fround: function fround(x){ var $abs = Math.abs(x) , $sign = sign(x) , a, result; if($abs < MIN32)return $sign * roundTiesToEven($abs / MIN32 / EPSILON32) * MIN32 * EPSILON32; a = (1 + EPSILON32 / EPSILON) * $abs; result = a - (a - $abs); if(result > MAX32 || result != result)return $sign * Infinity; return $sign * result; } });core-js-2.4.1/modules/es6.math.hypot.js000066400000000000000000000012261274277553300176750ustar00rootroot00000000000000// 20.2.2.17 Math.hypot([value1[, value2[, … ]]]) var $export = require('./_export') , abs = Math.abs; $export($export.S, 'Math', { hypot: function hypot(value1, value2){ // eslint-disable-line no-unused-vars var sum = 0 , i = 0 , aLen = arguments.length , larg = 0 , arg, div; while(i < aLen){ arg = abs(arguments[i++]); if(larg < arg){ div = larg / arg; sum = sum * div * div + 1; larg = arg; } else if(arg > 0){ div = arg / larg; sum += div * div; } else sum += arg; } return larg === Infinity ? Infinity : larg * Math.sqrt(sum); } });core-js-2.4.1/modules/es6.math.imul.js000066400000000000000000000010241274277553300174740ustar00rootroot00000000000000// 20.2.2.18 Math.imul(x, y) var $export = require('./_export') , $imul = Math.imul; // some WebKit versions fails with big numbers, some has wrong arity $export($export.S + $export.F * require('./_fails')(function(){ return $imul(0xffffffff, 5) != -5 || $imul.length != 2; }), 'Math', { imul: function imul(x, y){ var UINT16 = 0xffff , xn = +x , yn = +y , xl = UINT16 & xn , yl = UINT16 & yn; return 0 | xl * yl + ((UINT16 & xn >>> 16) * yl + xl * (UINT16 & yn >>> 16) << 16 >>> 0); } });core-js-2.4.1/modules/es6.math.log10.js000066400000000000000000000002441274277553300174530ustar00rootroot00000000000000// 20.2.2.21 Math.log10(x) var $export = require('./_export'); $export($export.S, 'Math', { log10: function log10(x){ return Math.log(x) / Math.LN10; } });core-js-2.4.1/modules/es6.math.log1p.js000066400000000000000000000001761274277553300175570ustar00rootroot00000000000000// 20.2.2.20 Math.log1p(x) var $export = require('./_export'); $export($export.S, 'Math', {log1p: require('./_math-log1p')});core-js-2.4.1/modules/es6.math.log2.js000066400000000000000000000002401274277553300173700ustar00rootroot00000000000000// 20.2.2.22 Math.log2(x) var $export = require('./_export'); $export($export.S, 'Math', { log2: function log2(x){ return Math.log(x) / Math.LN2; } });core-js-2.4.1/modules/es6.math.sign.js000066400000000000000000000001731274277553300174720ustar00rootroot00000000000000// 20.2.2.28 Math.sign(x) var $export = require('./_export'); $export($export.S, 'Math', {sign: require('./_math-sign')});core-js-2.4.1/modules/es6.math.sinh.js000066400000000000000000000007061274277553300174750ustar00rootroot00000000000000// 20.2.2.30 Math.sinh(x) var $export = require('./_export') , expm1 = require('./_math-expm1') , exp = Math.exp; // V8 near Chromium 38 has a problem with very small numbers $export($export.S + $export.F * require('./_fails')(function(){ return !Math.sinh(-2e-17) != -2e-17; }), 'Math', { sinh: function sinh(x){ return Math.abs(x = +x) < 1 ? (expm1(x) - expm1(-x)) / 2 : (exp(x - 1) - exp(-x - 1)) * (Math.E / 2); } });core-js-2.4.1/modules/es6.math.tanh.js000066400000000000000000000004761274277553300174720ustar00rootroot00000000000000// 20.2.2.33 Math.tanh(x) var $export = require('./_export') , expm1 = require('./_math-expm1') , exp = Math.exp; $export($export.S, 'Math', { tanh: function tanh(x){ var a = expm1(x = +x) , b = expm1(-x); return a == Infinity ? 1 : b == Infinity ? -1 : (a - b) / (exp(x) + exp(-x)); } });core-js-2.4.1/modules/es6.math.trunc.js000066400000000000000000000002631274277553300176650ustar00rootroot00000000000000// 20.2.2.34 Math.trunc(x) var $export = require('./_export'); $export($export.S, 'Math', { trunc: function trunc(it){ return (it > 0 ? Math.floor : Math.ceil)(it); } });core-js-2.4.1/modules/es6.number.constructor.js000066400000000000000000000055661274277553300214710ustar00rootroot00000000000000'use strict'; var global = require('./_global') , has = require('./_has') , cof = require('./_cof') , inheritIfRequired = require('./_inherit-if-required') , toPrimitive = require('./_to-primitive') , fails = require('./_fails') , gOPN = require('./_object-gopn').f , gOPD = require('./_object-gopd').f , dP = require('./_object-dp').f , $trim = require('./_string-trim').trim , NUMBER = 'Number' , $Number = global[NUMBER] , Base = $Number , proto = $Number.prototype // Opera ~12 has broken Object#toString , BROKEN_COF = cof(require('./_object-create')(proto)) == NUMBER , TRIM = 'trim' in String.prototype; // 7.1.3 ToNumber(argument) var toNumber = function(argument){ var it = toPrimitive(argument, false); if(typeof it == 'string' && it.length > 2){ it = TRIM ? it.trim() : $trim(it, 3); var first = it.charCodeAt(0) , third, radix, maxCode; if(first === 43 || first === 45){ third = it.charCodeAt(2); if(third === 88 || third === 120)return NaN; // Number('+0x1') should be NaN, old V8 fix } else if(first === 48){ switch(it.charCodeAt(1)){ case 66 : case 98 : radix = 2; maxCode = 49; break; // fast equal /^0b[01]+$/i case 79 : case 111 : radix = 8; maxCode = 55; break; // fast equal /^0o[0-7]+$/i default : return +it; } for(var digits = it.slice(2), i = 0, l = digits.length, code; i < l; i++){ code = digits.charCodeAt(i); // parseInt parses a string to a first unavailable symbol // but ToNumber should return NaN if a string contains unavailable symbols if(code < 48 || code > maxCode)return NaN; } return parseInt(digits, radix); } } return +it; }; if(!$Number(' 0o1') || !$Number('0b1') || $Number('+0x1')){ $Number = function Number(value){ var it = arguments.length < 1 ? 0 : value , that = this; return that instanceof $Number // check on 1..constructor(foo) case && (BROKEN_COF ? fails(function(){ proto.valueOf.call(that); }) : cof(that) != NUMBER) ? inheritIfRequired(new Base(toNumber(it)), that, $Number) : toNumber(it); }; for(var keys = require('./_descriptors') ? gOPN(Base) : ( // ES3: 'MAX_VALUE,MIN_VALUE,NaN,NEGATIVE_INFINITY,POSITIVE_INFINITY,' + // ES6 (in case, if modules with ES6 Number statics required before): 'EPSILON,isFinite,isInteger,isNaN,isSafeInteger,MAX_SAFE_INTEGER,' + 'MIN_SAFE_INTEGER,parseFloat,parseInt,isInteger' ).split(','), j = 0, key; keys.length > j; j++){ if(has(Base, key = keys[j]) && !has($Number, key)){ dP($Number, key, gOPD(Base, key)); } } $Number.prototype = proto; proto.constructor = $Number; require('./_redefine')(global, NUMBER, $Number); }core-js-2.4.1/modules/es6.number.epsilon.js000066400000000000000000000001721274277553300205410ustar00rootroot00000000000000// 20.1.2.1 Number.EPSILON var $export = require('./_export'); $export($export.S, 'Number', {EPSILON: Math.pow(2, -52)});core-js-2.4.1/modules/es6.number.is-finite.js000066400000000000000000000003651274277553300207630ustar00rootroot00000000000000// 20.1.2.2 Number.isFinite(number) var $export = require('./_export') , _isFinite = require('./_global').isFinite; $export($export.S, 'Number', { isFinite: function isFinite(it){ return typeof it == 'number' && _isFinite(it); } });core-js-2.4.1/modules/es6.number.is-integer.js000066400000000000000000000002161274277553300211350ustar00rootroot00000000000000// 20.1.2.3 Number.isInteger(number) var $export = require('./_export'); $export($export.S, 'Number', {isInteger: require('./_is-integer')});core-js-2.4.1/modules/es6.number.is-nan.js000066400000000000000000000002521274277553300202540ustar00rootroot00000000000000// 20.1.2.4 Number.isNaN(number) var $export = require('./_export'); $export($export.S, 'Number', { isNaN: function isNaN(number){ return number != number; } });core-js-2.4.1/modules/es6.number.is-safe-integer.js000066400000000000000000000004521274277553300220530ustar00rootroot00000000000000// 20.1.2.5 Number.isSafeInteger(number) var $export = require('./_export') , isInteger = require('./_is-integer') , abs = Math.abs; $export($export.S, 'Number', { isSafeInteger: function isSafeInteger(number){ return isInteger(number) && abs(number) <= 0x1fffffffffffff; } });core-js-2.4.1/modules/es6.number.max-safe-integer.js000066400000000000000000000002141274277553300222210ustar00rootroot00000000000000// 20.1.2.6 Number.MAX_SAFE_INTEGER var $export = require('./_export'); $export($export.S, 'Number', {MAX_SAFE_INTEGER: 0x1fffffffffffff});core-js-2.4.1/modules/es6.number.min-safe-integer.js000066400000000000000000000002161274277553300222210ustar00rootroot00000000000000// 20.1.2.10 Number.MIN_SAFE_INTEGER var $export = require('./_export'); $export($export.S, 'Number', {MIN_SAFE_INTEGER: -0x1fffffffffffff});core-js-2.4.1/modules/es6.number.parse-float.js000066400000000000000000000003441274277553300213060ustar00rootroot00000000000000var $export = require('./_export') , $parseFloat = require('./_parse-float'); // 20.1.2.12 Number.parseFloat(string) $export($export.S + $export.F * (Number.parseFloat != $parseFloat), 'Number', {parseFloat: $parseFloat});core-js-2.4.1/modules/es6.number.parse-int.js000066400000000000000000000003331274277553300207710ustar00rootroot00000000000000var $export = require('./_export') , $parseInt = require('./_parse-int'); // 20.1.2.13 Number.parseInt(string, radix) $export($export.S + $export.F * (Number.parseInt != $parseInt), 'Number', {parseInt: $parseInt});core-js-2.4.1/modules/es6.number.to-fixed.js000066400000000000000000000052271274277553300206150ustar00rootroot00000000000000'use strict'; var $export = require('./_export') , toInteger = require('./_to-integer') , aNumberValue = require('./_a-number-value') , repeat = require('./_string-repeat') , $toFixed = 1..toFixed , floor = Math.floor , data = [0, 0, 0, 0, 0, 0] , ERROR = 'Number.toFixed: incorrect invocation!' , ZERO = '0'; var multiply = function(n, c){ var i = -1 , c2 = c; while(++i < 6){ c2 += n * data[i]; data[i] = c2 % 1e7; c2 = floor(c2 / 1e7); } }; var divide = function(n){ var i = 6 , c = 0; while(--i >= 0){ c += data[i]; data[i] = floor(c / n); c = (c % n) * 1e7; } }; var numToString = function(){ var i = 6 , s = ''; while(--i >= 0){ if(s !== '' || i === 0 || data[i] !== 0){ var t = String(data[i]); s = s === '' ? t : s + repeat.call(ZERO, 7 - t.length) + t; } } return s; }; var pow = function(x, n, acc){ return n === 0 ? acc : n % 2 === 1 ? pow(x, n - 1, acc * x) : pow(x * x, n / 2, acc); }; var log = function(x){ var n = 0 , x2 = x; while(x2 >= 4096){ n += 12; x2 /= 4096; } while(x2 >= 2){ n += 1; x2 /= 2; } return n; }; $export($export.P + $export.F * (!!$toFixed && ( 0.00008.toFixed(3) !== '0.000' || 0.9.toFixed(0) !== '1' || 1.255.toFixed(2) !== '1.25' || 1000000000000000128..toFixed(0) !== '1000000000000000128' ) || !require('./_fails')(function(){ // V8 ~ Android 4.3- $toFixed.call({}); })), 'Number', { toFixed: function toFixed(fractionDigits){ var x = aNumberValue(this, ERROR) , f = toInteger(fractionDigits) , s = '' , m = ZERO , e, z, j, k; if(f < 0 || f > 20)throw RangeError(ERROR); if(x != x)return 'NaN'; if(x <= -1e21 || x >= 1e21)return String(x); if(x < 0){ s = '-'; x = -x; } if(x > 1e-21){ e = log(x * pow(2, 69, 1)) - 69; z = e < 0 ? x * pow(2, -e, 1) : x / pow(2, e, 1); z *= 0x10000000000000; e = 52 - e; if(e > 0){ multiply(0, z); j = f; while(j >= 7){ multiply(1e7, 0); j -= 7; } multiply(pow(10, j, 1), 0); j = e - 1; while(j >= 23){ divide(1 << 23); j -= 23; } divide(1 << j); multiply(1, 1); divide(2); m = numToString(); } else { multiply(0, z); multiply(1 << -e, 0); m = numToString() + repeat.call(ZERO, f); } } if(f > 0){ k = m.length; m = s + (k <= f ? '0.' + repeat.call(ZERO, f - k) + m : m.slice(0, k - f) + '.' + m.slice(k - f)); } else { m = s + m; } return m; } });core-js-2.4.1/modules/es6.number.to-precision.js000066400000000000000000000011471274277553300215060ustar00rootroot00000000000000'use strict'; var $export = require('./_export') , $fails = require('./_fails') , aNumberValue = require('./_a-number-value') , $toPrecision = 1..toPrecision; $export($export.P + $export.F * ($fails(function(){ // IE7- return $toPrecision.call(1, undefined) !== '1'; }) || !$fails(function(){ // V8 ~ Android 4.3- $toPrecision.call({}); })), 'Number', { toPrecision: function toPrecision(precision){ var that = aNumberValue(this, 'Number#toPrecision: incorrect invocation!'); return precision === undefined ? $toPrecision.call(that) : $toPrecision.call(that, precision); } });core-js-2.4.1/modules/es6.object.assign.js000066400000000000000000000002371274277553300203340ustar00rootroot00000000000000// 19.1.3.1 Object.assign(target, source) var $export = require('./_export'); $export($export.S + $export.F, 'Object', {assign: require('./_object-assign')});core-js-2.4.1/modules/es6.object.create.js000066400000000000000000000002361274277553300203120ustar00rootroot00000000000000var $export = require('./_export') // 19.1.2.2 / 15.2.3.5 Object.create(O [, Properties]) $export($export.S, 'Object', {create: require('./_object-create')});core-js-2.4.1/modules/es6.object.define-properties.js000066400000000000000000000003261274277553300224730ustar00rootroot00000000000000var $export = require('./_export'); // 19.1.2.3 / 15.2.3.7 Object.defineProperties(O, Properties) $export($export.S + $export.F * !require('./_descriptors'), 'Object', {defineProperties: require('./_object-dps')});core-js-2.4.1/modules/es6.object.define-property.js000066400000000000000000000003261274277553300221630ustar00rootroot00000000000000var $export = require('./_export'); // 19.1.2.4 / 15.2.3.6 Object.defineProperty(O, P, Attributes) $export($export.S + $export.F * !require('./_descriptors'), 'Object', {defineProperty: require('./_object-dp').f});core-js-2.4.1/modules/es6.object.freeze.js000066400000000000000000000004121274277553300203230ustar00rootroot00000000000000// 19.1.2.5 Object.freeze(O) var isObject = require('./_is-object') , meta = require('./_meta').onFreeze; require('./_object-sap')('freeze', function($freeze){ return function freeze(it){ return $freeze && isObject(it) ? $freeze(meta(it)) : it; }; });core-js-2.4.1/modules/es6.object.get-own-property-descriptor.js000066400000000000000000000005411274277553300244640ustar00rootroot00000000000000// 19.1.2.6 Object.getOwnPropertyDescriptor(O, P) var toIObject = require('./_to-iobject') , $getOwnPropertyDescriptor = require('./_object-gopd').f; require('./_object-sap')('getOwnPropertyDescriptor', function(){ return function getOwnPropertyDescriptor(it, key){ return $getOwnPropertyDescriptor(toIObject(it), key); }; });core-js-2.4.1/modules/es6.object.get-own-property-names.js000066400000000000000000000002231274277553300234060ustar00rootroot00000000000000// 19.1.2.7 Object.getOwnPropertyNames(O) require('./_object-sap')('getOwnPropertyNames', function(){ return require('./_object-gopn-ext').f; });core-js-2.4.1/modules/es6.object.get-prototype-of.js000066400000000000000000000004231274277553300222710ustar00rootroot00000000000000// 19.1.2.9 Object.getPrototypeOf(O) var toObject = require('./_to-object') , $getPrototypeOf = require('./_object-gpo'); require('./_object-sap')('getPrototypeOf', function(){ return function getPrototypeOf(it){ return $getPrototypeOf(toObject(it)); }; });core-js-2.4.1/modules/es6.object.is-extensible.js000066400000000000000000000004071274277553300216220ustar00rootroot00000000000000// 19.1.2.11 Object.isExtensible(O) var isObject = require('./_is-object'); require('./_object-sap')('isExtensible', function($isExtensible){ return function isExtensible(it){ return isObject(it) ? $isExtensible ? $isExtensible(it) : true : false; }; });core-js-2.4.1/modules/es6.object.is-frozen.js000066400000000000000000000003571274277553300207670ustar00rootroot00000000000000// 19.1.2.12 Object.isFrozen(O) var isObject = require('./_is-object'); require('./_object-sap')('isFrozen', function($isFrozen){ return function isFrozen(it){ return isObject(it) ? $isFrozen ? $isFrozen(it) : false : true; }; });core-js-2.4.1/modules/es6.object.is-sealed.js000066400000000000000000000003571274277553300207210ustar00rootroot00000000000000// 19.1.2.13 Object.isSealed(O) var isObject = require('./_is-object'); require('./_object-sap')('isSealed', function($isSealed){ return function isSealed(it){ return isObject(it) ? $isSealed ? $isSealed(it) : false : true; }; });core-js-2.4.1/modules/es6.object.is.js000066400000000000000000000002101274277553300174520ustar00rootroot00000000000000// 19.1.3.10 Object.is(value1, value2) var $export = require('./_export'); $export($export.S, 'Object', {is: require('./_same-value')});core-js-2.4.1/modules/es6.object.keys.js000066400000000000000000000003371274277553300200240ustar00rootroot00000000000000// 19.1.2.14 Object.keys(O) var toObject = require('./_to-object') , $keys = require('./_object-keys'); require('./_object-sap')('keys', function(){ return function keys(it){ return $keys(toObject(it)); }; });core-js-2.4.1/modules/es6.object.prevent-extensions.js000066400000000000000000000005151274277553300227270ustar00rootroot00000000000000// 19.1.2.15 Object.preventExtensions(O) var isObject = require('./_is-object') , meta = require('./_meta').onFreeze; require('./_object-sap')('preventExtensions', function($preventExtensions){ return function preventExtensions(it){ return $preventExtensions && isObject(it) ? $preventExtensions(meta(it)) : it; }; });core-js-2.4.1/modules/es6.object.seal.js000066400000000000000000000003771274277553300200010ustar00rootroot00000000000000// 19.1.2.17 Object.seal(O) var isObject = require('./_is-object') , meta = require('./_meta').onFreeze; require('./_object-sap')('seal', function($seal){ return function seal(it){ return $seal && isObject(it) ? $seal(meta(it)) : it; }; });core-js-2.4.1/modules/es6.object.set-prototype-of.js000066400000000000000000000002351274277553300223060ustar00rootroot00000000000000// 19.1.3.19 Object.setPrototypeOf(O, proto) var $export = require('./_export'); $export($export.S, 'Object', {setPrototypeOf: require('./_set-proto').set});core-js-2.4.1/modules/es6.object.to-string.js000066400000000000000000000004771274277553300210040ustar00rootroot00000000000000'use strict'; // 19.1.3.6 Object.prototype.toString() var classof = require('./_classof') , test = {}; test[require('./_wks')('toStringTag')] = 'z'; if(test + '' != '[object z]'){ require('./_redefine')(Object.prototype, 'toString', function toString(){ return '[object ' + classof(this) + ']'; }, true); }core-js-2.4.1/modules/es6.parse-float.js000066400000000000000000000003111274277553300200110ustar00rootroot00000000000000var $export = require('./_export') , $parseFloat = require('./_parse-float'); // 18.2.4 parseFloat(string) $export($export.G + $export.F * (parseFloat != $parseFloat), {parseFloat: $parseFloat});core-js-2.4.1/modules/es6.parse-int.js000066400000000000000000000003001274277553300174740ustar00rootroot00000000000000var $export = require('./_export') , $parseInt = require('./_parse-int'); // 18.2.5 parseInt(string, radix) $export($export.G + $export.F * (parseInt != $parseInt), {parseInt: $parseInt});core-js-2.4.1/modules/es6.promise.js000066400000000000000000000234141274277553300172630ustar00rootroot00000000000000'use strict'; var LIBRARY = require('./_library') , global = require('./_global') , ctx = require('./_ctx') , classof = require('./_classof') , $export = require('./_export') , isObject = require('./_is-object') , aFunction = require('./_a-function') , anInstance = require('./_an-instance') , forOf = require('./_for-of') , speciesConstructor = require('./_species-constructor') , task = require('./_task').set , microtask = require('./_microtask')() , PROMISE = 'Promise' , TypeError = global.TypeError , process = global.process , $Promise = global[PROMISE] , process = global.process , isNode = classof(process) == 'process' , empty = function(){ /* empty */ } , Internal, GenericPromiseCapability, Wrapper; var USE_NATIVE = !!function(){ try { // correct subclassing with @@species support var promise = $Promise.resolve(1) , FakePromise = (promise.constructor = {})[require('./_wks')('species')] = function(exec){ exec(empty, empty); }; // unhandled rejections tracking support, NodeJS Promise without it fails @@species test return (isNode || typeof PromiseRejectionEvent == 'function') && promise.then(empty) instanceof FakePromise; } catch(e){ /* empty */ } }(); // helpers var sameConstructor = function(a, b){ // with library wrapper special case return a === b || a === $Promise && b === Wrapper; }; var isThenable = function(it){ var then; return isObject(it) && typeof (then = it.then) == 'function' ? then : false; }; var newPromiseCapability = function(C){ return sameConstructor($Promise, C) ? new PromiseCapability(C) : new GenericPromiseCapability(C); }; var PromiseCapability = GenericPromiseCapability = function(C){ var resolve, reject; this.promise = new C(function($$resolve, $$reject){ if(resolve !== undefined || reject !== undefined)throw TypeError('Bad Promise constructor'); resolve = $$resolve; reject = $$reject; }); this.resolve = aFunction(resolve); this.reject = aFunction(reject); }; var perform = function(exec){ try { exec(); } catch(e){ return {error: e}; } }; var notify = function(promise, isReject){ if(promise._n)return; promise._n = true; var chain = promise._c; microtask(function(){ var value = promise._v , ok = promise._s == 1 , i = 0; var run = function(reaction){ var handler = ok ? reaction.ok : reaction.fail , resolve = reaction.resolve , reject = reaction.reject , domain = reaction.domain , result, then; try { if(handler){ if(!ok){ if(promise._h == 2)onHandleUnhandled(promise); promise._h = 1; } if(handler === true)result = value; else { if(domain)domain.enter(); result = handler(value); if(domain)domain.exit(); } if(result === reaction.promise){ reject(TypeError('Promise-chain cycle')); } else if(then = isThenable(result)){ then.call(result, resolve, reject); } else resolve(result); } else reject(value); } catch(e){ reject(e); } }; while(chain.length > i)run(chain[i++]); // variable length - can't use forEach promise._c = []; promise._n = false; if(isReject && !promise._h)onUnhandled(promise); }); }; var onUnhandled = function(promise){ task.call(global, function(){ var value = promise._v , abrupt, handler, console; if(isUnhandled(promise)){ abrupt = perform(function(){ if(isNode){ process.emit('unhandledRejection', value, promise); } else if(handler = global.onunhandledrejection){ handler({promise: promise, reason: value}); } else if((console = global.console) && console.error){ console.error('Unhandled promise rejection', value); } }); // Browsers should not trigger `rejectionHandled` event if it was handled here, NodeJS - should promise._h = isNode || isUnhandled(promise) ? 2 : 1; } promise._a = undefined; if(abrupt)throw abrupt.error; }); }; var isUnhandled = function(promise){ if(promise._h == 1)return false; var chain = promise._a || promise._c , i = 0 , reaction; while(chain.length > i){ reaction = chain[i++]; if(reaction.fail || !isUnhandled(reaction.promise))return false; } return true; }; var onHandleUnhandled = function(promise){ task.call(global, function(){ var handler; if(isNode){ process.emit('rejectionHandled', promise); } else if(handler = global.onrejectionhandled){ handler({promise: promise, reason: promise._v}); } }); }; var $reject = function(value){ var promise = this; if(promise._d)return; promise._d = true; promise = promise._w || promise; // unwrap promise._v = value; promise._s = 2; if(!promise._a)promise._a = promise._c.slice(); notify(promise, true); }; var $resolve = function(value){ var promise = this , then; if(promise._d)return; promise._d = true; promise = promise._w || promise; // unwrap try { if(promise === value)throw TypeError("Promise can't be resolved itself"); if(then = isThenable(value)){ microtask(function(){ var wrapper = {_w: promise, _d: false}; // wrap try { then.call(value, ctx($resolve, wrapper, 1), ctx($reject, wrapper, 1)); } catch(e){ $reject.call(wrapper, e); } }); } else { promise._v = value; promise._s = 1; notify(promise, false); } } catch(e){ $reject.call({_w: promise, _d: false}, e); // wrap } }; // constructor polyfill if(!USE_NATIVE){ // 25.4.3.1 Promise(executor) $Promise = function Promise(executor){ anInstance(this, $Promise, PROMISE, '_h'); aFunction(executor); Internal.call(this); try { executor(ctx($resolve, this, 1), ctx($reject, this, 1)); } catch(err){ $reject.call(this, err); } }; Internal = function Promise(executor){ this._c = []; // <- awaiting reactions this._a = undefined; // <- checked in isUnhandled reactions this._s = 0; // <- state this._d = false; // <- done this._v = undefined; // <- value this._h = 0; // <- rejection state, 0 - default, 1 - handled, 2 - unhandled this._n = false; // <- notify }; Internal.prototype = require('./_redefine-all')($Promise.prototype, { // 25.4.5.3 Promise.prototype.then(onFulfilled, onRejected) then: function then(onFulfilled, onRejected){ var reaction = newPromiseCapability(speciesConstructor(this, $Promise)); reaction.ok = typeof onFulfilled == 'function' ? onFulfilled : true; reaction.fail = typeof onRejected == 'function' && onRejected; reaction.domain = isNode ? process.domain : undefined; this._c.push(reaction); if(this._a)this._a.push(reaction); if(this._s)notify(this, false); return reaction.promise; }, // 25.4.5.1 Promise.prototype.catch(onRejected) 'catch': function(onRejected){ return this.then(undefined, onRejected); } }); PromiseCapability = function(){ var promise = new Internal; this.promise = promise; this.resolve = ctx($resolve, promise, 1); this.reject = ctx($reject, promise, 1); }; } $export($export.G + $export.W + $export.F * !USE_NATIVE, {Promise: $Promise}); require('./_set-to-string-tag')($Promise, PROMISE); require('./_set-species')(PROMISE); Wrapper = require('./_core')[PROMISE]; // statics $export($export.S + $export.F * !USE_NATIVE, PROMISE, { // 25.4.4.5 Promise.reject(r) reject: function reject(r){ var capability = newPromiseCapability(this) , $$reject = capability.reject; $$reject(r); return capability.promise; } }); $export($export.S + $export.F * (LIBRARY || !USE_NATIVE), PROMISE, { // 25.4.4.6 Promise.resolve(x) resolve: function resolve(x){ // instanceof instead of internal slot check because we should fix it without replacement native Promise core if(x instanceof $Promise && sameConstructor(x.constructor, this))return x; var capability = newPromiseCapability(this) , $$resolve = capability.resolve; $$resolve(x); return capability.promise; } }); $export($export.S + $export.F * !(USE_NATIVE && require('./_iter-detect')(function(iter){ $Promise.all(iter)['catch'](empty); })), PROMISE, { // 25.4.4.1 Promise.all(iterable) all: function all(iterable){ var C = this , capability = newPromiseCapability(C) , resolve = capability.resolve , reject = capability.reject; var abrupt = perform(function(){ var values = [] , index = 0 , remaining = 1; forOf(iterable, false, function(promise){ var $index = index++ , alreadyCalled = false; values.push(undefined); remaining++; C.resolve(promise).then(function(value){ if(alreadyCalled)return; alreadyCalled = true; values[$index] = value; --remaining || resolve(values); }, reject); }); --remaining || resolve(values); }); if(abrupt)reject(abrupt.error); return capability.promise; }, // 25.4.4.4 Promise.race(iterable) race: function race(iterable){ var C = this , capability = newPromiseCapability(C) , reject = capability.reject; var abrupt = perform(function(){ forOf(iterable, false, function(promise){ C.resolve(promise).then(capability.resolve, reject); }); }); if(abrupt)reject(abrupt.error); return capability.promise; } });core-js-2.4.1/modules/es6.reflect.apply.js000066400000000000000000000012001274277553300203420ustar00rootroot00000000000000// 26.1.1 Reflect.apply(target, thisArgument, argumentsList) var $export = require('./_export') , aFunction = require('./_a-function') , anObject = require('./_an-object') , rApply = (require('./_global').Reflect || {}).apply , fApply = Function.apply; // MS Edge argumentsList argument is optional $export($export.S + $export.F * !require('./_fails')(function(){ rApply(function(){}); }), 'Reflect', { apply: function apply(target, thisArgument, argumentsList){ var T = aFunction(target) , L = anObject(argumentsList); return rApply ? rApply(T, thisArgument, L) : fApply.call(T, thisArgument, L); } });core-js-2.4.1/modules/es6.reflect.construct.js000066400000000000000000000036361274277553300212600ustar00rootroot00000000000000// 26.1.2 Reflect.construct(target, argumentsList [, newTarget]) var $export = require('./_export') , create = require('./_object-create') , aFunction = require('./_a-function') , anObject = require('./_an-object') , isObject = require('./_is-object') , fails = require('./_fails') , bind = require('./_bind') , rConstruct = (require('./_global').Reflect || {}).construct; // MS Edge supports only 2 arguments and argumentsList argument is optional // FF Nightly sets third argument as `new.target`, but does not create `this` from it var NEW_TARGET_BUG = fails(function(){ function F(){} return !(rConstruct(function(){}, [], F) instanceof F); }); var ARGS_BUG = !fails(function(){ rConstruct(function(){}); }); $export($export.S + $export.F * (NEW_TARGET_BUG || ARGS_BUG), 'Reflect', { construct: function construct(Target, args /*, newTarget*/){ aFunction(Target); anObject(args); var newTarget = arguments.length < 3 ? Target : aFunction(arguments[2]); if(ARGS_BUG && !NEW_TARGET_BUG)return rConstruct(Target, args, newTarget); if(Target == newTarget){ // w/o altered newTarget, optimization for 0-4 arguments switch(args.length){ case 0: return new Target; case 1: return new Target(args[0]); case 2: return new Target(args[0], args[1]); case 3: return new Target(args[0], args[1], args[2]); case 4: return new Target(args[0], args[1], args[2], args[3]); } // w/o altered newTarget, lot of arguments case var $args = [null]; $args.push.apply($args, args); return new (bind.apply(Target, $args)); } // with altered newTarget, not support built-in constructors var proto = newTarget.prototype , instance = create(isObject(proto) ? proto : Object.prototype) , result = Function.apply.call(Target, instance, args); return isObject(result) ? result : instance; } });core-js-2.4.1/modules/es6.reflect.define-property.js000066400000000000000000000013731274277553300223440ustar00rootroot00000000000000// 26.1.3 Reflect.defineProperty(target, propertyKey, attributes) var dP = require('./_object-dp') , $export = require('./_export') , anObject = require('./_an-object') , toPrimitive = require('./_to-primitive'); // MS Edge has broken Reflect.defineProperty - throwing instead of returning false $export($export.S + $export.F * require('./_fails')(function(){ Reflect.defineProperty(dP.f({}, 1, {value: 1}), 1, {value: 2}); }), 'Reflect', { defineProperty: function defineProperty(target, propertyKey, attributes){ anObject(target); propertyKey = toPrimitive(propertyKey, true); anObject(attributes); try { dP.f(target, propertyKey, attributes); return true; } catch(e){ return false; } } });core-js-2.4.1/modules/es6.reflect.delete-property.js000066400000000000000000000006251274277553300223530ustar00rootroot00000000000000// 26.1.4 Reflect.deleteProperty(target, propertyKey) var $export = require('./_export') , gOPD = require('./_object-gopd').f , anObject = require('./_an-object'); $export($export.S, 'Reflect', { deleteProperty: function deleteProperty(target, propertyKey){ var desc = gOPD(anObject(target), propertyKey); return desc && !desc.configurable ? false : delete target[propertyKey]; } });core-js-2.4.1/modules/es6.reflect.enumerate.js000066400000000000000000000013341274277553300212120ustar00rootroot00000000000000'use strict'; // 26.1.5 Reflect.enumerate(target) var $export = require('./_export') , anObject = require('./_an-object'); var Enumerate = function(iterated){ this._t = anObject(iterated); // target this._i = 0; // next index var keys = this._k = [] // keys , key; for(key in iterated)keys.push(key); }; require('./_iter-create')(Enumerate, 'Object', function(){ var that = this , keys = that._k , key; do { if(that._i >= keys.length)return {value: undefined, done: true}; } while(!((key = keys[that._i++]) in that._t)); return {value: key, done: false}; }); $export($export.S, 'Reflect', { enumerate: function enumerate(target){ return new Enumerate(target); } });core-js-2.4.1/modules/es6.reflect.get-own-property-descriptor.js000066400000000000000000000005431274277553300246440ustar00rootroot00000000000000// 26.1.7 Reflect.getOwnPropertyDescriptor(target, propertyKey) var gOPD = require('./_object-gopd') , $export = require('./_export') , anObject = require('./_an-object'); $export($export.S, 'Reflect', { getOwnPropertyDescriptor: function getOwnPropertyDescriptor(target, propertyKey){ return gOPD.f(anObject(target), propertyKey); } });core-js-2.4.1/modules/es6.reflect.get-prototype-of.js000066400000000000000000000004371274277553300224540ustar00rootroot00000000000000// 26.1.8 Reflect.getPrototypeOf(target) var $export = require('./_export') , getProto = require('./_object-gpo') , anObject = require('./_an-object'); $export($export.S, 'Reflect', { getPrototypeOf: function getPrototypeOf(target){ return getProto(anObject(target)); } });core-js-2.4.1/modules/es6.reflect.get.js000066400000000000000000000014531274277553300200060ustar00rootroot00000000000000// 26.1.6 Reflect.get(target, propertyKey [, receiver]) var gOPD = require('./_object-gopd') , getPrototypeOf = require('./_object-gpo') , has = require('./_has') , $export = require('./_export') , isObject = require('./_is-object') , anObject = require('./_an-object'); function get(target, propertyKey/*, receiver*/){ var receiver = arguments.length < 3 ? target : arguments[2] , desc, proto; if(anObject(target) === receiver)return target[propertyKey]; if(desc = gOPD.f(target, propertyKey))return has(desc, 'value') ? desc.value : desc.get !== undefined ? desc.get.call(receiver) : undefined; if(isObject(proto = getPrototypeOf(target)))return get(proto, propertyKey, receiver); } $export($export.S, 'Reflect', {get: get});core-js-2.4.1/modules/es6.reflect.has.js000066400000000000000000000003031274277553300177730ustar00rootroot00000000000000// 26.1.9 Reflect.has(target, propertyKey) var $export = require('./_export'); $export($export.S, 'Reflect', { has: function has(target, propertyKey){ return propertyKey in target; } });core-js-2.4.1/modules/es6.reflect.is-extensible.js000066400000000000000000000005141274277553300217770ustar00rootroot00000000000000// 26.1.10 Reflect.isExtensible(target) var $export = require('./_export') , anObject = require('./_an-object') , $isExtensible = Object.isExtensible; $export($export.S, 'Reflect', { isExtensible: function isExtensible(target){ anObject(target); return $isExtensible ? $isExtensible(target) : true; } });core-js-2.4.1/modules/es6.reflect.own-keys.js000066400000000000000000000002111274277553300207720ustar00rootroot00000000000000// 26.1.11 Reflect.ownKeys(target) var $export = require('./_export'); $export($export.S, 'Reflect', {ownKeys: require('./_own-keys')});core-js-2.4.1/modules/es6.reflect.prevent-extensions.js000066400000000000000000000006651274277553300231130ustar00rootroot00000000000000// 26.1.12 Reflect.preventExtensions(target) var $export = require('./_export') , anObject = require('./_an-object') , $preventExtensions = Object.preventExtensions; $export($export.S, 'Reflect', { preventExtensions: function preventExtensions(target){ anObject(target); try { if($preventExtensions)$preventExtensions(target); return true; } catch(e){ return false; } } });core-js-2.4.1/modules/es6.reflect.set-prototype-of.js000066400000000000000000000005701274277553300224660ustar00rootroot00000000000000// 26.1.14 Reflect.setPrototypeOf(target, proto) var $export = require('./_export') , setProto = require('./_set-proto'); if(setProto)$export($export.S, 'Reflect', { setPrototypeOf: function setPrototypeOf(target, proto){ setProto.check(target, proto); try { setProto.set(target, proto); return true; } catch(e){ return false; } } });core-js-2.4.1/modules/es6.reflect.set.js000066400000000000000000000022441274277553300200210ustar00rootroot00000000000000// 26.1.13 Reflect.set(target, propertyKey, V [, receiver]) var dP = require('./_object-dp') , gOPD = require('./_object-gopd') , getPrototypeOf = require('./_object-gpo') , has = require('./_has') , $export = require('./_export') , createDesc = require('./_property-desc') , anObject = require('./_an-object') , isObject = require('./_is-object'); function set(target, propertyKey, V/*, receiver*/){ var receiver = arguments.length < 4 ? target : arguments[3] , ownDesc = gOPD.f(anObject(target), propertyKey) , existingDescriptor, proto; if(!ownDesc){ if(isObject(proto = getPrototypeOf(target))){ return set(proto, propertyKey, V, receiver); } ownDesc = createDesc(0); } if(has(ownDesc, 'value')){ if(ownDesc.writable === false || !isObject(receiver))return false; existingDescriptor = gOPD.f(receiver, propertyKey) || createDesc(0); existingDescriptor.value = V; dP.f(receiver, propertyKey, existingDescriptor); return true; } return ownDesc.set === undefined ? false : (ownDesc.set.call(receiver, V), true); } $export($export.S, 'Reflect', {set: set});core-js-2.4.1/modules/es6.regexp.constructor.js000066400000000000000000000032611274277553300214610ustar00rootroot00000000000000var global = require('./_global') , inheritIfRequired = require('./_inherit-if-required') , dP = require('./_object-dp').f , gOPN = require('./_object-gopn').f , isRegExp = require('./_is-regexp') , $flags = require('./_flags') , $RegExp = global.RegExp , Base = $RegExp , proto = $RegExp.prototype , re1 = /a/g , re2 = /a/g // "new" creates a new object, old webkit buggy here , CORRECT_NEW = new $RegExp(re1) !== re1; if(require('./_descriptors') && (!CORRECT_NEW || require('./_fails')(function(){ re2[require('./_wks')('match')] = false; // RegExp constructor can alter flags and IsRegExp works correct with @@match return $RegExp(re1) != re1 || $RegExp(re2) == re2 || $RegExp(re1, 'i') != '/a/i'; }))){ $RegExp = function RegExp(p, f){ var tiRE = this instanceof $RegExp , piRE = isRegExp(p) , fiU = f === undefined; return !tiRE && piRE && p.constructor === $RegExp && fiU ? p : inheritIfRequired(CORRECT_NEW ? new Base(piRE && !fiU ? p.source : p, f) : Base((piRE = p instanceof $RegExp) ? p.source : p, piRE && fiU ? $flags.call(p) : f) , tiRE ? this : proto, $RegExp); }; var proxy = function(key){ key in $RegExp || dP($RegExp, key, { configurable: true, get: function(){ return Base[key]; }, set: function(it){ Base[key] = it; } }); }; for(var keys = gOPN(Base), i = 0; keys.length > i; )proxy(keys[i++]); proto.constructor = $RegExp; $RegExp.prototype = proto; require('./_redefine')(global, 'RegExp', $RegExp); } require('./_set-species')('RegExp');core-js-2.4.1/modules/es6.regexp.flags.js000066400000000000000000000003061274277553300201650ustar00rootroot00000000000000// 21.2.5.3 get RegExp.prototype.flags() if(require('./_descriptors') && /./g.flags != 'g')require('./_object-dp').f(RegExp.prototype, 'flags', { configurable: true, get: require('./_flags') });core-js-2.4.1/modules/es6.regexp.match.js000066400000000000000000000005751274277553300201750ustar00rootroot00000000000000// @@match logic require('./_fix-re-wks')('match', 1, function(defined, MATCH, $match){ // 21.1.3.11 String.prototype.match(regexp) return [function match(regexp){ 'use strict'; var O = defined(this) , fn = regexp == undefined ? undefined : regexp[MATCH]; return fn !== undefined ? fn.call(regexp, O) : new RegExp(regexp)[MATCH](String(O)); }, $match]; });core-js-2.4.1/modules/es6.regexp.replace.js000066400000000000000000000007531274277553300205120ustar00rootroot00000000000000// @@replace logic require('./_fix-re-wks')('replace', 2, function(defined, REPLACE, $replace){ // 21.1.3.14 String.prototype.replace(searchValue, replaceValue) return [function replace(searchValue, replaceValue){ 'use strict'; var O = defined(this) , fn = searchValue == undefined ? undefined : searchValue[REPLACE]; return fn !== undefined ? fn.call(searchValue, O, replaceValue) : $replace.call(String(O), searchValue, replaceValue); }, $replace]; });core-js-2.4.1/modules/es6.regexp.search.js000066400000000000000000000006061274277553300203410ustar00rootroot00000000000000// @@search logic require('./_fix-re-wks')('search', 1, function(defined, SEARCH, $search){ // 21.1.3.15 String.prototype.search(regexp) return [function search(regexp){ 'use strict'; var O = defined(this) , fn = regexp == undefined ? undefined : regexp[SEARCH]; return fn !== undefined ? fn.call(regexp, O) : new RegExp(regexp)[SEARCH](String(O)); }, $search]; });core-js-2.4.1/modules/es6.regexp.split.js000066400000000000000000000063701274277553300202330ustar00rootroot00000000000000// @@split logic require('./_fix-re-wks')('split', 2, function(defined, SPLIT, $split){ 'use strict'; var isRegExp = require('./_is-regexp') , _split = $split , $push = [].push , $SPLIT = 'split' , LENGTH = 'length' , LAST_INDEX = 'lastIndex'; if( 'abbc'[$SPLIT](/(b)*/)[1] == 'c' || 'test'[$SPLIT](/(?:)/, -1)[LENGTH] != 4 || 'ab'[$SPLIT](/(?:ab)*/)[LENGTH] != 2 || '.'[$SPLIT](/(.?)(.?)/)[LENGTH] != 4 || '.'[$SPLIT](/()()/)[LENGTH] > 1 || ''[$SPLIT](/.?/)[LENGTH] ){ var NPCG = /()??/.exec('')[1] === undefined; // nonparticipating capturing group // based on es5-shim implementation, need to rework it $split = function(separator, limit){ var string = String(this); if(separator === undefined && limit === 0)return []; // If `separator` is not a regex, use native split if(!isRegExp(separator))return _split.call(string, separator, limit); var output = []; var flags = (separator.ignoreCase ? 'i' : '') + (separator.multiline ? 'm' : '') + (separator.unicode ? 'u' : '') + (separator.sticky ? 'y' : ''); var lastLastIndex = 0; var splitLimit = limit === undefined ? 4294967295 : limit >>> 0; // Make `global` and avoid `lastIndex` issues by working with a copy var separatorCopy = new RegExp(separator.source, flags + 'g'); var separator2, match, lastIndex, lastLength, i; // Doesn't need flags gy, but they don't hurt if(!NPCG)separator2 = new RegExp('^' + separatorCopy.source + '$(?!\\s)', flags); while(match = separatorCopy.exec(string)){ // `separatorCopy.lastIndex` is not reliable cross-browser lastIndex = match.index + match[0][LENGTH]; if(lastIndex > lastLastIndex){ output.push(string.slice(lastLastIndex, match.index)); // Fix browsers whose `exec` methods don't consistently return `undefined` for NPCG if(!NPCG && match[LENGTH] > 1)match[0].replace(separator2, function(){ for(i = 1; i < arguments[LENGTH] - 2; i++)if(arguments[i] === undefined)match[i] = undefined; }); if(match[LENGTH] > 1 && match.index < string[LENGTH])$push.apply(output, match.slice(1)); lastLength = match[0][LENGTH]; lastLastIndex = lastIndex; if(output[LENGTH] >= splitLimit)break; } if(separatorCopy[LAST_INDEX] === match.index)separatorCopy[LAST_INDEX]++; // Avoid an infinite loop } if(lastLastIndex === string[LENGTH]){ if(lastLength || !separatorCopy.test(''))output.push(''); } else output.push(string.slice(lastLastIndex)); return output[LENGTH] > splitLimit ? output.slice(0, splitLimit) : output; }; // Chakra, V8 } else if('0'[$SPLIT](undefined, 0)[LENGTH]){ $split = function(separator, limit){ return separator === undefined && limit === 0 ? [] : _split.call(this, separator, limit); }; } // 21.1.3.17 String.prototype.split(separator, limit) return [function split(separator, limit){ var O = defined(this) , fn = separator == undefined ? undefined : separator[SPLIT]; return fn !== undefined ? fn.call(separator, O, limit) : $split.call(String(O), separator, limit); }, $split]; });core-js-2.4.1/modules/es6.regexp.to-string.js000066400000000000000000000014651274277553300210260ustar00rootroot00000000000000'use strict'; require('./es6.regexp.flags'); var anObject = require('./_an-object') , $flags = require('./_flags') , DESCRIPTORS = require('./_descriptors') , TO_STRING = 'toString' , $toString = /./[TO_STRING]; var define = function(fn){ require('./_redefine')(RegExp.prototype, TO_STRING, fn, true); }; // 21.2.5.14 RegExp.prototype.toString() if(require('./_fails')(function(){ return $toString.call({source: 'a', flags: 'b'}) != '/a/b'; })){ define(function toString(){ var R = anObject(this); return '/'.concat(R.source, '/', 'flags' in R ? R.flags : !DESCRIPTORS && R instanceof RegExp ? $flags.call(R) : undefined); }); // FF44- RegExp#toString has a wrong name } else if($toString.name != TO_STRING){ define(function toString(){ return $toString.call(this); }); }core-js-2.4.1/modules/es6.set.js000066400000000000000000000006141274277553300163750ustar00rootroot00000000000000'use strict'; var strong = require('./_collection-strong'); // 23.2 Set Objects module.exports = require('./_collection')('Set', function(get){ return function Set(){ return get(this, arguments.length > 0 ? arguments[0] : undefined); }; }, { // 23.2.3.1 Set.prototype.add(value) add: function add(value){ return strong.def(this, value = value === 0 ? 0 : value, value); } }, strong);core-js-2.4.1/modules/es6.string.anchor.js000066400000000000000000000003101274277553300203520ustar00rootroot00000000000000'use strict'; // B.2.3.2 String.prototype.anchor(name) require('./_string-html')('anchor', function(createHTML){ return function anchor(name){ return createHTML(this, 'a', 'name', name); } });core-js-2.4.1/modules/es6.string.big.js000066400000000000000000000002631274277553300176500ustar00rootroot00000000000000'use strict'; // B.2.3.3 String.prototype.big() require('./_string-html')('big', function(createHTML){ return function big(){ return createHTML(this, 'big', '', ''); } });core-js-2.4.1/modules/es6.string.blink.js000066400000000000000000000002731274277553300202070ustar00rootroot00000000000000'use strict'; // B.2.3.4 String.prototype.blink() require('./_string-html')('blink', function(createHTML){ return function blink(){ return createHTML(this, 'blink', '', ''); } });core-js-2.4.1/modules/es6.string.bold.js000066400000000000000000000002641274277553300200300ustar00rootroot00000000000000'use strict'; // B.2.3.5 String.prototype.bold() require('./_string-html')('bold', function(createHTML){ return function bold(){ return createHTML(this, 'b', '', ''); } });core-js-2.4.1/modules/es6.string.code-point-at.js000066400000000000000000000003721274277553300215530ustar00rootroot00000000000000'use strict'; var $export = require('./_export') , $at = require('./_string-at')(false); $export($export.P, 'String', { // 21.1.3.3 String.prototype.codePointAt(pos) codePointAt: function codePointAt(pos){ return $at(this, pos); } });core-js-2.4.1/modules/es6.string.ends-with.js000066400000000000000000000015101274277553300210050ustar00rootroot00000000000000// 21.1.3.6 String.prototype.endsWith(searchString [, endPosition]) 'use strict'; var $export = require('./_export') , toLength = require('./_to-length') , context = require('./_string-context') , ENDS_WITH = 'endsWith' , $endsWith = ''[ENDS_WITH]; $export($export.P + $export.F * require('./_fails-is-regexp')(ENDS_WITH), 'String', { endsWith: function endsWith(searchString /*, endPosition = @length */){ var that = context(this, searchString, ENDS_WITH) , endPosition = arguments.length > 1 ? arguments[1] : undefined , len = toLength(that.length) , end = endPosition === undefined ? len : Math.min(toLength(endPosition), len) , search = String(searchString); return $endsWith ? $endsWith.call(that, search, end) : that.slice(end - search.length, end) === search; } });core-js-2.4.1/modules/es6.string.fixed.js000066400000000000000000000002701274277553300202040ustar00rootroot00000000000000'use strict'; // B.2.3.6 String.prototype.fixed() require('./_string-html')('fixed', function(createHTML){ return function fixed(){ return createHTML(this, 'tt', '', ''); } });core-js-2.4.1/modules/es6.string.fontcolor.js000066400000000000000000000003301274277553300211070ustar00rootroot00000000000000'use strict'; // B.2.3.7 String.prototype.fontcolor(color) require('./_string-html')('fontcolor', function(createHTML){ return function fontcolor(color){ return createHTML(this, 'font', 'color', color); } });core-js-2.4.1/modules/es6.string.fontsize.js000066400000000000000000000003211274277553300207430ustar00rootroot00000000000000'use strict'; // B.2.3.8 String.prototype.fontsize(size) require('./_string-html')('fontsize', function(createHTML){ return function fontsize(size){ return createHTML(this, 'font', 'size', size); } });core-js-2.4.1/modules/es6.string.from-code-point.js000066400000000000000000000015201274277553300221060ustar00rootroot00000000000000var $export = require('./_export') , toIndex = require('./_to-index') , fromCharCode = String.fromCharCode , $fromCodePoint = String.fromCodePoint; // length should be 1, old FF problem $export($export.S + $export.F * (!!$fromCodePoint && $fromCodePoint.length != 1), 'String', { // 21.1.2.2 String.fromCodePoint(...codePoints) fromCodePoint: function fromCodePoint(x){ // eslint-disable-line no-unused-vars var res = [] , aLen = arguments.length , i = 0 , code; while(aLen > i){ code = +arguments[i++]; if(toIndex(code, 0x10ffff) !== code)throw RangeError(code + ' is not a valid code point'); res.push(code < 0x10000 ? fromCharCode(code) : fromCharCode(((code -= 0x10000) >> 10) + 0xd800, code % 0x400 + 0xdc00) ); } return res.join(''); } });core-js-2.4.1/modules/es6.string.includes.js000066400000000000000000000007341274277553300207200ustar00rootroot00000000000000// 21.1.3.7 String.prototype.includes(searchString, position = 0) 'use strict'; var $export = require('./_export') , context = require('./_string-context') , INCLUDES = 'includes'; $export($export.P + $export.F * require('./_fails-is-regexp')(INCLUDES), 'String', { includes: function includes(searchString /*, position = 0 */){ return !!~context(this, searchString, INCLUDES) .indexOf(searchString, arguments.length > 1 ? arguments[1] : undefined); } });core-js-2.4.1/modules/es6.string.italics.js000066400000000000000000000002751274277553300205420ustar00rootroot00000000000000'use strict'; // B.2.3.9 String.prototype.italics() require('./_string-html')('italics', function(createHTML){ return function italics(){ return createHTML(this, 'i', '', ''); } });core-js-2.4.1/modules/es6.string.iterator.js000066400000000000000000000010131274277553300207320ustar00rootroot00000000000000'use strict'; var $at = require('./_string-at')(true); // 21.1.3.27 String.prototype[@@iterator]() require('./_iter-define')(String, 'String', function(iterated){ this._t = String(iterated); // target this._i = 0; // next index // 21.1.5.2.1 %StringIteratorPrototype%.next() }, function(){ var O = this._t , index = this._i , point; if(index >= O.length)return {value: undefined, done: true}; point = $at(O, index); this._i += point.length; return {value: point, done: false}; });core-js-2.4.1/modules/es6.string.link.js000066400000000000000000000003001274277553300200340ustar00rootroot00000000000000'use strict'; // B.2.3.10 String.prototype.link(url) require('./_string-html')('link', function(createHTML){ return function link(url){ return createHTML(this, 'a', 'href', url); } });core-js-2.4.1/modules/es6.string.raw.js000066400000000000000000000010041274277553300176720ustar00rootroot00000000000000var $export = require('./_export') , toIObject = require('./_to-iobject') , toLength = require('./_to-length'); $export($export.S, 'String', { // 21.1.2.4 String.raw(callSite, ...substitutions) raw: function raw(callSite){ var tpl = toIObject(callSite.raw) , len = toLength(tpl.length) , aLen = arguments.length , res = [] , i = 0; while(len > i){ res.push(String(tpl[i++])); if(i < aLen)res.push(String(arguments[i])); } return res.join(''); } });core-js-2.4.1/modules/es6.string.repeat.js000066400000000000000000000002331274277553300203640ustar00rootroot00000000000000var $export = require('./_export'); $export($export.P, 'String', { // 21.1.3.13 String.prototype.repeat(count) repeat: require('./_string-repeat') });core-js-2.4.1/modules/es6.string.small.js000066400000000000000000000002741274277553300202210ustar00rootroot00000000000000'use strict'; // B.2.3.11 String.prototype.small() require('./_string-html')('small', function(createHTML){ return function small(){ return createHTML(this, 'small', '', ''); } });core-js-2.4.1/modules/es6.string.starts-with.js000066400000000000000000000013771274277553300214070ustar00rootroot00000000000000// 21.1.3.18 String.prototype.startsWith(searchString [, position ]) 'use strict'; var $export = require('./_export') , toLength = require('./_to-length') , context = require('./_string-context') , STARTS_WITH = 'startsWith' , $startsWith = ''[STARTS_WITH]; $export($export.P + $export.F * require('./_fails-is-regexp')(STARTS_WITH), 'String', { startsWith: function startsWith(searchString /*, position = 0 */){ var that = context(this, searchString, STARTS_WITH) , index = toLength(Math.min(arguments.length > 1 ? arguments[1] : undefined, that.length)) , search = String(searchString); return $startsWith ? $startsWith.call(that, search, index) : that.slice(index, index + search.length) === search; } });core-js-2.4.1/modules/es6.string.strike.js000066400000000000000000000003001274277553300204000ustar00rootroot00000000000000'use strict'; // B.2.3.12 String.prototype.strike() require('./_string-html')('strike', function(createHTML){ return function strike(){ return createHTML(this, 'strike', '', ''); } });core-js-2.4.1/modules/es6.string.sub.js000066400000000000000000000002641274277553300177010ustar00rootroot00000000000000'use strict'; // B.2.3.13 String.prototype.sub() require('./_string-html')('sub', function(createHTML){ return function sub(){ return createHTML(this, 'sub', '', ''); } });core-js-2.4.1/modules/es6.string.sup.js000066400000000000000000000002641274277553300177170ustar00rootroot00000000000000'use strict'; // B.2.3.14 String.prototype.sup() require('./_string-html')('sup', function(createHTML){ return function sup(){ return createHTML(this, 'sup', '', ''); } });core-js-2.4.1/modules/es6.string.trim.js000066400000000000000000000002431274277553300200600ustar00rootroot00000000000000'use strict'; // 21.1.3.25 String.prototype.trim() require('./_string-trim')('trim', function($trim){ return function trim(){ return $trim(this, 3); }; });core-js-2.4.1/modules/es6.symbol.js000066400000000000000000000213351274277553300171120ustar00rootroot00000000000000'use strict'; // ECMAScript 6 symbols shim var global = require('./_global') , has = require('./_has') , DESCRIPTORS = require('./_descriptors') , $export = require('./_export') , redefine = require('./_redefine') , META = require('./_meta').KEY , $fails = require('./_fails') , shared = require('./_shared') , setToStringTag = require('./_set-to-string-tag') , uid = require('./_uid') , wks = require('./_wks') , wksExt = require('./_wks-ext') , wksDefine = require('./_wks-define') , keyOf = require('./_keyof') , enumKeys = require('./_enum-keys') , isArray = require('./_is-array') , anObject = require('./_an-object') , toIObject = require('./_to-iobject') , toPrimitive = require('./_to-primitive') , createDesc = require('./_property-desc') , _create = require('./_object-create') , gOPNExt = require('./_object-gopn-ext') , $GOPD = require('./_object-gopd') , $DP = require('./_object-dp') , $keys = require('./_object-keys') , gOPD = $GOPD.f , dP = $DP.f , gOPN = gOPNExt.f , $Symbol = global.Symbol , $JSON = global.JSON , _stringify = $JSON && $JSON.stringify , PROTOTYPE = 'prototype' , HIDDEN = wks('_hidden') , TO_PRIMITIVE = wks('toPrimitive') , isEnum = {}.propertyIsEnumerable , SymbolRegistry = shared('symbol-registry') , AllSymbols = shared('symbols') , OPSymbols = shared('op-symbols') , ObjectProto = Object[PROTOTYPE] , USE_NATIVE = typeof $Symbol == 'function' , QObject = global.QObject; // Don't use setters in Qt Script, https://github.com/zloirock/core-js/issues/173 var setter = !QObject || !QObject[PROTOTYPE] || !QObject[PROTOTYPE].findChild; // fallback for old Android, https://code.google.com/p/v8/issues/detail?id=687 var setSymbolDesc = DESCRIPTORS && $fails(function(){ return _create(dP({}, 'a', { get: function(){ return dP(this, 'a', {value: 7}).a; } })).a != 7; }) ? function(it, key, D){ var protoDesc = gOPD(ObjectProto, key); if(protoDesc)delete ObjectProto[key]; dP(it, key, D); if(protoDesc && it !== ObjectProto)dP(ObjectProto, key, protoDesc); } : dP; var wrap = function(tag){ var sym = AllSymbols[tag] = _create($Symbol[PROTOTYPE]); sym._k = tag; return sym; }; var isSymbol = USE_NATIVE && typeof $Symbol.iterator == 'symbol' ? function(it){ return typeof it == 'symbol'; } : function(it){ return it instanceof $Symbol; }; var $defineProperty = function defineProperty(it, key, D){ if(it === ObjectProto)$defineProperty(OPSymbols, key, D); anObject(it); key = toPrimitive(key, true); anObject(D); if(has(AllSymbols, key)){ if(!D.enumerable){ if(!has(it, HIDDEN))dP(it, HIDDEN, createDesc(1, {})); it[HIDDEN][key] = true; } else { if(has(it, HIDDEN) && it[HIDDEN][key])it[HIDDEN][key] = false; D = _create(D, {enumerable: createDesc(0, false)}); } return setSymbolDesc(it, key, D); } return dP(it, key, D); }; var $defineProperties = function defineProperties(it, P){ anObject(it); var keys = enumKeys(P = toIObject(P)) , i = 0 , l = keys.length , key; while(l > i)$defineProperty(it, key = keys[i++], P[key]); return it; }; var $create = function create(it, P){ return P === undefined ? _create(it) : $defineProperties(_create(it), P); }; var $propertyIsEnumerable = function propertyIsEnumerable(key){ var E = isEnum.call(this, key = toPrimitive(key, true)); if(this === ObjectProto && has(AllSymbols, key) && !has(OPSymbols, key))return false; return E || !has(this, key) || !has(AllSymbols, key) || has(this, HIDDEN) && this[HIDDEN][key] ? E : true; }; var $getOwnPropertyDescriptor = function getOwnPropertyDescriptor(it, key){ it = toIObject(it); key = toPrimitive(key, true); if(it === ObjectProto && has(AllSymbols, key) && !has(OPSymbols, key))return; var D = gOPD(it, key); if(D && has(AllSymbols, key) && !(has(it, HIDDEN) && it[HIDDEN][key]))D.enumerable = true; return D; }; var $getOwnPropertyNames = function getOwnPropertyNames(it){ var names = gOPN(toIObject(it)) , result = [] , i = 0 , key; while(names.length > i){ if(!has(AllSymbols, key = names[i++]) && key != HIDDEN && key != META)result.push(key); } return result; }; var $getOwnPropertySymbols = function getOwnPropertySymbols(it){ var IS_OP = it === ObjectProto , names = gOPN(IS_OP ? OPSymbols : toIObject(it)) , result = [] , i = 0 , key; while(names.length > i){ if(has(AllSymbols, key = names[i++]) && (IS_OP ? has(ObjectProto, key) : true))result.push(AllSymbols[key]); } return result; }; // 19.4.1.1 Symbol([description]) if(!USE_NATIVE){ $Symbol = function Symbol(){ if(this instanceof $Symbol)throw TypeError('Symbol is not a constructor!'); var tag = uid(arguments.length > 0 ? arguments[0] : undefined); var $set = function(value){ if(this === ObjectProto)$set.call(OPSymbols, value); if(has(this, HIDDEN) && has(this[HIDDEN], tag))this[HIDDEN][tag] = false; setSymbolDesc(this, tag, createDesc(1, value)); }; if(DESCRIPTORS && setter)setSymbolDesc(ObjectProto, tag, {configurable: true, set: $set}); return wrap(tag); }; redefine($Symbol[PROTOTYPE], 'toString', function toString(){ return this._k; }); $GOPD.f = $getOwnPropertyDescriptor; $DP.f = $defineProperty; require('./_object-gopn').f = gOPNExt.f = $getOwnPropertyNames; require('./_object-pie').f = $propertyIsEnumerable; require('./_object-gops').f = $getOwnPropertySymbols; if(DESCRIPTORS && !require('./_library')){ redefine(ObjectProto, 'propertyIsEnumerable', $propertyIsEnumerable, true); } wksExt.f = function(name){ return wrap(wks(name)); } } $export($export.G + $export.W + $export.F * !USE_NATIVE, {Symbol: $Symbol}); for(var symbols = ( // 19.4.2.2, 19.4.2.3, 19.4.2.4, 19.4.2.6, 19.4.2.8, 19.4.2.9, 19.4.2.10, 19.4.2.11, 19.4.2.12, 19.4.2.13, 19.4.2.14 'hasInstance,isConcatSpreadable,iterator,match,replace,search,species,split,toPrimitive,toStringTag,unscopables' ).split(','), i = 0; symbols.length > i; )wks(symbols[i++]); for(var symbols = $keys(wks.store), i = 0; symbols.length > i; )wksDefine(symbols[i++]); $export($export.S + $export.F * !USE_NATIVE, 'Symbol', { // 19.4.2.1 Symbol.for(key) 'for': function(key){ return has(SymbolRegistry, key += '') ? SymbolRegistry[key] : SymbolRegistry[key] = $Symbol(key); }, // 19.4.2.5 Symbol.keyFor(sym) keyFor: function keyFor(key){ if(isSymbol(key))return keyOf(SymbolRegistry, key); throw TypeError(key + ' is not a symbol!'); }, useSetter: function(){ setter = true; }, useSimple: function(){ setter = false; } }); $export($export.S + $export.F * !USE_NATIVE, 'Object', { // 19.1.2.2 Object.create(O [, Properties]) create: $create, // 19.1.2.4 Object.defineProperty(O, P, Attributes) defineProperty: $defineProperty, // 19.1.2.3 Object.defineProperties(O, Properties) defineProperties: $defineProperties, // 19.1.2.6 Object.getOwnPropertyDescriptor(O, P) getOwnPropertyDescriptor: $getOwnPropertyDescriptor, // 19.1.2.7 Object.getOwnPropertyNames(O) getOwnPropertyNames: $getOwnPropertyNames, // 19.1.2.8 Object.getOwnPropertySymbols(O) getOwnPropertySymbols: $getOwnPropertySymbols }); // 24.3.2 JSON.stringify(value [, replacer [, space]]) $JSON && $export($export.S + $export.F * (!USE_NATIVE || $fails(function(){ var S = $Symbol(); // MS Edge converts symbol values to JSON as {} // WebKit converts symbol values to JSON as null // V8 throws on boxed symbols return _stringify([S]) != '[null]' || _stringify({a: S}) != '{}' || _stringify(Object(S)) != '{}'; })), 'JSON', { stringify: function stringify(it){ if(it === undefined || isSymbol(it))return; // IE8 returns string on undefined var args = [it] , i = 1 , replacer, $replacer; while(arguments.length > i)args.push(arguments[i++]); replacer = args[1]; if(typeof replacer == 'function')$replacer = replacer; if($replacer || !isArray(replacer))replacer = function(key, value){ if($replacer)value = $replacer.call(this, key, value); if(!isSymbol(value))return value; }; args[1] = replacer; return _stringify.apply($JSON, args); } }); // 19.4.3.4 Symbol.prototype[@@toPrimitive](hint) $Symbol[PROTOTYPE][TO_PRIMITIVE] || require('./_hide')($Symbol[PROTOTYPE], TO_PRIMITIVE, $Symbol[PROTOTYPE].valueOf); // 19.4.3.5 Symbol.prototype[@@toStringTag] setToStringTag($Symbol, 'Symbol'); // 20.2.1.9 Math[@@toStringTag] setToStringTag(Math, 'Math', true); // 24.3.3 JSON[@@toStringTag] setToStringTag(global.JSON, 'JSON', true);core-js-2.4.1/modules/es6.typed.array-buffer.js000066400000000000000000000034111274277553300213110ustar00rootroot00000000000000'use strict'; var $export = require('./_export') , $typed = require('./_typed') , buffer = require('./_typed-buffer') , anObject = require('./_an-object') , toIndex = require('./_to-index') , toLength = require('./_to-length') , isObject = require('./_is-object') , ArrayBuffer = require('./_global').ArrayBuffer , speciesConstructor = require('./_species-constructor') , $ArrayBuffer = buffer.ArrayBuffer , $DataView = buffer.DataView , $isView = $typed.ABV && ArrayBuffer.isView , $slice = $ArrayBuffer.prototype.slice , VIEW = $typed.VIEW , ARRAY_BUFFER = 'ArrayBuffer'; $export($export.G + $export.W + $export.F * (ArrayBuffer !== $ArrayBuffer), {ArrayBuffer: $ArrayBuffer}); $export($export.S + $export.F * !$typed.CONSTR, ARRAY_BUFFER, { // 24.1.3.1 ArrayBuffer.isView(arg) isView: function isView(it){ return $isView && $isView(it) || isObject(it) && VIEW in it; } }); $export($export.P + $export.U + $export.F * require('./_fails')(function(){ return !new $ArrayBuffer(2).slice(1, undefined).byteLength; }), ARRAY_BUFFER, { // 24.1.4.3 ArrayBuffer.prototype.slice(start, end) slice: function slice(start, end){ if($slice !== undefined && end === undefined)return $slice.call(anObject(this), start); // FF fix var len = anObject(this).byteLength , first = toIndex(start, len) , final = toIndex(end === undefined ? len : end, len) , result = new (speciesConstructor(this, $ArrayBuffer))(toLength(final - first)) , viewS = new $DataView(this) , viewT = new $DataView(result) , index = 0; while(first < final){ viewT.setUint8(index++, viewS.getUint8(first++)); } return result; } }); require('./_set-species')(ARRAY_BUFFER);core-js-2.4.1/modules/es6.typed.data-view.js000066400000000000000000000002371274277553300206100ustar00rootroot00000000000000var $export = require('./_export'); $export($export.G + $export.W + $export.F * !require('./_typed').ABV, { DataView: require('./_typed-buffer').DataView });core-js-2.4.1/modules/es6.typed.float32-array.js000066400000000000000000000002531274277553300213130ustar00rootroot00000000000000require('./_typed-array')('Float32', 4, function(init){ return function Float32Array(data, byteOffset, length){ return init(this, data, byteOffset, length); }; });core-js-2.4.1/modules/es6.typed.float64-array.js000066400000000000000000000002531274277553300213200ustar00rootroot00000000000000require('./_typed-array')('Float64', 8, function(init){ return function Float64Array(data, byteOffset, length){ return init(this, data, byteOffset, length); }; });core-js-2.4.1/modules/es6.typed.int16-array.js000066400000000000000000000002471274277553300210050ustar00rootroot00000000000000require('./_typed-array')('Int16', 2, function(init){ return function Int16Array(data, byteOffset, length){ return init(this, data, byteOffset, length); }; });core-js-2.4.1/modules/es6.typed.int32-array.js000066400000000000000000000002471274277553300210030ustar00rootroot00000000000000require('./_typed-array')('Int32', 4, function(init){ return function Int32Array(data, byteOffset, length){ return init(this, data, byteOffset, length); }; });core-js-2.4.1/modules/es6.typed.int8-array.js000066400000000000000000000002451274277553300207240ustar00rootroot00000000000000require('./_typed-array')('Int8', 1, function(init){ return function Int8Array(data, byteOffset, length){ return init(this, data, byteOffset, length); }; });core-js-2.4.1/modules/es6.typed.uint16-array.js000066400000000000000000000002511274277553300211650ustar00rootroot00000000000000require('./_typed-array')('Uint16', 2, function(init){ return function Uint16Array(data, byteOffset, length){ return init(this, data, byteOffset, length); }; });core-js-2.4.1/modules/es6.typed.uint32-array.js000066400000000000000000000002511274277553300211630ustar00rootroot00000000000000require('./_typed-array')('Uint32', 4, function(init){ return function Uint32Array(data, byteOffset, length){ return init(this, data, byteOffset, length); }; });core-js-2.4.1/modules/es6.typed.uint8-array.js000066400000000000000000000002471274277553300211130ustar00rootroot00000000000000require('./_typed-array')('Uint8', 1, function(init){ return function Uint8Array(data, byteOffset, length){ return init(this, data, byteOffset, length); }; });core-js-2.4.1/modules/es6.typed.uint8-clamped-array.js000066400000000000000000000002641274277553300225150ustar00rootroot00000000000000require('./_typed-array')('Uint8', 1, function(init){ return function Uint8ClampedArray(data, byteOffset, length){ return init(this, data, byteOffset, length); }; }, true);core-js-2.4.1/modules/es6.weak-map.js000066400000000000000000000034041274277553300173040ustar00rootroot00000000000000'use strict'; var each = require('./_array-methods')(0) , redefine = require('./_redefine') , meta = require('./_meta') , assign = require('./_object-assign') , weak = require('./_collection-weak') , isObject = require('./_is-object') , getWeak = meta.getWeak , isExtensible = Object.isExtensible , uncaughtFrozenStore = weak.ufstore , tmp = {} , InternalMap; var wrapper = function(get){ return function WeakMap(){ return get(this, arguments.length > 0 ? arguments[0] : undefined); }; }; var methods = { // 23.3.3.3 WeakMap.prototype.get(key) get: function get(key){ if(isObject(key)){ var data = getWeak(key); if(data === true)return uncaughtFrozenStore(this).get(key); return data ? data[this._i] : undefined; } }, // 23.3.3.5 WeakMap.prototype.set(key, value) set: function set(key, value){ return weak.def(this, key, value); } }; // 23.3 WeakMap Objects var $WeakMap = module.exports = require('./_collection')('WeakMap', wrapper, methods, weak, true, true); // IE11 WeakMap frozen keys fix if(new $WeakMap().set((Object.freeze || Object)(tmp), 7).get(tmp) != 7){ InternalMap = weak.getConstructor(wrapper); assign(InternalMap.prototype, methods); meta.NEED = true; each(['delete', 'has', 'get', 'set'], function(key){ var proto = $WeakMap.prototype , method = proto[key]; redefine(proto, key, function(a, b){ // store frozen objects on internal weakmap shim if(isObject(a) && !isExtensible(a)){ if(!this._f)this._f = new InternalMap; var result = this._f[key](a, b); return key == 'set' ? this : result; // store all the rest on native weakmap } return method.call(this, a, b); }); }); }core-js-2.4.1/modules/es6.weak-set.js000066400000000000000000000005651274277553300173270ustar00rootroot00000000000000'use strict'; var weak = require('./_collection-weak'); // 23.4 WeakSet Objects require('./_collection')('WeakSet', function(get){ return function WeakSet(){ return get(this, arguments.length > 0 ? arguments[0] : undefined); }; }, { // 23.4.3.1 WeakSet.prototype.add(value) add: function add(value){ return weak.def(this, value, true); } }, weak, false, true);core-js-2.4.1/modules/es7.array.includes.js000066400000000000000000000005711274277553300205300ustar00rootroot00000000000000'use strict'; // https://github.com/tc39/Array.prototype.includes var $export = require('./_export') , $includes = require('./_array-includes')(true); $export($export.P, 'Array', { includes: function includes(el /*, fromIndex = 0 */){ return $includes(this, el, arguments.length > 1 ? arguments[1] : undefined); } }); require('./_add-to-unscopables')('includes');core-js-2.4.1/modules/es7.asap.js000066400000000000000000000006741274277553300165350ustar00rootroot00000000000000// https://github.com/rwaldron/tc39-notes/blob/master/es6/2014-09/sept-25.md#510-globalasap-for-enqueuing-a-microtask var $export = require('./_export') , microtask = require('./_microtask')() , process = require('./_global').process , isNode = require('./_cof')(process) == 'process'; $export($export.G, { asap: function asap(fn){ var domain = isNode && process.domain; microtask(domain ? domain.bind(fn) : fn); } });core-js-2.4.1/modules/es7.error.is-error.js000066400000000000000000000003321274277553300204720ustar00rootroot00000000000000// https://github.com/ljharb/proposal-is-error var $export = require('./_export') , cof = require('./_cof'); $export($export.S, 'Error', { isError: function isError(it){ return cof(it) === 'Error'; } });core-js-2.4.1/modules/es7.map.to-json.js000066400000000000000000000002721274277553300177500ustar00rootroot00000000000000// https://github.com/DavidBruant/Map-Set.prototype.toJSON var $export = require('./_export'); $export($export.P + $export.R, 'Map', {toJSON: require('./_collection-to-json')('Map')});core-js-2.4.1/modules/es7.math.iaddh.js000066400000000000000000000005171274277553300176060ustar00rootroot00000000000000// https://gist.github.com/BrendanEich/4294d5c212a6d2254703 var $export = require('./_export'); $export($export.S, 'Math', { iaddh: function iaddh(x0, x1, y0, y1){ var $x0 = x0 >>> 0 , $x1 = x1 >>> 0 , $y0 = y0 >>> 0; return $x1 + (y1 >>> 0) + (($x0 & $y0 | ($x0 | $y0) & ~($x0 + $y0 >>> 0)) >>> 31) | 0; } });core-js-2.4.1/modules/es7.math.imulh.js000066400000000000000000000006641274277553300176560ustar00rootroot00000000000000// https://gist.github.com/BrendanEich/4294d5c212a6d2254703 var $export = require('./_export'); $export($export.S, 'Math', { imulh: function imulh(u, v){ var UINT16 = 0xffff , $u = +u , $v = +v , u0 = $u & UINT16 , v0 = $v & UINT16 , u1 = $u >> 16 , v1 = $v >> 16 , t = (u1 * v0 >>> 0) + (u0 * v0 >>> 16); return u1 * v1 + (t >> 16) + ((u0 * v1 >>> 0) + (t & UINT16) >> 16); } });core-js-2.4.1/modules/es7.math.isubh.js000066400000000000000000000005161274277553300176460ustar00rootroot00000000000000// https://gist.github.com/BrendanEich/4294d5c212a6d2254703 var $export = require('./_export'); $export($export.S, 'Math', { isubh: function isubh(x0, x1, y0, y1){ var $x0 = x0 >>> 0 , $x1 = x1 >>> 0 , $y0 = y0 >>> 0; return $x1 - (y1 >>> 0) - ((~$x0 & $y0 | ~($x0 ^ $y0) & $x0 - $y0 >>> 0) >>> 31) | 0; } });core-js-2.4.1/modules/es7.math.umulh.js000066400000000000000000000006701274277553300176670ustar00rootroot00000000000000// https://gist.github.com/BrendanEich/4294d5c212a6d2254703 var $export = require('./_export'); $export($export.S, 'Math', { umulh: function umulh(u, v){ var UINT16 = 0xffff , $u = +u , $v = +v , u0 = $u & UINT16 , v0 = $v & UINT16 , u1 = $u >>> 16 , v1 = $v >>> 16 , t = (u1 * v0 >>> 0) + (u0 * v0 >>> 16); return u1 * v1 + (t >>> 16) + ((u0 * v1 >>> 0) + (t & UINT16) >>> 16); } });core-js-2.4.1/modules/es7.object.define-getter.js000066400000000000000000000010071274277553300215670ustar00rootroot00000000000000'use strict'; var $export = require('./_export') , toObject = require('./_to-object') , aFunction = require('./_a-function') , $defineProperty = require('./_object-dp'); // B.2.2.2 Object.prototype.__defineGetter__(P, getter) require('./_descriptors') && $export($export.P + require('./_object-forced-pam'), 'Object', { __defineGetter__: function __defineGetter__(P, getter){ $defineProperty.f(toObject(this), P, {get: aFunction(getter), enumerable: true, configurable: true}); } });core-js-2.4.1/modules/es7.object.define-setter.js000066400000000000000000000010071274277553300216030ustar00rootroot00000000000000'use strict'; var $export = require('./_export') , toObject = require('./_to-object') , aFunction = require('./_a-function') , $defineProperty = require('./_object-dp'); // B.2.2.3 Object.prototype.__defineSetter__(P, setter) require('./_descriptors') && $export($export.P + require('./_object-forced-pam'), 'Object', { __defineSetter__: function __defineSetter__(P, setter){ $defineProperty.f(toObject(this), P, {set: aFunction(setter), enumerable: true, configurable: true}); } });core-js-2.4.1/modules/es7.object.entries.js000066400000000000000000000003631274277553300205220ustar00rootroot00000000000000// https://github.com/tc39/proposal-object-values-entries var $export = require('./_export') , $entries = require('./_object-to-array')(true); $export($export.S, 'Object', { entries: function entries(it){ return $entries(it); } });core-js-2.4.1/modules/es7.object.enumerable-entries.js000066400000000000000000000005401274277553300226340ustar00rootroot00000000000000// https://github.com/leobalter/object-enumerables var $export = require('./_export') , toObject = require('./_to-object'); $export($export.S, 'Object', { enumerableEntries: function enumerableEntries(O){ var T = toObject(O) , properties = []; for(var key in T)properties.push([key, T[key]]); return properties; } });core-js-2.4.1/modules/es7.object.enumerable-keys.js000066400000000000000000000005201274277553300221340ustar00rootroot00000000000000// https://github.com/leobalter/object-enumerables var $export = require('./_export') , toObject = require('./_to-object'); $export($export.S, 'Object', { enumerableKeys: function enumerableKeys(O){ var T = toObject(O) , properties = []; for(var key in T)properties.push(key); return properties; } });core-js-2.4.1/modules/es7.object.enumerable-values.js000066400000000000000000000005271274277553300224670ustar00rootroot00000000000000// https://github.com/leobalter/object-enumerables var $export = require('./_export') , toObject = require('./_to-object'); $export($export.S, 'Object', { enumerableValues: function enumerableValues(O){ var T = toObject(O) , properties = []; for(var key in T)properties.push(T[key]); return properties; } });core-js-2.4.1/modules/es7.object.get-own-property-descriptors.js000066400000000000000000000012231274277553300246460ustar00rootroot00000000000000// https://github.com/tc39/proposal-object-getownpropertydescriptors var $export = require('./_export') , ownKeys = require('./_own-keys') , toIObject = require('./_to-iobject') , gOPD = require('./_object-gopd') , createProperty = require('./_create-property'); $export($export.S, 'Object', { getOwnPropertyDescriptors: function getOwnPropertyDescriptors(object){ var O = toIObject(object) , getDesc = gOPD.f , keys = ownKeys(O) , result = {} , i = 0 , key; while(keys.length > i)createProperty(result, key = keys[i++], getDesc(O, key)); return result; } });core-js-2.4.1/modules/es7.object.lookup-getter.js000066400000000000000000000012351274277553300216510ustar00rootroot00000000000000'use strict'; var $export = require('./_export') , toObject = require('./_to-object') , toPrimitive = require('./_to-primitive') , getPrototypeOf = require('./_object-gpo') , getOwnPropertyDescriptor = require('./_object-gopd').f; // B.2.2.4 Object.prototype.__lookupGetter__(P) require('./_descriptors') && $export($export.P + require('./_object-forced-pam'), 'Object', { __lookupGetter__: function __lookupGetter__(P){ var O = toObject(this) , K = toPrimitive(P, true) , D; do { if(D = getOwnPropertyDescriptor(O, K))return D.get; } while(O = getPrototypeOf(O)); } });core-js-2.4.1/modules/es7.object.lookup-setter.js000066400000000000000000000012351274277553300216650ustar00rootroot00000000000000'use strict'; var $export = require('./_export') , toObject = require('./_to-object') , toPrimitive = require('./_to-primitive') , getPrototypeOf = require('./_object-gpo') , getOwnPropertyDescriptor = require('./_object-gopd').f; // B.2.2.5 Object.prototype.__lookupSetter__(P) require('./_descriptors') && $export($export.P + require('./_object-forced-pam'), 'Object', { __lookupSetter__: function __lookupSetter__(P){ var O = toObject(this) , K = toPrimitive(P, true) , D; do { if(D = getOwnPropertyDescriptor(O, K))return D.set; } while(O = getPrototypeOf(O)); } });core-js-2.4.1/modules/es7.object.values.js000066400000000000000000000003571274277553300203530ustar00rootroot00000000000000// https://github.com/tc39/proposal-object-values-entries var $export = require('./_export') , $values = require('./_object-to-array')(false); $export($export.S, 'Object', { values: function values(it){ return $values(it); } });core-js-2.4.1/modules/es7.observable.js000066400000000000000000000125141274277553300177310ustar00rootroot00000000000000'use strict'; // https://github.com/zenparsing/es-observable var $export = require('./_export') , global = require('./_global') , core = require('./_core') , microtask = require('./_microtask')() , OBSERVABLE = require('./_wks')('observable') , aFunction = require('./_a-function') , anObject = require('./_an-object') , anInstance = require('./_an-instance') , redefineAll = require('./_redefine-all') , hide = require('./_hide') , forOf = require('./_for-of') , RETURN = forOf.RETURN; var getMethod = function(fn){ return fn == null ? undefined : aFunction(fn); }; var cleanupSubscription = function(subscription){ var cleanup = subscription._c; if(cleanup){ subscription._c = undefined; cleanup(); } }; var subscriptionClosed = function(subscription){ return subscription._o === undefined; }; var closeSubscription = function(subscription){ if(!subscriptionClosed(subscription)){ subscription._o = undefined; cleanupSubscription(subscription); } }; var Subscription = function(observer, subscriber){ anObject(observer); this._c = undefined; this._o = observer; observer = new SubscriptionObserver(this); try { var cleanup = subscriber(observer) , subscription = cleanup; if(cleanup != null){ if(typeof cleanup.unsubscribe === 'function')cleanup = function(){ subscription.unsubscribe(); }; else aFunction(cleanup); this._c = cleanup; } } catch(e){ observer.error(e); return; } if(subscriptionClosed(this))cleanupSubscription(this); }; Subscription.prototype = redefineAll({}, { unsubscribe: function unsubscribe(){ closeSubscription(this); } }); var SubscriptionObserver = function(subscription){ this._s = subscription; }; SubscriptionObserver.prototype = redefineAll({}, { next: function next(value){ var subscription = this._s; if(!subscriptionClosed(subscription)){ var observer = subscription._o; try { var m = getMethod(observer.next); if(m)return m.call(observer, value); } catch(e){ try { closeSubscription(subscription); } finally { throw e; } } } }, error: function error(value){ var subscription = this._s; if(subscriptionClosed(subscription))throw value; var observer = subscription._o; subscription._o = undefined; try { var m = getMethod(observer.error); if(!m)throw value; value = m.call(observer, value); } catch(e){ try { cleanupSubscription(subscription); } finally { throw e; } } cleanupSubscription(subscription); return value; }, complete: function complete(value){ var subscription = this._s; if(!subscriptionClosed(subscription)){ var observer = subscription._o; subscription._o = undefined; try { var m = getMethod(observer.complete); value = m ? m.call(observer, value) : undefined; } catch(e){ try { cleanupSubscription(subscription); } finally { throw e; } } cleanupSubscription(subscription); return value; } } }); var $Observable = function Observable(subscriber){ anInstance(this, $Observable, 'Observable', '_f')._f = aFunction(subscriber); }; redefineAll($Observable.prototype, { subscribe: function subscribe(observer){ return new Subscription(observer, this._f); }, forEach: function forEach(fn){ var that = this; return new (core.Promise || global.Promise)(function(resolve, reject){ aFunction(fn); var subscription = that.subscribe({ next : function(value){ try { return fn(value); } catch(e){ reject(e); subscription.unsubscribe(); } }, error: reject, complete: resolve }); }); } }); redefineAll($Observable, { from: function from(x){ var C = typeof this === 'function' ? this : $Observable; var method = getMethod(anObject(x)[OBSERVABLE]); if(method){ var observable = anObject(method.call(x)); return observable.constructor === C ? observable : new C(function(observer){ return observable.subscribe(observer); }); } return new C(function(observer){ var done = false; microtask(function(){ if(!done){ try { if(forOf(x, false, function(it){ observer.next(it); if(done)return RETURN; }) === RETURN)return; } catch(e){ if(done)throw e; observer.error(e); return; } observer.complete(); } }); return function(){ done = true; }; }); }, of: function of(){ for(var i = 0, l = arguments.length, items = Array(l); i < l;)items[i] = arguments[i++]; return new (typeof this === 'function' ? this : $Observable)(function(observer){ var done = false; microtask(function(){ if(!done){ for(var i = 0; i < items.length; ++i){ observer.next(items[i]); if(done)return; } observer.complete(); } }); return function(){ done = true; }; }); } }); hide($Observable.prototype, OBSERVABLE, function(){ return this; }); $export($export.G, {Observable: $Observable}); require('./_set-species')('Observable');core-js-2.4.1/modules/es7.reflect.define-metadata.js000066400000000000000000000006261274277553300222410ustar00rootroot00000000000000var metadata = require('./_metadata') , anObject = require('./_an-object') , toMetaKey = metadata.key , ordinaryDefineOwnMetadata = metadata.set; metadata.exp({defineMetadata: function defineMetadata(metadataKey, metadataValue, target, targetKey){ ordinaryDefineOwnMetadata(metadataKey, metadataValue, anObject(target), toMetaKey(targetKey)); }});core-js-2.4.1/modules/es7.reflect.delete-metadata.js000066400000000000000000000013561274277553300222520ustar00rootroot00000000000000var metadata = require('./_metadata') , anObject = require('./_an-object') , toMetaKey = metadata.key , getOrCreateMetadataMap = metadata.map , store = metadata.store; metadata.exp({deleteMetadata: function deleteMetadata(metadataKey, target /*, targetKey */){ var targetKey = arguments.length < 3 ? undefined : toMetaKey(arguments[2]) , metadataMap = getOrCreateMetadataMap(anObject(target), targetKey, false); if(metadataMap === undefined || !metadataMap['delete'](metadataKey))return false; if(metadataMap.size)return true; var targetMetadata = store.get(target); targetMetadata['delete'](targetKey); return !!targetMetadata.size || store['delete'](target); }});core-js-2.4.1/modules/es7.reflect.get-metadata-keys.js000066400000000000000000000015351274277553300225370ustar00rootroot00000000000000var Set = require('./es6.set') , from = require('./_array-from-iterable') , metadata = require('./_metadata') , anObject = require('./_an-object') , getPrototypeOf = require('./_object-gpo') , ordinaryOwnMetadataKeys = metadata.keys , toMetaKey = metadata.key; var ordinaryMetadataKeys = function(O, P){ var oKeys = ordinaryOwnMetadataKeys(O, P) , parent = getPrototypeOf(O); if(parent === null)return oKeys; var pKeys = ordinaryMetadataKeys(parent, P); return pKeys.length ? oKeys.length ? from(new Set(oKeys.concat(pKeys))) : pKeys : oKeys; }; metadata.exp({getMetadataKeys: function getMetadataKeys(target /*, targetKey */){ return ordinaryMetadataKeys(anObject(target), arguments.length < 2 ? undefined : toMetaKey(arguments[1])); }});core-js-2.4.1/modules/es7.reflect.get-metadata.js000066400000000000000000000014341274277553300215640ustar00rootroot00000000000000var metadata = require('./_metadata') , anObject = require('./_an-object') , getPrototypeOf = require('./_object-gpo') , ordinaryHasOwnMetadata = metadata.has , ordinaryGetOwnMetadata = metadata.get , toMetaKey = metadata.key; var ordinaryGetMetadata = function(MetadataKey, O, P){ var hasOwn = ordinaryHasOwnMetadata(MetadataKey, O, P); if(hasOwn)return ordinaryGetOwnMetadata(MetadataKey, O, P); var parent = getPrototypeOf(O); return parent !== null ? ordinaryGetMetadata(MetadataKey, parent, P) : undefined; }; metadata.exp({getMetadata: function getMetadata(metadataKey, target /*, targetKey */){ return ordinaryGetMetadata(metadataKey, anObject(target), arguments.length < 3 ? undefined : toMetaKey(arguments[2])); }});core-js-2.4.1/modules/es7.reflect.get-own-metadata-keys.js000066400000000000000000000006201274277553300233320ustar00rootroot00000000000000var metadata = require('./_metadata') , anObject = require('./_an-object') , ordinaryOwnMetadataKeys = metadata.keys , toMetaKey = metadata.key; metadata.exp({getOwnMetadataKeys: function getOwnMetadataKeys(target /*, targetKey */){ return ordinaryOwnMetadataKeys(anObject(target), arguments.length < 2 ? undefined : toMetaKey(arguments[1])); }});core-js-2.4.1/modules/es7.reflect.get-own-metadata.js000066400000000000000000000006411274277553300223640ustar00rootroot00000000000000var metadata = require('./_metadata') , anObject = require('./_an-object') , ordinaryGetOwnMetadata = metadata.get , toMetaKey = metadata.key; metadata.exp({getOwnMetadata: function getOwnMetadata(metadataKey, target /*, targetKey */){ return ordinaryGetOwnMetadata(metadataKey, anObject(target) , arguments.length < 3 ? undefined : toMetaKey(arguments[2])); }});core-js-2.4.1/modules/es7.reflect.has-metadata.js000066400000000000000000000013111274277553300215520ustar00rootroot00000000000000var metadata = require('./_metadata') , anObject = require('./_an-object') , getPrototypeOf = require('./_object-gpo') , ordinaryHasOwnMetadata = metadata.has , toMetaKey = metadata.key; var ordinaryHasMetadata = function(MetadataKey, O, P){ var hasOwn = ordinaryHasOwnMetadata(MetadataKey, O, P); if(hasOwn)return true; var parent = getPrototypeOf(O); return parent !== null ? ordinaryHasMetadata(MetadataKey, parent, P) : false; }; metadata.exp({hasMetadata: function hasMetadata(metadataKey, target /*, targetKey */){ return ordinaryHasMetadata(metadataKey, anObject(target), arguments.length < 3 ? undefined : toMetaKey(arguments[2])); }});core-js-2.4.1/modules/es7.reflect.has-own-metadata.js000066400000000000000000000006411274277553300223600ustar00rootroot00000000000000var metadata = require('./_metadata') , anObject = require('./_an-object') , ordinaryHasOwnMetadata = metadata.has , toMetaKey = metadata.key; metadata.exp({hasOwnMetadata: function hasOwnMetadata(metadataKey, target /*, targetKey */){ return ordinaryHasOwnMetadata(metadataKey, anObject(target) , arguments.length < 3 ? undefined : toMetaKey(arguments[2])); }});core-js-2.4.1/modules/es7.reflect.metadata.js000066400000000000000000000010471274277553300210070ustar00rootroot00000000000000var metadata = require('./_metadata') , anObject = require('./_an-object') , aFunction = require('./_a-function') , toMetaKey = metadata.key , ordinaryDefineOwnMetadata = metadata.set; metadata.exp({metadata: function metadata(metadataKey, metadataValue){ return function decorator(target, targetKey){ ordinaryDefineOwnMetadata( metadataKey, metadataValue, (targetKey !== undefined ? anObject : aFunction)(target), toMetaKey(targetKey) ); }; }});core-js-2.4.1/modules/es7.set.to-json.js000066400000000000000000000002721274277553300177660ustar00rootroot00000000000000// https://github.com/DavidBruant/Map-Set.prototype.toJSON var $export = require('./_export'); $export($export.P + $export.R, 'Set', {toJSON: require('./_collection-to-json')('Set')});core-js-2.4.1/modules/es7.string.at.js000066400000000000000000000003601274277553300175120ustar00rootroot00000000000000'use strict'; // https://github.com/mathiasbynens/String.prototype.at var $export = require('./_export') , $at = require('./_string-at')(true); $export($export.P, 'String', { at: function at(pos){ return $at(this, pos); } });core-js-2.4.1/modules/es7.string.match-all.js000066400000000000000000000020141274277553300207460ustar00rootroot00000000000000'use strict'; // https://tc39.github.io/String.prototype.matchAll/ var $export = require('./_export') , defined = require('./_defined') , toLength = require('./_to-length') , isRegExp = require('./_is-regexp') , getFlags = require('./_flags') , RegExpProto = RegExp.prototype; var $RegExpStringIterator = function(regexp, string){ this._r = regexp; this._s = string; }; require('./_iter-create')($RegExpStringIterator, 'RegExp String', function next(){ var match = this._r.exec(this._s); return {value: match, done: match === null}; }); $export($export.P, 'String', { matchAll: function matchAll(regexp){ defined(this); if(!isRegExp(regexp))throw TypeError(regexp + ' is not a regexp!'); var S = String(this) , flags = 'flags' in RegExpProto ? String(regexp.flags) : getFlags.call(regexp) , rx = new RegExp(regexp.source, ~flags.indexOf('g') ? flags : 'g' + flags); rx.lastIndex = toLength(regexp.lastIndex); return new $RegExpStringIterator(rx, S); } });core-js-2.4.1/modules/es7.string.pad-end.js000066400000000000000000000005211274277553300204150ustar00rootroot00000000000000'use strict'; // https://github.com/tc39/proposal-string-pad-start-end var $export = require('./_export') , $pad = require('./_string-pad'); $export($export.P, 'String', { padEnd: function padEnd(maxLength /*, fillString = ' ' */){ return $pad(this, maxLength, arguments.length > 1 ? arguments[1] : undefined, false); } });core-js-2.4.1/modules/es7.string.pad-start.js000066400000000000000000000005241274277553300210070ustar00rootroot00000000000000'use strict'; // https://github.com/tc39/proposal-string-pad-start-end var $export = require('./_export') , $pad = require('./_string-pad'); $export($export.P, 'String', { padStart: function padStart(maxLength /*, fillString = ' ' */){ return $pad(this, maxLength, arguments.length > 1 ? arguments[1] : undefined, true); } });core-js-2.4.1/modules/es7.string.trim-left.js000066400000000000000000000003271274277553300210140ustar00rootroot00000000000000'use strict'; // https://github.com/sebmarkbage/ecmascript-string-left-right-trim require('./_string-trim')('trimLeft', function($trim){ return function trimLeft(){ return $trim(this, 1); }; }, 'trimStart');core-js-2.4.1/modules/es7.string.trim-right.js000066400000000000000000000003271274277553300211770ustar00rootroot00000000000000'use strict'; // https://github.com/sebmarkbage/ecmascript-string-left-right-trim require('./_string-trim')('trimRight', function($trim){ return function trimRight(){ return $trim(this, 2); }; }, 'trimEnd');core-js-2.4.1/modules/es7.symbol.async-iterator.js000066400000000000000000000000521274277553300220470ustar00rootroot00000000000000require('./_wks-define')('asyncIterator');core-js-2.4.1/modules/es7.symbol.observable.js000066400000000000000000000000471274277553300212330ustar00rootroot00000000000000require('./_wks-define')('observable');core-js-2.4.1/modules/es7.system.global.js000066400000000000000000000002171274277553300203650ustar00rootroot00000000000000// https://github.com/ljharb/proposal-global var $export = require('./_export'); $export($export.S, 'System', {global: require('./_global')});core-js-2.4.1/modules/library/000077500000000000000000000000001274277553300162135ustar00rootroot00000000000000core-js-2.4.1/modules/library/_add-to-unscopables.js000066400000000000000000000000531274277553300223720ustar00rootroot00000000000000module.exports = function(){ /* empty */ };core-js-2.4.1/modules/library/_collection.js000066400000000000000000000040331274277553300210430ustar00rootroot00000000000000'use strict'; var global = require('./_global') , $export = require('./_export') , meta = require('./_meta') , fails = require('./_fails') , hide = require('./_hide') , redefineAll = require('./_redefine-all') , forOf = require('./_for-of') , anInstance = require('./_an-instance') , isObject = require('./_is-object') , setToStringTag = require('./_set-to-string-tag') , dP = require('./_object-dp').f , each = require('./_array-methods')(0) , DESCRIPTORS = require('./_descriptors'); module.exports = function(NAME, wrapper, methods, common, IS_MAP, IS_WEAK){ var Base = global[NAME] , C = Base , ADDER = IS_MAP ? 'set' : 'add' , proto = C && C.prototype , O = {}; if(!DESCRIPTORS || typeof C != 'function' || !(IS_WEAK || proto.forEach && !fails(function(){ new C().entries().next(); }))){ // create collection constructor C = common.getConstructor(wrapper, NAME, IS_MAP, ADDER); redefineAll(C.prototype, methods); meta.NEED = true; } else { C = wrapper(function(target, iterable){ anInstance(target, C, NAME, '_c'); target._c = new Base; if(iterable != undefined)forOf(iterable, IS_MAP, target[ADDER], target); }); each('add,clear,delete,forEach,get,has,set,keys,values,entries,toJSON'.split(','),function(KEY){ var IS_ADDER = KEY == 'add' || KEY == 'set'; if(KEY in proto && !(IS_WEAK && KEY == 'clear'))hide(C.prototype, KEY, function(a, b){ anInstance(this, C, KEY); if(!IS_ADDER && IS_WEAK && !isObject(a))return KEY == 'get' ? undefined : false; var result = this._c[KEY](a === 0 ? 0 : a, b); return IS_ADDER ? this : result; }); }); if('size' in proto)dP(C.prototype, 'size', { get: function(){ return this._c.size; } }); } setToStringTag(C, NAME); O[NAME] = C; $export($export.G + $export.W + $export.F, O); if(!IS_WEAK)common.setStrong(C, NAME, IS_MAP); return C; };core-js-2.4.1/modules/library/_export.js000066400000000000000000000044101274277553300202300ustar00rootroot00000000000000var global = require('./_global') , core = require('./_core') , ctx = require('./_ctx') , hide = require('./_hide') , PROTOTYPE = 'prototype'; var $export = function(type, name, source){ var IS_FORCED = type & $export.F , IS_GLOBAL = type & $export.G , IS_STATIC = type & $export.S , IS_PROTO = type & $export.P , IS_BIND = type & $export.B , IS_WRAP = type & $export.W , exports = IS_GLOBAL ? core : core[name] || (core[name] = {}) , expProto = exports[PROTOTYPE] , target = IS_GLOBAL ? global : IS_STATIC ? global[name] : (global[name] || {})[PROTOTYPE] , key, own, out; if(IS_GLOBAL)source = name; for(key in source){ // contains in native own = !IS_FORCED && target && target[key] !== undefined; if(own && key in exports)continue; // export native or passed out = own ? target[key] : source[key]; // prevent global pollution for namespaces exports[key] = IS_GLOBAL && typeof target[key] != 'function' ? source[key] // bind timers to global for call from export context : IS_BIND && own ? ctx(out, global) // wrap global constructors for prevent change them in library : IS_WRAP && target[key] == out ? (function(C){ var F = function(a, b, c){ if(this instanceof C){ switch(arguments.length){ case 0: return new C; case 1: return new C(a); case 2: return new C(a, b); } return new C(a, b, c); } return C.apply(this, arguments); }; F[PROTOTYPE] = C[PROTOTYPE]; return F; // make static versions for prototype methods })(out) : IS_PROTO && typeof out == 'function' ? ctx(Function.call, out) : out; // export proto methods to core.%CONSTRUCTOR%.methods.%NAME% if(IS_PROTO){ (exports.virtual || (exports.virtual = {}))[key] = out; // export proto methods to core.%CONSTRUCTOR%.prototype.%NAME% if(type & $export.R && expProto && !expProto[key])hide(expProto, key, out); } } }; // type bitmap $export.F = 1; // forced $export.G = 2; // global $export.S = 4; // static $export.P = 8; // proto $export.B = 16; // bind $export.W = 32; // wrap $export.U = 64; // safe $export.R = 128; // real proto method for `library` module.exports = $export;core-js-2.4.1/modules/library/_library.js000066400000000000000000000000261274277553300203520ustar00rootroot00000000000000module.exports = true;core-js-2.4.1/modules/library/_path.js000066400000000000000000000000441274277553300176420ustar00rootroot00000000000000module.exports = require('./_core');core-js-2.4.1/modules/library/_redefine-all.js000066400000000000000000000003221274277553300212340ustar00rootroot00000000000000var hide = require('./_hide'); module.exports = function(target, src, safe){ for(var key in src){ if(safe && target[key])target[key] = src[key]; else hide(target, key, src[key]); } return target; };core-js-2.4.1/modules/library/_redefine.js000066400000000000000000000000441274277553300204670ustar00rootroot00000000000000module.exports = require('./_hide');core-js-2.4.1/modules/library/_set-species.js000066400000000000000000000007011274277553300211320ustar00rootroot00000000000000'use strict'; var global = require('./_global') , core = require('./_core') , dP = require('./_object-dp') , DESCRIPTORS = require('./_descriptors') , SPECIES = require('./_wks')('species'); module.exports = function(KEY){ var C = typeof core[KEY] == 'function' ? core[KEY] : global[KEY]; if(DESCRIPTORS && C && !C[SPECIES])dP.f(C, SPECIES, { configurable: true, get: function(){ return this; } }); };core-js-2.4.1/modules/library/es6.date.to-primitive.js000066400000000000000000000000001274277553300225770ustar00rootroot00000000000000core-js-2.4.1/modules/library/es6.date.to-string.js000066400000000000000000000000001274277553300220750ustar00rootroot00000000000000core-js-2.4.1/modules/library/es6.function.name.js000066400000000000000000000000001274277553300217770ustar00rootroot00000000000000core-js-2.4.1/modules/library/es6.number.constructor.js000066400000000000000000000000001274277553300231070ustar00rootroot00000000000000core-js-2.4.1/modules/library/es6.object.to-string.js000066400000000000000000000000001274277553300224260ustar00rootroot00000000000000core-js-2.4.1/modules/library/es6.regexp.constructor.js000066400000000000000000000000441274277553300231210ustar00rootroot00000000000000require('./_set-species')('RegExp');core-js-2.4.1/modules/library/es6.regexp.flags.js000066400000000000000000000000001274277553300216200ustar00rootroot00000000000000core-js-2.4.1/modules/library/es6.regexp.match.js000066400000000000000000000000001274277553300216200ustar00rootroot00000000000000core-js-2.4.1/modules/library/es6.regexp.replace.js000066400000000000000000000000001274277553300221370ustar00rootroot00000000000000core-js-2.4.1/modules/library/es6.regexp.search.js000066400000000000000000000000001274277553300217710ustar00rootroot00000000000000core-js-2.4.1/modules/library/es6.regexp.split.js000066400000000000000000000000001274277553300216570ustar00rootroot00000000000000core-js-2.4.1/modules/library/es6.regexp.to-string.js000066400000000000000000000000001274277553300224520ustar00rootroot00000000000000core-js-2.4.1/modules/library/web.dom.iterable.js000066400000000000000000000010571274277553300216750ustar00rootroot00000000000000require('./es6.array.iterator'); var global = require('./_global') , hide = require('./_hide') , Iterators = require('./_iterators') , TO_STRING_TAG = require('./_wks')('toStringTag'); for(var collections = ['NodeList', 'DOMTokenList', 'MediaList', 'StyleSheetList', 'CSSRuleList'], i = 0; i < 5; i++){ var NAME = collections[i] , Collection = global[NAME] , proto = Collection && Collection.prototype; if(proto && !proto[TO_STRING_TAG])hide(proto, TO_STRING_TAG, NAME); Iterators[NAME] = Iterators.Array; }core-js-2.4.1/modules/web.dom.iterable.js000066400000000000000000000015611274277553300202310ustar00rootroot00000000000000var $iterators = require('./es6.array.iterator') , redefine = require('./_redefine') , global = require('./_global') , hide = require('./_hide') , Iterators = require('./_iterators') , wks = require('./_wks') , ITERATOR = wks('iterator') , TO_STRING_TAG = wks('toStringTag') , ArrayValues = Iterators.Array; for(var collections = ['NodeList', 'DOMTokenList', 'MediaList', 'StyleSheetList', 'CSSRuleList'], i = 0; i < 5; i++){ var NAME = collections[i] , Collection = global[NAME] , proto = Collection && Collection.prototype , key; if(proto){ if(!proto[ITERATOR])hide(proto, ITERATOR, ArrayValues); if(!proto[TO_STRING_TAG])hide(proto, TO_STRING_TAG, NAME); Iterators[NAME] = ArrayValues; for(key in $iterators)if(!proto[key])redefine(proto, key, $iterators[key], true); } }core-js-2.4.1/modules/web.immediate.js000066400000000000000000000002441274277553300176170ustar00rootroot00000000000000var $export = require('./_export') , $task = require('./_task'); $export($export.G + $export.B, { setImmediate: $task.set, clearImmediate: $task.clear });core-js-2.4.1/modules/web.timers.js000066400000000000000000000012761274277553300171720ustar00rootroot00000000000000// ie9- setTimeout & setInterval additional parameters fix var global = require('./_global') , $export = require('./_export') , invoke = require('./_invoke') , partial = require('./_partial') , navigator = global.navigator , MSIE = !!navigator && /MSIE .\./.test(navigator.userAgent); // <- dirty ie9- check var wrap = function(set){ return MSIE ? function(fn, time /*, ...args */){ return set(invoke( partial, [].slice.call(arguments, 2), typeof fn == 'function' ? fn : Function(fn) ), time); } : set; }; $export($export.G + $export.B + $export.F * MSIE, { setTimeout: wrap(global.setTimeout), setInterval: wrap(global.setInterval) });core-js-2.4.1/package.json000066400000000000000000000034171274277553300153720ustar00rootroot00000000000000{ "name": "core-js", "description": "Standard library", "version": "2.4.1", "repository": { "type": "git", "url": "https://github.com/zloirock/core-js.git" }, "main": "index.js", "devDependencies": { "webpack": "1.13.x", "LiveScript": "1.3.x", "grunt": "1.0.x", "grunt-cli": "1.2.x", "grunt-livescript": "0.6.x", "grunt-contrib-uglify": "1.0.x", "grunt-contrib-watch": "1.0.x", "grunt-contrib-clean": "1.0.x", "grunt-contrib-copy": "1.0.x", "grunt-karma": "2.0.x", "karma": "1.1.x", "karma-qunit": "1.1.x", "karma-chrome-launcher": "1.0.x", "karma-ie-launcher": "1.0.x", "karma-firefox-launcher": "1.0.x", "karma-phantomjs-launcher": "1.0.x", "qunitjs": "2.0.x", "phantomjs-prebuilt": "2.1.x", "promises-aplus-tests": "2.1.x", "es-observable-tests": "0.2.x", "eslint": "3.1.x", "temp": "0.8.x" }, "scripts": { "grunt": "grunt", "lint": "eslint es5 es6 es7 stage web core fn modules", "promises-tests": "promises-aplus-tests tests/promises-aplus/adapter", "observables-tests": "node tests/observables/adapter && node tests/observables/adapter-library", "test": "npm run lint && npm run grunt livescript client karma:default && npm run grunt library karma:library && npm run promises-tests && npm run observables-tests && lsc tests/commonjs" }, "license": "MIT", "keywords": [ "ES3", "ECMAScript 3", "ES5", "ECMAScript 5", "ES6", "ES2015", "ECMAScript 6", "ECMAScript 2015", "ES7", "ES2016", "ECMAScript 7", "ECMAScript 2016", "Harmony", "Strawman", "Map", "Set", "WeakMap", "WeakSet", "Promise", "Symbol", "TypedArray", "setImmediate", "Dict", "polyfill", "shim" ] }core-js-2.4.1/shim.js000066400000000000000000000163251274277553300144040ustar00rootroot00000000000000require('./modules/es6.symbol'); require('./modules/es6.object.create'); require('./modules/es6.object.define-property'); require('./modules/es6.object.define-properties'); require('./modules/es6.object.get-own-property-descriptor'); require('./modules/es6.object.get-prototype-of'); require('./modules/es6.object.keys'); require('./modules/es6.object.get-own-property-names'); require('./modules/es6.object.freeze'); require('./modules/es6.object.seal'); require('./modules/es6.object.prevent-extensions'); require('./modules/es6.object.is-frozen'); require('./modules/es6.object.is-sealed'); require('./modules/es6.object.is-extensible'); require('./modules/es6.object.assign'); require('./modules/es6.object.is'); require('./modules/es6.object.set-prototype-of'); require('./modules/es6.object.to-string'); require('./modules/es6.function.bind'); require('./modules/es6.function.name'); require('./modules/es6.function.has-instance'); require('./modules/es6.parse-int'); require('./modules/es6.parse-float'); require('./modules/es6.number.constructor'); require('./modules/es6.number.to-fixed'); require('./modules/es6.number.to-precision'); require('./modules/es6.number.epsilon'); require('./modules/es6.number.is-finite'); require('./modules/es6.number.is-integer'); require('./modules/es6.number.is-nan'); require('./modules/es6.number.is-safe-integer'); require('./modules/es6.number.max-safe-integer'); require('./modules/es6.number.min-safe-integer'); require('./modules/es6.number.parse-float'); require('./modules/es6.number.parse-int'); require('./modules/es6.math.acosh'); require('./modules/es6.math.asinh'); require('./modules/es6.math.atanh'); require('./modules/es6.math.cbrt'); require('./modules/es6.math.clz32'); require('./modules/es6.math.cosh'); require('./modules/es6.math.expm1'); require('./modules/es6.math.fround'); require('./modules/es6.math.hypot'); require('./modules/es6.math.imul'); require('./modules/es6.math.log10'); require('./modules/es6.math.log1p'); require('./modules/es6.math.log2'); require('./modules/es6.math.sign'); require('./modules/es6.math.sinh'); require('./modules/es6.math.tanh'); require('./modules/es6.math.trunc'); require('./modules/es6.string.from-code-point'); require('./modules/es6.string.raw'); require('./modules/es6.string.trim'); require('./modules/es6.string.iterator'); require('./modules/es6.string.code-point-at'); require('./modules/es6.string.ends-with'); require('./modules/es6.string.includes'); require('./modules/es6.string.repeat'); require('./modules/es6.string.starts-with'); require('./modules/es6.string.anchor'); require('./modules/es6.string.big'); require('./modules/es6.string.blink'); require('./modules/es6.string.bold'); require('./modules/es6.string.fixed'); require('./modules/es6.string.fontcolor'); require('./modules/es6.string.fontsize'); require('./modules/es6.string.italics'); require('./modules/es6.string.link'); require('./modules/es6.string.small'); require('./modules/es6.string.strike'); require('./modules/es6.string.sub'); require('./modules/es6.string.sup'); require('./modules/es6.date.now'); require('./modules/es6.date.to-json'); require('./modules/es6.date.to-iso-string'); require('./modules/es6.date.to-string'); require('./modules/es6.date.to-primitive'); require('./modules/es6.array.is-array'); require('./modules/es6.array.from'); require('./modules/es6.array.of'); require('./modules/es6.array.join'); require('./modules/es6.array.slice'); require('./modules/es6.array.sort'); require('./modules/es6.array.for-each'); require('./modules/es6.array.map'); require('./modules/es6.array.filter'); require('./modules/es6.array.some'); require('./modules/es6.array.every'); require('./modules/es6.array.reduce'); require('./modules/es6.array.reduce-right'); require('./modules/es6.array.index-of'); require('./modules/es6.array.last-index-of'); require('./modules/es6.array.copy-within'); require('./modules/es6.array.fill'); require('./modules/es6.array.find'); require('./modules/es6.array.find-index'); require('./modules/es6.array.species'); require('./modules/es6.array.iterator'); require('./modules/es6.regexp.constructor'); require('./modules/es6.regexp.to-string'); require('./modules/es6.regexp.flags'); require('./modules/es6.regexp.match'); require('./modules/es6.regexp.replace'); require('./modules/es6.regexp.search'); require('./modules/es6.regexp.split'); require('./modules/es6.promise'); require('./modules/es6.map'); require('./modules/es6.set'); require('./modules/es6.weak-map'); require('./modules/es6.weak-set'); require('./modules/es6.typed.array-buffer'); require('./modules/es6.typed.data-view'); require('./modules/es6.typed.int8-array'); require('./modules/es6.typed.uint8-array'); require('./modules/es6.typed.uint8-clamped-array'); require('./modules/es6.typed.int16-array'); require('./modules/es6.typed.uint16-array'); require('./modules/es6.typed.int32-array'); require('./modules/es6.typed.uint32-array'); require('./modules/es6.typed.float32-array'); require('./modules/es6.typed.float64-array'); require('./modules/es6.reflect.apply'); require('./modules/es6.reflect.construct'); require('./modules/es6.reflect.define-property'); require('./modules/es6.reflect.delete-property'); require('./modules/es6.reflect.enumerate'); require('./modules/es6.reflect.get'); require('./modules/es6.reflect.get-own-property-descriptor'); require('./modules/es6.reflect.get-prototype-of'); require('./modules/es6.reflect.has'); require('./modules/es6.reflect.is-extensible'); require('./modules/es6.reflect.own-keys'); require('./modules/es6.reflect.prevent-extensions'); require('./modules/es6.reflect.set'); require('./modules/es6.reflect.set-prototype-of'); require('./modules/es7.array.includes'); require('./modules/es7.string.at'); require('./modules/es7.string.pad-start'); require('./modules/es7.string.pad-end'); require('./modules/es7.string.trim-left'); require('./modules/es7.string.trim-right'); require('./modules/es7.string.match-all'); require('./modules/es7.symbol.async-iterator'); require('./modules/es7.symbol.observable'); require('./modules/es7.object.get-own-property-descriptors'); require('./modules/es7.object.values'); require('./modules/es7.object.entries'); require('./modules/es7.object.define-getter'); require('./modules/es7.object.define-setter'); require('./modules/es7.object.lookup-getter'); require('./modules/es7.object.lookup-setter'); require('./modules/es7.map.to-json'); require('./modules/es7.set.to-json'); require('./modules/es7.system.global'); require('./modules/es7.error.is-error'); require('./modules/es7.math.iaddh'); require('./modules/es7.math.isubh'); require('./modules/es7.math.imulh'); require('./modules/es7.math.umulh'); require('./modules/es7.reflect.define-metadata'); require('./modules/es7.reflect.delete-metadata'); require('./modules/es7.reflect.get-metadata'); require('./modules/es7.reflect.get-metadata-keys'); require('./modules/es7.reflect.get-own-metadata'); require('./modules/es7.reflect.get-own-metadata-keys'); require('./modules/es7.reflect.has-metadata'); require('./modules/es7.reflect.has-own-metadata'); require('./modules/es7.reflect.metadata'); require('./modules/es7.asap'); require('./modules/es7.observable'); require('./modules/web.timers'); require('./modules/web.immediate'); require('./modules/web.dom.iterable'); module.exports = require('./modules/_core');core-js-2.4.1/stage/000077500000000000000000000000001274277553300142025ustar00rootroot00000000000000core-js-2.4.1/stage/0.js000066400000000000000000000005651274277553300147050ustar00rootroot00000000000000require('../modules/es7.string.at'); require('../modules/es7.map.to-json'); require('../modules/es7.set.to-json'); require('../modules/es7.error.is-error'); require('../modules/es7.math.iaddh'); require('../modules/es7.math.isubh'); require('../modules/es7.math.imulh'); require('../modules/es7.math.umulh'); require('../modules/es7.asap'); module.exports = require('./1');core-js-2.4.1/stage/1.js000066400000000000000000000003711274277553300147010ustar00rootroot00000000000000require('../modules/es7.string.trim-left'); require('../modules/es7.string.trim-right'); require('../modules/es7.string.match-all'); require('../modules/es7.symbol.observable'); require('../modules/es7.observable'); module.exports = require('./2'); core-js-2.4.1/stage/2.js000066400000000000000000000001731274277553300147020ustar00rootroot00000000000000require('../modules/es7.system.global'); require('../modules/es7.symbol.async-iterator'); module.exports = require('./3'); core-js-2.4.1/stage/3.js000066400000000000000000000002661274277553300147060ustar00rootroot00000000000000require('../modules/es7.object.get-own-property-descriptors'); require('../modules/es7.string.pad-start'); require('../modules/es7.string.pad-end'); module.exports = require('./4'); core-js-2.4.1/stage/4.js000066400000000000000000000005531274277553300147060ustar00rootroot00000000000000require('../modules/es7.object.define-getter'); require('../modules/es7.object.define-setter'); require('../modules/es7.object.lookup-getter'); require('../modules/es7.object.lookup-setter'); require('../modules/es7.object.values'); require('../modules/es7.object.entries'); require('../modules/es7.array.includes'); module.exports = require('../modules/_core'); core-js-2.4.1/stage/index.js000066400000000000000000000000421274277553300156430ustar00rootroot00000000000000module.exports = require('./pre');core-js-2.4.1/stage/pre.js000066400000000000000000000007501274277553300153300ustar00rootroot00000000000000require('../modules/es7.reflect.define-metadata'); require('../modules/es7.reflect.delete-metadata'); require('../modules/es7.reflect.get-metadata'); require('../modules/es7.reflect.get-metadata-keys'); require('../modules/es7.reflect.get-own-metadata'); require('../modules/es7.reflect.get-own-metadata-keys'); require('../modules/es7.reflect.has-metadata'); require('../modules/es7.reflect.has-own-metadata'); require('../modules/es7.reflect.metadata'); module.exports = require('./0');core-js-2.4.1/tests/000077500000000000000000000000001274277553300142415ustar00rootroot00000000000000core-js-2.4.1/tests/commonjs.ls000066400000000000000000000436131274277553300164350ustar00rootroot00000000000000{ok} = require \assert for P in <[.. ../library]> ok require("#P/fn/object/assign")({q: 1}, {w: 2}).w is 2 ok require("#P/fn/object/create")(Array.prototype) instanceof Array ok require("#P/fn/object/define-property")({}, \a, value: 42).a is 42 ok require("#P/fn/object/define-properties")({}, {a: value: 42}).a is 42 ok require("#P/fn/object/freeze") {} ok require("#P/fn/object/get-own-property-descriptor")({q: 1}, \q).enumerable ok require("#P/fn/object/get-own-property-names")(q : 42).0 is \q ok require("#P/fn/object/get-own-property-symbols")((Symbol!) : 42).length is 1 ok require("#P/fn/object/get-prototype-of")([]) is Array:: ok require("#P/fn/object/is") NaN, NaN ok require("#P/fn/object/is-extensible") {} ok !require("#P/fn/object/is-frozen") {} ok !require("#P/fn/object/is-sealed") {} ok require("#P/fn/object/keys")(q: 0).0 is \q ok require("#P/fn/object/prevent-extensions") {} ok require("#P/fn/object/seal") {} ok require("#P/fn/object/set-prototype-of")({}, []) instanceof Array ok require("#P/fn/object/entries")(q: 2).0.0 is \q ok require("#P/fn/object/values")(q: 2).0 is 2 ok require("#P/fn/object/get-own-property-descriptors")(q: 1).q.enumerable ok typeof require("#P/fn/object/define-getter") if \function ok typeof require("#P/fn/object/define-setter") if \function ok typeof require("#P/fn/object/lookup-getter") if \function ok typeof require("#P/fn/object/lookup-setter") if \function ok require("#P/fn/object/is-object") {} ok require("#P/fn/object/classof")(null) is \Null ok require("#P/fn/object/define")({}, {q: 42}).q is 42 ok require("#P/fn/object/make")([], {}) instanceof Array ok \isObject of require("#P/fn/object") ok require("#P/fn/function/bind")(((a, b)-> @ + a + b), 1 2)(3) is 6 ok require("#P/fn/function/part")(((a, b, c)-> a + b + c), 2 3)(4) is 9 ok require("#P/fn/function/virtual/bind").call(((a, b)-> @ + a + b), 1 2)(3) is 6 ok require("#P/fn/function/virtual/part").call(((a, b, c)-> a + b + c), 2 3)(4) is 9 ok require("#P/fn/function/virtual").part.call(((a, b, c)-> a + b + c), 2 3)(4) is 9 require("#P/fn/function/name") require("#P/fn/function/has-instance") ok Function[require("#P/fn/symbol/has-instance")] -> ok \part of require("#P/fn/function") ok require("#P/fn/array/is-array") [] ok Array.isArray require("#P/fn/array/from") 'qwe' ok Array.isArray require("#P/fn/array/of") \q \w \e ok require("#P/fn/array/join")(\qwe 1) is \q1w1e ok require("#P/fn/array/slice")(\qwe 1).1 is \e ok require("#P/fn/array/sort")([1 3 2]).1 is 2 ok typeof require("#P/fn/array/for-each") is \function ok typeof require("#P/fn/array/map") is \function ok typeof require("#P/fn/array/filter") is \function ok typeof require("#P/fn/array/some") is \function ok typeof require("#P/fn/array/every") is \function ok typeof require("#P/fn/array/reduce") is \function ok typeof require("#P/fn/array/reduce-right") is \function ok typeof require("#P/fn/array/index-of") is \function ok typeof require("#P/fn/array/last-index-of") is \function ok require("#P/fn/array/copy-within")([1 2 3 4 5] 0 3).0 is 4 ok \next of require("#P/fn/array/entries")([]) ok require("#P/fn/array/fill")(Array(5), 2).0 is 2 ok require("#P/fn/array/find")([2 3 4], -> it % 2) is 3 ok require("#P/fn/array/find-index")([2 3 4], -> it % 2) is 1 ok \next of require("#P/fn/array/keys")([]) ok \next of require("#P/fn/array/values")([]) ok require("#P/fn/array/includes")([1 2 3], 2) ok \next of require("#P/fn/array/iterator") [] ok require("#P/fn/array/virtual/join").call(\qwe 1) is \q1w1e ok require("#P/fn/array/virtual/slice").call(\qwe 1).1 is \e ok require("#P/fn/array/virtual/sort").call([1 3 2]).1 is 2 ok typeof require("#P/fn/array/virtual/for-each") is \function ok typeof require("#P/fn/array/virtual/map") is \function ok typeof require("#P/fn/array/virtual/filter") is \function ok typeof require("#P/fn/array/virtual/some") is \function ok typeof require("#P/fn/array/virtual/every") is \function ok typeof require("#P/fn/array/virtual/reduce") is \function ok typeof require("#P/fn/array/virtual/reduce-right") is \function ok typeof require("#P/fn/array/virtual/index-of") is \function ok typeof require("#P/fn/array/virtual/last-index-of") is \function ok require("#P/fn/array/virtual/copy-within").call([1 2 3 4 5] 0 3).0 is 4 ok \next of require("#P/fn/array/virtual/entries").call([]) ok require("#P/fn/array/virtual/fill").call(Array(5), 2).0 is 2 ok require("#P/fn/array/virtual/find").call([2 3 4], -> it % 2) is 3 ok require("#P/fn/array/virtual/find-index").call([2 3 4], -> it % 2) is 1 ok \next of require("#P/fn/array/virtual/keys").call([]) ok \next of require("#P/fn/array/virtual/values").call([]) ok require("#P/fn/array/virtual/includes").call([1 2 3], 2) ok \next of require("#P/fn/array/virtual/iterator").call [] ok require("#P/fn/array/virtual").includes.call([1 2 3], 2) ok \keys of require("#P/fn/array") # legacy ok require("#P/fn/array/concat")([1 2 3], [4 5 6]).length is 6 ok require("#P/fn/array/pop")([1 2 3]) is 3 ok require("#P/fn/array/push")([1 2 3], 4) is 4 ok require("#P/fn/array/reverse")([1 2 3]).0 is 3 ok require("#P/fn/array/shift")([1 2 3]) is 1 ok require("#P/fn/array/splice")([1 2 3], 1 2).0 is 2 ok require("#P/fn/array/unshift")([1 2 3], 0) is 4 # ... ok require("#P/fn/math/acosh")(1) is 0 ok require("#P/fn/math/asinh")(-0) is -0 ok require("#P/fn/math/atanh")(1) is Infinity ok require("#P/fn/math/cbrt")(-8) is -2 ok require("#P/fn/math/clz32")(0) is 32 ok require("#P/fn/math/cosh")(0) is 1 ok require("#P/fn/math/expm1")(-Infinity) is -1 ok require("#P/fn/math/fround")(0) is 0 ok require("#P/fn/math/hypot")(3, 4) is 5 ok require("#P/fn/math/imul")(2, 2) is 4 ok require("#P/fn/math/log10")(-0) is -Infinity ok require("#P/fn/math/log1p")(-1) is -Infinity ok require("#P/fn/math/log2")(1) is 0 ok require("#P/fn/math/sign")(-2) is -1 ok require("#P/fn/math/sinh")(-0) is -0 ok require("#P/fn/math/tanh")(Infinity) is 1 ok require("#P/fn/math/trunc")(1.5) is 1 ok require("#P/fn/math/iaddh")(3 2 0xffffffff 4) is 7 ok require("#P/fn/math/isubh")(3 4 0xffffffff 2) is 1 ok require("#P/fn/math/imulh")(0xffffffff 7) is -1 ok require("#P/fn/math/umulh")(0xffffffff 7) is 6 ok require("#P/fn/number/constructor")(\5) is 5 ok require("#P/fn/number/epsilon") is Math.pow 2 -52 ok require("#P/fn/number/is-finite") 42.5 ok require("#P/fn/number/is-integer")(42.5) is no ok require("#P/fn/number/is-nan") NaN ok require("#P/fn/number/is-safe-integer") 42 ok require("#P/fn/number/max-safe-integer") is 0x1fffffffffffff ok require("#P/fn/number/min-safe-integer") is -0x1fffffffffffff ok require("#P/fn/number/parse-float")('1.5') is 1.5 ok require("#P/fn/number/parse-int")('2.1') is 2 ok require("#P/fn/number/to-fixed")(1 1) is '1.0' ok require("#P/fn/number/to-precision")(1) is \1 ok require("#P/fn/parse-float")('1.5') is 1.5 ok require("#P/fn/parse-int")('2.1') is 2 ok \next of require("#P/fn/number/iterator") 42 ok \next of require("#P/fn/number/virtual/iterator").call 42 ok require("#P/fn/number/virtual/to-fixed").call(1 1) is '1.0' ok require("#P/fn/number/virtual/to-precision").call(1) is \1 ok \next of require("#P/fn/number/virtual").iterator.call 42 ok \isNaN of require("#P/fn/number") ok require("#P/fn/reflect/apply")(((a, b)-> a + b), null, [1, 2]) is 3 ok require("#P/fn/reflect/construct")((-> @a = 2), []).a is 2 require("#P/fn/reflect/define-property")(O = {}, \a {value: 42}) ok O.a is 42 ok require("#P/fn/reflect/delete-property") {q: 1}, \q ok \next of require("#P/fn/reflect/enumerate") {} ok require("#P/fn/reflect/get")({q: 1}, \q) is 1 ok require("#P/fn/reflect/get-own-property-descriptor")({q: 1}, \q).enumerable ok require("#P/fn/reflect/get-prototype-of")([]) is Array:: ok require("#P/fn/reflect/has")({q: 1}, \q) ok require("#P/fn/reflect/is-extensible") {} ok require("#P/fn/reflect/own-keys")(q: 1).0 is \q ok require("#P/fn/reflect/prevent-extensions") {} ok require("#P/fn/reflect/set")({}, \a 42) require("#P/fn/reflect/set-prototype-of")(O = {}, []) ok O instanceof Array ok typeof require("#P/fn/reflect/define-metadata") is \function ok typeof require("#P/fn/reflect/delete-metadata") is \function ok typeof require("#P/fn/reflect/get-metadata") is \function ok typeof require("#P/fn/reflect/get-metadata-keys") is \function ok typeof require("#P/fn/reflect/get-own-metadata") is \function ok typeof require("#P/fn/reflect/get-own-metadata-keys") is \function ok typeof require("#P/fn/reflect/has-metadata") is \function ok typeof require("#P/fn/reflect/has-own-metadata") is \function ok typeof require("#P/fn/reflect/metadata") is \function ok \enumerate of require("#P/fn/reflect") ok require("#P/fn/string/from-code-point")(97) is \a ok require("#P/fn/string/raw")({raw: \test}, 0, 1, 2) is \t0e1s2t ok require("#P/fn/string/code-point-at")(\a 0) is 97 ok require("#P/fn/string/ends-with") \qwe, \we ok require("#P/fn/string/includes") \qwe, \w ok require("#P/fn/string/repeat")(\q 3) is \qqq ok require("#P/fn/string/starts-with") \qwe, \qw ok typeof require("#P/fn/string/anchor") is \function ok typeof require("#P/fn/string/big") is \function ok typeof require("#P/fn/string/blink") is \function ok typeof require("#P/fn/string/bold") is \function ok typeof require("#P/fn/string/fixed") is \function ok typeof require("#P/fn/string/fontcolor") is \function ok typeof require("#P/fn/string/fontsize") is \function ok typeof require("#P/fn/string/italics") is \function ok typeof require("#P/fn/string/link") is \function ok typeof require("#P/fn/string/small") is \function ok typeof require("#P/fn/string/strike") is \function ok typeof require("#P/fn/string/sub") is \function ok typeof require("#P/fn/string/sup") is \function ok require("#P/fn/string/at")(\a 0) is \a ok require("#P/fn/string/pad-start")(\a 3) is ' a' ok require("#P/fn/string/pad-end")(\a 3) is 'a ' ok require("#P/fn/string/trim-start")(' a ') is 'a ' ok require("#P/fn/string/trim-end")(' a ') is ' a' ok require("#P/fn/string/trim-left")(' a ') is 'a ' ok require("#P/fn/string/trim-right")(' a ') is ' a' ok \next of require("#P/fn/string/match-all")(\a /./) ok require("#P/fn/string/escape-html")('
') is '<br />' ok require("#P/fn/string/unescape-html")('<br />') is '
' ok \next of require("#P/fn/string/iterator") \qwe ok require("#P/fn/string/virtual/code-point-at").call(\a 0) is 97 ok require("#P/fn/string/virtual/ends-with").call \qwe, \we ok require("#P/fn/string/virtual/includes").call \qwe, \w ok require("#P/fn/string/virtual/repeat").call(\q 3) is \qqq ok require("#P/fn/string/virtual/starts-with").call \qwe, \qw ok typeof require("#P/fn/string/virtual/anchor") is \function ok typeof require("#P/fn/string/virtual/big") is \function ok typeof require("#P/fn/string/virtual/blink") is \function ok typeof require("#P/fn/string/virtual/bold") is \function ok typeof require("#P/fn/string/virtual/fixed") is \function ok typeof require("#P/fn/string/virtual/fontcolor") is \function ok typeof require("#P/fn/string/virtual/fontsize") is \function ok typeof require("#P/fn/string/virtual/italics") is \function ok typeof require("#P/fn/string/virtual/link") is \function ok typeof require("#P/fn/string/virtual/small") is \function ok typeof require("#P/fn/string/virtual/strike") is \function ok typeof require("#P/fn/string/virtual/sub") is \function ok typeof require("#P/fn/string/virtual/sup") is \function ok require("#P/fn/string/virtual/at").call(\a 0) is \a ok require("#P/fn/string/virtual/pad-start").call(\a 3) is ' a' ok require("#P/fn/string/virtual/pad-end").call(\a 3) is 'a ' ok require("#P/fn/string/virtual/trim-start").call(' a ') is 'a ' ok require("#P/fn/string/virtual/trim-end").call(' a ') is ' a' ok require("#P/fn/string/virtual/trim-left").call(' a ') is 'a ' ok require("#P/fn/string/virtual/trim-right").call(' a ') is ' a' ok \next of require("#P/fn/string/virtual/match-all").call(\a /./) ok require("#P/fn/string/virtual/escape-html").call('
') is '<br />' ok require("#P/fn/string/virtual/unescape-html").call('<br />') is '
' ok require("#P/fn/string/virtual").unescapeHTML.call('<br />') is '
' ok \next of require("#P/fn/string/virtual/iterator").call \qwe ok \raw of require("#P/fn/string") ok require("#P/fn/regexp/constructor")(\a \g) + '' is '/a/g' ok require("#P/fn/regexp/to-string")(/./g) is '/./g' ok require("#P/fn/regexp/flags")(/./g) is \g ok typeof require("#P/fn/regexp/match") is \function ok typeof require("#P/fn/regexp/replace") is \function ok typeof require("#P/fn/regexp/search") is \function ok typeof require("#P/fn/regexp/split") is \function ok require("#P/fn/regexp/escape")('...') is '\\.\\.\\.' ok \escape of require("#P/fn/regexp") ok require("#P/fn/json").stringify([1]) is '[1]' ok require("#P/fn/json/stringify")([1]) is '[1]' ok typeof require("#P/fn/date/now")(new Date) is \number ok typeof require("#P/fn/date/to-string")(new Date) is \string ok typeof require("#P/fn/date/to-primitive")(new Date, \number) is \number ok typeof require("#P/fn/date/to-iso-string")(new Date) is \string ok require("#P/fn/date/to-json")(Infinity) is null ok require("#P/fn/date") ok require("#P/fn/symbol/has-instance") ok require("#P/fn/symbol/is-concat-spreadable") ok require("#P/fn/symbol/iterator") ok require("#P/fn/symbol/match") ok require("#P/fn/symbol/replace") ok require("#P/fn/symbol/search") ok require("#P/fn/symbol/species") ok require("#P/fn/symbol/split") ok require("#P/fn/symbol/to-primitive") ok require("#P/fn/symbol/to-string-tag") ok require("#P/fn/symbol/unscopables") ok require("#P/fn/symbol/async-iterator") ok require("#P/fn/symbol/observable") ok typeof require("#P/fn/symbol/for") is \function ok typeof require("#P/fn/symbol/key-for") is \function ok \iterator of require("#P/fn/symbol") ok new (require("#P/fn/map"))([[1, 2], [3, 4]]).size is 2 ok new (require("#P/fn/set"))([1, 2, 3, 2, 1]).size is 3 ok new (require("#P/fn/weak-map"))([[O = {}, 42]]).get(O) is 42 ok new (require("#P/fn/weak-set"))([O = {}]).has O ok typeof require("#P/fn/typed/array-buffer") is \function ok typeof require("#P/fn/typed/data-view") is \function ok typeof require("#P/fn/typed/int8-array") is \function ok typeof require("#P/fn/typed/uint8-array") is \function ok typeof require("#P/fn/typed/uint8-clamped-array") is \function ok typeof require("#P/fn/typed/int16-array") is \function ok typeof require("#P/fn/typed/uint16-array") is \function ok typeof require("#P/fn/typed/int32-array") is \function ok typeof require("#P/fn/typed/uint32-array") is \function ok typeof require("#P/fn/typed/float32-array") is \function ok typeof require("#P/fn/typed/float64-array") is \function ok typeof require("#P/fn/typed").Uint32Array is \function ok \all of require("#P/fn/promise") ok \from of require("#P/fn/observable") ok require("#P/fn/system/global").Math is Math ok require("#P/fn/system").global.Math is Math ok require("#P/fn/error/is-error") new TypeError ok require("#P/fn/error").isError new TypeError ok typeof require("#P/fn/dom-collections").iterator is \function ok typeof require("#P/fn/dom-collections/iterator") is \function ok typeof require("#P/fn/set-timeout") is \function ok typeof require("#P/fn/set-interval") is \function ok typeof require("#P/fn/set-immediate") is \function ok typeof require("#P/fn/clear-immediate") is \function ok typeof require("#P/fn/asap") is \function ok \mapPairs of require("#P/fn/dict") ok \then of require("#P/fn/delay")(1) ok require("#P/fn/is-iterable")([]) ok typeof require("#P/fn/get-iterator-method")([]) is \function ok \next of require("#P/fn/get-iterator")([]) ################################################ ok \Array of require("#P/es5") ok \map of require("#P/es6/array") require("#P/es6/function") ok typeof require("#P/es6/map") is \function ok typeof require("#P/es6/set") is \function ok typeof require("#P/es6/weak-map") is \function ok typeof require("#P/es6/weak-set") is \function ok \hypot of require("#P/es6/math") ok \MAX_SAFE_INTEGER of require("#P/es6/number") ok require("#P/es6/parse-float")('1.5') is 1.5 ok require("#P/es6/parse-int")('2.1') is 2 ok \assign of require("#P/es6/object") ok typeof require("#P/es6/promise") is \function ok \ownKeys of require("#P/es6/reflect") require("#P/es6/regexp") ok \raw of require("#P/es6/string") ok require("#P/es6/date") ok typeof require("#P/es6/symbol") is \function ok typeof require("#P/es6/typed").Uint32Array is \function ok \Map of require("#P/es6") ok \includes of require("#P/es7/array") ok \values of require("#P/es7/object") ok \at of require("#P/es7/string") require("#P/es7/set") require("#P/es7/map") ok require("#P/es7/system").global.Math is Math ok require("#P/es7/error").isError new TypeError ok typeof require("#P/es7/math").isubh is \function ok \metadata of require("#P/es7/reflect") ok typeof require("#P/es7/asap") is \function ok \observable of require("#P/es7/symbol") ok \from of require("#P/es7/observable") ok \Array of require("#P/es7") ok \setTimeout of require("#P/web/timers") ok \setImmediate of require("#P/web/immediate") require("#P/web/dom-collections") ok \setImmediate of require("#P/web") ok require("#P/core/_") ok typeof require("#P/core/delay") is \function ok typeof require("#P/core/dict") is \function ok \part of require("#P/core/function") ok \define of require("#P/core/object") ok \escape of require("#P/core/regexp") ok \escapeHTML of require("#P/core/string") ok \Array of require("#P/core") ok require("#P/stage/4") ok require("#P/stage/3") ok require("#P/stage/2") ok require("#P/stage/1") ok require("#P/stage/0") ok require("#P/stage/pre") ok require("#P/stage") console.log 'CommonJS - OK' core-js-2.4.1/tests/es.html000066400000000000000000000005631274277553300155420ustar00rootroot00000000000000 Core
core-js-2.4.1/tests/es.js000066400000000000000000015410761274277553300152240ustar00rootroot00000000000000// Generated by LiveScript 1.4.0 (function(){ var module, test; module = QUnit.module, test = QUnit.test; module('ES6'); test('Array#copyWithin', function(assert){ var a; assert.isFunction(Array.prototype.copyWithin); assert.arity(Array.prototype.copyWithin, 2); assert.name(Array.prototype.copyWithin, 'copyWithin'); assert.looksNative(Array.prototype.copyWithin); assert.strictEqual(a = [1].copyWithin(0), a); assert.nonEnumerable(Array.prototype, 'copyWithin'); assert.deepEqual([1, 2, 3, 4, 5].copyWithin(0, 3), [4, 5, 3, 4, 5]); assert.deepEqual([1, 2, 3, 4, 5].copyWithin(1, 3), [1, 4, 5, 4, 5]); assert.deepEqual([1, 2, 3, 4, 5].copyWithin(1, 2), [1, 3, 4, 5, 5]); assert.deepEqual([1, 2, 3, 4, 5].copyWithin(2, 2), [1, 2, 3, 4, 5]); assert.deepEqual([1, 2, 3, 4, 5].copyWithin(0, 3, 4), [4, 2, 3, 4, 5]); assert.deepEqual([1, 2, 3, 4, 5].copyWithin(1, 3, 4), [1, 4, 3, 4, 5]); assert.deepEqual([1, 2, 3, 4, 5].copyWithin(1, 2, 4), [1, 3, 4, 4, 5]); assert.deepEqual([1, 2, 3, 4, 5].copyWithin(0, -2), [4, 5, 3, 4, 5]); assert.deepEqual([1, 2, 3, 4, 5].copyWithin(0, -2, -1), [4, 2, 3, 4, 5]); assert.deepEqual([1, 2, 3, 4, 5].copyWithin(-4, -3, -2), [1, 3, 3, 4, 5]); assert.deepEqual([1, 2, 3, 4, 5].copyWithin(-4, -3, -1), [1, 3, 4, 4, 5]); assert.deepEqual([1, 2, 3, 4, 5].copyWithin(-4, -3), [1, 3, 4, 5, 5]); if (STRICT) { assert.throws(function(){ return Array.prototype.copyWithin.call(null, 0); }, TypeError); assert.throws(function(){ return Array.prototype.copyWithin.call(void 8, 0); }, TypeError); } if (NATIVE) { assert.deepEqual(Array.prototype.copyWithin.call({ 0: 1, 1: 2, 2: 3, length: -1 }, 1, 2), { 0: 1, 1: 2, 2: 3, length: -1 }, 'uses ToLength'); } assert.ok('copyWithin' in Array.prototype[Symbol.unscopables], 'In Array#@@unscopables'); }); }).call(this); // Generated by LiveScript 1.4.0 (function(){ var module, test, toString$ = {}.toString; module = QUnit.module, test = QUnit.test; module('ES6'); test('Array#every', function(assert){ var a, ctx, rez, arr; assert.isFunction(Array.prototype.every); assert.arity(Array.prototype.every, 1); assert.name(Array.prototype.every, 'every'); assert.looksNative(Array.prototype.every); assert.nonEnumerable(Array.prototype, 'every'); (a = [1]).every(function(val, key, that){ assert.same(arguments.length, 3, 'correct number of callback arguments'); assert.same(val, 1, 'correct value in callback'); assert.same(key, 0, 'correct index in callback'); assert.same(that, a, 'correct link to array in callback'); assert.same(this, ctx, 'correct callback context'); }, ctx = {}); assert.ok([1, 2, 3].every(function(it){ return toString$.call(it).slice(8, -1) === 'Number'; })); assert.ok([1, 2, 3].every((function(it){ return it < 4; }))); assert.ok(![1, 2, 3].every((function(it){ return it < 3; }))); assert.ok(![1, 2, 3].every(function(it){ return toString$.call(it).slice(8, -1) === 'String'; })); assert.ok([1, 2, 3].every(function(){ return +this === 1; }, 1)); rez = ''; [1, 2, 3].every(function(){ return rez += arguments[1]; }); assert.ok(rez === '012'); assert.ok((arr = [1, 2, 3]).every(function(){ return arguments[2] === arr; })); if (STRICT) { assert.throws(function(){ Array.prototype.every.call(null, function(){}); }, TypeError); assert.throws(function(){ Array.prototype.every.call(void 8, function(){}); }, TypeError); } if (NATIVE) { assert.ok((function(){ try { return true === Array.prototype.every.call({ length: -1, 0: 1 }, function(){ throw 42; }); } catch (e$) {} }()), 'uses ToLength'); } }); }).call(this); // Generated by LiveScript 1.4.0 (function(){ var module, test; module = QUnit.module, test = QUnit.test; module('ES6'); test('Array#fill', function(assert){ var a; assert.isFunction(Array.prototype.fill); assert.arity(Array.prototype.fill, 1); assert.name(Array.prototype.fill, 'fill'); assert.looksNative(Array.prototype.fill); assert.nonEnumerable(Array.prototype, 'fill'); assert.strictEqual(a = Array(5).fill(5), a); assert.deepEqual(Array(5).fill(5), [5, 5, 5, 5, 5]); assert.deepEqual(Array(5).fill(5, 1), [void 8, 5, 5, 5, 5]); assert.deepEqual(Array(5).fill(5, 1, 4), [void 8, 5, 5, 5, void 8]); assert.deepEqual(Array(5).fill(5, 6, 1), [void 8, void 8, void 8, void 8, void 8]); assert.deepEqual(Array(5).fill(5, -3, 4), [void 8, void 8, 5, 5, void 8]); if (STRICT) { assert.throws(function(){ return Array.prototype.fill.call(null, 0); }, TypeError); assert.throws(function(){ return Array.prototype.fill.call(void 8, 0); }, TypeError); } if (NATIVE && DESCRIPTORS) { assert.ok((function(){ try { return Array.prototype.fill.call(Object.defineProperty({ length: -1 }, 0, { set: function(){ throw Error(); } })); } catch (e$) {} }()), 'uses ToLength'); } assert.ok('fill' in Array.prototype[Symbol.unscopables], 'In Array#@@unscopables'); }); }).call(this); // Generated by LiveScript 1.4.0 (function(){ var module, test; module = QUnit.module, test = QUnit.test; module('ES6'); test('Array#filter', function(assert){ var a, ctx; assert.isFunction(Array.prototype.filter); assert.arity(Array.prototype.filter, 1); assert.name(Array.prototype.filter, 'filter'); assert.looksNative(Array.prototype.filter); assert.nonEnumerable(Array.prototype, 'filter'); (a = [1]).filter(function(val, key, that){ assert.same(arguments.length, 3, 'correct number of callback arguments'); assert.same(val, 1, 'correct value in callback'); assert.same(key, 0, 'correct index in callback'); assert.same(that, a, 'correct link to array in callback'); assert.same(this, ctx, 'correct callback context'); }, ctx = {}); assert.deepEqual([1, 2, 3, 4, 5], [1, 2, 3, 'q', {}, 4, true, 5].filter(function(it){ return typeof it === 'number'; })); if (STRICT) { assert.throws(function(){ Array.prototype.filter.call(null, function(){}); }, TypeError); assert.throws(function(){ Array.prototype.filter.call(void 8, function(){}); }, TypeError); } if (NATIVE) { assert.ok((function(){ try { return Array.prototype.filter.call({ length: -1, 0: 1 }, function(){ throw 42; }); } catch (e$) {} }()), 'uses ToLength'); } }); }).call(this); // Generated by LiveScript 1.4.0 (function(){ var module, test; module = QUnit.module, test = QUnit.test; module('ES6'); test('Array#findIndex', function(assert){ var a, ctx; assert.isFunction(Array.prototype.findIndex); assert.arity(Array.prototype.findIndex, 1); assert.name(Array.prototype.findIndex, 'findIndex'); assert.looksNative(Array.prototype.findIndex); assert.nonEnumerable(Array.prototype, 'findIndex'); (a = [1]).findIndex(function(val, key, that){ assert.same(arguments.length, 3, 'correct number of callback arguments'); assert.same(val, 1, 'correct value in callback'); assert.same(key, 0, 'correct index in callback'); assert.same(that, a, 'correct link to array in callback'); assert.same(this, ctx, 'correct callback context'); }, ctx = {}); assert.same([1, 3, NaN, 42, {}].findIndex((function(it){ return it === 42; })), 3); assert.same([1, 3, NaN, 42, {}].findIndex((function(it){ return it === 43; })), -1); if (STRICT) { assert.throws(function(){ return Array.prototype.findIndex.call(null, 0); }, TypeError); assert.throws(function(){ return Array.prototype.findIndex.call(void 8, 0); }, TypeError); } if (NATIVE && DESCRIPTORS) { assert.ok((function(){ try { return -1 === Array.prototype.findIndex.call({ length: -1, 0: 1 }, function(){ throw 42; }); } catch (e$) {} }()), 'uses ToLength'); } assert.ok('findIndex' in Array.prototype[Symbol.unscopables], 'In Array#@@unscopables'); }); }).call(this); // Generated by LiveScript 1.4.0 (function(){ var module, test; module = QUnit.module, test = QUnit.test; module('ES6'); test('Array#find', function(assert){ var a, ctx; assert.isFunction(Array.prototype.find); assert.arity(Array.prototype.find, 1); assert.name(Array.prototype.find, 'find'); assert.looksNative(Array.prototype.find); assert.nonEnumerable(Array.prototype, 'find'); (a = [1]).find(function(val, key, that){ assert.same(arguments.length, 3, 'correct number of callback arguments'); assert.same(val, 1, 'correct value in callback'); assert.same(key, 0, 'correct index in callback'); assert.same(that, a, 'correct link to array in callback'); assert.same(this, ctx, 'correct callback context'); }, ctx = {}); assert.same([1, 3, NaN, 42, {}].find((function(it){ return it === 42; })), 42); assert.same([1, 3, NaN, 42, {}].find((function(it){ return it === 43; })), void 8); if (STRICT) { assert.throws(function(){ return Array.prototype.find.call(null, 0); }, TypeError); assert.throws(function(){ return Array.prototype.find.call(void 8, 0); }, TypeError); } if (NATIVE && DESCRIPTORS) { assert.ok((function(){ try { return void 8 === Array.prototype.find.call({ length: -1, 0: 1 }, function(){ throw 42; }); } catch (e$) {} }()), 'uses ToLength'); } assert.ok('find' in Array.prototype[Symbol.unscopables], 'In Array#@@unscopables'); }); }).call(this); // Generated by LiveScript 1.4.0 (function(){ var module, test; module = QUnit.module, test = QUnit.test; module('ES6'); test('Array#forEach', function(assert){ var a, ctx, rez, arr; assert.isFunction(Array.prototype.forEach); assert.arity(Array.prototype.forEach, 1); assert.name(Array.prototype.forEach, 'forEach'); assert.looksNative(Array.prototype.forEach); assert.nonEnumerable(Array.prototype, 'forEach'); (a = [1]).forEach(function(val, key, that){ assert.same(arguments.length, 3, 'correct number of callback arguments'); assert.same(val, 1, 'correct value in callback'); assert.same(key, 0, 'correct index in callback'); assert.same(that, a, 'correct link to array in callback'); assert.same(this, ctx, 'correct callback context'); }, ctx = {}); rez = ''; [1, 2, 3].forEach(function(it){ rez += it; }); assert.ok(rez === '123'); rez = ''; [1, 2, 3].forEach(function(){ rez += arguments[1]; }); assert.ok(rez === '012'); rez = ''; [1, 2, 3].forEach(function(){ rez += arguments[2]; }); assert.ok(rez === '1,2,31,2,31,2,3'); rez = ''; [1, 2, 3].forEach(function(){ rez += this; }, 1); assert.ok(rez === '111'); rez = ''; arr = []; arr[5] = ''; arr.forEach(function(arg$, k){ rez += k; }); assert.ok(rez === '5'); if (STRICT) { assert.throws(function(){ Array.prototype.forEach.call(null, function(){}); }, TypeError); assert.throws(function(){ Array.prototype.forEach.call(void 8, function(){}); }, TypeError); } if (NATIVE) { assert.ok((function(){ try { return void 8 === Array.prototype.forEach.call({ length: -1, 0: 1 }, function(){ throw 42; }); } catch (e$) {} }()), 'uses ToLength'); } }); }).call(this); // Generated by LiveScript 1.4.0 (function(){ var module, test; module = QUnit.module, test = QUnit.test; module('ES6'); test('Array.from', function(assert){ var from, isArray, defineProperty, iterator, type, ref$, col, ctx, i$, x$, len$, y$, done, iter, F, inst, a, array, called; from = Array.from, isArray = Array.isArray; defineProperty = Object.defineProperty; iterator = typeof Symbol != 'undefined' && Symbol !== null ? Symbol.iterator : void 8; assert.isFunction(from); assert.arity(from, 1); assert.name(from, 'from'); assert.looksNative(from); assert.nonEnumerable(Array, 'from'); for (type in ref$ = { 'array-like': { length: '3', 0: '1', 1: '2', 2: '3' }, arguments: fn$('1', '2', '3'), array: ['1', '2', '3'], iterable: createIterable(['1', '2', '3']), string: '123' }) { col = ref$[type]; assert.arrayEqual(from(col), ['1', '2', '3'], "Works with " + type); assert.arrayEqual(from(col, (fn1$)), [1, 4, 9], "Works with " + type + " + mapFn"); } for (type in ref$ = { 'array-like': { length: 1, 0: 1 }, arguments: fn2$(1), array: [1], iterable: createIterable([1]), string: '1' }) { col = ref$[type]; assert.arrayEqual(from(col, fn3$, ctx = {}), [42], "Works with " + type + ", correct result"); } for (i$ = 0, len$ = (ref$ = [false, true, 0]).length; i$ < len$; ++i$) { x$ = ref$[i$]; assert.arrayEqual(from(x$), [], "Works with " + x$); } for (i$ = 0, len$ = (ref$ = [null, void 8]).length; i$ < len$; ++i$) { y$ = ref$[i$]; assert.throws(fn4$, TypeError, "Throws on " + y$); } assert.arrayEqual(from('𠮷𠮷𠮷'), ['𠮷', '𠮷', '𠮷'], 'Uses correct string iterator'); done = true; iter = createIterable([1, 2, 3], { 'return': function(){ return done = false; } }); from(iter, function(){ return false; }); assert.ok(done, '.return #default'); done = false; iter = createIterable([1, 2, 3], { 'return': function(){ return done = true; } }); try { from(iter, function(){ throw 42; }); } catch (e$) {} assert.ok(done, '.return #throw'); F = function(){}; inst = from.call(F, createIterable([1, 2])); assert.ok(inst instanceof F, 'generic, iterable case, instanceof'); assert.arrayEqual(inst, [1, 2], 'generic, iterable case, elements'); inst = from.call(F, { 0: 1, 1: 2, length: 2 }); assert.ok(inst instanceof F, 'generic, array-like case, instanceof'); assert.arrayEqual(inst, [1, 2], 'generic, array-like case, elements'); a = [1, 2, 3]; done = false; a['@@iterator'] = void 8; a[iterator] = function(){ done = true; return [][iterator].call(this); }; assert.arrayEqual(from(a), [1, 2, 3], 'Array with custom iterator, elements'); assert.ok(done, 'call @@iterator in Array with custom iterator'); array = [1, 2, 3]; delete array[1]; assert.arrayEqual(from(array, String), ['1', 'undefined', '3'], 'Ignores holes'); assert.ok((function(){ try { return from({ length: -1, 0: 1 }, function(){ throw 42; }); } catch (e$) {} }()), 'Uses ToLength'); assert.arrayEqual(from([], undefined), [], "Works with undefined as second argument"); assert.throws(function(){ from([], null); }, TypeError, "Throws with null as second argument"); assert.throws(function(){ from([], 0); }, TypeError, "Throws with 0 as second argument"); assert.throws(function(){ from([], ''); }, TypeError, "Throws with '' as second argument"); assert.throws(function(){ from([], false); }, TypeError, "Throws with false as second argument"); assert.throws(function(){ from([], {}); }, TypeError, "Throws with {} as second argument"); if (DESCRIPTORS) { called = false; F = function(){}; defineProperty(F.prototype, 0, { set: function(){ var called; called = true; } }); from.call(F, [1, 2, 3]); assert.ok(!called, 'Should not call prototype accessors'); } function fn$(){ return arguments; } function fn1$(it){ return Math.pow(it, 2); } function fn2$(){ return arguments; } function fn3$(val, key){ assert.same(this, ctx, "Works with " + type + ", correct callback context"); assert.same(val, type === 'string' ? '1' : 1, "Works with " + type + ", correct callback key"); assert.same(key, 0, "Works with " + type + ", correct callback value"); assert.same(arguments.length, 2, "Works with " + type + ", correct callback arguments number"); return 42; } function fn4$(){ from(y$); } }); }).call(this); // Generated by LiveScript 1.4.0 (function(){ var module, test; module = QUnit.module, test = QUnit.test; module('ES6'); test('Array#indexOf', function(assert){ assert.isFunction(Array.prototype.indexOf); assert.arity(Array.prototype.indexOf, 1); assert.name(Array.prototype.indexOf, 'indexOf'); assert.looksNative(Array.prototype.indexOf); assert.nonEnumerable(Array.prototype, 'indexOf'); assert.same(0, [1, 1, 1].indexOf(1)); assert.same(-1, [1, 2, 3].indexOf(1, 1)); assert.same(1, [1, 2, 3].indexOf(2, 1)); assert.same(-1, [1, 2, 3].indexOf(2, -1)); assert.same(1, [1, 2, 3].indexOf(2, -2)); assert.same(-1, [NaN].indexOf(NaN)); assert.same(3, Array(2).concat([1, 2, 3]).indexOf(2)); assert.same(-1, Array(1).indexOf(void 8)); assert.same(0, [1].indexOf(1, -0), "shouldn't return negative zero"); if (STRICT) { assert.throws(function(){ Array.prototype.indexOf.call(null, 0); }, TypeError); assert.throws(function(){ Array.prototype.indexOf.call(void 8, 0); }, TypeError); } if (NATIVE && DESCRIPTORS) { assert.ok((function(){ try { return -1 === Array.prototype.indexOf.call(Object.defineProperty({ length: -1 }, 0, { get: function(){ throw Error(); } }), 1); } catch (e$) {} }()), 'uses ToLength'); } }); }).call(this); // Generated by LiveScript 1.4.0 (function(){ var module, test; module = QUnit.module, test = QUnit.test; module('ES6'); test('Array.isArray', function(assert){ var isArray; isArray = Array.isArray; assert.isFunction(isArray); assert.arity(isArray, 1); assert.name(isArray, 'isArray'); assert.looksNative(isArray); assert.nonEnumerable(Array, 'isArray'); assert.ok(!isArray({})); assert.ok(!isArray(function(){ return arguments; }())); assert.ok(isArray([])); }); }).call(this); // Generated by LiveScript 1.4.0 (function(){ var module, test; module = QUnit.module, test = QUnit.test; module('ES6'); test('Array#keys', function(assert){ var iter; assert.isFunction(Array.prototype.keys); assert.arity(Array.prototype.keys, 0); assert.name(Array.prototype.keys, 'keys'); assert.looksNative(Array.prototype.keys); assert.nonEnumerable(Array.prototype, 'keys'); iter = ['q', 'w', 'e'].keys(); assert.isIterator(iter); assert.isIterable(iter); assert.strictEqual(iter[typeof Symbol != 'undefined' && Symbol !== null ? Symbol.toStringTag : void 8], 'Array Iterator'); assert.deepEqual(iter.next(), { value: 0, done: false }); assert.deepEqual(iter.next(), { value: 1, done: false }); assert.deepEqual(iter.next(), { value: 2, done: false }); assert.deepEqual(iter.next(), { value: void 8, done: true }); if (NATIVE) { assert.deepEqual(Array.prototype.keys.call({ length: -1 }).next(), { value: void 8, done: true }, 'uses ToLength'); } assert.ok('keys' in Array.prototype[typeof Symbol != 'undefined' && Symbol !== null ? Symbol.unscopables : void 8], 'In Array#@@unscopables'); }); test('Array#values', function(assert){ var iter; assert.isFunction(Array.prototype.values); assert.arity(Array.prototype.values, 0); assert.name(Array.prototype.values, 'values'); assert.looksNative(Array.prototype.values); assert.nonEnumerable(Array.prototype, 'values'); iter = ['q', 'w', 'e'].values(); assert.isIterator(iter); assert.isIterable(iter); assert.strictEqual(iter[typeof Symbol != 'undefined' && Symbol !== null ? Symbol.toStringTag : void 8], 'Array Iterator'); assert.deepEqual(iter.next(), { value: 'q', done: false }); assert.deepEqual(iter.next(), { value: 'w', done: false }); assert.deepEqual(iter.next(), { value: 'e', done: false }); assert.deepEqual(iter.next(), { value: void 8, done: true }); if (NATIVE) { assert.deepEqual(Array.prototype.values.call({ length: -1 }).next(), { value: void 8, done: true }, 'uses ToLength'); } assert.ok('values' in Array.prototype[typeof Symbol != 'undefined' && Symbol !== null ? Symbol.unscopables : void 8], 'In Array#@@unscopables'); }); test('Array#entries', function(assert){ var iter; assert.isFunction(Array.prototype.entries); assert.arity(Array.prototype.entries, 0); assert.name(Array.prototype.entries, 'entries'); assert.looksNative(Array.prototype.entries); assert.nonEnumerable(Array.prototype, 'entries'); iter = ['q', 'w', 'e'].entries(); assert.isIterator(iter); assert.isIterable(iter); assert.strictEqual(iter[typeof Symbol != 'undefined' && Symbol !== null ? Symbol.toStringTag : void 8], 'Array Iterator'); assert.deepEqual(iter.next(), { value: [0, 'q'], done: false }); assert.deepEqual(iter.next(), { value: [1, 'w'], done: false }); assert.deepEqual(iter.next(), { value: [2, 'e'], done: false }); assert.deepEqual(iter.next(), { value: void 8, done: true }); if (NATIVE) { assert.deepEqual(Array.prototype.entries.call({ length: -1 }).next(), { value: void 8, done: true }, 'uses ToLength'); } assert.ok('entries' in Array.prototype[typeof Symbol != 'undefined' && Symbol !== null ? Symbol.unscopables : void 8], 'In Array#@@unscopables'); }); test('Array#@@iterator', function(assert){ var iter; assert.isIterable(Array.prototype); assert.arity(Array.prototype[typeof Symbol != 'undefined' && Symbol !== null ? Symbol.iterator : void 8], 0); assert.name(Array.prototype[typeof Symbol != 'undefined' && Symbol !== null ? Symbol.iterator : void 8], 'values'); assert.looksNative(Array.prototype[typeof Symbol != 'undefined' && Symbol !== null ? Symbol.iterator : void 8]); assert.nonEnumerable(Array.prototype, typeof Symbol != 'undefined' && Symbol !== null ? Symbol.iterator : void 8); assert.strictEqual(Array.prototype[typeof Symbol != 'undefined' && Symbol !== null ? Symbol.iterator : void 8], Array.prototype.values); iter = ['q', 'w', 'e'][typeof Symbol != 'undefined' && Symbol !== null ? Symbol.iterator : void 8](); assert.isIterator(iter); assert.isIterable(iter); assert.strictEqual(iter[typeof Symbol != 'undefined' && Symbol !== null ? Symbol.toStringTag : void 8], 'Array Iterator'); assert.deepEqual(iter.next(), { value: 'q', done: false }); assert.deepEqual(iter.next(), { value: 'w', done: false }); assert.deepEqual(iter.next(), { value: 'e', done: false }); assert.deepEqual(iter.next(), { value: void 8, done: true }); if (NATIVE) { assert.deepEqual(Array.prototype[typeof Symbol != 'undefined' && Symbol !== null ? Symbol.iterator : void 8].call({ length: -1 }).next(), { value: void 8, done: true }, 'uses ToLength'); } }); }).call(this); // Generated by LiveScript 1.4.0 (function(){ var module, test; module = QUnit.module, test = QUnit.test; module('ES6'); test('Array#join', function(assert){ assert.isFunction(Array.prototype.join); assert.arity(Array.prototype.join, 1); assert.name(Array.prototype.join, 'join'); assert.looksNative(Array.prototype.join); assert.nonEnumerable(Array.prototype, 'join'); assert.strictEqual(Array.prototype.join.call([1, 2, 3], void 8), '1,2,3'); assert.strictEqual(Array.prototype.join.call('123'), '1,2,3'); assert.strictEqual(Array.prototype.join.call('123', '|'), '1|2|3'); if (STRICT) { assert.throws(function(){ Array.prototype.join.call(null, 0); }, TypeError); assert.throws(function(){ Array.prototype.join.call(void 8, 0); }, TypeError); } }); }).call(this); // Generated by LiveScript 1.4.0 (function(){ var module, test; module = QUnit.module, test = QUnit.test; module('ES6'); test('Array#lastIndexOf', function(assert){ assert.isFunction(Array.prototype.lastIndexOf); assert.arity(Array.prototype.lastIndexOf, 1); assert.name(Array.prototype.lastIndexOf, 'lastIndexOf'); assert.looksNative(Array.prototype.lastIndexOf); assert.nonEnumerable(Array.prototype, 'lastIndexOf'); assert.same(2, [1, 1, 1].lastIndexOf(1)); assert.same(-1, [1, 2, 3].lastIndexOf(3, 1)); assert.same(1, [1, 2, 3].lastIndexOf(2, 1)); assert.same(-1, [1, 2, 3].lastIndexOf(2, -3)); assert.same(-1, [1, 2, 3].lastIndexOf(1, -4)); assert.same(1, [1, 2, 3].lastIndexOf(2, -2)); assert.same(-1, [NaN].lastIndexOf(NaN)); assert.same(1, [1, 2, 3].concat(Array(2)).lastIndexOf(2)); assert.same(0, [1].lastIndexOf(1, -0), "shouldn't return negative zero"); if (STRICT) { assert.throws(function(){ Array.prototype.lastIndexOf.call(null, 0); }, TypeError); assert.throws(function(){ Array.prototype.lastIndexOf.call(void 8, 0); }, TypeError); } if (NATIVE && DESCRIPTORS) { assert.ok((function(){ try { return -1 === Array.prototype.lastIndexOf.call(Object.defineProperties({ length: -1 }, { 2147483646: { get: function(){ throw Error(); } }, 4294967294: { get: function(){ throw Error(); } } }), 1); } catch (e$) {} }()), 'uses ToLength'); } }); }).call(this); // Generated by LiveScript 1.4.0 (function(){ var module, test; module = QUnit.module, test = QUnit.test; module('ES6'); test('Array#map', function(assert){ var a, ctx; assert.isFunction(Array.prototype.map); assert.arity(Array.prototype.map, 1); assert.name(Array.prototype.map, 'map'); assert.looksNative(Array.prototype.map); assert.nonEnumerable(Array.prototype, 'map'); (a = [1]).map(function(val, key, that){ assert.same(arguments.length, 3, 'correct number of callback arguments'); assert.same(val, 1, 'correct value in callback'); assert.same(key, 0, 'correct index in callback'); assert.same(that, a, 'correct link to array in callback'); assert.same(this, ctx, 'correct callback context'); }, ctx = {}); assert.deepEqual([2, 3, 4], [1, 2, 3].map((function(it){ return it + 1; }))); assert.deepEqual([1, 3, 5], [1, 2, 3].map(curry$(function(x$, y$){ return x$ + y$; }))); assert.deepEqual([2, 2, 2], [1, 2, 3].map(function(){ return +this; }, 2)); if (STRICT) { assert.throws(function(){ Array.prototype.map.call(null, function(){}); }, TypeError); assert.throws(function(){ Array.prototype.map.call(void 8, function(){}); }, TypeError); } if (NATIVE) { assert.ok((function(){ try { return Array.prototype.map.call({ length: -1, 0: 1 }, function(){ throw 42; }); } catch (e$) {} }()), 'uses ToLength'); } }); function curry$(f, bound){ var context, _curry = function(args) { return f.length > 1 ? function(){ var params = args ? args.concat() : []; context = bound ? context || this : this; return params.push.apply(params, arguments) < f.length && arguments.length ? _curry.call(context, params) : f.apply(context, params); } : f; }; return _curry(); } }).call(this); // Generated by LiveScript 1.4.0 (function(){ var module, test; module = QUnit.module, test = QUnit.test; module('ES6'); test('Array.of', function(assert){ var defineProperty, F, inst, called; defineProperty = Object.defineProperty; assert.isFunction(Array.of); assert.arity(Array.of, 0); assert.name(Array.of, 'of'); assert.looksNative(Array.of); assert.nonEnumerable(Array, 'of'); assert.deepEqual(Array.of(1), [1]); assert.deepEqual(Array.of(1, 2, 3), [1, 2, 3]); F = function(){}; inst = Array.of.call(F, 1, 2); assert.ok(inst instanceof F); assert.strictEqual(inst[0], 1); assert.strictEqual(inst[1], 2); assert.strictEqual(inst.length, 2); if (DESCRIPTORS) { called = false; F = function(){}; defineProperty(F.prototype, 0, { set: function(){ var called; called = true; } }); Array.of.call(F, 1, 2, 3); assert.ok(!called, 'Should not call prototype accessors'); } }); }).call(this); // Generated by LiveScript 1.4.0 (function(){ var module, test; module = QUnit.module, test = QUnit.test; module('ES6'); test('Array#reduceRight', function(assert){ var a, accumulator, v, k; assert.isFunction(Array.prototype.reduceRight); assert.arity(Array.prototype.reduceRight, 1); assert.name(Array.prototype.reduceRight, 'reduceRight'); assert.looksNative(Array.prototype.reduceRight); assert.nonEnumerable(Array.prototype, 'reduceRight'); (a = [1]).reduceRight(function(memo, val, key, that){ assert.same(arguments.length, 4, 'correct number of callback arguments'); assert.same(memo, accumulator, 'correct callback accumulator'); assert.same(val, 1, 'correct value in callback'); assert.same(key, 0, 'correct index in callback'); assert.same(that, a, 'correct link to array in callback'); }, accumulator = {}); assert.same([1, 2, 3].reduceRight(curry$(function(x$, y$){ return x$ + y$; }), 1), 7, 'works with initial accumulator'); (a = [1, 2]).reduceRight(function(memo, val, key, that){ assert.same(memo, 2, 'correct default accumulator'); assert.same(val, 1, 'correct start value without initial accumulator'); assert.same(key, 0, 'correct start index without initial accumulator'); }); assert.same([1, 2, 3].reduceRight(curry$(function(x$, y$){ return x$ + y$; })), 6, 'works without initial accumulator'); v = ''; k = ''; [1, 2, 3].reduceRight(function(memo, a, b){ v += a; k += b; }, 0); assert.same(v, '321', 'correct order #1'); assert.same(k, '210', 'correct order #2'); assert.same(Array.prototype.reduceRight.call({ 0: 1, 1: 2, length: 2 }, curry$(function(x$, y$){ return x$ + y$; })), 3, 'generic'); if (STRICT) { assert.throws(function(){ Array.prototype.reduceRight.call(null, function(){}, 1); }, TypeError); assert.throws(function(){ Array.prototype.reduceRight.call(void 8, function(){}, 1); }, TypeError); } if (NATIVE) { assert.ok((function(){ try { return Array.prototype.reduceRight.call({ length: -1, 2147483646: 0, 4294967294: 0 }, function(){ throw 42; }, 1); } catch (e$) {} }()), 'uses ToLength'); } }); function curry$(f, bound){ var context, _curry = function(args) { return f.length > 1 ? function(){ var params = args ? args.concat() : []; context = bound ? context || this : this; return params.push.apply(params, arguments) < f.length && arguments.length ? _curry.call(context, params) : f.apply(context, params); } : f; }; return _curry(); } }).call(this); // Generated by LiveScript 1.4.0 (function(){ var module, test; module = QUnit.module, test = QUnit.test; module('ES6'); test('Array#reduce', function(assert){ var a, accumulator, v, k; assert.isFunction(Array.prototype.reduce); assert.arity(Array.prototype.reduce, 1); assert.name(Array.prototype.reduce, 'reduce'); assert.looksNative(Array.prototype.reduce); assert.nonEnumerable(Array.prototype, 'reduce'); (a = [1]).reduce(function(memo, val, key, that){ assert.same(arguments.length, 4, 'correct number of callback arguments'); assert.same(memo, accumulator, 'correct callback accumulator'); assert.same(val, 1, 'correct value in callback'); assert.same(key, 0, 'correct index in callback'); assert.same(that, a, 'correct link to array in callback'); }, accumulator = {}); assert.same([1, 2, 3].reduce(curry$(function(x$, y$){ return x$ + y$; }), 1), 7, 'works with initial accumulator'); (a = [1, 2]).reduce(function(memo, val, key, that){ assert.same(memo, 1, 'correct default accumulator'); assert.same(val, 2, 'correct start value without initial accumulator'); assert.same(key, 1, 'correct start index without initial accumulator'); }); assert.same([1, 2, 3].reduce(curry$(function(x$, y$){ return x$ + y$; })), 6, 'works without initial accumulator'); v = ''; k = ''; [1, 2, 3].reduce(function(memo, a, b){ v += a; k += b; }, 0); assert.same(v, '123', 'correct order #1'); assert.same(k, '012', 'correct order #2'); assert.same(Array.prototype.reduce.call({ 0: 1, 1: 2, length: 2 }, curry$(function(x$, y$){ return x$ + y$; })), 3, 'generic'); if (STRICT) { assert.throws(function(){ Array.prototype.reduce.call(null, function(){}, 1); }, TypeError); assert.throws(function(){ Array.prototype.reduce.call(void 8, function(){}, 1); }, TypeError); } if (NATIVE) { assert.ok((function(){ try { return Array.prototype.reduce.call({ length: -1, 0: 1 }, function(){ throw 42; }, 1); } catch (e$) {} }()), 'uses ToLength'); } }); function curry$(f, bound){ var context, _curry = function(args) { return f.length > 1 ? function(){ var params = args ? args.concat() : []; context = bound ? context || this : this; return params.push.apply(params, arguments) < f.length && arguments.length ? _curry.call(context, params) : f.apply(context, params); } : f; }; return _curry(); } }).call(this); // Generated by LiveScript 1.4.0 (function(){ var module, test, toString$ = {}.toString; module = QUnit.module, test = QUnit.test; module('ES6'); test('Array#slice', function(assert){ var arr, str, list, ref$, e; assert.isFunction(Array.prototype.slice); assert.arity(Array.prototype.slice, 2); assert.name(Array.prototype.slice, 'slice'); assert.looksNative(Array.prototype.slice); assert.nonEnumerable(Array.prototype, 'slice'); arr = ['1', '2', '3', '4', '5']; assert.deepEqual(arr.slice(), arr); assert.deepEqual(arr.slice(1, 3), ['2', '3']); assert.deepEqual(arr.slice(1, void 8), ['2', '3', '4', '5']); assert.deepEqual(arr.slice(1, -1), ['2', '3', '4']); assert.deepEqual(arr.slice(-2, -1), ['4']); assert.deepEqual(arr.slice(-2, -3), []); str = '12345'; assert.deepEqual(Array.prototype.slice.call(str), arr); assert.deepEqual(Array.prototype.slice.call(str, 1, 3), ['2', '3']); assert.deepEqual(Array.prototype.slice.call(str, 1, void 8), ['2', '3', '4', '5']); assert.deepEqual(Array.prototype.slice.call(str, 1, -1), ['2', '3', '4']); assert.deepEqual(Array.prototype.slice.call(str, -2, -1), ['4']); assert.deepEqual(Array.prototype.slice.call(str, -2, -3), []); if (list = typeof document != 'undefined' && document !== null ? (ref$ = document.body) != null ? ref$.childNodes : void 8 : void 8) { try { assert.strictEqual(toString$.call(Array.prototype.slice.call(list)).slice(8, -1), 'Array'); } catch (e$) { e = e$; assert.ok(false); } } if (NATIVE) { if (STRICT) { assert.throws(function(){ Array.prototype.slice.call(null); }, TypeError); assert.throws(function(){ Array.prototype.slice.call(void 8); }, TypeError); } assert.deepEqual(Array.prototype.slice.call({ length: -1, 0: 1 }, 0, 1), [], 'uses ToLength'); } }); }).call(this); // Generated by LiveScript 1.4.0 (function(){ var module, test, toString$ = {}.toString; module = QUnit.module, test = QUnit.test; module('ES6'); test('Array#some', function(assert){ var a, ctx, rez, arr; assert.isFunction(Array.prototype.some); assert.arity(Array.prototype.some, 1); assert.name(Array.prototype.some, 'some'); assert.looksNative(Array.prototype.some); assert.nonEnumerable(Array.prototype, 'some'); (a = [1]).some(function(val, key, that){ assert.same(arguments.length, 3, 'correct number of callback arguments'); assert.same(val, 1, 'correct value in callback'); assert.same(key, 0, 'correct index in callback'); assert.same(that, a, 'correct link to array in callback'); assert.same(this, ctx, 'correct callback context'); }, ctx = {}); assert.ok([1, '2', 3].some(function(it){ return toString$.call(it).slice(8, -1) === 'Number'; })); assert.ok([1, 2, 3].some((function(it){ return it < 3; }))); assert.ok(![1, 2, 3].some((function(it){ return it < 0; }))); assert.ok(![1, 2, 3].some(function(it){ return toString$.call(it).slice(8, -1) === 'String'; })); assert.ok(![1, 2, 3].some(function(){ return +this !== 1; }, 1)); rez = ''; [1, 2, 3].some(function(){ rez += arguments[1]; return false; }); assert.ok(rez === '012'); assert.ok(!(arr = [1, 2, 3]).some(function(){ return arguments[2] !== arr; })); if (STRICT) { assert.throws(function(){ Array.prototype.some.call(null, function(){}); }, TypeError); assert.throws(function(){ Array.prototype.some.call(void 8, function(){}); }, TypeError); } if (NATIVE) { assert.ok((function(){ try { return false === Array.prototype.some.call({ length: -1, 0: 1 }, function(){ throw 42; }); } catch (e$) {} }()), 'uses ToLength'); } }); }).call(this); // Generated by LiveScript 1.4.0 (function(){ var module, test; module = QUnit.module, test = QUnit.test; module('ES6'); test('Array#sort', function(assert){ assert.isFunction(Array.prototype.sort); assert.arity(Array.prototype.sort, 1); assert.name(Array.prototype.sort, 'sort'); assert.looksNative(Array.prototype.sort); assert.nonEnumerable(Array.prototype, 'sort'); assert.ok(!!(function(){ try { return [1, 2, 3].sort(void 8); } catch (e$) {} }()), 'works with undefined'); assert.throws(function(){ [1, 2, 3].sort(null); }, 'throws on null'); assert.throws(function(){ [1, 2, 3].sort({}); }, 'throws on {}'); if (STRICT) { assert.throws(function(){ return Array.prototype.sort.call(null); }, TypeError, 'ToObject(this)'); assert.throws(function(){ return Array.prototype.sort.call(void 8); }, TypeError, 'ToObject(this)'); } }); }).call(this); // Generated by LiveScript 1.4.0 (function(){ var module, test; module = QUnit.module, test = QUnit.test; module('ES6'); test('Date.now', function(assert){ var now; now = Date.now; assert.isFunction(now); assert.arity(now, 0); assert.name(now, 'now'); assert.looksNative(now); assert.nonEnumerable(Date, 'now'); assert.ok(+new Date - now() < 10, 'Date.now() ~ +new Date'); }); }).call(this); // Generated by LiveScript 1.4.0 (function(){ var module, test; module = QUnit.module, test = QUnit.test; module('ES6'); test('Date#toISOString', function(assert){ var ft, bc; assert.isFunction(Date.prototype.toISOString); assert.arity(Date.prototype.toISOString, 0); assert.name(Date.prototype.toISOString, 'toISOString'); assert.looksNative(Date.prototype.toISOString); assert.nonEnumerable(Date.prototype, 'toISOString'); assert.strictEqual(new Date(0).toISOString(), '1970-01-01T00:00:00.000Z'); assert.strictEqual(new Date(1e12 + 1).toISOString(), '2001-09-09T01:46:40.001Z'); assert.strictEqual(new Date(-5e13 - 1).toISOString(), '0385-07-25T07:06:39.999Z'); ft = new Date(1e15 + 1).toISOString(); assert.ok(ft === '+033658-09-27T01:46:40.001Z' || ft === '33658-09-27T01:46:40.001Z'); bc = new Date(-1e15 + 1).toISOString(); assert.ok(bc === '-029719-04-05T22:13:20.001Z' || bc === '-29719-04-05T22:13:20.001Z'); assert.throws(function(){ new Date(NaN).toISOString(); }, RangeError); }); }).call(this); // Generated by LiveScript 1.4.0 (function(){ var module, test; module = QUnit.module, test = QUnit.test; module('ES6'); test('Date#toJSON', function(assert){ var d; assert.isFunction(Date.prototype.toJSON); assert.arity(Date.prototype.toJSON, 1); assert.name(Date.prototype.toJSON, 'toJSON'); assert.looksNative(Date.prototype.toJSON); assert.nonEnumerable(Date.prototype, 'toJSON'); d = new Date(); assert.same(d.toJSON(), d.toISOString(), 'base'); assert.same(new Date(NaN).toJSON(), null, 'not finite'); assert.same(Date.prototype.toJSON.call({ toISOString: function(){ return 42; } }), 42, 'generic'); }); }).call(this); // Generated by LiveScript 1.4.0 (function(){ var module, test; module = QUnit.module, test = QUnit.test; module('ES6'); test('Date#@@toPrimitive', function(assert){ var TO_PRIMITIVE, toPrimitive, date, i$, x$, ref$, len$, y$; TO_PRIMITIVE = Symbol.toPrimitive; toPrimitive = Date.prototype[TO_PRIMITIVE]; assert.isFunction(toPrimitive); assert.arity(toPrimitive, 1); assert.nonEnumerable(Object.prototype, TO_PRIMITIVE); date = new Date; assert.same(date[TO_PRIMITIVE]('string'), date.toString(), 'generic, hint "string"'); assert.same(date[TO_PRIMITIVE]('number'), +date, 'generic, hint "number"'); assert.same(date[TO_PRIMITIVE]('default'), date.toString(), 'generic, hint "default"'); assert.same(toPrimitive.call(Object(2), 'string'), '2', 'generic, hint "string"'); assert.same(toPrimitive.call(Object(2), 'number'), 2, 'generic, hint "number"'); assert.same(toPrimitive.call(Object(2), 'default'), '2', 'generic, hint "default"'); for (i$ = 0, len$ = (ref$ = [ void 8, '', 'foo', { toString: fn$ } ]).length; i$ < len$; ++i$) { x$ = ref$[i$]; assert.throws(fn1$, TypeError, "throws on " + x$ + " as a hint"); } if (STRICT) { for (i$ = 0, len$ = (ref$ = [1, false, 'string', null, void 8]).length; i$ < len$; ++i$) { y$ = ref$[i$]; assert.throws(fn2$, TypeError, "throws on " + y$ + " as `this`"); } } function fn$(){ return 'string'; } function fn1$(){ new Date()[TO_PRIMITIVE](x$); } function fn2$(){ toPrimitive.call(y$, 'string'); } }); }).call(this); // Generated by LiveScript 1.4.0 (function(){ var module, test; module = QUnit.module, test = QUnit.test; module('ES6'); test('Date#toString', function(assert){ assert.isFunction(Date.prototype.toString); assert.arity(Date.prototype.toString, 0); assert.name(Date.prototype.toString, 'toString'); assert.looksNative(Date.prototype.toString); assert.nonEnumerable(Date.prototype, 'toString'); assert.same(String(new Date(NaN)), 'Invalid Date'); }); }).call(this); // Generated by LiveScript 1.4.0 (function(){ var module, test; module = QUnit.module, test = QUnit.test; module('ES6'); test('Function#bind', function(assert){ var obj, fn, inst, F, date; assert.isFunction(Function.prototype.bind); assert.arity(Function.prototype.bind, 1); assert.name(Function.prototype.bind, 'bind'); assert.looksNative(Function.prototype.bind); assert.nonEnumerable(Function.prototype, 'bind'); obj = { a: 42 }; assert.ok(42 === function(){ return this.a; }.bind(obj)()); assert.ok(void 8 === new (function(){}.bind(obj))().a); fn = function(a, b){ this.a = a; this.b = b; }; inst = new (fn.bind(null, 1))(2); assert.ok(inst instanceof fn); assert.strictEqual(inst.a, 1); assert.strictEqual(inst.b, 2); assert.ok(42 === function(it){ return it; }.bind(null, 42)()); fn = RegExp.prototype.test.bind(/a/); assert.ok(fn('a')); F = Date.bind(null, 2015); date = new F(6); assert.ok(date instanceof Date); assert.strictEqual(date.getFullYear(), 2015); assert.strictEqual(date.getMonth(), 6); }); }).call(this); // Generated by LiveScript 1.4.0 (function(){ var module, test; module = QUnit.module, test = QUnit.test; module('ES6'); test('Function#@@hasInstance', function(assert){ assert.ok(Symbol.hasInstance in Function.prototype); assert.nonEnumerable(Function.prototype, Symbol.hasInstance); assert.ok(Function[Symbol.hasInstance](function(){})); assert.ok(!Function[Symbol.hasInstance]({})); }); }).call(this); // Generated by LiveScript 1.4.0 (function(){ var module, test; if (DESCRIPTORS) { module = QUnit.module, test = QUnit.test; module('ES6'); test('Function#name', function(assert){ var fn; assert.ok('name' in Function.prototype); assert.nonEnumerable(Function.prototype, 'name'); assert.same((function(){ function foo(it){ return it; } return foo; }()).name, 'foo'); assert.same(function(){}.name, ''); if (Object.freeze) { assert.same(Object.freeze(function(){}).name, ''); } fn = function(){}; fn.toString = function(){ throw 42; }; assert.ok((function(){ try { fn.name; return true; } catch (e$) {} }())); fn = Object(function(){}); fn.toString = function(){ return ''; }; assert.same(fn.name, ''); }); } }).call(this); // Generated by LiveScript 1.4.0 (function(){ var module, test, same, getOwnPropertyDescriptor, freeze; module = QUnit.module, test = QUnit.test; module('ES6'); same = function(a, b){ if (a === b) { return a !== 0 || 1 / a === 1 / b; } else { return a != a && b != b; } }; getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor, freeze = Object.freeze; test('Map', function(assert){ var x$, done, iter, a, o, key, C; assert.isFunction(Map); assert.arity(Map, 0); assert.name(Map, 'Map'); assert.looksNative(Map); assert.ok('clear' in Map.prototype, 'clear in Map.prototype'); assert.ok('delete' in Map.prototype, 'delete in Map.prototype'); assert.ok('get' in Map.prototype, 'get in Map.prototype'); assert.ok('has' in Map.prototype, 'has in Map.prototype'); assert.ok('set' in Map.prototype, 'set in Map.prototype'); assert.ok(new Map instanceof Map, 'new Map instanceof Map'); assert.strictEqual(new Map(createIterable([[1, 1], [2, 2], [3, 3]])).size, 3, 'Init from iterable'); assert.strictEqual((x$ = new Map(), x$.set(freeze({}), 1), x$.set(2, 3), x$).size, 2, 'Support frozen objects'); done = false; iter = createIterable([null, 1, 2], { 'return': function(){ return done = true; } }); try { new Map(iter); } catch (e$) {} assert.ok(done, '.return #throw'); a = []; done = false; a[typeof Symbol != 'undefined' && Symbol !== null ? Symbol.iterator : void 8] = function(){ done = true; return [][typeof Symbol != 'undefined' && Symbol !== null ? Symbol.iterator : void 8].call(this); }; new Map(a); assert.ok(done); o = {}; new Map().set(o, 1); if (DESCRIPTORS) { assert.arrayEqual((function(){ var results$ = []; for (key in o) { results$.push(key); } return results$; }()), []); assert.arrayEqual(Object.keys(o), []); } assert.arrayEqual(Object.getOwnPropertyNames(o), []); ((typeof Object != 'undefined' && Object !== null) && Object.getOwnPropertySymbols) && assert.arrayEqual(Object.getOwnPropertySymbols(o), []); ((typeof Reflect != 'undefined' && Reflect !== null) && Reflect.ownKeys) && assert.arrayEqual(Reflect.ownKeys(o), []); if (nativeSubclass) { C = nativeSubclass(Map); assert.ok(new C instanceof C, 'correct subclassing with native classes #1'); assert.ok(new C instanceof Map, 'correct subclassing with native classes #2'); assert.same(new C().set(1, 2).get(1), 2, 'correct subclassing with native classes #3'); } }); test('Map#clear', function(assert){ var M, x$, y$, f; assert.isFunction(Map.prototype.clear); assert.arity(Map.prototype.clear, 0); assert.name(Map.prototype.clear, 'clear'); assert.looksNative(Map.prototype.clear); assert.nonEnumerable(Map.prototype, 'clear'); M = new Map; M.clear(); assert.strictEqual(M.size, 0); x$ = M = new Map(); x$.set(1, 2); x$.set(2, 3); x$.set(1, 4); M.clear(); assert.strictEqual(M.size, 0); assert.ok(!M.has(1)); assert.ok(!M.has(2)); y$ = M = new Map(); y$.set(1, 2); y$.set(f = freeze({}), 3); M.clear(); assert.strictEqual(M.size, 0, 'Support frozen objects'); assert.ok(!M.has(1)); assert.ok(!M.has(f)); }); test('Map#delete', function(assert){ var a, x$, M, f; assert.isFunction(Map.prototype['delete']); assert.arity(Map.prototype['delete'], 1); NATIVE && assert.name(Map.prototype['delete'], 'delete'); assert.looksNative(Map.prototype['delete']); assert.nonEnumerable(Map.prototype, 'delete'); a = []; x$ = M = new Map(); x$.set(NaN, 1); x$.set(2, 1); x$.set(3, 1); x$.set(2, 5); x$.set(1, 4); x$.set(a, {}); assert.strictEqual(M.size, 5); assert.ok(M['delete'](NaN)); assert.strictEqual(M.size, 4); assert.ok(!M['delete'](4)); assert.strictEqual(M.size, 4); M['delete']([]); assert.strictEqual(M.size, 4); M['delete'](a); assert.strictEqual(M.size, 3); M.set(freeze(f = {}), 42); assert.strictEqual(M.size, 4); M['delete'](f); assert.strictEqual(M.size, 3); }); test('Map#forEach', function(assert){ var r, T, count, x$, M, a, y$, map, s, z$; assert.isFunction(Map.prototype.forEach); assert.arity(Map.prototype.forEach, 1); assert.name(Map.prototype.forEach, 'forEach'); assert.looksNative(Map.prototype.forEach); assert.nonEnumerable(Map.prototype, 'forEach'); r = {}; count = 0; x$ = M = new Map(); x$.set(NaN, 1); x$.set(2, 1); x$.set(3, 7); x$.set(2, 5); x$.set(1, 4); x$.set(a = {}, 9); M.forEach(function(value, key){ count++; r[value] = key; }); assert.strictEqual(count, 5); assert.deepEqual(r, { 1: NaN, 7: 3, 5: 2, 4: 1, 9: a }); y$ = map = new Map(); y$.set('0', 9); y$.set('1', 9); y$.set('2', 9); y$.set('3', 9); s = ""; map.forEach(function(value, key){ s += key; if (key === '2') { map['delete']('2'); map['delete']('3'); map['delete']('1'); return map.set('4', 9); } }); assert.strictEqual(s, '0124'); z$ = map = new Map(); z$.set('0', 1); s = ""; map.forEach(function(it){ map['delete']('0'); if (s !== '') { throw '!!!'; } return s += it; }); assert.strictEqual(s, '1'); assert.throws(function(){ Map.prototype.forEach.call(new Set, function(){}); }, 'non-generic'); }); test('Map#get', function(assert){ var o, f, x$, M; assert.isFunction(Map.prototype.get); assert.name(Map.prototype.get, 'get'); assert.arity(Map.prototype.get, 1); assert.looksNative(Map.prototype.get); assert.nonEnumerable(Map.prototype, 'get'); o = {}; f = freeze({}); x$ = M = new Map(); x$.set(NaN, 1); x$.set(2, 1); x$.set(3, 1); x$.set(2, 5); x$.set(1, 4); x$.set(f, 42); x$.set(o, o); assert.strictEqual(M.get(NaN), 1); assert.strictEqual(M.get(4), void 8); assert.strictEqual(M.get({}), void 8); assert.strictEqual(M.get(o), o); assert.strictEqual(M.get(f), 42); assert.strictEqual(M.get(2), 5); }); test('Map#has', function(assert){ var o, f, x$, M; assert.isFunction(Map.prototype.has); assert.name(Map.prototype.has, 'has'); assert.arity(Map.prototype.has, 1); assert.looksNative(Map.prototype.has); assert.nonEnumerable(Map.prototype, 'has'); o = {}; f = freeze({}); x$ = M = new Map(); x$.set(NaN, 1); x$.set(2, 1); x$.set(3, 1); x$.set(2, 5); x$.set(1, 4); x$.set(f, 42); x$.set(o, o); assert.ok(M.has(NaN)); assert.ok(M.has(o)); assert.ok(M.has(2)); assert.ok(M.has(f)); assert.ok(!M.has(4)); assert.ok(!M.has({})); }); test('Map#set', function(assert){ var o, x$, M, chain, y$, f; assert.isFunction(Map.prototype.set); assert.name(Map.prototype.set, 'set'); assert.arity(Map.prototype.set, 2); assert.looksNative(Map.prototype.set); assert.nonEnumerable(Map.prototype, 'set'); o = {}; x$ = M = new Map(); x$.set(NaN, 1); x$.set(2, 1); x$.set(3, 1); x$.set(2, 5); x$.set(1, 4); x$.set(o, o); assert.ok(M.size === 5); chain = M.set(7, 2); assert.strictEqual(chain, M); M.set(7, 2); assert.strictEqual(M.size, 6); assert.strictEqual(M.get(7), 2); assert.strictEqual(M.get(NaN), 1); M.set(NaN, 42); assert.strictEqual(M.size, 6); assert.strictEqual(M.get(NaN), 42); M.set({}, 11); assert.strictEqual(M.size, 7); assert.strictEqual(M.get(o), o); M.set(o, 27); assert.strictEqual(M.size, 7); assert.strictEqual(M.get(o), 27); assert.strictEqual((y$ = new Map(), y$.set(NaN, 2), y$.set(NaN, 3), y$.set(NaN, 4), y$).size, 1); M = new Map().set(freeze(f = {}), 42); assert.strictEqual(M.get(f), 42); }); test('Map#size', function(assert){ var size, x$, sizeDesc; assert.nonEnumerable(Map.prototype, 'size'); size = (x$ = new Map(), x$.set(2, 1), x$).size; assert.strictEqual(typeof size, 'number', 'size is number'); assert.strictEqual(size, 1, 'size is correct'); if (DESCRIPTORS) { sizeDesc = getOwnPropertyDescriptor(Map.prototype, 'size'); assert.ok(sizeDesc && sizeDesc.get, 'size is getter'); assert.ok(sizeDesc && !sizeDesc.set, 'size isnt setter'); assert.throws(function(){ return Map.prototype.size; }, TypeError); } }); test('Map & -0', function(assert){ var map, x$, y$; map = new Map; map.set(-0, 1); assert.strictEqual(map.size, 1); assert.ok(map.has(0)); assert.ok(map.has(-0)); assert.strictEqual(map.get(0), 1); assert.strictEqual(map.get(-0), 1); map.forEach(function(val, key){ return assert.ok(!same(key, -0)); }); map['delete'](-0); assert.strictEqual(map.size, 0); x$ = map = new Map(); x$.set(-0, 1); map.forEach(function(val, key){ return assert.ok(!same(key, -0)); }); y$ = map = new Map(); y$.set(4, 4); y$.set(3, 3); y$.set(2, 2); y$.set(1, 1); y$.set(0, 0); assert.ok(map.has(-0)); }); test('Map#@@toStringTag', function(assert){ assert.strictEqual(Map.prototype[typeof Symbol != 'undefined' && Symbol !== null ? Symbol.toStringTag : void 8], 'Map', 'Map::@@toStringTag is `Map`'); }); test('Map Iterator', function(assert){ var x$, map, keys, iterator; x$ = map = new Map(); x$.set('a', 1); x$.set('b', 2); x$.set('c', 3); x$.set('d', 4); keys = []; iterator = map.keys(); assert.isIterator(iterator); assert.isIterable(iterator); assert.nonEnumerable(iterator, 'next'); assert.nonEnumerable(iterator, typeof Symbol != 'undefined' && Symbol !== null ? Symbol.iterator : void 8); keys.push(iterator.next().value); assert.ok(map['delete']('a')); assert.ok(map['delete']('b')); assert.ok(map['delete']('c')); map.set('e'); keys.push(iterator.next().value); keys.push(iterator.next().value); assert.ok(iterator.next().done); map.set('f'); assert.ok(iterator.next().done); assert.deepEqual(keys, ['a', 'd', 'e']); }); test('Map#keys', function(assert){ var iter, x$; assert.isFunction(Map.prototype.keys); assert.name(Map.prototype.keys, 'keys'); assert.arity(Map.prototype.keys, 0); assert.looksNative(Map.prototype.keys); assert.nonEnumerable(Map.prototype, 'keys'); iter = (x$ = new Map(), x$.set('a', 'q'), x$.set('s', 'w'), x$.set('d', 'e'), x$).keys(); assert.isIterator(iter); assert.isIterable(iter); assert.strictEqual(iter[typeof Symbol != 'undefined' && Symbol !== null ? Symbol.toStringTag : void 8], 'Map Iterator'); assert.deepEqual(iter.next(), { value: 'a', done: false }); assert.deepEqual(iter.next(), { value: 's', done: false }); assert.deepEqual(iter.next(), { value: 'd', done: false }); assert.deepEqual(iter.next(), { value: void 8, done: true }); }); test('Map#values', function(assert){ var iter, x$; assert.isFunction(Map.prototype.values); assert.name(Map.prototype.values, 'values'); assert.arity(Map.prototype.values, 0); assert.looksNative(Map.prototype.values); assert.nonEnumerable(Map.prototype, 'values'); iter = (x$ = new Map(), x$.set('a', 'q'), x$.set('s', 'w'), x$.set('d', 'e'), x$).values(); assert.isIterator(iter); assert.isIterable(iter); assert.strictEqual(iter[typeof Symbol != 'undefined' && Symbol !== null ? Symbol.toStringTag : void 8], 'Map Iterator'); assert.deepEqual(iter.next(), { value: 'q', done: false }); assert.deepEqual(iter.next(), { value: 'w', done: false }); assert.deepEqual(iter.next(), { value: 'e', done: false }); assert.deepEqual(iter.next(), { value: void 8, done: true }); }); test('Map#entries', function(assert){ var iter, x$; assert.isFunction(Map.prototype.entries); assert.name(Map.prototype.entries, 'entries'); assert.arity(Map.prototype.entries, 0); assert.looksNative(Map.prototype.entries); assert.nonEnumerable(Map.prototype, 'entries'); iter = (x$ = new Map(), x$.set('a', 'q'), x$.set('s', 'w'), x$.set('d', 'e'), x$).entries(); assert.isIterator(iter); assert.isIterable(iter); assert.strictEqual(iter[typeof Symbol != 'undefined' && Symbol !== null ? Symbol.toStringTag : void 8], 'Map Iterator'); assert.deepEqual(iter.next(), { value: ['a', 'q'], done: false }); assert.deepEqual(iter.next(), { value: ['s', 'w'], done: false }); assert.deepEqual(iter.next(), { value: ['d', 'e'], done: false }); assert.deepEqual(iter.next(), { value: void 8, done: true }); }); test('Map#@@iterator', function(assert){ var iter, x$; assert.isIterable(Map.prototype); assert.name(Map.prototype.entries, 'entries'); assert.arity(Map.prototype.entries, 0); assert.looksNative(Map.prototype[typeof Symbol != 'undefined' && Symbol !== null ? Symbol.iterator : void 8]); assert.strictEqual(Map.prototype[typeof Symbol != 'undefined' && Symbol !== null ? Symbol.iterator : void 8], Map.prototype.entries); assert.nonEnumerable(Map.prototype, typeof Symbol != 'undefined' && Symbol !== null ? Symbol.iterator : void 8); iter = (x$ = new Map(), x$.set('a', 'q'), x$.set('s', 'w'), x$.set('d', 'e'), x$)[typeof Symbol != 'undefined' && Symbol !== null ? Symbol.iterator : void 8](); assert.isIterator(iter); assert.isIterable(iter); assert.strictEqual(iter[typeof Symbol != 'undefined' && Symbol !== null ? Symbol.toStringTag : void 8], 'Map Iterator'); assert.deepEqual(iter.next(), { value: ['a', 'q'], done: false }); assert.deepEqual(iter.next(), { value: ['s', 'w'], done: false }); assert.deepEqual(iter.next(), { value: ['d', 'e'], done: false }); assert.deepEqual(iter.next(), { value: void 8, done: true }); }); }).call(this); // Generated by LiveScript 1.4.0 (function(){ var module, test; module = QUnit.module, test = QUnit.test; module('ES6'); test('Math.acosh', function(assert){ var acosh; acosh = Math.acosh; assert.isFunction(acosh); assert.name(acosh, 'acosh'); assert.arity(acosh, 1); assert.looksNative(acosh); assert.nonEnumerable(Math, 'acosh'); assert.same(acosh(NaN), NaN); assert.same(acosh(0.5), NaN); assert.same(acosh(-1), NaN); assert.same(acosh(-1e300), NaN); assert.same(acosh(1), 0); assert.strictEqual(acosh(Infinity), Infinity); assert.epsilon(acosh(1234), 7.811163220849231); assert.epsilon(acosh(8.88), 2.8737631531629235); assert.epsilon(acosh(1e+160), 369.10676205960726); assert.epsilon(acosh(Number.MAX_VALUE), 710.475860073944); assert.epsilon(acosh(1 + Number.EPSILON), 2.1073424255447017e-8); }); }).call(this); // Generated by LiveScript 1.4.0 (function(){ var module, test; module = QUnit.module, test = QUnit.test; module('ES6'); test('Math.asinh', function(assert){ var asinh; asinh = Math.asinh; assert.isFunction(asinh); assert.name(asinh, 'asinh'); assert.arity(asinh, 1); assert.looksNative(asinh); assert.nonEnumerable(Math, 'asinh'); assert.same(asinh(NaN), NaN); assert.same(asinh(0), 0); assert.same(asinh(-0), -0); assert.strictEqual(asinh(Infinity), Infinity); assert.strictEqual(asinh(-Infinity), -Infinity); assert.epsilon(asinh(1234), 7.811163549201245); assert.epsilon(asinh(9.99), 2.997227420191335); assert.epsilon(asinh(1e150), 346.0809111296668); assert.epsilon(asinh(1e7), 16.811242831518268); assert.epsilon(asinh(-1e7), -16.811242831518268); }); }).call(this); // Generated by LiveScript 1.4.0 (function(){ var module, test; module = QUnit.module, test = QUnit.test; module('ES6'); test('Math.atanh', function(assert){ var atanh; atanh = Math.atanh; assert.isFunction(atanh); assert.name(atanh, 'atanh'); assert.arity(atanh, 1); assert.looksNative(atanh); assert.nonEnumerable(Math, 'atanh'); assert.same(atanh(NaN), NaN); assert.same(atanh(-2), NaN); assert.same(atanh(-1.5), NaN); assert.same(atanh(2), NaN); assert.same(atanh(1.5), NaN); assert.strictEqual(atanh(-1), -Infinity); assert.strictEqual(atanh(1), Infinity); assert.same(atanh(0), 0); assert.same(atanh(-0), -0); assert.same(atanh(-1e300), NaN); assert.same(atanh(1e300), NaN); assert.epsilon(atanh(0.5), 0.5493061443340549); assert.epsilon(atanh(-0.5), -0.5493061443340549); assert.epsilon(atanh(0.444), 0.47720201260109457); }); }).call(this); // Generated by LiveScript 1.4.0 (function(){ var module, test; module = QUnit.module, test = QUnit.test; module('ES6'); test('Math.cbrt', function(assert){ var cbrt; cbrt = Math.cbrt; assert.isFunction(cbrt); assert.name(cbrt, 'cbrt'); assert.arity(cbrt, 1); assert.looksNative(cbrt); assert.nonEnumerable(Math, 'cbrt'); assert.same(cbrt(NaN), NaN); assert.same(cbrt(0), 0); assert.same(cbrt(-0), -0); assert.strictEqual(cbrt(Infinity), Infinity); assert.strictEqual(cbrt(-Infinity), -Infinity); assert.strictEqual(cbrt(-8), -2); assert.strictEqual(cbrt(8), 2); assert.epsilon(cbrt(-1000), -10); assert.epsilon(cbrt(1000), 10); }); }).call(this); // Generated by LiveScript 1.4.0 (function(){ var module, test; module = QUnit.module, test = QUnit.test; module('ES6'); test('Math.clz32', function(assert){ var clz32; clz32 = Math.clz32; assert.isFunction(clz32); assert.name(clz32, 'clz32'); assert.arity(clz32, 1); assert.looksNative(clz32); assert.nonEnumerable(Math, 'clz32'); assert.strictEqual(clz32(0), 32); assert.strictEqual(clz32(1), 31); assert.same(clz32(-1), 0); assert.strictEqual(clz32(0.6), 32); assert.same(clz32(Math.pow(2, 32) - 1), 0); return assert.strictEqual(clz32(Math.pow(2, 32)), 32); }); }).call(this); // Generated by LiveScript 1.4.0 (function(){ var module, test; module = QUnit.module, test = QUnit.test; module('ES6'); test('Math.cosh', function(assert){ var cosh; cosh = Math.cosh; assert.isFunction(cosh); assert.name(cosh, 'cosh'); assert.arity(cosh, 1); assert.looksNative(cosh); assert.nonEnumerable(Math, 'cosh'); assert.same(cosh(NaN), NaN); assert.strictEqual(cosh(0), 1); assert.strictEqual(cosh(-0), 1); assert.strictEqual(cosh(Infinity), Infinity); assert.strictEqual(cosh(-Infinity), Infinity); assert.epsilon(cosh(12), 81377.39571257407, 3e-11); assert.epsilon(cosh(22), 1792456423.065795780980053377, 1e-5); assert.epsilon(cosh(-10), 11013.23292010332313972137); assert.epsilon(cosh(-23), 4872401723.1244513000, 1e-5); }); }).call(this); // Generated by LiveScript 1.4.0 (function(){ var module, test; module = QUnit.module, test = QUnit.test; module('ES6'); test('Math.expm1', function(assert){ var expm1; expm1 = Math.expm1; assert.isFunction(expm1); assert.name(expm1, 'expm1'); assert.arity(expm1, 1); assert.looksNative(expm1); assert.nonEnumerable(Math, 'expm1'); assert.same(expm1(NaN), NaN); assert.same(expm1(0), 0); assert.same(expm1(-0), -0); assert.strictEqual(expm1(Infinity), Infinity); assert.strictEqual(expm1(-Infinity), -1); assert.epsilon(expm1(10), 22025.465794806718, assert.epsilon(expm1(-10), -0.9999546000702375)); }); }).call(this); // Generated by LiveScript 1.4.0 (function(){ var module, test; module = QUnit.module, test = QUnit.test; module('ES6'); test('Math.fround', function(assert){ var fround, maxFloat32, minFloat32; fround = Math.fround; assert.isFunction(fround); assert.name(fround, 'fround'); assert.arity(fround, 1); assert.looksNative(fround); assert.nonEnumerable(Math, 'fround'); assert.same(fround(void 8), NaN); assert.same(fround(NaN), NaN); assert.same(fround(0), 0); assert.same(fround(-0), -0); assert.same(fround(Number.MIN_VALUE), 0); assert.same(fround(-Number.MIN_VALUE), -0); assert.strictEqual(fround(Infinity), Infinity); assert.strictEqual(fround(-Infinity), -Infinity); assert.strictEqual(fround(1.7976931348623157e+308), Infinity); assert.strictEqual(fround(-1.7976931348623157e+308), -Infinity); assert.strictEqual(fround(3.4028235677973366e+38), Infinity); assert.strictEqual(fround(3), 3); assert.strictEqual(fround(-3), -3); maxFloat32 = 3.4028234663852886e+38; minFloat32 = 1.401298464324817e-45; assert.strictEqual(fround(maxFloat32), maxFloat32); assert.strictEqual(fround(-maxFloat32), -maxFloat32); assert.strictEqual(fround(maxFloat32 + Math.pow(2, Math.pow(2, 8 - 1) - 1 - 23 - 2)), maxFloat32); assert.strictEqual(fround(minFloat32), minFloat32); assert.strictEqual(fround(-minFloat32), -minFloat32); assert.same(fround(minFloat32 / 2), 0); assert.same(fround(-minFloat32 / 2), -0); assert.strictEqual(fround(minFloat32 / 2 + Math.pow(2, -202)), minFloat32); assert.strictEqual(fround(-minFloat32 / 2 - Math.pow(2, -202)), -minFloat32); }); }).call(this); // Generated by LiveScript 1.4.0 (function(){ var module, test; module = QUnit.module, test = QUnit.test; module('ES6'); test('Math.hypot', function(assert){ var hypot, sqrt; hypot = Math.hypot, sqrt = Math.sqrt; assert.isFunction(hypot); assert.name(hypot, 'hypot'); assert.arity(hypot, 2); assert.looksNative(hypot); assert.nonEnumerable(Math, 'hypot'); assert.strictEqual(hypot(), 0); assert.strictEqual(hypot(1), 1); assert.same(hypot('', 0), 0); assert.same(hypot(0, ''), 0); assert.strictEqual(hypot(Infinity, 0), Infinity); assert.strictEqual(hypot(-Infinity, 0), Infinity); assert.strictEqual(hypot(0, Infinity), Infinity); assert.strictEqual(hypot(0, -Infinity), Infinity); assert.strictEqual(hypot(Infinity, NaN), Infinity); assert.strictEqual(hypot(NaN, -Infinity), Infinity); assert.same(hypot(NaN, 0), NaN); assert.same(hypot(0, NaN), NaN); assert.same(hypot(0, -0), 0); assert.same(hypot(0, 0), 0); assert.same(hypot(-0, -0), 0); assert.same(hypot(-0, 0), 0); assert.strictEqual(hypot(0, 1), 1); assert.strictEqual(hypot(0, -1), 1); assert.strictEqual(hypot(-0, 1), 1); assert.strictEqual(hypot(-0, -1), 1); assert.same(hypot(0), 0); assert.strictEqual(hypot(1), 1); assert.strictEqual(hypot(2), 2); assert.strictEqual(hypot(0, 0, 1), 1); assert.strictEqual(hypot(0, 1, 0), 1); assert.strictEqual(hypot(1, 0, 0), 1); assert.strictEqual(hypot(2, 3, 4), sqrt(2 * 2 + 3 * 3 + 4 * 4)); assert.strictEqual(hypot(2, 3, 4, 5), sqrt(2 * 2 + 3 * 3 + 4 * 4 + 5 * 5)); assert.epsilon(hypot(66, 66), 93.33809511662427); assert.epsilon(hypot(0.1, 100), 100.0000499999875); assert.strictEqual(hypot(1e+300, 1e+300), 1.4142135623730952e+300); assert.strictEqual(Math.floor(hypot(1e-300, 1e-300) * 1e308), 141421356); assert.strictEqual(hypot(1e+300, 1e+300, 2, 3), 1.4142135623730952e+300); assert.strictEqual(hypot(-3, 4), 5); assert.strictEqual(hypot(3, -4), 5); }); }).call(this); // Generated by LiveScript 1.4.0 (function(){ var module, test; module = QUnit.module, test = QUnit.test; module('ES6'); test('Math.imul', function(assert){ var imul; imul = Math.imul; assert.isFunction(imul); assert.name(imul, 'imul'); assert.arity(imul, 2); assert.looksNative(imul); assert.nonEnumerable(Math, 'imul'); assert.same(imul(0, 0), 0); assert.strictEqual(imul(123, 456), 56088); assert.strictEqual(imul(-123, 456), -56088); assert.strictEqual(imul(123, -456), -56088); assert.strictEqual(imul(19088743, 4275878552), 602016552); assert.same(imul(false, 7), 0); assert.same(imul(7, false), 0); assert.same(imul(false, false), 0); assert.strictEqual(imul(true, 7), 7); assert.strictEqual(imul(7, true), 7); assert.strictEqual(imul(true, true), 1); assert.same(imul(void 8, 7), 0); assert.same(imul(7, void 8), 0); assert.same(imul(void 8, void 8), 0); assert.same(imul('str', 7), 0); assert.same(imul(7, 'str'), 0); assert.same(imul({}, 7), 0); assert.same(imul(7, {}), 0); assert.same(imul([], 7), 0); assert.same(imul(7, []), 0); assert.strictEqual(imul(0xffffffff, 5), -5); assert.strictEqual(imul(0xfffffffe, 5), -10); assert.strictEqual(imul(2, 4), 8); assert.strictEqual(imul(-1, 8), -8); assert.strictEqual(imul(-2, -2), 4); assert.same(imul(-0, 7), 0); assert.same(imul(7, -0), 0); assert.same(imul(0.1, 7), 0); assert.same(imul(7, 0.1), 0); assert.same(imul(0.9, 7), 0); assert.same(imul(7, 0.9), 0); assert.strictEqual(imul(1.1, 7), 7); assert.strictEqual(imul(7, 1.1), 7); assert.strictEqual(imul(1.9, 7), 7); assert.strictEqual(imul(7, 1.9), 7); }); }).call(this); // Generated by LiveScript 1.4.0 (function(){ var module, test; module = QUnit.module, test = QUnit.test; module('ES6'); test('Math.log10', function(assert){ var log10; log10 = Math.log10; assert.isFunction(log10); assert.name(log10, 'log10'); assert.arity(log10, 1); assert.looksNative(log10); assert.nonEnumerable(Math, 'log10'); assert.same(log10(''), log10(0)); assert.same(log10(NaN), NaN); assert.same(log10(-1), NaN); assert.same(log10(0), -Infinity); assert.same(log10(-0), -Infinity); assert.same(log10(1), 0); assert.same(log10(Infinity), Infinity); assert.epsilon(log10(0.1), -1); assert.epsilon(log10(0.5), -0.3010299956639812); assert.epsilon(log10(1.5), 0.17609125905568124); assert.epsilon(log10(5), 0.6989700043360189); assert.epsilon(log10(50), 1.6989700043360187); }); }).call(this); // Generated by LiveScript 1.4.0 (function(){ var module, test; module = QUnit.module, test = QUnit.test; module('ES6'); test('Math.log1p', function(assert){ var log1p; log1p = Math.log1p; assert.isFunction(log1p); assert.name(log1p, 'log1p'); assert.arity(log1p, 1); assert.looksNative(log1p); assert.nonEnumerable(Math, 'log1p'); assert.same(log1p(''), log1p(0)); assert.same(log1p(NaN), NaN); assert.same(log1p(-2), NaN); assert.same(log1p(-1), -Infinity); assert.same(log1p(0), 0); assert.same(log1p(-0), -0); assert.same(log1p(Infinity), Infinity); assert.epsilon(log1p(5), 1.791759469228055); assert.epsilon(log1p(50), 3.9318256327243257); }); }).call(this); // Generated by LiveScript 1.4.0 (function(){ var module, test; module = QUnit.module, test = QUnit.test; module('ES6'); test('Math.log2', function(assert){ var log2; log2 = Math.log2; assert.isFunction(log2); assert.name(log2, 'log2'); assert.arity(log2, 1); assert.looksNative(log2); assert.nonEnumerable(Math, 'log2'); assert.same(log2(''), log2(0)); assert.same(log2(NaN), NaN); assert.same(log2(-1), NaN); assert.same(log2(0), -Infinity); assert.same(log2(-0), -Infinity); assert.same(log2(1), 0); assert.same(log2(Infinity), Infinity); assert.same(log2(0.5), -1); assert.same(log2(32), 5); assert.epsilon(log2(5), 2.321928094887362); }); }).call(this); // Generated by LiveScript 1.4.0 (function(){ var module, test; module = QUnit.module, test = QUnit.test; module('ES6'); test('Math.sign', function(assert){ var sign; sign = Math.sign; assert.isFunction(sign); assert.name(sign, 'sign'); assert.arity(sign, 1); assert.looksNative(sign); assert.nonEnumerable(Math, 'sign'); assert.same(sign(NaN), NaN); assert.same(sign(), NaN); assert.same(sign(-0), -0); assert.same(sign(0), 0); assert.strictEqual(sign(Infinity), 1); assert.strictEqual(sign(-Infinity), -1); assert.strictEqual(sign(13510798882111488), 1); assert.strictEqual(sign(-13510798882111488), -1); assert.strictEqual(sign(42.5), 1); assert.strictEqual(sign(-42.5), -1); }); }).call(this); // Generated by LiveScript 1.4.0 (function(){ var module, test; module = QUnit.module, test = QUnit.test; module('ES6'); test('Math.sinh', function(assert){ var sinh; sinh = Math.sinh; assert.isFunction(sinh); assert.name(sinh, 'sinh'); assert.arity(sinh, 1); assert.looksNative(sinh); assert.nonEnumerable(Math, 'sinh'); assert.same(sinh(NaN), NaN); assert.same(sinh(0), 0); assert.same(sinh(-0), -0); assert.strictEqual(sinh(Infinity), Infinity); assert.strictEqual(sinh(-Infinity), -Infinity); assert.epsilon(sinh(-5), -74.20321057778875); assert.epsilon(sinh(2), 3.6268604078470186); assert.strictEqual(sinh(-2e-17), -2e-17); }); }).call(this); // Generated by LiveScript 1.4.0 (function(){ var module, test; module = QUnit.module, test = QUnit.test; module('ES6'); test('Math.tanh', function(assert){ var tanh; tanh = Math.tanh; assert.isFunction(tanh); assert.name(tanh, 'tanh'); assert.arity(tanh, 1); assert.looksNative(tanh); assert.nonEnumerable(Math, 'tanh'); assert.same(tanh(NaN), NaN); assert.same(tanh(0), 0); assert.same(tanh(-0), -0); assert.strictEqual(tanh(Infinity), 1); assert.strictEqual(tanh(90), 1); assert.epsilon(tanh(10), 0.9999999958776927); NATIVE && assert.strictEqual(tanh(710), 1); }); }).call(this); // Generated by LiveScript 1.4.0 (function(){ var module, test; module = QUnit.module, test = QUnit.test; module('ES6'); test('Math.trunc', function(assert){ var trunc; trunc = Math.trunc; assert.isFunction(trunc); assert.name(trunc, 'trunc'); assert.arity(trunc, 1); assert.looksNative(trunc); assert.nonEnumerable(Math, 'trunc'); assert.same(trunc(NaN), NaN, 'NaN -> NaN'); assert.same(trunc(-0), -0, '-0 -> -0'); assert.same(trunc(0), 0, '0 -> 0'); assert.same(trunc(Infinity), Infinity, 'Infinity -> Infinity'); assert.same(trunc(-Infinity), -Infinity, '-Infinity -> -Infinity'); assert.same(trunc(null), 0, 'null -> 0'); assert.same(trunc({}), NaN, '{} -> NaN'); assert.strictEqual(trunc([]), 0, '[] -> 0'); assert.strictEqual(trunc(1.01), 1, '1.01 -> 0'); assert.strictEqual(trunc(1.99), 1, '1.99 -> 0'); assert.strictEqual(trunc(-1), -1, '-1 -> -1'); assert.strictEqual(trunc(-1.99), -1, '-1.99 -> -1'); assert.strictEqual(trunc(-555.555), -555, '-555.555 -> -555'); assert.strictEqual(trunc(0x20000000000001), 0x20000000000001, '0x20000000000001 -> 0x20000000000001'); assert.strictEqual(trunc(-0x20000000000001), -0x20000000000001, '-0x20000000000001 -> -0x20000000000001'); }); }).call(this); // Generated by LiveScript 1.4.0 (function(){ var module, test, ws, $check, toString$ = {}.toString; module = QUnit.module, test = QUnit.test; module('ES6'); ws = ' \t\x0b\f\xa0\ufeff\n\r\u2028\u2029\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000'; $check = function(assert){ return function(a, b){ var x; assert.same(Number(a), b, "Number " + typeof a + " " + a + " -> " + b); x = new Number(a); assert.ok(x === Object(x), "new Number " + typeof a + " " + a + " is object"); assert.strictEqual(toString$.call(x).slice(8, -1), 'Number', "classof new Number " + typeof a + " " + a + " is Number"); assert.same(x.valueOf(), b, "new Number(" + typeof a + " " + a + ").valueOf() -> " + b); }; }; test('Number constructor: regression', function(assert){ var check, i$, x$, ref$, len$, i, n, C; check = $check(assert); assert.isFunction(Number); assert.arity(Number, 1); assert.name(Number, 'Number'); assert.looksNative(Number); assert.same(Number.prototype.constructor, Number); assert.same(1 .constructor, Number); for (i$ = 0, len$ = (ref$ = ['MAX_VALUE', 'MIN_VALUE', 'NaN', 'NEGATIVE_INFINITY', 'POSITIVE_INFINITY']).length; i$ < len$; ++i$) { x$ = ref$[i$]; assert.ok(x$ in Number, "Number." + x$); assert.nonEnumerable(Number, x$); } assert.same(Number(), 0); assert.same(new Number().valueOf(), 0); check(42, 42); check(42.42, 42.42); check(new Number(42), 42); check(new Number(42.42), 42.42); check('42', 42); check('42.42', 42.42); check('0x42', 66); check('0X42', 66); check('0xzzz', NaN); check('0x1g', NaN); check('+0x1', NaN); check('-0x1', NaN); check('+0X1', NaN); check('-0X1', NaN); check(new String('42'), 42); check(new String('42.42'), 42.42); check(new String('0x42'), 66); check(null, 0); check(void 8, NaN); check(false, 0); check(true, 1); check(new Boolean(false), 0); check(new Boolean(true), 1); check({}, NaN); check({ valueOf: '1.1' }, NaN); check({ valueOf: '1.1', toString: function(){ return '2.2'; } }, 2.2); check({ valueOf: function(){ return '1.1'; } }, 1.1); check({ valueOf: function(){ return '1.1'; }, toString: function(){ return '2.2'; } }, 1.1); check({ valueOf: function(){ return '-0x1a2b3c'; } }, NaN); check({ toString: function(){ return '-0x1a2b3c'; } }, NaN); check({ valueOf: function(){ return 42; } }, 42); check({ valueOf: function(){ return '42'; } }, 42); check({ valueOf: function(){ return null; } }, 0); check({ toString: function(){ return 42; } }, 42); check({ toString: function(){ return '42'; } }, 42); check({ valueOf: function(){ return 1; }, toString: function(){ return 2; } }, 1); check({ valueOf: 1, toString: function(){ return 2; } }, 2); i = 1; assert.strictEqual(Number({ valueOf: function(){ return ++i; } }), 2, 'Number call valueOf only once #1'); assert.strictEqual(i, 2, 'Number call valueOf only once #2'); i = 1; assert.strictEqual(Number({ toString: function(){ return ++i; } }), 2, 'Number call toString only once #1'); assert.strictEqual(i, 2, 'Number call toString only once #2'); i = 1; assert.strictEqual(new Number({ valueOf: function(){ return ++i; } }).valueOf(), 2, 'new Number call valueOf only once #1'); assert.strictEqual(i, 2, 'new Number call valueOf only once #2'); i = 1; assert.strictEqual(new Number({ toString: function(){ return ++i; } }).valueOf(), 2, 'new Number call toString only once #1'); assert.strictEqual(i, 2, 'new Number call toString only once #2'); assert.throws(function(){ return Number(Object.create(null)); }, TypeError, 'Number assert.throws on object w/o valueOf and toString'); assert.throws(function(){ return Number({ valueOf: 1, toString: 2 }); }, TypeError, 'Number assert.throws on object then valueOf and toString are not functions'); assert.throws(function(){ return new Number(Object.create(null)); }, TypeError, 'new Number assert.throws on object w/o valueOf and toString'); assert.throws(function(){ return new Number({ valueOf: 1, toString: 2 }); }, TypeError, 'new Number assert.throws on object then valueOf and toString are not functions'); n = new Number(42); assert.strictEqual(typeof n.constructor(n), 'number'); check(ws + "42", 42); check("42" + ws, 42); check(ws + "42" + ws, 42); check(ws + "0x42", 66); check("0x42" + ws, 66); check(ws + "0x42" + ws, 66); check(ws + "0X42", 66); check("0X42" + ws, 66); check(ws + "0X42" + ws, 66); if (nativeSubclass) { C = nativeSubclass(Number); assert.ok(new C instanceof C, 'correct subclassing with native classes #1'); assert.ok(new C instanceof Number, 'correct subclassing with native classes #2'); assert.same(new C(1).toFixed(2), '1.00', 'correct subclassing with native classes #3'); } }); test('Number constructor: binary', function(assert){ var check; check = $check(assert); check('0b1', 1); check('0B1', 1); check('0b12', NaN); check('0b234', NaN); check('0b1!', NaN); check('+0b1', NaN); check('-0b1', NaN); check(' 0b1', 1); check('0b1\n', 1); check('\n 0b1\n ', 1); check(' 0B1', 1); check('0B1\n', 1); check('\n 0B1\n ', 1); check({ valueOf: function(){ return '0b11'; } }, 3); check({ toString: function(){ return '0b111'; } }, 7); check({ valueOf: function(){ return '0b101010'; } }, 42); check({ toString: function(){ return '0b101010'; } }, 42); check(ws + "0b11", 3); check("0b11" + ws, 3); check(ws + "0b11" + ws, 3); check(ws + "0B11", 3); check("0B11" + ws, 3); check(ws + "0B11" + ws, 3); }); test('Number constructor: octal', function(assert){ var check; check = $check(assert); check('0o7', 7); check('0O7', 7); check('0o18', NaN); check('0o89a', NaN); check('0o1!', NaN); check('+0o1', NaN); check('-0o1', NaN); check(' 0o1', 1); check('0o1\n', 1); check('\n 0o1\n ', 1); check(' 0O1', 1); check('0O1\n', 1); check('\n 0O1\n ', 1); check({ valueOf: function(){ return '0o77'; } }, 63); check({ toString: function(){ return '0o777'; } }, 511); check({ valueOf: function(){ return '0o12345'; } }, 5349); check({ toString: function(){ return '0o12345'; } }, 5349); check(ws + "0o11", 9); check("0o11" + ws, 9); check(ws + "0o11" + ws, 9); check(ws + "0O11", 9); check("0O11" + ws, 9); check(ws + "0O11" + ws, 9); }); }).call(this); // Generated by LiveScript 1.4.0 (function(){ var module, test; module = QUnit.module, test = QUnit.test; module('ES6'); test('Number.EPSILON', function(assert){ var EPSILON; EPSILON = Number.EPSILON; assert.ok('EPSILON' in Number, 'EPSILON in Number'); assert.nonEnumerable(Number, 'EPSILON'); assert.strictEqual(EPSILON, Math.pow(2, -52), 'Is 2^-52'); assert.ok(1 !== 1 + EPSILON, '1 isnt 1 + EPSILON'); assert.strictEqual(1, 1 + EPSILON / 2, '1 is 1 + EPSILON / 2'); }); }).call(this); // Generated by LiveScript 1.4.0 (function(){ var module, test; module = QUnit.module, test = QUnit.test; module('ES6'); test('Number.isFinite', function(assert){ var isFinite, create, i$, x$, ref$, len$, y$, e; isFinite = Number.isFinite; create = Object.create; assert.isFunction(isFinite); assert.name(isFinite, 'isFinite'); assert.arity(isFinite, 1); assert.looksNative(isFinite); assert.nonEnumerable(Number, 'isFinite'); for (i$ = 0, len$ = (ref$ = [1, 0.1, -1, Math.pow(2, 16), Math.pow(2, 16) - 1, Math.pow(2, 31), Math.pow(2, 31) - 1, Math.pow(2, 32), Math.pow(2, 32) - 1, -0]).length; i$ < len$; ++i$) { x$ = ref$[i$]; assert.ok(isFinite(x$), "isFinite " + typeof x$ + " " + x$); } for (i$ = 0, len$ = (ref$ = [NaN, Infinity, 'NaN', '5', false, new Number(NaN), new Number(Infinity), new Number(5), new Number(0.1), void 8, null, {}, fn$, create(null)]).length; i$ < len$; ++i$) { y$ = ref$[i$]; assert.ok(!isFinite(y$), "not isFinite " + typeof y$ + " " + (fn1$())); } function fn$(){} function fn1$(){ try { return String(y$); } catch (e$) { e = e$; return 'Object.create(null)'; } } }); }).call(this); // Generated by LiveScript 1.4.0 (function(){ var module, test; module = QUnit.module, test = QUnit.test; module('ES6'); test('Number.isInteger', function(assert){ var isInteger, create, i$, x$, ref$, len$, y$, e; isInteger = Number.isInteger; create = Object.create; assert.isFunction(isInteger); assert.name(isInteger, 'isInteger'); assert.arity(isInteger, 1); assert.looksNative(isInteger); assert.nonEnumerable(Number, 'isInteger'); for (i$ = 0, len$ = (ref$ = [1, -1, Math.pow(2, 16), Math.pow(2, 16) - 1, Math.pow(2, 31), Math.pow(2, 31) - 1, Math.pow(2, 32), Math.pow(2, 32) - 1, -0]).length; i$ < len$; ++i$) { x$ = ref$[i$]; assert.ok(isInteger(x$), "isInteger " + typeof x$ + " " + x$); } for (i$ = 0, len$ = (ref$ = [NaN, 0.1, Infinity, 'NaN', '5', false, new Number(NaN), new Number(Infinity), new Number(5), new Number(0.1), void 8, null, {}, fn$, create(null)]).length; i$ < len$; ++i$) { y$ = ref$[i$]; assert.ok(!isInteger(y$), "not isInteger " + typeof y$ + " " + (fn1$())); } function fn$(){} function fn1$(){ try { return String(y$); } catch (e$) { e = e$; return 'Object.create(null)'; } } }); }).call(this); // Generated by LiveScript 1.4.0 (function(){ var module, test; module = QUnit.module, test = QUnit.test; module('ES6'); test('Number.isNaN', function(assert){ var isNaN, create, i$, x$, ref$, len$, e; isNaN = Number.isNaN; create = Object.create; assert.isFunction(isNaN); assert.name(isNaN, 'isNaN'); assert.arity(isNaN, 1); assert.looksNative(isNaN); assert.nonEnumerable(Number, 'isNaN'); assert.ok(isNaN(NaN), 'Number.isNaN NaN'); for (i$ = 0, len$ = (ref$ = [1, 0.1, -1, Math.pow(2, 16), Math.pow(2, 16) - 1, Math.pow(2, 31), Math.pow(2, 31) - 1, Math.pow(2, 32), Math.pow(2, 32) - 1, -0, Infinity, 'NaN', '5', false, new Number(NaN), new Number(Infinity), new Number(5), new Number(0.1), void 8, null, {}, fn$, create(null)]).length; i$ < len$; ++i$) { x$ = ref$[i$]; assert.ok(!isNaN(x$), "not Number.isNaN " + typeof x$ + " " + (fn1$())); } function fn$(){} function fn1$(){ try { return String(x$); } catch (e$) { e = e$; return 'Object.create(null)'; } } }); }).call(this); // Generated by LiveScript 1.4.0 (function(){ var module, test; module = QUnit.module, test = QUnit.test; module('ES6'); test('Number.isSafeInteger', function(assert){ var isSafeInteger, create, i$, x$, ref$, len$, y$, e; isSafeInteger = Number.isSafeInteger; create = Object.create; assert.isFunction(isSafeInteger); assert.name(isSafeInteger, 'isSafeInteger'); assert.arity(isSafeInteger, 1); assert.looksNative(isSafeInteger); assert.nonEnumerable(Number, 'isSafeInteger'); for (i$ = 0, len$ = (ref$ = [1, -1, Math.pow(2, 16), Math.pow(2, 16) - 1, Math.pow(2, 31), Math.pow(2, 31) - 1, Math.pow(2, 32), Math.pow(2, 32) - 1, -0, 9007199254740991, -9007199254740991]).length; i$ < len$; ++i$) { x$ = ref$[i$]; assert.ok(isSafeInteger(x$), "isSafeInteger " + typeof x$ + " " + x$); } for (i$ = 0, len$ = (ref$ = [9007199254740992, -9007199254740992, NaN, 0.1, Infinity, 'NaN', '5', false, new Number(NaN), new Number(Infinity), new Number(5), new Number(0.1), void 8, null, {}, fn$, create(null)]).length; i$ < len$; ++i$) { y$ = ref$[i$]; assert.ok(!isSafeInteger(y$), "not isSafeInteger " + typeof y$ + " " + (fn1$())); } function fn$(){} function fn1$(){ try { return String(y$); } catch (e$) { e = e$; return 'Object.create(null)'; } } }); }).call(this); // Generated by LiveScript 1.4.0 (function(){ var module, test; module = QUnit.module, test = QUnit.test; module('ES6'); test('Number.MAX_SAFE_INTEGER', function(assert){ assert.ok('MAX_SAFE_INTEGER' in Number); assert.nonEnumerable(Number, 'MAX_SAFE_INTEGER'); assert.strictEqual(Number.MAX_SAFE_INTEGER, Math.pow(2, 53) - 1, 'Is 2^53 - 1'); }); }).call(this); // Generated by LiveScript 1.4.0 (function(){ var module, test; module = QUnit.module, test = QUnit.test; module('ES6'); test('Number.MIN_SAFE_INTEGER', function(assert){ assert.ok('MIN_SAFE_INTEGER' in Number); assert.nonEnumerable(Number, 'MIN_SAFE_INTEGER'); assert.strictEqual(Number.MIN_SAFE_INTEGER, -Math.pow(2, 53) + 1, 'Is -2^53 + 1'); }); }).call(this); // Generated by LiveScript 1.4.0 (function(){ var module, test; module = QUnit.module, test = QUnit.test; module('ES6'); test('Number.parseFloat', function(assert){ var parseFloat, ws; parseFloat = Number.parseFloat; assert.isFunction(parseFloat); assert.name(parseFloat, 'parseFloat'); assert.arity(parseFloat, 1); assert.looksNative(parseFloat); assert.nonEnumerable(Number, 'parseFloat'); assert.same(parseFloat, global.parseFloat); assert.same(parseFloat('0'), 0); assert.same(parseFloat(' 0'), 0); assert.same(parseFloat('+0'), 0); assert.same(parseFloat(' +0'), 0); assert.same(parseFloat('-0'), -0); assert.same(parseFloat(' -0'), -0); ws = '\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u180E\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF'; assert.same(parseFloat(ws + '+0'), 0); assert.same(parseFloat(ws + '-0'), -0); assert.same(parseFloat(null), NaN); assert.same(parseFloat(void 8), NaN); }); }).call(this); // Generated by LiveScript 1.4.0 (function(){ var module, test; module = QUnit.module, test = QUnit.test; module('ES6'); test('Number.parseInt', function(assert){ var parseInt, i$, r, x$, ref$, len$, ws, fakeZero; parseInt = Number.parseInt; assert.isFunction(parseInt); assert.name(parseInt, 'parseInt'); assert.arity(parseInt, 2); assert.looksNative(parseInt); assert.nonEnumerable(Number, 'parseInt'); assert.same(parseInt, global.parseInt); for (i$ = 2; i$ <= 36; ++i$) { r = i$; assert.same(parseInt('10', r), r, "radix " + r); } for (i$ = 0, len$ = (ref$ = ['01', '08', '10', '42']).length; i$ < len$; ++i$) { x$ = ref$[i$]; assert.same(parseInt(x$), parseInt(x$, 10), "default radix is 10: " + x$); } assert.same(parseInt('0x16'), parseInt('0x16', 16), "default radix is 16: 0x16"); ws = '\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u180E\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF'; assert.same(parseInt(' 0x16'), parseInt('0x16', 16), 'ignores leading whitespace #1'); assert.same(parseInt(' 42'), parseInt('42', 10), 'ignores leading whitespace #2'); assert.same(parseInt(' 08'), parseInt('08', 10), 'ignores leading whitespace #3'); assert.same(parseInt(ws + '08'), parseInt('08', 10), 'ignores leading whitespace #4'); assert.same(parseInt(ws + '0x16'), parseInt('0x16', 16), 'ignores leading whitespace #5'); fakeZero = { valueOf: function(){ return 0; } }; assert.same(parseInt('08', fakeZero), parseInt('08', 10), 'valueOf #1'); assert.same(parseInt('0x16', fakeZero), parseInt('0x16', 16), 'valueOf #2'); assert.same(parseInt('-0xF'), -15, 'signed hex #1'); assert.same(parseInt('-0xF', 16), -15, 'signed hex #2'); assert.same(parseInt('+0xF'), 15, 'signed hex #3'); assert.same(parseInt('+0xF', 16), 15, 'signed hex #4'); assert.same(parseInt('10', -4294967294), 2, 'radix uses ToUint32'); assert.same(parseInt(null), NaN); assert.same(parseInt(void 8), NaN); }); }).call(this); // Generated by LiveScript 1.4.0 (function(){ var module, test; module = QUnit.module, test = QUnit.test; module('ES6'); test('Number#toFixed', function(assert){ var toFixed; toFixed = Number.prototype.toFixed; assert.isFunction(toFixed); assert.name(toFixed, 'toFixed'); assert.arity(toFixed, 1); assert.looksNative(toFixed); assert.nonEnumerable(Number.prototype, 'toFixed'); assert.same(0.00008.toFixed(3), '0.000'); assert.same(0.9.toFixed(0), '1'); assert.same(1.255.toFixed(2), '1.25'); assert.same(1843654265.0774949.toFixed(5), '1843654265.07749'); assert.same(1000000000000000128 .toFixed(0), '1000000000000000128'); assert.same(toFixed.call(1), '1'); assert.same(toFixed.call(1, 0), '1'); assert.same(toFixed.call(1, 1), '1.0'); assert.same(toFixed.call(1, 1.1), '1.0'); assert.same(toFixed.call(1, 0.9), '1'); assert.same(toFixed.call(1, '0'), '1'); assert.same(toFixed.call(1, '1'), '1.0'); assert.same(toFixed.call(1, '1.1'), '1.0'); assert.same(toFixed.call(1, '0.9'), '1'); assert.same(toFixed.call(1, NaN), '1'); assert.same(toFixed.call(1, 'some string'), '1'); assert.same((function(){ try { return toFixed.call(1, -0.1); } catch (e$) {} }()), '1'); assert.same(new Number(1).toFixed(), '1'); assert.same(new Number(1).toFixed(0), '1'); assert.same(new Number(1).toFixed(1), '1.0'); assert.same(new Number(1).toFixed(1.1), '1.0'); assert.same(new Number(1).toFixed(0.9), '1'); assert.same(new Number(1).toFixed('0'), '1'); assert.same(new Number(1).toFixed('1'), '1.0'); assert.same(new Number(1).toFixed('1.1'), '1.0'); assert.same(new Number(1).toFixed('0.9'), '1'); assert.same(new Number(1).toFixed(NaN), '1'); assert.same(new Number(1).toFixed('some string'), '1'); assert.same((function(){ try { return new Number(1).toFixed(-0.1); } catch (e$) {} }()), '1'); assert.same(NaN.toFixed(), 'NaN'); assert.same(NaN.toFixed(0), 'NaN'); assert.same(NaN.toFixed(1), 'NaN'); assert.same(NaN.toFixed(1.1), 'NaN'); assert.same(NaN.toFixed(0.9), 'NaN'); assert.same(NaN.toFixed('0'), 'NaN'); assert.same(NaN.toFixed('1'), 'NaN'); assert.same(NaN.toFixed('1.1'), 'NaN'); assert.same(NaN.toFixed('0.9'), 'NaN'); assert.same(NaN.toFixed(NaN), 'NaN'); assert.same(NaN.toFixed('some string'), 'NaN'); assert.same((function(){ try { return NaN.toFixed(-0.1); } catch (e$) {} }()), 'NaN'); assert.same(new Number(1e21).toFixed(), String(1e21)); assert.same(new Number(1e21).toFixed(0), String(1e21)); assert.same(new Number(1e21).toFixed(1), String(1e21)); assert.same(new Number(1e21).toFixed(1.1), String(1e21)); assert.same(new Number(1e21).toFixed(0.9), String(1e21)); assert.same(new Number(1e21).toFixed('0'), String(1e21)); assert.same(new Number(1e21).toFixed('1'), String(1e21)); assert.same(new Number(1e21).toFixed('1.1'), String(1e21)); assert.same(new Number(1e21).toFixed('0.9'), String(1e21)); assert.same(new Number(1e21).toFixed(NaN), String(1e21)); assert.same(new Number(1e21).toFixed('some string'), String(1e21)); assert.same((function(){ try { return new Number(1e21).toFixed(-0.1); } catch (e$) {} }()), String(1e21)); assert.throws(function(){ 1.0.toFixed(-101); }, RangeError, 'If f < 0 or f > 20, throw a RangeError exception.'); assert.throws(function(){ 1.0.toFixed(101); }, RangeError, 'If f < 0 or f > 20, throw a RangeError exception.'); assert.throws(function(){ NaN.toFixed(Infinity); }, RangeError, 'If f < 0 or f > 20, throw a RangeError exception.'); assert.throws(function(){ toFixed.call({}, 1); }, TypeError, '? thisNumberValue(this value)'); assert.throws(function(){ toFixed.call('123', 1); }, TypeError, '? thisNumberValue(this value)'); assert.throws(function(){ toFixed.call(false, 1); }, TypeError, '? thisNumberValue(this value)'); assert.throws(function(){ toFixed.call(null, 1); }, TypeError, '? thisNumberValue(this value)'); assert.throws(function(){ toFixed.call(void 8, 1); }, TypeError, '? thisNumberValue(this value)'); }); }).call(this); // Generated by LiveScript 1.4.0 (function(){ var module, test; module = QUnit.module, test = QUnit.test; module('ES6'); test('Number#toPrecision', function(assert){ var toPrecision; toPrecision = Number.prototype.toPrecision; assert.isFunction(toPrecision); assert.name(toPrecision, 'toPrecision'); assert.arity(toPrecision, 1); assert.looksNative(toPrecision); assert.nonEnumerable(Number.prototype, 'toPrecision'); assert.same(0.00008.toPrecision(3), '0.0000800', '0.00008.toPrecision(3)'); assert.same(1.255.toPrecision(2), '1.3', '1.255.toPrecision(2)'); assert.same(1843654265.0774949.toPrecision(13), '1843654265.077', '1843654265.0774949.toPrecision(13)'); assert.same(NaN.toPrecision(1), 'NaN', 'If x is NaN, return the String "NaN".'); assert.same(123.456.toPrecision(), '123.456', 'If precision is undefined, return ! ToString(x).'); assert.same(123.456.toPrecision(void 8), '123.456', 'If precision is undefined, return ! ToString(x).'); assert.throws(function(){ 0.9.toPrecision(0); }, RangeError, 'If p < 1 or p > 21, throw a RangeError exception.'); assert.throws(function(){ 0.9.toPrecision(101); }, RangeError, 'If p < 1 or p > 21, throw a RangeError exception.'); assert.throws(function(){ toPrecision.call({}, 1); }, TypeError, '? thisNumberValue(this value)'); assert.throws(function(){ toPrecision.call('123', 1); }, TypeError, '? thisNumberValue(this value)'); assert.throws(function(){ toPrecision.call(false, 1); }, TypeError, '? thisNumberValue(this value)'); assert.throws(function(){ toPrecision.call(null, 1); }, TypeError, '? thisNumberValue(this value)'); assert.throws(function(){ toPrecision.call(void 8, 1); }, TypeError, '? thisNumberValue(this value)'); }); }).call(this); // Generated by LiveScript 1.4.0 (function(){ var module, test; module = QUnit.module, test = QUnit.test; module('ES6'); test('Object.assign', function(assert){ var assign, keys, defineProperty, foo, str, c, d, D, ref$, O, string, i$, x$, len$; assign = Object.assign, keys = Object.keys, defineProperty = Object.defineProperty; assert.isFunction(assign); assert.arity(assign, 2); assert.name(assign, 'assign'); assert.looksNative(assign); assert.nonEnumerable(Object, 'assign'); foo = { q: 1 }; assert.strictEqual(foo, assign(foo, { bar: 2 }), 'assign return target'); assert.strictEqual(foo.bar, 2, 'assign define properties'); assert.deepEqual(assign({}, { q: 1 }, { w: 2 }), { q: 1, w: 2 }); assert.deepEqual(assign({}, 'qwe'), { 0: 'q', 1: 'w', 2: 'e' }); assert.throws(function(){ return assign(null, { q: 1 }); }, TypeError); assert.throws(function(){ return assign(void 8, { q: 1 }); }, TypeError); str = assign('qwe', { q: 1 }); assert.strictEqual(typeof str, 'object'); assert.strictEqual(String(str), 'qwe'); assert.strictEqual(str.q, 1); if (DESCRIPTORS) { foo = { baz: 1 }; assign(foo, defineProperty({}, 'bar', { get: function(){ return this.baz + 1; } })); assert.ok(foo.bar === void 8, "assign don't copy descriptors"); c = Symbol('c'); d = Symbol('d'); D = (ref$ = { a: 'a' }, ref$[c] = 'c', ref$); defineProperty(D, 'b', { value: 'b' }); defineProperty(D, d, { value: 'd' }); O = assign({}, D); assert.strictEqual(O.a, 'a', 'a'); assert.strictEqual(O.b, void 8, 'b'); assert.strictEqual(O[c], 'c', 'c'); assert.strictEqual(O[d], void 8, 'd'); try { assert.strictEqual(Function('return Object.assign({b: 1}, {get a(){delete this.b;},b: 2})')().b, 1); } catch (e$) {} try { assert.strictEqual(Function('return Object.assign({b: 1}, {get a(){Object.defineProperty(this, "b", {value:4,enumerable:false});},b: 2})')().b, 1); } catch (e$) {} } string = 'abcdefghijklmnopqrst'; O = {}; for (i$ = 0, len$ = (ref$ = string.split('')).length; i$ < len$; ++i$) { x$ = ref$[i$]; O[x$] = x$; } assert.strictEqual(keys(assign({}, O)).join(''), string); }); }).call(this); // Generated by LiveScript 1.4.0 (function(){ var module, test; module = QUnit.module, test = QUnit.test; module('ES6'); test('Object.create', function(assert){ var create, getPrototypeOf, getOwnPropertyNames, isObject, isPrototype, getPropertyNames, obj, fn; create = Object.create, getPrototypeOf = Object.getPrototypeOf, getOwnPropertyNames = Object.getOwnPropertyNames; isObject = function(it){ return it === Object(it); }; isPrototype = function(a, b){ return {}.isPrototypeOf.call(a, b); }; getPropertyNames = function(object){ var result, i$, x$, ref$, len$; result = getOwnPropertyNames(object); while (object = getPrototypeOf(object)) { for (i$ = 0, len$ = (ref$ = getOwnPropertyNames(object)).length; i$ < len$; ++i$) { x$ = ref$[i$]; in$(x$, result) || result.push(x$); } } return result; }; assert.isFunction(create); assert.arity(create, 2); assert.name(create, 'create'); assert.looksNative(create); assert.nonEnumerable(Object, 'create'); assert.ok(isPrototype(obj = { q: 1 }, create(obj))); assert.ok(create(obj).q === 1); fn = function(){ return this.a = 1; }; assert.ok(create(new fn) instanceof fn); assert.ok(fn.prototype === getPrototypeOf(getPrototypeOf(create(new fn)))); assert.ok(create(new fn).a === 1); assert.ok(create({}, { a: { value: 42 } }).a === 42); assert.ok(isObject(obj = create(null, { w: { value: 2 } }))); assert.ok(!('toString' in obj)); assert.ok(obj.w === 2); assert.deepEqual(getPropertyNames(create(null)), []); }); function in$(x, xs){ var i = -1, l = xs.length >>> 0; while (++i < l) if (x === xs[i]) return true; return false; } }).call(this); // Generated by LiveScript 1.4.0 (function(){ var module, test; module = QUnit.module, test = QUnit.test; module('ES6'); test('Object.defineProperties', function(assert){ var defineProperties, rez, src; defineProperties = Object.defineProperties; assert.isFunction(defineProperties); assert.arity(defineProperties, 2); assert.name(defineProperties, 'defineProperties'); assert.looksNative(defineProperties); assert.nonEnumerable(Object, 'defineProperties'); assert.ok((rez = defineProperties(src = {}, { q: { value: 42 }, w: { value: 33 } })) === src); return assert.ok(rez.q === 42) && rez.w === 33; }); }).call(this); // Generated by LiveScript 1.4.0 (function(){ var module, test; module = QUnit.module, test = QUnit.test; module('ES6'); test('Object.defineProperty', function(assert){ var defineProperty, create, rez, src; defineProperty = Object.defineProperty, create = Object.create; assert.isFunction(defineProperty); assert.arity(defineProperty, 3); assert.name(defineProperty, 'defineProperty'); assert.looksNative(defineProperty); assert.nonEnumerable(Object, 'defineProperty'); assert.ok((rez = defineProperty(src = {}, 'q', { value: 42 })) === src); assert.ok(rez.q === 42); assert.throws(function(){ defineProperty(42, 1, {}); }); assert.throws(function(){ defineProperty({}, create(null), {}); }); return assert.throws(function(){ defineProperty({}, 1, 1); }); }); }).call(this); // Generated by LiveScript 1.4.0 (function(){ var module, test, toString$ = {}.toString; module = QUnit.module, test = QUnit.test; module('ES6'); test('Object.freeze', function(assert){ var freeze, isFrozen, keys, getOwnPropertyNames, i$, ref$, len$, value, key; freeze = Object.freeze, isFrozen = Object.isFrozen, keys = Object.keys, getOwnPropertyNames = Object.getOwnPropertyNames; assert.isFunction(freeze); assert.arity(freeze, 1); assert.name(freeze, 'freeze'); assert.looksNative(freeze); assert.nonEnumerable(Object, 'freeze'); for (i$ = 0, len$ = (ref$ = [42, 'foo', false, null, void 8, {}]).length; i$ < len$; ++i$) { value = ref$[i$]; assert.ok((fn$()), "accept " + toString$.call(value).slice(8, -1)); assert.same(freeze(value), value, "returns target on " + toString$.call(value).slice(8, -1)); } if (NATIVE) { assert.ok(isFrozen(freeze({}))); } assert.arrayEqual((function(){ var results$ = []; for (key in freeze({})) { results$.push(key); } return results$; }()), []); assert.arrayEqual(keys(freeze({})), []); assert.arrayEqual(getOwnPropertyNames(freeze({})), []); ((typeof Object != 'undefined' && Object !== null) && Object.getOwnPropertySymbols) && assert.arrayEqual(Object.getOwnPropertySymbols(freeze({})), []); ((typeof Reflect != 'undefined' && Reflect !== null) && Reflect.ownKeys) && assert.arrayEqual(Reflect.ownKeys(freeze({})), []); function fn$(){ try { freeze(value); return true; } catch (e$) {} } }); }).call(this); // Generated by LiveScript 1.4.0 (function(){ var module, test, toString$ = {}.toString; module = QUnit.module, test = QUnit.test; module('ES6'); test('Object.getOwnPropertyDescriptor', function(assert){ var getOwnPropertyDescriptor, i$, ref$, len$, value; getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor; assert.isFunction(getOwnPropertyDescriptor); assert.arity(getOwnPropertyDescriptor, 2); assert.name(getOwnPropertyDescriptor, 'getOwnPropertyDescriptor'); assert.looksNative(getOwnPropertyDescriptor); assert.nonEnumerable(Object, 'getOwnPropertyDescriptor'); assert.deepEqual(getOwnPropertyDescriptor({ q: 42 }, 'q'), { writable: true, enumerable: true, configurable: true, value: 42 }); assert.ok(getOwnPropertyDescriptor({}, 'toString') === void 8); for (i$ = 0, len$ = (ref$ = [42, 'foo', false]).length; i$ < len$; ++i$) { value = ref$[i$]; assert.ok((fn$()), "accept " + toString$.call(value).slice(8, -1)); } for (i$ = 0, len$ = (ref$ = [null, void 8]).length; i$ < len$; ++i$) { value = ref$[i$]; assert.throws(fn1$, TypeError, "throws on " + value); } function fn$(){ try { getOwnPropertyDescriptor(value); return true; } catch (e$) {} } function fn1$(){ getOwnPropertyDescriptor(value); } }); }).call(this); // Generated by LiveScript 1.4.0 (function(){ var module, test, toString$ = {}.toString; module = QUnit.module, test = QUnit.test; module('ES6'); test('Object.getOwnPropertyNames', function(assert){ var getOwnPropertyNames, fn1, fn2, names, i$, ref$, len$, value, iframe, w; getOwnPropertyNames = Object.getOwnPropertyNames, getOwnPropertyNames = Object.getOwnPropertyNames; assert.isFunction(getOwnPropertyNames); assert.arity(getOwnPropertyNames, 1); assert.name(getOwnPropertyNames, 'getOwnPropertyNames'); assert.looksNative(getOwnPropertyNames); assert.nonEnumerable(Object, 'getOwnPropertyNames'); fn1 = function(w){ this.w = w != null ? w : 2; }; fn2 = function(toString){ this.toString = toString != null ? toString : 2; }; fn1.prototype.q = fn2.prototype.q = 1; names = getOwnPropertyNames([1, 2, 3]); assert.strictEqual(names.length, 4); assert.ok(in$('0', names)); assert.ok(in$('1', names)); assert.ok(in$('2', names)); assert.ok(in$('length', names)); assert.deepEqual(getOwnPropertyNames(new fn1(1)), ['w']); assert.deepEqual(getOwnPropertyNames(new fn2(1)), ['toString']); assert.ok(in$('toString', getOwnPropertyNames(Array.prototype))); assert.ok(in$('toString', getOwnPropertyNames(Object.prototype))); assert.ok(in$('constructor', getOwnPropertyNames(Object.prototype))); for (i$ = 0, len$ = (ref$ = [42, 'foo', false]).length; i$ < len$; ++i$) { value = ref$[i$]; assert.ok((fn$()), "accept " + toString$.call(value).slice(8, -1)); } for (i$ = 0, len$ = (ref$ = [null, void 8]).length; i$ < len$; ++i$) { value = ref$[i$]; assert.throws(fn1$, TypeError, "throws on " + value); } if (typeof document != 'undefined' && document !== null) { assert.ok((function(){ try { iframe = document.createElement('iframe'); iframe.src = 'http://example.com'; document.documentElement.appendChild(iframe); w = iframe.contentWindow; document.documentElement.removeChild(iframe); return getOwnPropertyNames(w); } catch (e$) {} }()), 'IE11 bug with iframe and window'); } function fn$(){ try { getOwnPropertyNames(value); return true; } catch (e$) {} } function fn1$(){ getOwnPropertyNames(value); } }); function in$(x, xs){ var i = -1, l = xs.length >>> 0; while (++i < l) if (x === xs[i]) return true; return false; } }).call(this); // Generated by LiveScript 1.4.0 (function(){ var module, test, toString$ = {}.toString; module = QUnit.module, test = QUnit.test; module('ES6'); test('Object.getPrototypeOf', function(assert){ var create, getPrototypeOf, fn, obj, foo, bar, i$, ref$, len$, value; create = Object.create, getPrototypeOf = Object.getPrototypeOf; assert.isFunction(getPrototypeOf); assert.arity(getPrototypeOf, 1); assert.name(getPrototypeOf, 'getPrototypeOf'); assert.looksNative(getPrototypeOf); assert.nonEnumerable(Object, 'getPrototypeOf'); assert.ok(getPrototypeOf({}) === Object.prototype); assert.ok(getPrototypeOf([]) === Array.prototype); assert.ok(getPrototypeOf(new (fn = (function(){ fn.displayName = 'fn'; var prototype = fn.prototype, constructor = fn; function fn(){} return fn; }()))) === fn.prototype); assert.ok(getPrototypeOf(create(obj = { q: 1 })) === obj); assert.ok(getPrototypeOf(create(null)) === null); assert.ok(getPrototypeOf(getPrototypeOf({})) === null); foo = function(){}; foo.prototype.foo = 'foo'; bar = function(){}; bar.prototype = create(foo.prototype); bar.prototype.constructor = bar; assert.strictEqual(getPrototypeOf(bar.prototype).foo, 'foo'); for (i$ = 0, len$ = (ref$ = [42, 'foo', false]).length; i$ < len$; ++i$) { value = ref$[i$]; assert.ok((fn$()), "accept " + toString$.call(value).slice(8, -1)); } for (i$ = 0, len$ = (ref$ = [null, void 8]).length; i$ < len$; ++i$) { value = ref$[i$]; assert.throws(fn1$, TypeError, "throws on " + value); } assert.strictEqual(getPrototypeOf('foo'), String.prototype); function fn$(){ try { getPrototypeOf(value); return true; } catch (e$) {} } function fn1$(){ getPrototypeOf(value); } }); }).call(this); // Generated by LiveScript 1.4.0 (function(){ var module, test, toString$ = {}.toString; module = QUnit.module, test = QUnit.test; module('ES6'); test('Object.isExtensible', function(assert){ var preventExtensions, isExtensible, i$, ref$, len$, value; preventExtensions = Object.preventExtensions, isExtensible = Object.isExtensible; assert.isFunction(isExtensible); assert.arity(isExtensible, 1); assert.name(isExtensible, 'isExtensible'); assert.nonEnumerable(Object, 'isExtensible'); assert.looksNative(isExtensible); for (i$ = 0, len$ = (ref$ = [42, 'foo', false, null, void 8]).length; i$ < len$; ++i$) { value = ref$[i$]; assert.ok((fn$()), "accept " + toString$.call(value).slice(8, -1)); assert.same(isExtensible(value), false, "returns true on " + toString$.call(value).slice(8, -1)); } assert.same(isExtensible({}), true); if (NATIVE) { assert.ok(!isExtensible(preventExtensions({}))); } function fn$(){ try { isExtensible(value); return true; } catch (e$) {} } }); }).call(this); // Generated by LiveScript 1.4.0 (function(){ var module, test, toString$ = {}.toString; module = QUnit.module, test = QUnit.test; module('ES6'); test('Object.isFrozen', function(assert){ var freeze, isFrozen, i$, ref$, len$, value; freeze = Object.freeze, isFrozen = Object.isFrozen; assert.isFunction(isFrozen); assert.arity(isFrozen, 1); assert.name(isFrozen, 'isFrozen'); assert.looksNative(isFrozen); assert.nonEnumerable(Object, 'isFrozen'); for (i$ = 0, len$ = (ref$ = [42, 'foo', false, null, void 8]).length; i$ < len$; ++i$) { value = ref$[i$]; assert.ok((fn$()), "accept " + toString$.call(value).slice(8, -1)); assert.same(isFrozen(value), true, "returns true on " + toString$.call(value).slice(8, -1)); } assert.same(isFrozen({}), false); if (NATIVE) { assert.ok(isFrozen(freeze({}))); } function fn$(){ try { isFrozen(value); return true; } catch (e$) {} } }); }).call(this); // Generated by LiveScript 1.4.0 (function(){ var module, test, toString$ = {}.toString; module = QUnit.module, test = QUnit.test; module('ES6'); test('Object.isSealed', function(assert){ var seal, isSealed, i$, ref$, len$, value; seal = Object.seal, isSealed = Object.isSealed; assert.isFunction(isSealed); assert.arity(isSealed, 1); assert.name(isSealed, 'isSealed'); assert.looksNative(isSealed); assert.nonEnumerable(Object, 'isSealed'); for (i$ = 0, len$ = (ref$ = [42, 'foo', false, null, void 8]).length; i$ < len$; ++i$) { value = ref$[i$]; assert.ok((fn$()), "accept " + toString$.call(value).slice(8, -1)); assert.same(isSealed(value), true, "returns true on " + toString$.call(value).slice(8, -1)); } assert.same(isSealed({}), false); if (NATIVE) { assert.ok(isSealed(seal({}))); } function fn$(){ try { isSealed(value); return true; } catch (e$) {} } }); }).call(this); // Generated by LiveScript 1.4.0 (function(){ var module, test; module = QUnit.module, test = QUnit.test; module('ES6'); test('Object.is', function(assert){ var same; same = Object.is; assert.isFunction(same); assert.arity(same, 2); assert.name(same, 'is'); assert.looksNative(same); assert.nonEnumerable(Object, 'is'); assert.ok(same(1, 1), '1 is 1'); assert.ok(same(NaN, NaN), '1 is 1'); assert.ok(!same(0, -0), '0 isnt -0'); return assert.ok(!same({}, {}), '{} isnt {}'); }); }).call(this); // Generated by LiveScript 1.4.0 (function(){ var module, test, toString$ = {}.toString; module = QUnit.module, test = QUnit.test; module('ES6'); test('Object.keys', function(assert){ var keys, fn1, fn2, i$, ref$, len$, value; keys = Object.keys; assert.isFunction(keys); assert.arity(keys, 1); assert.name(keys, 'keys'); assert.looksNative(keys); assert.nonEnumerable(Object, 'keys'); fn1 = function(w){ this.w = w != null ? w : 2; }; fn2 = function(toString){ this.toString = toString != null ? toString : 2; }; fn1.prototype.q = fn2.prototype.q = 1; assert.deepEqual(keys([1, 2, 3]), ['0', '1', '2']); assert.deepEqual(keys(new fn1(1)), ['w']); assert.deepEqual(keys(new fn2(1)), ['toString']); assert.ok(!in$('push', keys(Array.prototype))); for (i$ = 0, len$ = (ref$ = [42, 'foo', false]).length; i$ < len$; ++i$) { value = ref$[i$]; assert.ok((fn$()), "accept " + toString$.call(value).slice(8, -1)); } for (i$ = 0, len$ = (ref$ = [null, void 8]).length; i$ < len$; ++i$) { value = ref$[i$]; assert.throws(fn1$, TypeError, "throws on " + value); } function fn$(){ try { keys(value); return true; } catch (e$) {} } function fn1$(){ keys(value); } }); function in$(x, xs){ var i = -1, l = xs.length >>> 0; while (++i < l) if (x === xs[i]) return true; return false; } }).call(this); // Generated by LiveScript 1.4.0 (function(){ var module, test, toString$ = {}.toString; module = QUnit.module, test = QUnit.test; module('ES6'); test('Object.preventExtensions', function(assert){ var preventExtensions, isExtensible, keys, getOwnPropertyNames, i$, ref$, len$, value, key; preventExtensions = Object.preventExtensions, isExtensible = Object.isExtensible, keys = Object.keys, getOwnPropertyNames = Object.getOwnPropertyNames; assert.isFunction(preventExtensions); assert.arity(preventExtensions, 1); assert.name(preventExtensions, 'preventExtensions'); assert.looksNative(preventExtensions); assert.nonEnumerable(Object, 'preventExtensions'); for (i$ = 0, len$ = (ref$ = [42, 'foo', false, null, void 8, {}]).length; i$ < len$; ++i$) { value = ref$[i$]; assert.ok((fn$()), "accept " + toString$.call(value).slice(8, -1)); assert.same(preventExtensions(value), value, "returns target on " + toString$.call(value).slice(8, -1)); } if (NATIVE) { assert.ok(isExtensible(preventExtensions({}))); } assert.arrayEqual((function(){ var results$ = []; for (key in preventExtensions({})) { results$.push(key); } return results$; }()), []); assert.arrayEqual(keys(preventExtensions({})), []); assert.arrayEqual(getOwnPropertyNames(preventExtensions({})), []); ((typeof Object != 'undefined' && Object !== null) && Object.getOwnPropertySymbols) && assert.arrayEqual(Object.getOwnPropertySymbols(preventExtensions({})), []); ((typeof Reflect != 'undefined' && Reflect !== null) && Reflect.ownKeys) && assert.arrayEqual(Reflect.ownKeys(preventExtensions({})), []); function fn$(){ try { preventExtensions(value); return true; } catch (e$) {} } }); }).call(this); // Generated by LiveScript 1.4.0 (function(){ var module, test, toString$ = {}.toString; module = QUnit.module, test = QUnit.test; module('ES6'); test('Object.seal', function(assert){ var seal, isSealed, keys, getOwnPropertyNames, i$, ref$, len$, value, key; seal = Object.seal, isSealed = Object.isSealed, keys = Object.keys, getOwnPropertyNames = Object.getOwnPropertyNames; assert.isFunction(seal); assert.arity(seal, 1); assert.name(seal, 'seal'); assert.looksNative(seal); assert.nonEnumerable(Object, 'seal'); for (i$ = 0, len$ = (ref$ = [42, 'foo', false, null, void 8, {}]).length; i$ < len$; ++i$) { value = ref$[i$]; assert.ok((fn$()), "accept " + toString$.call(value).slice(8, -1)); assert.same(seal(value), value, "returns target on " + toString$.call(value).slice(8, -1)); } if (NATIVE) { assert.ok(isSealed(seal({}))); } assert.arrayEqual((function(){ var results$ = []; for (key in seal({})) { results$.push(key); } return results$; }()), []); assert.arrayEqual(keys(seal({})), []); assert.arrayEqual(getOwnPropertyNames(seal({})), []); ((typeof Object != 'undefined' && Object !== null) && Object.getOwnPropertySymbols) && assert.arrayEqual(Object.getOwnPropertySymbols(seal({})), []); ((typeof Reflect != 'undefined' && Reflect !== null) && Reflect.ownKeys) && assert.arrayEqual(Reflect.ownKeys(seal({})), []); function fn$(){ try { seal(value); return true; } catch (e$) {} } }); }).call(this); // Generated by LiveScript 1.4.0 (function(){ var module, test; if (PROTO) { module = QUnit.module, test = QUnit.test; module('ES6'); test('Object.setPrototypeOf', function(assert){ var setPrototypeOf, tmp; setPrototypeOf = Object.setPrototypeOf; assert.isFunction(setPrototypeOf); assert.arity(setPrototypeOf, 2); assert.name(setPrototypeOf, 'setPrototypeOf'); assert.looksNative(setPrototypeOf); assert.nonEnumerable(Object, 'setPrototypeOf'); assert.ok('apply' in setPrototypeOf({}, Function.prototype), 'Parent properties in target'); assert.strictEqual(setPrototypeOf({ a: 2 }, { b: function(){ return Math.pow(this.a, 2); } }).b(), 4, 'Child and parent properties in target'); assert.strictEqual(setPrototypeOf(tmp = {}, { a: 1 }), tmp, 'setPrototypeOf return target'); return assert.ok(!('toString' in setPrototypeOf({}, null)), 'Can set null as prototype'); }); } }).call(this); // Generated by LiveScript 1.4.0 (function(){ var module, test; module = QUnit.module, test = QUnit.test; module('ES6'); test('Object#toString', function(assert){ var toString, i$, x$, ref$, len$, Constructor, Class; assert.arity(Object.prototype.toString, 0); assert.name(Object.prototype.toString, 'toString'); assert.looksNative(Object.prototype.toString); assert.nonEnumerable(Object.prototype, 'toString'); toString = Object.prototype.toString; if (STRICT) { assert.strictEqual(toString.call(null), '[object Null]', 'null -> `Null`'); assert.strictEqual(toString.call(void 8), '[object Undefined]', 'undefined -> `Undefined`'); } assert.strictEqual(toString.call(true), '[object Boolean]', 'bool -> `Boolean`'); assert.strictEqual(toString.call('string'), '[object String]', 'string -> `String`'); assert.strictEqual(toString.call(7), '[object Number]', 'number -> `Number`'); (typeof Symbol != 'undefined' && Symbol !== null) && assert.strictEqual(toString.call(Symbol()), '[object Symbol]', 'symbol -> `Symbol`'); assert.strictEqual(toString.call(new Boolean(false)), '[object Boolean]', 'new Boolean -> `Boolean`'); assert.strictEqual(toString.call(new String('')), '[object String]', 'new String -> `String`'); assert.strictEqual(toString.call(new Number(7)), '[object Number]', 'new Number -> `Number`'); assert.strictEqual('' + {}, '[object Object]', '{} -> `Object`'); assert.strictEqual(toString.call([]), '[object Array]', ' [] -> `Array`'); assert.strictEqual(toString.call(function(){}), '[object Function]', 'function -> `Function`'); assert.strictEqual(toString.call(/./), '[object RegExp]', 'regexp -> `RegExp`'); assert.strictEqual(toString.call(TypeError()), '[object Error]', 'new TypeError -> `Error`'); assert.strictEqual(toString.call(function(){ return arguments; }()), '[object Arguments]', 'arguments -> `Arguments`'); for (i$ = 0, len$ = (ref$ = ['Int8Array', 'Uint8Array', 'Uint8ClampedArray', 'Int16Array', 'Uint16Array', 'Int32Array', 'Uint32Array', 'Float32Array', 'Float64Array', 'ArrayBuffer']).length; i$ < len$; ++i$) { x$ = ref$[i$]; Constructor = global[x$]; if (Constructor) { assert.strictEqual(toString.call(new Constructor(1)), "[object " + x$ + "]", "new " + x$ + " -> `" + x$ + "`"); } } if (NATIVE && (typeof DataView != 'undefined' && DataView !== null)) { assert.strictEqual('' + new DataView(new ArrayBuffer(1)), '[object DataView]', 'new DataView -> `DataView`'); } if (typeof Set != 'undefined' && Set !== null) { assert.strictEqual('' + new Set, '[object Set]', 'set -> `Set`'); } if (typeof Map != 'undefined' && Map !== null) { assert.strictEqual('' + new Map, '[object Map]', 'map -> `Map`'); } if (typeof WeakSet != 'undefined' && WeakSet !== null) { assert.strictEqual('' + new WeakSet, '[object WeakSet]', 'weakset -> `WeakSet`'); } if (typeof WeakMap != 'undefined' && WeakMap !== null) { assert.strictEqual('' + new WeakMap, '[object WeakMap]', 'weakmap -> `WeakMap`'); } if (typeof Promise != 'undefined' && Promise !== null) { assert.strictEqual('' + new Promise(function(){}), '[object Promise]', 'promise -> `Promise`'); } if (''[typeof Symbol != 'undefined' && Symbol !== null ? Symbol.iterator : void 8]) { assert.strictEqual('' + ''[Symbol.iterator](), '[object String Iterator]', 'String Iterator -> `String Iterator`'); } if ([].entries) { assert.strictEqual('' + [].entries(), '[object Array Iterator]', 'Array Iterator -> `Array Iterator`'); } if ((typeof Set != 'undefined' && Set !== null) && Set.entries) { assert.strictEqual('' + new Set().entries(), '[object Set Iterator]', 'Set Iterator -> `Set Iterator`'); } if ((typeof Map != 'undefined' && Map !== null) && Map.entries) { assert.strictEqual('' + new Map().entries(), '[object Map Iterator]', 'Map Iterator -> `Map Iterator`'); } assert.strictEqual('' + Math, '[object Math]', 'Math -> `Math`'); if (typeof JSON != 'undefined' && JSON !== null) { assert.strictEqual(toString.call(JSON), '[object JSON]', 'JSON -> `JSON`'); } Class = (function(){ Class.displayName = 'Class'; var prototype = Class.prototype, constructor = Class; Class.prototype[typeof Symbol != 'undefined' && Symbol !== null ? Symbol.toStringTag : void 8] = 'Class'; function Class(){} return Class; }()); return assert.strictEqual('' + new Class, '[object Class]', 'user class instance -> [Symbol.toStringTag]'); }); }).call(this); // Generated by LiveScript 1.4.0 (function(){ var module, test; module = QUnit.module, test = QUnit.test; module('ES6'); test('parseFloat', function(assert){ var ws; assert.isFunction(parseFloat); assert.name(parseFloat, 'parseFloat'); assert.arity(parseFloat, 1); assert.looksNative(parseFloat); assert.same(parseFloat('0'), 0); assert.same(parseFloat(' 0'), 0); assert.same(parseFloat('+0'), 0); assert.same(parseFloat(' +0'), 0); assert.same(parseFloat('-0'), -0); assert.same(parseFloat(' -0'), -0); ws = '\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u180E\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF'; assert.same(parseFloat(ws + '+0'), 0); assert.same(parseFloat(ws + '-0'), -0); assert.same(parseFloat(null), NaN); assert.same(parseFloat(void 8), NaN); }); }).call(this); // Generated by LiveScript 1.4.0 (function(){ var module, test; module = QUnit.module, test = QUnit.test; module('ES6'); test('parseInt', function(assert){ var i$, r, x$, ref$, len$, ws, fakeZero; assert.isFunction(parseInt); assert.name(parseInt, 'parseInt'); assert.arity(parseInt, 2); assert.looksNative(parseInt); for (i$ = 2; i$ <= 36; ++i$) { r = i$; assert.same(parseInt('10', r), r, "radix " + r); } for (i$ = 0, len$ = (ref$ = ['01', '08', '10', '42']).length; i$ < len$; ++i$) { x$ = ref$[i$]; assert.same(parseInt(x$), parseInt(x$, 10), "default radix is 10: " + x$); } assert.same(parseInt('0x16'), parseInt('0x16', 16), "default radix is 16: 0x16"); ws = '\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u180E\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF'; assert.same(parseInt(' 0x16'), parseInt('0x16', 16), 'ignores leading whitespace #1'); assert.same(parseInt(' 42'), parseInt('42', 10), 'ignores leading whitespace #2'); assert.same(parseInt(' 08'), parseInt('08', 10), 'ignores leading whitespace #3'); assert.same(parseInt(ws + '08'), parseInt('08', 10), 'ignores leading whitespace #4'); assert.same(parseInt(ws + '0x16'), parseInt('0x16', 16), 'ignores leading whitespace #5'); fakeZero = { valueOf: function(){ return 0; } }; assert.same(parseInt('08', fakeZero), parseInt('08', 10), 'valueOf #1'); assert.same(parseInt('0x16', fakeZero), parseInt('0x16', 16), 'valueOf #2'); assert.same(parseInt('-0xF'), -15, 'signed hex #1'); assert.same(parseInt('-0xF', 16), -15, 'signed hex #2'); assert.same(parseInt('+0xF'), 15, 'signed hex #3'); assert.same(parseInt('+0xF', 16), 15, 'signed hex #4'); assert.same(parseInt('10', -4294967294), 2, 'radix uses ToUint32'); assert.same(parseInt(null), NaN); assert.same(parseInt(void 8), NaN); }); }).call(this); // Generated by LiveScript 1.4.0 (function(){ 'use strict'; var module, test; module = QUnit.module, test = QUnit.test; module('ES6'); test('Promise', function(assert){ assert.isFunction(Promise); assert.arity(Promise, 1); assert.name(Promise, 'Promise'); assert.looksNative(Promise); assert.throws(function(){ Promise(); }, 'throws w/o `new`'); new Promise(function(resolve, reject){ assert.isFunction(Promise, 'resolver is function'); assert.isFunction(Promise, 'rejector is function'); assert.same(this, function(){ return this; }(), 'correct executor context'); }); }); if (DESCRIPTORS) { test('Promise operations order', function(assert){ var expected, async, result, resolve, p, resolve2, p2; assert.expect(1); expected = 'DEHAFGBC'; async = assert.async(); result = ''; p = new Promise(function(r){ resolve = r; }); resolve({ then: function(){ result += 'A'; throw Error(); } }); p['catch'](function(){ result += 'B'; }); p['catch'](function(){ result += 'C'; assert.same(result, expected); async(); }); p2 = new Promise(function(r){ resolve2 = r; }); resolve2(Object.defineProperty({}, 'then', { get: function(){ result += 'D'; throw Error(); } })); result += 'E'; p2['catch'](function(){ result += 'F'; }); p2['catch'](function(){ result += 'G'; }); result += 'H'; setTimeout(function(){ if (~result.indexOf('C')) { assert.same(result, expected); } }, 1e3); }); } test('Promise#then', function(assert){ var promise, FakePromise1, FakePromise2; assert.isFunction(Promise.prototype.then); NATIVE && assert.arity(Promise.prototype.then, 2); assert.name(Promise.prototype.then, 'then'); assert.looksNative(Promise.prototype.then); assert.nonEnumerable(Promise.prototype, 'then'); promise = new Promise(function(it){ it(42); }); promise.constructor = FakePromise1 = function(it){ it(function(){}, function(){}); }; FakePromise1[typeof Symbol != 'undefined' && Symbol !== null ? Symbol.species : void 8] = FakePromise2 = function(it){ it(function(){}, function(){}); }; assert.ok(promise.then(function(){}) instanceof FakePromise2, 'subclassing, @@species pattern'); promise = new Promise(function(it){ it(42); }); promise.constructor = FakePromise1 = function(it){ it(function(){}, function(){}); }; assert.ok(promise.then(function(){}) instanceof Promise, 'subclassing, incorrect `this` pattern'); promise = new Promise(function(it){ it(42); }); promise.constructor = FakePromise1 = function(it){ it(function(){}, function(){}); }; FakePromise1[typeof Symbol != 'undefined' && Symbol !== null ? Symbol.species : void 8] = function(){}; assert.throws(function(){ promise.then(function(){}); }, 'NewPromiseCapability validations, #1'); FakePromise1[typeof Symbol != 'undefined' && Symbol !== null ? Symbol.species : void 8] = function(it){ it(null, function(){}); }; assert.throws(function(){ promise.then(function(){}); }, 'NewPromiseCapability validations, #2'); FakePromise1[typeof Symbol != 'undefined' && Symbol !== null ? Symbol.species : void 8] = function(it){ it(function(){}, null); }; assert.throws(function(){ promise.then(function(){}); }, 'NewPromiseCapability validations, #3'); }); test('Promise#catch', function(assert){ var promise, FakePromise1, FakePromise2; assert.isFunction(Promise.prototype['catch']); NATIVE && assert.arity(Promise.prototype['catch'], 1); NATIVE && assert.name(Promise.prototype['catch'], 'catch'); assert.looksNative(Promise.prototype['catch']); assert.nonEnumerable(Promise.prototype, 'catch'); promise = new Promise(function(it){ it(42); }); promise.constructor = FakePromise1 = function(it){ it(function(){}, function(){}); }; FakePromise1[typeof Symbol != 'undefined' && Symbol !== null ? Symbol.species : void 8] = FakePromise2 = function(it){ it(function(){}, function(){}); }; assert.ok(promise['catch'](function(){}) instanceof FakePromise2, 'subclassing, @@species pattern'); promise = new Promise(function(it){ it(42); }); promise.constructor = FakePromise1 = function(it){ it(function(){}, function(){}); }; assert.ok(promise['catch'](function(){}) instanceof Promise, 'subclassing, incorrect `this` pattern'); promise = new Promise(function(it){ it(42); }); promise.constructor = FakePromise1 = function(it){ it(function(){}, function(){}); }; FakePromise1[typeof Symbol != 'undefined' && Symbol !== null ? Symbol.species : void 8] = function(){}; assert.throws(function(){ promise['catch'](function(){}); }, 'NewPromiseCapability validations, #1'); FakePromise1[typeof Symbol != 'undefined' && Symbol !== null ? Symbol.species : void 8] = function(it){ it(null, function(){}); }; assert.throws(function(){ promise['catch'](function(){}); }, 'NewPromiseCapability validations, #2'); FakePromise1[typeof Symbol != 'undefined' && Symbol !== null ? Symbol.species : void 8] = function(it){ it(function(){}, null); }; assert.throws(function(){ promise['catch'](function(){}); }, 'NewPromiseCapability validations, #3'); assert.same(Promise.prototype['catch'].call({ then: function(x, y){ return y; } }, 42), 42, 'calling `.then`'); }); test('Promise#@@toStringTag', function(assert){ assert.ok(Promise.prototype[typeof Symbol != 'undefined' && Symbol !== null ? Symbol.toStringTag : void 8] === 'Promise', 'Promise::@@toStringTag is `Promise`'); }); test('Promise.all', function(assert){ var all, iter, a, done, resolve, FakePromise1, FakePromise2, FakePromise3; all = Promise.all; assert.isFunction(all); assert.arity(all, 1); assert.name(all, 'all'); assert.looksNative(all); assert.nonEnumerable(Promise, 'all'); iter = createIterable([1, 2, 3]); Promise.all(iter)['catch'](function(){}); assert.ok(iter.received, 'works with iterables: iterator received'); assert.ok(iter.called, 'works with iterables: next called'); a = []; done = false; a[typeof Symbol != 'undefined' && Symbol !== null ? Symbol.iterator : void 8] = function(){ done = true; return [][typeof Symbol != 'undefined' && Symbol !== null ? Symbol.iterator : void 8].call(this); }; Promise.all(a); assert.ok(done); assert.throws(function(){ all.call(null, [])['catch'](function(){}); }, TypeError, 'throws without context'); done = false; resolve = Promise.resolve; try { Promise.resolve = function(){ throw 42; }; Promise.all(createIterable([1, 2, 3], { 'return': function(){ done = true; } }))['catch'](function(){}); } catch (e$) {} Promise.resolve = resolve; assert.ok(done, 'iteration closing'); FakePromise1 = function(it){ it(function(){}, function(){}); }; FakePromise1[typeof Symbol != 'undefined' && Symbol !== null ? Symbol.species : void 8] = FakePromise2 = function(it){ it(function(){}, function(){}); }; FakePromise1.resolve = FakePromise2.resolve = bind$(Promise, 'resolve'); assert.ok(all.call(FakePromise1, [1, 2, 3]) instanceof FakePromise1, 'subclassing, `this` pattern'); FakePromise1 = function(){}; FakePromise2 = function(it){ it(null, function(){}); }; FakePromise3 = function(it){ it(function(){}, null); }; FakePromise1.resolve = FakePromise2.resolve = FakePromise3.resolve = bind$(Promise, 'resolve'); assert.throws(function(){ all.call(FakePromise1, [1, 2, 3]); }, 'NewPromiseCapability validations, #1'); assert.throws(function(){ all.call(FakePromise2, [1, 2, 3]); }, 'NewPromiseCapability validations, #2'); assert.throws(function(){ all.call(FakePromise3, [1, 2, 3]); }, 'NewPromiseCapability validations, #3'); }); test('Promise.race', function(assert){ var race, iter, a, done, resolve, FakePromise1, FakePromise2, FakePromise3; race = Promise.race; assert.isFunction(race); assert.arity(race, 1); assert.name(race, 'race'); assert.looksNative(race); assert.nonEnumerable(Promise, 'race'); iter = createIterable([1, 2, 3]); Promise.race(iter)['catch'](function(){}); assert.ok(iter.received, 'works with iterables: iterator received'); assert.ok(iter.called, 'works with iterables: next called'); a = []; done = false; a[typeof Symbol != 'undefined' && Symbol !== null ? Symbol.iterator : void 8] = function(){ done = true; return [][typeof Symbol != 'undefined' && Symbol !== null ? Symbol.iterator : void 8].call(this); }; Promise.race(a); assert.ok(done); assert.throws(function(){ race.call(null, [])['catch'](function(){}); }, TypeError, 'throws without context'); done = false; resolve = Promise.resolve; try { Promise.resolve = function(){ throw 42; }; Promise.race(createIterable([1, 2, 3], { 'return': function(){ done = true; } }))['catch'](function(){}); } catch (e$) {} Promise.resolve = resolve; assert.ok(done, 'iteration closing'); FakePromise1 = function(it){ it(function(){}, function(){}); }; FakePromise1[typeof Symbol != 'undefined' && Symbol !== null ? Symbol.species : void 8] = FakePromise2 = function(it){ it(function(){}, function(){}); }; FakePromise1.resolve = FakePromise2.resolve = bind$(Promise, 'resolve'); assert.ok(race.call(FakePromise1, [1, 2, 3]) instanceof FakePromise1, 'subclassing, `this` pattern'); FakePromise1 = function(){}; FakePromise2 = function(it){ it(null, function(){}); }; FakePromise3 = function(it){ it(function(){}, null); }; FakePromise1.resolve = FakePromise2.resolve = FakePromise3.resolve = bind$(Promise, 'resolve'); assert.throws(function(){ race.call(FakePromise1, [1, 2, 3]); }, 'NewPromiseCapability validations, #1'); assert.throws(function(){ race.call(FakePromise2, [1, 2, 3]); }, 'NewPromiseCapability validations, #2'); assert.throws(function(){ race.call(FakePromise3, [1, 2, 3]); }, 'NewPromiseCapability validations, #3'); }); test('Promise.resolve', function(assert){ var resolve, FakePromise1, FakePromise2; resolve = Promise.resolve; assert.isFunction(resolve); NATIVE && assert.arity(resolve, 1); assert.name(resolve, 'resolve'); assert.looksNative(resolve); assert.nonEnumerable(Promise, 'resolve'); assert.throws(function(){ resolve.call(null, 1)['catch'](function(){}); }, TypeError, 'throws without context'); FakePromise1 = function(it){ it(function(){}, function(){}); }; FakePromise1[typeof Symbol != 'undefined' && Symbol !== null ? Symbol.species : void 8] = FakePromise2 = function(it){ it(function(){}, function(){}); }; assert.ok(resolve.call(FakePromise1, 42) instanceof FakePromise1, 'subclassing, `this` pattern'); assert.throws(function(){ resolve.call(function(){}, 42); }, 'NewPromiseCapability validations, #1'); assert.throws(function(){ resolve.call(function(it){ it(null, function(){}); }, 42); }, 'NewPromiseCapability validations, #2'); assert.throws(function(){ resolve.call(function(it){ it(function(){}, null); }, 42); }, 'NewPromiseCapability validations, #3'); }); test('Promise.reject', function(assert){ var reject, FakePromise1, FakePromise2; reject = Promise.reject; assert.isFunction(reject); NATIVE && assert.arity(reject, 1); assert.name(reject, 'reject'); assert.looksNative(reject); assert.nonEnumerable(Promise, 'reject'); assert.throws(function(){ reject.call(null, 1)['catch'](function(){}); }, TypeError, 'throws without context'); FakePromise1 = function(it){ it(function(){}, function(){}); }; FakePromise1[typeof Symbol != 'undefined' && Symbol !== null ? Symbol.species : void 8] = FakePromise2 = function(it){ it(function(){}, function(){}); }; assert.ok(reject.call(FakePromise1, 42) instanceof FakePromise1, 'subclassing, `this` pattern'); assert.throws(function(){ reject.call(function(){}, 42); }, 'NewPromiseCapability validations, #1'); assert.throws(function(){ reject.call(function(it){ it(null, function(){}); }, 42); }, 'NewPromiseCapability validations, #2'); assert.throws(function(){ reject.call(function(it){ it(function(){}, null); }, 42); }, 'NewPromiseCapability validations, #3'); }); if (PROTO) { test('Promise subclassing', function(assert){ var SubPromise, p1, p2, p3; SubPromise = function(it){ var self; self = new Promise(it); Object.setPrototypeOf(self, SubPromise.prototype); self.mine = 'subclass'; return self; }; Object.setPrototypeOf(SubPromise, Promise); SubPromise.prototype = Object.create(Promise.prototype); SubPromise.prototype.constructor = SubPromise; p1 = SubPromise.resolve(5); assert.strictEqual(p1.mine, 'subclass'); p1 = p1.then(function(it){ return assert.strictEqual(it, 5); }); assert.strictEqual(p1.mine, 'subclass'); p2 = new SubPromise(function(it){ return it(6); }); assert.strictEqual(p2.mine, 'subclass'); p2 = p2.then(function(it){ return assert.strictEqual(it, 6); }); assert.strictEqual(p2.mine, 'subclass'); p3 = SubPromise.all([p1, p2]); assert.strictEqual(p3.mine, 'subclass'); assert.ok(p3 instanceof Promise); assert.ok(p3 instanceof SubPromise); p3.then(assert.async(), function(it){ return assert.ok(it, false); }); }); } test('Unhandled rejection tracking', function(assert){ var done, start, onunhandledrejection, onrejectionhandled, $promise; done = false; start = assert.async(); if (typeof process != 'undefined' && process !== null) { assert.expect(3); process.on('unhandledRejection', onunhandledrejection = function(reason, promise){ process.removeListener('unhandledRejection', onunhandledrejection); assert.same(promise, $promise, 'unhandledRejection, promise'); assert.same(reason, 42, 'unhandledRejection, reason'); $promise['catch'](function(){}); }); process.on('rejectionHandled', onrejectionhandled = function(promise){ process.removeListener('rejectionHandled', onrejectionhandled); assert.same(promise, $promise, 'rejectionHandled, promise'); done || start(); done = true; }); } else { assert.expect(4); global.onunhandledrejection = function(it){ assert.same(it.promise, $promise, 'onunhandledrejection, promise'); assert.same(it.reason, 42, 'onunhandledrejection, reason'); setTimeout(function(){ $promise['catch'](function(){}); }, 1); global.onunhandledrejection = null; }; global.onrejectionhandled = function(it){ assert.same(it.promise, $promise, 'onrejectionhandled, promise'); assert.same(it.reason, 42, 'onrejectionhandled, reason'); global.onrejectionhandled = null; done || start(); done = true; }; } Promise.reject(43)['catch'](function(){}); $promise = Promise.reject(42); setTimeout(function(){ done || start(); done = true; }, 3e3); }); function bind$(obj, key, target){ return function(){ return (target || obj)[key].apply(obj, arguments) }; } }).call(this); // Generated by LiveScript 1.4.0 (function(){ var module, test; module = QUnit.module, test = QUnit.test; module('ES6'); test('Reflect.apply', function(assert){ var apply, C; apply = Reflect.apply; assert.isFunction(apply); assert.arity(apply, 3); assert.name(apply, 'apply'); assert.looksNative(apply); assert.nonEnumerable(Reflect, 'apply'); assert.strictEqual(apply(Array.prototype.push, [1, 2], [3, 4, 5]), 5); C = function(a, b, c){ return a + b + c; }; C.apply = 42; assert.strictEqual(apply(C, null, ['foo', 'bar', 'baz']), 'foobarbaz', 'works with redefined apply'); assert.throws(function(){ apply(42, null, []); }, TypeError, 'throws on primitive as first argument'); assert.throws(function(){ apply(function(){}, null); }, TypeError, 'throws without third argument'); assert.throws(function(){ apply(function(){}, null, '123'); }, TypeError, 'throws on primitive as third argument'); }); }).call(this); // Generated by LiveScript 1.4.0 (function(){ var module, test, getPrototypeOf; module = QUnit.module, test = QUnit.test; module('ES6'); getPrototypeOf = Object.getPrototypeOf; test('Reflect.construct', function(assert){ var construct, C, inst, f, e; construct = Reflect.construct; assert.isFunction(construct); assert.arity(construct, 2); assert.name(construct, 'construct'); assert.looksNative(construct); assert.nonEnumerable(Reflect, 'construct'); C = function(a, b, c){ return this.qux = a + b + c; }; assert.strictEqual(construct(C, ['foo', 'bar', 'baz']).qux, 'foobarbaz', 'basic'); C.apply = 42; assert.strictEqual(construct(C, ['foo', 'bar', 'baz']).qux, 'foobarbaz', 'works with redefined apply'); inst = construct(function(){ this.x = 42; }, [], Array); assert.strictEqual(inst.x, 42, 'constructor with newTarget'); assert.ok(inst instanceof Array, 'prototype with newTarget'); assert.throws(function(){ construct(42, []); }, TypeError, 'throws on primitive'); f = function(){}; f.prototype = 42; assert.ok((function(){ try { return getPrototypeOf(construct(f, [])) === Object.prototype; } catch (e$) { e = e$; return false; } }())); assert.same(typeof (function(){ try { return construct(Date, []).getTime(); } catch (e$) {} }()), 'number', 'works with native constructors with 2 arguments'); assert.throws(function(){ construct(function(){}); }, 'throws when the second argument is not an object'); }); }).call(this); // Generated by LiveScript 1.4.0 (function(){ var module, test, defineProperty, getOwnPropertyDescriptor; module = QUnit.module, test = QUnit.test; module('ES6'); defineProperty = Object.defineProperty, getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor; test('Reflect.defineProperty', function(assert){ var defineProperty, create, O; defineProperty = Reflect.defineProperty; create = Reflect.create; assert.isFunction(defineProperty); assert.arity(defineProperty, 3); assert.name(defineProperty, 'defineProperty'); assert.looksNative(defineProperty); assert.nonEnumerable(Reflect, 'defineProperty'); O = {}; assert.strictEqual(defineProperty(O, 'foo', { value: 123 }), true); assert.strictEqual(O.foo, 123); if (DESCRIPTORS) { O = {}; defineProperty(O, 'foo', { value: 123, enumerable: true }); assert.deepEqual(getOwnPropertyDescriptor(O, 'foo'), { value: 123, enumerable: true, configurable: false, writable: false }); assert.strictEqual(defineProperty(O, 'foo', { value: 42 }), false); } assert.throws(function(){ defineProperty(42, 'foo', { value: 42 }); }, TypeError, 'throws on primitive'); assert.throws(function(){ defineProperty(42, 1, {}); }); assert.throws(function(){ defineProperty({}, create(null), {}); }); assert.throws(function(){ defineProperty({}, 1, 1); }); }); }).call(this); // Generated by LiveScript 1.4.0 (function(){ var module, test, defineProperty; module = QUnit.module, test = QUnit.test; module('ES6'); defineProperty = Object.defineProperty; test('Reflect.deleteProperty', function(assert){ var deleteProperty, O; deleteProperty = Reflect.deleteProperty; assert.isFunction(deleteProperty); assert.arity(deleteProperty, 2); assert.name(deleteProperty, 'deleteProperty'); assert.looksNative(deleteProperty); assert.nonEnumerable(Reflect, 'deleteProperty'); O = { bar: 456 }; assert.strictEqual(deleteProperty(O, 'bar'), true); assert.ok(!in$('bar', O)); if (DESCRIPTORS) { assert.strictEqual(deleteProperty(defineProperty({}, 'foo', { value: 42 }), 'foo'), false); } return assert.throws(function(){ return deleteProperty(42, 'foo'); }, TypeError, 'throws on primitive'); }); function in$(x, xs){ var i = -1, l = xs.length >>> 0; while (++i < l) if (x === xs[i]) return true; return false; } }).call(this); // Generated by LiveScript 1.4.0 (function(){ var module, test, defineProperty, from; module = QUnit.module, test = QUnit.test; module('ES6'); defineProperty = Object.defineProperty; from = Array.from; test('Reflect.enumerate', function(assert){ var enumerate, iterator, obj, i, ref$; enumerate = Reflect.enumerate; iterator = Symbol.iterator; assert.isFunction(enumerate); assert.arity(enumerate, 1); assert.name(enumerate, 'enumerate'); assert.looksNative(enumerate); assert.nonEnumerable(Reflect, 'enumerate'); obj = { foo: 1, bar: 2 }; i = enumerate(obj); assert.isIterable(i); assert.deepEqual(from(i), ['foo', 'bar'], 'bisic'); obj = { q: 1, w: 2, e: 3 }; i = enumerate(obj); delete obj.w; assert.deepEqual(from(i), ['q', 'e'], 'ignore holes'); obj = (ref$ = clone$({ q: 1, w: 2, e: 3 }), ref$.a = 4, ref$.s = 5, ref$.d = 6, ref$); assert.deepEqual(from(enumerate(obj)).sort(), ['a', 'd', 'e', 'q', 's', 'w'], 'works with prototype'); return assert.throws(function(){ return enumerate(42); }, TypeError, 'throws on primitive'); }); function clone$(it){ function fun(){} fun.prototype = it; return new fun; } }).call(this); // Generated by LiveScript 1.4.0 (function(){ var module, test; module = QUnit.module, test = QUnit.test; module('ES6'); test('Reflect.getOwnPropertyDescriptor', function(assert){ var getOwnPropertyDescriptor, obj, desc; getOwnPropertyDescriptor = Reflect.getOwnPropertyDescriptor; assert.isFunction(getOwnPropertyDescriptor); assert.arity(getOwnPropertyDescriptor, 2); assert.name(getOwnPropertyDescriptor, 'getOwnPropertyDescriptor'); assert.looksNative(getOwnPropertyDescriptor); assert.nonEnumerable(Reflect, 'getOwnPropertyDescriptor'); obj = { baz: 789 }; desc = getOwnPropertyDescriptor(obj, 'baz'); assert.strictEqual(desc.value, 789); return assert.throws(function(){ return getOwnPropertyDescriptor(42, 'constructor'); }, TypeError, 'throws on primitive'); }); }).call(this); // Generated by LiveScript 1.4.0 (function(){ var module, test; module = QUnit.module, test = QUnit.test; module('ES6'); test('Reflect.getPrototypeOf', function(assert){ var getPrototypeOf; getPrototypeOf = Reflect.getPrototypeOf; assert.isFunction(getPrototypeOf); assert.arity(getPrototypeOf, 1); assert.name(getPrototypeOf, 'getPrototypeOf'); assert.looksNative(getPrototypeOf); assert.nonEnumerable(Reflect, 'getPrototypeOf'); assert.strictEqual(getPrototypeOf([]), Array.prototype); return assert.throws(function(){ return getPrototypeOf(42); }, TypeError, 'throws on primitive'); }); }).call(this); // Generated by LiveScript 1.4.0 (function(){ var module, test, defineProperty, create; module = QUnit.module, test = QUnit.test; module('ES6'); defineProperty = Object.defineProperty, create = Object.create; test('Reflect.get', function(assert){ var get, target, receiver; get = Reflect.get; assert.isFunction(get); NATIVE && assert.arity(get, 2); assert.name(get, 'get'); assert.looksNative(get); assert.nonEnumerable(Reflect, 'get'); assert.strictEqual(get({ qux: 987 }, 'qux'), 987); if (DESCRIPTORS) { target = create(defineProperty({ z: 3 }, 'w', { get: function(){ return this; } }), { x: { value: 1 }, y: { get: function(){ return this; } } }); receiver = {}; assert.strictEqual(get(target, 'x', receiver), 1, 'get x'); assert.strictEqual(get(target, 'y', receiver), receiver, 'get y'); assert.strictEqual(get(target, 'z', receiver), 3, 'get z'); assert.strictEqual(get(target, 'w', receiver), receiver, 'get w'); assert.strictEqual(get(target, 'u', receiver), void 8, 'get u'); } return assert.throws(function(){ return get(42, 'constructor'); }, TypeError, 'throws on primitive'); }); }).call(this); // Generated by LiveScript 1.4.0 (function(){ var module, test; module = QUnit.module, test = QUnit.test; module('ES6'); test('Reflect.has', function(assert){ var has, O; has = Reflect.has; assert.isFunction(has); assert.arity(has, 2); assert.name(has, 'has'); assert.looksNative(has); assert.nonEnumerable(Reflect, 'has'); O = { qux: 987 }; assert.strictEqual(has(O, 'qux'), true); assert.strictEqual(has(O, 'qwe'), false); assert.strictEqual(has(O, 'toString'), true); return assert.throws(function(){ return has(42, 'constructor'); }, TypeError, 'throws on primitive'); }); }).call(this); // Generated by LiveScript 1.4.0 (function(){ var module, test, defineProperty, preventExtensions; module = QUnit.module, test = QUnit.test; module('ES6'); defineProperty = Object.defineProperty, preventExtensions = Object.preventExtensions; test('Reflect.isExtensible', function(assert){ var isExtensible; isExtensible = Reflect.isExtensible; assert.isFunction(isExtensible); assert.arity(isExtensible, 1); assert.name(isExtensible, 'isExtensible'); assert.looksNative(isExtensible); assert.nonEnumerable(Reflect, 'isExtensible'); assert.ok(isExtensible({})); if (DESCRIPTORS) { assert.ok(!isExtensible(preventExtensions({}))); } return assert.throws(function(){ return isExtensible(42); }, TypeError, 'throws on primitive'); }); }).call(this); // Generated by LiveScript 1.4.0 (function(){ var module, test, defineProperty; module = QUnit.module, test = QUnit.test; module('ES6'); defineProperty = Object.defineProperty; test('Reflect.ownKeys', function(assert){ var ownKeys, sym, O1, keys, O2; ownKeys = Reflect.ownKeys; sym = Symbol('c'); assert.isFunction(ownKeys); assert.arity(ownKeys, 1); assert.name(ownKeys, 'ownKeys'); assert.looksNative(ownKeys); assert.nonEnumerable(Reflect, 'ownKeys'); O1 = { a: 1 }; defineProperty(O1, 'b', { value: 2 }); O1[sym] = 3; keys = ownKeys(O1); assert.strictEqual(keys.length, 3, 'ownKeys return all own keys'); assert.ok(in$('a', keys), 'ownKeys return all own keys: simple'); assert.ok(in$('b', keys), 'ownKeys return all own keys: hidden'); assert.strictEqual(O1[keys[2]], 3, 'ownKeys return all own keys: symbol'); O2 = clone$(O1); keys = ownKeys(O2); assert.strictEqual(keys.length, 0, 'ownKeys return only own keys'); return assert.throws(function(){ return ownKeys(42); }, TypeError, 'throws on primitive'); }); function in$(x, xs){ var i = -1, l = xs.length >>> 0; while (++i < l) if (x === xs[i]) return true; return false; } function clone$(it){ function fun(){} fun.prototype = it; return new fun; } }).call(this); // Generated by LiveScript 1.4.0 (function(){ var module, test, defineProperty, isExtensible; module = QUnit.module, test = QUnit.test; module('ES6'); defineProperty = Object.defineProperty, isExtensible = Object.isExtensible; test('Reflect.preventExtensions', function(assert){ var preventExtensions, obj; preventExtensions = Reflect.preventExtensions; assert.isFunction(preventExtensions); assert.arity(preventExtensions, 1); assert.name(preventExtensions, 'preventExtensions'); assert.looksNative(preventExtensions); assert.nonEnumerable(Reflect, 'preventExtensions'); obj = {}; assert.ok(preventExtensions(obj), true); if (DESCRIPTORS) { assert.ok(!isExtensible(obj)); } return assert.throws(function(){ return preventExtensions(42); }, TypeError, 'throws on primitive'); }); }).call(this); // Generated by LiveScript 1.4.0 (function(){ var module, test; if (PROTO) { module = QUnit.module, test = QUnit.test; module('ES6'); test('Reflect.setPrototypeOf', function(assert){ var setPrototypeOf, obj, o; setPrototypeOf = Reflect.setPrototypeOf; assert.isFunction(setPrototypeOf); NATIVE && assert.arity(setPrototypeOf, 2); assert.name(setPrototypeOf, 'setPrototypeOf'); assert.looksNative(setPrototypeOf); assert.nonEnumerable(Reflect, 'setPrototypeOf'); obj = {}; assert.ok(setPrototypeOf(obj, Array.prototype), true); assert.ok(obj instanceof Array); assert.throws(function(){ return setPrototypeOf({}, 42); }, TypeError); assert.throws(function(){ return setPrototypeOf(42, {}); }, TypeError, 'throws on primitive'); return assert.ok(setPrototypeOf(o = {}, o) === false, 'false on recursive __proto__'); }); } }).call(this); // Generated by LiveScript 1.4.0 (function(){ var module, test, defineProperty, getOwnPropertyDescriptor, create; module = QUnit.module, test = QUnit.test; module('ES6'); defineProperty = Object.defineProperty, getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor, create = Object.create; test('Reflect.set', function(assert){ var set, obj, target, receiver, out; set = Reflect.set; assert.isFunction(set); NATIVE && assert.arity(set, 3); assert.name(set, 'set'); assert.looksNative(set); assert.nonEnumerable(Reflect, 'set'); obj = {}; assert.ok(set(obj, 'quux', 654), true); assert.strictEqual(obj.quux, 654); target = {}; receiver = {}; set(target, 'foo', 1, receiver); assert.strictEqual(target.foo, void 8, 'target.foo === undefined'); assert.strictEqual(receiver.foo, 1, 'receiver.foo === 1'); if (DESCRIPTORS) { defineProperty(receiver, 'bar', { value: 0, writable: true, enumerable: false, configurable: true }); set(target, 'bar', 1, receiver); assert.strictEqual(receiver.bar, 1, 'receiver.bar === 1'); assert.strictEqual(getOwnPropertyDescriptor(receiver, 'bar').enumerable, false, 'enumerability not overridden'); target = create(defineProperty({ z: 3 }, 'w', { set: function(){ out = this; } }), { x: { value: 1, writable: true, configurable: true }, y: { set: function(){ out = this; } }, c: { value: 1, writable: false, configurable: false } }); assert.strictEqual(set(target, 'x', 2, target), true, 'set x'); assert.strictEqual(target.x, 2, 'set x'); out = null; assert.strictEqual(set(target, 'y', 2, target), true, 'set y'); assert.strictEqual(out, target, 'set y'); assert.strictEqual(set(target, 'z', 4, target), true); assert.strictEqual(target.z, 4, 'set z'); out = null; assert.strictEqual(set(target, 'w', 1, target), true, 'set w'); assert.strictEqual(out, target, 'set w'); assert.strictEqual(set(target, 'u', 0, target), true, 'set u'); assert.strictEqual(target.u, 0, 'set u'); assert.strictEqual(set(target, 'c', 2, target), false, 'set c'); assert.strictEqual(target.c, 1, 'set c'); } return assert.throws(function(){ return set(42, 'q', 42); }, TypeError, 'throws on primitive'); }); }).call(this); // Generated by LiveScript 1.4.0 (function(){ var module, test, toString$ = {}.toString; module = QUnit.module, test = QUnit.test; module('ES6'); if (DESCRIPTORS) { test('RegExp constructor', function(assert){ var re, O, i$, len$, index, val, C; assert.isFunction(RegExp); assert.arity(RegExp, 2); assert.name(RegExp, 'RegExp'); assert.looksNative(RegExp); assert.strictEqual(toString$.call(RegExp()).slice(8, -1), 'RegExp'); assert.strictEqual(toString$.call(new RegExp()).slice(8, -1), 'RegExp'); re = /a/g; assert.notStrictEqual(re, new RegExp(re), 'new RegExp(re) isnt re'); assert.strictEqual(re, RegExp(re), 'RegExp(re) is re'); re[typeof Symbol != 'undefined' && Symbol !== null ? Symbol.match : void 8] = false; assert.notStrictEqual(re, RegExp(re), 'RegExp(re) isnt re, changed Symbol.match'); O = {}; assert.notStrictEqual(O, RegExp(O), 'RegExp(O) isnt O'); O[typeof Symbol != 'undefined' && Symbol !== null ? Symbol.match : void 8] = true; O.constructor = RegExp; assert.strictEqual(O, RegExp(O), 'RegExp(O) is O, changed Symbol.match'); assert.strictEqual(String(re), '/a/g', 'b is /a/g'); assert.strictEqual(String(new RegExp(/a/g, 'mi')), '/a/im', 'Allows a regex with flags'); assert.ok(new RegExp(/a/g, 'im') instanceof RegExp, 'Works with instanceof'); assert.strictEqual(new RegExp(/a/g, 'im').constructor, RegExp, 'Has the right constructor'); /(b)(c)(d)(e)(f)(g)(h)(i)(j)(k)(l)(m)(n)(o)(p)/.exec('abcdefghijklmnopq'); for (i$ = 0, len$ = 'bcdefghij'.length; i$ < len$; ++i$) { index = i$; val = 'bcdefghij'[i$]; assert.strictEqual(RegExp["$" + (index + 1)], val, "Updates RegExp globals $" + (index + 1)); } if (nativeSubclass) { C = nativeSubclass(RegExp); assert.ok(new C instanceof C, 'correct subclassing with native classes #1'); assert.ok(new C instanceof RegExp, 'correct subclassing with native classes #2'); assert.ok(new C('^abc$').test('abc'), 'correct subclassing with native classes #3'); } }); } }).call(this); // Generated by LiveScript 1.4.0 (function(){ var module, test; module = QUnit.module, test = QUnit.test; module('ES6'); if (DESCRIPTORS) { test('RegExp#flags', function(assert){ assert.nonEnumerable(RegExp.prototype, 'flags'); assert.strictEqual(/./g.flags, 'g', '/./g.flags is "g"'); assert.strictEqual(/./.flags, '', '/./.flags is ""'); assert.strictEqual(RegExp('.', 'gim').flags, 'gim', 'RegExp(".", "gim").flags is "gim"'); assert.strictEqual(RegExp('.').flags, '', 'RegExp(".").flags is ""'); assert.strictEqual(/./gim.flags, 'gim', '/./gim.flags is "gim"'); assert.strictEqual(/./gmi.flags, 'gim', '/./gmi.flags is "gim"'); assert.strictEqual(/./mig.flags, 'gim', '/./mig.flags is "gim"'); return assert.strictEqual(/./mgi.flags, 'gim', '/./mgi.flags is "gim"'); }); } }).call(this); // Generated by LiveScript 1.4.0 (function(){ var module, test; module = QUnit.module, test = QUnit.test; module('ES6'); test('String#match regression', function(assert){ var instance, matched, expected, obj, str, x, e, reg, string, matches, i$, len$, i, re, num; assert.isFunction(''.match); assert.arity(''.match, 1); assert.name(''.match, 'match'); assert.looksNative(''.match); assert.nonEnumerable(String.prototype, 'match'); instance = Object(true); instance.match = String.prototype.match; assert.strictEqual(instance.match(true)[0], 'true', 'S15.5.4.10_A1_T1'); instance = Object(false); instance.match = String.prototype.match; assert.strictEqual(instance.match(function(){ return false; }())[0], 'false', 'S15.5.4.10_A1_T2'); matched = ''.match(); expected = RegExp().exec(''); assert.strictEqual(matched.length, expected.length, 'S15.5.4.10_A1_T4 #1'); assert.strictEqual(matched.index, expected.index, 'S15.5.4.10_A1_T4 #2'); assert.strictEqual(matched.input, expected.input, 'S15.5.4.10_A1_T4 #3'); assert.strictEqual('gnulluna'.match(null)[0], 'null', 'S15.5.4.10_A1_T5'); matched = Object('undefined').match(x); expected = RegExp(x).exec('undefined'); assert.strictEqual(matched.length, expected.length, 'S15.5.4.10_A1_T6 #1'); assert.strictEqual(matched.index, expected.index, 'S15.5.4.10_A1_T6 #2'); assert.strictEqual(matched.input, expected.input, 'S15.5.4.10_A1_T6 #3'); matched = String('undefined').match(undefined); expected = RegExp(undefined).exec('undefined'); assert.strictEqual(matched.length, expected.length, 'S15.5.4.10_A1_T7 #1'); assert.strictEqual(matched.index, expected.index, 'S15.5.4.10_A1_T7 #2'); assert.strictEqual(matched.input, expected.input, 'S15.5.4.10_A1_T7 #3'); obj = { toString: function(){} }; matched = String(obj).match(void 8); expected = RegExp(void 8).exec('undefined'); assert.strictEqual(matched.length, expected.length, 'S15.5.4.10_A1_T8 #1'); assert.strictEqual(matched.index, expected.index, 'S15.5.4.10_A1_T8 #2'); assert.strictEqual(matched.input, expected.input, 'S15.5.4.10_A1_T8 #3'); obj = { toString: function(){ return '\u0041B'; } }; str = 'ABB\u0041BABAB'; assert.strictEqual(str.match(obj)[0], 'AB', 'S15.5.4.10_A1_T10'); obj = { toString: function(){ throw 'intostr'; } }; str = 'ABB\u0041BABAB'; try { x = str.match(obj); assert.ok(false, 'S15.5.4.10_A1_T11 #1 lead to throwing exception'); } catch (e$) { e = e$; assert.strictEqual(e, 'intostr', 'S15.5.4.10_A1_T11 #1.1: Exception === "intostr". Actual: ' + e); } obj = { toString: function(){ return {}; }, valueOf: function(){ throw 'intostr'; } }; str = 'ABB\u0041BABAB'; try { x = str.match(obj); assert.ok(false, 'S15.5.4.10_A1_T12 #1 lead to throwing exception'); } catch (e$) { e = e$; assert.strictEqual(e, 'intostr', 'S15.5.4.10_A1_T12 #1.1: Exception === "intostr". Actual: ' + e); } obj = { toString: function(){ return {}; }, valueOf: function(){ return 1; } }; assert.strictEqual('ABB\u0041B\u0031ABAB\u0031BBAA'.match(obj)[0], '1', 'S15.5.4.10_A1_T13 #1'); assert.strictEqual('ABB\u0041B\u0031ABAB\u0031BBAA'.match(obj).length, 1, 'S15.5.4.10_A1_T13 #2'); reg = RegExp('77'); assert.strictEqual('ABB\u0041BABAB\u0037\u0037BBAA'.match(reg)[0], '77', 'S15.5.4.10_A1_T14'); string = '1234567890'; assert.strictEqual(string.match(3)[0], '3', 'S15.5.4.10_A2_T1 #1'); assert.strictEqual(string.match(3).length, 1, 'S15.5.4.10_A2_T1 #2'); assert.strictEqual(string.match(3).index, 2, 'S15.5.4.10_A2_T1 #3'); assert.strictEqual(string.match(3).input, string, 'S15.5.4.10_A2_T1 #4'); matches = ['34', '34', '34']; string = '343443444'; assert.strictEqual(string.match(/34/g).length, 3, 'S15.5.4.10_A2_T2 #1'); for (i$ = 0, len$ = matches.length; i$ < len$; ++i$) { i = matches[i$]; assert.strictEqual(string.match(/34/g)[i], matches[i], "S15.5.4.10_A2_T2 #2"); } matches = ['1', '2', '3', '4', '5', '6', '7', '8', '9', '0']; string = '123456abcde7890'; assert.strictEqual(string.match(/\d{1}/g).length, 10, 'S15.5.4.10_A2_T3 #1'); for (i$ = 0, len$ = matches.length; i$ < len$; ++i$) { i = matches[i$]; assert.strictEqual(string.match(/\d{1}/g)[i], matches[i], "S15.5.4.10_A2_T3 #2"); } matches = ['12', '34', '56', '78', '90']; string = '123456abcde7890'; assert.strictEqual(string.match(/\d{2}/g).length, 5, 'S15.5.4.10_A2_T4 #1'); for (i$ = 0, len$ = matches.length; i$ < len$; ++i$) { i = matches[i$]; assert.strictEqual(string.match(/\d{2}/g)[i], matches[i], "S15.5.4.10_A2_T4 #2"); } matches = ['ab', 'cd']; string = '123456abcde7890'; assert.strictEqual(string.match(/\D{2}/g).length, 2, 'S15.5.4.10_A2_T5 #1'); for (i$ = 0, len$ = matches.length; i$ < len$; ++i$) { i = matches[i$]; assert.strictEqual(string.match(/\D{2}/g)[i], matches[i], "S15.5.4.10_A2_T5 #2"); } string = "Boston, Mass. 02134"; assert.strictEqual(string.match(/([\d]{5})([-\ ]?[\d]{4})?$/)[0], '02134', 'S15.5.4.10_A2_T6 #1'); assert.strictEqual(string.match(/([\d]{5})([-\ ]?[\d]{4})?$/)[1], '02134', 'S15.5.4.10_A2_T6 #2'); NATIVE && assert.strictEqual(string.match(/([\d]{5})([-\ ]?[\d]{4})?$/)[2], void 8, 'S15.5.4.10_A2_T6 #3'); assert.strictEqual(string.match(/([\d]{5})([-\ ]?[\d]{4})?$/).length, 3, 'S15.5.4.10_A2_T6 #4'); assert.strictEqual(string.match(/([\d]{5})([-\ ]?[\d]{4})?$/).index, 14, 'S15.5.4.10_A2_T6 #5'); assert.strictEqual(string.match(/([\d]{5})([-\ ]?[\d]{4})?$/).input, string, 'S15.5.4.10_A2_T6 #6'); string = "Boston, Mass. 02134"; assert.strictEqual(string.match(/([\d]{5})([-\ ]?[\d]{4})?$/g).length, 1, 'S15.5.4.10_A2_T7 #1'); assert.strictEqual(string.match(/([\d]{5})([-\ ]?[\d]{4})?$/g)[0], '02134', 'S15.5.4.10_A2_T7 #2'); matches = ['02134', '02134', 'undefined']; string = "Boston, MA 02134"; re = /([\d]{5})([-\ ]?[\d]{4})?$/; re.lastIndex = 0; assert.strictEqual(string.match(re).length, 3, 'S15.5.4.10_A2_T8 #1'); assert.strictEqual(string.match(re).index, string.lastIndexOf('0'), 'S15.5.4.10_A2_T8 #2'); for (i$ = 0, len$ = matches.length; i$ < len$; ++i$) { i = matches[i$]; assert.strictEqual(string.match(re)[i], matches[i], "S15.5.4.10_A2_T8 #3"); } string = "Boston, MA 02134"; matches = ['02134', '02134', void 8]; re = /([\d]{5})([-\ ]?[\d]{4})?$/; re.lastIndex = string.length; assert.strictEqual(string.match(re).length, 3, 'S15.5.4.10_A2_T9 #1'); assert.strictEqual(string.match(re).index, string.lastIndexOf('0'), 'S15.5.4.10_A2_T9 #2'); for (i$ = 0, len$ = matches.length; i$ < len$; ++i$) { i = matches[i$]; assert.strictEqual(string.match(re)[i], matches[i], "S15.5.4.10_A2_T9 #3"); } string = "Boston, MA 02134"; matches = ['02134', '02134', void 8]; re = /([\d]{5})([-\ ]?[\d]{4})?$/; re.lastIndex = string.lastIndexOf('0'); assert.strictEqual(string.match(re).length, 3, 'S15.5.4.10_A2_T10 #1'); assert.strictEqual(string.match(re).index, string.lastIndexOf('0'), 'S15.5.4.10_A2_T10 #2'); for (i$ = 0, len$ = matches.length; i$ < len$; ++i$) { i = matches[i$]; assert.strictEqual(string.match(re)[i], matches[i], "S15.5.4.10_A2_T10 #3"); } string = "Boston, MA 02134"; matches = ['02134', '02134', void 8]; re = /([\d]{5})([-\ ]?[\d]{4})?$/; re.lastIndex = string.lastIndexOf('0') + 1; assert.strictEqual(string.match(re).length, 3, 'S15.5.4.10_A2_T11 #1'); assert.strictEqual(string.match(re).index, string.lastIndexOf('0'), 'S15.5.4.10_A2_T11 #2'); for (i$ = 0, len$ = matches.length; i$ < len$; ++i$) { i = matches[i$]; assert.strictEqual(string.match(re)[i], matches[i], "S15.5.4.10_A2_T11 #3"); } string = "Boston, MA 02134"; re = /([\d]{5})([-\ ]?[\d]{4})?$/g; assert.strictEqual(string.match(re).length, 1, 'S15.5.4.10_A2_T12 #1'); assert.strictEqual(string.match(re)[0], '02134', 'S15.5.4.10_A2_T12 #2'); re = /([\d]{5})([-\ ]?[\d]{4})?$/g; re.lastIndex = 0; string = "Boston, MA 02134"; assert.strictEqual(string.match(re).length, 1, 'S15.5.4.10_A2_T13 #1'); assert.strictEqual(string.match(re)[0], '02134', 'S15.5.4.10_A2_T13 #2'); string = "Boston, MA 02134"; re = /([\d]{5})([-\ ]?[\d]{4})?$/g; re.lastIndex = string.length; assert.strictEqual(string.match(re).length, 1, 'S15.5.4.10_A2_T14 #1'); assert.strictEqual(string.match(re)[0], '02134', 'S15.5.4.10_A2_T14 #2'); string = "Boston, MA 02134"; re = /([\d]{5})([-\ ]?[\d]{4})?$/g; re.lastIndex = string.lastIndexOf('0'); assert.strictEqual(string.match(re).length, 1, 'S15.5.4.10_A2_T15 #1'); assert.strictEqual(string.match(re)[0], '02134', 'S15.5.4.10_A2_T15 #2'); string = "Boston, MA 02134"; re = /([\d]{5})([-\ ]?[\d]{4})?$/g; re.lastIndex = string.lastIndexOf('0') + 1; assert.strictEqual(string.match(re).length, 1, 'S15.5.4.10_A2_T16 #1'); assert.strictEqual(string.match(re)[0], '02134', 'S15.5.4.10_A2_T16 #2'); re = /0./; num = 10203040506070809000; assert.strictEqual(''.match.call(num, re)[0], '02', 'S15.5.4.10_A2_T17 #1'); assert.strictEqual(''.match.call(num, re).length, 1, 'S15.5.4.10_A2_T17 #2'); assert.strictEqual(''.match.call(num, re).index, 1, 'S15.5.4.10_A2_T17 #3'); assert.strictEqual(''.match.call(num, re).input, String(num), 'S15.5.4.10_A2_T17 #4'); re = /0./; re.lastIndex = 0; num = 10203040506070809000; assert.strictEqual(''.match.call(num, re)[0], '02', 'S15.5.4.10_A2_T18 #1'); assert.strictEqual(''.match.call(num, re).length, 1, 'S15.5.4.10_A2_T18 #2'); assert.strictEqual(''.match.call(num, re).index, 1, 'S15.5.4.10_A2_T18 #3'); return assert.strictEqual(''.match.call(num, re).input, String(num), 'S15.5.4.10_A2_T18 #4'); }); test('RegExp#@@match', function(assert){ var string, matches, i$, len$, i, results$ = []; assert.isFunction(/./[typeof Symbol != 'undefined' && Symbol !== null ? Symbol.match : void 8]); assert.arity(/./[typeof Symbol != 'undefined' && Symbol !== null ? Symbol.match : void 8], 1); string = "Boston, MA 02134"; matches = ['02134', '02134', void 8]; assert.strictEqual(/([\d]{5})([-\ ]?[\d]{4})?$/[typeof Symbol != 'undefined' && Symbol !== null ? Symbol.match : void 8](string).length, 3); assert.strictEqual(/([\d]{5})([-\ ]?[\d]{4})?$/[typeof Symbol != 'undefined' && Symbol !== null ? Symbol.match : void 8](string).index, string.lastIndexOf('0')); for (i$ = 0, len$ = matches.length; i$ < len$; ++i$) { i = matches[i$]; results$.push(assert.strictEqual(/([\d]{5})([-\ ]?[\d]{4})?$/[typeof Symbol != 'undefined' && Symbol !== null ? Symbol.match : void 8](string)[i], matches[i])); } return results$; }); test('@@match logic', function(assert){ 'use strict'; var str, num, O, ref$, re; str = STRICT ? 'qwe' : Object('qwe'); num = STRICT ? 123 : Object(123); O = (ref$ = {}, ref$[typeof Symbol != 'undefined' && Symbol !== null ? Symbol.match : void 8] = function(it){ return { value: it }; }, ref$); assert.strictEqual(str.match(O).value, str); assert.strictEqual(''.match.call(num, O).value, num); re = /./; re[typeof Symbol != 'undefined' && Symbol !== null ? Symbol.match : void 8] = function(it){ return { value: it }; }; assert.strictEqual(str.match(re).value, str); return assert.strictEqual(''.match.call(num, re).value, num); }); }).call(this); // Generated by LiveScript 1.4.0 (function(){ var module, test; module = QUnit.module, test = QUnit.test; module('ES6'); test('String#replace regression', function(assert){ var instance, e; assert.isFunction(''.replace); assert.arity(''.replace, 2); assert.name(''.replace, 'replace'); assert.looksNative(''.replace); assert.nonEnumerable(String.prototype, 'replace'); instance = Object(true); instance.replace = String.prototype.replace; assert.strictEqual(instance.replace(true, 1), '1', 'S15.5.4.11_A1_T1'); instance = Object(false); instance.replace = String.prototype.replace; assert.strictEqual(instance.replace(false, void 8), 'undefined', 'S15.5.4.11_A1_T2'); assert.strictEqual('gnulluna'.replace(null, function(a1, a2, a3){ return a2 + ''; }), 'g1una', 'S15.5.4.11_A1_T4'); assert.strictEqual('gnulluna'.replace(null, function(){}), 'gundefineduna', 'S15.5.4.11_A1_T5'); assert.strictEqual(Object('undefined').replace(void 8, function(){ return arguments[1] + 42; }), '42', 'S15.5.4.11_A1_T6'); assert.strictEqual('undefined'.replace('e', void 8), 'undundefinedfined', 'S15.5.4.11_A1_T7'); assert.strictEqual(String({ toString: function(){} }).replace(/e/g, void 8), 'undundefinedfinundefinedd', 'S15.5.4.11_A1_T8'); assert.strictEqual(new String({ valueOf: function(){}, toString: void 8 }).replace(function(){}(), function(a1, a2, a3){ return a1 + a2 + a3; }), 'undefined0undefined', 'S15.5.4.11_A1_T9'); assert.strictEqual('ABB\u0041BABAB'.replace({ toString: function(){ return '\u0041B'; } }, function(){}), 'undefinedBABABAB', 'S15.5.4.11_A1_T10'); if (NATIVE) { try { 'ABB\u0041BABAB'.replace({ toString: function(){ throw 'insearchValue'; } }, { toString: function(){ throw 'inreplaceValue'; } }); assert.ok(false, 'S15.5.4.11_A1_T11 #1 lead to throwing exception'); } catch (e$) { e = e$; assert.strictEqual(e, 'insearchValue', 'S15.5.4.11_A1_T11 #2'); } try { Object('ABB\u0041BABAB').replace({ toString: function(){ return {}; }, valueOf: function(){ throw 'insearchValue'; } }, { toString: function(){ throw 'inreplaceValue'; } }); assert.ok(false, 'S15.5.4.11_A1_T12 #1 lead to throwing exception'); } catch (e$) { e = e$; assert.strictEqual(e, 'insearchValue', 'S15.5.4.11_A1_T12 #2'); } } try { 'ABB\u0041BABAB\u0031BBAA'.replace({ toString: function(){ return {}; }, valueOf: function(){ throw 'insearchValue'; } }, { toString: function(){ return 1; } }); assert.ok(false, 'S15.5.4.11_A1_T13 #1 lead to throwing exception'); } catch (e$) { e = e$; assert.strictEqual(e, 'insearchValue', 'S15.5.4.11_A1_T13 #2'); } assert.strictEqual('ABB\u0041BABAB\u0037\u0037BBAA'.replace(new RegExp('77'), 1), 'ABBABABAB\u0031BBAA', 'S15.5.4.11_A1_T14'); instance = Object(1100.00777001); instance.replace = String.prototype.replace; try { instance.replace({ toString: function(){ return /77/; } }, 1); assert.ok(false, 'S15.5.4.11_A1_T15 #1 lead to throwing exception'); } catch (e$) { e = e$; assert.ok(e instanceof TypeError, 'S15.5.4.11_A1_T15 #2'); } instance = Object(1100.00777001); instance.replace = String.prototype.replace; try { instance.replace(/77/, { toString: function(){ return function(a1, a2, a3){ return a2 + 'z'; }; } }); assert.ok(false, 'S15.5.4.11_A1_T16 #1 lead to throwing exception'); } catch (e$) { e = e$; assert.ok(e instanceof TypeError, 'S15.5.4.11_A1_T16 #2'); } assert.strictEqual('asdf'.replace(RegExp('', 'g'), '1'), '1a1s1d1f1', 'S15.5.4.11_A1_T17'); assert.strictEqual('She sells seashells by the seashore.'.replace(/sh/g, 'sch'), 'She sells seaschells by the seaschore.', 'S15.5.4.11_A2_T1'); assert.strictEqual('She sells seashells by the seashore.'.replace(/sh/g, '$$sch'), 'She sells sea$schells by the sea$schore.', 'S15.5.4.11_A2_T2'); assert.strictEqual('She sells seashells by the seashore.'.replace(/sh/g, '$&sch'), 'She sells seashschells by the seashschore.', 'S15.5.4.11_A2_T3'); assert.strictEqual('She sells seashells by the seashore.'.replace(/sh/g, '$`sch'), 'She sells seaShe sells seaschells by the seaShe sells seashells by the seaschore.', 'S15.5.4.11_A2_T4'); assert.strictEqual('She sells seashells by the seashore.'.replace(/sh/g, "$'sch"), 'She sells seaells by the seashore.schells by the seaore.schore.', 'S15.5.4.11_A2_T5'); assert.strictEqual('She sells seashells by the seashore.'.replace(/sh/, 'sch'), 'She sells seaschells by the seashore.', 'S15.5.4.11_A2_T6'); assert.strictEqual('She sells seashells by the seashore.'.replace(/sh/, '$$sch'), 'She sells sea$schells by the seashore.', 'S15.5.4.11_A2_T7'); assert.strictEqual('She sells seashells by the seashore.'.replace(/sh/, '$&sch'), 'She sells seashschells by the seashore.', 'S15.5.4.11_A2_T8'); assert.strictEqual('She sells seashells by the seashore.'.replace(/sh/, '$`sch'), 'She sells seaShe sells seaschells by the seashore.', 'S15.5.4.11_A2_T9'); assert.strictEqual('She sells seashells by the seashore.'.replace(/sh/, "$'sch"), 'She sells seaells by the seashore.schells by the seashore.', 'S15.5.4.11_A2_T10'); assert.strictEqual('uid=31'.replace(/(uid=)(\d+)/, '$1115'), 'uid=115', 'S15.5.4.11_A3_T1'); assert.strictEqual('uid=31'.replace(/(uid=)(\d+)/, '$11A15'), 'uid=1A15', 'S15.5.4.11_A3_T3'); assert.strictEqual('abc12 def34'.replace(/([a-z]+)([0-9]+)/, function(){ return arguments[2] + arguments[1]; }), '12abc def34', 'S15.5.4.11_A4_T1'); return assert.strictEqual('aaaaaaaaaa,aaaaaaaaaaaaaaa'.replace(/^(a+)\1*,\1+$/, '$1'), 'aaaaa', 'S15.5.4.11_A5_T1'); }); test('RegExp#@@replace', function(assert){ assert.isFunction(/./[typeof Symbol != 'undefined' && Symbol !== null ? Symbol.replace : void 8]); assert.arity(/./[typeof Symbol != 'undefined' && Symbol !== null ? Symbol.replace : void 8], 2); return assert.strictEqual(/([a-z]+)([0-9]+)/[typeof Symbol != 'undefined' && Symbol !== null ? Symbol.replace : void 8]('abc12 def34', function(){ return arguments[2] + arguments[1]; }), '12abc def34'); }); test('@@replace logic', function(assert){ 'use strict'; var str, num, O, ref$, re; str = STRICT ? 'qwe' : Object('qwe'); num = STRICT ? 123 : Object(123); O = (ref$ = {}, ref$[typeof Symbol != 'undefined' && Symbol !== null ? Symbol.replace : void 8] = function(a, b){ return { a: a, b: b }; }, ref$); assert.strictEqual(str.replace(O, 42).a, str); assert.strictEqual(str.replace(O, 42).b, 42); assert.strictEqual(''.replace.call(num, O, 42).a, num); assert.strictEqual(''.replace.call(num, O, 42).b, 42); re = /./; re[typeof Symbol != 'undefined' && Symbol !== null ? Symbol.replace : void 8] = function(a, b){ return { a: a, b: b }; }; assert.strictEqual(str.replace(re, 42).a, str); assert.strictEqual(str.replace(re, 42).b, 42); assert.strictEqual(''.replace.call(num, re, 42).a, num); return assert.strictEqual(''.replace.call(num, re, 42).b, 42); }); }).call(this); // Generated by LiveScript 1.4.0 (function(){ var module, test; module = QUnit.module, test = QUnit.test; module('ES6'); test('String#search regression', function(assert){ var instance, e, aString; assert.isFunction(''.search); assert.arity(''.search, 1); assert.name(''.search, 'search'); assert.looksNative(''.search); assert.nonEnumerable(String.prototype, 'search'); instance = Object(true); instance.search = String.prototype.search; assert.strictEqual(instance.search(true), 0, 'S15.5.4.12_A1_T1'); instance = Object(false); instance.search = String.prototype.search; assert.strictEqual(instance.search(false), 0, 'S15.5.4.12_A1_T2'); assert.strictEqual(''.search(), 0, 'S15.5.4.12_A1_T4 #1'); assert.strictEqual('--undefined--'.search(), 0, 'S15.5.4.12_A1_T4 #2'); assert.strictEqual('gnulluna'.search(null), 1, 'S15.5.4.12_A1_T5'); assert.strictEqual(Object('undefined').search(void 8), 0, 'S15.5.4.12_A1_T6'); assert.strictEqual('undefined'.search(void 8), 0, 'S15.5.4.12_A1_T7'); assert.strictEqual(String({ toString: function(){} }).search(void 8), 0, 'S15.5.4.12_A1_T8'); assert.strictEqual('ssABB\u0041BABAB'.search({ toString: function(){ return '\u0041B'; } }), 2, 'S15.5.4.12_A1_T10'); try { 'ABB\u0041BABAB'.search({ toString: function(){ throw 'intostr'; } }); assert.ok(false, 'S15.5.4.12_A1_T11 #1 lead to throwing exception'); } catch (e$) { e = e$; assert.strictEqual(e, 'intostr', 'S15.5.4.12_A1_T11 #2'); } try { Object('ABB\u0041BABAB').search({ toString: function(){ return {}; }, valueOf: function(){ throw 'intostr'; } }); assert.ok(false, 'S15.5.4.12_A1_T12 #1 lead to throwing exception'); } catch (e$) { e = e$; assert.strictEqual(e, 'intostr', 'S15.5.4.12_A1_T12 #2'); } assert.strictEqual('ABB\u0041B\u0031ABAB\u0031BBAA'.search({ toString: function(){ return {}; }, valueOf: function(){ return 1; } }), 5, 'S15.5.4.12_A1_T13'); assert.strictEqual('ABB\u0041BABAB\u0037\u0037BBAA'.search(RegExp('77')), 9, 'S15.5.4.12_A1_T14'); assert.strictEqual(Object('test string').search('string'), 5, 'S15.5.4.12_A2_T1'); assert.strictEqual(Object('test string').search('String'), -1, 'S15.5.4.12_A2_T2'); assert.strictEqual(Object('test string').search(/String/i), 5, 'S15.5.4.12_A2_T3'); assert.strictEqual(Object('test string').search(/Four/), -1, 'S15.5.4.12_A2_T4'); assert.strictEqual(Object('one two three four five').search(/four/), 14, 'S15.5.4.12_A2_T5'); assert.strictEqual(Object('test string').search('notexist'), -1, 'S15.5.4.12_A2_T6'); assert.strictEqual(Object('test string probe').search('string pro'), 5, 'S15.5.4.12_A2_T7'); aString = Object('power of the power of the power of the power of the power of the power of the great sword'); assert.strictEqual(aString.search(/the/), aString.search(/the/g), 'S15.5.4.12_A3_T1'); aString = Object('power \u006F\u0066 the power of the power \u006F\u0066 the power of the power \u006F\u0066 the power of the great sword'); return assert.strictEqual(aString.search(/of/), aString.search(/of/g), 'S15.5.4.12_A3_T2'); }); test('RegExp#@@search', function(assert){ assert.isFunction(/./[typeof Symbol != 'undefined' && Symbol !== null ? Symbol.search : void 8]); assert.arity(/./[typeof Symbol != 'undefined' && Symbol !== null ? Symbol.search : void 8], 1); assert.strictEqual(/four/[typeof Symbol != 'undefined' && Symbol !== null ? Symbol.search : void 8]('one two three four five'), 14); return assert.strictEqual(/Four/[typeof Symbol != 'undefined' && Symbol !== null ? Symbol.search : void 8]('one two three four five'), -1); }); test('@@search logic', function(assert){ 'use strict'; var str, num, O, ref$, re; str = STRICT ? 'qwe' : Object('qwe'); num = STRICT ? 123 : Object(123); O = (ref$ = {}, ref$[typeof Symbol != 'undefined' && Symbol !== null ? Symbol.search : void 8] = function(it){ return { value: it }; }, ref$); assert.strictEqual(str.search(O).value, str); assert.strictEqual(''.search.call(num, O).value, num); re = /./; re[typeof Symbol != 'undefined' && Symbol !== null ? Symbol.search : void 8] = function(it){ return { value: it }; }; assert.strictEqual(str.search(re).value, str); return assert.strictEqual(''.search.call(num, re).value, num); }); }).call(this); // Generated by LiveScript 1.4.0 (function(){ var module, test; module = QUnit.module, test = QUnit.test; module('ES6'); test('String#split regression', function(assert){ var instance, split, e, F, string, i$, to$, i, expected, results$ = []; assert.isFunction(''.split); assert.arity(''.split, 2); assert.name(''.split, 'split'); assert.looksNative(''.split); assert.nonEnumerable(String.prototype, 'split'); assert.arrayEqual('ab'.split(), ['ab'], 'If "separator" is undefined must return Array with one String - "this" string'); assert.arrayEqual('ab'.split(void 8), ['ab'], 'If "separator" is undefined must return Array with one String - "this" string'); assert.arrayEqual('ab'.split(void 8, 0), [], 'If "separator" is undefined and "limit" set to 0 must return Array[]'); assert.arrayEqual(''.split(), [''], "''.split() results in ['']"); assert.arrayEqual(''.split(/./), [''], "''.split(/./) results in ['']"); assert.arrayEqual(''.split(/.?/), [], "''.split(/.?/) results in []"); assert.arrayEqual(''.split(/.??/), [], "''.split(/.??/) results in []"); assert.arrayEqual('ab'.split(/a*/), ['', 'b'], "'ab'.split(/a*/) results in ['', 'b']"); assert.arrayEqual('ab'.split(/a*?/), ['a', 'b'], "'ab'.split(/a*?/) results in ['a', 'b']"); assert.arrayEqual('ab'.split(/(?:ab)/), ['', ''], "'ab'.split(/(?:ab)/) results in ['', '']"); assert.arrayEqual('ab'.split(/(?:ab)*/), ['', ''], "'ab'.split(/(?:ab)*/) results in ['', '']"); assert.arrayEqual('ab'.split(/(?:ab)*?/), ['a', 'b'], "'ab'.split(/(?:ab)*?/) results in ['a', 'b']"); assert.arrayEqual('test'.split(''), ['t', 'e', 's', 't'], "'test'.split('') results in ['t', 'e', 's', 't']"); assert.arrayEqual('test'.split(), ['test'], "'test'.split() results in ['test']"); assert.arrayEqual('111'.split(1), ['', '', '', ''], "'111'.split(1) results in ['', '', '', '']"); assert.arrayEqual('test'.split(/(?:)/, 2), ['t', 'e'], "'test'.split(/(?:)/, 2) results in ['t', 'e']"); assert.arrayEqual('test'.split(/(?:)/, -1), ['t', 'e', 's', 't'], "'test'.split(/(?:)/, -1) results in ['t', 'e', 's', 't']"); assert.arrayEqual('test'.split(/(?:)/, void 8), ['t', 'e', 's', 't'], "'test'.split(/(?:)/, undefined) results in ['t', 'e', 's', 't']"); assert.arrayEqual('test'.split(/(?:)/, null), [], "'test'.split(/(?:)/, null) results in []"); assert.arrayEqual('test'.split(/(?:)/, NaN), [], "'test'.split(/(?:)/, NaN) results in []"); assert.arrayEqual('test'.split(/(?:)/, true), ['t'], "'test'.split(/(?:)/, true) results in ['t']"); assert.arrayEqual('test'.split(/(?:)/, '2'), ['t', 'e'], "'test'.split(/(?:)/, '2') results in ['t', 'e']"); assert.arrayEqual('test'.split(/(?:)/, 'two'), [], "'test'.split(/(?:)/, 'two') results in []"); assert.arrayEqual('a'.split(/-/), ['a'], "'a'.split(/-/) results in ['a']"); assert.arrayEqual('a'.split(/-?/), ['a'], "'a'.split(/-?/) results in ['a']"); assert.arrayEqual('a'.split(/-??/), ['a'], "'a'.split(/-??/) results in ['a']"); assert.arrayEqual('a'.split(/a/), ['', ''], "'a'.split(/a/) results in ['', '']"); assert.arrayEqual('a'.split(/a?/), ['', ''], "'a'.split(/a?/) results in ['', '']"); assert.arrayEqual('a'.split(/a??/), ['a'], "'a'.split(/a??/) results in ['a']"); assert.arrayEqual('ab'.split(/-/), ['ab'], "'ab'.split(/-/) results in ['ab']"); assert.arrayEqual('ab'.split(/-?/), ['a', 'b'], "'ab'.split(/-?/) results in ['a', 'b']"); assert.arrayEqual('ab'.split(/-??/), ['a', 'b'], "'ab'.split(/-??/) results in ['a', 'b']"); assert.arrayEqual('a-b'.split(/-/), ['a', 'b'], "'a-b'.split(/-/) results in ['a', 'b']"); assert.arrayEqual('a-b'.split(/-?/), ['a', 'b'], "'a-b'.split(/-?/) results in ['a', 'b']"); assert.arrayEqual('a-b'.split(/-??/), ['a', '-', 'b'], "'a-b'.split(/-??/) results in ['a', '-', 'b']"); assert.arrayEqual('a--b'.split(/-/), ['a', '', 'b'], "'a--b'.split(/-/) results in ['a', '', 'b']"); assert.arrayEqual('a--b'.split(/-?/), ['a', '', 'b'], "'a--b'.split(/-?/) results in ['a', '', 'b']"); assert.arrayEqual('a--b'.split(/-??/), ['a', '-', '-', 'b'], "'a--b'.split(/-??/) results in ['a', '-', '-', 'b']"); assert.arrayEqual(''.split(/()()/), [], "''.split(/()()/) results in []"); assert.arrayEqual('.'.split(/()()/), ['.'], "'.'.split(/()()/) results in ['.']"); assert.arrayEqual('.'.split(/(.?)(.?)/), ['', '.', '', ''], "'.'.split(/(.?)(.?)/) results in ['', '.', '', '']"); assert.arrayEqual('.'.split(/(.??)(.??)/), ['.'], "'.'.split(/(.??)(.??)/) results in ['.']"); assert.arrayEqual('.'.split(/(.)?(.)?/), ['', '.', void 8, ''], "'.'.split(/(.)?(.)?/) results in ['', '.', undefined, '']"); assert.arrayEqual('Aboldandcoded'.split(/<(\/)?([^<>]+)>/), ['A', void 8, 'B', 'bold', '/', 'B', 'and', void 8, 'CODE', 'coded', '/', 'CODE', ''], "'Aboldandcoded'.split(/<(\\/)?([^<>]+)>/) results in ['A', undefined, 'B', 'bold', '/', 'B', 'and', undefined, 'CODE', 'coded', '/', 'CODE', '']"); assert.arrayEqual('tesst'.split(/(s)*/), ['t', void 8, 'e', 's', 't'], "'tesst'.split(/(s)*/) results in ['t', undefined, 'e', 's', 't']"); assert.arrayEqual('tesst'.split(/(s)*?/), ['t', void 8, 'e', void 8, 's', void 8, 's', void 8, 't'], "'tesst'.split(/(s)*?/) results in ['t', undefined, 'e', undefined, 's', undefined, 's', undefined, 't']"); assert.arrayEqual('tesst'.split(/(s*)/), ['t', '', 'e', 'ss', 't'], "'tesst'.split(/(s*)/) results in ['t', '', 'e', 'ss', 't']"); assert.arrayEqual('tesst'.split(/(s*?)/), ['t', '', 'e', '', 's', '', 's', '', 't'], "'tesst'.split(/(s*?)/) results in ['t', '', 'e', '', 's', '', 's', '', 't']"); assert.arrayEqual('tesst'.split(/(?:s)*/), ['t', 'e', 't'], "'tesst'.split(/(?:s)*/) results in ['t', 'e', 't']"); assert.arrayEqual('tesst'.split(/(?=s+)/), ['te', 's', 'st'], "'tesst'.split(/(?=s+)/) results in ['te', 's', 'st']"); assert.arrayEqual('test'.split('t'), ['', 'es', ''], "'test'.split('t') results in ['', 'es', '']"); assert.arrayEqual('test'.split('es'), ['t', 't'], "'test'.split('es') results in ['t', 't']"); assert.arrayEqual('test'.split(/t/), ['', 'es', ''], "'test'.split(/t/) results in ['', 'es', '']"); assert.arrayEqual('test'.split(/es/), ['t', 't'], "'test'.split(/es/) results in ['t', 't']"); assert.arrayEqual('test'.split(/(t)/), ['', 't', 'es', 't', ''], "'test'.split(/(t)/) results in ['', 't', 'es', 't', '']"); assert.arrayEqual('test'.split(/(es)/), ['t', 'es', 't'], "'test'.split(/(es)/) results in ['t', 'es', 't']"); assert.arrayEqual('test'.split(/(t)(e)(s)(t)/), ['', 't', 'e', 's', 't', ''], "'test'.split(/(t)(e)(s)(t)/) results in ['', 't', 'e', 's', 't', '']"); assert.arrayEqual('.'.split(/(((.((.??)))))/), ['', '.', '.', '.', '', '', ''], "'.'.split(/(((.((.??)))))/) results in ['', '.', '.', '.', '', '', '']"); assert.arrayEqual('.'.split(/(((((.??)))))/), ['.'], "'.'.split(/(((((.??)))))/) results in ['.']"); assert.arrayEqual('a b c d'.split(/ /, -(Math.pow(2, 32) - 1)), ['a'], "'a b c d'.split(/ /, -(Math.pow(2, 32) - 1)) results in ['a']"); assert.arrayEqual('a b c d'.split(/ /, Math.pow(2, 32) + 1), ['a'], "'a b c d'.split(/ /, Math.pow(2, 32) + 1) results in ['a']"); assert.arrayEqual('a b c d'.split(/ /, Infinity), [], "'a b c d'.split(/ /, Infinity) results in []"); instance = Object(true); instance.split = String.prototype.split; split = instance.split(true, false); assert.strictEqual(typeof split, 'object', 'S15.5.4.14_A1_T1 #1'); assert.strictEqual(split.constructor, Array, 'S15.5.4.14_A1_T1 #2'); assert.strictEqual(split.length, 0, 'S15.5.4.14_A1_T1 #3'); instance = Object(false); instance.split = String.prototype.split; split = instance.split(false, 0, null); assert.strictEqual(typeof split, 'object', 'S15.5.4.14_A1_T2 #1'); assert.strictEqual(split.constructor, Array, 'S15.5.4.14_A1_T2 #2'); assert.strictEqual(split.length, 0, 'S15.5.4.14_A1_T2 #3'); split = ''.split(); assert.strictEqual(typeof split, 'object', 'S15.5.4.14_A1_T4 #1'); assert.strictEqual(split.constructor, Array, 'S15.5.4.14_A1_T4 #2'); assert.strictEqual(split.length, 1, 'S15.5.4.14_A1_T4 #3'); assert.strictEqual(split[0], '', 'S15.5.4.14_A1_T4 #4'); split = 'gnulluna'.split(null); assert.strictEqual(typeof split, 'object', 'S15.5.4.14_A1_T5 #1'); assert.strictEqual(split.constructor, Array, 'S15.5.4.14_A1_T5 #2'); assert.strictEqual(split.length, 2, 'S15.5.4.14_A1_T5 #3'); assert.strictEqual(split[0], 'g', 'S15.5.4.14_A1_T5 #4'); assert.strictEqual(split[1], 'una', 'S15.5.4.14_A1_T5 #5'); if (NATIVE) { split = Object('1undefined').split(void 8); assert.strictEqual(typeof split, 'object', 'S15.5.4.14_A1_T6 #1'); assert.strictEqual(split.constructor, Array, 'S15.5.4.14_A1_T6 #2'); assert.strictEqual(split.length, 1, 'S15.5.4.14_A1_T6 #3'); assert.strictEqual(split[0], '1undefined', 'S15.5.4.14_A1_T6 #4'); split = 'undefinedd'.split(void 8); assert.strictEqual(typeof split, 'object', 'S15.5.4.14_A1_T7 #1'); assert.strictEqual(split.constructor, Array, 'S15.5.4.14_A1_T7 #2'); assert.strictEqual(split.length, 1, 'S15.5.4.14_A1_T7 #3'); assert.strictEqual(split[0], 'undefinedd', 'S15.5.4.14_A1_T7 #4'); split = String({ toString: function(){} }).split(void 8); assert.strictEqual(typeof split, 'object', 'S15.5.4.14_A1_T8 #1'); assert.strictEqual(split.constructor, Array, 'S15.5.4.14_A1_T8 #2'); assert.strictEqual(split.length, 1, 'S15.5.4.14_A1_T8 #3'); assert.strictEqual(split[0], 'undefined', 'S15.5.4.14_A1_T8 #4'); } split = new String({ valueOf: function(){}, toString: void 8 }).split(function(){}); assert.strictEqual(typeof split, 'object', 'S15.5.4.14_A1_T9 #1'); assert.strictEqual(split.constructor, Array, 'S15.5.4.14_A1_T9 #2'); assert.strictEqual(split.length, 1, 'S15.5.4.14_A1_T9 #3'); assert.strictEqual(split[0], 'undefined', 'S15.5.4.14_A1_T9 #4'); split = 'ABB\u0041BABAB'.split({ toString: function(){ return '\u0042B'; } }, { valueOf: function(){ return true; } }); assert.strictEqual(typeof split, 'object', 'S15.5.4.14_A1_T10 #1'); assert.strictEqual(split.constructor, Array, 'S15.5.4.14_A1_T10 #2'); assert.strictEqual(split.length, 1, 'S15.5.4.14_A1_T10 #3'); assert.strictEqual(split[0], 'A', 'S15.5.4.14_A1_T10 #4'); try { 'ABB\u0041BABAB'.split({ toString: function(){ return '\u0041B'; } }, { valueOf: (function(){ throw 'intointeger'; }()) }); assert.ok(false, 'S15.5.4.14_A1_T11 #1 lead to throwing exception'); } catch (e$) { e = e$; assert.strictEqual(e, 'intointeger', 'S15.5.4.14_A1_T11 #2'); } if (NATIVE) { try { new String('ABB\u0041BABAB').split({ toString: function(){ return '\u0041B'; } }, { valueOf: function(){ return {}; }, toString: function(){ throw 'intointeger'; } }); assert.ok(false, 'S15.5.4.14_A1_T12 #1 lead to throwing exception'); } catch (e$) { e = e$; assert.strictEqual(e, 'intointeger', 'S15.5.4.14_A1_T12 #2'); } } split = 'ABB\u0041BABAB\u0042cc^^\u0042Bvv%%B\u0042xxx'.split({ toString: function(){ return '\u0042\u0042'; } }, { valueOf: function(){ return {}; }, toString: function(){ return '2'; } }); assert.strictEqual(typeof split, 'object', 'S15.5.4.14_A1_T13 #1'); assert.strictEqual(split.constructor, Array, 'S15.5.4.14_A1_T13 #2'); assert.strictEqual(split.length, 2, 'S15.5.4.14_A1_T13 #3'); assert.strictEqual(split[0], 'A', 'S15.5.4.14_A1_T13 #4'); assert.strictEqual(split[1], 'ABABA', 'S15.5.4.14_A1_T13 #5'); if (NATIVE) { try { instance = Object(10001.10001); instance.split = String.prototype.split; instance.split({ toString: function(){ throw 'intostr'; } }, { valueOf: function(){ throw 'intoint'; } }); assert.ok(false, 'S15.5.4.14_A1_T14 #1 lead to throwing exception'); } catch (e$) { e = e$; assert.strictEqual(e, 'intoint', 'S15.5.4.14_A1_T14 #2'); } try { F = (function(){ F.displayName = 'F'; var prototype = F.prototype, constructor = F; prototype.costructor = function(value){ this.value = value; }; prototype.valueOf = function(){ return '' + this.value; }; prototype.toString = function(){ return new Number; }; prototype.split = String.prototype.split; function F(){} return F; }()); new F().split({ toString: function(){ return {}; }, valueOf: function(){ throw 'intostr'; } }, { valueOf: function(){ throw 'intoint'; } }); assert.ok(false, 'S15.5.4.14_A1_T15 #1 lead to throwing exception'); } catch (e$) { e = e$; assert.strictEqual(e, 'intoint', 'S15.5.4.14_A1_T15 #2'); } } try { String.prototype.split.call(6776767677.006771122677555, { toString: function(){ return /\u0037\u0037/g; } }); assert.ok(false, 'S15.5.4.14_A1_T16 #1 lead to throwing exception'); } catch (e$) { e = e$; assert.ok(e instanceof TypeError, 'S15.5.4.14_A1_T16 #2'); } split = String.prototype.split.call(6776767677.006771122677555, /\u0037\u0037/g); assert.strictEqual(typeof split, 'object', 'S15.5.4.14_A1_T17 #1'); assert.strictEqual(split.constructor, Array, 'S15.5.4.14_A1_T17 #2'); assert.strictEqual(split.length, 4, 'S15.5.4.14_A1_T17 #3'); assert.strictEqual(split[0], '6', 'S15.5.4.14_A1_T17 #4'); assert.strictEqual(split[1], '67676', 'S15.5.4.14_A1_T17 #5'); assert.strictEqual(split[2], '.006', 'S15.5.4.14_A1_T17 #6'); assert.strictEqual(split[3], '1', 'S15.5.4.14_A1_T17 #7'); split = String.prototype.split.call(6776767677.006771122677555, /00/, 1); assert.strictEqual(typeof split, 'object', 'S15.5.4.14_A1_T18 #1'); assert.strictEqual(split.constructor, Array, 'S15.5.4.14_A1_T18 #2'); assert.strictEqual(split.length, 1, 'S15.5.4.14_A1_T18 #3'); assert.strictEqual(split[0], '6776767677.', 'S15.5.4.14_A1_T18 #4'); split = Object('one,two,three,four,five').split(','); assert.strictEqual(split.constructor, Array, 'S15.5.4.14_A2_T1 #1'); assert.strictEqual(split.length, 5, 'S15.5.4.14_A2_T1 #2'); assert.strictEqual(split[0], 'one', 'S15.5.4.14_A2_T1 #3'); assert.strictEqual(split[1], 'two', 'S15.5.4.14_A2_T1 #4'); assert.strictEqual(split[2], 'three', 'S15.5.4.14_A2_T1 #5'); assert.strictEqual(split[3], 'four', 'S15.5.4.14_A2_T1 #6'); assert.strictEqual(split[4], 'five', 'S15.5.4.14_A2_T1 #7'); split = Object('one two three four five').split(' '); assert.strictEqual(split.constructor, Array, 'S15.5.4.14_A2_T2 #1'); assert.strictEqual(split.length, 5, 'S15.5.4.14_A2_T2 #2'); assert.strictEqual(split[0], 'one', 'S15.5.4.14_A2_T2 #3'); assert.strictEqual(split[1], 'two', 'S15.5.4.14_A2_T2 #4'); assert.strictEqual(split[2], 'three', 'S15.5.4.14_A2_T2 #5'); assert.strictEqual(split[3], 'four', 'S15.5.4.14_A2_T2 #6'); assert.strictEqual(split[4], 'five', 'S15.5.4.14_A2_T2 #7'); split = Object('one two three four five').split(RegExp(' '), 2); assert.strictEqual(split.constructor, Array, 'S15.5.4.14_A2_T3 #1'); assert.strictEqual(split.length, 2, 'S15.5.4.14_A2_T3 #2'); assert.strictEqual(split[0], 'one', 'S15.5.4.14_A2_T3 #3'); assert.strictEqual(split[1], 'two', 'S15.5.4.14_A2_T3 #4'); split = Object('one two three').split(''); assert.strictEqual(split.constructor, Array, 'S15.5.4.14_A2_T4 #1'); assert.strictEqual(split.length, 'one two three'.length, 'S15.5.4.14_A2_T4 #2'); assert.strictEqual(split[0], 'o', 'S15.5.4.14_A2_T4 #3'); assert.strictEqual(split[1], 'n', 'S15.5.4.14_A2_T4 #4'); assert.strictEqual(split[11], 'e', 'S15.5.4.14_A2_T4 #5'); assert.strictEqual(split[12], 'e', 'S15.5.4.14_A2_T4 #6'); split = Object('one-1,two-2,four-4').split(/,/); assert.strictEqual(split.constructor, Array, 'S15.5.4.14_A2_T5 #1'); assert.strictEqual(split.length, 3, 'S15.5.4.14_A2_T5 #2'); assert.strictEqual(split[0], 'one-1', 'S15.5.4.14_A2_T5 #3'); assert.strictEqual(split[1], 'two-2', 'S15.5.4.14_A2_T5 #4'); assert.strictEqual(split[2], 'four-4', 'S15.5.4.14_A2_T5 #5'); string = Object('one-1 two-2 three-3'); split = string.split(''); assert.strictEqual(split.constructor, Array, 'S15.5.4.14_A2_T6 #1'); assert.strictEqual(split.length, string.length, 'S15.5.4.14_A2_T6 #2'); for (i$ = 0, to$ = split.length; i$ < to$; ++i$) { i = i$; assert.strictEqual(split[i], string.charAt(i), "S15.5.4.14_A2_T6 #" + (i + 3)); } if (NATIVE) { string = 'thisundefinedisundefinedaundefinedstringundefinedobject'; split = string.split(void 8); assert.strictEqual(split.constructor, Array, 'S15.5.4.14_A2_T7 #1'); assert.strictEqual(split.length, 1, 'S15.5.4.14_A2_T7 #2'); assert.strictEqual(split[0], string, 'S15.5.4.14_A2_T7 #3'); } string = 'thisnullisnullanullstringnullobject'; expected = ['this', 'is', 'a', 'string', 'object']; split = string.split(null); assert.strictEqual(split.constructor, Array, 'S15.5.4.14_A2_T8 #1'); assert.strictEqual(split.length, expected.length, 'S15.5.4.14_A2_T8 #2'); for (i$ = 0, to$ = expected.length; i$ < to$; ++i$) { i = i$; assert.strictEqual(expected[i], split[i], "S15.5.4.14_A2_T8 #" + (i + 3)); } string = 'thistrueistrueatruestringtrueobject'; expected = ['this', 'is', 'a', 'string', 'object']; split = string.split(true); assert.strictEqual(split.constructor, Array, 'S15.5.4.14_A2_T9 #1'); assert.strictEqual(split.length, expected.length, 'S15.5.4.14_A2_T9 #2'); for (i$ = 0, to$ = expected.length; i$ < to$; ++i$) { i = i$; assert.strictEqual(expected[i], split[i], "S15.5.4.14_A2_T9 #" + (i + 3)); } string = 'this123is123a123string123object'; expected = ['this', 'is', 'a', 'string', 'object']; split = string.split(123); assert.strictEqual(split.constructor, Array, 'S15.5.4.14_A2_T10 #1'); assert.strictEqual(split.length, expected.length, 'S15.5.4.14_A2_T10 #2'); for (i$ = 0, to$ = expected.length; i$ < to$; ++i$) { i = i$; assert.strictEqual(expected[i], split[i], "S15.5.4.14_A2_T10 #" + (i + 3)); } split = Object('one-1,two-2,four-4').split(':'); assert.strictEqual(split.constructor, Array, 'S15.5.4.14_A2_T11 #1'); assert.strictEqual(split.length, 1, 'S15.5.4.14_A2_T11 #2'); assert.strictEqual(split[0], 'one-1,two-2,four-4', 'S15.5.4.14_A2_T11 #3'); split = Object('one-1 two-2 four-4').split('r-42'); assert.strictEqual(split.constructor, Array, 'S15.5.4.14_A2_T12 #1'); assert.strictEqual(split.length, 1, 'S15.5.4.14_A2_T12 #2'); assert.strictEqual(split[0], 'one-1 two-2 four-4', 'S15.5.4.14_A2_T12 #3'); split = Object('one-1 two-2 four-4').split('-4'); assert.strictEqual(split.constructor, Array, 'S15.5.4.14_A2_T13 #1'); assert.strictEqual(split.length, 2, 'S15.5.4.14_A2_T13 #2'); assert.strictEqual(split[0], 'one-1 two-2 four', 'S15.5.4.14_A2_T13 #3'); assert.strictEqual(split[1], '', 'S15.5.4.14_A2_T13 #4'); split = Object('one-1 two-2 four-4').split('on'); assert.strictEqual(split.constructor, Array, 'S15.5.4.14_A2_T14 #1'); assert.strictEqual(split.length, 2, 'S15.5.4.14_A2_T14 #2'); assert.strictEqual(split[0], '', 'S15.5.4.14_A2_T14 #3'); assert.strictEqual(split[1], 'e-1 two-2 four-4', 'S15.5.4.14_A2_T14 #4'); split = new String().split(''); assert.strictEqual(split.constructor, Array, 'S15.5.4.14_A2_T15 #1'); assert.strictEqual(split.length, 0, 'S15.5.4.14_A2_T15 #2'); assert.strictEqual(split[0], void 8, 'S15.5.4.14_A2_T15 #3'); split = new String().split(' '); assert.strictEqual(split.constructor, Array, 'S15.5.4.14_A2_T16 #1'); assert.strictEqual(split.length, 1, 'S15.5.4.14_A2_T16 #2'); assert.strictEqual(split[0], '', 'S15.5.4.14_A2_T16 #3'); split = Object(' ').split(''); assert.strictEqual(split.constructor, Array, 'S15.5.4.14_A2_T18 #1'); assert.strictEqual(split.length, 1, 'S15.5.4.14_A2_T18 #2'); assert.strictEqual(split[0], ' ', 'S15.5.4.14_A2_T18 #3'); split = Object(' ').split(' '); assert.strictEqual(split.constructor, Array, 'S15.5.4.14_A2_T19 #1'); assert.strictEqual(split.length, 2, 'S15.5.4.14_A2_T19 #2'); assert.strictEqual(split[0], '', 'S15.5.4.14_A2_T19 #3'); assert.strictEqual(split[1], '', 'S15.5.4.14_A2_T19 #4'); split = ''.split('x'); assert.strictEqual(split.constructor, Array, 'S15.5.4.14_A2_T19 #1'); assert.strictEqual(split.length, 1, 'S15.5.4.14_A2_T19 #2'); assert.strictEqual(split[0], '', 'S15.5.4.14_A2_T19 #3'); string = Object('one-1 two-2 three-3'); split = string.split(new RegExp); assert.strictEqual(split.constructor, Array, 'S15.5.4.14_A2_T20 #1'); assert.strictEqual(split.length, string.length, 'S15.5.4.14_A2_T20 #2'); for (i$ = 0, to$ = split.length; i$ < to$; ++i$) { i = i$; assert.strictEqual(split[i], string.charAt(i), "S15.5.4.14_A2_T20 #" + (i + 3)); } split = Object('hello').split('ll'); assert.strictEqual(split.constructor, Array, 'S15.5.4.14_A2_T21 #1'); assert.strictEqual(split.length, 2, 'S15.5.4.14_A2_T21 #2'); assert.strictEqual(split[0], 'he', 'S15.5.4.14_A2_T21 #3'); assert.strictEqual(split[1], 'o', 'S15.5.4.14_A2_T21 #4'); split = Object('hello').split('l'); assert.strictEqual(split.constructor, Array, 'S15.5.4.14_A2_T22 #1'); assert.strictEqual(split.length, 3, 'S15.5.4.14_A2_T22 #2'); assert.strictEqual(split[0], 'he', 'S15.5.4.14_A2_T22 #3'); assert.strictEqual(split[1], '', 'S15.5.4.14_A2_T22 #4'); assert.strictEqual(split[2], 'o', 'S15.5.4.14_A2_T22 #5'); split = Object('hello').split('x'); assert.strictEqual(split.constructor, Array, 'S15.5.4.14_A2_T23 #1'); assert.strictEqual(split.length, 1, 'S15.5.4.14_A2_T23 #2'); assert.strictEqual(split[0], 'hello', 'S15.5.4.14_A2_T23 #3'); split = Object('hello').split('h'); assert.strictEqual(split.constructor, Array, 'S15.5.4.14_A2_T24 #1'); assert.strictEqual(split.length, 2, 'S15.5.4.14_A2_T24 #2'); assert.strictEqual(split[0], '', 'S15.5.4.14_A2_T24 #3'); assert.strictEqual(split[1], 'ello', 'S15.5.4.14_A2_T24 #4'); split = Object('hello').split('o'); assert.strictEqual(split.constructor, Array, 'S15.5.4.14_A2_T25 #1'); assert.strictEqual(split.length, 2, 'S15.5.4.14_A2_T25 #2'); assert.strictEqual(split[0], 'hell', 'S15.5.4.14_A2_T25 #3'); assert.strictEqual(split[1], '', 'S15.5.4.14_A2_T25 #4'); split = Object('hello').split('hello'); assert.strictEqual(split.constructor, Array, 'S15.5.4.14_A2_T26 #1'); assert.strictEqual(split.length, 2, 'S15.5.4.14_A2_T26 #2'); assert.strictEqual(split[0], '', 'S15.5.4.14_A2_T26 #3'); assert.strictEqual(split[1], '', 'S15.5.4.14_A2_T26 #4'); split = Object('hello').split(void 8); assert.strictEqual(split.constructor, Array, 'S15.5.4.14_A2_T27 #1'); assert.strictEqual(split.length, 1, 'S15.5.4.14_A2_T27 #2'); assert.strictEqual(split[0], 'hello', 'S15.5.4.14_A2_T27 #3'); split = Object('hello').split('hellothere'); assert.strictEqual(split.constructor, Array, 'S15.5.4.14_A2_T28 #1'); assert.strictEqual(split.length, 1, 'S15.5.4.14_A2_T28 #2'); assert.strictEqual(split[0], 'hello', 'S15.5.4.14_A2_T28 #3'); instance = Object(100111122133144155); instance.split = String.prototype.split; split = instance.split(1); expected = ['', '00', '', '', '', '22', '33', '44', '60']; assert.strictEqual(split.constructor, Array, 'S15.5.4.14_A2_T29 #1'); assert.strictEqual(split.length, expected.length, 'S15.5.4.14_A2_T29 #2'); for (i$ = 0, to$ = expected.length; i$ < to$; ++i$) { i = i$; assert.strictEqual(expected[i], split[i], "S15.5.4.14_A2_T29 #" + (i + 3)); } instance = Object(100111122133144155); instance.split = String.prototype.split; split = instance.split(1, 1); expected = ['']; assert.strictEqual(split.constructor, Array, 'S15.5.4.14_A2_T30 #1'); assert.strictEqual(split.length, expected.length, 'S15.5.4.14_A2_T30 #2'); for (i$ = 0, to$ = expected.length; i$ < to$; ++i$) { i = i$; assert.strictEqual(expected[i], split[i], "S15.5.4.14_A2_T30 #" + (i + 3)); } instance = Object(100111122133144155); instance.split = String.prototype.split; split = instance.split(1, 2); expected = ['', '00']; assert.strictEqual(split.constructor, Array, 'S15.5.4.14_A2_T31 #1'); assert.strictEqual(split.length, expected.length, 'S15.5.4.14_A2_T31 #2'); for (i$ = 0, to$ = expected.length; i$ < to$; ++i$) { i = i$; assert.strictEqual(expected[i], split[i], "S15.5.4.14_A2_T31 #" + (i + 3)); } instance = Object(100111122133144155); instance.split = String.prototype.split; split = instance.split(1, 0); assert.strictEqual(split.constructor, Array, 'S15.5.4.14_A2_T32 #1'); assert.strictEqual(split.length, 0, 'S15.5.4.14_A2_T32 #2'); instance = Object(100111122133144155); instance.split = String.prototype.split; split = instance.split(1, 100); expected = ['', '00', '', '', '', '22', '33', '44', '60']; assert.strictEqual(split.constructor, Array, 'S15.5.4.14_A2_T33 #1'); assert.strictEqual(split.length, expected.length, 'S15.5.4.14_A2_T33 #2'); for (i$ = 0, to$ = expected.length; i$ < to$; ++i$) { i = i$; assert.strictEqual(expected[i], split[i], "S15.5.4.14_A2_T33 #" + (i + 3)); } instance = Object(100111122133144155); instance.split = String.prototype.split; split = instance.split(1, void 8); expected = ['', '00', '', '', '', '22', '33', '44', '60']; assert.strictEqual(split.constructor, Array, 'S15.5.4.14_A2_T34 #1'); assert.strictEqual(split.length, expected.length, 'S15.5.4.14_A2_T34 #2'); for (i$ = 0, to$ = expected.length; i$ < to$; ++i$) { i = i$; assert.strictEqual(expected[i], split[i], "S15.5.4.14_A2_T34 #" + (i + 3)); } instance = Object(100111122133144155); instance.split = String.prototype.split; split = instance.split(1, Math.pow(2, 32) - 1); expected = ['', '00', '', '', '', '22', '33', '44', '60']; assert.strictEqual(split.constructor, Array, 'S15.5.4.14_A2_T35 #1'); assert.strictEqual(split.length, expected.length, 'S15.5.4.14_A2_T35 #2'); for (i$ = 0, to$ = expected.length; i$ < to$; ++i$) { i = i$; assert.strictEqual(expected[i], split[i], "S15.5.4.14_A2_T35 #" + (i + 3)); } instance = Object(100111122133144155); instance.split = String.prototype.split; split = instance.split(1, 'boo'); assert.strictEqual(split.constructor, Array, 'S15.5.4.14_A2_T36 #1'); assert.strictEqual(split.length, 0, 'S15.5.4.14_A2_T36 #2'); instance = Object(100111122133144155); instance.split = String.prototype.split; split = instance.split(1, -Math.pow(2, 32) + 1); assert.strictEqual(split.constructor, Array, 'S15.5.4.14_A2_T37 #1'); assert.arrayEqual(split, [''], 'S15.5.4.14_A2_T37 #2'); instance = Object(100111122133144155); instance.split = String.prototype.split; split = instance.split(1, NaN); assert.strictEqual(split.constructor, Array, 'S15.5.4.14_A2_T38 #1'); assert.strictEqual(split.length, 0, 'S15.5.4.14_A2_T38 #2'); instance = Object('hello').split('l', 0); assert.strictEqual(split.constructor, Array, 'S15.5.4.14_A2_T39 #1'); assert.strictEqual(split.length, 0, 'S15.5.4.14_A2_T39 #2'); split = Object('hello').split('l', 1); assert.strictEqual(split.constructor, Array, 'S15.5.4.14_A2_T40 #1'); assert.strictEqual(split.length, 1, 'S15.5.4.14_A2_T40 #2'); assert.strictEqual(split[0], 'he', 'S15.5.4.14_A2_T40 #3'); split = Object('hello').split('l', 2); expected = ['he', '']; assert.strictEqual(split.constructor, Array, 'S15.5.4.14_A2_T41 #1'); assert.strictEqual(split.length, expected.length, 'S15.5.4.14_A2_T41 #2'); for (i$ = 0, to$ = expected.length; i$ < to$; ++i$) { i = i$; assert.strictEqual(expected[i], split[i], "S15.5.4.14_A2_T41 #" + (i + 3)); } split = Object('hello').split('l', 3); expected = ['he', '', 'o']; assert.strictEqual(split.constructor, Array, 'S15.5.4.14_A2_T42 #1'); assert.strictEqual(split.length, expected.length, 'S15.5.4.14_A2_T42 #2'); for (i$ = 0, to$ = expected.length; i$ < to$; ++i$) { i = i$; assert.strictEqual(expected[i], split[i], "S15.5.4.14_A2_T42 #" + (i + 3)); } split = Object('hello').split('l', 4); expected = ['he', '', 'o']; assert.strictEqual(split.constructor, Array, 'S15.5.4.14_A2_T43 #1'); assert.strictEqual(split.length, expected.length, 'S15.5.4.14_A2_T43 #2'); for (i$ = 0, to$ = expected.length; i$ < to$; ++i$) { i = i$; assert.strictEqual(expected[i], split[i], "S15.5.4.14_A2_T43 #" + (i + 3)); } split = Object('one,two,three,four,five').split(); assert.strictEqual(split.constructor, Array, 'S15.5.4.14_A3_T1 #1'); assert.strictEqual(split.length, 1, 'S15.5.4.14_A3_T1 #2'); assert.strictEqual(split[0], 'one,two,three,four,five', 'S15.5.4.14_A3_T1 #3'); split = String.prototype.split.call({}); assert.strictEqual(split.constructor, Array, 'S15.5.4.14_A3_T2 #1'); assert.strictEqual(split.length, 1, 'S15.5.4.14_A3_T2 #2'); assert.strictEqual(split[0], '[object Object]', 'S15.5.4.14_A3_T2 #3'); split = String.prototype.split.call({ toString: function(){ return 'function(){}'; } }); assert.strictEqual(split.constructor, Array, 'S15.5.4.14_A3_T3 #1'); assert.strictEqual(split.length, 1, 'S15.5.4.14_A3_T3 #2'); assert.strictEqual(split[0], 'function(){}', 'S15.5.4.14_A3_T3 #3'); split = String.prototype.split.call(Object(NaN)); assert.strictEqual(split.constructor, Array, 'S15.5.4.14_A3_T4 #1'); assert.strictEqual(split.length, 1, 'S15.5.4.14_A3_T4 #2'); assert.strictEqual(split[0], 'NaN', 'S15.5.4.14_A3_T4 #3'); split = String.prototype.split.call(Object(-1234567890)); assert.strictEqual(split.constructor, Array, 'S15.5.4.14_A3_T5 #1'); assert.strictEqual(split.length, 1, 'S15.5.4.14_A3_T5 #2'); assert.strictEqual(split[0], '-1234567890', 'S15.5.4.14_A3_T5 #3'); instance = Object(-1e21); split = String.prototype.split.call(instance); assert.strictEqual(split.constructor, Array, 'S15.5.4.14_A3_T6 #1'); assert.strictEqual(split.length, 1, 'S15.5.4.14_A3_T6 #2'); assert.strictEqual(split[0], instance.toString(), 'S15.5.4.14_A3_T6 #3'); split = String.prototype.split.call(Math); assert.strictEqual(split.constructor, Array, 'S15.5.4.14_A3_T7 #1'); assert.strictEqual(split.length, 1, 'S15.5.4.14_A3_T7 #2'); assert.strictEqual(split[0], '[object Math]', 'S15.5.4.14_A3_T7 #3'); split = String.prototype.split.call([1, 2, 3, 4, 5]); assert.strictEqual(split.constructor, Array, 'S15.5.4.14_A3_T8 #1'); assert.strictEqual(split.length, 1, 'S15.5.4.14_A3_T8 #2'); assert.strictEqual(split[0], '1,2,3,4,5', 'S15.5.4.14_A3_T8 #3'); split = String.prototype.split.call(Object(false)); assert.strictEqual(split.constructor, Array, 'S15.5.4.14_A3_T9 #1'); assert.strictEqual(split.length, 1, 'S15.5.4.14_A3_T9 #2'); assert.strictEqual(split[0], 'false', 'S15.5.4.14_A3_T9 #3'); split = String.prototype.split.call(new String); assert.strictEqual(split.constructor, Array, 'S15.5.4.14_A3_T10 #1'); assert.strictEqual(split.length, 1, 'S15.5.4.14_A3_T10 #2'); assert.strictEqual(split[0], '', 'S15.5.4.14_A3_T10 #3'); split = String.prototype.split.call(Object(' ')); assert.strictEqual(split.constructor, Array, 'S15.5.4.14_A3_T11 #1'); assert.strictEqual(split.length, 1, 'S15.5.4.14_A3_T11 #2'); assert.strictEqual(split[0], ' ', 'S15.5.4.14_A3_T11 #3'); if (NATIVE) { split = Object('hello').split(/l/); assert.strictEqual(split.constructor, Array, 'S15.5.4.14_A4_T1 #1'); assert.strictEqual(split.length, 3, 'S15.5.4.14_A4_T1 #2'); assert.strictEqual(split[0], 'he', 'S15.5.4.14_A4_T1 #3'); assert.strictEqual(split[1], '', 'S15.5.4.14_A4_T1 #4'); assert.strictEqual(split[2], 'o', 'S15.5.4.14_A4_T1 #5'); } split = Object('hello').split(/l/, 0); assert.strictEqual(split.constructor, Array, 'S15.5.4.14_A4_T2 #1'); assert.strictEqual(split.length, 0, 'S15.5.4.14_A4_T2 #2'); split = Object('hello').split(/l/, 1); assert.strictEqual(split.constructor, Array, 'S15.5.4.14_A4_T3 #1'); assert.strictEqual(split.length, 1, 'S15.5.4.14_A4_T3 #2'); assert.strictEqual(split[0], 'he', 'S15.5.4.14_A4_T3 #3'); if (NATIVE) { split = Object('hello').split(/l/, 2); assert.strictEqual(split.constructor, Array, 'S15.5.4.14_A4_T4 #1'); assert.strictEqual(split.length, 2, 'S15.5.4.14_A4_T4 #2'); assert.strictEqual(split[0], 'he', 'S15.5.4.14_A4_T4 #3'); assert.strictEqual(split[1], '', 'S15.5.4.14_A4_T4 #4'); split = Object('hello').split(/l/, 3); assert.strictEqual(split.constructor, Array, 'S15.5.4.14_A4_T5 #1'); assert.strictEqual(split.length, 3, 'S15.5.4.14_A4_T5 #2'); assert.strictEqual(split[0], 'he', 'S15.5.4.14_A4_T5 #3'); assert.strictEqual(split[1], '', 'S15.5.4.14_A4_T5 #4'); assert.strictEqual(split[2], 'o', 'S15.5.4.14_A4_T5 #5'); split = Object('hello').split(/l/, 4); assert.strictEqual(split.constructor, Array, 'S15.5.4.14_A4_T6 #1'); assert.strictEqual(split.length, 3, 'S15.5.4.14_A4_T6 #2'); assert.strictEqual(split[0], 'he', 'S15.5.4.14_A4_T6 #3'); assert.strictEqual(split[1], '', 'S15.5.4.14_A4_T6 #4'); assert.strictEqual(split[2], 'o', 'S15.5.4.14_A4_T6 #5'); split = Object('hello').split(/l/, void 8); assert.strictEqual(split.constructor, Array, 'S15.5.4.14_A4_T7 #1'); assert.strictEqual(split.length, 3, 'S15.5.4.14_A4_T7 #2'); assert.strictEqual(split[0], 'he', 'S15.5.4.14_A4_T7 #3'); assert.strictEqual(split[1], '', 'S15.5.4.14_A4_T7 #4'); assert.strictEqual(split[2], 'o', 'S15.5.4.14_A4_T7 #5'); } split = Object('hello').split(/l/, 'hi'); assert.strictEqual(split.constructor, Array, 'S15.5.4.14_A4_T8 #1'); assert.strictEqual(split.length, 0, 'S15.5.4.14_A4_T8 #2'); split = Object('hello').split(new RegExp); expected = ['h', 'e', 'l', 'l', 'o']; assert.strictEqual(split.constructor, Array, 'S15.5.4.14_A4_T10 #1'); assert.strictEqual(split.length, expected.length, 'S15.5.4.14_A4_T10 #2'); for (i$ = 0, to$ = expected.length; i$ < to$; ++i$) { i = i$; assert.strictEqual(expected[i], split[i], "S15.5.4.14_A4_T10 #" + (i + 3)); } split = Object('hello').split(new RegExp(), 0); assert.strictEqual(split.constructor, Array, 'S15.5.4.14_A4_T11 #1'); assert.strictEqual(split.length, 0, 'S15.5.4.14_A4_T11 #2'); split = Object('hello').split(new RegExp(), 1); assert.strictEqual(split.constructor, Array, 'S15.5.4.14_A4_T12 #1'); assert.strictEqual(split.length, 1, 'S15.5.4.14_A4_T12 #2'); assert.strictEqual(split[0], 'h', 'S15.5.4.14_A4_T12 #3'); split = Object('hello').split(new RegExp(), 2); expected = ['h', 'e']; assert.strictEqual(split.constructor, Array, 'S15.5.4.14_A4_T13 #1'); assert.strictEqual(split.length, expected.length, 'S15.5.4.14_A4_T13 #2'); for (i$ = 0, to$ = expected.length; i$ < to$; ++i$) { i = i$; assert.strictEqual(expected[i], split[i], "S15.5.4.14_A4_T13 #" + (i + 3)); } split = Object('hello').split(new RegExp(), 3); expected = ['h', 'e', 'l']; assert.strictEqual(split.constructor, Array, 'S15.5.4.14_A4_T14 #1'); assert.strictEqual(split.length, expected.length, 'S15.5.4.14_A4_T14 #2'); for (i$ = 0, to$ = expected.length; i$ < to$; ++i$) { i = i$; assert.strictEqual(expected[i], split[i], "S15.5.4.14_A4_T14 #" + (i + 3)); } split = Object('hello').split(new RegExp(), 4); expected = ['h', 'e', 'l', 'l']; assert.strictEqual(split.constructor, Array, 'S15.5.4.14_A4_T15 #1'); assert.strictEqual(split.length, expected.length, 'S15.5.4.14_A4_T15 #2'); for (i$ = 0, to$ = expected.length; i$ < to$; ++i$) { i = i$; assert.strictEqual(expected[i], split[i], "S15.5.4.14_A4_T15 #" + (i + 3)); } split = Object('hello').split(new RegExp(), void 8); expected = ['h', 'e', 'l', 'l', 'o']; assert.strictEqual(split.constructor, Array, 'S15.5.4.14_A4_T16 #1'); assert.strictEqual(split.length, expected.length, 'S15.5.4.14_A4_T16 #2'); for (i$ = 0, to$ = expected.length; i$ < to$; ++i$) { i = i$; assert.strictEqual(expected[i], split[i], "S15.5.4.14_A4_T16 #" + (i + 3)); } split = Object('hello').split(new RegExp(), 'hi'); assert.strictEqual(split.constructor, Array, 'S15.5.4.14_A4_T18 #1'); assert.strictEqual(split.length, 0, 'S15.5.4.14_A4_T18 #2'); split = Object('a b c de f').split(/\s/); expected = ['a', 'b', 'c', 'de', 'f']; assert.strictEqual(split.constructor, Array, 'S15.5.4.14_A4_T19 #1'); assert.strictEqual(split.length, expected.length, 'S15.5.4.14_A4_T19 #2'); for (i$ = 0, to$ = expected.length; i$ < to$; ++i$) { i = i$; assert.strictEqual(expected[i], split[i], "S15.5.4.14_A4_T19 #" + (i + 3)); } split = Object('a b c de f').split(/\s/, 3); expected = ['a', 'b', 'c']; assert.strictEqual(split.constructor, Array, 'S15.5.4.14_A4_T20 #1'); assert.strictEqual(split.length, expected.length, 'S15.5.4.14_A4_T20 #2'); for (i$ = 0, to$ = expected.length; i$ < to$; ++i$) { i = i$; assert.strictEqual(expected[i], split[i], "S15.5.4.14_A4_T20 #" + (i + 3)); } split = Object('a b c de f').split(/X/); assert.strictEqual(split.constructor, Array, 'S15.5.4.14_A4_T21 #1'); assert.strictEqual(split.length, 1, 'S15.5.4.14_A4_T21 #2'); assert.strictEqual(split[0], 'a b c de f', "S15.5.4.14_A4_T21 #3"); split = Object('dfe23iu 34 =+65--').split(/\d+/); expected = ['dfe', 'iu ', ' =+', '--']; assert.strictEqual(split.constructor, Array, 'S15.5.4.14_A4_T22 #1'); assert.strictEqual(split.length, expected.length, 'S15.5.4.14_A4_T22 #2'); for (i$ = 0, to$ = expected.length; i$ < to$; ++i$) { i = i$; assert.strictEqual(expected[i], split[i], "S15.5.4.14_A4_T22 #" + (i + 3)); } if (NATIVE) { split = Object('abc').split(/[a-z]/); expected = ['', '', '', '']; assert.strictEqual(split.constructor, Array, 'S15.5.4.14_A4_T24 #1'); assert.strictEqual(split.length, expected.length, 'S15.5.4.14_A4_T24 #2'); for (i$ = 0, to$ = expected.length; i$ < to$; ++i$) { i = i$; results$.push(assert.strictEqual(expected[i], split[i], "S15.5.4.14_A4_T24 #" + (i + 3))); } return results$; } }); test('RegExp#@@split', function(assert){ assert.isFunction(/./[typeof Symbol != 'undefined' && Symbol !== null ? Symbol.split : void 8]); assert.arity(/./[typeof Symbol != 'undefined' && Symbol !== null ? Symbol.split : void 8], 2); assert.strictEqual(/\s/[typeof Symbol != 'undefined' && Symbol !== null ? Symbol.split : void 8]('a b c de f').length, 5); assert.strictEqual(/\s/[typeof Symbol != 'undefined' && Symbol !== null ? Symbol.split : void 8]('a b c de f', void 8).length, 5); assert.strictEqual(/\s/[typeof Symbol != 'undefined' && Symbol !== null ? Symbol.split : void 8]('a b c de f', 1).length, 1); return assert.strictEqual(/\s/[typeof Symbol != 'undefined' && Symbol !== null ? Symbol.split : void 8]('a b c de f', 10).length, 5); }); test('@@split logic', function(assert){ 'use strict'; var str, num, O, ref$, re; str = STRICT ? 'qwe' : Object('qwe'); num = STRICT ? 123 : Object(123); O = (ref$ = {}, ref$[typeof Symbol != 'undefined' && Symbol !== null ? Symbol.split : void 8] = function(a, b){ return { a: a, b: b }; }, ref$); assert.strictEqual(str.split(O, 42).a, str); assert.strictEqual(str.split(O, 42).b, 42); assert.strictEqual(''.split.call(num, O, 42).a, num); assert.strictEqual(''.split.call(num, O, 42).b, 42); re = /./; re[typeof Symbol != 'undefined' && Symbol !== null ? Symbol.split : void 8] = function(a, b){ return { a: a, b: b }; }; assert.strictEqual(str.split(re, 42).a, str); assert.strictEqual(str.split(re, 42).b, 42); assert.strictEqual(''.split.call(num, re, 42).a, num); return assert.strictEqual(''.split.call(num, re, 42).b, 42); }); }).call(this); // Generated by LiveScript 1.4.0 (function(){ var module, test; module = QUnit.module, test = QUnit.test; module('ES6'); test('RegExp#toString', function(assert){ var toString; toString = /./.toString; assert.isFunction(toString); assert.arity(toString, 0); assert.name(toString, 'toString'); assert.looksNative(toString); assert.nonEnumerable(RegExp.prototype, 'toString'); assert.same(String(/pattern/), '/pattern/'); assert.same(String(/pattern/i), '/pattern/i'); assert.same(String(/pattern/mi), '/pattern/im'); assert.same(String(/pattern/im), '/pattern/im'); assert.same(String(/pattern/mgi), '/pattern/gim'); assert.same(String(new RegExp('pattern')), '/pattern/'); assert.same(String(new RegExp('pattern', 'i')), '/pattern/i'); assert.same(String(new RegExp('pattern', 'mi')), '/pattern/im'); assert.same(String(new RegExp('pattern', 'im')), '/pattern/im'); assert.same(String(new RegExp('pattern', 'mgi')), '/pattern/gim'); assert.same(toString.call({ source: 'foo', flags: 'bar' }), '/foo/bar'); assert.same(toString.call({}), '/undefined/undefined'); if (STRICT) { assert.throws(function(){ toString.call(7); }); assert.throws(function(){ toString.call('a'); }); assert.throws(function(){ toString.call(false); }); assert.throws(function(){ toString.call(null); }); assert.throws(function(){ toString.call(void 8); }); } }); }).call(this); // Generated by LiveScript 1.4.0 (function(){ var module, test, same, getOwnPropertyDescriptor, freeze; module = QUnit.module, test = QUnit.test; module('ES6'); same = function(a, b){ if (a === b) { return a !== 0 || 1 / a === 1 / b; } else { return a != a && b != b; } }; getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor, freeze = Object.freeze; test('Set', function(assert){ var x$, y$, S, r, z$, z1$, done, iter, _add, a, o, key, C; assert.isFunction(Set); assert.name(Set, 'Set'); assert.arity(Set, 0); assert.looksNative(Set); assert.ok('add' in Set.prototype, 'add in Set.prototype'); assert.ok('clear' in Set.prototype, 'clear in Set.prototype'); assert.ok('delete' in Set.prototype, 'delete in Set.prototype'); assert.ok('has' in Set.prototype, 'has in Set.prototype'); assert.ok(new Set instanceof Set, 'new Set instanceof Set'); assert.strictEqual(new Set(createIterable([1, 2, 3])).size, 3, 'Init from iterable'); assert.strictEqual((x$ = new Set(), x$.add(freeze({})), x$.add(1), x$).size, 2, 'Support frozen objects'); y$ = S = new Set(); y$.add(1); y$.add(2); y$.add(3); y$.add(2); y$.add(1); assert.strictEqual(S.size, 3); r = []; S.forEach(function(v){ r.push(v); }); assert.deepEqual(r, [1, 2, 3]); assert.strictEqual((z$ = new Set(), z$.add(NaN), z$.add(NaN), z$.add(NaN), z$).size, 1); if (Array.from) { assert.deepEqual(Array.from((z1$ = new Set([3, 4]), z1$.add(2), z1$.add(1), z1$)), [3, 4, 2, 1]); } done = false; iter = createIterable([null, 1, 2], { 'return': function(){ return done = true; } }); _add = Set.prototype.add; Set.prototype.add = function(){ throw 42; }; try { new Set(iter); } catch (e$) {} Set.prototype.add = _add; assert.ok(done, '.return #throw'); a = []; done = false; a[typeof Symbol != 'undefined' && Symbol !== null ? Symbol.iterator : void 8] = function(){ done = true; return [][typeof Symbol != 'undefined' && Symbol !== null ? Symbol.iterator : void 8].call(this); }; new Set(a); assert.ok(done); o = {}; new Set().add(o); if (DESCRIPTORS) { assert.arrayEqual((function(){ var results$ = []; for (key in o) { results$.push(key); } return results$; }()), []); assert.arrayEqual(Object.keys(o), []); } assert.arrayEqual(Object.getOwnPropertyNames(o), []); ((typeof Object != 'undefined' && Object !== null) && Object.getOwnPropertySymbols) && assert.arrayEqual(Object.getOwnPropertySymbols(o), []); ((typeof Reflect != 'undefined' && Reflect !== null) && Reflect.ownKeys) && assert.arrayEqual(Reflect.ownKeys(o), []); if (nativeSubclass) { C = nativeSubclass(Set); assert.ok(new C instanceof C, 'correct subclassing with native classes #1'); assert.ok(new C instanceof Set, 'correct subclassing with native classes #2'); assert.ok(new C().add(2).has(2), 'correct subclassing with native classes #3'); } }); test('Set#add', function(assert){ var a, x$, S, chain, y$, f; assert.isFunction(Set.prototype.add); assert.name(Set.prototype.add, 'add'); assert.arity(Set.prototype.add, 1); assert.looksNative(Set.prototype.add); assert.nonEnumerable(Set.prototype, 'add'); a = []; x$ = S = new Set(); x$.add(NaN); x$.add(2); x$.add(3); x$.add(2); x$.add(1); x$.add(a); assert.strictEqual(S.size, 5); chain = S.add(NaN); assert.strictEqual(chain, S); assert.strictEqual(S.size, 5); S.add(2); assert.strictEqual(S.size, 5); S.add(a); assert.strictEqual(S.size, 5); S.add([]); assert.strictEqual(S.size, 6); S.add(4); assert.strictEqual(S.size, 7); y$ = S = new Set(); y$.add(freeze(f = {})); assert.ok(S.has(f)); }); test('Set#clear', function(assert){ var S, x$, y$, f; assert.isFunction(Set.prototype.clear); assert.name(Set.prototype.clear, 'clear'); assert.arity(Set.prototype.clear, 0); assert.looksNative(Set.prototype.clear); assert.nonEnumerable(Set.prototype, 'clear'); S = new Set; S.clear(); assert.strictEqual(S.size, 0); x$ = S = new Set(); x$.add(1); x$.add(2); x$.add(3); x$.add(2); x$.add(1); S.clear(); assert.strictEqual(S.size, 0); assert.ok(!S.has(1)); assert.ok(!S.has(2)); assert.ok(!S.has(3)); y$ = S = new Set(); y$.add(1); y$.add(f = freeze({})); S.clear(); assert.strictEqual(S.size, 0, 'Support frozen objects'); assert.ok(!S.has(1)); assert.ok(!S.has(f)); }); test('Set#delete', function(assert){ var a, x$, S, f; assert.isFunction(Set.prototype['delete']); NATIVE && assert.name(Set.prototype['delete'], 'delete'); assert.arity(Set.prototype['delete'], 1); assert.looksNative(Set.prototype['delete']); assert.nonEnumerable(Set.prototype, 'delete'); a = []; x$ = S = new Set(); x$.add(NaN); x$.add(2); x$.add(3); x$.add(2); x$.add(1); x$.add(a); assert.strictEqual(S.size, 5); assert.strictEqual(S['delete'](NaN), true); assert.strictEqual(S.size, 4); assert.strictEqual(S['delete'](4), false); assert.strictEqual(S.size, 4); S['delete']([]); assert.strictEqual(S.size, 4); S['delete'](a); assert.strictEqual(S.size, 3); S.add(freeze(f = {})); assert.strictEqual(S.size, 4); S['delete'](f); assert.strictEqual(S.size, 3); }); test('Set#forEach', function(assert){ var r, count, x$, S, y$, set, s, z$; assert.isFunction(Set.prototype.forEach); assert.name(Set.prototype.forEach, 'forEach'); assert.arity(Set.prototype.forEach, 1); assert.looksNative(Set.prototype.forEach); assert.nonEnumerable(Set.prototype, 'forEach'); r = []; count = 0; x$ = S = new Set(); x$.add(1); x$.add(2); x$.add(3); x$.add(2); x$.add(1); S.forEach(function(value){ count++; r.push(value); }); assert.strictEqual(count, 3); assert.deepEqual(r, [1, 2, 3]); y$ = set = new Set(); y$.add('0'); y$.add('1'); y$.add('2'); y$.add('3'); s = ""; set.forEach(function(it){ s += it; if (it === '2') { set['delete']('2'); set['delete']('3'); set['delete']('1'); return set.add('4'); } }); assert.strictEqual(s, '0124'); z$ = set = new Set(); z$.add('0'); s = ""; set.forEach(function(it){ set['delete']('0'); if (s !== '') { throw '!!!'; } return s += it; }); assert.strictEqual(s, '0'); assert.throws(function(){ Set.prototype.forEach.call(new Map, function(){}); }, 'non-generic'); }); test('Set#has', function(assert){ var a, f, x$, S; assert.isFunction(Set.prototype.has); assert.name(Set.prototype.has, 'has'); assert.arity(Set.prototype.has, 1); assert.looksNative(Set.prototype.has); assert.nonEnumerable(Set.prototype, 'has'); a = []; f = freeze({}); x$ = S = new Set(); x$.add(NaN); x$.add(2); x$.add(3); x$.add(2); x$.add(1); x$.add(f); x$.add(a); assert.ok(S.has(NaN)); assert.ok(S.has(a)); assert.ok(S.has(f)); assert.ok(S.has(2)); assert.ok(!S.has(4)); assert.ok(!S.has([])); }); test('Set#size', function(assert){ var size, x$, sizeDesc; assert.nonEnumerable(Set.prototype, 'size'); size = (x$ = new Set(), x$.add(1), x$).size; assert.strictEqual(typeof size, 'number', 'size is number'); assert.strictEqual(size, 1, 'size is correct'); if (DESCRIPTORS) { sizeDesc = getOwnPropertyDescriptor(Set.prototype, 'size'); assert.ok(sizeDesc && sizeDesc.get, 'size is getter'); assert.ok(sizeDesc && !sizeDesc.set, 'size isnt setter'); assert.throws(function(){ return Set.prototype.size; }, TypeError); } }); test('Set & -0', function(assert){ var set, x$, y$; set = new Set; set.add(-0); assert.strictEqual(set.size, 1); assert.ok(set.has(0)); assert.ok(set.has(-0)); set.forEach(function(it){ return assert.ok(!same(it, -0)); }); set['delete'](-0); assert.strictEqual(set.size, 0); x$ = set = new Set(); x$.add(-0); set.forEach(function(key){ return assert.ok(!same(key, -0)); }); y$ = set = new Set(); y$.add(4); y$.add(3); y$.add(2); y$.add(1); y$.add(0); assert.ok(set.has(-0)); }); test('Set#@@toStringTag', function(assert){ assert.strictEqual(Set.prototype[typeof Symbol != 'undefined' && Symbol !== null ? Symbol.toStringTag : void 8], 'Set', 'Set::@@toStringTag is `Set`'); }); test('Set Iterator', function(assert){ var x$, set, keys, iterator; x$ = set = new Set(); x$.add('a'); x$.add('b'); x$.add('c'); x$.add('d'); keys = []; iterator = set.keys(); keys.push(iterator.next().value); assert.ok(set['delete']('a')); assert.ok(set['delete']('b')); assert.ok(set['delete']('c')); set.add('e'); keys.push(iterator.next().value); keys.push(iterator.next().value); assert.ok(iterator.next().done); set.add('f'); assert.ok(iterator.next().done); assert.deepEqual(keys, ['a', 'd', 'e']); }); test('Set#keys', function(assert){ var iter, x$; assert.ok(typeof Set.prototype.keys === 'function', 'is function'); assert.name(Set.prototype.keys, 'values'); assert.arity(Set.prototype.keys, 0); assert.looksNative(Set.prototype.keys); assert.strictEqual(Set.prototype.keys, Set.prototype.values); assert.nonEnumerable(Set.prototype, 'keys'); iter = (x$ = new Set(), x$.add('q'), x$.add('w'), x$.add('e'), x$).keys(); assert.isIterator(iter); assert.isIterable(iter); assert.strictEqual(iter[typeof Symbol != 'undefined' && Symbol !== null ? Symbol.toStringTag : void 8], 'Set Iterator'); assert.deepEqual(iter.next(), { value: 'q', done: false }); assert.deepEqual(iter.next(), { value: 'w', done: false }); assert.deepEqual(iter.next(), { value: 'e', done: false }); assert.deepEqual(iter.next(), { value: void 8, done: true }); }); test('Set#values', function(assert){ var iter, x$; assert.ok(typeof Set.prototype.values === 'function', 'is function'); assert.name(Set.prototype.values, 'values'); assert.arity(Set.prototype.values, 0); assert.looksNative(Set.prototype.values); assert.nonEnumerable(Set.prototype, 'values'); iter = (x$ = new Set(), x$.add('q'), x$.add('w'), x$.add('e'), x$).values(); assert.isIterator(iter); assert.isIterable(iter); assert.strictEqual(iter[typeof Symbol != 'undefined' && Symbol !== null ? Symbol.toStringTag : void 8], 'Set Iterator'); assert.deepEqual(iter.next(), { value: 'q', done: false }); assert.deepEqual(iter.next(), { value: 'w', done: false }); assert.deepEqual(iter.next(), { value: 'e', done: false }); assert.deepEqual(iter.next(), { value: void 8, done: true }); }); test('Set#entries', function(assert){ var iter, x$; assert.ok(typeof Set.prototype.entries === 'function', 'is function'); assert.name(Set.prototype.entries, 'entries'); assert.arity(Set.prototype.entries, 0); assert.looksNative(Set.prototype.entries); assert.nonEnumerable(Set.prototype, 'entries'); iter = (x$ = new Set(), x$.add('q'), x$.add('w'), x$.add('e'), x$).entries(); assert.isIterator(iter); assert.isIterable(iter); assert.strictEqual(iter[typeof Symbol != 'undefined' && Symbol !== null ? Symbol.toStringTag : void 8], 'Set Iterator'); assert.deepEqual(iter.next(), { value: ['q', 'q'], done: false }); assert.deepEqual(iter.next(), { value: ['w', 'w'], done: false }); assert.deepEqual(iter.next(), { value: ['e', 'e'], done: false }); assert.deepEqual(iter.next(), { value: void 8, done: true }); }); test('Set#@@iterator', function(assert){ var iter, x$; assert.isIterable(Set.prototype); assert.name(Set.prototype[typeof Symbol != 'undefined' && Symbol !== null ? Symbol.iterator : void 8], 'values'); assert.arity(Set.prototype[typeof Symbol != 'undefined' && Symbol !== null ? Symbol.iterator : void 8], 0); assert.looksNative(Set.prototype[typeof Symbol != 'undefined' && Symbol !== null ? Symbol.iterator : void 8]); assert.strictEqual(Set.prototype[typeof Symbol != 'undefined' && Symbol !== null ? Symbol.iterator : void 8], Set.prototype.values); assert.nonEnumerable(Set.prototype, 'values'); iter = (x$ = new Set(), x$.add('q'), x$.add('w'), x$.add('e'), x$)[typeof Symbol != 'undefined' && Symbol !== null ? Symbol.iterator : void 8](); assert.isIterator(iter); assert.isIterable(iter); assert.strictEqual(iter[typeof Symbol != 'undefined' && Symbol !== null ? Symbol.toStringTag : void 8], 'Set Iterator'); assert.deepEqual(iter.next(), { value: 'q', done: false }); assert.deepEqual(iter.next(), { value: 'w', done: false }); assert.deepEqual(iter.next(), { value: 'e', done: false }); assert.deepEqual(iter.next(), { value: void 8, done: true }); }); }).call(this); // Generated by LiveScript 1.4.0 (function(){ var module, test; module = QUnit.module, test = QUnit.test; module('ES6'); test('String#anchor', function(assert){ assert.isFunction(String.prototype.anchor); assert.arity(String.prototype.anchor, 1); assert.name(String.prototype.anchor, 'anchor'); assert.looksNative(String.prototype.anchor); assert.nonEnumerable(String.prototype, 'anchor'); assert.same('a'.anchor('b'), 'a', 'lower case'); assert.same('a'.anchor('"'), 'a', 'escape quotes'); }); }).call(this); // Generated by LiveScript 1.4.0 (function(){ var module, test; module = QUnit.module, test = QUnit.test; module('ES6'); test('String#big', function(assert){ assert.isFunction(String.prototype.big); assert.arity(String.prototype.big, 0); assert.name(String.prototype.big, 'big'); assert.looksNative(String.prototype.big); assert.nonEnumerable(String.prototype, 'big'); assert.same('a'.big(), 'a', 'lower case'); }); }).call(this); // Generated by LiveScript 1.4.0 (function(){ var module, test; module = QUnit.module, test = QUnit.test; module('ES6'); test('String#blink', function(assert){ assert.isFunction(String.prototype.blink); assert.arity(String.prototype.blink, 0); assert.name(String.prototype.blink, 'blink'); assert.looksNative(String.prototype.blink); assert.nonEnumerable(String.prototype, 'blink'); assert.same('a'.blink(), 'a', 'lower case'); }); }).call(this); // Generated by LiveScript 1.4.0 (function(){ var module, test; module = QUnit.module, test = QUnit.test; module('ES6'); test('String#bold', function(assert){ assert.isFunction(String.prototype.bold); assert.arity(String.prototype.bold, 0); assert.name(String.prototype.bold, 'bold'); assert.looksNative(String.prototype.bold); assert.nonEnumerable(String.prototype, 'bold'); assert.same('a'.bold(), 'a', 'lower case'); }); }).call(this); // Generated by LiveScript 1.4.0 (function(){ var module, test; module = QUnit.module, test = QUnit.test; module('ES6'); test('String#codePointAt', function(assert){ assert.isFunction(String.prototype.codePointAt); assert.arity(String.prototype.codePointAt, 1); assert.name(String.prototype.codePointAt, 'codePointAt'); assert.looksNative(String.prototype.codePointAt); assert.nonEnumerable(String.prototype, 'codePointAt'); assert.strictEqual('abc\uD834\uDF06def'.codePointAt(''), 0x61); assert.strictEqual('abc\uD834\uDF06def'.codePointAt('_'), 0x61); assert.strictEqual('abc\uD834\uDF06def'.codePointAt(), 0x61); assert.strictEqual('abc\uD834\uDF06def'.codePointAt(-Infinity), void 8); assert.strictEqual('abc\uD834\uDF06def'.codePointAt(-1), void 8); assert.strictEqual('abc\uD834\uDF06def'.codePointAt(-0), 0x61); assert.strictEqual('abc\uD834\uDF06def'.codePointAt(0), 0x61); assert.strictEqual('abc\uD834\uDF06def'.codePointAt(3), 0x1D306); assert.strictEqual('abc\uD834\uDF06def'.codePointAt(4), 0xDF06); assert.strictEqual('abc\uD834\uDF06def'.codePointAt(5), 0x64); assert.strictEqual('abc\uD834\uDF06def'.codePointAt(42), void 8); assert.strictEqual('abc\uD834\uDF06def'.codePointAt(Infinity), void 8); assert.strictEqual('abc\uD834\uDF06def'.codePointAt(Infinity), void 8); assert.strictEqual('abc\uD834\uDF06def'.codePointAt(NaN), 0x61); assert.strictEqual('abc\uD834\uDF06def'.codePointAt(false), 0x61); assert.strictEqual('abc\uD834\uDF06def'.codePointAt(null), 0x61); assert.strictEqual('abc\uD834\uDF06def'.codePointAt(void 8), 0x61); assert.strictEqual('\uD834\uDF06def'.codePointAt(''), 0x1D306); assert.strictEqual('\uD834\uDF06def'.codePointAt('1'), 0xDF06); assert.strictEqual('\uD834\uDF06def'.codePointAt('_'), 0x1D306); assert.strictEqual('\uD834\uDF06def'.codePointAt(), 0x1D306); assert.strictEqual('\uD834\uDF06def'.codePointAt(-1), void 8); assert.strictEqual('\uD834\uDF06def'.codePointAt(-0), 0x1D306); assert.strictEqual('\uD834\uDF06def'.codePointAt(0), 0x1D306); assert.strictEqual('\uD834\uDF06def'.codePointAt(1), 0xDF06); assert.strictEqual('\uD834\uDF06def'.codePointAt(42), void 8); assert.strictEqual('\uD834\uDF06def'.codePointAt(false), 0x1D306); assert.strictEqual('\uD834\uDF06def'.codePointAt(null), 0x1D306); assert.strictEqual('\uD834\uDF06def'.codePointAt(void 8), 0x1D306); assert.strictEqual('\uD834abc'.codePointAt(''), 0xD834); assert.strictEqual('\uD834abc'.codePointAt('_'), 0xD834); assert.strictEqual('\uD834abc'.codePointAt(), 0xD834); assert.strictEqual('\uD834abc'.codePointAt(-1), void 8); assert.strictEqual('\uD834abc'.codePointAt(-0), 0xD834); assert.strictEqual('\uD834abc'.codePointAt(0), 0xD834); assert.strictEqual('\uD834abc'.codePointAt(false), 0xD834); assert.strictEqual('\uD834abc'.codePointAt(NaN), 0xD834); assert.strictEqual('\uD834abc'.codePointAt(null), 0xD834); assert.strictEqual('\uD834abc'.codePointAt(void 8), 0xD834); assert.strictEqual('\uDF06abc'.codePointAt(''), 0xDF06); assert.strictEqual('\uDF06abc'.codePointAt('_'), 0xDF06); assert.strictEqual('\uDF06abc'.codePointAt(), 0xDF06); assert.strictEqual('\uDF06abc'.codePointAt(-1), void 8); assert.strictEqual('\uDF06abc'.codePointAt(-0), 0xDF06); assert.strictEqual('\uDF06abc'.codePointAt(0), 0xDF06); assert.strictEqual('\uDF06abc'.codePointAt(false), 0xDF06); assert.strictEqual('\uDF06abc'.codePointAt(NaN), 0xDF06); assert.strictEqual('\uDF06abc'.codePointAt(null), 0xDF06); assert.strictEqual('\uDF06abc'.codePointAt(void 8), 0xDF06); if (STRICT) { assert.throws(function(){ String.prototype.codePointAt.call(null, 0); }, TypeError); assert.throws(function(){ String.prototype.codePointAt.call(void 8, 0); }, TypeError); } }); }).call(this); // Generated by LiveScript 1.4.0 (function(){ var module, test; module = QUnit.module, test = QUnit.test; module('ES6'); test('String#endsWith', function(assert){ var re, e, O; assert.isFunction(String.prototype.endsWith); assert.arity(String.prototype.endsWith, 1); assert.name(String.prototype.endsWith, 'endsWith'); assert.looksNative(String.prototype.endsWith); assert.nonEnumerable(String.prototype, 'endsWith'); assert.ok('undefined'.endsWith()); assert.ok(!'undefined'.endsWith(null)); assert.ok('abc'.endsWith('')); assert.ok('abc'.endsWith('c')); assert.ok('abc'.endsWith('bc')); assert.ok(!'abc'.endsWith('ab')); assert.ok('abc'.endsWith('', NaN)); assert.ok(!'abc'.endsWith('c', -1)); assert.ok('abc'.endsWith('a', 1)); assert.ok('abc'.endsWith('c', Infinity)); assert.ok('abc'.endsWith('a', true)); assert.ok(!'abc'.endsWith('c', 'x')); assert.ok(!'abc'.endsWith('a', 'x')); if (STRICT) { assert.throws(function(){ String.prototype.endsWith.call(null, '.'); }, TypeError); assert.throws(function(){ String.prototype.endsWith.call(void 8, '.'); }, TypeError); } re = /./; assert.throws(function(){ '/./'.endsWith(re); }, TypeError); re[typeof Symbol != 'undefined' && Symbol !== null ? Symbol.match : void 8] = false; assert.ok((function(){ try { return '/./'.endsWith(re); } catch (e$) { e = e$; return false; } }())); O = {}; assert.ok((function(){ try { return '[object Object]'.endsWith(O); } catch (e$) { e = e$; return false; } }())); O[typeof Symbol != 'undefined' && Symbol !== null ? Symbol.match : void 8] = true; assert.throws(function(){ '[object Object]'.endsWith(O); }, TypeError); }); }).call(this); // Generated by LiveScript 1.4.0 (function(){ var module, test; module = QUnit.module, test = QUnit.test; module('ES6'); test('String#fixed', function(assert){ assert.isFunction(String.prototype.fixed); assert.arity(String.prototype.fixed, 0); assert.name(String.prototype.fixed, 'fixed'); assert.looksNative(String.prototype.fixed); assert.nonEnumerable(String.prototype, 'fixed'); assert.same('a'.fixed(), 'a', 'lower case'); }); }).call(this); // Generated by LiveScript 1.4.0 (function(){ var module, test; module = QUnit.module, test = QUnit.test; module('ES6'); test('String#fontcolor', function(assert){ assert.isFunction(String.prototype.fontcolor); assert.arity(String.prototype.fontcolor, 1); assert.name(String.prototype.fontcolor, 'fontcolor'); assert.looksNative(String.prototype.fontcolor); assert.nonEnumerable(String.prototype, 'fontcolor'); assert.same('a'.fontcolor('b'), 'a', 'lower case'); assert.same('a'.fontcolor('"'), 'a', 'escape quotes'); }); }).call(this); // Generated by LiveScript 1.4.0 (function(){ var module, test; module = QUnit.module, test = QUnit.test; module('ES6'); test('String#fontsize', function(assert){ assert.isFunction(String.prototype.fontsize); assert.arity(String.prototype.fontsize, 1); assert.name(String.prototype.fontsize, 'fontsize'); assert.looksNative(String.prototype.fontsize); assert.nonEnumerable(String.prototype, 'fontsize'); assert.same('a'.fontsize('b'), 'a', 'lower case'); assert.same('a'.fontsize('"'), 'a', 'escape quotes'); }); }).call(this); // Generated by LiveScript 1.4.0 (function(){ var module, test; module = QUnit.module, test = QUnit.test; module('ES6'); test('String.fromCodePoint', function(assert){ var fromCodePoint, tmp, counter, result; fromCodePoint = String.fromCodePoint; assert.isFunction(fromCodePoint); assert.arity(fromCodePoint, 1); assert.name(fromCodePoint, 'fromCodePoint'); assert.looksNative(fromCodePoint); assert.nonEnumerable(String, 'fromCodePoint'); assert.strictEqual(fromCodePoint(''), '\0'); assert.strictEqual(fromCodePoint(), ''); assert.strictEqual(fromCodePoint(-0), '\0'); assert.strictEqual(fromCodePoint(0), '\0'); assert.strictEqual(fromCodePoint(0x1D306), '\uD834\uDF06'); assert.strictEqual(fromCodePoint(0x1D306, 0x61, 0x1D307), '\uD834\uDF06a\uD834\uDF07'); assert.strictEqual(fromCodePoint(0x61, 0x62, 0x1D307), 'ab\uD834\uDF07'); assert.strictEqual(fromCodePoint(false), '\0'); assert.strictEqual(fromCodePoint(null), '\0'); assert.throws(function(){ fromCodePoint('_'); }, RangeError); assert.throws(function(){ fromCodePoint('+Infinity'); }, RangeError); assert.throws(function(){ fromCodePoint('-Infinity'); }, RangeError); assert.throws(function(){ fromCodePoint(-1); }, RangeError); assert.throws(function(){ fromCodePoint(0x10FFFF + 1); }, RangeError); assert.throws(function(){ fromCodePoint(3.14); }, RangeError); assert.throws(function(){ fromCodePoint(3e-2); }, RangeError); assert.throws(function(){ fromCodePoint(-Infinity); }, RangeError); assert.throws(function(){ fromCodePoint(Infinity); }, RangeError); assert.throws(function(){ fromCodePoint(NaN); }, RangeError); assert.throws(function(){ fromCodePoint(void 8); }, RangeError); assert.throws(function(){ fromCodePoint({}); }, RangeError); assert.throws(function(){ fromCodePoint(/./); }, RangeError); tmp = 0x60; assert.strictEqual(fromCodePoint({ valueOf: function(){ return ++tmp; } }), 'a'); assert.strictEqual(tmp, 0x61); counter = Math.pow(2, 15) * 3 / 2; result = []; while (--counter >= 0) { result.push(0); } fromCodePoint.apply(null, result); counter = Math.pow(2, 15) * 3 / 2; result = []; while (--counter >= 0) { result.push(0xFFFF + 1); } fromCodePoint.apply(null, result); }); }).call(this); // Generated by LiveScript 1.4.0 (function(){ var module, test; module = QUnit.module, test = QUnit.test; module('ES6'); test('String#includes', function(assert){ var re, e, O; assert.isFunction(String.prototype.includes); assert.arity(String.prototype.includes, 1); assert.name(String.prototype.includes, 'includes'); assert.looksNative(String.prototype.includes); assert.nonEnumerable(String.prototype, 'includes'); assert.ok(!'abc'.includes()); assert.ok('aundefinedb'.includes()); assert.ok('abcd'.includes('b', 1)); assert.ok(!'abcd'.includes('b', 2)); if (STRICT) { assert.throws(function(){ String.prototype.includes.call(null, '.'); }, TypeError); assert.throws(function(){ String.prototype.includes.call(void 8, '.'); }, TypeError); } re = /./; assert.throws(function(){ '/./'.includes(re); }, TypeError); re[typeof Symbol != 'undefined' && Symbol !== null ? Symbol.match : void 8] = false; assert.ok((function(){ try { return '/./'.includes(re); } catch (e$) { e = e$; return false; } }())); O = {}; assert.ok((function(){ try { return '[object Object]'.includes(O); } catch (e$) { e = e$; return false; } }())); O[typeof Symbol != 'undefined' && Symbol !== null ? Symbol.match : void 8] = true; assert.throws(function(){ '[object Object]'.includes(O); }, TypeError); }); }).call(this); // Generated by LiveScript 1.4.0 (function(){ var module, test; module = QUnit.module, test = QUnit.test; module('ES6'); test('String#italics', function(assert){ assert.isFunction(String.prototype.italics); assert.arity(String.prototype.italics, 0); assert.name(String.prototype.italics, 'italics'); assert.looksNative(String.prototype.italics); assert.nonEnumerable(String.prototype, 'italics'); assert.same('a'.italics(), 'a', 'lower case'); }); }).call(this); // Generated by LiveScript 1.4.0 (function(){ var module, test; module = QUnit.module, test = QUnit.test; module('ES6'); test('String#@@iterator', function(assert){ var iter; assert.isIterable(String.prototype); iter = 'qwe'[typeof Symbol != 'undefined' && Symbol !== null ? Symbol.iterator : void 8](); assert.isIterator(iter); assert.isIterable(iter); assert.strictEqual(iter[typeof Symbol != 'undefined' && Symbol !== null ? Symbol.toStringTag : void 8], 'String Iterator'); assert.deepEqual(iter.next(), { value: 'q', done: false }); assert.deepEqual(iter.next(), { value: 'w', done: false }); assert.deepEqual(iter.next(), { value: 'e', done: false }); assert.deepEqual(iter.next(), { value: void 8, done: true }); assert.strictEqual(Array.from('𠮷𠮷𠮷').length, 3); iter = '𠮷𠮷𠮷'[typeof Symbol != 'undefined' && Symbol !== null ? Symbol.iterator : void 8](); assert.deepEqual(iter.next(), { value: '𠮷', done: false }); assert.deepEqual(iter.next(), { value: '𠮷', done: false }); assert.deepEqual(iter.next(), { value: '𠮷', done: false }); assert.deepEqual(iter.next(), { value: void 8, done: true }); }); }).call(this); // Generated by LiveScript 1.4.0 (function(){ var module, test; module = QUnit.module, test = QUnit.test; module('ES6'); test('String#link', function(assert){ assert.isFunction(String.prototype.link); assert.arity(String.prototype.link, 1); assert.name(String.prototype.link, 'link'); assert.looksNative(String.prototype.link); assert.nonEnumerable(String.prototype, 'link'); assert.same('a'.link('b'), 'a', 'lower case'); assert.same('a'.link('"'), 'a', 'escape quotes'); }); }).call(this); // Generated by LiveScript 1.4.0 (function(){ var module, test; module = QUnit.module, test = QUnit.test; module('ES6'); test('String.raw', function(assert){ var raw; raw = String.raw; assert.isFunction(raw); assert.arity(raw, 1); assert.name(raw, 'raw'); assert.looksNative(raw); assert.nonEnumerable(String, 'raw'); assert.strictEqual(raw({ raw: ['Hi\\n', '!'] }, 'Bob'), 'Hi\\nBob!', 'raw is array'); assert.strictEqual(raw({ raw: 'test' }, 0, 1, 2), 't0e1s2t', 'raw is string'); assert.strictEqual(raw({ raw: 'test' }, 0), 't0est', 'lacks substituting'); assert.throws(function(){ raw({}); }, TypeError); assert.throws(function(){ raw({ raw: null }); }, TypeError); }); }).call(this); // Generated by LiveScript 1.4.0 (function(){ var module, test; module = QUnit.module, test = QUnit.test; module('ES6'); test('String#repeat', function(assert){ assert.isFunction(String.prototype.repeat); assert.arity(String.prototype.repeat, 1); assert.name(String.prototype.repeat, 'repeat'); assert.looksNative(String.prototype.repeat); assert.nonEnumerable(String.prototype, 'repeat'); assert.strictEqual('qwe'.repeat(3), 'qweqweqwe'); assert.strictEqual('qwe'.repeat(2.5), 'qweqwe'); assert.throws(function(){ 'qwe'.repeat(-1); }, RangeError); assert.throws(function(){ 'qwe'.repeat(Infinity); }, RangeError); if (STRICT) { assert.throws(function(){ String.prototype.repeat.call(null, 1); }, TypeError); assert.throws(function(){ String.prototype.repeat.call(void 8, 1); }, TypeError); } }); }).call(this); // Generated by LiveScript 1.4.0 (function(){ var module, test; module = QUnit.module, test = QUnit.test; module('ES6'); test('String#small', function(assert){ assert.isFunction(String.prototype.small); assert.arity(String.prototype.small, 0); assert.name(String.prototype.small, 'small'); assert.looksNative(String.prototype.small); assert.nonEnumerable(String.prototype, 'small'); assert.same('a'.small(), 'a', 'lower case'); }); }).call(this); // Generated by LiveScript 1.4.0 (function(){ var module, test; module = QUnit.module, test = QUnit.test; module('ES6'); test('String#startsWith', function(assert){ var re, e, O; assert.isFunction(String.prototype.startsWith); assert.arity(String.prototype.startsWith, 1); assert.name(String.prototype.startsWith, 'startsWith'); assert.looksNative(String.prototype.startsWith); assert.nonEnumerable(String.prototype, 'startsWith'); assert.ok('undefined'.startsWith()); assert.ok(!'undefined'.startsWith(null)); assert.ok('abc'.startsWith('')); assert.ok('abc'.startsWith('a')); assert.ok('abc'.startsWith('ab')); assert.ok(!'abc'.startsWith('bc')); assert.ok('abc'.startsWith('', NaN)); assert.ok('abc'.startsWith('a', -1)); assert.ok(!'abc'.startsWith('a', 1)); assert.ok(!'abc'.startsWith('a', Infinity)); assert.ok('abc'.startsWith('b', true)); assert.ok('abc'.startsWith('a', 'x')); if (STRICT) { assert.throws(function(){ String.prototype.startsWith.call(null, '.'); }, TypeError); assert.throws(function(){ String.prototype.startsWith.call(void 8, '.'); }, TypeError); } re = /./; assert.throws(function(){ '/./'.startsWith(re); }, TypeError); re[typeof Symbol != 'undefined' && Symbol !== null ? Symbol.match : void 8] = false; assert.ok((function(){ try { return '/./'.startsWith(re); } catch (e$) { e = e$; return false; } }())); O = {}; assert.ok((function(){ try { return '[object Object]'.startsWith(O); } catch (e$) { e = e$; return false; } }())); O[typeof Symbol != 'undefined' && Symbol !== null ? Symbol.match : void 8] = true; assert.throws(function(){ '[object Object]'.startsWith(O); }, TypeError); }); }).call(this); // Generated by LiveScript 1.4.0 (function(){ var module, test; module = QUnit.module, test = QUnit.test; module('ES6'); test('String#strike', function(assert){ assert.isFunction(String.prototype.strike); assert.arity(String.prototype.strike, 0); assert.name(String.prototype.strike, 'strike'); assert.looksNative(String.prototype.strike); assert.nonEnumerable(String.prototype, 'strike'); assert.same('a'.strike(), 'a', 'lower case'); }); }).call(this); // Generated by LiveScript 1.4.0 (function(){ var module, test; module = QUnit.module, test = QUnit.test; module('ES6'); test('String#sub', function(assert){ assert.isFunction(String.prototype.sub); assert.arity(String.prototype.sub, 0); assert.name(String.prototype.sub, 'sub'); assert.looksNative(String.prototype.sub); assert.nonEnumerable(String.prototype, 'sub'); assert.same('a'.sub(), 'a', 'lower case'); }); }).call(this); // Generated by LiveScript 1.4.0 (function(){ var module, test; module = QUnit.module, test = QUnit.test; module('ES6'); test('String#sup', function(assert){ assert.isFunction(String.prototype.sup); assert.arity(String.prototype.sup, 0); assert.name(String.prototype.sup, 'sup'); assert.looksNative(String.prototype.sup); assert.nonEnumerable(String.prototype, 'sup'); assert.same('a'.sup(), 'a', 'lower case'); }); }).call(this); // Generated by LiveScript 1.4.0 (function(){ var module, test; module = QUnit.module, test = QUnit.test; module('ES6'); test('String#trim', function(assert){ assert.isFunction(''.trim); assert.arity(String.prototype.trim, 0); assert.name(String.prototype.trim, 'trim'); assert.looksNative(String.prototype.trim); assert.nonEnumerable(String.prototype, 'trim'); assert.strictEqual(' \n q w e \n '.trim(), 'q w e', 'removes whitespaces at left & right side of string'); assert.strictEqual('\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u180E\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF'.trim(), '', 'removes all whitespaces'); assert.strictEqual('\u200b\u0085'.trim(), '\u200b\u0085', "shouldn't remove this symbols"); if (STRICT) { assert.throws(function(){ String.prototype.trim.call(null, 0); }, TypeError); assert.throws(function(){ String.prototype.trim.call(void 8, 0); }, TypeError); } }); }).call(this); // Generated by LiveScript 1.4.0 (function(){ var module, test, defineProperty, getOwnPropertyDescriptor, create, i$, ref$, len$, $key; module = QUnit.module, test = QUnit.test; module('ES6'); defineProperty = Object.defineProperty, getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor, create = Object.create; test('Symbol', function(assert){ var s1, s2, O, count, i; assert.isFunction(Symbol); NATIVE && assert.strictEqual(Symbol.length, 0, 'arity is 0'); assert.name(Symbol, 'Symbol'); assert.looksNative(Symbol); s1 = Symbol('foo'); s2 = Symbol('foo'); assert.ok(s1 !== s2, 'Symbol("foo") !== Symbol("foo")'); O = {}; O[s1] = 42; assert.ok(O[s1] === 42, 'Symbol() work as key'); assert.ok(O[s2] !== 42, 'Various symbols from one description are various keys'); if (DESCRIPTORS) { count = 0; for (i in O) { count++; } assert.ok(count === 0, 'object[Symbol()] is not enumerable'); } }); test('Well-known Symbols', function(assert){ var i$, x$, ref$, len$, desc; for (i$ = 0, len$ = (ref$ = ['hasInstance', 'isConcatSpreadable', 'iterator', 'match', 'replace', 'search', 'species', 'split', 'toPrimitive', 'toStringTag', 'unscopables']).length; i$ < len$; ++i$) { x$ = ref$[i$]; assert.ok(x$ in Symbol, "Symbol." + x$ + " available"); assert.nonEnumerable(Symbol, x$); assert.ok(Object(Symbol[x$]) instanceof Symbol, "Symbol." + x$ + " is symbol"); if (DESCRIPTORS) { desc = getOwnPropertyDescriptor(Symbol, x$); assert.ok(!desc.enumerble, 'non-enumerable'); assert.ok(!desc.writable, 'non-writable'); assert.ok(!desc.configurable, 'non-configurable'); } } }); test('Global symbol registry', function(assert){ var symbol; assert.isFunction(Symbol['for'], 'Symbol.for is function'); assert.nonEnumerable(Symbol, 'for'); assert.strictEqual(Symbol['for'].length, 1, 'Symbol.for arity is 1'); NATIVE && assert.strictEqual(Symbol['for'].name, 'for', 'Symbol.for.name is "for"'); assert.ok(/native code/.test(Symbol['for']), 'Symbol.for looks like native'); assert.isFunction(Symbol.keyFor, 'Symbol.keyFor is function'); assert.nonEnumerable(Symbol, 'keyFor'); assert.strictEqual(Symbol.keyFor.length, 1, 'Symbol.keyFor arity is 1'); assert.strictEqual(Symbol.keyFor.name, 'keyFor', 'Symbol.keyFor.name is "keyFor"'); assert.ok(/native code/.test(Symbol.keyFor), 'Symbol.keyFor looks like native'); symbol = Symbol['for']('foo'); assert.strictEqual(Symbol['for']('foo'), symbol); assert.strictEqual(Symbol.keyFor(symbol), 'foo'); assert.throws(function(){ Symbol.keyFor('foo'); }, 'throws on non-symbol'); }); test('Symbol#@@toPrimitive', function(assert){ var S; assert.isFunction(Symbol.prototype[Symbol.toPrimitive]); S = Symbol(); assert.same(S, S[Symbol.toPrimitive](), 'works'); }); test('Symbol#@@toStringTag', function(assert){ assert.ok(Symbol.prototype[Symbol.toStringTag] === 'Symbol', 'Symbol::@@toStringTag is `Symbol`'); }); test('Object.getOwnPropertySymbols', function(assert){ var getOwnPropertySymbols, getOwnPropertyNames, obj, foo, ref$; getOwnPropertySymbols = Object.getOwnPropertySymbols, getOwnPropertyNames = Object.getOwnPropertyNames; assert.isFunction(getOwnPropertySymbols); assert.nonEnumerable(Object, 'getOwnPropertySymbols'); assert.strictEqual(getOwnPropertySymbols.length, 1, 'arity is 1'); assert.name(getOwnPropertySymbols, 'getOwnPropertySymbols'); assert.looksNative(getOwnPropertySymbols); obj = { q: 1, w: 2, e: 3 }; obj[Symbol()] = 42; obj[Symbol()] = 43; assert.deepEqual(getOwnPropertyNames(obj).sort(), ['e', 'q', 'w']); assert.strictEqual(getOwnPropertySymbols(obj).length, 2); foo = (ref$ = clone$(obj), ref$.a = 1, ref$.s = 2, ref$.d = 3, ref$); foo[Symbol()] = 44; assert.deepEqual(getOwnPropertyNames(foo).sort(), ['a', 'd', 's']); assert.strictEqual(getOwnPropertySymbols(foo).length, 1); assert.strictEqual(getOwnPropertySymbols(Object.prototype).length, 0); }); if (typeof JSON != 'undefined' && JSON !== null) { test('Symbols & JSON.stringify', function(assert){ var ref$; assert.strictEqual(JSON.stringify([1, Symbol('foo'), false, Symbol('bar'), {}]), '[1,null,false,null,{}]', 'array value'); assert.strictEqual(JSON.stringify({ foo: Symbol('foo') }), '{}', 'object value'); if (DESCRIPTORS) { assert.strictEqual(JSON.stringify((ref$ = {}, ref$[Symbol('foo')] = 1, ref$.bar = 2, ref$)), '{"bar":2}', 'object key'); } assert.strictEqual(JSON.stringify(Symbol('foo')), void 8, 'symbol value'); if (typeof Symbol() === 'symbol') { assert.strictEqual(JSON.stringify(Object(Symbol('foo'))), '{}', 'boxed symbol'); } }); } if (DESCRIPTORS) { test('Symbols & descriptors', function(assert){ var create, defineProperty, getOwnPropertyDescriptor, keys, getOwnPropertyNames, getOwnPropertySymbols, d, e, f, i, j, proto, ref$, O, desc; create = Object.create, defineProperty = Object.defineProperty, getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor, keys = Object.keys, getOwnPropertyNames = Object.getOwnPropertyNames, getOwnPropertySymbols = Object.getOwnPropertySymbols; d = Symbol('d'); e = Symbol('e'); f = Symbol('f'); i = Symbol('i'); j = Symbol('j'); proto = (ref$ = { g: 'g' }, ref$[i] = 'i', ref$); defineProperty(proto, 'h', { value: 'h' }); defineProperty(proto, 'j', { value: 'j' }); O = create(proto); O.a = 'a'; O[d] = 'd'; defineProperty(O, 'b', { value: 'b' }); defineProperty(O, 'c', { value: 'c', enumerable: true }); defineProperty(O, e, { configurable: true, writable: true, value: 'e' }); desc = { value: 'f', enumerable: true }; defineProperty(O, f, desc); assert.strictEqual(desc.enumerable, true, 'defineProperty not changes descriptor object'); assert.deepEqual(getOwnPropertyDescriptor(O, 'a'), { configurable: true, writable: true, enumerable: true, value: 'a' }, 'getOwnPropertyDescriptor a'); assert.deepEqual(getOwnPropertyDescriptor(O, 'b'), { configurable: false, writable: false, enumerable: false, value: 'b' }, 'getOwnPropertyDescriptor b'); assert.deepEqual(getOwnPropertyDescriptor(O, 'c'), { configurable: false, writable: false, enumerable: true, value: 'c' }, 'getOwnPropertyDescriptor c'); assert.deepEqual(getOwnPropertyDescriptor(O, d), { configurable: true, writable: true, enumerable: true, value: 'd' }, 'getOwnPropertyDescriptor d'); assert.deepEqual(getOwnPropertyDescriptor(O, e), { configurable: true, writable: true, enumerable: false, value: 'e' }, 'getOwnPropertyDescriptor e'); assert.deepEqual(getOwnPropertyDescriptor(O, f), { configurable: false, writable: false, enumerable: true, value: 'f' }, 'getOwnPropertyDescriptor f'); assert.strictEqual(getOwnPropertyDescriptor(O, 'g'), void 8, 'getOwnPropertyDescriptor g'); assert.strictEqual(getOwnPropertyDescriptor(O, 'h'), void 8, 'getOwnPropertyDescriptor h'); assert.strictEqual(getOwnPropertyDescriptor(O, i), void 8, 'getOwnPropertyDescriptor i'); assert.strictEqual(getOwnPropertyDescriptor(O, j), void 8, 'getOwnPropertyDescriptor j'); assert.strictEqual(getOwnPropertyDescriptor(O, 'k'), void 8, 'getOwnPropertyDescriptor k'); assert.strictEqual(getOwnPropertyDescriptor(Object.prototype, 'toString').enumerable, false, 'getOwnPropertyDescriptor on Object.prototype'); assert.strictEqual(getOwnPropertyDescriptor(Object.prototype, d), void 8, 'getOwnPropertyDescriptor on Object.prototype missed symbol'); assert.strictEqual(O.propertyIsEnumerable('a'), true, 'propertyIsEnumerable a'); assert.strictEqual(O.propertyIsEnumerable('b'), false, 'propertyIsEnumerable b'); assert.strictEqual(O.propertyIsEnumerable('c'), true, 'propertyIsEnumerable c'); assert.strictEqual(O.propertyIsEnumerable(d), true, 'propertyIsEnumerable d'); assert.strictEqual(O.propertyIsEnumerable(e), false, 'propertyIsEnumerable e'); assert.strictEqual(O.propertyIsEnumerable(f), true, 'propertyIsEnumerable f'); assert.strictEqual(O.propertyIsEnumerable('g'), false, 'propertyIsEnumerable g'); assert.strictEqual(O.propertyIsEnumerable('h'), false, 'propertyIsEnumerable h'); assert.strictEqual(O.propertyIsEnumerable(i), false, 'propertyIsEnumerable i'); assert.strictEqual(O.propertyIsEnumerable(j), false, 'propertyIsEnumerable j'); assert.strictEqual(O.propertyIsEnumerable('k'), false, 'propertyIsEnumerable k'); assert.strictEqual(Object.prototype.propertyIsEnumerable('toString'), false, 'propertyIsEnumerable on Object.prototype'); assert.strictEqual(Object.prototype.propertyIsEnumerable(d), false, 'propertyIsEnumerable on Object.prototype missed symbol'); assert.strictEqual(keys(O).length, 2, 'Object.keys'); assert.strictEqual(getOwnPropertyNames(O).length, 3, 'Object.getOwnPropertyNames'); assert.strictEqual(getOwnPropertySymbols(O).length, 3, 'Object.getOwnPropertySymbols'); ((typeof Reflect != 'undefined' && Reflect !== null) && Reflect.ownKeys) && assert.strictEqual(Reflect.ownKeys(O).length, 6, 'Reflect.ownKeys'); delete O[e]; O[e] = 'e'; assert.deepEqual(getOwnPropertyDescriptor(O, e), { configurable: true, writable: true, enumerable: true, value: 'e' }, 'redefined non-enum key'); }); test('Symbols & Object.defineProperties', function(assert){ var defineProperty, defineProperties, c, d, D, ref$, O; defineProperty = Object.defineProperty, defineProperties = Object.defineProperties; c = Symbol('c'); d = Symbol('d'); D = (ref$ = { a: { value: 'a' } }, ref$[c] = { value: 'c' }, ref$); defineProperty(D, 'b', { value: { value: 'b' } }); defineProperty(D, d, { value: { value: 'd' } }); O = defineProperties({}, D); assert.strictEqual(O.a, 'a', 'a'); assert.strictEqual(O.b, void 8, 'b'); assert.strictEqual(O[c], 'c', 'c'); assert.strictEqual(O[d], void 8, 'd'); }); test('Symbols & Object.create', function(assert){ var defineProperty, create, c, d, D, ref$, O; defineProperty = Object.defineProperty, create = Object.create; c = Symbol('c'); d = Symbol('d'); D = (ref$ = { a: { value: 'a' } }, ref$[c] = { value: 'c' }, ref$); defineProperty(D, 'b', { value: { value: 'b' } }); defineProperty(D, d, { value: { value: 'd' } }); O = create(null, D); assert.strictEqual(O.a, 'a', 'a'); assert.strictEqual(O.b, void 8, 'b'); assert.strictEqual(O[c], 'c', 'c'); assert.strictEqual(O[d], void 8, 'd'); }); for (i$ = 0, len$ = (ref$ = ['Array', 'RegExp', 'Map', 'Set', 'Promise']).length; i$ < len$; ++i$) { $key = ref$[i$]; (fn$.call(this, $key)); } } function clone$(it){ function fun(){} fun.prototype = it; return new fun; } function fn$(key){ test(key + "@@species", function(assert){ var C; assert.strictEqual(global[key][Symbol.species], global[key], key + "@@species === " + key); C = Object.create(global[key]); assert.strictEqual(C[Symbol.species], C, key + " sub"); }); } }).call(this); // Generated by LiveScript 1.4.0 (function(){ var module, test; module = QUnit.module, test = QUnit.test; module('ES6'); test('ArrayBuffer', function(assert){ var b, this$ = this; assert.same(ArrayBuffer, Object(ArrayBuffer), 'is object'); assert.arity(ArrayBuffer, 1); assert.name(ArrayBuffer, 'ArrayBuffer'); NATIVE && assert.looksNative(ArrayBuffer); b = new ArrayBuffer(123); assert.same(b.byteLength, 123, 'length'); assert.throws(function(){ new ArrayBuffer(-1); }, RangeError, 'negative length'); assert.throws(function(){ new ArrayBuffer(0.5); }, RangeError, 'fractional length'); assert.throws(function(){ new ArrayBuffer(); }, RangeError, 'missed length'); assert.throws(function(){ new ArrayBuffer(Number.MAX_SAFE_INTEGER + 1); }, RangeError, 'absurd length'); DESCRIPTORS && assert.same(ArrayBuffer[typeof Symbol != 'undefined' && Symbol !== null ? Symbol.species : void 8], ArrayBuffer, '@@species'); }); }).call(this); // Generated by LiveScript 1.4.0 (function(){ var module, test; module = QUnit.module, test = QUnit.test; module('ES6'); test('ArrayBuffer.isView', function(assert){ var isView, i$, x$, ref$, len$, y$; isView = ArrayBuffer.isView; assert.isFunction(isView); assert.arity(isView, 1); assert.name(isView, 'isView'); assert.looksNative(isView); for (i$ = 0, len$ = (ref$ = ['Float32Array', 'Float64Array', 'Int8Array', 'Int16Array', 'Int32Array', 'Uint8Array', 'Uint16Array', 'Uint32Array', 'Uint8ClampedArray']).length; i$ < len$; ++i$) { x$ = ref$[i$]; if (global[x$]) { assert.same(isView(new global[x$]([1])), true, x$ + " - true"); } } assert.same(isView(new DataView(new ArrayBuffer(1))), true, "DataView - true"); assert.same(isView(new ArrayBuffer(1)), false, "ArrayBuffer - false"); for (i$ = 0, len$ = (ref$ = [void 8, null, false, true, 0, 1, '', 'qwe', {}, [], fn$]).length; i$ < len$; ++i$) { y$ = ref$[i$]; assert.same(isView(y$), false, y$ + " - false"); } function fn$(){} }); }).call(this); // Generated by LiveScript 1.4.0 (function(){ var module, test; module = QUnit.module, test = QUnit.test; module('ES6'); test('ArrayBuffer#slice', function(assert){ var buffer; assert.isFunction(ArrayBuffer.prototype.slice); assert.arity(ArrayBuffer.prototype.slice, 2); assert.name(ArrayBuffer.prototype.slice, 'slice'); assert.looksNative(ArrayBuffer.prototype.slice); buffer = arrayToBuffer([1, 2, 3, 4, 5]); assert.ok(buffer instanceof ArrayBuffer, 'correct buffer'); assert.ok(buffer.slice() !== buffer, 'returns new buffer'); assert.ok(buffer.slice() instanceof ArrayBuffer, 'correct instance'); assert.arrayEqual(bufferToArray(buffer.slice()), [1, 2, 3, 4, 5]); assert.arrayEqual(bufferToArray(buffer.slice(1, 3)), [2, 3]); assert.arrayEqual(bufferToArray(buffer.slice(1, void 8)), [2, 3, 4, 5]); assert.arrayEqual(bufferToArray(buffer.slice(1, -1)), [2, 3, 4]); assert.arrayEqual(bufferToArray(buffer.slice(-2, -1)), [4]); assert.arrayEqual(bufferToArray(buffer.slice(-2, -3)), []); }); }).call(this); // Generated by LiveScript 1.4.0 (function(){ var module, test, keys, getOwnPropertyDescriptor, defineProperty, $name, ref$, $bytes; module = QUnit.module, test = QUnit.test; keys = Object.keys, getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor, defineProperty = Object.defineProperty; module('ES6'); if (DESCRIPTORS) { for ($name in ref$ = { Float32Array: 4, Float64Array: 8, Int8Array: 1, Int16Array: 2, Int32Array: 4, Uint8Array: 1, Uint16Array: 2, Uint32Array: 4, Uint8ClampedArray: 1 }) { $bytes = ref$[$name]; (fn$.call(this, $name, $bytes)); } } function import$(obj, src){ var own = {}.hasOwnProperty; for (var key in src) if (own.call(src, key)) obj[key] = src[key]; return obj; } function fn$(name, bytes){ var Typed, NATIVE_OR_ISNT_UINT8; Typed = global[name]; NATIVE_OR_ISNT_UINT8 = NATIVE || name !== 'Uint8Array'; test(name + " constructor", function(assert){ var a, e, b; assert.isFunction(Typed); assert.arity(Typed, 3); assert.name(Typed, name); NATIVE && assert.looksNative(Typed); assert.same(Typed.BYTES_PER_ELEMENT, bytes, name + ".BYTES_PER_ELEMENT"); a = new Typed(4); assert.same(a.BYTES_PER_ELEMENT, bytes, '#BYTES_PER_ELEMENT'); assert.same(a.byteOffset, 0, name + '#byteOffset, passed number'); assert.same(a.byteLength, 4 * bytes, '#byteLength, passed number'); assert.arrayEqual(a, [0, 0, 0, 0], 'correct values, passed number'); try { a = new Typed('0x4'); assert.same(a.byteOffset, 0, '#byteOffset, passed string'); assert.same(a.byteLength, 4 * bytes, '#byteLength, passed string'); assert.arrayEqual(a, [0, 0, 0, 0], 'correct values, passed string'); } catch (e$) { e = e$; assert.same(e, [0, 0, 0, 0], 'passed string'); } try { a = new Typed(true); assert.same(a.byteOffset, 0, '#byteOffset, passed boolean'); assert.same(a.byteLength, 1 * bytes, '#byteLength, passed boolean'); assert.arrayEqual(a, [0], 'correct values, passed boolean'); } catch (e$) { e = e$; assert.same(e, [0], 'passed boolean'); } assert.throws(function(){ new Typed; }, TypeError, 'throws without argument'); assert.throws(function(){ new Typed(void 8); }, TypeError, 'throws on undefined'); NATIVE_OR_ISNT_UINT8 && assert.throws(function(){ new Typed(1.5); }, RangeError, 'throws on 1.5'); NATIVE_OR_ISNT_UINT8 && assert.throws(function(){ new Typed(-1); }, RangeError, 'throws on -1'); NATIVE_OR_ISNT_UINT8 && assert.throws(function(){ new Typed(-0); }, RangeError, 'throws on -0'); NATIVE_OR_ISNT_UINT8 && assert.throws(function(){ new Typed(NaN); }, RangeError, 'throws on NaN'); try { a = new Typed(null); assert.same(a.byteOffset, 0, '#byteOffset, passed null'); assert.same(a.byteLength, 0, '#byteLength, passed null'); assert.arrayEqual(a, [], 'correct values, passed null'); } catch (e$) { e = e$; assert.same(e, [], 'passed null'); } a = new Typed([1, 2, 3, 4]); assert.same(a.byteOffset, 0, '#byteOffset, passed array'); assert.same(a.byteLength, 4 * bytes, '#byteLength, passed array'); assert.arrayEqual(a, [1, 2, 3, 4], 'correct values, passed array'); a = new Typed({ 0: 1, 1: 2, 2: 3, 3: 4, length: 4 }); assert.same(a.byteOffset, 0, '#byteOffset, passed array-like'); assert.same(a.byteLength, 4 * bytes, '#byteLength, passed array-like'); assert.arrayEqual(a, [1, 2, 3, 4], 'correct values, passed array-like'); try { a = new Typed({}); assert.same(a.byteOffset, 0, '#byteOffset, passed empty object (also array-like case)'); assert.same(a.byteLength, 0, '#byteLength, passed empty object (also array-like case)'); assert.arrayEqual(a, [], 'correct values, passed empty object (also array-like case)'); } catch (e$) { e = e$; assert.same(e, [], 'passed empty object (also array-like case)'); } try { a = new Typed(createIterable([1, 2, 3, 4])); assert.same(a.byteOffset, 0, '#byteOffset, passed iterable'); assert.same(a.byteLength, 4 * bytes, '#byteLength, passed iterable'); assert.arrayEqual(a, [1, 2, 3, 4], 'correct values, passed iterable'); } catch (e$) { e = e$; assert.same(e, [1, 2, 3, 4], 'passed iterable'); } a = new Typed(new Typed([1, 2, 3, 4])); assert.same(a.byteOffset, 0, '#byteOffset, passed typed array'); assert.same(a.byteLength, 4 * bytes, '#byteLength, passed typed array'); assert.arrayEqual(a, [1, 2, 3, 4], 'correct values, passed typed array'); b = new Typed([1, 2, 3, 4]); b[typeof Symbol != 'undefined' && Symbol !== null ? Symbol.iterator : void 8] = function(){ return createIterable([4, 3, 2, 1])[typeof Symbol != 'undefined' && Symbol !== null ? Symbol.iterator : void 8](); }; a = new Typed(b); assert.same(a.byteOffset, 0, '#byteOffset, passed typed array with custom iterator'); assert.same(a.byteLength, 4 * bytes, '#byteLength, passed typed array with custom iterator'); assert.arrayEqual(a, [1, 2, 3, 4], 'correct values, passed typed array with custom iterator'); a = new Typed(new ArrayBuffer(8)); assert.same(a.byteOffset, 0, '#byteOffset, passed buffer'); assert.same(a.byteLength, 8, '#byteLength, passed buffer'); assert.same(a.length, 8 / bytes, 'correct length, passed buffer'); a = new Typed(new ArrayBuffer(16), 8); assert.same(a.byteOffset, 8, '#byteOffset, passed buffer and byteOffset'); assert.same(a.byteLength, 8, '#byteLength, passed buffer and byteOffset'); assert.same(a.length, 8 / bytes, 'correct length, passed buffer and byteOffset'); a = new Typed(new ArrayBuffer(24), 8, 8 / bytes); assert.same(a.byteOffset, 8, '#byteOffset, passed buffer, byteOffset and length'); assert.same(a.byteLength, 8, '#byteLength, passed buffer, byteOffset and length'); assert.same(a.length, 8 / bytes, 'correct length, passed buffer, byteOffset and length'); a = new Typed(new ArrayBuffer(8), void 8); assert.same(a.byteOffset, 0, '#byteOffset, passed buffer and undefined'); assert.same(a.byteLength, 8, '#byteLength, passed buffer and undefined'); assert.same(a.length, 8 / bytes, 'correct length, passed buffer and undefined'); a = new Typed(new ArrayBuffer(16), 8, void 8); assert.same(a.byteOffset, 8, '#byteOffset, passed buffer, byteOffset and undefined'); assert.same(a.byteLength, 8, '#byteLength, passed buffer, byteOffset and undefined'); assert.same(a.length, 8 / bytes, 'correct length, passed buffer, byteOffset and undefined'); a = new Typed(new ArrayBuffer(8), 8); assert.same(a.byteOffset, 8, '#byteOffset, passed buffer and byteOffset with buffer length'); assert.same(a.byteLength, 0, '#byteLength, passed buffer and byteOffset with buffer length'); assert.arrayEqual(a, [], 'correct values, passed buffer and byteOffset with buffer length'); assert.throws(function(){ new Typed(new ArrayBuffer(8), -1); }, RangeError, 'If offset < 0, throw a RangeError exception'); if (bytes !== 1) { assert.throws(function(){ new Typed(new ArrayBuffer(8), 3); }, RangeError, 'If offset modulo elementSize ≠ 0, throw a RangeError exception'); } if (NATIVE) { if (bytes !== 1) { assert.throws(function(){ new Typed(new ArrayBuffer(9)); }, RangeError, 'If bufferByteLength modulo elementSize ≠ 0, throw a RangeError exception'); } assert.throws(function(){ new Typed(new ArrayBuffer(8), 16); }, RangeError, 'If newByteLength < 0, throw a RangeError exception'); assert.throws(function(){ new Typed(new ArrayBuffer(24), 8, 24); }, RangeError, 'If offset+newByteLength > bufferByteLength, throw a RangeError exception'); } else { assert.throws(function(){ new Typed(new ArrayBuffer(8), 16); }, 'If newByteLength < 0, throw a RangeError exception'); assert.throws(function(){ new Typed(new ArrayBuffer(24), 8, 24); }, 'If offset+newByteLength > bufferByteLength, throw a RangeError exception'); } assert.throws(function(){ Typed(1); }, TypeError, 'throws without `new`'); assert.same(Typed[typeof Symbol != 'undefined' && Symbol !== null ? Symbol.species : void 8], Typed, '@@species'); }); test(name + " descriptors", function(assert){ var typed, desc, base, key, e; typed = new Typed(2); desc = getOwnPropertyDescriptor(typed, 0); base = NATIVE ? { writable: true, enumerable: true, configurable: false } : { writable: desc.writable, enumerable: true, configurable: desc.configurable }; NATIVE && assert.arrayEqual((function(){ var results$ = []; for (key in typed) { results$.push(key); } return results$; }()), ['0', '1'], 'for-in'); NATIVE && assert.arrayEqual(keys(typed), ['0', '1'], 'Object.keys'); assert.deepEqual(getOwnPropertyDescriptor(typed, 0), import$({ value: 0 }, base), 'Object.getOwnPropertyDescriptor'); if (NATIVE) { defineProperty(typed, 0, { value: 1, writable: true, enumerable: true, configurable: false }); typed[0] = typed[1] = 2.5; assert.deepEqual(getOwnPropertyDescriptor(typed, 0), import$({ value: typed[1] }, base), 'Object.defineProperty, valid descriptor #1'); defineProperty(typed, 0, { value: 1 }); typed[0] = typed[1] = 3.5; assert.deepEqual(getOwnPropertyDescriptor(typed, 0), import$({ value: typed[1] }, base), 'Object.defineProperty, valid descriptor #2'); } NATIVE && (function(){ try { defineProperty(typed, 0, { value: 2, writable: false, enumerable: true, configurable: false }); return assert.ok(false, 'Object.defineProperty, invalid descriptor #1'); } catch (e$) { e = e$; return assert.ok(true, 'Object.defineProperty, invalid descriptor #1'); } }()); NATIVE && (function(){ try { defineProperty(typed, 0, { value: 2, writable: true, enumerable: false, configurable: false }); return assert.ok(false, 'Object.defineProperty, invalid descriptor #2'); } catch (e$) { e = e$; return assert.ok(true, 'Object.defineProperty, invalid descriptor #2'); } }()); NATIVE && (function(){ try { defineProperty(typed, 0, { get: function(){ return 2; } }); return assert.ok(false, 'Object.defineProperty, invalid descriptor #3'); } catch (e$) { e = e$; return assert.ok(true, 'Object.defineProperty, invalid descriptor #3'); } }()); try { defineProperty(typed, 0, { value: 2, get: function(){ return 2; } }); assert.ok(false, 'Object.defineProperty, invalid descriptor #4'); } catch (e$) { e = e$; assert.ok(true, 'Object.defineProperty, invalid descriptor #4'); } }); } }).call(this); // Generated by LiveScript 1.4.0 (function(){ var module, test; module = QUnit.module, test = QUnit.test; module('ES6'); DESCRIPTORS && test('Float32 conversions', function(assert){ var NAME, ARRAY, Typed, SET, GET, data, typed, uint8, view, viewFrom, z, i$, len$, ref$, value, conversion, little, big, rep; NAME = 'Float32'; ARRAY = NAME + 'Array'; Typed = global[ARRAY]; SET = 'set' + NAME; GET = 'get' + NAME; data = [[0, 0, [0, 0, 0, 0]], [-0, -0, [0, 0, 0, 128]], [1, 1, [0, 0, 128, 63]], [-1, -1, [0, 0, 128, 191]], [1.1, 1.100000023841858, [205, 204, 140, 63]], [-1.1, -1.100000023841858, [205, 204, 140, 191]], [1.9, 1.899999976158142, [51, 51, 243, 63]], [-1.9, -1.899999976158142, [51, 51, 243, 191]], [127, 127, [0, 0, 254, 66]], [-127, -127, [0, 0, 254, 194]], [128, 128, [0, 0, 0, 67]], [-128, -128, [0, 0, 0, 195]], [255, 255, [0, 0, 127, 67]], [-255, -255, [0, 0, 127, 195]], [255.1, 255.10000610351562, [154, 25, 127, 67]], [255.9, 255.89999389648438, [102, 230, 127, 67]], [256, 256, [0, 0, 128, 67]], [32767, 32767, [0, 254, 255, 70]], [-32767, -32767, [0, 254, 255, 198]], [32768, 32768, [0, 0, 0, 71]], [-32768, -32768, [0, 0, 0, 199]], [65535, 65535, [0, 255, 127, 71]], [65536, 65536, [0, 0, 128, 71]], [65537, 65537, [128, 0, 128, 71]], [65536.54321, 65536.546875, [70, 0, 128, 71]], [-65536.54321, -65536.546875, [70, 0, 128, 199]], [2147483647, 2147483648, [0, 0, 0, 79]], [-2147483647, -2147483648, [0, 0, 0, 207]], [2147483648, 2147483648, [0, 0, 0, 79]], [-2147483648, -2147483648, [0, 0, 0, 207]], [2147483649, 2147483648, [0, 0, 0, 79]], [-2147483649, -2147483648, [0, 0, 0, 207]], [4294967295, 4294967296, [0, 0, 128, 79]], [4294967296, 4294967296, [0, 0, 128, 79]], [4294967297, 4294967296, [0, 0, 128, 79]], [9007199254740991, 9007199254740992, [0, 0, 0, 90]], [-9007199254740991, -9007199254740992, [0, 0, 0, 218]], [9007199254740992, 9007199254740992, [0, 0, 0, 90]], [-9007199254740992, -9007199254740992, [0, 0, 0, 218]], [9007199254740994, 9007199254740992, [0, 0, 0, 90]], [-9007199254740994, -9007199254740992, [0, 0, 0, 218]], [Infinity, Infinity, [0, 0, 128, 127]], [-Infinity, -Infinity, [0, 0, 128, 255]], [1.7976931348623157e+308, Infinity, [0, 0, 128, 127]], [-1.7976931348623157e+308, -Infinity, [0, 0, 128, 255]], [5e-324, 0, [0, 0, 0, 0]], [-5e-324, -0, [0, 0, 0, 128]]]; typed = new Typed(1); uint8 = new Uint8Array(typed.buffer); view = new DataView(typed.buffer); viewFrom = function(it){ return new DataView(new Uint8Array(it).buffer); }; z = function(it){ if (it === 0 && 1 / it === -Infinity) { return '-0'; } else { return it; } }; for (i$ = 0, len$ = data.length; i$ < len$; ++i$) { ref$ = data[i$], value = ref$[0], conversion = ref$[1], little = ref$[2]; big = little.slice().reverse(); rep = LITTLE_ENDIAN ? little : big; typed[0] = value; assert.same(typed[0], conversion, ARRAY + " " + z(value) + " -> " + z(conversion)); assert.arrayEqual(uint8, rep, ARRAY + " " + z(value) + " -> [" + rep + "]"); view[SET](0, value); assert.arrayEqual(uint8, big, "view." + SET + "(0, " + z(value) + ") -> [" + big + "]"); assert.same(viewFrom(big)[GET](0), conversion, "view{" + big + "}." + GET + "(0) -> " + z(conversion)); view[SET](0, value, false); assert.arrayEqual(uint8, big, "view." + SET + "(0, " + z(value) + ", false) -> [" + big + "]"); assert.same(viewFrom(big)[GET](0, false), conversion, "view{" + big + "}." + GET + "(0, false) -> " + z(conversion)); view[SET](0, value, true); assert.arrayEqual(uint8, little, "view." + SET + "(0, " + z(value) + ", true) -> [" + little + "]"); assert.same(viewFrom(little)[GET](0, true), conversion, "view{" + little + "}." + GET + "(0, true) -> " + z(conversion)); } typed[0] = NaN; assert.same(typed[0], NaN, "NaN -> NaN"); }); }).call(this); // Generated by LiveScript 1.4.0 (function(){ var module, test; module = QUnit.module, test = QUnit.test; module('ES6'); DESCRIPTORS && test('Float64 conversions', function(assert){ var NAME, ARRAY, Typed, SET, GET, data, typed, uint8, view, viewFrom, z, i$, len$, ref$, value, conversion, little, big, rep; NAME = 'Float64'; ARRAY = NAME + 'Array'; Typed = global[ARRAY]; SET = 'set' + NAME; GET = 'get' + NAME; data = [[0, 0, [0, 0, 0, 0, 0, 0, 0, 0]], [-0, -0, [0, 0, 0, 0, 0, 0, 0, 128]], [1, 1, [0, 0, 0, 0, 0, 0, 240, 63]], [-1, -1, [0, 0, 0, 0, 0, 0, 240, 191]], [1.1, 1.1, [154, 153, 153, 153, 153, 153, 241, 63]], [-1.1, -1.1, [154, 153, 153, 153, 153, 153, 241, 191]], [1.9, 1.9, [102, 102, 102, 102, 102, 102, 254, 63]], [-1.9, -1.9, [102, 102, 102, 102, 102, 102, 254, 191]], [127, 127, [0, 0, 0, 0, 0, 192, 95, 64]], [-127, -127, [0, 0, 0, 0, 0, 192, 95, 192]], [128, 128, [0, 0, 0, 0, 0, 0, 96, 64]], [-128, -128, [0, 0, 0, 0, 0, 0, 96, 192]], [255, 255, [0, 0, 0, 0, 0, 224, 111, 64]], [-255, -255, [0, 0, 0, 0, 0, 224, 111, 192]], [255.1, 255.1, [51, 51, 51, 51, 51, 227, 111, 64]], [255.9, 255.9, [205, 204, 204, 204, 204, 252, 111, 64]], [256, 256, [0, 0, 0, 0, 0, 0, 112, 64]], [32767, 32767, [0, 0, 0, 0, 192, 255, 223, 64]], [-32767, -32767, [0, 0, 0, 0, 192, 255, 223, 192]], [32768, 32768, [0, 0, 0, 0, 0, 0, 224, 64]], [-32768, -32768, [0, 0, 0, 0, 0, 0, 224, 192]], [65535, 65535, [0, 0, 0, 0, 224, 255, 239, 64]], [65536, 65536, [0, 0, 0, 0, 0, 0, 240, 64]], [65537, 65537, [0, 0, 0, 0, 16, 0, 240, 64]], [65536.54321, 65536.54321, [14, 248, 252, 176, 8, 0, 240, 64]], [-65536.54321, -65536.54321, [14, 248, 252, 176, 8, 0, 240, 192]], [2147483647, 2147483647, [0, 0, 192, 255, 255, 255, 223, 65]], [-2147483647, -2147483647, [0, 0, 192, 255, 255, 255, 223, 193]], [2147483648, 2147483648, [0, 0, 0, 0, 0, 0, 224, 65]], [-2147483648, -2147483648, [0, 0, 0, 0, 0, 0, 224, 193]], [2147483649, 2147483649, [0, 0, 32, 0, 0, 0, 224, 65]], [-2147483649, -2147483649, [0, 0, 32, 0, 0, 0, 224, 193]], [4294967295, 4294967295, [0, 0, 224, 255, 255, 255, 239, 65]], [4294967296, 4294967296, [0, 0, 0, 0, 0, 0, 240, 65]], [4294967297, 4294967297, [0, 0, 16, 0, 0, 0, 240, 65]], [9007199254740991, 9007199254740991, [255, 255, 255, 255, 255, 255, 63, 67]], [-9007199254740991, -9007199254740991, [255, 255, 255, 255, 255, 255, 63, 195]], [9007199254740992, 9007199254740992, [0, 0, 0, 0, 0, 0, 64, 67]], [-9007199254740992, -9007199254740992, [0, 0, 0, 0, 0, 0, 64, 195]], [9007199254740994, 9007199254740994, [1, 0, 0, 0, 0, 0, 64, 67]], [-9007199254740994, -9007199254740994, [1, 0, 0, 0, 0, 0, 64, 195]], [Infinity, Infinity, [0, 0, 0, 0, 0, 0, 240, 127]], [-Infinity, -Infinity, [0, 0, 0, 0, 0, 0, 240, 255]], [-1.7976931348623157e+308, -1.7976931348623157e+308, [255, 255, 255, 255, 255, 255, 239, 255]], [1.7976931348623157e+308, 1.7976931348623157e+308, [255, 255, 255, 255, 255, 255, 239, 127]], [5e-324, 5e-324, [1, 0, 0, 0, 0, 0, 0, 0]], [-5e-324, -5e-324, [1, 0, 0, 0, 0, 0, 0, 128]]]; typed = new Typed(1); uint8 = new Uint8Array(typed.buffer); view = new DataView(typed.buffer); viewFrom = function(it){ return new DataView(new Uint8Array(it).buffer); }; z = function(it){ if (it === 0 && 1 / it === -Infinity) { return '-0'; } else { return it; } }; for (i$ = 0, len$ = data.length; i$ < len$; ++i$) { ref$ = data[i$], value = ref$[0], conversion = ref$[1], little = ref$[2]; big = little.slice().reverse(); rep = LITTLE_ENDIAN ? little : big; typed[0] = value; assert.same(typed[0], conversion, ARRAY + " " + z(value) + " -> " + z(conversion)); assert.arrayEqual(uint8, rep, ARRAY + " " + z(value) + " -> [" + rep + "]"); view[SET](0, value); assert.arrayEqual(uint8, big, "view." + SET + "(0, " + z(value) + ") -> [" + big + "]"); assert.same(viewFrom(big)[GET](0), conversion, "view{" + big + "}." + GET + "(0) -> " + z(conversion)); view[SET](0, value, false); assert.arrayEqual(uint8, big, "view." + SET + "(0, " + z(value) + ", false) -> [" + big + "]"); assert.same(viewFrom(big)[GET](0, false), conversion, "view{" + big + "}." + GET + "(0, false) -> " + z(conversion)); view[SET](0, value, true); assert.arrayEqual(uint8, little, "view." + SET + "(0, " + z(value) + ", true) -> [" + little + "]"); assert.same(viewFrom(little)[GET](0, true), conversion, "view{" + little + "}." + GET + "(0, true) -> " + z(conversion)); } typed[0] = NaN; assert.same(typed[0], NaN, "NaN -> NaN"); }); }).call(this); // Generated by LiveScript 1.4.0 (function(){ var module, test; module = QUnit.module, test = QUnit.test; module('ES6'); DESCRIPTORS && test('Int16 conversions', function(assert){ var NAME, ARRAY, Typed, SET, GET, data, typed, uint8, view, viewFrom, z, i$, len$, ref$, value, conversion, little, big, rep; NAME = 'Int16'; ARRAY = NAME + 'Array'; Typed = global[ARRAY]; SET = 'set' + NAME; GET = 'get' + NAME; data = [[0, 0, [0, 0]], [-0, 0, [0, 0]], [1, 1, [1, 0]], [-1, -1, [255, 255]], [1.1, 1, [1, 0]], [-1.1, -1, [255, 255]], [1.9, 1, [1, 0]], [-1.9, -1, [255, 255]], [127, 127, [127, 0]], [-127, -127, [129, 255]], [128, 128, [128, 0]], [-128, -128, [128, 255]], [255, 255, [255, 0]], [-255, -255, [1, 255]], [255.1, 255, [255, 0]], [255.9, 255, [255, 0]], [256, 256, [0, 1]], [32767, 32767, [255, 127]], [-32767, -32767, [1, 128]], [32768, -32768, [0, 128]], [-32768, -32768, [0, 128]], [65535, -1, [255, 255]], [65536, 0, [0, 0]], [65537, 1, [1, 0]], [65536.54321, 0, [0, 0]], [-65536.54321, 0, [0, 0]], [2147483647, -1, [255, 255]], [-2147483647, 1, [1, 0]], [2147483648, 0, [0, 0]], [-2147483648, 0, [0, 0]], [4294967296, 0, [0, 0]], [9007199254740992, 0, [0, 0]], [-9007199254740992, 0, [0, 0]], [Infinity, 0, [0, 0]], [-Infinity, 0, [0, 0]], [-1.7976931348623157e+308, 0, [0, 0]], [1.7976931348623157e+308, 0, [0, 0]], [5e-324, 0, [0, 0]], [-5e-324, 0, [0, 0]], [NaN, 0, [0, 0]]]; if (NATIVE || !/Android [2-4]/.test(typeof navigator != 'undefined' && navigator !== null ? navigator.userAgent : void 8)) { data = data.concat([[2147483649, 1, [1, 0]], [-2147483649, -1, [255, 255]], [4294967295, -1, [255, 255]], [4294967297, 1, [1, 0]], [9007199254740991, -1, [255, 255]], [-9007199254740991, 1, [1, 0]], [9007199254740994, 2, [2, 0]], [-9007199254740994, -2, [254, 255]]]); } typed = new Typed(1); uint8 = new Uint8Array(typed.buffer); view = new DataView(typed.buffer); viewFrom = function(it){ return new DataView(new Uint8Array(it).buffer); }; z = function(it){ if (it === 0 && 1 / it === -Infinity) { return '-0'; } else { return it; } }; for (i$ = 0, len$ = data.length; i$ < len$; ++i$) { ref$ = data[i$], value = ref$[0], conversion = ref$[1], little = ref$[2]; big = little.slice().reverse(); rep = LITTLE_ENDIAN ? little : big; typed[0] = value; assert.same(typed[0], conversion, ARRAY + " " + z(value) + " -> " + z(conversion)); assert.arrayEqual(uint8, rep, ARRAY + " " + z(value) + " -> [" + rep + "]"); view[SET](0, value); assert.arrayEqual(uint8, big, "view." + SET + "(0, " + z(value) + ") -> [" + big + "]"); assert.same(viewFrom(big)[GET](0), conversion, "view{" + big + "}." + GET + "(0) -> " + z(conversion)); view[SET](0, value, false); assert.arrayEqual(uint8, big, "view." + SET + "(0, " + z(value) + ", false) -> [" + big + "]"); assert.same(viewFrom(big)[GET](0, false), conversion, "view{" + big + "}." + GET + "(0, false) -> " + z(conversion)); view[SET](0, value, true); assert.arrayEqual(uint8, little, "view." + SET + "(0, " + z(value) + ", true) -> [" + little + "]"); assert.same(viewFrom(little)[GET](0, true), conversion, "view{" + little + "}." + GET + "(0, true) -> " + z(conversion)); } }); }).call(this); // Generated by LiveScript 1.4.0 (function(){ var module, test; module = QUnit.module, test = QUnit.test; module('ES6'); DESCRIPTORS && test('Int32 conversions', function(assert){ var NAME, ARRAY, Typed, SET, GET, data, typed, uint8, view, viewFrom, z, i$, len$, ref$, value, conversion, little, big, rep; NAME = 'Int32'; ARRAY = NAME + 'Array'; Typed = global[ARRAY]; SET = 'set' + NAME; GET = 'get' + NAME; data = [[0, 0, [0, 0, 0, 0]], [-0, 0, [0, 0, 0, 0]], [1, 1, [1, 0, 0, 0]], [-1, -1, [255, 255, 255, 255]], [1.1, 1, [1, 0, 0, 0]], [-1.1, -1, [255, 255, 255, 255]], [1.9, 1, [1, 0, 0, 0]], [-1.9, -1, [255, 255, 255, 255]], [127, 127, [127, 0, 0, 0]], [-127, -127, [129, 255, 255, 255]], [128, 128, [128, 0, 0, 0]], [-128, -128, [128, 255, 255, 255]], [255, 255, [255, 0, 0, 0]], [-255, -255, [1, 255, 255, 255]], [255.1, 255, [255, 0, 0, 0]], [255.9, 255, [255, 0, 0, 0]], [256, 256, [0, 1, 0, 0]], [32767, 32767, [255, 127, 0, 0]], [-32767, -32767, [1, 128, 255, 255]], [32768, 32768, [0, 128, 0, 0]], [-32768, -32768, [0, 128, 255, 255]], [65535, 65535, [255, 255, 0, 0]], [65536, 65536, [0, 0, 1, 0]], [65537, 65537, [1, 0, 1, 0]], [65536.54321, 65536, [0, 0, 1, 0]], [-65536.54321, -65536, [0, 0, 255, 255]], [2147483647, 2147483647, [255, 255, 255, 127]], [-2147483647, -2147483647, [1, 0, 0, 128]], [2147483648, -2147483648, [0, 0, 0, 128]], [-2147483648, -2147483648, [0, 0, 0, 128]], [2147483649, -2147483647, [1, 0, 0, 128]], [-2147483649, 2147483647, [255, 255, 255, 127]], [4294967295, -1, [255, 255, 255, 255]], [4294967296, 0, [0, 0, 0, 0]], [4294967297, 1, [1, 0, 0, 0]], [9007199254740991, -1, [255, 255, 255, 255]], [-9007199254740991, 1, [1, 0, 0, 0]], [9007199254740992, 0, [0, 0, 0, 0]], [-9007199254740992, 0, [0, 0, 0, 0]], [9007199254740994, 2, [2, 0, 0, 0]], [-9007199254740994, -2, [254, 255, 255, 255]], [Infinity, 0, [0, 0, 0, 0]], [-Infinity, 0, [0, 0, 0, 0]], [-1.7976931348623157e+308, 0, [0, 0, 0, 0]], [1.7976931348623157e+308, 0, [0, 0, 0, 0]], [5e-324, 0, [0, 0, 0, 0]], [-5e-324, 0, [0, 0, 0, 0]], [NaN, 0, [0, 0, 0, 0]]]; typed = new Typed(1); uint8 = new Uint8Array(typed.buffer); view = new DataView(typed.buffer); viewFrom = function(it){ return new DataView(new Uint8Array(it).buffer); }; z = function(it){ if (it === 0 && 1 / it === -Infinity) { return '-0'; } else { return it; } }; for (i$ = 0, len$ = data.length; i$ < len$; ++i$) { ref$ = data[i$], value = ref$[0], conversion = ref$[1], little = ref$[2]; big = little.slice().reverse(); rep = LITTLE_ENDIAN ? little : big; typed[0] = value; assert.same(typed[0], conversion, ARRAY + " " + z(value) + " -> " + z(conversion)); assert.arrayEqual(uint8, rep, ARRAY + " " + z(value) + " -> [" + rep + "]"); view[SET](0, value); assert.arrayEqual(uint8, big, "view." + SET + "(0, " + z(value) + ") -> [" + big + "]"); assert.same(viewFrom(big)[GET](0), conversion, "view{" + big + "}." + GET + "(0) -> " + z(conversion)); view[SET](0, value, false); assert.arrayEqual(uint8, big, "view." + SET + "(0, " + z(value) + ", false) -> [" + big + "]"); assert.same(viewFrom(big)[GET](0, false), conversion, "view{" + big + "}." + GET + "(0, false) -> " + z(conversion)); view[SET](0, value, true); assert.arrayEqual(uint8, little, "view." + SET + "(0, " + z(value) + ", true) -> [" + little + "]"); assert.same(viewFrom(little)[GET](0, true), conversion, "view{" + little + "}." + GET + "(0, true) -> " + z(conversion)); } }); }).call(this); // Generated by LiveScript 1.4.0 (function(){ var module, test; module = QUnit.module, test = QUnit.test; module('ES6'); DESCRIPTORS && test('Int8 conversions', function(assert){ var NAME, ARRAY, Typed, SET, GET, data, typed, uint8, view, viewFrom, z, i$, len$, ref$, value, conversion, little; NAME = 'Int8'; ARRAY = NAME + 'Array'; Typed = global[ARRAY]; SET = 'set' + NAME; GET = 'get' + NAME; data = [[0, 0, [0]], [-0, 0, [0]], [1, 1, [1]], [-1, -1, [255]], [1.1, 1, [1]], [-1.1, -1, [255]], [1.9, 1, [1]], [-1.9, -1, [255]], [127, 127, [127]], [-127, -127, [129]], [128, -128, [128]], [-128, -128, [128]], [255, -1, [255]], [-255, 1, [1]], [255.1, -1, [255]], [255.9, -1, [255]], [256, 0, [0]], [32767, -1, [255]], [-32767, 1, [1]], [32768, 0, [0]], [-32768, 0, [0]], [65535, -1, [255]], [65536, 0, [0]], [65537, 1, [1]], [65536.54321, 0, [0]], [-65536.54321, 0, [0]], [2147483647, -1, [255]], [-2147483647, 1, [1]], [2147483648, 0, [0]], [-2147483648, 0, [0]], [4294967296, 0, [0]], [9007199254740992, 0, [0]], [-9007199254740992, 0, [0]], [Infinity, 0, [0]], [-Infinity, 0, [0]], [-1.7976931348623157e+308, 0, [0]], [1.7976931348623157e+308, 0, [0]], [5e-324, 0, [0]], [-5e-324, 0, [0]], [NaN, 0, [0]]]; if (NATIVE || !/Android [2-4]/.test(typeof navigator != 'undefined' && navigator !== null ? navigator.userAgent : void 8)) { data = data.concat([[2147483649, 1, [1]], [-2147483649, -1, [255]], [4294967295, -1, [255]], [4294967297, 1, [1]], [9007199254740991, -1, [255]], [-9007199254740991, 1, [1]], [9007199254740994, 2, [2]], [-9007199254740994, -2, [254]]]); } typed = new Typed(1); uint8 = new Uint8Array(typed.buffer); view = new DataView(typed.buffer); viewFrom = function(it){ return new DataView(new Uint8Array(it).buffer); }; z = function(it){ if (it === 0 && 1 / it === -Infinity) { return '-0'; } else { return it; } }; for (i$ = 0, len$ = data.length; i$ < len$; ++i$) { ref$ = data[i$], value = ref$[0], conversion = ref$[1], little = ref$[2]; typed[0] = value; assert.same(typed[0], conversion, ARRAY + " " + z(value) + " -> " + z(conversion)); assert.arrayEqual(uint8, little, ARRAY + " " + z(value) + " -> [" + little + "]"); view[SET](0, value); assert.arrayEqual(uint8, little, "view." + SET + "(0, " + z(value) + ") -> [" + little + "]"); assert.same(viewFrom(little)[GET](0), conversion, "view{" + little + "}." + GET + "(0) -> " + z(conversion)); } }); }).call(this); // Generated by LiveScript 1.4.0 (function(){ var module, test; module = QUnit.module, test = QUnit.test; module('ES6'); DESCRIPTORS && test('Uint16 conversions', function(assert){ var NAME, ARRAY, Typed, SET, GET, data, typed, uint8, view, viewFrom, z, i$, len$, ref$, value, conversion, little, big, rep; NAME = 'Uint16'; ARRAY = NAME + 'Array'; Typed = global[ARRAY]; SET = 'set' + NAME; GET = 'get' + NAME; data = [[0, 0, [0, 0]], [-0, 0, [0, 0]], [1, 1, [1, 0]], [-1, 65535, [255, 255]], [1.1, 1, [1, 0]], [-1.1, 65535, [255, 255]], [1.9, 1, [1, 0]], [-1.9, 65535, [255, 255]], [127, 127, [127, 0]], [-127, 65409, [129, 255]], [128, 128, [128, 0]], [-128, 65408, [128, 255]], [255, 255, [255, 0]], [-255, 65281, [1, 255]], [255.1, 255, [255, 0]], [255.9, 255, [255, 0]], [256, 256, [0, 1]], [32767, 32767, [255, 127]], [-32767, 32769, [1, 128]], [32768, 32768, [0, 128]], [-32768, 32768, [0, 128]], [65535, 65535, [255, 255]], [65536, 0, [0, 0]], [65537, 1, [1, 0]], [65536.54321, 0, [0, 0]], [-65536.54321, 0, [0, 0]], [2147483647, 65535, [255, 255]], [-2147483647, 1, [1, 0]], [2147483648, 0, [0, 0]], [-2147483648, 0, [0, 0]], [4294967296, 0, [0, 0]], [9007199254740992, 0, [0, 0]], [-9007199254740992, 0, [0, 0]], [Infinity, 0, [0, 0]], [-Infinity, 0, [0, 0]], [-1.7976931348623157e+308, 0, [0, 0]], [1.7976931348623157e+308, 0, [0, 0]], [5e-324, 0, [0, 0]], [-5e-324, 0, [0, 0]], [NaN, 0, [0, 0]]]; if (NATIVE || !/Android [2-4]/.test(typeof navigator != 'undefined' && navigator !== null ? navigator.userAgent : void 8)) { data = data.concat([[2147483649, 1, [1, 0]], [-2147483649, 65535, [255, 255]], [4294967295, 65535, [255, 255]], [4294967297, 1, [1, 0]], [9007199254740991, 65535, [255, 255]], [-9007199254740991, 1, [1, 0]], [9007199254740994, 2, [2, 0]], [-9007199254740994, 65534, [254, 255]]]); } typed = new Typed(1); uint8 = new Uint8Array(typed.buffer); view = new DataView(typed.buffer); viewFrom = function(it){ return new DataView(new Uint8Array(it).buffer); }; z = function(it){ if (it === 0 && 1 / it === -Infinity) { return '-0'; } else { return it; } }; for (i$ = 0, len$ = data.length; i$ < len$; ++i$) { ref$ = data[i$], value = ref$[0], conversion = ref$[1], little = ref$[2]; big = little.slice().reverse(); rep = LITTLE_ENDIAN ? little : big; typed[0] = value; assert.same(typed[0], conversion, ARRAY + " " + z(value) + " -> " + z(conversion)); assert.arrayEqual(uint8, rep, ARRAY + " " + z(value) + " -> [" + rep + "]"); view[SET](0, value); assert.arrayEqual(uint8, big, "view." + SET + "(0, " + z(value) + ") -> [" + big + "]"); assert.same(viewFrom(big)[GET](0), conversion, "view{" + big + "}." + GET + "(0) -> " + z(conversion)); view[SET](0, value, false); assert.arrayEqual(uint8, big, "view." + SET + "(0, " + z(value) + ", false) -> [" + big + "]"); assert.same(viewFrom(big)[GET](0, false), conversion, "view{" + big + "}." + GET + "(0, false) -> " + z(conversion)); view[SET](0, value, true); assert.arrayEqual(uint8, little, "view." + SET + "(0, " + z(value) + ", true) -> [" + little + "]"); assert.same(viewFrom(little)[GET](0, true), conversion, "view{" + little + "}." + GET + "(0, true) -> " + z(conversion)); } }); }).call(this); // Generated by LiveScript 1.4.0 (function(){ var module, test; module = QUnit.module, test = QUnit.test; module('ES6'); DESCRIPTORS && test('Uint32 conversions', function(assert){ var NAME, ARRAY, Typed, SET, GET, data, typed, uint8, view, viewFrom, z, i$, len$, ref$, value, conversion, little, big, rep; NAME = 'Uint32'; ARRAY = NAME + 'Array'; Typed = global[ARRAY]; SET = 'set' + NAME; GET = 'get' + NAME; data = [[0, 0, [0, 0, 0, 0]], [-0, 0, [0, 0, 0, 0]], [1, 1, [1, 0, 0, 0]], [-1, 4294967295, [255, 255, 255, 255]], [1.1, 1, [1, 0, 0, 0]], [-1.1, 4294967295, [255, 255, 255, 255]], [1.9, 1, [1, 0, 0, 0]], [-1.9, 4294967295, [255, 255, 255, 255]], [127, 127, [127, 0, 0, 0]], [-127, 4294967169, [129, 255, 255, 255]], [128, 128, [128, 0, 0, 0]], [-128, 4294967168, [128, 255, 255, 255]], [255, 255, [255, 0, 0, 0]], [-255, 4294967041, [1, 255, 255, 255]], [255.1, 255, [255, 0, 0, 0]], [255.9, 255, [255, 0, 0, 0]], [256, 256, [0, 1, 0, 0]], [32767, 32767, [255, 127, 0, 0]], [-32767, 4294934529, [1, 128, 255, 255]], [32768, 32768, [0, 128, 0, 0]], [-32768, 4294934528, [0, 128, 255, 255]], [65535, 65535, [255, 255, 0, 0]], [65536, 65536, [0, 0, 1, 0]], [65537, 65537, [1, 0, 1, 0]], [65536.54321, 65536, [0, 0, 1, 0]], [-65536.54321, 4294901760, [0, 0, 255, 255]], [2147483647, 2147483647, [255, 255, 255, 127]], [-2147483647, 2147483649, [1, 0, 0, 128]], [2147483648, 2147483648, [0, 0, 0, 128]], [-2147483648, 2147483648, [0, 0, 0, 128]], [2147483649, 2147483649, [1, 0, 0, 128]], [-2147483649, 2147483647, [255, 255, 255, 127]], [4294967295, 4294967295, [255, 255, 255, 255]], [4294967296, 0, [0, 0, 0, 0]], [4294967297, 1, [1, 0, 0, 0]], [9007199254740991, 4294967295, [255, 255, 255, 255]], [-9007199254740991, 1, [1, 0, 0, 0]], [9007199254740992, 0, [0, 0, 0, 0]], [-9007199254740992, 0, [0, 0, 0, 0]], [9007199254740994, 2, [2, 0, 0, 0]], [-9007199254740994, 4294967294, [254, 255, 255, 255]], [Infinity, 0, [0, 0, 0, 0]], [-Infinity, 0, [0, 0, 0, 0]], [-1.7976931348623157e+308, 0, [0, 0, 0, 0]], [1.7976931348623157e+308, 0, [0, 0, 0, 0]], [5e-324, 0, [0, 0, 0, 0]], [-5e-324, 0, [0, 0, 0, 0]], [NaN, 0, [0, 0, 0, 0]]]; typed = new Typed(1); uint8 = new Uint8Array(typed.buffer); view = new DataView(typed.buffer); viewFrom = function(it){ return new DataView(new Uint8Array(it).buffer); }; z = function(it){ if (it === 0 && 1 / it === -Infinity) { return '-0'; } else { return it; } }; for (i$ = 0, len$ = data.length; i$ < len$; ++i$) { ref$ = data[i$], value = ref$[0], conversion = ref$[1], little = ref$[2]; big = little.slice().reverse(); rep = LITTLE_ENDIAN ? little : big; typed[0] = value; assert.same(typed[0], conversion, ARRAY + " " + z(value) + " -> " + z(conversion)); assert.arrayEqual(uint8, rep, ARRAY + " " + z(value) + " -> [" + rep + "]"); view[SET](0, value); assert.arrayEqual(uint8, big, "view." + SET + "(0, " + z(value) + ") -> [" + big + "]"); assert.same(viewFrom(big)[GET](0), conversion, "view{" + big + "}." + GET + "(0) -> " + z(conversion)); view[SET](0, value, false); assert.arrayEqual(uint8, big, "view." + SET + "(0, " + z(value) + ", false) -> [" + big + "]"); assert.same(viewFrom(big)[GET](0, false), conversion, "view{" + big + "}." + GET + "(0, false) -> " + z(conversion)); view[SET](0, value, true); assert.arrayEqual(uint8, little, "view." + SET + "(0, " + z(value) + ", true) -> [" + little + "]"); assert.same(viewFrom(little)[GET](0, true), conversion, "view{" + little + "}." + GET + "(0, true) -> " + z(conversion)); } }); }).call(this); // Generated by LiveScript 1.4.0 (function(){ var module, test; module = QUnit.module, test = QUnit.test; module('ES6'); DESCRIPTORS && test('Uint8Clamped conversions', function(assert){ var NAME, ARRAY, Typed, data, typed, uint8, z, i$, len$, ref$, value, conversion, little; NAME = 'Uint8Clamped'; ARRAY = NAME + 'Array'; Typed = global[ARRAY]; data = [[0, 0, [0]], [-0, 0, [0]], [1, 1, [1]], [-1, 0, [0]], [1.1, 1, [1]], [-1.1, 0, [0]], [1.9, 2, [2]], [-1.9, 0, [0]], [127, 127, [127]], [-127, 0, [0]], [128, 128, [128]], [-128, 0, [0]], [255, 255, [255]], [-255, 0, [0]], [255.1, 255, [255]], [255.9, 255, [255]], [256, 255, [255]], [32767, 255, [255]], [-32767, 0, [0]], [32768, 255, [255]], [-32768, 0, [0]], [65535, 255, [255]], [65536, 255, [255]], [65537, 255, [255]], [65536.54321, 255, [255]], [-65536.54321, 0, [0]], [2147483647, 255, [255]], [-2147483647, 0, [0]], [2147483648, 255, [255]], [-2147483648, 0, [0]], [2147483649, 255, [255]], [-2147483649, 0, [0]], [4294967295, 255, [255]], [4294967296, 255, [255]], [4294967297, 255, [255]], [9007199254740991, 255, [255]], [-9007199254740991, 0, [0]], [9007199254740992, 255, [255]], [-9007199254740992, 0, [0]], [9007199254740994, 255, [255]], [-9007199254740994, 0, [0]], [Infinity, 255, [255]], [-Infinity, 0, [0]], [-1.7976931348623157e+308, 0, [0]], [1.7976931348623157e+308, 255, [255]], [5e-324, 0, [0]], [-5e-324, 0, [0]], [NaN, 0, [0]]]; typed = new Typed(1); uint8 = new Uint8Array(typed.buffer); z = function(it){ if (it === 0 && 1 / it === -Infinity) { return '-0'; } else { return it; } }; for (i$ = 0, len$ = data.length; i$ < len$; ++i$) { ref$ = data[i$], value = ref$[0], conversion = ref$[1], little = ref$[2]; typed[0] = value; assert.same(typed[0], conversion, z(value) + " -> " + z(conversion)); assert.arrayEqual(uint8, little, z(value) + " -> [" + little + "]"); } }); }).call(this); // Generated by LiveScript 1.4.0 (function(){ var module, test; module = QUnit.module, test = QUnit.test; module('ES6'); DESCRIPTORS && test('Uint8 conversions', function(assert){ var NAME, ARRAY, Typed, SET, GET, data, typed, view, viewFrom, z, i$, len$, ref$, value, conversion, little; NAME = 'Uint8'; ARRAY = NAME + 'Array'; Typed = global[ARRAY]; SET = 'set' + NAME; GET = 'get' + NAME; data = [[0, 0, [0]], [-0, 0, [0]], [1, 1, [1]], [-1, 255, [255]], [1.1, 1, [1]], [-1.1, 255, [255]], [1.9, 1, [1]], [-1.9, 255, [255]], [127, 127, [127]], [-127, 129, [129]], [128, 128, [128]], [-128, 128, [128]], [255, 255, [255]], [-255, 1, [1]], [255.1, 255, [255]], [255.9, 255, [255]], [256, 0, [0]], [32767, 255, [255]], [-32767, 1, [1]], [32768, 0, [0]], [-32768, 0, [0]], [65535, 255, [255]], [65536, 0, [0]], [65537, 1, [1]], [65536.54321, 0, [0]], [-65536.54321, 0, [0]], [2147483647, 255, [255]], [-2147483647, 1, [1]], [2147483648, 0, [0]], [-2147483648, 0, [0]], [4294967296, 0, [0]], [9007199254740992, 0, [0]], [-9007199254740992, 0, [0]], [Infinity, 0, [0]], [-Infinity, 0, [0]], [-1.7976931348623157e+308, 0, [0]], [1.7976931348623157e+308, 0, [0]], [5e-324, 0, [0]], [-5e-324, 0, [0]], [NaN, 0, [0]]]; if (NATIVE || !/Android [2-4]/.test(typeof navigator != 'undefined' && navigator !== null ? navigator.userAgent : void 8)) { data = data.concat([[2147483649, 1, [1]], [-2147483649, 255, [255]], [4294967295, 255, [255]], [4294967297, 1, [1]], [9007199254740991, 255, [255]], [-9007199254740991, 1, [1]], [9007199254740994, 2, [2]], [-9007199254740994, 254, [254]]]); } typed = new Typed(1); view = new DataView(typed.buffer); viewFrom = function(it){ return new DataView(new Uint8Array(it).buffer); }; z = function(it){ if (it === 0 && 1 / it === -Infinity) { return '-0'; } else { return it; } }; for (i$ = 0, len$ = data.length; i$ < len$; ++i$) { ref$ = data[i$], value = ref$[0], conversion = ref$[1], little = ref$[2]; typed[0] = value; assert.same(typed[0], conversion, ARRAY + " " + z(value) + " -> " + z(conversion)); assert.arrayEqual(typed, little, ARRAY + " " + z(value) + " -> [" + little + "]"); view[SET](0, value); assert.arrayEqual(typed, little, "view." + SET + "(0, " + z(value) + ") -> [" + little + "]"); assert.same(viewFrom(little)[GET](0), conversion, "view{" + little + "}." + GET + "(0) -> " + z(conversion)); } }); }).call(this); // Generated by LiveScript 1.4.0 (function(){ var module, test, i$, x$, ref$, len$, y$; module = QUnit.module, test = QUnit.test; module('ES6'); test('DataView', function(assert){ var a, d; assert.same(DataView, Object(DataView), 'is object'); NATIVE && assert.arity(DataView, 3); NATIVE && assert.name(DataView, 'DataView'); NATIVE && assert.looksNative(DataView); a = new DataView(new ArrayBuffer(8)); assert.same(a.byteOffset, 0, '#byteOffset, passed buffer'); assert.same(a.byteLength, 8, '#byteLength, passed buffer'); a = new DataView(new ArrayBuffer(16), 8); assert.same(a.byteOffset, 8, '#byteOffset, passed buffer and byteOffset'); assert.same(a.byteLength, 8, '#byteLength, passed buffer and byteOffset'); a = new DataView(new ArrayBuffer(24), 8, 8); assert.same(a.byteOffset, 8, '#byteOffset, passed buffer, byteOffset and length'); assert.same(a.byteLength, 8, '#byteLength, passed buffer, byteOffset and length'); if (NATIVE) { a = new DataView(new ArrayBuffer(8), void 8); assert.same(a.byteOffset, 0, '#byteOffset, passed buffer and undefined'); assert.same(a.byteLength, 8, '#byteLength, passed buffer and undefined'); } if (NATIVE) { a = new DataView(new ArrayBuffer(16), 8, void 8); assert.same(a.byteOffset, 8, '#byteOffset, passed buffer, byteOffset and undefined'); assert.same(a.byteLength, 8, '#byteLength, passed buffer, byteOffset and undefined'); } if (NATIVE) { a = new DataView(new ArrayBuffer(8), 8); assert.same(a.byteOffset, 8, '#byteOffset, passed buffer and byteOffset with buffer length'); assert.same(a.byteLength, 0, '#byteLength, passed buffer and byteOffset with buffer length'); } if (NATIVE) { assert.throws(function(){ new DataView(new ArrayBuffer(8), -1); }, RangeError, 'If offset < 0, throw a RangeError exception'); assert.throws(function(){ new DataView(new ArrayBuffer(8), 16); }, RangeError, 'If newByteLength < 0, throw a RangeError exception'); assert.throws(function(){ new DataView(new ArrayBuffer(24), 8, 24); }, RangeError, 'If offset+newByteLength > bufferByteLength, throw a RangeError exception'); } else { assert.throws(function(){ new DataView(new ArrayBuffer(8), -1); }, 'If offset < 0, throw a RangeError exception'); assert.throws(function(){ new DataView(new ArrayBuffer(8), 16); }, 'If newByteLength < 0, throw a RangeError exception'); assert.throws(function(){ new DataView(new ArrayBuffer(24), 8, 24); }, 'If offset+newByteLength > bufferByteLength, throw a RangeError exception'); } if (NATIVE) { assert.throws(function(){ DataView(new ArrayBuffer(8)); }, TypeError, 'throws without `new`'); } else { assert.throws(function(){ DataView(new ArrayBuffer(8)); }, 'throws without `new`'); } d = new DataView(new ArrayBuffer(8)); d.setUint32(0, 0x12345678); assert.same(d.getUint32(0), 0x12345678, 'big endian/big endian'); d.setUint32(0, 0x12345678, true); assert.same(d.getUint32(0, true), 0x12345678, 'little endian/little endian'); d.setUint32(0, 0x12345678, true); assert.same(d.getUint32(0), 0x78563412, 'little endian/big endian'); d.setUint32(0, 0x12345678); assert.same(d.getUint32(0, true), 0x78563412, 'big endian/little endian'); assert.throws(function(){ return new DataView({}); }, 'non-ArrayBuffer argument'); assert.ok(function(){ var e; try { new DataView('foo'); } catch (e$) { e = e$; return e; } }, 'non-ArrayBuffer argument'); }); DESCRIPTORS && test('DataView accessors', function(assert){ var u, d, i$, ref$, len$, i, x; u = new Uint8Array(8); d = new DataView(u.buffer); assert.arrayEqual(u, [0, 0, 0, 0, 0, 0, 0, 0]); d.setUint8(0, 255); assert.arrayEqual(u, [0xff, 0, 0, 0, 0, 0, 0, 0]); d.setInt8(1, -1); assert.arrayEqual(u, [0xff, 0xff, 0, 0, 0, 0, 0, 0]); d.setUint16(2, 0x1234); assert.arrayEqual(u, [0xff, 0xff, 0x12, 0x34, 0, 0, 0, 0]); d.setInt16(4, -1); assert.arrayEqual(u, [0xff, 0xff, 0x12, 0x34, 0xff, 0xff, 0, 0]); d.setUint32(1, 0x12345678); assert.arrayEqual(u, [0xff, 0x12, 0x34, 0x56, 0x78, 0xff, 0, 0]); d.setInt32(4, -2023406815); assert.arrayEqual(u, [0xff, 0x12, 0x34, 0x56, 0x87, 0x65, 0x43, 0x21]); d.setFloat32(2, 1.2e+38); assert.arrayEqual(u, [0xff, 0x12, 0x7e, 0xb4, 0x8e, 0x52, 0x43, 0x21]); d.setFloat64(0, -1.2345678e+301); assert.arrayEqual(u, [0xfe, 0x72, 0x6f, 0x51, 0x5f, 0x61, 0x77, 0xe5]); for (i$ = 0, len$ = (ref$ = [0x80, 0x81, 0x82, 0x83, 0x84, 0x85, 0x86, 0x87]).length; i$ < len$; ++i$) { i = i$; x = ref$[i$]; u[i] = x; } assert.same(d.getUint8(0), 128); assert.same(d.getInt8(1), -127); assert.same(d.getUint16(2), 33411); assert.same(d.getInt16(3), -31868); assert.same(d.getUint32(4), 2223343239); assert.same(d.getInt32(2), -2105310075); assert.same(d.getFloat32(2), -1.932478247535851e-37); assert.same(d.getFloat64(0), -3.116851295377095e-306); }); DESCRIPTORS && test('DataView endian', function(assert){ var rawbuf, d; rawbuf = new Uint8Array([0, 1, 2, 3, 4, 5, 6, 7]).buffer; d = new DataView(rawbuf); assert.same(d.byteLength, 8, 'buffer'); assert.same(d.byteOffset, 0, 'buffer'); assert.throws(function(){ d.getUint8(-2); }); assert.throws(function(){ d.getUint8(8); }, 'bounds for buffer'); assert.throws(function(){ d.setUint8(-2, 0); }, 'bounds for buffer'); assert.throws(function(){ d.setUint8(8, 0); }, 'bounds for buffer'); d = new DataView(rawbuf, 2); assert.same(d.byteLength, 6, 'buffer, byteOffset'); assert.same(d.byteOffset, 2, 'buffer, byteOffset'); assert.same(d.getUint8(5), 7, 'buffer, byteOffset'); assert.throws(function(){ d.getUint8(-2); }, 'bounds for buffer, byteOffset'); assert.throws(function(){ d.getUint8(6); }, 'bounds for buffer, byteOffset'); assert.throws(function(){ d.setUint8(-2, 0); }, 'bounds for buffer, byteOffset'); assert.throws(function(){ d.setUint8(6, 0); }, 'bounds for buffer, byteOffset'); assert.throws(function(){ new DataView(rawbuf, -1); }, 'invalid byteOffset'); assert.throws(function(){ new DataView(rawbuf, 9); }, 'invalid byteOffset'); d = new DataView(rawbuf, 2, 4); assert.same(d.byteLength, 4, 'buffer, byteOffset, length'); assert.same(d.byteOffset, 2, 'buffer, byteOffset, length'); assert.same(d.getUint8(3), 5, 'buffer, byteOffset, length'); assert.throws(function(){ d.getUint8(-2); }, 'bounds for buffer, byteOffset, length'); assert.throws(function(){ d.getUint8(4); }, 'bounds for buffer, byteOffset, length'); assert.throws(function(){ d.setUint8(-2, 0); }, 'bounds for buffer, byteOffset, length'); assert.throws(function(){ d.setUint8(4, 0); }, 'bounds for buffer, byteOffset, length'); assert.throws(function(){ new DataView(rawbuf, 0, 9); }, 'invalid byteOffset+length'); assert.throws(function(){ new DataView(rawbuf, 8, 1); }, 'invalid byteOffset+length'); assert.throws(function(){ new DataView(rawbuf, 9, -1); }, 'invalid byteOffset+length'); }); for (i$ = 0, len$ = (ref$ = ['getUint8', 'getInt8', 'getUint16', 'getInt16', 'getUint32', 'getInt32', 'getFloat32', 'getFloat64']).length; i$ < len$; ++i$) { x$ = ref$[i$]; (fn$.call(this, x$)); } for (i$ = 0, len$ = (ref$ = ['setUint8', 'setInt8', 'setUint16', 'setInt16', 'setUint32', 'setInt32', 'setFloat32', 'setFloat64']).length; i$ < len$; ++i$) { y$ = ref$[i$]; (fn1$.call(this, y$)); } function fn$(name){ test('DataView#' + name, function(assert){ assert.isFunction(DataView.prototype[name]); NATIVE && assert.arity(DataView.prototype[name], 1); assert.name(DataView.prototype[name], name); assert.looksNative(DataView.prototype[name]); assert.same(new DataView(new ArrayBuffer(8))[name](0), 0, 'returns element'); }); } function fn1$(name){ test('DataView#' + name, function(assert){ assert.isFunction(DataView.prototype[name]); NATIVE && assert.arity(DataView.prototype[name], 2); assert.name(DataView.prototype[name], name); assert.looksNative(DataView.prototype[name]); assert.same(new DataView(new ArrayBuffer(8))[name](0, 0), void 8, 'void'); }); } }).call(this); // Generated by LiveScript 1.4.0 (function(){ var module, test; module = QUnit.module, test = QUnit.test; module('ES6'); DESCRIPTORS && test('%TypedArrayPrototype%.copyWithin', function(assert){ var global, i$, x$, ref$, len$, Typed, a; global = Function('return this')(); for (i$ = 0, len$ = (ref$ = ['Float32Array', 'Float64Array', 'Int8Array', 'Int16Array', 'Int32Array', 'Uint8Array', 'Uint16Array', 'Uint32Array', 'Uint8ClampedArray']).length; i$ < len$; ++i$) { x$ = ref$[i$]; Typed = global[x$]; assert.isFunction(Typed.prototype.copyWithin, x$ + "::copyWithin is function"); assert.arity(Typed.prototype.copyWithin, 2, x$ + "::copyWithin arity is 2"); assert.name(Typed.prototype.copyWithin, 'copyWithin', x$ + "::copyWithin name is 'copyWithin'"); assert.looksNative(Typed.prototype.copyWithin, x$ + "::copyWithin looks native"); assert.strictEqual(a = new Typed(5).copyWithin(0), a, 'return this'); assert.arrayEqual(new Typed([1, 2, 3, 4, 5]).copyWithin(0, 3), [4, 5, 3, 4, 5]); assert.arrayEqual(new Typed([1, 2, 3, 4, 5]).copyWithin(1, 3), [1, 4, 5, 4, 5]); assert.arrayEqual(new Typed([1, 2, 3, 4, 5]).copyWithin(1, 2), [1, 3, 4, 5, 5]); assert.arrayEqual(new Typed([1, 2, 3, 4, 5]).copyWithin(2, 2), [1, 2, 3, 4, 5]); assert.arrayEqual(new Typed([1, 2, 3, 4, 5]).copyWithin(0, 3, 4), [4, 2, 3, 4, 5]); assert.arrayEqual(new Typed([1, 2, 3, 4, 5]).copyWithin(1, 3, 4), [1, 4, 3, 4, 5]); assert.arrayEqual(new Typed([1, 2, 3, 4, 5]).copyWithin(1, 2, 4), [1, 3, 4, 4, 5]); assert.arrayEqual(new Typed([1, 2, 3, 4, 5]).copyWithin(0, -2), [4, 5, 3, 4, 5]); assert.arrayEqual(new Typed([1, 2, 3, 4, 5]).copyWithin(0, -2, -1), [4, 2, 3, 4, 5]); assert.arrayEqual(new Typed([1, 2, 3, 4, 5]).copyWithin(-4, -3, -2), [1, 3, 3, 4, 5]); assert.arrayEqual(new Typed([1, 2, 3, 4, 5]).copyWithin(-4, -3, -1), [1, 3, 4, 4, 5]); assert.arrayEqual(new Typed([1, 2, 3, 4, 5]).copyWithin(-4, -3), [1, 3, 4, 5, 5]); assert.throws(fn$, "isn't generic"); } function fn$(){ Typed.prototype.fill.call([0], 1); } }); }).call(this); // Generated by LiveScript 1.4.0 (function(){ var module, test; module = QUnit.module, test = QUnit.test; module('ES6'); DESCRIPTORS && test('%TypedArrayPrototype%.every', function(assert){ var i$, x$, ref$, len$, Typed, a, ctx, v, k, arr; for (i$ = 0, len$ = (ref$ = ['Float32Array', 'Float64Array', 'Int8Array', 'Int16Array', 'Int32Array', 'Uint8Array', 'Uint16Array', 'Uint32Array', 'Uint8ClampedArray']).length; i$ < len$; ++i$) { x$ = ref$[i$]; Typed = global[x$]; assert.isFunction(Typed.prototype.every, x$ + "::every is function"); assert.arity(Typed.prototype.every, 1, x$ + "::every arity is 1"); assert.name(Typed.prototype.every, 'every', x$ + "::every name is 'every'"); assert.looksNative(Typed.prototype.every, x$ + "::every looks native"); (a = new Typed([1])).every(fn$, ctx = {}); assert.ok(new Typed([1, 2, 3]).every(fn1$)); assert.ok(new Typed([1, 2, 3]).every((fn2$))); assert.ok(!new Typed([1, 2, 3]).every((fn3$))); assert.ok(!new Typed([1, 2, 3]).every(fn4$)); assert.ok(new Typed([1, 2, 3]).every(fn5$, 1)); v = ''; k = ''; new Typed([1, 2, 3]).every(fn6$); assert.same(v, '123'); assert.same(k, '012'); assert.ok((arr = new Typed([1, 2, 3])).every(fn7$)); assert.throws(fn8$, "isn't generic"); } function fn$(val, key, that){ assert.same(arguments.length, 3, 'correct number of callback arguments'); assert.same(val, 1, 'correct value in callback'); assert.same(key, 0, 'correct index in callback'); assert.same(that, a, 'correct link to array in callback'); assert.same(this, ctx, 'correct callback context'); } function fn1$(it){ return typeof it === 'number'; } function fn2$(it){ return it < 4; } function fn3$(it){ return it < 3; } function fn4$(it){ return typeof it === 'string'; } function fn5$(){ return +this === 1; } function fn6$(a, b){ v += a; k += b; return true; } function fn7$(){ return arguments[2] === arr; } function fn8$(){ Typed.prototype.every.call([0], function(){ return true; }); } }); }).call(this); // Generated by LiveScript 1.4.0 (function(){ var module, test; module = QUnit.module, test = QUnit.test; module('ES6'); DESCRIPTORS && test('%TypedArrayPrototype%.fill', function(assert){ var i$, x$, ref$, len$, Typed, a; for (i$ = 0, len$ = (ref$ = ['Float32Array', 'Float64Array', 'Int8Array', 'Int16Array', 'Int32Array', 'Uint8Array', 'Uint16Array', 'Uint32Array', 'Uint8ClampedArray']).length; i$ < len$; ++i$) { x$ = ref$[i$]; Typed = global[x$]; assert.isFunction(Typed.prototype.fill, x$ + "::fill is function"); assert.arity(Typed.prototype.fill, 1, x$ + "::fill arity is 1"); assert.name(Typed.prototype.fill, 'fill', x$ + "::fill name is 'fill'"); assert.looksNative(Typed.prototype.fill, x$ + "::fill looks native"); assert.strictEqual(a = new Typed(5).fill(5), a, 'return this'); assert.arrayEqual(new Typed(5).fill(5), [5, 5, 5, 5, 5], 'basic'); assert.arrayEqual(new Typed(5).fill(5, 1), [0, 5, 5, 5, 5], 'start index'); assert.arrayEqual(new Typed(5).fill(5, 1, 4), [0, 5, 5, 5, 0], 'end index'); assert.arrayEqual(new Typed(5).fill(5, 6, 1), [0, 0, 0, 0, 0], 'start > end'); assert.arrayEqual(new Typed(5).fill(5, -3, 4), [0, 0, 5, 5, 0], 'negative start index'); assert.throws(fn$, "isn't generic"); } function fn$(){ Typed.prototype.fill.call([0], 1); } }); }).call(this); // Generated by LiveScript 1.4.0 (function(){ var module, test; module = QUnit.module, test = QUnit.test; module('ES6'); DESCRIPTORS && test('%TypedArrayPrototype%.filter', function(assert){ var i$, x$, ref$, len$, Typed, a, ctx, instance, v, k; for (i$ = 0, len$ = (ref$ = ['Float32Array', 'Float64Array', 'Int8Array', 'Int16Array', 'Int32Array', 'Uint8Array', 'Uint16Array', 'Uint32Array', 'Uint8ClampedArray']).length; i$ < len$; ++i$) { x$ = ref$[i$]; Typed = global[x$]; assert.isFunction(Typed.prototype.filter, x$ + "::filter is function"); assert.arity(Typed.prototype.filter, 1, x$ + "::filter arity is 1"); assert.name(Typed.prototype.filter, 'filter', x$ + "::filter name is 'filter'"); assert.looksNative(Typed.prototype.filter, x$ + "::filter looks native"); (a = new Typed([1])).filter(fn$, ctx = {}); instance = new Typed([1, 2, 3, 4, 5, 6, 7, 8, 9]).filter((fn1$)); assert.ok(instance instanceof Typed, 'correct instance'); assert.arrayEqual(instance, [1, 3, 5, 7, 9], 'works'); v = ''; k = ''; new Typed([1, 2, 3]).filter(fn2$); assert.same(v, '123'); assert.same(k, '012'); assert.throws(fn3$, "isn't generic"); } function fn$(val, key, that){ assert.same(arguments.length, 3, 'correct number of callback arguments'); assert.same(val, 1, 'correct value in callback'); assert.same(key, 0, 'correct index in callback'); assert.same(that, a, 'correct link to array in callback'); assert.same(this, ctx, 'correct callback context'); } function fn1$(it){ return it % 2; } function fn2$(a, b){ v += a; k += b; } function fn3$(){ Typed.prototype.filter.call([0], function(){ return true; }); } }); }).call(this); // Generated by LiveScript 1.4.0 (function(){ var module, test; module = QUnit.module, test = QUnit.test; module('ES6'); DESCRIPTORS && test('%TypedArrayPrototype%.findIndex', function(assert){ var i$, x$, ref$, len$, Typed, a, ctx, v, k, results$ = []; for (i$ = 0, len$ = (ref$ = ['Float32Array', 'Float64Array', 'Int8Array', 'Int16Array', 'Int32Array', 'Uint8Array', 'Uint16Array', 'Uint32Array', 'Uint8ClampedArray']).length; i$ < len$; ++i$) { x$ = ref$[i$]; Typed = global[x$]; assert.isFunction(Typed.prototype.findIndex, x$ + "::findIndex is function"); assert.arity(Typed.prototype.findIndex, 1, x$ + "::findIndex arity is 1"); assert.name(Typed.prototype.findIndex, 'findIndex', x$ + "::findIndex name is 'findIndex'"); assert.looksNative(Typed.prototype.findIndex, x$ + "::findIndex looks native"); (a = new Typed([1])).findIndex(fn$, ctx = {}); assert.same(new Typed([1, 2, 3]).findIndex(fn1$), 1); assert.same(new Typed([1, 2, 3]).findIndex((fn2$)), -1); v = ''; k = ''; new Typed([1, 2, 3]).findIndex(fn3$); assert.same(v, '123'); assert.same(k, '012'); results$.push(assert.throws(fn4$, "isn't generic")); } return results$; function fn$(val, key, that){ assert.same(arguments.length, 3, 'correct number of callback arguments'); assert.same(val, 1, 'correct value in callback'); assert.same(key, 0, 'correct index in callback'); assert.same(that, a, 'correct link to array in callback'); assert.same(this, ctx, 'correct callback context'); } function fn1$(it){ return !(it % 2); } function fn2$(it){ return it === 4; } function fn3$(a, b){ v += a; k += b; } function fn4$(){ Typed.prototype.findIndex.call([0], function(){ return true; }); } }); }).call(this); // Generated by LiveScript 1.4.0 (function(){ var module, test; module = QUnit.module, test = QUnit.test; module('ES6'); DESCRIPTORS && test('%TypedArrayPrototype%.find', function(assert){ var i$, x$, ref$, len$, Typed, a, ctx, v, k; for (i$ = 0, len$ = (ref$ = ['Float32Array', 'Float64Array', 'Int8Array', 'Int16Array', 'Int32Array', 'Uint8Array', 'Uint16Array', 'Uint32Array', 'Uint8ClampedArray']).length; i$ < len$; ++i$) { x$ = ref$[i$]; Typed = global[x$]; assert.isFunction(Typed.prototype.find, x$ + "::find is function"); assert.arity(Typed.prototype.find, 1, x$ + "::find arity is 1"); assert.name(Typed.prototype.find, 'find', x$ + "::find name is 'find'"); assert.looksNative(Typed.prototype.find, x$ + "::find looks native"); (a = new Typed([1])).find(fn$, ctx = {}); assert.same(new Typed([1, 2, 3]).find(fn1$), 2); assert.same(new Typed([1, 2, 3]).find((fn2$)), void 8); v = ''; k = ''; new Typed([1, 2, 3]).find(fn3$); assert.same(v, '123'); assert.same(k, '012'); assert.throws(fn4$, "isn't generic"); } function fn$(val, key, that){ assert.same(arguments.length, 3, 'correct number of callback arguments'); assert.same(val, 1, 'correct value in callback'); assert.same(key, 0, 'correct index in callback'); assert.same(that, a, 'correct link to array in callback'); assert.same(this, ctx, 'correct callback context'); } function fn1$(it){ return !(it % 2); } function fn2$(it){ return it === 4; } function fn3$(a, b){ v += a; k += b; } function fn4$(){ Typed.prototype.find.call([0], function(){ return true; }); } }); }).call(this); // Generated by LiveScript 1.4.0 (function(){ var module, test; module = QUnit.module, test = QUnit.test; module('ES6'); DESCRIPTORS && test('%TypedArrayPrototype%.forEach', function(assert){ var i$, x$, ref$, len$, Typed, a, ctx, v, k; for (i$ = 0, len$ = (ref$ = ['Float32Array', 'Float64Array', 'Int8Array', 'Int16Array', 'Int32Array', 'Uint8Array', 'Uint16Array', 'Uint32Array', 'Uint8ClampedArray']).length; i$ < len$; ++i$) { x$ = ref$[i$]; Typed = global[x$]; assert.isFunction(Typed.prototype.forEach, x$ + "::forEach is function"); assert.arity(Typed.prototype.forEach, 1, x$ + "::forEach arity is 1"); assert.name(Typed.prototype.forEach, 'forEach', x$ + "::forEach name is 'forEach'"); assert.looksNative(Typed.prototype.forEach, x$ + "::forEach looks native"); assert.same(new Typed([1]).forEach(fn$), void 8, 'void'); (a = new Typed([1])).forEach(fn1$, ctx = {}); v = ''; k = ''; new Typed([1, 2, 3]).forEach(fn2$); assert.same(v, '123'); assert.same(k, '012'); assert.throws(fn3$, "isn't generic"); } function fn$(){} function fn1$(val, key, that){ assert.same(arguments.length, 3, 'correct number of callback arguments'); assert.same(val, 1, 'correct value in callback'); assert.same(key, 0, 'correct index in callback'); assert.same(that, a, 'correct link to array in callback'); assert.same(this, ctx, 'correct callback context'); } function fn2$(a, b){ v += a; k += b; } function fn3$(){ Typed.prototype.forEach.call([0], function(){ return true; }); } }); }).call(this); // Generated by LiveScript 1.4.0 (function(){ var module, test; module = QUnit.module, test = QUnit.test; module('ES6'); DESCRIPTORS && test('%TypedArray%.from', function(assert){ var i$, x$, ref$, len$, Typed, inst, O; for (i$ = 0, len$ = (ref$ = ['Float32Array', 'Float64Array', 'Int8Array', 'Int16Array', 'Int32Array', 'Uint8Array', 'Uint16Array', 'Uint32Array', 'Uint8ClampedArray']).length; i$ < len$; ++i$) { x$ = ref$[i$]; Typed = global[x$]; assert.isFunction(Typed.from, x$ + ".from is function"); assert.arity(Typed.from, 1, x$ + ".from arity is 1"); assert.name(Typed.from, 'from', x$ + ".from name is 'from'"); assert.looksNative(Typed.from, x$ + ".from looks native"); inst = Typed.from([1, 2, 3]); assert.ok(inst instanceof Typed, 'correct instance with array'); assert.arrayEqual(inst, [1, 2, 3], 'correct elements with array'); inst = Typed.from({ 0: 1, 1: 2, 2: 3, length: 3 }); assert.ok(inst instanceof Typed, 'correct instance with array-like'); assert.arrayEqual(inst, [1, 2, 3], 'correct elements with array-like'); inst = Typed.from(createIterable([1, 2, 3])); assert.ok(inst instanceof Typed, 'correct instance with iterable'); assert.arrayEqual(inst, [1, 2, 3], 'correct elements with iterable'); assert.arrayEqual(Typed.from([1, 2, 3], fn$), [1, 4, 9], 'accept callback'); Typed.from([1], fn1$, O = {}); assert.throws(fn2$, "isn't generic #1"); if (NATIVE) { assert.throws(fn3$, "isn't generic #2"); assert.ok((fn4$()), 'uses ToLength'); } } function fn$(it){ return it * it; } function fn1$(a, b){ assert.same(arguments.length, 2, 'correct number of callback arguments'); assert.same(a, 1, 'correct value in callback'); assert.same(b, 0, 'correct index in callback'); return assert.same(this, O, 'correct callback context'); } function fn2$(){ Typed.from.call(void 8, []); } function fn3$(){ Typed.from.call(Array, []); } function fn4$(){ try { return Typed.from({ length: -1, 0: 1 }, function(){ throw 42; }); } catch (e$) {} } }); }).call(this); // Generated by LiveScript 1.4.0 (function(){ var module, test; module = QUnit.module, test = QUnit.test; module('ES6'); DESCRIPTORS && test('%TypedArrayPrototype%.indexOf', function(assert){ var i$, x$, ref$, len$, Typed; for (i$ = 0, len$ = (ref$ = ['Float32Array', 'Float64Array', 'Int8Array', 'Int16Array', 'Int32Array', 'Uint8Array', 'Uint16Array', 'Uint32Array', 'Uint8ClampedArray']).length; i$ < len$; ++i$) { x$ = ref$[i$]; Typed = global[x$]; assert.isFunction(Typed.prototype.indexOf, x$ + "::indexOf is function"); assert.arity(Typed.prototype.indexOf, 1, x$ + "::indexOf arity is 1"); assert.name(Typed.prototype.indexOf, 'indexOf', x$ + "::indexOf name is 'indexOf'"); assert.looksNative(Typed.prototype.indexOf, x$ + "::indexOf looks native"); assert.same(new Typed([1, 1, 1]).indexOf(1), 0); assert.same(new Typed([1, 2, 3]).indexOf(1, 1), -1); assert.same(new Typed([1, 2, 3]).indexOf(2, 1), 1); assert.same(new Typed([1, 2, 3]).indexOf(2, -1), -1); assert.same(new Typed([1, 2, 3]).indexOf(2, -2), 1); assert.throws(fn$, "isn't generic"); } function fn$(){ Typed.prototype.indexOf.call([1, 2], 1); } }); }).call(this); // Generated by LiveScript 1.4.0 (function(){ var module, test, arrays; module = QUnit.module, test = QUnit.test; module('ES6'); arrays = ['Float32Array', 'Float64Array', 'Int8Array', 'Int16Array', 'Int32Array', 'Uint8Array', 'Uint16Array', 'Uint32Array', 'Uint8ClampedArray']; DESCRIPTORS && test('%TypedArrayPrototype%.keys', function(assert){ var i$, x$, ref$, len$, Typed, iter; for (i$ = 0, len$ = (ref$ = arrays).length; i$ < len$; ++i$) { x$ = ref$[i$]; Typed = global[x$]; assert.isFunction(Typed.prototype.keys, x$ + "::keys is function"); assert.arity(Typed.prototype.keys, 0, x$ + "::keys arity is 0"); assert.name(Typed.prototype.keys, 'keys', x$ + "::keys name is 'keys'"); assert.looksNative(Typed.prototype.keys, x$ + "::keys looks native"); iter = new Typed([1, 2, 3]).keys(); assert.isIterator(iter); assert.isIterable(iter); assert.strictEqual(iter[typeof Symbol != 'undefined' && Symbol !== null ? Symbol.toStringTag : void 8], 'Array Iterator'); assert.deepEqual(iter.next(), { value: 0, done: false }, 'step 1'); assert.deepEqual(iter.next(), { value: 1, done: false }, 'step 2'); assert.deepEqual(iter.next(), { value: 2, done: false }, 'step 3'); assert.deepEqual(iter.next(), { value: void 8, done: true }, 'done'); NATIVE && assert.throws(fn$, "isn't generic"); } function fn$(){ Typed.prototype.keys.call([1, 2]); } }); DESCRIPTORS && test('%TypedArrayPrototype%.values', function(assert){ var i$, x$, ref$, len$, Typed, iter; for (i$ = 0, len$ = (ref$ = arrays).length; i$ < len$; ++i$) { x$ = ref$[i$]; Typed = global[x$]; assert.isFunction(Typed.prototype.values, x$ + "::values is function"); assert.arity(Typed.prototype.values, 0, x$ + "::values arity is 0"); assert.name(Typed.prototype.values, 'values', x$ + "::values name is 'values'"); assert.looksNative(Typed.prototype.values, x$ + "::values looks native"); iter = new Typed([1, 2, 3]).values(); assert.isIterator(iter); assert.isIterable(iter); assert.strictEqual(iter[typeof Symbol != 'undefined' && Symbol !== null ? Symbol.toStringTag : void 8], 'Array Iterator'); assert.deepEqual(iter.next(), { value: 1, done: false }, 'step 1'); assert.deepEqual(iter.next(), { value: 2, done: false }, 'step 2'); assert.deepEqual(iter.next(), { value: 3, done: false }, 'step 3'); assert.deepEqual(iter.next(), { value: void 8, done: true }, 'done'); NATIVE && assert.throws(fn$, "isn't generic"); } function fn$(){ Typed.prototype.values.call([1, 2]); } }); DESCRIPTORS && test('%TypedArrayPrototype%.entries', function(assert){ var i$, x$, ref$, len$, Typed, iter; for (i$ = 0, len$ = (ref$ = arrays).length; i$ < len$; ++i$) { x$ = ref$[i$]; Typed = global[x$]; assert.isFunction(Typed.prototype.entries, x$ + "::entries is function"); assert.arity(Typed.prototype.entries, 0, x$ + "::entries arity is 0"); assert.name(Typed.prototype.entries, 'entries', x$ + "::entries name is 'entries'"); assert.looksNative(Typed.prototype.entries, x$ + "::entries looks native"); iter = new Typed([1, 2, 3]).entries(); assert.isIterator(iter); assert.isIterable(iter); assert.strictEqual(iter[typeof Symbol != 'undefined' && Symbol !== null ? Symbol.toStringTag : void 8], 'Array Iterator'); assert.deepEqual(iter.next(), { value: [0, 1], done: false }, 'step 1'); assert.deepEqual(iter.next(), { value: [1, 2], done: false }, 'step 2'); assert.deepEqual(iter.next(), { value: [2, 3], done: false }, 'step 3'); assert.deepEqual(iter.next(), { value: void 8, done: true }, 'done'); NATIVE && assert.throws(fn$, "isn't generic"); } function fn$(){ Typed.prototype.entries.call([1, 2]); } }); DESCRIPTORS && test('%TypedArrayPrototype%.@@iterator', function(assert){ var i$, x$, ref$, len$, Typed, iter; for (i$ = 0, len$ = (ref$ = arrays).length; i$ < len$; ++i$) { x$ = ref$[i$]; Typed = global[x$]; assert.isIterable(Typed.prototype, x$ + " is itrable"); assert.arity(Typed.prototype[typeof Symbol != 'undefined' && Symbol !== null ? Symbol.iterator : void 8], 0, x$ + "::@@iterator arity is 0"); assert.name(Typed.prototype[typeof Symbol != 'undefined' && Symbol !== null ? Symbol.iterator : void 8], 'values', x$ + "::@@iterator name is 'values'"); assert.looksNative(Typed.prototype[typeof Symbol != 'undefined' && Symbol !== null ? Symbol.iterator : void 8], x$ + "::@@iterator looks native"); assert.strictEqual(Typed.prototype[typeof Symbol != 'undefined' && Symbol !== null ? Symbol.iterator : void 8], Typed.prototype.values); iter = new Typed([1, 2, 3])[typeof Symbol != 'undefined' && Symbol !== null ? Symbol.iterator : void 8](); assert.isIterator(iter); assert.isIterable(iter); assert.strictEqual(iter[typeof Symbol != 'undefined' && Symbol !== null ? Symbol.toStringTag : void 8], 'Array Iterator'); assert.deepEqual(iter.next(), { value: 1, done: false }, 'step 1'); assert.deepEqual(iter.next(), { value: 2, done: false }, 'step 2'); assert.deepEqual(iter.next(), { value: 3, done: false }, 'step 3'); assert.deepEqual(iter.next(), { value: void 8, done: true }, 'done'); NATIVE && assert.throws(fn$, "isn't generic"); } function fn$(){ Typed.prototype[typeof Symbol != 'undefined' && Symbol !== null ? Symbol.iterator : void 8].call([1, 2]); } }); }).call(this); // Generated by LiveScript 1.4.0 (function(){ var module, test; module = QUnit.module, test = QUnit.test; module('ES6'); DESCRIPTORS && test('%TypedArrayPrototype%.join', function(assert){ var i$, x$, ref$, len$, Typed; for (i$ = 0, len$ = (ref$ = ['Float32Array', 'Float64Array', 'Int8Array', 'Int16Array', 'Int32Array', 'Uint8Array', 'Uint16Array', 'Uint32Array', 'Uint8ClampedArray']).length; i$ < len$; ++i$) { x$ = ref$[i$]; Typed = global[x$]; assert.isFunction(Typed.prototype.join, x$ + "::join is function"); assert.arity(Typed.prototype.join, 1, x$ + "::join arity is 1"); assert.name(Typed.prototype.join, 'join', x$ + "::join name is 'join'"); assert.looksNative(Typed.prototype.join, x$ + "::join looks native"); assert.same(new Typed([1, 2, 3]).join('|'), '1|2|3', 'works #1'); assert.same(new Typed([1, 2, 3]).join(), '1,2,3', 'works #2'); assert.throws(fn$, "isn't generic"); } function fn$(){ Typed.prototype.join.call([1, 2, 3]); } }); }).call(this); // Generated by LiveScript 1.4.0 (function(){ var module, test; module = QUnit.module, test = QUnit.test; module('ES6'); DESCRIPTORS && test('%TypedArrayPrototype%.lastIndexOf', function(assert){ var i$, x$, ref$, len$, Typed; for (i$ = 0, len$ = (ref$ = ['Float32Array', 'Float64Array', 'Int8Array', 'Int16Array', 'Int32Array', 'Uint8Array', 'Uint16Array', 'Uint32Array', 'Uint8ClampedArray']).length; i$ < len$; ++i$) { x$ = ref$[i$]; Typed = global[x$]; assert.isFunction(Typed.prototype.lastIndexOf, x$ + "::lastIndexOf is function"); assert.arity(Typed.prototype.lastIndexOf, 1, x$ + "::lastIndexOf arity is 1"); assert.name(Typed.prototype.lastIndexOf, 'lastIndexOf', x$ + "::lastIndexOf name is 'lastIndexOf'"); assert.looksNative(Typed.prototype.lastIndexOf, x$ + "::lastIndexOf looks native"); assert.same(new Typed([1, 1, 1]).lastIndexOf(1), 2); assert.same(new Typed([1, 2, 3]).lastIndexOf(3, 1), -1); assert.same(new Typed([1, 2, 3]).lastIndexOf(2, 1), 1); assert.same(new Typed([1, 2, 3]).lastIndexOf(2, -3), -1); assert.same(new Typed([1, 2, 3]).lastIndexOf(2, -2), 1); assert.throws(fn$, "isn't generic"); } function fn$(){ Typed.prototype.lastIndexOf.call([1, 2], 1); } }); }).call(this); // Generated by LiveScript 1.4.0 (function(){ var module, test; module = QUnit.module, test = QUnit.test; module('ES6'); DESCRIPTORS && test('%TypedArrayPrototype%.map', function(assert){ var i$, x$, ref$, len$, Typed, a, ctx, instance, v, k; for (i$ = 0, len$ = (ref$ = ['Float32Array', 'Float64Array', 'Int8Array', 'Int16Array', 'Int32Array', 'Uint8Array', 'Uint16Array', 'Uint32Array', 'Uint8ClampedArray']).length; i$ < len$; ++i$) { x$ = ref$[i$]; Typed = global[x$]; assert.isFunction(Typed.prototype.map, x$ + "::map is function"); assert.arity(Typed.prototype.map, 1, x$ + "::map arity is 1"); assert.name(Typed.prototype.map, 'map', x$ + "::map name is 'map'"); assert.looksNative(Typed.prototype.map, x$ + "::map looks native"); (a = new Typed([1])).map(fn$, ctx = {}); instance = new Typed([1, 2, 3, 4, 5]).map((fn1$)); assert.ok(instance instanceof Typed, 'correct instance'); assert.arrayEqual(instance, [2, 4, 6, 8, 10], 'works'); v = ''; k = ''; new Typed([1, 2, 3]).map(fn2$); assert.same(v, '123'); assert.same(k, '012'); assert.throws(fn3$, "isn't generic"); } function fn$(val, key, that){ assert.same(arguments.length, 3, 'correct number of callback arguments'); assert.same(val, 1, 'correct value in callback'); assert.same(key, 0, 'correct index in callback'); assert.same(that, a, 'correct link to array in callback'); return assert.same(this, ctx, 'correct callback context'); } function fn1$(it){ return it * 2; } function fn2$(a, b){ v += a; k += b; } function fn3$(){ Typed.prototype.map.call([0], function(){ return true; }); } }); }).call(this); // Generated by LiveScript 1.4.0 (function(){ var module, test; module = QUnit.module, test = QUnit.test; module('ES6'); DESCRIPTORS && test('%TypedArray%.of', function(assert){ var i$, x$, ref$, len$, Typed, inst; for (i$ = 0, len$ = (ref$ = ['Float32Array', 'Float64Array', 'Int8Array', 'Int16Array', 'Int32Array', 'Uint8Array', 'Uint16Array', 'Uint32Array', 'Uint8ClampedArray']).length; i$ < len$; ++i$) { x$ = ref$[i$]; Typed = global[x$]; assert.isFunction(Typed.of, x$ + ".of is function"); assert.arity(Typed.of, 0, x$ + ".of arity is 0"); assert.name(Typed.of, 'of', x$ + ".of name is 'of'"); assert.looksNative(Typed.of, x$ + ".of looks native"); inst = Typed.of(); assert.ok(inst instanceof Typed, 'correct instance with 0 arguments'); assert.arrayEqual(inst, [], 'correct elements with 0 arguments'); inst = Typed.of(1); assert.ok(inst instanceof Typed, 'correct instance with 1 argument'); assert.arrayEqual(inst, [1], 'correct elements with 1 argument'); inst = Typed.of(1, 2, 3); assert.ok(inst instanceof Typed, 'correct instance with several arguments'); assert.arrayEqual(inst, [1, 2, 3], 'correct elements with several arguments'); assert.throws(fn$, "isn't generic #1"); NATIVE && assert.throws(fn1$, "isn't generic #2"); } function fn$(){ Typed.of.call(void 8, 1); } function fn1$(){ Typed.of.call(Array, 1); } }); }).call(this); // Generated by LiveScript 1.4.0 (function(){ var module, test; module = QUnit.module, test = QUnit.test; module('ES6'); DESCRIPTORS && test('%TypedArrayPrototype%.reduceRight', function(assert){ var i$, x$, ref$, len$, Typed, a, accumulator, v, k, fn1$ = curry$(function(x$, y$){ return x$ + y$; }), fn3$ = curry$(function(x$, y$){ return x$ + y$; }); for (i$ = 0, len$ = (ref$ = ['Float32Array', 'Float64Array', 'Int8Array', 'Int16Array', 'Int32Array', 'Uint8Array', 'Uint16Array', 'Uint32Array', 'Uint8ClampedArray']).length; i$ < len$; ++i$) { x$ = ref$[i$]; Typed = global[x$]; assert.isFunction(Typed.prototype.reduceRight, x$ + "::reduceRight is function"); assert.arity(Typed.prototype.reduceRight, 1, x$ + "::reduceRight arity is 1"); assert.name(Typed.prototype.reduceRight, 'reduceRight', x$ + "::reduceRight name is 'reduceRight'"); assert.looksNative(Typed.prototype.reduceRight, x$ + "::reduceRight looks native"); (a = new Typed([1])).reduceRight(fn$, accumulator = {}); assert.same(new Typed([1, 2, 3]).reduceRight(fn1$, 1), 7, 'works with initial accumulator'); (a = new Typed([1, 2])).reduceRight(fn2$); assert.same(new Typed([1, 2, 3]).reduceRight(fn3$), 6, 'works without initial accumulator'); v = ''; k = ''; new Typed([1, 2, 3]).reduceRight(fn4$, 0); assert.same(v, '321', 'correct order #1'); assert.same(k, '210', 'correct order #2'); assert.throws(fn5$, "isn't generic"); } function fn$(memo, val, key, that){ assert.same(arguments.length, 4, 'correct number of callback arguments'); assert.same(memo, accumulator, 'correct callback accumulator'); assert.same(val, 1, 'correct value in callback'); assert.same(key, 0, 'correct index in callback'); return assert.same(that, a, 'correct link to array in callback'); } function fn2$(memo, val, key, that){ assert.same(memo, 2, 'correct default accumulator'); assert.same(val, 1, 'correct start value without initial accumulator'); return assert.same(key, 0, 'correct start index without initial accumulator'); } function fn4$(memo, a, b){ v += a; k += b; } function fn5$(){ Typed.prototype.reduceRight.call([0], function(){ return true; }); } }); function curry$(f, bound){ var context, _curry = function(args) { return f.length > 1 ? function(){ var params = args ? args.concat() : []; context = bound ? context || this : this; return params.push.apply(params, arguments) < f.length && arguments.length ? _curry.call(context, params) : f.apply(context, params); } : f; }; return _curry(); } }).call(this); // Generated by LiveScript 1.4.0 (function(){ var module, test; module = QUnit.module, test = QUnit.test; module('ES6'); DESCRIPTORS && test('%TypedArrayPrototype%.reduce', function(assert){ var i$, x$, ref$, len$, Typed, a, accumulator, v, k, fn1$ = curry$(function(x$, y$){ return x$ + y$; }), fn3$ = curry$(function(x$, y$){ return x$ + y$; }); for (i$ = 0, len$ = (ref$ = ['Float32Array', 'Float64Array', 'Int8Array', 'Int16Array', 'Int32Array', 'Uint8Array', 'Uint16Array', 'Uint32Array', 'Uint8ClampedArray']).length; i$ < len$; ++i$) { x$ = ref$[i$]; Typed = global[x$]; assert.isFunction(Typed.prototype.reduce, x$ + "::reduce is function"); assert.arity(Typed.prototype.reduce, 1, x$ + "::reduce arity is 1"); assert.name(Typed.prototype.reduce, 'reduce', x$ + "::reduce name is 'reduce'"); assert.looksNative(Typed.prototype.reduce, x$ + "::reduce looks native"); (a = new Typed([1])).reduce(fn$, accumulator = {}); assert.same(new Typed([1, 2, 3]).reduce(fn1$, 1), 7, 'works with initial accumulator'); (a = new Typed([1, 2])).reduce(fn2$); assert.same(new Typed([1, 2, 3]).reduce(fn3$), 6, 'works without initial accumulator'); v = ''; k = ''; new Typed([1, 2, 3]).reduce(fn4$, 0); assert.same(v, '123', 'correct order #1'); assert.same(k, '012', 'correct order #2'); assert.throws(fn5$, "isn't generic"); } function fn$(memo, val, key, that){ assert.same(arguments.length, 4, 'correct number of callback arguments'); assert.same(memo, accumulator, 'correct callback accumulator'); assert.same(val, 1, 'correct value in callback'); assert.same(key, 0, 'correct index in callback'); return assert.same(that, a, 'correct link to array in callback'); } function fn2$(memo, val, key, that){ assert.same(memo, 1, 'correct default accumulator'); assert.same(val, 2, 'correct start value without initial accumulator'); return assert.same(key, 1, 'correct start index without initial accumulator'); } function fn4$(memo, a, b){ v += a; k += b; } function fn5$(){ Typed.prototype.reduce.call([0], function(){ return true; }); } }); function curry$(f, bound){ var context, _curry = function(args) { return f.length > 1 ? function(){ var params = args ? args.concat() : []; context = bound ? context || this : this; return params.push.apply(params, arguments) < f.length && arguments.length ? _curry.call(context, params) : f.apply(context, params); } : f; }; return _curry(); } }).call(this); // Generated by LiveScript 1.4.0 (function(){ var module, test; module = QUnit.module, test = QUnit.test; module('ES6'); DESCRIPTORS && test('%TypedArrayPrototype%.reverse', function(assert){ var i$, x$, ref$, len$, Typed, a; for (i$ = 0, len$ = (ref$ = ['Float32Array', 'Float64Array', 'Int8Array', 'Int16Array', 'Int32Array', 'Uint8Array', 'Uint16Array', 'Uint32Array', 'Uint8ClampedArray']).length; i$ < len$; ++i$) { x$ = ref$[i$]; Typed = global[x$]; assert.isFunction(Typed.prototype.reverse, x$ + "::reverse is function"); assert.arity(Typed.prototype.reverse, 0, x$ + "::reverse arity is 0"); assert.name(Typed.prototype.reverse, 'reverse', x$ + "::reverse name is 'reverse'"); assert.looksNative(Typed.prototype.reverse, x$ + "::reverse looks native"); assert.same((a = new Typed([1, 2])).reverse(), a, 'return this'); assert.arrayEqual(new Typed([1, 2, 3, 4]).reverse(), [4, 3, 2, 1], 'works #1'); assert.arrayEqual(new Typed([1, 2, 3]).reverse(), [3, 2, 1], 'works #2'); assert.throws(fn$, "isn't generic"); } function fn$(){ Typed.prototype.reverse.call([1, 2]); } }); }).call(this); // Generated by LiveScript 1.4.0 (function(){ var module, test; module = QUnit.module, test = QUnit.test; module('ES6'); DESCRIPTORS && test('%TypedArrayPrototype%.set', function(assert){ var i$, x$, ref$, len$, Typed, a, b, y$; for (i$ = 0, len$ = (ref$ = ['Float32Array', 'Float64Array', 'Int8Array', 'Int16Array', 'Int32Array', 'Uint8Array', 'Uint16Array', 'Uint32Array', 'Uint8ClampedArray']).length; i$ < len$; ++i$) { x$ = ref$[i$]; Typed = global[x$]; assert.isFunction(Typed.prototype.set, x$ + "::set is function"); NATIVE && assert.arity(Typed.prototype.set, 1, x$ + "::set arity is 1"); assert.name(Typed.prototype.set, 'set', x$ + "::set name is 'subarray'"); assert.looksNative(Typed.prototype.set, x$ + "::set looks native"); assert.same(new Typed(1).set([1]), void 8, 'void'); a = new Typed([1, 2, 3, 4, 5]); b = new Typed(5); b.set(a); assert.arrayEqual(b, [1, 2, 3, 4, 5]); assert.throws(fn$); assert.throws(fn1$); b.set(new Typed([99, 98]), 2); assert.arrayEqual(b, [1, 2, 99, 98, 5]); b.set(new Typed([99, 98, 97]), 2); assert.arrayEqual(b, [1, 2, 99, 98, 97]); assert.throws(fn2$); assert.throws(fn3$); assert.arrayEqual((y$ = new Typed(2), y$.set({ length: 2, 0: 1, 1: 2 }), y$), [1, 2]); assert.throws(fn4$, "isn't generic"); } function fn$(){ b.set(a, 1); } function fn1$(){ b.set(a, -1); } function fn2$(){ b.set(new Typed([99, 98, 97, 96]), 2); } function fn3$(){ b.set([101, 102, 103, 104], 4); } function fn4$(){ Typed.prototype.set.call([1, 2, 3], [1]); } }); }).call(this); // Generated by LiveScript 1.4.0 (function(){ var module, test; module = QUnit.module, test = QUnit.test; module('ES6'); DESCRIPTORS && test('%TypedArrayPrototype%.slice', function(assert){ var i$, x$, ref$, len$, Typed, arr; for (i$ = 0, len$ = (ref$ = ['Float32Array', 'Float64Array', 'Int8Array', 'Int16Array', 'Int32Array', 'Uint8Array', 'Uint16Array', 'Uint32Array', 'Uint8ClampedArray']).length; i$ < len$; ++i$) { x$ = ref$[i$]; Typed = global[x$]; assert.isFunction(Typed.prototype.slice, x$ + "::slice is function"); NATIVE && assert.arity(Typed.prototype.slice, 2, x$ + "::slice arity is 2"); assert.name(Typed.prototype.slice, 'slice', x$ + "::slice name is 'subarray'"); assert.looksNative(Typed.prototype.slice, x$ + "::slice looks native"); arr = new Typed([1, 2, 3, 4, 5]); assert.ok(arr.slice() !== arr, 'returns new array'); assert.ok(arr.slice() instanceof Typed, 'correct instance'); assert.ok(arr.slice().buffer !== arr.buffer, 'with new buffer'); assert.arrayEqual(arr.slice(), arr); assert.arrayEqual(arr.slice(1, 3), [2, 3]); assert.arrayEqual(arr.slice(1, void 8), [2, 3, 4, 5]); assert.arrayEqual(arr.slice(1, -1), [2, 3, 4]); assert.arrayEqual(arr.slice(-2, -1), [4]); assert.arrayEqual(arr.slice(-2, -3), []); assert.throws(fn$, "isn't generic"); } function fn$(){ Typed.prototype.slice.call([1, 2, 3], 1); } }); }).call(this); // Generated by LiveScript 1.4.0 (function(){ var module, test; module = QUnit.module, test = QUnit.test; module('ES6'); DESCRIPTORS && test('%TypedArrayPrototype%.some', function(assert){ var i$, x$, ref$, len$, Typed, a, ctx, v, k, arr; for (i$ = 0, len$ = (ref$ = ['Float32Array', 'Float64Array', 'Int8Array', 'Int16Array', 'Int32Array', 'Uint8Array', 'Uint16Array', 'Uint32Array', 'Uint8ClampedArray']).length; i$ < len$; ++i$) { x$ = ref$[i$]; Typed = global[x$]; assert.isFunction(Typed.prototype.some, x$ + "::some is function"); assert.arity(Typed.prototype.some, 1, x$ + "::some arity is 1"); assert.name(Typed.prototype.some, 'some', x$ + "::some name is 'some'"); assert.looksNative(Typed.prototype.some, x$ + "::some looks native"); (a = new Typed([1])).some(fn$, ctx = {}); assert.ok(new Typed([1, 2, 3]).some(fn1$)); assert.ok(new Typed([1, 2, 3]).some((fn2$))); assert.ok(!new Typed([1, 2, 3]).some((fn3$))); assert.ok(!new Typed([1, 2, 3]).some(fn4$)); v = ''; k = ''; new Typed([1, 2, 3]).some(fn5$); assert.same(v, '123'); assert.same(k, '012'); assert.ok((arr = new Typed([1, 2, 3])).some(fn6$)); assert.throws(fn7$, "isn't generic"); } function fn$(val, key, that){ assert.same(arguments.length, 3, 'correct number of callback arguments'); assert.same(val, 1, 'correct value in callback'); assert.same(key, 0, 'correct index in callback'); assert.same(that, a, 'correct link to array in callback'); return assert.same(this, ctx, 'correct callback context'); } function fn1$(it){ return typeof it === 'number'; } function fn2$(it){ return it < 3; } function fn3$(it){ return it < 0; } function fn4$(it){ return typeof it === 'string'; } function fn5$(a, b){ v += a; k += b; } function fn6$(){ return arguments[2] === arr; } function fn7$(){ Typed.prototype.some.call([0], function(){ return true; }); } }); }).call(this); // Generated by LiveScript 1.4.0 (function(){ var module, test; module = QUnit.module, test = QUnit.test; module('ES6'); DESCRIPTORS && test('%TypedArrayPrototype%.subarray', function(assert){ var i$, x$, ref$, len$, Typed, a, b; for (i$ = 0, len$ = (ref$ = ['Float32Array', 'Float64Array', 'Int8Array', 'Int16Array', 'Int32Array', 'Uint8Array', 'Uint16Array', 'Uint32Array', 'Uint8ClampedArray']).length; i$ < len$; ++i$) { x$ = ref$[i$]; Typed = global[x$]; assert.isFunction(Typed.prototype.subarray, x$ + "::subarray is function"); NATIVE && assert.arity(Typed.prototype.subarray, 2, x$ + "::subarray arity is 2"); assert.name(Typed.prototype.subarray, 'subarray', x$ + "::subarray name is 'subarray'"); assert.looksNative(Typed.prototype.subarray, x$ + "::subarray looks native"); a = new Typed([1, 2, 3, 4, 5]); b = a.subarray(3); assert.ok(a !== b, 'creates new array'); assert.ok(b instanceof Typed, "instance " + x$); assert.same(a.buffer, b.buffer, 'with the same buffer'); assert.arrayEqual(b, [4, 5]); assert.arrayEqual(a.subarray(1, 3), [2, 3]); assert.arrayEqual(a.subarray(-3), [3, 4, 5]); assert.arrayEqual(a.subarray(-3, -1), [3, 4]); assert.arrayEqual(a.subarray(3, 2), []); assert.arrayEqual(a.subarray(-2, -3), []); assert.arrayEqual(a.subarray(4, 1), []); assert.arrayEqual(a.subarray(-1, -4), []); assert.arrayEqual(a.subarray(1).subarray(1), [3, 4, 5]); assert.arrayEqual(a.subarray(1, 4).subarray(1, 2), [3]); assert.throws(fn$, "isn't generic"); } function fn$(){ Typed.prototype.subarray.call([1, 2, 3], 1); } }); }).call(this); // Generated by LiveScript 1.4.0 (function(){ var module, test; module = QUnit.module, test = QUnit.test; module('ES6'); DESCRIPTORS && test('%TypedArrayPrototype%.toLocaleString', function(assert){ var i$, x$, ref$, len$, Typed; for (i$ = 0, len$ = (ref$ = ['Float32Array', 'Float64Array', 'Int8Array', 'Int16Array', 'Int32Array', 'Uint8Array', 'Uint16Array', 'Uint32Array', 'Uint8ClampedArray']).length; i$ < len$; ++i$) { x$ = ref$[i$]; Typed = global[x$]; assert.isFunction(Typed.prototype.toLocaleString, x$ + "::toLocaleString is function"); assert.arity(Typed.prototype.toLocaleString, 0, x$ + "::toLocaleString arity is 0"); assert.name(Typed.prototype.toLocaleString, 'toLocaleString', x$ + "::toLocaleString name is 'toLocaleString'"); assert.looksNative(Typed.prototype.toLocaleString, x$ + "::toLocaleString looks native"); assert.same(new Typed([1, 2, 3]).toLocaleString(), [1, 2, 3].toLocaleString(), 'works'); assert.throws(fn$, "isn't generic"); } function fn$(){ Typed.prototype.toLocaleString.call([1, 2, 3]); } }); }).call(this); // Generated by LiveScript 1.4.0 (function(){ var module, test; module = QUnit.module, test = QUnit.test; module('ES6'); DESCRIPTORS && test('%TypedArrayPrototype%.toString', function(assert){ var i$, x$, ref$, len$, Typed; for (i$ = 0, len$ = (ref$ = ['Float32Array', 'Float64Array', 'Int8Array', 'Int16Array', 'Int32Array', 'Uint8Array', 'Uint16Array', 'Uint32Array', 'Uint8ClampedArray']).length; i$ < len$; ++i$) { x$ = ref$[i$]; Typed = global[x$]; assert.isFunction(Typed.prototype.toString, x$ + "::toString is function"); assert.arity(Typed.prototype.toString, 0, x$ + "::toString arity is 0"); assert.name(Typed.prototype.toString, 'toString', x$ + "::toString name is 'toString'"); assert.looksNative(Typed.prototype.toString, x$ + "::toString looks native"); assert.same(new Typed([1, 2, 3]).toString(), '1,2,3', 'works'); assert.same(Typed.prototype.toString.call([1, 2, 3]), '1,2,3', "generic"); } }); }).call(this); // Generated by LiveScript 1.4.0 (function(){ var module, test, freeze; module = QUnit.module, test = QUnit.test; module('ES6'); freeze = Object.freeze; test('WeakMap', function(assert){ var a, x$, f, M, done, iter, o, key, C, O; assert.isFunction(WeakMap); assert.name(WeakMap, 'WeakMap'); assert.arity(WeakMap, 0); assert.looksNative(WeakMap); assert.ok('delete' in WeakMap.prototype, 'delete in WeakMap.prototype'); assert.ok('get' in WeakMap.prototype, 'get in WeakMap.prototype'); assert.ok('has' in WeakMap.prototype, 'has in WeakMap.prototype'); assert.ok('set' in WeakMap.prototype, 'set in WeakMap.prototype'); assert.ok(new WeakMap instanceof WeakMap, 'new WeakMap instanceof WeakMap'); assert.strictEqual(new WeakMap(createIterable([[a = {}, 42]])).get(a), 42, 'Init from iterable'); assert.strictEqual((x$ = new WeakMap(), x$.set(f = freeze({}), 42), x$).get(f), 42, 'Support frozen objects'); M = new WeakMap; M.set(freeze(f = {}), 42); assert.strictEqual(M.has(f), true); assert.strictEqual(M.get(f), 42); M['delete'](f); assert.strictEqual(M.has(f), false); assert.strictEqual(M.get(f), void 8); done = false; iter = createIterable([null, 1, 2], { 'return': function(){ return done = true; } }); try { new WeakMap(iter); } catch (e$) {} assert.ok(done, '.return #throw'); assert.ok(!('clear' in WeakMap.prototype), 'should not contains `.clear` method'); a = []; done = false; a[typeof Symbol != 'undefined' && Symbol !== null ? Symbol.iterator : void 8] = function(){ done = true; return [][typeof Symbol != 'undefined' && Symbol !== null ? Symbol.iterator : void 8].call(this); }; new WeakMap(a); assert.ok(done); o = {}; new WeakMap().set(o, 1); if (DESCRIPTORS) { assert.arrayEqual((function(){ var results$ = []; for (key in o) { results$.push(key); } return results$; }()), []); assert.arrayEqual(Object.keys(o), []); } assert.arrayEqual(Object.getOwnPropertyNames(o), []); ((typeof Object != 'undefined' && Object !== null) && Object.getOwnPropertySymbols) && assert.arrayEqual(Object.getOwnPropertySymbols(o), []); ((typeof Reflect != 'undefined' && Reflect !== null) && Reflect.ownKeys) && assert.arrayEqual(Reflect.ownKeys(o), []); if (nativeSubclass) { C = nativeSubclass(WeakMap); assert.ok(new C instanceof C, 'correct subclassing with native classes #1'); assert.ok(new C instanceof WeakMap, 'correct subclassing with native classes #2'); assert.same(new C().set(O = {}, 2).get(O), 2, 'correct subclassing with native classes #3'); } }); test('WeakMap#delete', function(assert){ var x$, M, a, b; assert.isFunction(WeakMap.prototype['delete']); NATIVE && assert.name(WeakMap.prototype['delete'], 'delete'); NATIVE && assert.arity(WeakMap.prototype['delete'], 1); assert.looksNative(WeakMap.prototype['delete']); assert.nonEnumerable(WeakMap.prototype, 'delete'); x$ = M = new WeakMap(); x$.set(a = {}, 42); x$.set(b = {}, 21); assert.ok(M.has(a) && M.has(b), 'WeakMap has values before .delete()'); M['delete'](a); assert.ok(!M.has(a) && M.has(b), 'WeakMap hasn`t value after .delete()'); assert.ok((function(){ try { return !M['delete'](1); } catch (e$) {} }()), 'return false on primitive'); }); test('WeakMap#get', function(assert){ var M, a; assert.isFunction(WeakMap.prototype.get); assert.name(WeakMap.prototype.get, 'get'); NATIVE && assert.arity(WeakMap.prototype.get, 1); assert.looksNative(WeakMap.prototype.get); assert.nonEnumerable(WeakMap.prototype, 'get'); M = new WeakMap(); assert.strictEqual(M.get({}), void 8, 'WeakMap .get() before .set() return undefined'); M.set(a = {}, 42); assert.strictEqual(M.get(a), 42, 'WeakMap .get() return value'); M['delete'](a); assert.strictEqual(M.get(a), void 8, 'WeakMap .get() after .delete() return undefined'); assert.ok((function(){ try { return void 8 === M.get(1); } catch (e$) {} }()), 'return undefined on primitive'); }); test('WeakMap#has', function(assert){ var M, a; assert.isFunction(WeakMap.prototype.has); assert.name(WeakMap.prototype.has, 'has'); NATIVE && assert.arity(WeakMap.prototype.has, 1); assert.looksNative(WeakMap.prototype.has); assert.nonEnumerable(WeakMap.prototype, 'has'); M = new WeakMap(); assert.ok(!M.has({}), 'WeakMap .has() before .set() return false'); M.set(a = {}, 42); assert.ok(M.has(a), 'WeakMap .has() return true'); M['delete'](a); assert.ok(!M.has(a), 'WeakMap .has() after .delete() return false'); assert.ok((function(){ try { return !M.has(1); } catch (e$) {} }()), 'return false on primitive'); }); test('WeakMap#set', function(assert){ var x$, a, e, wmap; assert.isFunction(WeakMap.prototype.set); assert.name(WeakMap.prototype.set, 'set'); assert.arity(WeakMap.prototype.set, 2); assert.looksNative(WeakMap.prototype.set); assert.nonEnumerable(WeakMap.prototype, 'set'); assert.same((x$ = new WeakMap(), x$.set(a = {}, 42), x$).get(a), 42, 'works with object as keys'); assert.ok((function(){ try { new WeakMap().set(42, 42); return false; } catch (e$) { e = e$; return true; } }()), 'throws with primitive keys'); wmap = new WeakMap(); assert.same(wmap.set({}, 1), wmap, 'return this'); }); test('WeakMap#@@toStringTag', function(assert){ assert.strictEqual(WeakMap.prototype[typeof Symbol != 'undefined' && Symbol !== null ? Symbol.toStringTag : void 8], 'WeakMap', 'WeakMap::@@toStringTag is `WeakMap`'); }); }).call(this); // Generated by LiveScript 1.4.0 (function(){ var module, test, freeze; module = QUnit.module, test = QUnit.test; module('ES6'); freeze = Object.freeze; test('WeakSet', function(assert){ var a, x$, f, S, done, iter, o, key, C, O; assert.isFunction(WeakSet); assert.name(WeakSet, 'WeakSet'); assert.arity(WeakSet, 0); assert.looksNative(WeakSet); assert.ok('add' in WeakSet.prototype, 'add in WeakSet.prototype'); assert.ok('delete' in WeakSet.prototype, 'delete in WeakSet.prototype'); assert.ok('has' in WeakSet.prototype, 'has in WeakSet.prototype'); assert.ok(new WeakSet instanceof WeakSet, 'new WeakSet instanceof WeakSet'); assert.ok(new WeakSet(createIterable([a = {}])).has(a), 'Init from iterable'); assert.ok((x$ = new WeakSet(), x$.add(freeze(f = {})), x$).has(f), 'Support frozen objects'); S = new WeakSet; S.add(freeze(f = {})); assert.strictEqual(S.has(f), true); S['delete'](f); assert.strictEqual(S.has(f), false); done = false; iter = createIterable([null, 1, 2], { 'return': function(){ return done = true; } }); try { new WeakSet(iter); } catch (e$) {} assert.ok(done, '.return #throw'); assert.ok(!('clear' in WeakSet.prototype), 'should not contains `.clear` method'); a = []; done = false; a[typeof Symbol != 'undefined' && Symbol !== null ? Symbol.iterator : void 8] = function(){ done = true; return [][typeof Symbol != 'undefined' && Symbol !== null ? Symbol.iterator : void 8].call(this); }; new WeakSet(a); assert.ok(done); o = {}; new WeakSet().add(o); if (DESCRIPTORS) { assert.arrayEqual((function(){ var results$ = []; for (key in o) { results$.push(key); } return results$; }()), []); assert.arrayEqual(Object.keys(o), []); } assert.arrayEqual(Object.getOwnPropertyNames(o), []); ((typeof Object != 'undefined' && Object !== null) && Object.getOwnPropertySymbols) && assert.arrayEqual(Object.getOwnPropertySymbols(o), []); ((typeof Reflect != 'undefined' && Reflect !== null) && Reflect.ownKeys) && assert.arrayEqual(Reflect.ownKeys(o), []); if (nativeSubclass) { C = nativeSubclass(WeakSet); assert.ok(new C instanceof C, 'correct subclassing with native classes #1'); assert.ok(new C instanceof WeakSet, 'correct subclassing with native classes #2'); assert.ok(new C().add(O = {}).has(O), 'correct subclassing with native classes #3'); } }); test('WeakSet#add', function(assert){ var a, e, wset; assert.isFunction(WeakSet.prototype.add); assert.name(WeakSet.prototype.add, 'add'); assert.arity(WeakSet.prototype.add, 1); assert.looksNative(WeakSet.prototype.add); assert.nonEnumerable(WeakSet.prototype, 'add'); assert.ok(new WeakSet().add(a = {}), 'works with object as keys'); assert.ok((function(){ try { new WeakSet().add(42); return false; } catch (e$) { e = e$; return true; } }()), 'throws with primitive keys'); wset = new WeakSet(); assert.same(wset.add({}), wset, 'return this'); }); test('WeakSet#delete', function(assert){ var x$, S, a, b; assert.isFunction(WeakSet.prototype['delete']); NATIVE && assert.arity(WeakSet.prototype['delete'], 1); assert.looksNative(WeakSet.prototype['delete']); assert.nonEnumerable(WeakSet.prototype, 'delete'); x$ = S = new WeakSet(); x$.add(a = {}); x$.add(b = {}); assert.ok(S.has(a) && S.has(b), 'WeakSet has values before .delete()'); S['delete'](a); assert.ok(!S.has(a) && S.has(b), 'WeakSet hasn`t value after .delete()'); assert.ok((function(){ try { return !S['delete'](1); } catch (e$) {} }()), 'return false on primitive'); }); test('WeakSet#has', function(assert){ var M, a; assert.isFunction(WeakSet.prototype.has); assert.name(WeakSet.prototype.has, 'has'); assert.arity(WeakSet.prototype.has, 1); assert.looksNative(WeakSet.prototype.has); assert.nonEnumerable(WeakSet.prototype, 'has'); M = new WeakSet(); assert.ok(!M.has({}), 'WeakSet has`nt value'); M.add(a = {}); assert.ok(M.has(a), 'WeakSet has value after .add()'); M['delete'](a); assert.ok(!M.has(a), 'WeakSet has`nt value after .delete()'); assert.ok((function(){ try { return !M.has(1); } catch (e$) {} }()), 'return false on primitive'); }); test('WeakSet::@@toStringTag', function(assert){ assert.strictEqual(WeakSet.prototype[typeof Symbol != 'undefined' && Symbol !== null ? Symbol.toStringTag : void 8], 'WeakSet', 'WeakSet::@@toStringTag is `WeakSet`'); }); }).call(this); // Generated by LiveScript 1.4.0 (function(){ var module, test; module = QUnit.module, test = QUnit.test; module('ES7'); test('Array#includes', function(assert){ var arr, o; assert.isFunction(Array.prototype.includes); assert.name(Array.prototype.includes, 'includes'); assert.arity(Array.prototype.includes, 1); assert.looksNative(Array.prototype.includes); assert.nonEnumerable(Array.prototype, 'includes'); arr = [1, 2, 3, -0, o = {}]; assert.ok(arr.includes(1)); assert.ok(arr.includes(-0)); assert.ok(arr.includes(0)); assert.ok(arr.includes(o)); assert.ok(!arr.includes(4)); assert.ok(!arr.includes(-0.5)); assert.ok(!arr.includes({})); assert.ok(Array(1).includes(void 8)); assert.ok([NaN].includes(NaN)); if (STRICT) { assert.throws(function(){ Array.prototype.includes.call(null, 0); }, TypeError); assert.throws(function(){ Array.prototype.includes.call(void 8, 0); }, TypeError); } if (NATIVE && DESCRIPTORS) { assert.ok((function(){ try { return false === Array.prototype.includes.call(Object.defineProperty({ length: -1 }, 0, { get: function(){ throw Error(); } }), 1); } catch (e$) {} }()), 'uses ToLength'); } assert.ok('includes' in Array.prototype[Symbol.unscopables], 'In Array#@@unscopables'); }); }).call(this); // Generated by LiveScript 1.4.0 (function(){ var module, test; module = QUnit.module, test = QUnit.test; module('ES6'); test('asap', function(assert){ var async, done, after; assert.expect(5); assert.isFunction(asap); assert.arity(asap, 1); assert.name(asap, 'asap'); assert.looksNative(asap); async = assert.async(); done = false; asap(function(){ if (!done) { done = true; assert.ok(after, 'works'); async(); } }); setTimeout(function(){ if (!done) { done = true; assert.ok(false, 'fails'); async(); } }, 3e3); return after = true; }); }).call(this); // Generated by LiveScript 1.4.0 (function(){ var module, test; module = QUnit.module, test = QUnit.test; module('ES7'); test('Error.isError', function(assert){ var isError; isError = Error.isError; assert.isFunction(isError); assert.arity(isError, 1); assert.name(isError, 'isError'); assert.looksNative(isError); assert.nonEnumerable(Error, 'isError'); assert.same(isError(new TypeError), true); assert.same(isError({}), false); assert.same(isError(null), false); }); }).call(this); // Generated by LiveScript 1.4.0 (function(){ var module, test; module = QUnit.module, test = QUnit.test; module('ES7'); test('Map#toJSON', function(assert){ assert.isFunction(Map.prototype.toJSON); assert.name(Map.prototype.toJSON, 'toJSON'); assert.arity(Map.prototype.toJSON, 0); assert.looksNative(Map.prototype.toJSON); assert.nonEnumerable(Map.prototype, 'toJSON'); if (typeof JSON != 'undefined' && JSON !== null) { assert.strictEqual(JSON.stringify(new Map([['a', 'b'], ['c', 'd']])), '[["a","b"],["c","d"]]', 'Works'); } }); }).call(this); // Generated by LiveScript 1.4.0 (function(){ var module, test; module = QUnit.module, test = QUnit.test; module('ES7'); test('Math.iaddh', function(assert){ var iaddh; iaddh = Math.iaddh; assert.isFunction(iaddh); assert.name(iaddh, 'iaddh'); assert.arity(iaddh, 4); assert.looksNative(iaddh); assert.nonEnumerable(Math, 'iaddh'); assert.same(iaddh(0, 2, 1, 0), 2); assert.same(iaddh(0, 4, 1, 1), 5); assert.same(iaddh(2, 4, 1, 1), 5); assert.same(iaddh(0xffffffff, 4, 1, 1), 6); assert.same(iaddh(1, 4, 0xffffffff, 1), 6); }); }).call(this); // Generated by LiveScript 1.4.0 (function(){ var module, test; module = QUnit.module, test = QUnit.test; module('ES7'); test('Math.imulh', function(assert){ var imulh; imulh = Math.imulh; assert.isFunction(imulh); assert.name(imulh, 'imulh'); assert.arity(imulh, 2); assert.looksNative(imulh); assert.nonEnumerable(Math, 'imulh'); assert.same(imulh(0xffffffff, 7), -1); assert.same(imulh(0xfffffff, 77), 4); assert.same(imulh(1, 7), 0); assert.same(imulh(-1, 7), -1); }); }).call(this); // Generated by LiveScript 1.4.0 (function(){ var module, test; module = QUnit.module, test = QUnit.test; module('ES7'); test('Math.isubh', function(assert){ var isubh; isubh = Math.isubh; assert.isFunction(isubh); assert.name(isubh, 'isubh'); assert.arity(isubh, 4); assert.looksNative(isubh); assert.nonEnumerable(Math, 'isubh'); assert.same(isubh(0, 2, 1, 0), 1); assert.same(isubh(0, 4, 1, 1), 2); assert.same(isubh(2, 4, 1, 1), 3); assert.same(isubh(0xffffffff, 4, 1, 1), 3); assert.same(isubh(1, 4, 0xffffffff, 1), 2); }); }).call(this); // Generated by LiveScript 1.4.0 (function(){ var module, test; module = QUnit.module, test = QUnit.test; module('ES7'); test('Math.umulh', function(assert){ var umulh; umulh = Math.umulh; assert.isFunction(umulh); assert.name(umulh, 'umulh'); assert.arity(umulh, 2); assert.looksNative(umulh); assert.nonEnumerable(Math, 'umulh'); assert.same(umulh(0xffffffff, 7), 6); assert.same(umulh(0xfffffff, 77), 4); assert.same(umulh(1, 7), 0); assert.same(umulh(-1, 7), 6); }); }).call(this); // Generated by LiveScript 1.4.0 (function(){ var module, test; module = QUnit.module, test = QUnit.test; module('ES7'); if (DESCRIPTORS) { test('Object#__defineGetter__', function(assert){ var __defineGetter__, O, i$, x$, ref$, len$; __defineGetter__ = Object.prototype.__defineGetter__; assert.isFunction(__defineGetter__); assert.arity(__defineGetter__, 2); assert.name(__defineGetter__, '__defineGetter__'); assert.looksNative(__defineGetter__); assert.nonEnumerable(Object.prototype, '__defineGetter__'); O = {}; assert.same(O.__defineGetter__('key', function(){ return 42; }), void 8, 'void'); assert.same(O.key, 42, 'works'); O.__defineSetter__('key', function(){ this.foo = 43; }); O.key = 44; assert.ok(O.key === 42 && O.foo === 43, 'works with setter'); if (STRICT) { for (i$ = 0, len$ = (ref$ = [null, void 8]).length; i$ < len$; ++i$) { x$ = ref$[i$]; assert.throws(fn$, TypeError, "Throws on " + x$ + " as `this`"); } } function fn$(){ __defineGetter__.call(x$, 1, function(){}); } }); } }).call(this); // Generated by LiveScript 1.4.0 (function(){ var module, test; module = QUnit.module, test = QUnit.test; module('ES7'); if (DESCRIPTORS) { test('Object#__defineSetter__', function(assert){ var __defineSetter__, O, i$, x$, ref$, len$; __defineSetter__ = Object.prototype.__defineSetter__; assert.isFunction(__defineSetter__); assert.arity(__defineSetter__, 2); assert.name(__defineSetter__, '__defineSetter__'); assert.looksNative(__defineSetter__); assert.nonEnumerable(Object.prototype, '__defineSetter__'); O = {}; assert.same(O.__defineSetter__('key', function(){ this.foo = 43; }), void 8, 'void'); O.key = 44; assert.same(O.foo, 43, 'works'); O = {}; O.__defineSetter__('key', function(){ this.foo = 43; }); O.__defineGetter__('key', function(){ return 42; }); O.key = 44; assert.ok(O.key === 42 && O.foo === 43, 'works with getter'); if (STRICT) { for (i$ = 0, len$ = (ref$ = [null, void 8]).length; i$ < len$; ++i$) { x$ = ref$[i$]; assert.throws(fn$, TypeError, "Throws on " + x$ + " as `this`"); } } function fn$(){ __defineSetter__.call(x$, 1, function(){}); } }); } }).call(this); // Generated by LiveScript 1.4.0 (function(){ var module, test; module = QUnit.module, test = QUnit.test; module('ES7'); test('Object.entries', function(assert){ var entries, create, assign; entries = Object.entries, create = Object.create, assign = Object.assign; assert.isFunction(entries); assert.arity(entries, 1); assert.name(entries, 'entries'); assert.looksNative(entries); assert.nonEnumerable(Object, 'entries'); assert.deepEqual(entries({ q: 1, w: 2, e: 3 }), [['q', 1], ['w', 2], ['e', 3]]); assert.deepEqual(entries(new String('qwe')), [['0', 'q'], ['1', 'w'], ['2', 'e']]); assert.deepEqual(entries(assign(create({ q: 1, w: 2, e: 3 }), { a: 4, s: 5, d: 6 })), [['a', 4], ['s', 5], ['d', 6]]); try { assert.deepEqual(Function('return Object.entries({a: 1, get b(){delete this.c;return 2},c: 3})')(), [['a', 1], ['b', 2]]); } catch (e$) {} try { assert.deepEqual(Function('return Object.entries({a: 1, get b(){Object.defineProperty(this, "c", {value:4,enumerable:false});return 2},c: 3})')(), [['a', 1], ['b', 2]]); } catch (e$) {} }); }).call(this); // Generated by LiveScript 1.4.0 (function(){ var module, test, create; module = QUnit.module, test = QUnit.test; module('ES7'); create = Object.create; test('Object.getOwnPropertyDescriptors', function(assert){ var getOwnPropertyDescriptors, O, s, descs; getOwnPropertyDescriptors = Object.getOwnPropertyDescriptors; assert.isFunction(getOwnPropertyDescriptors); assert.arity(getOwnPropertyDescriptors, 1); assert.name(getOwnPropertyDescriptors, 'getOwnPropertyDescriptors'); assert.looksNative(getOwnPropertyDescriptors); assert.nonEnumerable(Object, 'getOwnPropertyDescriptors'); O = create({ q: 1 }, { e: { value: 3 } }); O.w = 2; s = Symbol('s'); O[s] = 4; descs = getOwnPropertyDescriptors(O); assert.strictEqual(descs.q, void 8); assert.deepEqual(descs.w, { enumerable: true, configurable: true, writable: true, value: 2 }); if (DESCRIPTORS) { assert.deepEqual(descs.e, { enumerable: false, configurable: false, writable: false, value: 3 }); } else { assert.deepEqual(descs.e, { enumerable: true, configurable: true, writable: true, value: 3 }); } assert.strictEqual(descs[s].value, 4); }); }).call(this); // Generated by LiveScript 1.4.0 (function(){ var module, test; module = QUnit.module, test = QUnit.test; module('ES7'); if (DESCRIPTORS) { test('Object#__lookupGetter__', function(assert){ var __lookupGetter__, create, O, F, i$, x$, ref$, len$; __lookupGetter__ = Object.prototype.__lookupGetter__; create = Object.create; assert.isFunction(__lookupGetter__); assert.arity(__lookupGetter__, 1); assert.name(__lookupGetter__, '__lookupGetter__'); assert.looksNative(__lookupGetter__); assert.nonEnumerable(Object.prototype, '__lookupGetter__'); assert.same({}.__lookupGetter__('key'), void 8, 'empty object'); assert.same({ key: 42 }.__lookupGetter__('key'), void 8, 'data descriptor'); O = {}; F = function(){}; O.__defineGetter__('key', F); assert.same(O.__lookupGetter__('key'), F, 'own getter'); assert.same(create(O).__lookupGetter__('key'), F, 'proto getter'); assert.same(create(O).__lookupGetter__('foo'), void 8, 'empty proto'); if (STRICT) { for (i$ = 0, len$ = (ref$ = [null, void 8]).length; i$ < len$; ++i$) { x$ = ref$[i$]; assert.throws(fn$, TypeError, "Throws on " + x$ + " as `this`"); } } function fn$(){ __lookupGetter__.call(x$, 1); } }); } }).call(this); // Generated by LiveScript 1.4.0 (function(){ var module, test; module = QUnit.module, test = QUnit.test; module('ES7'); if (DESCRIPTORS) { test('Object#__lookupSetter__', function(assert){ var __lookupSetter__, create, O, F, i$, x$, ref$, len$; __lookupSetter__ = Object.prototype.__lookupSetter__; create = Object.create; assert.isFunction(__lookupSetter__); assert.arity(__lookupSetter__, 1); assert.name(__lookupSetter__, '__lookupSetter__'); assert.looksNative(__lookupSetter__); assert.nonEnumerable(Object.prototype, '__lookupSetter__'); assert.same({}.__lookupSetter__('key'), void 8, 'empty object'); assert.same({ key: 42 }.__lookupSetter__('key'), void 8, 'data descriptor'); O = {}; F = function(){}; O.__defineSetter__('key', F); assert.same(O.__lookupSetter__('key'), F, 'own setter'); assert.same(create(O).__lookupSetter__('key'), F, 'proto setter'); assert.same(create(O).__lookupSetter__('foo'), void 8, 'empty proto'); if (STRICT) { for (i$ = 0, len$ = (ref$ = [null, void 8]).length; i$ < len$; ++i$) { x$ = ref$[i$]; assert.throws(fn$, TypeError, "Throws on " + x$ + " as `this`"); } } function fn$(){ __lookupSetter__.call(x$, 1); } }); } }).call(this); // Generated by LiveScript 1.4.0 (function(){ var module, test; module = QUnit.module, test = QUnit.test; module('ES7'); test('Object.values', function(assert){ var values, create, assign; values = Object.values, create = Object.create, assign = Object.assign; assert.isFunction(values); assert.arity(values, 1); assert.name(values, 'values'); assert.looksNative(values); assert.nonEnumerable(Object, 'values'); assert.deepEqual(values({ q: 1, w: 2, e: 3 }), [1, 2, 3]); assert.deepEqual(values(new String('qwe')), ['q', 'w', 'e']); assert.deepEqual(values(assign(create({ q: 1, w: 2, e: 3 }), { a: 4, s: 5, d: 6 })), [4, 5, 6]); try { assert.deepEqual(Function('return Object.values({a: 1, get b(){delete this.c;return 2},c: 3})')(), [1, 2]); } catch (e$) {} try { assert.deepEqual(Function('return Object.values({a: 1, get b(){Object.defineProperty(this, "c", {value:4,enumerable:false});return 2},c: 3})')(), [1, 2]); } catch (e$) {} }); }).call(this); // Generated by LiveScript 1.4.0 (function(){ 'use strict'; var module, test; module = QUnit.module, test = QUnit.test; module('ES7'); test('Observable', function(assert){ var obsevable; assert.isFunction(Observable); assert.arity(Observable, 1); assert.name(Observable, 'Observable'); assert.looksNative(Observable); assert.throws(function(){ Observable(function(){}); }, 'throws w/o `new`'); obsevable = new Observable(function(subscriptionObserver){ var next, error, complete; assert.same(typeof subscriptionObserver, 'object', 'Subscription observer is object'); assert.same(subscriptionObserver.constructor, Object); next = subscriptionObserver.next, error = subscriptionObserver.error, complete = subscriptionObserver.complete; assert.isFunction(next); assert.isFunction(error); assert.isFunction(complete); assert.name(next, 'next'); assert.name(error, 'error'); assert.name(complete, 'complete'); assert.arity(next, 1); assert.arity(error, 1); assert.arity(complete, 1); assert.looksNative(next); assert.looksNative(error); assert.looksNative(complete); if (STRICT) { assert.same(this, function(){ return this; }(), 'correct executor context'); } }); obsevable.subscribe({}); assert.ok(obsevable instanceof Observable); }); test('Observable#subscribe', function(assert){ var subscription; assert.isFunction(Observable.prototype.subscribe); assert.arity(Observable.prototype.subscribe, 1); assert.name(Observable.prototype.subscribe, 'subscribe'); assert.looksNative(Observable.prototype.subscribe); subscription = new Observable(function(){}).subscribe({}); assert.same(typeof subscription, 'object', 'Subscription is object'); assert.same(subscription.constructor, Object); assert.isFunction(subscription.unsubscribe); assert.arity(subscription.unsubscribe, 0); assert.name(subscription.unsubscribe, 'unsubscribe'); assert.looksNative(subscription.unsubscribe); }); test('Observable#forEach', function(assert){ assert.isFunction(Observable.prototype.forEach); assert.arity(Observable.prototype.forEach, 1); assert.name(Observable.prototype.forEach, 'forEach'); assert.looksNative(Observable.prototype.forEach); assert.ok(new Observable(function(){}).forEach(function(){}) instanceof Promise, 'returns Promise'); }); test('Observable#constructor', function(assert){ assert.same(Observable.prototype.constructor, Observable); }); test('Observable#@@observable', function(assert){ var observable; assert.isFunction(Observable.prototype[Symbol.observable]); observable = new Observable(function(){}); assert.same(observable[Symbol.observable](), observable); }); test('Observable.of', function(assert){ assert.isFunction(Observable.of); assert.arity(Observable.of, 0); assert.name(Observable.of, 'of'); assert.looksNative(Observable.of); }); test('Observable.from', function(assert){ assert.isFunction(Observable.from); assert.arity(Observable.from, 1); assert.name(Observable.from, 'from'); assert.looksNative(Observable.from); }); }).call(this); // Generated by LiveScript 1.4.0 (function(){ var module, test; module = QUnit.module, test = QUnit.test; module('ES7'); test('Reflect.defineMetadata', function(assert){ var defineMetadata; defineMetadata = Reflect.defineMetadata; assert.isFunction(defineMetadata); assert.arity(defineMetadata, 4); assert.name(defineMetadata, 'defineMetadata'); assert.looksNative(defineMetadata); assert.nonEnumerable(Reflect, 'defineMetadata'); assert.throws(function(){ defineMetadata('key', 'value', void 8, void 8); }, TypeError); assert.same(defineMetadata('key', 'value', {}, void 8), void 8); assert.same(defineMetadata('key', 'value', {}, 'name'), void 8); }); }).call(this); // Generated by LiveScript 1.4.0 (function(){ var module, test; module = QUnit.module, test = QUnit.test; module('ES7'); test('Reflect.deleteMetadata', function(assert){ var defineMetadata, hasOwnMetadata, deleteMetadata, create, obj, prototype; defineMetadata = Reflect.defineMetadata, hasOwnMetadata = Reflect.hasOwnMetadata, deleteMetadata = Reflect.deleteMetadata; create = Object.create; assert.isFunction(deleteMetadata); assert.arity(deleteMetadata, 2); assert.name(deleteMetadata, 'deleteMetadata'); assert.looksNative(deleteMetadata); assert.nonEnumerable(Reflect, 'deleteMetadata'); assert.throws(function(){ deleteMetadata('key', void 8, void 8); }, TypeError); assert.same(deleteMetadata('key', {}, void 8), false); obj = {}; defineMetadata('key', 'value', obj, void 8); assert.same(deleteMetadata('key', obj, void 8), true); prototype = {}; defineMetadata('key', 'value', prototype, void 8); assert.same(deleteMetadata('key', create(prototype), void 8), false); obj = {}; defineMetadata('key', 'value', obj, void 8); deleteMetadata('key', obj, void 8); assert.same(hasOwnMetadata("key", obj, undefined), false); }); }).call(this); // Generated by LiveScript 1.4.0 (function(){ var module, test; module = QUnit.module, test = QUnit.test; module('ES7'); test('Reflect.getMetadataKeys', function(assert){ var defineMetadata, getMetadataKeys, create, obj, prototype; defineMetadata = Reflect.defineMetadata, getMetadataKeys = Reflect.getMetadataKeys; create = Object.create; assert.isFunction(getMetadataKeys); assert.arity(getMetadataKeys, 1); assert.name(getMetadataKeys, 'getMetadataKeys'); assert.looksNative(getMetadataKeys); assert.nonEnumerable(Reflect, 'getMetadataKeys'); assert.throws(function(){ getMetadataKeys(void 8, void 8); }, TypeError); assert.deepEqual(getMetadataKeys({}, void 8), []); obj = {}; defineMetadata('key', 'value', obj, void 8); assert.deepEqual(getMetadataKeys(obj, void 8), ['key']); prototype = {}; obj = create(prototype); defineMetadata('key', 'value', prototype, void 8); assert.deepEqual(getMetadataKeys(obj, void 8), ['key']); obj = {}; defineMetadata('key0', 'value', obj, void 8); defineMetadata('key1', 'value', obj, void 8); assert.deepEqual(getMetadataKeys(obj, void 8), ['key0', 'key1']); obj = {}; defineMetadata('key0', 'value', obj, void 8); defineMetadata('key1', 'value', obj, void 8); defineMetadata('key0', 'value', obj, void 8); assert.deepEqual(getMetadataKeys(obj, void 8), ['key0', 'key1']); prototype = {}; defineMetadata('key2', 'value', prototype, void 8); obj = create(prototype); defineMetadata('key0', 'value', obj, void 8); defineMetadata('key1', 'value', obj, void 8); assert.deepEqual(getMetadataKeys(obj, void 8), ['key0', 'key1', 'key2']); obj = {}; assert.deepEqual(getMetadataKeys({}, 'name'), []); obj = {}; defineMetadata('key', 'value', obj, 'name'); assert.deepEqual(getMetadataKeys(obj, 'name'), ['key']); prototype = {}; obj = create(prototype); defineMetadata('key', 'value', prototype, 'name'); assert.deepEqual(getMetadataKeys(obj, 'name'), ['key']); obj = {}; defineMetadata('key0', 'value', obj, 'name'); defineMetadata('key1', 'value', obj, 'name'); defineMetadata('key0', 'value', obj, 'name'); assert.deepEqual(getMetadataKeys(obj, 'name'), ['key0', 'key1']); prototype = {}; defineMetadata('key2', 'value', prototype, 'name'); obj = create(prototype); defineMetadata('key0', 'value', obj, 'name'); defineMetadata('key1', 'value', obj, 'name'); assert.deepEqual(getMetadataKeys(obj, 'name'), ['key0', 'key1', 'key2']); }); }).call(this); // Generated by LiveScript 1.4.0 (function(){ var module, test; module = QUnit.module, test = QUnit.test; module('ES7'); test('Reflect.getMetadata', function(assert){ var defineMetadata, getMetadata, create, obj, prototype; defineMetadata = Reflect.defineMetadata, getMetadata = Reflect.getMetadata; create = Object.create; assert.isFunction(getMetadata); assert.arity(getMetadata, 2); assert.name(getMetadata, 'getMetadata'); assert.looksNative(getMetadata); assert.nonEnumerable(Reflect, 'getMetadata'); assert.throws(function(){ getMetadata('key', void 8, void 8); }, TypeError); assert.same(getMetadata('key', {}, void 8), void 8); obj = {}; defineMetadata('key', 'value', obj, void 8); assert.same(getMetadata('key', obj, void 8), 'value'); prototype = {}; obj = create(prototype); defineMetadata('key', 'value', prototype, void 8); assert.same(getMetadata('key', obj, void 8), 'value'); assert.same(getMetadata('key', {}, 'name'), void 8); obj = {}; defineMetadata('key', 'value', obj, 'name'); assert.same(getMetadata('key', obj, 'name'), 'value'); prototype = {}; obj = create(prototype); defineMetadata('key', 'value', prototype, 'name'); assert.same(getMetadata('key', obj, 'name'), 'value'); }); }).call(this); // Generated by LiveScript 1.4.0 (function(){ var module, test; module = QUnit.module, test = QUnit.test; module('ES7'); test('Reflect.getOwnMetadata', function(assert){ var defineMetadata, getOwnMetadata, create, obj, prototype; defineMetadata = Reflect.defineMetadata, getOwnMetadata = Reflect.getOwnMetadata; create = Object.create; assert.isFunction(getOwnMetadata); assert.arity(getOwnMetadata, 2); assert.name(getOwnMetadata, 'getOwnMetadata'); assert.looksNative(getOwnMetadata); assert.nonEnumerable(Reflect, 'getOwnMetadata'); assert.throws(function(){ getOwnMetadata('key', void 8, void 8); }, TypeError); assert.same(getOwnMetadata('key', {}, void 8), void 8); obj = {}; defineMetadata('key', 'value', obj, void 8); assert.same(getOwnMetadata('key', obj, void 8), 'value'); prototype = {}; obj = create(prototype); defineMetadata('key', 'value', prototype, void 8); assert.same(getOwnMetadata('key', obj, void 8), void 8); assert.same(getOwnMetadata('key', {}, 'name'), void 8); obj = {}; defineMetadata('key', 'value', obj, 'name'); assert.same(getOwnMetadata('key', obj, 'name'), 'value'); prototype = {}; obj = create(prototype); defineMetadata('key', 'value', prototype, 'name'); assert.same(getOwnMetadata('key', obj, 'name'), void 8); }); }).call(this); // Generated by LiveScript 1.4.0 (function(){ var module, test; module = QUnit.module, test = QUnit.test; module('ES7'); test('Reflect.getOwnMetadataKeys', function(assert){ var defineMetadata, getOwnMetadataKeys, create, obj, prototype; defineMetadata = Reflect.defineMetadata, getOwnMetadataKeys = Reflect.getOwnMetadataKeys; create = Object.create; assert.isFunction(getOwnMetadataKeys); assert.arity(getOwnMetadataKeys, 1); assert.name(getOwnMetadataKeys, 'getOwnMetadataKeys'); assert.looksNative(getOwnMetadataKeys); assert.nonEnumerable(Reflect, 'getOwnMetadataKeys'); assert.throws(function(){ getOwnMetadataKeys(void 8, void 8); }, TypeError); assert.deepEqual(getOwnMetadataKeys({}, void 8), []); obj = {}; defineMetadata('key', 'value', obj, void 8); assert.deepEqual(getOwnMetadataKeys(obj, void 8), ['key']); prototype = {}; obj = create(prototype); defineMetadata('key', 'value', prototype, void 8); assert.deepEqual(getOwnMetadataKeys(obj, void 8), []); obj = {}; defineMetadata('key0', 'value', obj, void 8); defineMetadata('key1', 'value', obj, void 8); assert.deepEqual(getOwnMetadataKeys(obj, void 8), ['key0', 'key1']); obj = {}; defineMetadata('key0', 'value', obj, void 8); defineMetadata('key1', 'value', obj, void 8); defineMetadata('key0', 'value', obj, void 8); assert.deepEqual(getOwnMetadataKeys(obj, void 8), ['key0', 'key1']); prototype = {}; defineMetadata('key2', 'value', prototype, void 8); obj = create(prototype); defineMetadata('key0', 'value', obj, void 8); defineMetadata('key1', 'value', obj, void 8); assert.deepEqual(getOwnMetadataKeys(obj, void 8), ['key0', 'key1']); obj = {}; assert.deepEqual(getOwnMetadataKeys({}, 'name'), []); obj = {}; defineMetadata('key', 'value', obj, 'name'); assert.deepEqual(getOwnMetadataKeys(obj, 'name'), ['key']); prototype = {}; obj = create(prototype); defineMetadata('key', 'value', prototype, 'name'); assert.deepEqual(getOwnMetadataKeys(obj, 'name'), []); obj = {}; defineMetadata('key0', 'value', obj, 'name'); defineMetadata('key1', 'value', obj, 'name'); defineMetadata('key0', 'value', obj, 'name'); assert.deepEqual(getOwnMetadataKeys(obj, 'name'), ['key0', 'key1']); prototype = {}; defineMetadata('key2', 'value', prototype, 'name'); obj = create(prototype); defineMetadata('key0', 'value', obj, 'name'); defineMetadata('key1', 'value', obj, 'name'); assert.deepEqual(getOwnMetadataKeys(obj, 'name'), ['key0', 'key1']); }); }).call(this); // Generated by LiveScript 1.4.0 (function(){ var module, test; module = QUnit.module, test = QUnit.test; module('ES7'); test('Reflect.hasMetadata', function(assert){ var defineMetadata, hasMetadata, create, obj, prototype; defineMetadata = Reflect.defineMetadata, hasMetadata = Reflect.hasMetadata; create = Object.create; assert.isFunction(hasMetadata); assert.arity(hasMetadata, 2); assert.name(hasMetadata, 'hasMetadata'); assert.looksNative(hasMetadata); assert.nonEnumerable(Reflect, 'hasMetadata'); assert.throws(function(){ hasMetadata('key', void 8, void 8); }, TypeError); assert.same(hasMetadata('key', {}, void 8), false); obj = {}; defineMetadata('key', 'value', obj, void 8); assert.same(hasMetadata('key', obj, void 8), true); prototype = {}; obj = create(prototype); defineMetadata('key', 'value', prototype, void 8); assert.same(hasMetadata('key', obj, void 8), true); assert.same(hasMetadata('key', {}, 'name'), false); obj = {}; defineMetadata('key', 'value', obj, 'name'); assert.same(hasMetadata('key', obj, 'name'), true); prototype = {}; obj = create(prototype); defineMetadata('key', 'value', prototype, 'name'); assert.same(hasMetadata('key', obj, 'name'), true); }); }).call(this); // Generated by LiveScript 1.4.0 (function(){ var module, test; module = QUnit.module, test = QUnit.test; module('ES7'); test('Reflect.hasOwnMetadata', function(assert){ var defineMetadata, hasOwnMetadata, create, obj, prototype; defineMetadata = Reflect.defineMetadata, hasOwnMetadata = Reflect.hasOwnMetadata; create = Object.create; assert.isFunction(hasOwnMetadata); assert.arity(hasOwnMetadata, 2); assert.name(hasOwnMetadata, 'hasOwnMetadata'); assert.looksNative(hasOwnMetadata); assert.nonEnumerable(Reflect, 'hasOwnMetadata'); assert.throws(function(){ hasOwnMetadata('key', void 8, void 8); }, TypeError); assert.same(hasOwnMetadata('key', {}, void 8), false); obj = {}; defineMetadata('key', 'value', obj, void 8); assert.same(hasOwnMetadata('key', obj, void 8), true); prototype = {}; obj = create(prototype); defineMetadata('key', 'value', prototype, void 8); assert.same(hasOwnMetadata('key', obj, void 8), false); assert.same(hasOwnMetadata('key', {}, 'name'), false); obj = {}; defineMetadata('key', 'value', obj, 'name'); assert.same(hasOwnMetadata('key', obj, 'name'), true); prototype = {}; obj = create(prototype); defineMetadata('key', 'value', prototype, 'name'); assert.same(hasOwnMetadata('key', obj, 'name'), false); }); }).call(this); // Generated by LiveScript 1.4.0 (function(){ var module, test; module = QUnit.module, test = QUnit.test; module('ES7'); test('Reflect.metadata', function(assert){ var metadata, hasOwnMetadata, decorator, target; metadata = Reflect.metadata, hasOwnMetadata = Reflect.hasOwnMetadata; assert.isFunction(metadata); assert.arity(metadata, 2); assert.name(metadata, 'metadata'); assert.looksNative(metadata); assert.nonEnumerable(Reflect, 'metadata'); assert.isFunction(metadata('key', 'value')); decorator = metadata('key', 'value'); assert.throws(function(){ decorator(void 8, 'name'); }, TypeError); assert.throws(function(){ decorator({}, void 8); }, TypeError); target = function(){}; decorator(target); assert.same(hasOwnMetadata('key', target, void 8), true); target = {}; decorator(target, 'name'); assert.same(hasOwnMetadata('key', target, 'name'), true); }); }).call(this); // Generated by LiveScript 1.4.0 (function(){ var module, test; module = QUnit.module, test = QUnit.test; module('ES7'); test('Set#toJSON', function(assert){ assert.isFunction(Set.prototype.toJSON); assert.name(Set.prototype.toJSON, 'toJSON'); assert.arity(Set.prototype.toJSON, 0); assert.looksNative(Set.prototype.toJSON); assert.nonEnumerable(Set.prototype, 'toJSON'); if (typeof JSON != 'undefined' && JSON !== null) { assert.strictEqual(JSON.stringify(new Set([1, 2, 3, 2, 1])), '[1,2,3]', 'Works'); } }); }).call(this); // Generated by LiveScript 1.4.0 (function(){ var module, test; module = QUnit.module, test = QUnit.test; module('ES7'); test('String#at', function(assert){ var at; assert.isFunction(String.prototype.at); assert.arity(String.prototype.at, 1); assert.name(String.prototype.at, 'at'); assert.looksNative(String.prototype.at); assert.nonEnumerable(String.prototype, 'at'); assert.strictEqual('abc\uD834\uDF06def'.at(-Infinity), ''); assert.strictEqual('abc\uD834\uDF06def'.at(-1), ''); assert.strictEqual('abc\uD834\uDF06def'.at(-0), 'a'); assert.strictEqual('abc\uD834\uDF06def'.at(+0), 'a'); assert.strictEqual('abc\uD834\uDF06def'.at(1), 'b'); assert.strictEqual('abc\uD834\uDF06def'.at(3), '\uD834\uDF06'); assert.strictEqual('abc\uD834\uDF06def'.at(4), '\uDF06'); assert.strictEqual('abc\uD834\uDF06def'.at(5), 'd'); assert.strictEqual('abc\uD834\uDF06def'.at(42), ''); assert.strictEqual('abc\uD834\uDF06def'.at(Infinity), ''); assert.strictEqual('abc\uD834\uDF06def'.at(null), 'a'); assert.strictEqual('abc\uD834\uDF06def'.at(void 8), 'a'); assert.strictEqual('abc\uD834\uDF06def'.at(), 'a'); assert.strictEqual('abc\uD834\uDF06def'.at(false), 'a'); assert.strictEqual('abc\uD834\uDF06def'.at(NaN), 'a'); assert.strictEqual('abc\uD834\uDF06def'.at(''), 'a'); assert.strictEqual('abc\uD834\uDF06def'.at('_'), 'a'); assert.strictEqual('abc\uD834\uDF06def'.at('1'), 'b'); assert.strictEqual('abc\uD834\uDF06def'.at([]), 'a'); assert.strictEqual('abc\uD834\uDF06def'.at({}), 'a'); assert.strictEqual('abc\uD834\uDF06def'.at(-0.9), 'a'); assert.strictEqual('abc\uD834\uDF06def'.at(1.9), 'b'); assert.strictEqual('abc\uD834\uDF06def'.at(7.9), 'f'); assert.strictEqual('abc\uD834\uDF06def'.at(Math.pow(2, 32)), ''); assert.strictEqual('\uD834\uDF06def'.at(-Infinity), ''); assert.strictEqual('\uD834\uDF06def'.at(-1), ''); assert.strictEqual('\uD834\uDF06def'.at(-0), '\uD834\uDF06'); assert.strictEqual('\uD834\uDF06def'.at(0), '\uD834\uDF06'); assert.strictEqual('\uD834\uDF06def'.at(1), '\uDF06'); assert.strictEqual('\uD834\uDF06def'.at(2), 'd'); assert.strictEqual('\uD834\uDF06def'.at(3), 'e'); assert.strictEqual('\uD834\uDF06def'.at(4), 'f'); assert.strictEqual('\uD834\uDF06def'.at(42), ''); assert.strictEqual('\uD834\uDF06def'.at(Infinity), ''); assert.strictEqual('\uD834\uDF06def'.at(null), '\uD834\uDF06'); assert.strictEqual('\uD834\uDF06def'.at(void 8), '\uD834\uDF06'); assert.strictEqual('\uD834\uDF06def'.at(), '\uD834\uDF06'); assert.strictEqual('\uD834\uDF06def'.at(false), '\uD834\uDF06'); assert.strictEqual('\uD834\uDF06def'.at(NaN), '\uD834\uDF06'); assert.strictEqual('\uD834\uDF06def'.at(''), '\uD834\uDF06'); assert.strictEqual('\uD834\uDF06def'.at('_'), '\uD834\uDF06'); assert.strictEqual('\uD834\uDF06def'.at('1'), '\uDF06'); assert.strictEqual('\uD834abc'.at(-Infinity), ''); assert.strictEqual('\uD834abc'.at(-1), ''); assert.strictEqual('\uD834abc'.at(-0), '\uD834'); assert.strictEqual('\uD834abc'.at(0), '\uD834'); assert.strictEqual('\uD834abc'.at(1), 'a'); assert.strictEqual('\uD834abc'.at(42), ''); assert.strictEqual('\uD834abc'.at(Infinity), ''); assert.strictEqual('\uD834abc'.at(null), '\uD834'); assert.strictEqual('\uD834abc'.at(void 8), '\uD834'); assert.strictEqual('\uD834abc'.at(), '\uD834'); assert.strictEqual('\uD834abc'.at(false), '\uD834'); assert.strictEqual('\uD834abc'.at(NaN), '\uD834'); assert.strictEqual('\uD834abc'.at(''), '\uD834'); assert.strictEqual('\uD834abc'.at('_'), '\uD834'); assert.strictEqual('\uD834abc'.at('1'), 'a'); assert.strictEqual('\uDF06abc'.at(-Infinity), ''); assert.strictEqual('\uDF06abc'.at(-1), ''); assert.strictEqual('\uDF06abc'.at(-0), '\uDF06'); assert.strictEqual('\uDF06abc'.at(0), '\uDF06'); assert.strictEqual('\uDF06abc'.at(1), 'a'); assert.strictEqual('\uDF06abc'.at(42), ''); assert.strictEqual('\uDF06abc'.at(Infinity), ''); assert.strictEqual('\uDF06abc'.at(null), '\uDF06'); assert.strictEqual('\uDF06abc'.at(void 8), '\uDF06'); assert.strictEqual('\uDF06abc'.at(), '\uDF06'); assert.strictEqual('\uDF06abc'.at(false), '\uDF06'); assert.strictEqual('\uDF06abc'.at(NaN), '\uDF06'); assert.strictEqual('\uDF06abc'.at(''), '\uDF06'); assert.strictEqual('\uDF06abc'.at('_'), '\uDF06'); assert.strictEqual('\uDF06abc'.at('1'), 'a'); at = String.prototype.at; assert.strictEqual(at.call(42, 0), '4'); assert.strictEqual(at.call(42, 1), '2'); assert.strictEqual(at.call({ toString: function(){ return 'abc'; } }, 2), 'c'); if (STRICT) { assert.throws(function(){ String.prototype.at.call(null, 0); }, TypeError); assert.throws(function(){ String.prototype.at.call(void 8, 0); }, TypeError); } }); }).call(this); // Generated by LiveScript 1.4.0 (function(){ var module, test; module = QUnit.module, test = QUnit.test; module('ES7'); test('String#matchAll', function(assert){ var matchAll, assign, i$, x$, ref$, len$, iter, y$, z$; matchAll = String.prototype.matchAll; assign = Object.assign; assert.isFunction(matchAll); assert.arity(matchAll, 1); assert.name(matchAll, 'matchAll'); assert.looksNative(matchAll); assert.nonEnumerable(String.prototype, 'matchAll'); for (i$ = 0, len$ = (ref$ = [ 'aabc', { toString: fn$ } ]).length; i$ < len$; ++i$) { x$ = ref$[i$]; iter = matchAll.call(x$, /[ac]/); assert.isIterator(iter); assert.isIterable(iter); assert.deepEqual(iter.next(), { value: assign(['a'], { input: 'aabc', index: 0 }), done: false }); assert.deepEqual(iter.next(), { value: assign(['a'], { input: 'aabc', index: 1 }), done: false }); assert.deepEqual(iter.next(), { value: assign(['c'], { input: 'aabc', index: 3 }), done: false }); assert.deepEqual(iter.next(), { value: null, done: true }); } iter = '1111a2b3cccc'.matchAll(/(\d)(\D)/); assert.isIterator(iter); assert.isIterable(iter); assert.deepEqual(iter.next(), { value: assign(['1a', '1', 'a'], { input: '1111a2b3cccc', index: 3 }), done: false }); assert.deepEqual(iter.next(), { value: assign(['2b', '2', 'b'], { input: '1111a2b3cccc', index: 5 }), done: false }); assert.deepEqual(iter.next(), { value: assign(['3c', '3', 'c'], { input: '1111a2b3cccc', index: 7 }), done: false }); assert.deepEqual(iter.next(), { value: null, done: true }); for (i$ = 0, len$ = (ref$ = [null, void 8, 'qwe', NaN, 42, new Date(), {}, []]).length; i$ < len$; ++i$) { y$ = ref$[i$]; assert.throws(fn1$, TypeError, "Throws on " + y$ + " as first arguments"); } if (STRICT) { for (i$ = 0, len$ = (ref$ = [null, void 8]).length; i$ < len$; ++i$) { z$ = ref$[i$]; assert.throws(fn2$, TypeError, "Throws on " + z$ + " as `this`"); } } function fn$(){ return 'aabc'; } function fn1$(){ ''.matchAll(y$); } function fn2$(){ matchAll.call(z$, /./); } }); }).call(this); // Generated by LiveScript 1.4.0 (function(){ var module, test; module = QUnit.module, test = QUnit.test; module('ES7'); test('String#padEnd', function(assert){ assert.isFunction(String.prototype.padEnd); assert.arity(String.prototype.padEnd, 1); assert.name(String.prototype.padEnd, 'padEnd'); assert.looksNative(String.prototype.padEnd); assert.nonEnumerable(String.prototype, 'padEnd'); assert.strictEqual('abc'.padEnd(5), 'abc '); assert.strictEqual('abc'.padEnd(4, 'de'), 'abcd'); assert.strictEqual('abc'.padEnd(), 'abc'); assert.strictEqual('abc'.padEnd(5, '_'), 'abc__'); assert.strictEqual(''.padEnd(0), ''); assert.strictEqual('foo'.padEnd(1), 'foo'); assert.strictEqual('foo'.padEnd(5, ''), 'foo'); if (STRICT) { assert.throws(function(){ String.prototype.padEnd.call(null, 0); }, TypeError); assert.throws(function(){ String.prototype.padEnd.call(void 8, 0); }, TypeError); } }); }).call(this); // Generated by LiveScript 1.4.0 (function(){ var module, test; module = QUnit.module, test = QUnit.test; module('ES7'); test('String#padStart', function(assert){ assert.isFunction(String.prototype.padStart); assert.arity(String.prototype.padStart, 1); assert.name(String.prototype.padStart, 'padStart'); assert.looksNative(String.prototype.padStart); assert.nonEnumerable(String.prototype, 'padStart'); assert.strictEqual('abc'.padStart(5), ' abc'); assert.strictEqual('abc'.padStart(4, 'de'), 'dabc'); assert.strictEqual('abc'.padStart(), 'abc'); assert.strictEqual('abc'.padStart(5, '_'), '__abc'); assert.strictEqual(''.padStart(0), ''); assert.strictEqual('foo'.padStart(1), 'foo'); assert.strictEqual('foo'.padStart(5, ''), 'foo'); if (STRICT) { assert.throws(function(){ String.prototype.padStart.call(null, 0); }, TypeError); assert.throws(function(){ String.prototype.padStart.call(void 8, 0); }, TypeError); } }); }).call(this); // Generated by LiveScript 1.4.0 (function(){ var module, test; module = QUnit.module, test = QUnit.test; module('ES7'); test('String#trimLeft', function(assert){ assert.isFunction(''.trimLeft); assert.arity(String.prototype.trimLeft, 0); assert.name(String.prototype.trimLeft, 'trimLeft'); assert.looksNative(String.prototype.trimLeft); assert.nonEnumerable(String.prototype, 'trimLeft'); assert.strictEqual(' \n q w e \n '.trimLeft(), 'q w e \n ', 'removes whitespaces at left side of string'); assert.strictEqual('\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u180E\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF'.trimLeft(), '', 'removes all whitespaces'); assert.strictEqual('\u200b\u0085'.trimLeft(), '\u200b\u0085', "shouldn't remove this symbols"); if (STRICT) { assert.throws(function(){ String.prototype.trimLeft.call(null, 0); }, TypeError); assert.throws(function(){ String.prototype.trimLeft.call(void 8, 0); }, TypeError); } }); test('String#trimStart', function(assert){ assert.isFunction(''.trimStart); assert.arity(String.prototype.trimStart, 0); assert.name(String.prototype.trimStart, 'trimLeft'); assert.looksNative(String.prototype.trimStart); assert.nonEnumerable(String.prototype, 'trimStart'); assert.same(String.prototype.trimStart, String.prototype.trimLeft, 'same #trimLeft'); assert.strictEqual(' \n q w e \n '.trimStart(), 'q w e \n ', 'removes whitespaces at left side of string'); assert.strictEqual('\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u180E\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF'.trimStart(), '', 'removes all whitespaces'); assert.strictEqual('\u200b\u0085'.trimStart(), '\u200b\u0085', "shouldn't remove this symbols"); if (STRICT) { assert.throws(function(){ String.prototype.trimStart.call(null, 0); }, TypeError); assert.throws(function(){ String.prototype.trimStart.call(void 8, 0); }, TypeError); } }); }).call(this); // Generated by LiveScript 1.4.0 (function(){ var module, test; module = QUnit.module, test = QUnit.test; module('ES7'); test('String#trimRight', function(assert){ assert.isFunction(''.trimRight); assert.arity(String.prototype.trimRight, 0); assert.name(String.prototype.trimRight, 'trimRight'); assert.looksNative(String.prototype.trimRight); assert.nonEnumerable(String.prototype, 'trimRight'); assert.strictEqual(' \n q w e \n '.trimRight(), ' \n q w e', 'removes whitespaces at right side of string'); assert.strictEqual('\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u180E\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF'.trimRight(), '', 'removes all whitespaces'); assert.strictEqual('\u200b\u0085'.trimRight(), '\u200b\u0085', "shouldn't remove this symbols"); if (STRICT) { assert.throws(function(){ String.prototype.trimRight.call(null, 0); }, TypeError); assert.throws(function(){ String.prototype.trimRight.call(void 8, 0); }, TypeError); } }); test('String#trimEnd', function(assert){ assert.isFunction(''.trimEnd); assert.arity(String.prototype.trimEnd, 0); assert.name(String.prototype.trimEnd, 'trimRight'); assert.looksNative(String.prototype.trimEnd); assert.nonEnumerable(String.prototype, 'trimEnd'); assert.same(String.prototype.trimEnd, String.prototype.trimRight, 'same #trimRight'); assert.strictEqual(' \n q w e \n '.trimEnd(), ' \n q w e', 'removes whitespaces at right side of string'); assert.strictEqual('\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u180E\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF'.trimEnd(), '', 'removes all whitespaces'); assert.strictEqual('\u200b\u0085'.trimEnd(), '\u200b\u0085', "shouldn't remove this symbols"); if (STRICT) { assert.throws(function(){ String.prototype.trimEnd.call(null, 0); }, TypeError); assert.throws(function(){ String.prototype.trimEnd.call(void 8, 0); }, TypeError); } }); }).call(this); // Generated by LiveScript 1.4.0 (function(){ var module, test; module = QUnit.module, test = QUnit.test; module('ES7'); test('Symbol.asyncIterator', function(assert){ var desc; assert.ok('asyncIterator' in Symbol, "Symbol.asyncIterator available"); assert.nonEnumerable(Symbol, 'asyncIterator'); assert.ok(Object(Symbol.asyncIterator) instanceof Symbol, "Symbol.asyncIterator is symbol"); if (DESCRIPTORS) { desc = Object.getOwnPropertyDescriptor(Symbol, 'asyncIterator'); assert.ok(!desc.enumerble, 'non-enumerable'); assert.ok(!desc.writable, 'non-writable'); assert.ok(!desc.configurable, 'non-configurable'); } }); }).call(this); // Generated by LiveScript 1.4.0 (function(){ var module, test; module = QUnit.module, test = QUnit.test; module('ES7'); test('Symbol.observable', function(assert){ var desc; assert.ok('observable' in Symbol, "Symbol.observable available"); assert.nonEnumerable(Symbol, 'observable'); assert.ok(Object(Symbol.observable) instanceof Symbol, "Symbol.observable is symbol"); if (DESCRIPTORS) { desc = Object.getOwnPropertyDescriptor(Symbol, 'observable'); assert.ok(!desc.enumerble, 'non-enumerable'); assert.ok(!desc.writable, 'non-writable'); assert.ok(!desc.configurable, 'non-configurable'); } }); }).call(this); // Generated by LiveScript 1.4.0 (function(){ var module, test; module = QUnit.module, test = QUnit.test; module('ES7'); test('System.global', function(assert){ var global; global = typeof System != 'undefined' && System !== null ? System.global : void 8; assert.nonEnumerable(System, 'global'); assert.same(global, Object(global), 'is object'); assert.same(global.Math, Math, 'contains globals'); }); }).call(this); // Generated by LiveScript 1.4.0 (function(){ var module, test, this$ = this; module = QUnit.module, test = QUnit.test; module('ES7'); DESCRIPTORS && test('%TypedArrayPrototype%.includes', function(assert){ var i$, x$, ref$, len$, Typed; for (i$ = 0, len$ = (ref$ = ['Float32Array', 'Float64Array', 'Int8Array', 'Int16Array', 'Int32Array', 'Uint8Array', 'Uint16Array', 'Uint32Array', 'Uint8ClampedArray']).length; i$ < len$; ++i$) { x$ = ref$[i$]; Typed = global[x$]; assert.isFunction(Typed.prototype.includes, x$ + "::includes is function"); assert.arity(Typed.prototype.includes, 1, x$ + "::includes arity is 1"); assert.name(Typed.prototype.includes, 'includes', x$ + "::includes name is 'includes'"); assert.looksNative(Typed.prototype.includes, x$ + "::includes looks native"); assert.same(new Typed([1, 1, 1]).includes(1), true); assert.same(new Typed([1, 1, 1]).includes(2), false); assert.same(new Typed([1, 2, 3]).includes(1, 1), false); assert.same(new Typed([1, 2, 3]).includes(2, 1), true); assert.same(new Typed([1, 2, 3]).includes(2, -1), false); assert.same(new Typed([1, 2, 3]).includes(2, -2), true); assert.throws(fn$, "isn't generic"); } function fn$(){ Typed.prototype.includes.call([1, 2], 1); } }); }).call(this); core-js-2.4.1/tests/experimental.html000066400000000000000000000006401274277553300176240ustar00rootroot00000000000000 Core
core-js-2.4.1/tests/experimental.js000066400000000000000000000041261274277553300172770ustar00rootroot00000000000000// Generated by LiveScript 1.4.0 (function(){ var module, test; module = QUnit.module, test = QUnit.test; module('ES7'); test('Object.enumerableEntries ', function(assert){ var enumerableEntries, create, O; enumerableEntries = Object.enumerableEntries, create = Object.create; assert.isFunction(enumerableEntries); assert.arity(enumerableEntries, 1); assert.name(enumerableEntries, 'enumerableEntries'); assert.looksNative(enumerableEntries); assert.nonEnumerable(Object, 'enumerableEntries'); O = create({ a: 1 }, { c: { value: 3 } }); O.b = 2; assert.deepEqual(enumerableEntries(O).sort(function(x, y){ return x[1] - y[1]; }), [['a', 1], ['b', 2]]); }); }).call(this); // Generated by LiveScript 1.4.0 (function(){ var module, test; module = QUnit.module, test = QUnit.test; module('ES7'); test('Object.enumerableKeys', function(assert){ var enumerableKeys, create, O; enumerableKeys = Object.enumerableKeys, create = Object.create; assert.isFunction(enumerableKeys); assert.arity(enumerableKeys, 1); assert.name(enumerableKeys, 'enumerableKeys'); assert.looksNative(enumerableKeys); assert.nonEnumerable(Object, 'enumerableKeys'); O = create({ a: 1 }, { c: { value: 3 } }); O.b = 2; assert.deepEqual(enumerableKeys(O).sort(), ['a', 'b']); }); }).call(this); // Generated by LiveScript 1.4.0 (function(){ var module, test; module = QUnit.module, test = QUnit.test; module('ES7'); test('Object.enumerableValues ', function(assert){ var enumerableValues, create, O; enumerableValues = Object.enumerableValues, create = Object.create; assert.isFunction(enumerableValues); assert.arity(enumerableValues, 1); assert.name(enumerableValues, 'enumerableValues'); assert.looksNative(enumerableValues); assert.nonEnumerable(Object, 'enumerableValues'); O = create({ a: 1 }, { c: { value: 3 } }); O.b = 2; assert.deepEqual(enumerableValues(O).sort(), [1, 2]); }); }).call(this); core-js-2.4.1/tests/experimental/000077500000000000000000000000001274277553300167365ustar00rootroot00000000000000core-js-2.4.1/tests/experimental/es7.object.enumerable-entries.ls000066400000000000000000000007331274277553300250310ustar00rootroot00000000000000{module, test} = QUnit module \ES7 test 'Object.enumerableEntries ' (assert)!-> {enumerableEntries , create} = Object assert.isFunction enumerableEntries assert.arity enumerableEntries , 1 assert.name enumerableEntries , \enumerableEntries assert.looksNative enumerableEntries assert.nonEnumerable Object, \enumerableEntries O = create({a: 1}, {c: {value: 3}}); O.b = 2; assert.deepEqual enumerableEntries(O)sort((x, y)-> x[1] - y[1]), [[\a 1], [\b 2]]core-js-2.4.1/tests/experimental/es7.object.enumerable-keys.ls000066400000000000000000000006321274277553300243310ustar00rootroot00000000000000{module, test} = QUnit module \ES7 test 'Object.enumerableKeys' (assert)!-> {enumerableKeys, create} = Object assert.isFunction enumerableKeys assert.arity enumerableKeys, 1 assert.name enumerableKeys, \enumerableKeys assert.looksNative enumerableKeys assert.nonEnumerable Object, \enumerableKeys O = create({a: 1}, {c: {value: 3}}); O.b = 2; assert.deepEqual enumerableKeys(O)sort!, <[a b]>core-js-2.4.1/tests/experimental/es7.object.enumerable-values.ls000066400000000000000000000006621274277553300246600ustar00rootroot00000000000000{module, test} = QUnit module \ES7 test 'Object.enumerableValues ' (assert)!-> {enumerableValues , create} = Object assert.isFunction enumerableValues assert.arity enumerableValues , 1 assert.name enumerableValues , \enumerableValues assert.looksNative enumerableValues assert.nonEnumerable Object, \enumerableValues O = create({a: 1}, {c: {value: 3}}); O.b = 2; assert.deepEqual enumerableValues(O)sort!, [1 2]core-js-2.4.1/tests/helpers.js000066400000000000000000000214231274277553300162430ustar00rootroot00000000000000// Generated by LiveScript 1.4.0 (function(){ QUnit.assert.arity = function(fn, length, message){ this.push(fn.length === length, fn.length, length, message || "arity is " + length); }; }).call(this); // Generated by LiveScript 1.4.0 (function(){ var same, slice$ = [].slice; same = function(a, b){ if (a === b) { return a !== 0 || 1 / a === 1 / b; } else { return a != a && b != b; } }; QUnit.assert.arrayEqual = function(a, b, message){ var result, i$, to$, i; result = true; if (a.length !== b.length) { result = false; } else { for (i$ = 0, to$ = a.length; i$ < to$; ++i$) { i = i$; if (!same(a[i], b[i])) { result = false; break; } } } this.push(result, slice$.call(a), slice$.call(b), message); }; }).call(this); // Generated by LiveScript 1.4.0 (function(){ var global, ArrayBuffer, DataView; global = Function('return this')(); ArrayBuffer = (typeof core != 'undefined' && core !== null ? core.ArrayBuffer : void 8) || global.ArrayBuffer; DataView = (typeof core != 'undefined' && core !== null ? core.DataView : void 8) || global.DataView; global.arrayToBuffer = function(it){ var buffer, view, i$, to$, i; buffer = new ArrayBuffer(it.length); view = new DataView(buffer); for (i$ = 0, to$ = it.length; i$ < to$; ++i$) { i = i$; view.setUint8(i, it[i]); } return buffer; }; }).call(this); // Generated by LiveScript 1.4.0 (function(){ var global, DataView; global = Function('return this')(); DataView = (typeof core != 'undefined' && core !== null ? core.DataView : void 8) || global.DataView; global.bufferToArray = function(it){ var view, i$, to$, i, results$ = []; view = new DataView(it); for (i$ = 0, to$ = view.byteLength; i$ < to$; ++i$) { i = i$; results$.push(view.getUint8(i)); } return results$; }; }).call(this); // Generated by LiveScript 1.4.0 (function(){ Function('return this')().createIterable = function(elements, methods){ var iterable, ref$, ref1$; methods == null && (methods = {}); return iterable = (ref$ = { called: false, received: false }, ref$[(typeof Symbol != 'undefined' && Symbol !== null ? Symbol.iterator : void 8) || (typeof core != 'undefined' && core !== null ? (ref1$ = core.Symbol) != null ? ref1$.iterator : void 8 : void 8)] = function(){ var index; this.received = true; index = 0; return import$({ next: function(){ iterable.called = true; return { value: elements[index++], done: index > elements.length }; } }, methods); }, ref$); }; function import$(obj, src){ var own = {}.hasOwnProperty; for (var key in src) if (own.call(src, key)) obj[key] = src[key]; return obj; } }).call(this); // Generated by LiveScript 1.4.0 (function(){ QUnit.assert.epsilon = function(a, b, E, message){ this.push(Math.abs(a - b) <= (E != null ? E : 1e-11), a, b, message); }; }).call(this); // Generated by LiveScript 1.4.0 (function(){ 'use strict'; var global; global = Function('return this')(); import$(global, { global: global, DESCRIPTORS: function(){ try { return 7 === Object.defineProperty({}, 'a', { get: function(){ return 7; } }).a; } catch (e$) {} }(), STRICT: !function(){ return this; }(), PROTO: Object.setPrototypeOf != null || '__proto__' in Object.prototype, NATIVE: void 8 }); function import$(obj, src){ var own = {}.hasOwnProperty; for (var key in src) if (own.call(src, key)) obj[key] = src[key]; return obj; } }).call(this); // Generated by LiveScript 1.4.0 (function(){ var toString$ = {}.toString; QUnit.assert.isFunction = function(fn, message){ this.push(typeof fn === 'function' || toString$.call(fn).slice(8, -1) === 'Function', false, true, message || 'is function'); }; }).call(this); // Generated by LiveScript 1.4.0 (function(){ QUnit.assert.isIterable = function(it, message){ this.push(typeof core != 'undefined' && core !== null ? core.isIterable(it) : !!it[typeof Symbol != 'undefined' && Symbol !== null ? Symbol.iterator : void 8], false, true, message || 'is iterable'); }; }).call(this); // Generated by LiveScript 1.4.0 (function(){ QUnit.assert.isIterator = function(it, message){ this.push(typeof it === 'object' && typeof it.next === 'function', false, true, message || 'is iterator'); }; }).call(this); // Generated by LiveScript 1.4.0 (function(){ var e; Function('return this')().LITTLE_ENDIAN = (function(){ try { return deepEq$(new Uint8Array(new Uint16Array([1]).buffer)[0], 1, '==='); } catch (e$) { e = e$; return true; } }()); function deepEq$(x, y, type){ var toString = {}.toString, hasOwnProperty = {}.hasOwnProperty, has = function (obj, key) { return hasOwnProperty.call(obj, key); }; var first = true; return eq(x, y, []); function eq(a, b, stack) { var className, length, size, result, alength, blength, r, key, ref, sizeB; if (a == null || b == null) { return a === b; } if (a.__placeholder__ || b.__placeholder__) { return true; } if (a === b) { return a !== 0 || 1 / a == 1 / b; } className = toString.call(a); if (toString.call(b) != className) { return false; } switch (className) { case '[object String]': return a == String(b); case '[object Number]': return a != +a ? b != +b : (a == 0 ? 1 / a == 1 / b : a == +b); case '[object Date]': case '[object Boolean]': return +a == +b; case '[object RegExp]': return a.source == b.source && a.global == b.global && a.multiline == b.multiline && a.ignoreCase == b.ignoreCase; } if (typeof a != 'object' || typeof b != 'object') { return false; } length = stack.length; while (length--) { if (stack[length] == a) { return true; } } stack.push(a); size = 0; result = true; if (className == '[object Array]') { alength = a.length; blength = b.length; if (first) { switch (type) { case '===': result = alength === blength; break; case '<==': result = alength <= blength; break; case '<<=': result = alength < blength; break; } size = alength; first = false; } else { result = alength === blength; size = alength; } if (result) { while (size--) { if (!(result = size in a == size in b && eq(a[size], b[size], stack))){ break; } } } } else { if ('constructor' in a != 'constructor' in b || a.constructor != b.constructor) { return false; } for (key in a) { if (has(a, key)) { size++; if (!(result = has(b, key) && eq(a[key], b[key], stack))) { break; } } } if (result) { sizeB = 0; for (key in b) { if (has(b, key)) { ++sizeB; } } if (first) { if (type === '<<=') { result = size < sizeB; } else if (type === '<==') { result = size <= sizeB } else { result = size === sizeB; } } else { first = false; result = size === sizeB; } } } stack.pop(); return result; } } }).call(this); // Generated by LiveScript 1.4.0 (function(){ QUnit.assert.looksNative = function(fn, message){ this.push(/native code/.test(Function.prototype.toString.call(fn)), false, true, message || 'looks native'); }; }).call(this); // Generated by LiveScript 1.4.0 (function(){ QUnit.assert.name = function(fn, name, message){ this.push(fn.name === name, fn.name, name, message || "name is '" + name + "'"); }; }).call(this); // Generated by LiveScript 1.4.0 (function(){ Function('return this')().nativeSubclass = (function(){ try { return Function("'use strict';class O extends Object {};return new O instanceof O;")() && Function('F', "'use strict';\nclass G extends F {};\nreturn G;"); } catch (e$) {} }()); }).call(this); // Generated by LiveScript 1.4.0 (function(){ QUnit.assert.nonEnumerable = function(O, key, message){ DESCRIPTORS && this.push(!O.propertyIsEnumerable(key), false, true, message || (typeof key === 'symbol' ? 'method' : key) + " is non-enumerable"); }; }).call(this); // Generated by LiveScript 1.4.0 (function(){ QUnit.assert.same = function(a, b, message){ this.push(a === b ? a !== 0 || 1 / a === 1 / b : a != a && b != b, a, b, message); }; }).call(this); core-js-2.4.1/tests/helpers/000077500000000000000000000000001274277553300157035ustar00rootroot00000000000000core-js-2.4.1/tests/helpers/arity.ls000066400000000000000000000001751274277553300173760ustar00rootroot00000000000000QUnit.assert.arity = (fn, length, message)!-> @push (fn.length is length), fn.length, length, message || "arity is #length"core-js-2.4.1/tests/helpers/array-equal.ls000066400000000000000000000004531274277553300204700ustar00rootroot00000000000000same = (a, b)-> if a is b => a isnt 0 or 1 / a is 1 / b else a !~= a and b !~= b QUnit.assert.arrayEqual = (a, b, message)!-> result = on if a.length isnt b.length => result = no else for i til a.length => if !same(a[i], b[i]) result = no break @push result, [...a], [...b], messagecore-js-2.4.1/tests/helpers/array-to-buffer.ls000066400000000000000000000004321274277553300212470ustar00rootroot00000000000000global = Function('return this')! ArrayBuffer = core?ArrayBuffer || global.ArrayBuffer DataView = core?DataView || global.DataView global.arrayToBuffer = -> buffer = new ArrayBuffer it.length view = new DataView buffer for i til it.length => view.setUint8 i, it[i] buffercore-js-2.4.1/tests/helpers/buffer-to-array.ls000066400000000000000000000002571274277553300212540ustar00rootroot00000000000000global = Function('return this')! DataView = core?DataView || global.DataView global.bufferToArray = -> view = new DataView it for i til view.byteLength => view.getUint8 icore-js-2.4.1/tests/helpers/create-iterable.ls000066400000000000000000000005421274277553300212740ustar00rootroot00000000000000Function('return this')!createIterable = (elements, methods = {})-> iterable = called: no received: no (Symbol?iterator or core?Symbol?iterator): -> @received = on index = 0 return { next: -> iterable.called = on value: elements[index++], done: index > elements.length } <<< methodscore-js-2.4.1/tests/helpers/epsilon.ls000066400000000000000000000001561274277553300177160ustar00rootroot00000000000000QUnit.assert.epsilon = (a, b, E, message)!-> @push (Math.abs(a - b) <= if E? => E else 1e-11), a, b, messagecore-js-2.4.1/tests/helpers/globals.ls000066400000000000000000000003611274277553300176660ustar00rootroot00000000000000'use strict' global = Function('return this')! global <<< do global: global DESCRIPTORS: (-> try 7 is Object.defineProperty({}, \a, get: -> 7)a)! STRICT: !(-> @)! PROTO: Object.setPrototypeOf? or \__proto__ of Object:: NATIVE: voidcore-js-2.4.1/tests/helpers/is-function.ls000066400000000000000000000002101274277553300204720ustar00rootroot00000000000000QUnit.assert.isFunction = (fn, message)!-> @push (typeof fn is \function or typeof! fn is \Function), no, on, message || 'is function'core-js-2.4.1/tests/helpers/is-iterable.ls000066400000000000000000000002211274277553300204360ustar00rootroot00000000000000QUnit.assert.isIterable = (it, message)!-> @push (if core? => core.isIterable(it) else !!it[Symbol?iterator]), no, on, message || 'is iterable'core-js-2.4.1/tests/helpers/is-iterator.ls000066400000000000000000000002121274277553300205000ustar00rootroot00000000000000QUnit.assert.isIterator = (it, message)!-> @push (typeof it is \object && typeof it.next is \function), no, on, message || 'is iterator'core-js-2.4.1/tests/helpers/little-endian.ls000066400000000000000000000001551274277553300207750ustar00rootroot00000000000000Function('return this')!LITTLE_ENDIAN = try new Uint8Array(new Uint16Array([1]).buffer)[0] === 1 catch oncore-js-2.4.1/tests/helpers/looks-native.ls000066400000000000000000000002051274277553300206530ustar00rootroot00000000000000QUnit.assert.looksNative = (fn, message)!-> @push /native code/.test(Function::toString.call fn), no, on, message || 'looks native'core-js-2.4.1/tests/helpers/name.ls000066400000000000000000000001611274277553300171610ustar00rootroot00000000000000QUnit.assert.name = (fn, name, message)!-> @push (fn.name is name), fn.name, name, message || "name is '#name'"core-js-2.4.1/tests/helpers/native-subclass.ls000066400000000000000000000003231274277553300213440ustar00rootroot00000000000000Function('return this')!nativeSubclass = try Function("'use strict';class O extends Object {};return new O instanceof O;")! and Function \F """ 'use strict'; class G extends F {}; return G; """core-js-2.4.1/tests/helpers/non-enumerable.ls000066400000000000000000000002771274277553300211600ustar00rootroot00000000000000QUnit.assert.nonEnumerable = (O, key, message)!-> DESCRIPTORS and @push !O.propertyIsEnumerable(key), no, on, message || "#{if typeof key is 'symbol' => \method else key} is non-enumerable"core-js-2.4.1/tests/helpers/same.ls000066400000000000000000000002001274277553300171600ustar00rootroot00000000000000QUnit.assert.same = (a, b, message)!-> @push (if a is b => a isnt 0 or 1 / a is 1 / b else a !~= a and b !~= b), a, b, messagecore-js-2.4.1/tests/karma.conf.js000066400000000000000000000003471274277553300166220ustar00rootroot00000000000000module.exports = function(config) { config.set({ frameworks: ['qunit'], basePath: '../', files: ['client/core.js', 'tests/helpers.js', 'tests/tests.js'], browsers: ['Chrome', 'Firefox', 'IE', 'PhantomJS'] }); };core-js-2.4.1/tests/library.html000066400000000000000000000007121274277553300165730ustar00rootroot00000000000000 Core
core-js-2.4.1/tests/library.js000066400000000000000000011032531274277553300162500ustar00rootroot00000000000000// Generated by LiveScript 1.4.0 (function(){ var module, test, delay, Promise, timeLimitedPromise; module = QUnit.module, test = QUnit.test; module('core-js'); delay = core.delay, Promise = core.Promise; timeLimitedPromise = function(time, fn){ return Promise.race([ new Promise(fn), new Promise(function(res, rej){ setTimeout(rej, time); }) ]); }; test('delay', function(assert){ assert.expect(3); assert.isFunction(delay); assert.ok(delay(42) instanceof Promise, 'returns promises'); timeLimitedPromise(1e3, function(res){ delay(10).then(function(it){ res(it); }); }).then(function(it){ assert.ok(it === true, 'resolves as `true`'); })['catch'](function(){ assert.ok(false, 'rejected'); }).then(assert.async()); }); }).call(this); // Generated by LiveScript 1.4.0 (function(){ var module, test, Dict, Set, Symbol, ref$, keys, create, assign, make, from, toString$ = {}.toString; module = QUnit.module, test = QUnit.test; module('core-js'); Dict = core.Dict, Set = core.Set, Symbol = core.Symbol; ref$ = core.Object, keys = ref$.keys, create = ref$.create, assign = ref$.assign, make = ref$.make; from = core.Array.from; test('Dict', function(assert){ var dict1, dict2, dict3, done, iter; assert.isFunction(Dict); dict1 = Dict(); assert.ok(!(dict1 instanceof Object)); assert.deepEqual(keys(dict1), []); dict2 = Dict({ q: 1, w: 2 }); assert.ok(!(dict2 instanceof Object)); assert.deepEqual(keys(dict2), ['q', 'w']); assert.ok(dict2.q === 1); assert.ok(dict2.w === 2); dict3 = Dict(createIterable([[1, 1], [2, 2]])); assert.ok(!(dict3 instanceof Object)); assert.deepEqual(keys(dict3), ['1', '2']); assert.ok(dict3[1] === 1); assert.ok(dict3[2] === 2); done = false; iter = createIterable([null, 1, 2], { 'return': function(){ done = true; } }); try { new Dict(iter); } catch (e$) {} assert.ok(done, '.return #throw'); }); test('Dict.every', function(assert){ var every, obj, ctx; every = Dict.every; assert.isFunction(every); every(obj = { q: 1 }, function(val, key, that){ assert.ok(val === 1); assert.ok(key === 'q'); assert.ok(that === obj); assert.ok(this === ctx); }, ctx = {}); assert.ok(every({ q: 1, w: 2, e: 3 }, function(it){ return toString$.call(it).slice(8, -1) === 'Number'; })); assert.ok(!every({ q: 1, w: '2', e: 3 }, function(it){ return toString$.call(it).slice(8, -1) === 'Number'; })); }); test('Dict.filter', function(assert){ var filter, obj, ctx; filter = Dict.filter; assert.isFunction(filter); filter(obj = { q: 1 }, function(val, key, that){ assert.ok(val === 1); assert.ok(key === 'q'); assert.ok(that === obj); assert.ok(this === ctx); }, ctx = {}); assert.deepEqual(filter({ q: 1, w: 2, e: 3 }, function(it){ return it % 2; }), Dict({ q: 1, e: 3 })); }); test('Dict.find', function(assert){ var find, obj, ctx; find = Dict.find; assert.isFunction(find); find(obj = { q: 1 }, function(val, key, that){ assert.ok(val === 1); assert.ok(key === 'q'); assert.ok(that === obj); assert.ok(this === ctx); }, ctx = {}); assert.ok(find({ q: 1, w: 2, e: 3 }, function(it){ return !(it % 2); }) === 2); }); test('Dict.findKey', function(assert){ var findKey, obj, ctx; findKey = Dict.findKey; assert.isFunction(findKey); findKey(obj = { q: 1 }, function(val, key, that){ assert.ok(val === 1); assert.ok(key === 'q'); assert.ok(that === obj); assert.ok(this === ctx); }, ctx = {}); assert.ok(findKey({ q: 1, w: 2, e: 3 }, function(it){ return it === 2; }) === 'w'); }); test('Dict.forEach', function(assert){ var forEach, obj, ctx, rez; forEach = Dict.forEach; assert.isFunction(forEach); forEach(obj = { q: 1 }, function(val, key, that){ assert.ok(val === 1); assert.ok(key === 'q'); assert.ok(that === obj); assert.ok(this === ctx); }, ctx = {}); rez = {}; forEach({ q: 1, w: 2 }, function(){ rez[arguments[1]] = arguments[0] + this; }, '_'); assert.deepEqual(rez, { q: '1_', w: '2_' }); rez = true; forEach(obj = { q: 1, w: 2 }, function(){ var rez; rez && (rez = obj === arguments[2]); }); assert.ok(rez); rez = {}; forEach(make({ e: 3 }, { q: 1, w: 2 }), function(){ rez[arguments[1]] = arguments[0]; }); assert.ok(!('e' in rez)); rez = {}; forEach([1, 2], function(){ rez[arguments[1]] = arguments[0]; }); assert.ok(!('length' in rez)); rez = {}; forEach('123', function(){ rez[arguments[1]] = arguments[0]; }); assert.ok('2' in rez); }); test('Dict.keyOf', function(assert){ var keyOf; keyOf = Dict.keyOf; assert.isFunction(keyOf); assert.ok(keyOf({ q: 1, w: 2, e: 3 }, 2) === 'w'); assert.ok(keyOf({ q: 1, w: 2, e: 3 }, 4) === void 8); assert.ok(keyOf({ q: 1, w: 2, e: NaN }, NaN) === void 8); }); test('Dict.map', function(assert){ var map, obj, ctx; map = Dict.map; assert.isFunction(map); map(obj = { q: 1 }, function(val, key, that){ assert.ok(val === 1); assert.ok(key === 'q'); assert.ok(that === obj); assert.ok(this === ctx); }, ctx = {}); assert.deepEqual(map({ q: 1, w: 2, e: 3 }, (function(it){ return Math.pow(it, 2); })), Dict({ q: 1, w: 4, e: 9 })); }); test('Dict.mapPairs', function(assert){ var mapPairs, obj, ctx; mapPairs = Dict.mapPairs; assert.isFunction(mapPairs); mapPairs(obj = { q: 1 }, function(val, key, that){ assert.ok(val === 1); assert.ok(key === 'q'); assert.ok(that === obj); assert.ok(this === ctx); }, ctx = {}); assert.deepEqual(mapPairs({ q: 1, w: 2, e: 3 }, function(v, k){ return v !== 2 && [k + k, v * v]; }), Dict({ qq: 1, ee: 9 })); }); test('Dict.reduce', function(assert){ var reduce, obj, foo, memo; reduce = Dict.reduce; assert.isFunction(reduce); reduce(obj = { a: 1 }, function(memo, val, key, that){ assert.ok(memo === foo); assert.ok(val === 1); assert.ok(key === 'a'); assert.ok(that === obj); }, foo = {}); reduce({ a: 1, b: 2 }, function(memo, val, key){ assert.ok(memo === 1); assert.ok(val === 2); assert.ok(key === 'b'); }); reduce({ q: 1, w: 2, e: 3 }, function(that, it){ that[it] = it; return that; }, memo = {}); assert.deepEqual(memo, { 1: 1, 2: 2, 3: 3 }); }); test('Dict.some', function(assert){ var some, obj, ctx; some = Dict.some; assert.isFunction(some); some(obj = { q: 1 }, function(val, key, that){ assert.ok(val === 1); assert.ok(key === 'q'); assert.ok(that === obj); assert.ok(this === ctx); }, ctx = {}); assert.ok(!some({ q: 1, w: 2, e: 3 }, function(it){ return toString$.call(it).slice(8, -1) === 'String'; })); assert.ok(some({ q: 1, w: '2', e: 3 }, function(it){ return toString$.call(it).slice(8, -1) === 'String'; })); }); test('Dict.includes', function(assert){ var includes, dict, o; includes = Dict.includes; assert.isFunction(includes); dict = { q: 1, w: NaN, e: -0, r: o = {} }; assert.ok(includes(dict, 1)); assert.ok(includes(dict, -0)); assert.ok(includes(dict, 0)); assert.ok(includes(dict, NaN)); assert.ok(includes(dict, o)); assert.ok(!includes(dict, 4)); assert.ok(!includes(dict, -0.5)); assert.ok(!includes(dict, {})); }); test('Dict.has', function(assert){ var has; has = Dict.has; assert.isFunction(has); assert.ok(has({ q: 1 }, 'q')); assert.ok(!has({ q: 1 }, 'w')); assert.ok(has([1], 0)); assert.ok(!has([], 0)); assert.ok(!has(clone$({ q: 1 }), 'q')); assert.ok(!has({}, 'toString')); }); test('Dict.get', function(assert){ var get; get = Dict.get; assert.isFunction(get); assert.ok(get({ q: 1 }, 'q') === 1); assert.ok(get({ q: 1 }, 'w') === void 8); assert.ok(get([1], 0) === 1); assert.ok(get([], 0) === void 8); assert.ok(get(clone$({ q: 1 }), 'q') === void 8); assert.ok(get({}, 'toString') === void 8); }); test('Dict.values', function(assert){ var values, iter; values = Dict.values; assert.isFunction(values); iter = values({}); assert.ok(iter[Symbol != null ? Symbol.toStringTag : void 8] === 'Dict Iterator'); assert.isIterator(iter); assert.isIterable(iter); assert.deepEqual(from(values({ q: 1, w: 2, e: 3 })), [1, 2, 3]); assert.deepEqual(from(values(new String('qwe'))), ['q', 'w', 'e']); assert.deepEqual(from(values(assign(create({ q: 1, w: 2, e: 3 }), { a: 4, s: 5, d: 6 }))), [4, 5, 6]); }); test('Dict.keys', function(assert){ var keys, iter; keys = Dict.keys; assert.isFunction(keys); iter = keys({}); assert.ok(iter[Symbol != null ? Symbol.toStringTag : void 8] === 'Dict Iterator'); assert.isIterator(iter); assert.isIterable(iter); assert.deepEqual(from(keys({ q: 1, w: 2, e: 3 })), ['q', 'w', 'e']); assert.deepEqual(from(keys(new String('qwe'))), ['0', '1', '2']); assert.deepEqual(from(keys(assign(create({ q: 1, w: 2, e: 3 }), { a: 4, s: 5, d: 6 }))), ['a', 's', 'd']); }); test('Dict.entries', function(assert){ var entries, iter; entries = Dict.entries; assert.isFunction(entries); iter = entries({}); assert.ok(iter[Symbol != null ? Symbol.toStringTag : void 8] === 'Dict Iterator'); assert.isIterator(iter); assert.isIterable(iter); assert.deepEqual(from(entries({ q: 1, w: 2, e: 3 })), [['q', 1], ['w', 2], ['e', 3]]); assert.deepEqual(from(entries(new String('qwe'))), [['0', 'q'], ['1', 'w'], ['2', 'e']]); assert.deepEqual(from(entries(assign(create({ q: 1, w: 2, e: 3 }), { a: 4, s: 5, d: 6 }))), [['a', 4], ['s', 5], ['d', 6]]); }); function clone$(it){ function fun(){} fun.prototype = it; return new fun; } }).call(this); // Generated by LiveScript 1.4.0 (function(){ var module, test, ref$, map, every, reduce, toString$ = {}.toString; module = QUnit.module, test = QUnit.test; module('core-js'); ref$ = core.Array, map = ref$.map, every = ref$.every, reduce = ref$.reduce; test('Function#part', function(assert){ var part, $, obj, fn, p; part = core.Function.part; $ = core._; assert.isFunction(part); assert.ok(part(function(it){ return toString$.call(it).slice(8, -1) === 'String'; }, 'qwe')()); obj = { a: 42 }; obj.fn = part(function(it){ return this.a + it; }, 21); assert.ok(obj.fn() === 63); fn = function(){ return map(arguments, String).join(' '); }; p = part(fn, $, 'Саша', $, 'шоссе', $, 'сосала'); assert.isFunction(p, '.part with placeholders return function'); assert.ok(p('Шла', 'по') === 'Шла Саша по шоссе undefined сосала', '.part with placeholders: args < placeholders'); assert.ok(p('Шла', 'по', 'и') === 'Шла Саша по шоссе и сосала', '.part with placeholders: args == placeholders'); assert.ok(p('Шла', 'по', 'и', 'сушку') === 'Шла Саша по шоссе и сосала сушку', '.part with placeholders: args > placeholders'); }); }).call(this); // Generated by LiveScript 1.4.0 (function(){ var module, test; module = QUnit.module, test = QUnit.test; module('core-js'); test('core.getIteratorMethod', function(assert){ var getIteratorMethod, iterable, iterFn; getIteratorMethod = core.getIteratorMethod; assert.isFunction(getIteratorMethod); iterable = createIterable([]); iterFn = getIteratorMethod(iterable); assert.isFunction(iterFn); assert.isIterator(iterFn.call(iterable)); assert.isFunction(getIteratorMethod([])); assert.isFunction(getIteratorMethod(function(){ return arguments; }())); assert.isFunction(getIteratorMethod(Array.prototype)); assert.strictEqual(getIteratorMethod({}), void 8); }); }).call(this); // Generated by LiveScript 1.4.0 (function(){ var module, test; module = QUnit.module, test = QUnit.test; module('core-js'); test('core.getIterator', function(assert){ var getIterator; getIterator = core.getIterator; assert.isFunction(getIterator); assert.isIterator(getIterator([])); assert.isIterator(getIterator(function(){ return arguments; }())); assert.isIterator(getIterator(createIterable([]))); assert.throws(function(){ getIterator({}); }, TypeError); }); }).call(this); // Generated by LiveScript 1.4.0 (function(){ var module, test; module = QUnit.module, test = QUnit.test; module('core-js'); test('core.isIterable', function(assert){ var isIterable; isIterable = core.isIterable; assert.isFunction(isIterable); assert.ok(isIterable(createIterable([]))); assert.ok(isIterable([])); assert.ok(isIterable(function(){ return arguments; }())); assert.ok(isIterable(Array.prototype)); assert.ok(!isIterable({})); }); }).call(this); // Generated by LiveScript 1.4.0 (function(){ var module, test; module = QUnit.module, test = QUnit.test; module('core-js'); test('Number#@@iterator', function(assert){ var getIterator, toStringTag, iter1, iter2, iter3, iter4, iter5, iter6; getIterator = core.getIterator; toStringTag = core.Symbol.toStringTag; iter1 = getIterator(2); assert.isIterator(iter1); assert.isIterable(iter1); assert.ok(iter1[toStringTag] === 'Number Iterator', '@@toStringTag'); assert.deepEqual(iter1.next(), { done: false, value: 0 }, '2 #1'); assert.deepEqual(iter1.next(), { done: false, value: 1 }, '2 #2'); assert.deepEqual(iter1.next(), { done: true, value: void 8 }, '2 #3'); iter2 = getIterator(1.5); assert.deepEqual(iter2.next(), { done: false, value: 0 }, '1.5 #1'); assert.deepEqual(iter2.next(), { done: false, value: 1 }, '1.5 #2'); assert.deepEqual(iter2.next(), { done: true, value: void 8 }, '1.5 #3'); iter3 = getIterator(-1); assert.deepEqual(iter3.next(), { done: true, value: void 8 }, '-1'); iter4 = getIterator(NaN); assert.deepEqual(iter4.next(), { done: true, value: void 8 }, 'NaN'); iter5 = getIterator(Infinity); assert.deepEqual(iter5.next(), { done: false, value: 0 }, 'Infinity #1'); assert.deepEqual(iter5.next(), { done: false, value: 1 }, 'Infinity #1'); assert.deepEqual(iter5.next(), { done: false, value: 2 }, 'Infinity #1'); iter6 = getIterator(-Infinity); assert.deepEqual(iter6.next(), { done: true, value: void 8 }, '-Infinity'); }); }).call(this); // Generated by LiveScript 1.4.0 (function(){ var module, test; module = QUnit.module, test = QUnit.test; module('core-js'); test('Object.classof', function(assert){ var classof, Class; classof = core.Object.classof; assert.isFunction(classof); assert.ok(classof(void 8) === 'Undefined', 'classof undefined is `Undefined`'); assert.ok(classof(null) === 'Null', 'classof null is `Null`'); assert.ok(classof(true) === 'Boolean', 'classof bool is `Boolean`'); assert.ok(classof('string') === 'String', 'classof string is `String`'); assert.ok(classof(7) === 'Number', 'classof number is `Number`'); assert.ok(classof(core.Symbol()) === 'Symbol', 'classof symbol is `Symbol`'); assert.ok(classof(new Boolean(false)) === 'Boolean', 'classof new Boolean is `Boolean`'); assert.ok(classof(new String('')) === 'String', 'classof new String is `String`'); assert.ok(classof(new Number(7)) === 'Number', 'classof new Number is `Number`'); assert.ok(classof({}) === 'Object', 'classof {} is `Object`'); assert.ok(classof([]) === 'Array', 'classof array is `Array`'); assert.ok(classof(function(){}) === 'Function', 'classof function is `Function`'); assert.ok(classof(/./) === 'RegExp', 'classof regexp is `Undefined`'); assert.ok(classof(TypeError()) === 'Error', 'classof new TypeError is `RegExp`'); assert.ok(classof(function(){ return arguments; }()) === 'Arguments', 'classof arguments list is `Arguments`'); assert.ok(classof(new core.Set) === 'Set', 'classof undefined is `Map`'); assert.ok(classof(new core.Map) === 'Map', 'classof map is `Undefined`'); assert.ok(classof(new core.WeakSet) === 'WeakSet', 'classof weakset is `WeakSet`'); assert.ok(classof(new core.WeakMap) === 'WeakMap', 'classof weakmap is `WeakMap`'); assert.ok(classof(new core.Promise(function(){})) === 'Promise', 'classof promise is `Promise`'); assert.ok(classof(core.getIterator('')) === 'String Iterator', 'classof String Iterator is `String Iterator`'); assert.ok(classof(core.getIterator([])) === 'Array Iterator', 'classof Array Iterator is `Array Iterator`'); assert.ok(classof(new core.Set().entries()) === 'Set Iterator', 'classof Set Iterator is `Set Iterator`'); assert.ok(classof(new core.Map().entries()) === 'Map Iterator', 'classof Map Iterator is `Map Iterator`'); assert.ok(classof(Math) === 'Math', 'classof Math is `Math`'); if (typeof JSON != 'undefined' && JSON !== null) { assert.ok(classof(JSON) === 'JSON', 'classof JSON is `JSON`'); } Class = (function(){ Class.displayName = 'Class'; var prototype = Class.prototype, constructor = Class; Class.prototype[core.Symbol.toStringTag] = 'Class'; function Class(){} return Class; }()); assert.ok(classof(new Class) === 'Class', 'classof user class is [Symbol.toStringTag]'); }); }).call(this); // Generated by LiveScript 1.4.0 (function(){ var module, test; module = QUnit.module, test = QUnit.test; module('core-js'); test('Object.define', function(assert){ var ref$, define, defineProperty, foo, foo2; ref$ = core.Object, define = ref$.define, defineProperty = ref$.defineProperty; assert.isFunction(define); foo = { q: 1 }; assert.ok(foo === define(foo, { w: 2 })); assert.ok(foo.w === 2); if (DESCRIPTORS) { foo = { q: 1 }; foo2 = defineProperty({}, 'w', { get: function(){ return this.q + 1; } }); define(foo, foo2); assert.ok(foo.w === 2); } }); }).call(this); // Generated by LiveScript 1.4.0 (function(){ var module, test; module = QUnit.module, test = QUnit.test; module('core-js'); test('Object.isObject', function(assert){ var isObject; isObject = core.Object.isObject; assert.isFunction(isObject); assert.ok(!isObject(void 8), 'isObject undefined return false'); assert.ok(!isObject(null), 'isObject null return false'); assert.ok(!isObject(1), 'isObject number return false'); assert.ok(!isObject(true), 'isObject bool return false'); assert.ok(!isObject('string'), 'isObject string return false'); assert.ok(isObject(new Number(1)), 'isObject new Number return true'); assert.ok(isObject(new Boolean(false)), 'isObject new Boolean return true'); assert.ok(isObject(new String(1)), 'isObject new String return true'); assert.ok(isObject({}), 'isObject object return true'); assert.ok(isObject([]), 'isObject array return true'); assert.ok(isObject(/./), 'isObject regexp return true'); assert.ok(isObject(function(){}), 'isObject function return true'); assert.ok(isObject(new function(){}), 'isObject constructor instance return true'); }); }).call(this); // Generated by LiveScript 1.4.0 (function(){ var module, test; module = QUnit.module, test = QUnit.test; module('core-js'); test('Object.make', function(assert){ var make, object, foo; make = core.Object.make; assert.isFunction(make); object = make(foo = { q: 1 }, { w: 2 }); assert.ok(core.Object.getPrototypeOf(object) === foo); assert.ok(object.w === 2); }); }).call(this); // Generated by LiveScript 1.4.0 (function(){ var module, test; module = QUnit.module, test = QUnit.test; module('core-js'); test('RegExp.escape', function(assert){ var escape; escape = core.RegExp.escape; assert.isFunction(escape); assert.strictEqual(escape('qwe asd'), 'qwe asd', "Don't change simple string"); assert.strictEqual(escape('\\[]{}()*+?.^$|'), '\\\\\\[\\]\\{\\}\\(\\)\\*\\+\\?\\.\\^\\$\\|', 'Escape all RegExp special chars'); }); }).call(this); // Generated by LiveScript 1.4.0 (function(){ var module, test; module = QUnit.module, test = QUnit.test; module('core-js'); test('String#escapeHTML', function(assert){ var escapeHTML; escapeHTML = core.String.escapeHTML; assert.isFunction(escapeHTML); assert.strictEqual(escapeHTML('qwe, asd'), 'qwe, asd'); assert.strictEqual(escapeHTML('
qwe
'), '<div>qwe</div>'); assert.strictEqual(escapeHTML("&<>\"'"), '&<>"''); }); }).call(this); // Generated by LiveScript 1.4.0 (function(){ var module, test; module = QUnit.module, test = QUnit.test; module('core-js'); test('String#unescapeHTML', function(assert){ var unescapeHTML; unescapeHTML = core.String.unescapeHTML; assert.isFunction(unescapeHTML); assert.strictEqual(unescapeHTML('qwe, asd'), 'qwe, asd'); assert.strictEqual(unescapeHTML('<div>qwe</div>'), '
qwe
'); assert.strictEqual(unescapeHTML('&<>"''), "&<>\"'"); }); }).call(this); // Generated by LiveScript 1.4.0 (function(){ var module, test; module = QUnit.module, test = QUnit.test; module('ES6'); test('Array#copyWithin', function(assert){ var copyWithin, a; copyWithin = core.Array.copyWithin; assert.isFunction(copyWithin); assert.strictEqual(a = copyWithin([1], 0), a); assert.deepEqual(copyWithin([1, 2, 3, 4, 5], 0, 3), [4, 5, 3, 4, 5]); assert.deepEqual(copyWithin([1, 2, 3, 4, 5], 1, 3), [1, 4, 5, 4, 5]); assert.deepEqual(copyWithin([1, 2, 3, 4, 5], 1, 2), [1, 3, 4, 5, 5]); assert.deepEqual(copyWithin([1, 2, 3, 4, 5], 2, 2), [1, 2, 3, 4, 5]); assert.deepEqual(copyWithin([1, 2, 3, 4, 5], 0, 3, 4), [4, 2, 3, 4, 5]); assert.deepEqual(copyWithin([1, 2, 3, 4, 5], 1, 3, 4), [1, 4, 3, 4, 5]); assert.deepEqual(copyWithin([1, 2, 3, 4, 5], 1, 2, 4), [1, 3, 4, 4, 5]); assert.deepEqual(copyWithin([1, 2, 3, 4, 5], 0, -2), [4, 5, 3, 4, 5]); assert.deepEqual(copyWithin([1, 2, 3, 4, 5], 0, -2, -1), [4, 2, 3, 4, 5]); assert.deepEqual(copyWithin([1, 2, 3, 4, 5], -4, -3, -2), [1, 3, 3, 4, 5]); assert.deepEqual(copyWithin([1, 2, 3, 4, 5], -4, -3, -1), [1, 3, 4, 4, 5]); assert.deepEqual(copyWithin([1, 2, 3, 4, 5], -4, -3), [1, 3, 4, 5, 5]); if (STRICT) { assert.throws(function(){ copyWithin(null, 0); }, TypeError); assert.throws(function(){ copyWithin(void 8, 0); }, TypeError); } }); }).call(this); // Generated by LiveScript 1.4.0 (function(){ var module, test, toString$ = {}.toString; module = QUnit.module, test = QUnit.test; module('ES6'); test('Array#every', function(assert){ var every, a, ctx, rez, arr; every = core.Array.every; assert.isFunction(every); every(a = [1], function(val, key, that){ assert.same(arguments.length, 3, 'correct number of callback arguments'); assert.same(val, 1, 'correct value in callback'); assert.same(key, 0, 'correct index in callback'); assert.same(that, a, 'correct link to array in callback'); assert.same(this, ctx, 'correct callback context'); }, ctx = {}); assert.ok(every([1, 2, 3], function(it){ return toString$.call(it).slice(8, -1) === 'Number'; })); assert.ok(every([1, 2, 3], (function(it){ return it < 4; }))); assert.ok(!every([1, 2, 3], (function(it){ return it < 3; }))); assert.ok(!every([1, 2, 3], function(it){ return toString$.call(it).slice(8, -1) === 'String'; })); assert.ok(every([1, 2, 3], function(){ return +this === 1; }, 1)); rez = ''; every([1, 2, 3], function(){ return rez += arguments[1]; }); assert.ok(rez === '012'); assert.ok(every(arr = [1, 2, 3], function(){ return arguments[2] === arr; })); if (STRICT) { assert.throws(function(){ every(null, function(){}); }, TypeError); assert.throws(function(){ every(void 8, function(){}); }, TypeError); } }); }).call(this); // Generated by LiveScript 1.4.0 (function(){ var module, test; module = QUnit.module, test = QUnit.test; module('ES6'); test('Array#fill', function(assert){ var fill, a; fill = core.Array.fill; assert.isFunction(fill); assert.strictEqual(a = fill(Array(5), 5), a); assert.deepEqual(fill(Array(5), 5), [5, 5, 5, 5, 5]); assert.deepEqual(fill(Array(5), 5, 1), [void 8, 5, 5, 5, 5]); assert.deepEqual(fill(Array(5), 5, 1, 4), [void 8, 5, 5, 5, void 8]); assert.deepEqual(fill(Array(5), 5, 6, 1), [void 8, void 8, void 8, void 8, void 8]); assert.deepEqual(fill(Array(5), 5, -3, 4), [void 8, void 8, 5, 5, void 8]); if (STRICT) { assert.throws(function(){ fill(null, 0); }, TypeError); assert.throws(function(){ fill(void 8, 0); }, TypeError); } }); }).call(this); // Generated by LiveScript 1.4.0 (function(){ var module, test; module = QUnit.module, test = QUnit.test; module('ES6'); test('Array#filter', function(assert){ var filter, a, ctx; filter = core.Array.filter; assert.isFunction(filter); filter(a = [1], function(val, key, that){ assert.same(arguments.length, 3, 'correct number of callback arguments'); assert.same(val, 1, 'correct value in callback'); assert.same(key, 0, 'correct index in callback'); assert.same(that, a, 'correct link to array in callback'); assert.same(this, ctx, 'correct callback context'); }, ctx = {}); assert.deepEqual([1, 2, 3, 4, 5], filter([1, 2, 3, 'q', {}, 4, true, 5], function(it){ return typeof it === 'number'; })); if (STRICT) { assert.throws(function(){ filter(null, function(){}); }, TypeError); assert.throws(function(){ filter(void 8, function(){}); }, TypeError); } }); }).call(this); // Generated by LiveScript 1.4.0 (function(){ var module, test; module = QUnit.module, test = QUnit.test; module('ES6'); test('Array#findIndex', function(assert){ var findIndex, arr, ctx; findIndex = core.Array.findIndex; assert.isFunction(findIndex); findIndex(arr = [1], function(val, key, that){ assert.strictEqual(this, ctx); assert.strictEqual(val, 1); assert.strictEqual(key, 0); assert.strictEqual(that, arr); }, ctx = {}); assert.strictEqual(findIndex([1, 3, NaN, 42, {}], (function(it){ return it === 42; })), 3); if (STRICT) { assert.throws(function(){ findIndex(null, 0); }, TypeError); assert.throws(function(){ findIndex(void 8, 0); }, TypeError); } }); }).call(this); // Generated by LiveScript 1.4.0 (function(){ var module, test; module = QUnit.module, test = QUnit.test; module('ES6'); test('Array#find', function(assert){ var find, arr, ctx; find = core.Array.find; assert.isFunction(find); find(arr = [1], function(val, key, that){ assert.strictEqual(this, ctx); assert.strictEqual(val, 1); assert.strictEqual(key, 0); assert.strictEqual(that, arr); }, ctx = {}); assert.strictEqual(find([1, 3, NaN, 42, {}], (function(it){ return it === 42; })), 42); assert.strictEqual(find([1, 3, NaN, 42, {}], (function(it){ return it === 43; })), void 8); if (STRICT) { assert.throws(function(){ find(null, 0); }, TypeError); assert.throws(function(){ find(void 8, 0); }, TypeError); } }); }).call(this); // Generated by LiveScript 1.4.0 (function(){ var module, test; module = QUnit.module, test = QUnit.test; module('ES6'); test('Array#forEach', function(assert){ var forEach, a, ctx, rez, arr; forEach = core.Array.forEach; assert.isFunction(forEach); forEach(a = [1], function(val, key, that){ assert.same(arguments.length, 3, 'correct number of callback arguments'); assert.same(val, 1, 'correct value in callback'); assert.same(key, 0, 'correct index in callback'); assert.same(that, a, 'correct link to array in callback'); assert.same(this, ctx, 'correct callback context'); }, ctx = {}); rez = ''; forEach([1, 2, 3], function(it){ rez += it; }); assert.ok(rez === '123'); rez = ''; forEach([1, 2, 3], function(){ rez += arguments[1]; }); assert.ok(rez === '012'); rez = ''; forEach([1, 2, 3], function(){ rez += arguments[2]; }); assert.ok(rez === '1,2,31,2,31,2,3'); rez = ''; forEach([1, 2, 3], function(){ rez += this; }, 1); assert.ok(rez === '111'); rez = ''; arr = []; arr[5] = ''; forEach(arr, function(arg$, k){ rez += k; }); assert.ok(rez === '5'); if (STRICT) { assert.throws(function(){ forEach(null, function(){}); }, TypeError); assert.throws(function(){ forEach(void 8, function(){}); }, TypeError); } }); }).call(this); // Generated by LiveScript 1.4.0 (function(){ var module, test; module = QUnit.module, test = QUnit.test; module('ES6'); test('Array.from', function(assert){ var ref$, from, isArray, defineProperty, iterator, type, col, ctx, i$, x$, len$, y$, done, iter, F, inst, a, array, called; ref$ = core.Array, from = ref$.from, isArray = ref$.isArray; defineProperty = core.Object.defineProperty; iterator = core.Symbol.iterator; assert.isFunction(from); assert.arity(from, 1); for (type in ref$ = { 'array-like': { length: '3', 0: '1', 1: '2', 2: '3' }, arguments: fn$('1', '2', '3'), array: ['1', '2', '3'], iterable: createIterable(['1', '2', '3']), string: '123' }) { col = ref$[type]; assert.arrayEqual(from(col), ['1', '2', '3'], "Works with " + type); assert.arrayEqual(from(col, (fn1$)), [1, 4, 9], "Works with " + type + " + mapFn"); } for (type in ref$ = { 'array-like': { length: 1, 0: 1 }, arguments: fn2$(1), array: [1], iterable: createIterable([1]), string: '1' }) { col = ref$[type]; assert.arrayEqual(from(col, fn3$, ctx = {}), [42], "Works with " + type + ", correct result"); } for (i$ = 0, len$ = (ref$ = [false, true, 0]).length; i$ < len$; ++i$) { x$ = ref$[i$]; assert.arrayEqual(from(x$), [], "Works with " + x$); } for (i$ = 0, len$ = (ref$ = [null, void 8]).length; i$ < len$; ++i$) { y$ = ref$[i$]; assert.throws(fn4$, TypeError, "Throws on " + y$); } assert.arrayEqual(from('𠮷𠮷𠮷'), ['𠮷', '𠮷', '𠮷'], 'Uses correct string iterator'); done = true; iter = createIterable([1, 2, 3], { 'return': function(){ return done = false; } }); from(iter, function(){ return false; }); assert.ok(done, '.return #default'); done = false; iter = createIterable([1, 2, 3], { 'return': function(){ return done = true; } }); try { from(iter, function(){ throw 42; }); } catch (e$) {} assert.ok(done, '.return #throw'); F = function(){}; inst = from.call(F, createIterable([1, 2])); assert.ok(inst instanceof F, 'generic, iterable case, instanceof'); assert.arrayEqual(inst, [1, 2], 'generic, iterable case, elements'); inst = from.call(F, { 0: 1, 1: 2, length: 2 }); assert.ok(inst instanceof F, 'generic, array-like case, instanceof'); assert.arrayEqual(inst, [1, 2], 'generic, array-like case, elements'); a = [1, 2, 3]; done = false; a['@@iterator'] = void 8; a[iterator] = function(){ done = true; return core.getIteratorMethod([]).call(this); }; assert.arrayEqual(from(a), [1, 2, 3], 'Array with custom iterator, elements'); assert.ok(done, 'call @@iterator in Array with custom iterator'); array = [1, 2, 3]; delete array[1]; assert.arrayEqual(from(array, String), ['1', 'undefined', '3'], 'Ignores holes'); assert.ok((function(){ try { return from({ length: -1, 0: 1 }, function(){ throw 42; }); } catch (e$) {} }()), 'Uses ToLength'); assert.arrayEqual(from([], undefined), [], "Works with undefined as asecond argument"); assert.throws(function(){ from([], null); }, TypeError, "Throws with null as second argument"); assert.throws(function(){ from([], 0); }, TypeError, "Throws with 0 as second argument"); assert.throws(function(){ from([], ''); }, TypeError, "Throws with '' as second argument"); assert.throws(function(){ from([], false); }, TypeError, "Throws with false as second argument"); assert.throws(function(){ from([], {}); }, TypeError, "Throws with {} as second argument"); if (DESCRIPTORS) { called = false; F = function(){}; defineProperty(F.prototype, 0, { set: function(){ var called; called = true; } }); from.call(F, [1, 2, 3]); assert.ok(!called, 'Should not call prototype accessors'); } function fn$(){ return arguments; } function fn1$(it){ return Math.pow(it, 2); } function fn2$(){ return arguments; } function fn3$(val, key){ assert.same(this, ctx, "Works with " + type + ", correct callback context"); assert.same(val, type === 'string' ? '1' : 1, "Works with " + type + ", correct callback key"); assert.same(key, 0, "Works with " + type + ", correct callback value"); assert.same(arguments.length, 2, "Works with " + type + ", correct callback arguments number"); return 42; } function fn4$(){ from(y$); } }); }).call(this); // Generated by LiveScript 1.4.0 (function(){ var module, test; module = QUnit.module, test = QUnit.test; module('ES6'); test('Array#indexOf', function(assert){ var indexOf; indexOf = core.Array.indexOf; assert.isFunction(indexOf); assert.same(0, indexOf([1, 1, 1], 1)); assert.same(-1, indexOf([1, 2, 3], 1, 1)); assert.same(1, indexOf([1, 2, 3], 2, 1)); assert.same(-1, indexOf([1, 2, 3], 2, -1)); assert.same(1, indexOf([1, 2, 3], 2, -2)); assert.same(-1, indexOf([NaN], NaN)); assert.same(3, indexOf(Array(2).concat([1, 2, 3]), 2)); assert.same(-1, indexOf(Array(1), void 8)); assert.same(0, indexOf([1], 1, -0), "shouldn't return negative zero"); if (STRICT) { assert.throws(function(){ indexOf(null, 0); }, TypeError); assert.throws(function(){ indexOf(void 8, 0); }, TypeError); } }); }).call(this); // Generated by LiveScript 1.4.0 (function(){ var module, test; module = QUnit.module, test = QUnit.test; module('ES6'); test('Array.isArray', function(assert){ var isArray; isArray = core.Array.isArray; assert.isFunction(isArray); assert.ok(!isArray({})); assert.ok(!isArray(function(){ return arguments; }())); assert.ok(isArray([])); }); }).call(this); // Generated by LiveScript 1.4.0 (function(){ var module, test, Symbol, ref$, keys, values, entries; module = QUnit.module, test = QUnit.test; module('ES6'); Symbol = core.Symbol; ref$ = core.Array, keys = ref$.keys, values = ref$.values, entries = ref$.entries; test('Array#@@iterator', function(assert){ var iter; assert.isFunction(values); iter = core.getIterator(['q', 'w', 'e']); assert.isIterator(iter); assert.isIterable(iter); assert.strictEqual(iter[Symbol != null ? Symbol.toStringTag : void 8], 'Array Iterator'); assert.deepEqual(iter.next(), { value: 'q', done: false }); assert.deepEqual(iter.next(), { value: 'w', done: false }); assert.deepEqual(iter.next(), { value: 'e', done: false }); assert.deepEqual(iter.next(), { value: void 8, done: true }); }); test('Array#keys', function(assert){ var iter; assert.isFunction(keys); iter = keys(['q', 'w', 'e']); assert.isIterator(iter); assert.isIterable(iter); assert.strictEqual(iter[Symbol != null ? Symbol.toStringTag : void 8], 'Array Iterator'); assert.deepEqual(iter.next(), { value: 0, done: false }); assert.deepEqual(iter.next(), { value: 1, done: false }); assert.deepEqual(iter.next(), { value: 2, done: false }); assert.deepEqual(iter.next(), { value: void 8, done: true }); }); test('Array#values', function(assert){ var iter; assert.isFunction(values); iter = values(['q', 'w', 'e']); assert.isIterator(iter); assert.isIterable(iter); assert.strictEqual(iter[Symbol != null ? Symbol.toStringTag : void 8], 'Array Iterator'); assert.deepEqual(iter.next(), { value: 'q', done: false }); assert.deepEqual(iter.next(), { value: 'w', done: false }); assert.deepEqual(iter.next(), { value: 'e', done: false }); assert.deepEqual(iter.next(), { value: void 8, done: true }); }); test('Array#entries', function(assert){ var iter; assert.isFunction(entries); iter = entries(['q', 'w', 'e']); assert.isIterator(iter); assert.isIterable(iter); assert.strictEqual(iter[Symbol != null ? Symbol.toStringTag : void 8], 'Array Iterator'); assert.deepEqual(iter.next(), { value: [0, 'q'], done: false }); assert.deepEqual(iter.next(), { value: [1, 'w'], done: false }); assert.deepEqual(iter.next(), { value: [2, 'e'], done: false }); assert.deepEqual(iter.next(), { value: void 8, done: true }); }); }).call(this); // Generated by LiveScript 1.4.0 (function(){ var module, test; module = QUnit.module, test = QUnit.test; module('ES6'); test('Array#join', function(assert){ var join; join = core.Array.join; assert.isFunction(join); assert.strictEqual(join([1, 2, 3], void 8), '1,2,3'); assert.strictEqual(join('123'), '1,2,3'); assert.strictEqual(join('123', '|'), '1|2|3'); if (STRICT) { assert.throws(function(){ join(null); }, TypeError); assert.throws(function(){ join(void 8); }, TypeError); } }); }).call(this); // Generated by LiveScript 1.4.0 (function(){ var module, test; module = QUnit.module, test = QUnit.test; module('ES6'); test('Array#lastIndexOf', function(assert){ var lastIndexOf; lastIndexOf = core.Array.lastIndexOf; assert.isFunction(lastIndexOf); assert.same(2, lastIndexOf([1, 1, 1], 1)); assert.same(-1, lastIndexOf([1, 2, 3], 3, 1)); assert.same(1, lastIndexOf([1, 2, 3], 2, 1)); assert.same(-1, lastIndexOf([1, 2, 3], 2, -3)); assert.same(-1, lastIndexOf([1, 2, 3], 1, -4)); assert.same(1, lastIndexOf([1, 2, 3], 2, -2)); assert.same(-1, lastIndexOf([NaN], NaN)); assert.same(1, lastIndexOf([1, 2, 3].concat(Array(2)), 2)); assert.same(0, lastIndexOf([1], 1, -0), "shouldn't return negative zero"); if (STRICT) { assert.throws(function(){ lastIndexOf(null, 0); }, TypeError); assert.throws(function(){ lastIndexOf(void 8, 0); }, TypeError); } }); }).call(this); // Generated by LiveScript 1.4.0 (function(){ var module, test; module = QUnit.module, test = QUnit.test; module('ES6'); test('Array#map', function(assert){ var map, a, ctx; map = core.Array.map; assert.isFunction(map); map(a = [1], function(val, key, that){ assert.same(arguments.length, 3, 'correct number of callback arguments'); assert.same(val, 1, 'correct value in callback'); assert.same(key, 0, 'correct index in callback'); assert.same(that, a, 'correct link to array in callback'); return assert.same(this, ctx, 'correct callback context'); }, ctx = {}); assert.deepEqual([2, 3, 4], map([1, 2, 3], (function(it){ return it + 1; }))); assert.deepEqual([1, 3, 5], map([1, 2, 3], curry$(function(x$, y$){ return x$ + y$; }))); assert.deepEqual([2, 2, 2], map([1, 2, 3], function(){ return +this; }, 2)); if (STRICT) { assert.throws(function(){ map(null, function(){}); }, TypeError); assert.throws(function(){ map(void 8, function(){}); }, TypeError); } }); function curry$(f, bound){ var context, _curry = function(args) { return f.length > 1 ? function(){ var params = args ? args.concat() : []; context = bound ? context || this : this; return params.push.apply(params, arguments) < f.length && arguments.length ? _curry.call(context, params) : f.apply(context, params); } : f; }; return _curry(); } }).call(this); // Generated by LiveScript 1.4.0 (function(){ var module, test; module = QUnit.module, test = QUnit.test; module('ES6'); test('Array.of', function(assert){ var Array, defineProperty, F, inst, called; Array = core.Array; defineProperty = core.Object.defineProperty; assert.isFunction(Array.of); assert.arity(Array.of, 0); assert.deepEqual(Array.of(1), [1]); assert.deepEqual(Array.of(1, 2, 3), [1, 2, 3]); F = function(){}; inst = Array.of.call(F, 1, 2); assert.ok(inst instanceof F); assert.strictEqual(inst[0], 1); assert.strictEqual(inst[1], 2); assert.strictEqual(inst.length, 2); if (DESCRIPTORS) { called = false; F = function(){}; defineProperty(F.prototype, 0, { set: function(){ var called; called = true; } }); Array.of.call(F, 1, 2, 3); assert.ok(!called, 'Should not call prototype accessors'); } }); }).call(this); // Generated by LiveScript 1.4.0 (function(){ var module, test; module = QUnit.module, test = QUnit.test; module('ES6'); test('Array#reduceRight', function(assert){ var reduceRight, a, accumulator, v, k; reduceRight = core.Array.reduceRight; assert.isFunction(reduceRight); reduceRight(a = [1], function(memo, val, key, that){ assert.same(arguments.length, 4, 'correct number of callback arguments'); assert.same(memo, accumulator, 'correct callback accumulator'); assert.same(val, 1, 'correct value in callback'); assert.same(key, 0, 'correct index in callback'); assert.same(that, a, 'correct link to array in callback'); }, accumulator = {}); assert.same(reduceRight([1, 2, 3], curry$(function(x$, y$){ return x$ + y$; }), 1), 7, 'works with initial accumulator'); reduceRight(a = [1, 2], function(memo, val, key, that){ assert.same(memo, 2, 'correct default accumulator'); assert.same(val, 1, 'correct start value without initial accumulator'); assert.same(key, 0, 'correct start index without initial accumulator'); }); assert.same(reduceRight([1, 2, 3], curry$(function(x$, y$){ return x$ + y$; })), 6, 'works without initial accumulator'); v = ''; k = ''; reduceRight([1, 2, 3], function(memo, a, b){ v += a; k += b; }, 0); assert.same(v, '321', 'correct order #1'); assert.same(k, '210', 'correct order #2'); assert.same(reduceRight({ 0: 1, 1: 2, length: 2 }, curry$(function(x$, y$){ return x$ + y$; })), 3, 'generic'); if (STRICT) { assert.throws(function(){ reduceRight(null, function(){}, 1); }, TypeError); assert.throws(function(){ reduceRight(void 8, function(){}, 1); }, TypeError); } }); function curry$(f, bound){ var context, _curry = function(args) { return f.length > 1 ? function(){ var params = args ? args.concat() : []; context = bound ? context || this : this; return params.push.apply(params, arguments) < f.length && arguments.length ? _curry.call(context, params) : f.apply(context, params); } : f; }; return _curry(); } }).call(this); // Generated by LiveScript 1.4.0 (function(){ var module, test; module = QUnit.module, test = QUnit.test; module('ES6'); test('Array#reduce', function(assert){ var reduce, a, accumulator, v, k; reduce = core.Array.reduce; assert.isFunction(reduce); reduce(a = [1], function(memo, val, key, that){ assert.same(arguments.length, 4, 'correct number of callback arguments'); assert.same(memo, accumulator, 'correct callback accumulator'); assert.same(val, 1, 'correct value in callback'); assert.same(key, 0, 'correct index in callback'); assert.same(that, a, 'correct link to array in callback'); }, accumulator = {}); assert.same(reduce([1, 2, 3], curry$(function(x$, y$){ return x$ + y$; }), 1), 7, 'works with initial accumulator'); reduce(a = [1, 2], function(memo, val, key, that){ assert.same(memo, 1, 'correct default accumulator'); assert.same(val, 2, 'correct start value without initial accumulator'); assert.same(key, 1, 'correct start index without initial accumulator'); }); assert.same(reduce([1, 2, 3], curry$(function(x$, y$){ return x$ + y$; })), 6, 'works without initial accumulator'); v = ''; k = ''; reduce([1, 2, 3], function(memo, a, b){ v += a; k += b; }, 0); assert.same(v, '123', 'correct order #1'); assert.same(k, '012', 'correct order #2'); assert.same(reduce({ 0: 1, 1: 2, length: 2 }, curry$(function(x$, y$){ return x$ + y$; })), 3, 'generic'); if (STRICT) { assert.throws(function(){ reduce(null, function(){}, 1); }, TypeError); assert.throws(function(){ reduce(void 8, function(){}, 1); }, TypeError); } }); function curry$(f, bound){ var context, _curry = function(args) { return f.length > 1 ? function(){ var params = args ? args.concat() : []; context = bound ? context || this : this; return params.push.apply(params, arguments) < f.length && arguments.length ? _curry.call(context, params) : f.apply(context, params); } : f; }; return _curry(); } }).call(this); // Generated by LiveScript 1.4.0 (function(){ var module, test, toString$ = {}.toString; module = QUnit.module, test = QUnit.test; module('ES6'); test('Array#slice', function(assert){ var slice, arr, str, list, ref$, e; slice = core.Array.slice; assert.isFunction(slice); arr = ['1', '2', '3', '4', '5']; assert.deepEqual(slice(arr), arr); assert.deepEqual(slice(arr, 1, 3), ['2', '3']); assert.deepEqual(slice(arr, 1, void 8), ['2', '3', '4', '5']); assert.deepEqual(slice(arr, 1, -1), ['2', '3', '4']); assert.deepEqual(slice(arr, -2, -1), ['4']); assert.deepEqual(slice(arr, -2, -3), []); str = '12345'; assert.deepEqual(slice(str), arr); assert.deepEqual(slice(str, 1, 3), ['2', '3']); assert.deepEqual(slice(str, 1, void 8), ['2', '3', '4', '5']); assert.deepEqual(slice(str, 1, -1), ['2', '3', '4']); assert.deepEqual(slice(str, -2, -1), ['4']); assert.deepEqual(slice(str, -2, -3), []); if (list = typeof document != 'undefined' && document !== null ? (ref$ = document.body) != null ? ref$.childNodes : void 8 : void 8) { try { assert.strictEqual(toString$.call(slice(list)).slice(8, -1), 'Array'); } catch (e$) { e = e$; assert.ok(false); } } if (NATIVE && STRICT) { assert.throws(function(){ slice(null); }, TypeError); assert.throws(function(){ slice(void 8); }, TypeError); } }); }).call(this); // Generated by LiveScript 1.4.0 (function(){ var module, test, toString$ = {}.toString; module = QUnit.module, test = QUnit.test; module('ES6'); test('Array#some', function(assert){ var some, a, ctx, rez, arr; some = core.Array.some; assert.isFunction(some); some(a = [1], function(val, key, that){ assert.same(arguments.length, 3, 'correct number of callback arguments'); assert.same(val, 1, 'correct value in callback'); assert.same(key, 0, 'correct index in callback'); assert.same(that, a, 'correct link to array in callback'); assert.same(this, ctx, 'correct callback context'); }, ctx = {}); assert.ok(some([1, '2', 3], function(it){ return toString$.call(it).slice(8, -1) === 'Number'; })); assert.ok(some([1, 2, 3], (function(it){ return it < 3; }))); assert.ok(!some([1, 2, 3], (function(it){ return it < 0; }))); assert.ok(!some([1, 2, 3], function(it){ return toString$.call(it).slice(8, -1) === 'String'; })); assert.ok(!some([1, 2, 3], function(){ return +this !== 1; }, 1)); rez = ''; some([1, 2, 3], function(){ rez += arguments[1]; return false; }); assert.ok(rez === '012'); assert.ok(!some(arr = [1, 2, 3], function(){ return arguments[2] !== arr; })); if (STRICT) { assert.throws(function(){ some(null, function(){}); }, TypeError); assert.throws(function(){ some(void 8, function(){}); }, TypeError); } }); }).call(this); // Generated by LiveScript 1.4.0 (function(){ var module, test; module = QUnit.module, test = QUnit.test; module('ES6'); test('Array#sort', function(assert){ var sort; sort = core.Array.sort; assert.isFunction(sort); assert.ok(!!(function(){ try { return sort([1, 2, 3], void 8); } catch (e$) {} }()), 'works with undefined'); assert.throws(function(){ sort([1, 2, 3], null); }, 'throws on null'); assert.throws(function(){ sort([1, 2, 3], {}); }, 'throws on {}'); if (STRICT) { assert.throws(function(){ sort(null); }, TypeError, 'ToObject(this)'); assert.throws(function(){ sort(void 8); }, TypeError, 'ToObject(this)'); } }); }).call(this); // Generated by LiveScript 1.4.0 (function(){ var module, test; module = QUnit.module, test = QUnit.test; module('ES6'); test('Date.now', function(assert){ var now; now = core.Date.now; assert.isFunction(now); assert.ok(+new Date - now() < 10, 'Date.now() ~ +new Date'); }); }).call(this); // Generated by LiveScript 1.4.0 (function(){ var module, test; module = QUnit.module, test = QUnit.test; module('ES6'); test('Date#toISOString', function(assert){ var toISOString, ft, bc; toISOString = core.Date.toISOString; assert.isFunction(toISOString); assert.strictEqual(toISOString(new Date(0)), '1970-01-01T00:00:00.000Z'); assert.strictEqual(toISOString(new Date(1e12 + 1)), '2001-09-09T01:46:40.001Z'); assert.strictEqual(toISOString(new Date(-5e13 - 1)), '0385-07-25T07:06:39.999Z'); ft = toISOString(new Date(1e15 + 1)); assert.ok(ft === '+033658-09-27T01:46:40.001Z' || ft === '33658-09-27T01:46:40.001Z'); bc = toISOString(new Date(-1e15 + 1)); assert.ok(bc === '-029719-04-05T22:13:20.001Z' || bc === '-29719-04-05T22:13:20.001Z'); assert.throws(function(){ toISOString(new Date(NaN)); }, RangeError); }); }).call(this); // Generated by LiveScript 1.4.0 (function(){ var module, test; module = QUnit.module, test = QUnit.test; module('ES6'); test('Date#toJSON', function(assert){ var ref$, toJSON, toISOString, d; ref$ = core.Date, toJSON = ref$.toJSON, toISOString = ref$.toISOString; assert.isFunction(toJSON); if (Date.prototype.toISOString) { d = new Date(); assert.same(toJSON(d), toISOString(d), 'base'); } assert.same(toJSON(new Date(NaN)), null, 'not finite'); assert.same(toJSON({ toISOString: function(){ return 42; } }), 42, 'generic'); }); }).call(this); // Generated by LiveScript 1.4.0 (function(){ var module, test; module = QUnit.module, test = QUnit.test; module('ES6'); test('Function#bind', function(assert){ var bind, obj, fn, inst, F, date; bind = core.Function.bind; assert.isFunction(bind); obj = { a: 42 }; assert.ok(42 === bind(function(){ return this.a; }, obj)()); assert.ok(void 8 === new (bind(function(){}, obj))().a); fn = function(a, b){ this.a = a; this.b = b; }; inst = new (bind(fn, null, 1))(2); assert.ok(inst instanceof fn); assert.strictEqual(inst.a, 1); assert.strictEqual(inst.b, 2); assert.ok(42 === bind(function(it){ return it; }, null, 42)()); fn = bind(RegExp.prototype.test, /a/); assert.ok(fn('a')); F = bind(Date, null, 2015); date = new F(6); assert.ok(date instanceof Date); assert.strictEqual(date.getFullYear(), 2015); assert.strictEqual(date.getMonth(), 6); }); }).call(this); // Generated by LiveScript 1.4.0 (function(){ var module, test; module = QUnit.module, test = QUnit.test; module('ES6'); test('Function#@@hasInstance', function(assert){ assert.ok(core.Symbol.hasInstance in Function.prototype); assert.ok(Function[core.Symbol.hasInstance](function(){})); assert.ok(!Function[core.Symbol.hasInstance]({})); }); }).call(this); // Generated by LiveScript 1.4.0 (function(){ var module, test, same, Map, Set, Symbol, ref$, getOwnPropertyDescriptor, freeze, iterator; module = QUnit.module, test = QUnit.test; module('ES6'); same = function(a, b){ if (a === b) { return a !== 0 || 1 / a === 1 / b; } else { return a != a && b != b; } }; Map = core.Map, Set = core.Set, Symbol = core.Symbol; ref$ = core.Object, getOwnPropertyDescriptor = ref$.getOwnPropertyDescriptor, freeze = ref$.freeze; iterator = core.Symbol.iterator; test('Map', function(assert){ var done, iter, a, o, key, C; assert.isFunction(Map); assert.ok('clear' in Map.prototype, 'clear in Map.prototype'); assert.ok('delete' in Map.prototype, 'delete in Map.prototype'); assert.ok('forEach' in Map.prototype, 'forEach in Map.prototype'); assert.ok('get' in Map.prototype, 'get in Map.prototype'); assert.ok('has' in Map.prototype, 'has in Map.prototype'); assert.ok('set' in Map.prototype, 'set in Map.prototype'); assert.ok(new Map instanceof Map, 'new Map instanceof Map'); assert.strictEqual(new Map(createIterable([[1, 1], [2, 2], [3, 3]])).size, 3, 'Init from iterable'); assert.strictEqual(new Map([[freeze({}), 1], [2, 3]]).size, 2, 'Support frozen objects'); done = false; iter = createIterable([null, 1, 2], { 'return': function(){ return done = true; } }); try { new Map(iter); } catch (e$) {} assert.ok(done, '.return #throw'); a = []; done = false; a['@@iterator'] = void 8; a[iterator] = function(){ done = true; return core.getIteratorMethod([]).call(this); }; new Map(a); assert.ok(done); o = {}; new Map().set(o, 1); if (DESCRIPTORS) { assert.arrayEqual((function(){ var results$ = []; for (key in o) { results$.push(key); } return results$; }()), []); assert.arrayEqual(core.Object.keys(o), []); } assert.arrayEqual(core.Object.getOwnPropertyNames(o), []); assert.arrayEqual(core.Object.getOwnPropertySymbols(o), []); assert.arrayEqual(core.Reflect.ownKeys(o), []); if (nativeSubclass) { C = nativeSubclass(Map); assert.ok(new C instanceof C, 'correct subclassing with native classes #1'); assert.ok(new C instanceof Map, 'correct subclassing with native classes #2'); assert.same(new C().set(1, 2).get(1), 2, 'correct subclassing with native classes #3'); } }); test('Map#clear', function(assert){ var M, f; assert.isFunction(Map.prototype.clear); M = new Map; M.clear(); assert.strictEqual(M.size, 0); M = new Map().set(1, 2).set(2, 3).set(1, 4); M.clear(); assert.strictEqual(M.size, 0); assert.ok(!M.has(1)); assert.ok(!M.has(2)); M = new Map().set(1, 2).set(f = freeze({}), 3); M.clear(); assert.strictEqual(M.size, 0, 'Support frozen objects'); assert.ok(!M.has(1)); assert.ok(!M.has(f)); }); test('Map#delete', function(assert){ var a, M, f; assert.isFunction(Map.prototype['delete']); a = []; M = new Map().set(NaN, 1).set(2, 1).set(3, 1).set(2, 5).set(1, 4).set(a, {}); assert.strictEqual(M.size, 5); assert.ok(M['delete'](NaN)); assert.strictEqual(M.size, 4); assert.ok(!M['delete'](4)); assert.strictEqual(M.size, 4); M['delete']([]); assert.strictEqual(M.size, 4); M['delete'](a); assert.strictEqual(M.size, 3); M.set(freeze(f = {}), 42); assert.strictEqual(M.size, 4); M['delete'](f); assert.strictEqual(M.size, 3); }); test('Map#forEach', function(assert){ var r, T, count, M, a, map, s; assert.isFunction(Map.prototype.forEach); r = {}; count = 0; M = new Map().set(NaN, 1).set(2, 1).set(3, 7).set(2, 5).set(1, 4).set(a = {}, 9); M.forEach(function(value, key){ count++; r[value] = key; }); assert.strictEqual(count, 5); assert.deepEqual(r, { 1: NaN, 7: 3, 5: 2, 4: 1, 9: a }); map = new Map([['0', 9], ['1', 9], ['2', 9], ['3', 9]]); s = ""; map.forEach(function(value, key){ s += key; if (key === '2') { map['delete']('2'); map['delete']('3'); map['delete']('1'); map.set('4', 9); } }); assert.strictEqual(s, '0124'); map = new Map([['0', 1]]); s = ""; map.forEach(function(it){ map['delete']('0'); if (s !== '') { throw '!!!'; } s += it; }); assert.strictEqual(s, '1'); assert.throws(function(){ Map.prototype.forEach.call(new Set, function(){}); }, 'non-generic'); }); test('Map#get', function(assert){ var o, f, M; assert.isFunction(Map.prototype.get); o = {}; f = freeze({}); M = new Map([[NaN, 1], [2, 1], [3, 1], [2, 5], [1, 4], [f, 42], [o, o]]); assert.strictEqual(M.get(NaN), 1); assert.strictEqual(M.get(4), void 8); assert.strictEqual(M.get({}), void 8); assert.strictEqual(M.get(o), o); assert.strictEqual(M.get(f), 42); assert.strictEqual(M.get(2), 5); }); test('Map#has', function(assert){ var o, f, M; assert.isFunction(Map.prototype.has); o = {}; f = freeze({}); M = new Map([[NaN, 1], [2, 1], [3, 1], [2, 5], [1, 4], [f, 42], [o, o]]); assert.ok(M.has(NaN)); assert.ok(M.has(o)); assert.ok(M.has(2)); assert.ok(M.has(f)); assert.ok(!M.has(4)); assert.ok(!M.has({})); }); test('Map#set', function(assert){ var o, M, chain, f; assert.isFunction(Map.prototype.set); o = {}; M = new Map().set(NaN, 1).set(2, 1).set(3, 1).set(2, 5).set(1, 4).set(o, o); assert.ok(M.size === 5); chain = M.set(7, 2); assert.strictEqual(chain, M); M.set(7, 2); assert.strictEqual(M.size, 6); assert.strictEqual(M.get(7), 2); assert.strictEqual(M.get(NaN), 1); M.set(NaN, 42); assert.strictEqual(M.size, 6); assert.strictEqual(M.get(NaN), 42); M.set({}, 11); assert.strictEqual(M.size, 7); assert.strictEqual(M.get(o), o); M.set(o, 27); assert.strictEqual(M.size, 7); assert.strictEqual(M.get(o), 27); assert.strictEqual(new Map().set(NaN, 2).set(NaN, 3).set(NaN, 4).size, 1); M = new Map().set(freeze(f = {}), 42); assert.strictEqual(M.get(f), 42); }); test('Map#size', function(assert){ var size, sizeDesc; size = new Map().set(2, 1).size; assert.strictEqual(typeof size, 'number', 'size is number'); assert.strictEqual(size, 1, 'size is correct'); if (DESCRIPTORS) { sizeDesc = getOwnPropertyDescriptor(Map.prototype, 'size'); assert.ok(sizeDesc && sizeDesc.get, 'size is getter'); assert.ok(sizeDesc && !sizeDesc.set, 'size isnt setter'); assert.throws(function(){ Map.prototype.size; }, TypeError); } }); test('Map & -0', function(assert){ var map, x$; map = new Map; map.set(-0, 1); assert.strictEqual(map.size, 1); assert.ok(map.has(0)); assert.ok(map.has(-0)); assert.strictEqual(map.get(0), 1); assert.strictEqual(map.get(-0), 1); map.forEach(function(val, key){ return assert.ok(!same(key, -0)); }); map['delete'](-0); assert.strictEqual(map.size, 0); map = new Map([[-0, 1]]); map.forEach(function(val, key){ return assert.ok(!same(key, -0)); }); x$ = map = new Map(); x$.set(4, 4); x$.set(3, 3); x$.set(2, 2); x$.set(1, 1); x$.set(0, 0); assert.ok(map.has(-0)); }); test('Map#@@toStringTag', function(assert){ assert.strictEqual(Map.prototype[Symbol != null ? Symbol.toStringTag : void 8], 'Map', 'Map::@@toStringTag is `Map`'); }); test('Map Iterator', function(assert){ var map, keys, iterator; map = new Map([['a', 1], ['b', 2], ['c', 3], ['d', 4]]); keys = []; iterator = map.keys(); keys.push(iterator.next().value); assert.ok(map['delete']('a')); assert.ok(map['delete']('b')); assert.ok(map['delete']('c')); map.set('e'); keys.push(iterator.next().value); keys.push(iterator.next().value); assert.ok(iterator.next().done); map.set('f'); assert.ok(iterator.next().done); assert.deepEqual(keys, ['a', 'd', 'e']); }); test('Map#keys', function(assert){ var iter; assert.isFunction(Map.prototype.keys); iter = new Map([['a', 'q'], ['s', 'w'], ['d', 'e']]).keys(); assert.isIterator(iter); assert.isIterable(iter); assert.strictEqual(iter[Symbol != null ? Symbol.toStringTag : void 8], 'Map Iterator'); assert.deepEqual(iter.next(), { value: 'a', done: false }); assert.deepEqual(iter.next(), { value: 's', done: false }); assert.deepEqual(iter.next(), { value: 'd', done: false }); assert.deepEqual(iter.next(), { value: void 8, done: true }); }); test('Map#values', function(assert){ var iter; assert.isFunction(Map.prototype.values); iter = new Map([['a', 'q'], ['s', 'w'], ['d', 'e']]).values(); assert.isIterator(iter); assert.isIterable(iter); assert.strictEqual(iter[Symbol != null ? Symbol.toStringTag : void 8], 'Map Iterator'); assert.deepEqual(iter.next(), { value: 'q', done: false }); assert.deepEqual(iter.next(), { value: 'w', done: false }); assert.deepEqual(iter.next(), { value: 'e', done: false }); assert.deepEqual(iter.next(), { value: void 8, done: true }); }); test('Map#entries', function(assert){ var iter; assert.isFunction(Map.prototype.entries); iter = new Map([['a', 'q'], ['s', 'w'], ['d', 'e']]).entries(); assert.isIterator(iter); assert.isIterable(iter); assert.strictEqual(iter[Symbol != null ? Symbol.toStringTag : void 8], 'Map Iterator'); assert.deepEqual(iter.next(), { value: ['a', 'q'], done: false }); assert.deepEqual(iter.next(), { value: ['s', 'w'], done: false }); assert.deepEqual(iter.next(), { value: ['d', 'e'], done: false }); assert.deepEqual(iter.next(), { value: void 8, done: true }); }); test('Map#@@iterator', function(assert){ var iter; iter = core.getIterator(new Map([['a', 'q'], ['s', 'w'], ['d', 'e']])); assert.isIterator(iter); assert.isIterable(iter); assert.strictEqual(iter[Symbol != null ? Symbol.toStringTag : void 8], 'Map Iterator'); assert.deepEqual(iter.next(), { value: ['a', 'q'], done: false }); assert.deepEqual(iter.next(), { value: ['s', 'w'], done: false }); assert.deepEqual(iter.next(), { value: ['d', 'e'], done: false }); assert.deepEqual(iter.next(), { value: void 8, done: true }); }); }).call(this); // Generated by LiveScript 1.4.0 (function(){ var module, test; module = QUnit.module, test = QUnit.test; module('ES6'); test('Math.acosh', function(assert){ var acosh; acosh = core.Math.acosh; assert.isFunction(acosh); assert.same(acosh(NaN), NaN); assert.same(acosh(0.5), NaN); assert.same(acosh(-1), NaN); assert.same(acosh(-1e300), NaN); assert.same(acosh(1), 0); assert.strictEqual(acosh(Infinity), Infinity); assert.epsilon(acosh(1234), 7.811163220849231); assert.epsilon(acosh(8.88), 2.8737631531629235); assert.epsilon(acosh(1e+160), 369.10676205960726); assert.epsilon(acosh(Number.MAX_VALUE), 710.475860073944); assert.epsilon(acosh(1 + core.Number.EPSILON), 2.1073424255447017e-8); }); }).call(this); // Generated by LiveScript 1.4.0 (function(){ var module, test; module = QUnit.module, test = QUnit.test; module('ES6'); test('Math.asinh', function(assert){ var asinh; asinh = core.Math.asinh; assert.isFunction(asinh); assert.same(asinh(NaN), NaN); assert.same(asinh(0), 0); assert.same(asinh(-0), -0); assert.strictEqual(asinh(Infinity), Infinity); assert.strictEqual(asinh(-Infinity), -Infinity); assert.epsilon(asinh(1234), 7.811163549201245); assert.epsilon(asinh(9.99), 2.997227420191335); assert.epsilon(asinh(1e150), 346.0809111296668); assert.epsilon(asinh(1e7), 16.811242831518268); assert.epsilon(asinh(-1e7), -16.811242831518268); }); }).call(this); // Generated by LiveScript 1.4.0 (function(){ var module, test; module = QUnit.module, test = QUnit.test; module('ES6'); test('Math.atanh', function(assert){ var atanh; atanh = core.Math.atanh; assert.isFunction(atanh); assert.same(atanh(NaN), NaN); assert.same(atanh(-2), NaN); assert.same(atanh(-1.5), NaN); assert.same(atanh(2), NaN); assert.same(atanh(1.5), NaN); assert.strictEqual(atanh(-1), -Infinity); assert.strictEqual(atanh(1), Infinity); assert.same(atanh(0), 0); assert.same(atanh(-0), -0); assert.same(atanh(-1e300), NaN); assert.same(atanh(1e300), NaN); assert.epsilon(atanh(0.5), 0.5493061443340549); assert.epsilon(atanh(-0.5), -0.5493061443340549); assert.epsilon(atanh(0.444), 0.47720201260109457); }); }).call(this); // Generated by LiveScript 1.4.0 (function(){ var module, test; module = QUnit.module, test = QUnit.test; module('ES6'); test('Math.cbrt', function(assert){ var cbrt; cbrt = core.Math.cbrt; assert.isFunction(cbrt); assert.same(cbrt(NaN), NaN); assert.same(cbrt(0), 0); assert.same(cbrt(-0), -0); assert.strictEqual(cbrt(Infinity), Infinity); assert.strictEqual(cbrt(-Infinity), -Infinity); assert.strictEqual(cbrt(-8), -2); assert.strictEqual(cbrt(8), 2); assert.epsilon(cbrt(-1000), -10); assert.epsilon(cbrt(1000), 10); }); }).call(this); // Generated by LiveScript 1.4.0 (function(){ var module, test; module = QUnit.module, test = QUnit.test; module('ES6'); test('Math.clz32', function(assert){ var clz32; clz32 = core.Math.clz32; assert.isFunction(clz32); assert.strictEqual(clz32(0), 32); assert.strictEqual(clz32(1), 31); assert.same(clz32(-1), 0); assert.strictEqual(clz32(0.6), 32); assert.same(clz32(Math.pow(2, 32) - 1), 0); assert.strictEqual(clz32(Math.pow(2, 32)), 32); }); }).call(this); // Generated by LiveScript 1.4.0 (function(){ var module, test; module = QUnit.module, test = QUnit.test; module('ES6'); test('Math.cosh', function(assert){ var cosh; cosh = core.Math.cosh; assert.isFunction(cosh); assert.same(cosh(NaN), NaN); assert.strictEqual(cosh(0), 1); assert.strictEqual(cosh(-0), 1); assert.strictEqual(cosh(Infinity), Infinity); assert.strictEqual(cosh(-Infinity), Infinity); assert.epsilon(cosh(12), 81377.39571257407, 3e-11); assert.epsilon(cosh(22), 1792456423.065795780980053377, 1e-5); assert.epsilon(cosh(-10), 11013.23292010332313972137); assert.epsilon(cosh(-23), 4872401723.1244513000, 1e-5); }); }).call(this); // Generated by LiveScript 1.4.0 (function(){ var module, test; module = QUnit.module, test = QUnit.test; module('ES6'); test('Math.expm1', function(assert){ var expm1; expm1 = core.Math.expm1; assert.isFunction(expm1); assert.same(expm1(NaN), NaN); assert.same(expm1(0), 0); assert.same(expm1(-0), -0); assert.strictEqual(expm1(Infinity), Infinity); assert.strictEqual(expm1(-Infinity), -1); assert.epsilon(expm1(10), 22025.465794806718, assert.epsilon(expm1(-10), -0.9999546000702375)); }); }).call(this); // Generated by LiveScript 1.4.0 (function(){ var module, test; module = QUnit.module, test = QUnit.test; module('ES6'); test('Math.fround', function(assert){ var fround, maxFloat32, minFloat32; fround = core.Math.fround; assert.isFunction(fround); assert.same(fround(void 8), NaN); assert.same(fround(NaN), NaN); assert.same(fround(0), 0); assert.same(fround(-0), -0); assert.same(fround(Number.MIN_VALUE), 0); assert.same(fround(-Number.MIN_VALUE), -0); assert.strictEqual(fround(Infinity), Infinity); assert.strictEqual(fround(-Infinity), -Infinity); assert.strictEqual(fround(1.7976931348623157e+308), Infinity); assert.strictEqual(fround(-1.7976931348623157e+308), -Infinity); assert.strictEqual(fround(3.4028235677973366e+38), Infinity); assert.strictEqual(fround(3), 3); assert.strictEqual(fround(-3), -3); maxFloat32 = 3.4028234663852886e+38; minFloat32 = 1.401298464324817e-45; assert.strictEqual(fround(maxFloat32), maxFloat32); assert.strictEqual(fround(-maxFloat32), -maxFloat32); assert.strictEqual(fround(maxFloat32 + Math.pow(2, Math.pow(2, 8 - 1) - 1 - 23 - 2)), maxFloat32); assert.strictEqual(fround(minFloat32), minFloat32); assert.strictEqual(fround(-minFloat32), -minFloat32); assert.same(fround(minFloat32 / 2), 0); assert.same(fround(-minFloat32 / 2), -0); assert.strictEqual(fround(minFloat32 / 2 + Math.pow(2, -202)), minFloat32); assert.strictEqual(fround(-minFloat32 / 2 - Math.pow(2, -202)), -minFloat32); }); }).call(this); // Generated by LiveScript 1.4.0 (function(){ var module, test; module = QUnit.module, test = QUnit.test; module('ES6'); test('Math.hypot', function(assert){ var hypot, sqrt; hypot = core.Math.hypot; sqrt = Math.sqrt; assert.isFunction(hypot); assert.strictEqual(hypot(), 0); assert.strictEqual(hypot(1), 1); assert.same(hypot('', 0), 0); assert.same(hypot(0, ''), 0); assert.strictEqual(hypot(Infinity, 0), Infinity); assert.strictEqual(hypot(-Infinity, 0), Infinity); assert.strictEqual(hypot(0, Infinity), Infinity); assert.strictEqual(hypot(0, -Infinity), Infinity); assert.strictEqual(hypot(Infinity, NaN), Infinity); assert.strictEqual(hypot(NaN, -Infinity), Infinity); assert.same(hypot(NaN, 0), NaN); assert.same(hypot(0, NaN), NaN); assert.same(hypot(0, -0), 0); assert.same(hypot(0, 0), 0); assert.same(hypot(-0, -0), 0); assert.same(hypot(-0, 0), 0); assert.strictEqual(hypot(0, 1), 1); assert.strictEqual(hypot(0, -1), 1); assert.strictEqual(hypot(-0, 1), 1); assert.strictEqual(hypot(-0, -1), 1); assert.same(hypot(0), 0); assert.strictEqual(hypot(1), 1); assert.strictEqual(hypot(2), 2); assert.strictEqual(hypot(0, 0, 1), 1); assert.strictEqual(hypot(0, 1, 0), 1); assert.strictEqual(hypot(1, 0, 0), 1); assert.strictEqual(hypot(2, 3, 4), sqrt(2 * 2 + 3 * 3 + 4 * 4)); assert.strictEqual(hypot(2, 3, 4, 5), sqrt(2 * 2 + 3 * 3 + 4 * 4 + 5 * 5)); assert.epsilon(hypot(66, 66), 93.33809511662427); assert.epsilon(hypot(0.1, 100), 100.0000499999875); assert.strictEqual(hypot(1e+300, 1e+300), 1.4142135623730952e+300); assert.strictEqual(Math.floor(hypot(1e-300, 1e-300) * 1e308), 141421356); assert.strictEqual(hypot(1e+300, 1e+300, 2, 3), 1.4142135623730952e+300); assert.strictEqual(hypot(-3, 4), 5); assert.strictEqual(hypot(3, -4), 5); }); }).call(this); // Generated by LiveScript 1.4.0 (function(){ var module, test; module = QUnit.module, test = QUnit.test; module('ES6'); test('Math.imul', function(assert){ var imul; imul = core.Math.imul; assert.isFunction(imul); assert.same(imul(0, 0), 0); assert.strictEqual(imul(123, 456), 56088); assert.strictEqual(imul(-123, 456), -56088); assert.strictEqual(imul(123, -456), -56088); assert.strictEqual(imul(19088743, 4275878552), 602016552); assert.same(imul(false, 7), 0); assert.same(imul(7, false), 0); assert.same(imul(false, false), 0); assert.strictEqual(imul(true, 7), 7); assert.strictEqual(imul(7, true), 7); assert.strictEqual(imul(true, true), 1); assert.same(imul(void 8, 7), 0); assert.same(imul(7, void 8), 0); assert.same(imul(void 8, void 8), 0); assert.same(imul('str', 7), 0); assert.same(imul(7, 'str'), 0); assert.same(imul({}, 7), 0); assert.same(imul(7, {}), 0); assert.same(imul([], 7), 0); assert.same(imul(7, []), 0); assert.strictEqual(imul(0xffffffff, 5), -5); assert.strictEqual(imul(0xfffffffe, 5), -10); assert.strictEqual(imul(2, 4), 8); assert.strictEqual(imul(-1, 8), -8); assert.strictEqual(imul(-2, -2), 4); assert.same(imul(-0, 7), 0); assert.same(imul(7, -0), 0); assert.same(imul(0.1, 7), 0); assert.same(imul(7, 0.1), 0); assert.same(imul(0.9, 7), 0); assert.same(imul(7, 0.9), 0); assert.strictEqual(imul(1.1, 7), 7); assert.strictEqual(imul(7, 1.1), 7); assert.strictEqual(imul(1.9, 7), 7); assert.strictEqual(imul(7, 1.9), 7); }); }).call(this); // Generated by LiveScript 1.4.0 (function(){ var module, test; module = QUnit.module, test = QUnit.test; module('ES6'); test('Math.log10', function(assert){ var log10; log10 = core.Math.log10; assert.isFunction(log10); assert.same(log10(''), log10(0)); assert.same(log10(NaN), NaN); assert.same(log10(-1), NaN); assert.same(log10(0), -Infinity); assert.same(log10(-0), -Infinity); assert.same(log10(1), 0); assert.same(log10(Infinity), Infinity); assert.epsilon(log10(0.1), -1); assert.epsilon(log10(0.5), -0.3010299956639812); assert.epsilon(log10(1.5), 0.17609125905568124); assert.epsilon(log10(5), 0.6989700043360189); assert.epsilon(log10(50), 1.6989700043360187); }); }).call(this); // Generated by LiveScript 1.4.0 (function(){ var module, test; module = QUnit.module, test = QUnit.test; module('ES6'); test('Math.log1p', function(assert){ var log1p; log1p = core.Math.log1p; assert.isFunction(log1p); assert.same(log1p(''), log1p(0)); assert.same(log1p(NaN), NaN); assert.same(log1p(-2), NaN); assert.same(log1p(-1), -Infinity); assert.same(log1p(0), 0); assert.same(log1p(-0), -0); assert.same(log1p(Infinity), Infinity); assert.epsilon(log1p(5), 1.791759469228055); assert.epsilon(log1p(50), 3.9318256327243257); }); }).call(this); // Generated by LiveScript 1.4.0 (function(){ var module, test; module = QUnit.module, test = QUnit.test; module('ES6'); test('Math.log2', function(assert){ var log2; log2 = core.Math.log2; assert.isFunction(log2); assert.same(log2(''), log2(0)); assert.same(log2(NaN), NaN); assert.same(log2(-1), NaN); assert.same(log2(0), -Infinity); assert.same(log2(-0), -Infinity); assert.same(log2(1), 0); assert.same(log2(Infinity), Infinity); assert.same(log2(0.5), -1); assert.same(log2(32), 5); assert.epsilon(log2(5), 2.321928094887362); }); }).call(this); // Generated by LiveScript 1.4.0 (function(){ var module, test; module = QUnit.module, test = QUnit.test; module('ES6'); test('Math.sign', function(assert){ var sign; sign = core.Math.sign; assert.isFunction(sign); assert.same(sign(NaN), NaN); assert.same(sign(), NaN); assert.same(sign(-0), -0); assert.same(sign(0), 0); assert.strictEqual(sign(Infinity), 1); assert.strictEqual(sign(-Infinity), -1); assert.strictEqual(sign(13510798882111488), 1); assert.strictEqual(sign(-13510798882111488), -1); assert.strictEqual(sign(42.5), 1); assert.strictEqual(sign(-42.5), -1); }); }).call(this); // Generated by LiveScript 1.4.0 (function(){ var module, test; module = QUnit.module, test = QUnit.test; module('ES6'); test('Math.sinh', function(assert){ var sinh; sinh = core.Math.sinh; assert.isFunction(sinh); assert.same(sinh(NaN), NaN); assert.same(sinh(0), 0); assert.same(sinh(-0), -0); assert.strictEqual(sinh(Infinity), Infinity); assert.strictEqual(sinh(-Infinity), -Infinity); assert.epsilon(sinh(-5), -74.20321057778875); assert.epsilon(sinh(2), 3.6268604078470186); assert.strictEqual(sinh(-2e-17), -2e-17); }); }).call(this); // Generated by LiveScript 1.4.0 (function(){ var module, test; module = QUnit.module, test = QUnit.test; module('ES6'); test('Math.tanh', function(assert){ var tanh; tanh = core.Math.tanh; assert.isFunction(tanh); assert.same(tanh(NaN), NaN); assert.same(tanh(0), 0); assert.same(tanh(-0), -0); assert.strictEqual(tanh(Infinity), 1); assert.strictEqual(tanh(90), 1); assert.epsilon(tanh(10), 0.9999999958776927); }); }).call(this); // Generated by LiveScript 1.4.0 (function(){ var module, test; module = QUnit.module, test = QUnit.test; module('ES6'); test('Math.trunc', function(assert){ var trunc; trunc = core.Math.trunc; assert.isFunction(trunc); assert.same(trunc(NaN), NaN, 'NaN -> NaN'); assert.same(trunc(-0), -0, '-0 -> -0'); assert.same(trunc(0), 0, '0 -> 0'); assert.same(trunc(Infinity), Infinity, 'Infinity -> Infinity'); assert.same(trunc(-Infinity), -Infinity, '-Infinity -> -Infinity'); assert.same(trunc(null), 0, 'null -> 0'); assert.same(trunc({}), NaN, '{} -> NaN'); assert.strictEqual(trunc([]), 0, '[] -> 0'); assert.strictEqual(trunc(1.01), 1, '1.01 -> 0'); assert.strictEqual(trunc(1.99), 1, '1.99 -> 0'); assert.strictEqual(trunc(-1), -1, '-1 -> -1'); assert.strictEqual(trunc(-1.99), -1, '-1.99 -> -1'); assert.strictEqual(trunc(-555.555), -555, '-555.555 -> -555'); assert.strictEqual(trunc(0x20000000000001), 0x20000000000001, '0x20000000000001 -> 0x20000000000001'); assert.strictEqual(trunc(-0x20000000000001), -0x20000000000001, '-0x20000000000001 -> -0x20000000000001'); }); }).call(this); // Generated by LiveScript 1.4.0 (function(){ var module, test; module = QUnit.module, test = QUnit.test; module('ES6'); test('Number.EPSILON', function(assert){ var EPSILON; EPSILON = core.Number.EPSILON; assert.ok('EPSILON' in core.Number, 'EPSILON in Number'); assert.strictEqual(EPSILON, Math.pow(2, -52), 'Is 2^-52'); assert.ok(1 !== 1 + EPSILON, '1 isnt 1 + EPSILON'); assert.strictEqual(1, 1 + EPSILON / 2, '1 is 1 + EPSILON / 2'); }); }).call(this); // Generated by LiveScript 1.4.0 (function(){ var module, test; module = QUnit.module, test = QUnit.test; module('ES6'); test('Number.isFinite', function(assert){ var isFinite, create, i$, x$, ref$, len$, y$, e; isFinite = core.Number.isFinite; create = core.Object.create; assert.isFunction(isFinite); for (i$ = 0, len$ = (ref$ = [1, 0.1, -1, Math.pow(2, 16), Math.pow(2, 16) - 1, Math.pow(2, 31), Math.pow(2, 31) - 1, Math.pow(2, 32), Math.pow(2, 32) - 1, -0]).length; i$ < len$; ++i$) { x$ = ref$[i$]; assert.ok(isFinite(x$), "isFinite " + typeof x$ + " " + x$); } for (i$ = 0, len$ = (ref$ = [NaN, Infinity, 'NaN', '5', false, new Number(NaN), new Number(Infinity), new Number(5), new Number(0.1), void 8, null, {}, fn$, create(null)]).length; i$ < len$; ++i$) { y$ = ref$[i$]; assert.ok(!isFinite(y$), "not isFinite " + typeof y$ + " " + (fn1$())); } function fn$(){} function fn1$(){ try { return String(y$); } catch (e$) { e = e$; return 'Object.create(null)'; } } }); }).call(this); // Generated by LiveScript 1.4.0 (function(){ var module, test; module = QUnit.module, test = QUnit.test; module('ES6'); test('Number.isInteger', function(assert){ var isInteger, create, i$, x$, ref$, len$, y$, e; isInteger = core.Number.isInteger; create = core.Object.create; assert.isFunction(isInteger); for (i$ = 0, len$ = (ref$ = [1, -1, Math.pow(2, 16), Math.pow(2, 16) - 1, Math.pow(2, 31), Math.pow(2, 31) - 1, Math.pow(2, 32), Math.pow(2, 32) - 1, -0]).length; i$ < len$; ++i$) { x$ = ref$[i$]; assert.ok(isInteger(x$), "isInteger " + typeof x$ + " " + x$); } for (i$ = 0, len$ = (ref$ = [NaN, 0.1, Infinity, 'NaN', '5', false, new Number(NaN), new Number(Infinity), new Number(5), new Number(0.1), void 8, null, {}, fn$, create(null)]).length; i$ < len$; ++i$) { y$ = ref$[i$]; assert.ok(!isInteger(y$), "not isInteger " + typeof y$ + " " + (fn1$())); } function fn$(){} function fn1$(){ try { return String(y$); } catch (e$) { e = e$; return 'Object.create(null)'; } } }); }).call(this); // Generated by LiveScript 1.4.0 (function(){ var module, test; module = QUnit.module, test = QUnit.test; module('ES6'); test('Number.isNaN', function(assert){ var isNaN, create, i$, x$, ref$, len$, e; isNaN = core.Number.isNaN; create = core.Object.create; assert.isFunction(isNaN); assert.ok(isNaN(NaN), 'Number.isNaN NaN'); for (i$ = 0, len$ = (ref$ = [1, 0.1, -1, Math.pow(2, 16), Math.pow(2, 16) - 1, Math.pow(2, 31), Math.pow(2, 31) - 1, Math.pow(2, 32), Math.pow(2, 32) - 1, -0, Infinity, 'NaN', '5', false, new Number(NaN), new Number(Infinity), new Number(5), new Number(0.1), void 8, null, {}, fn$, create(null)]).length; i$ < len$; ++i$) { x$ = ref$[i$]; assert.ok(!isNaN(x$), "not Number.isNaN " + typeof x$ + " " + (fn1$())); } function fn$(){} function fn1$(){ try { return String(x$); } catch (e$) { e = e$; return 'Object.create(null)'; } } }); }).call(this); // Generated by LiveScript 1.4.0 (function(){ var module, test; module = QUnit.module, test = QUnit.test; module('ES6'); test('Number.isSafeInteger', function(assert){ var isSafeInteger, create, i$, x$, ref$, len$, y$, e; isSafeInteger = core.Number.isSafeInteger; create = core.Object.create; assert.isFunction(isSafeInteger); for (i$ = 0, len$ = (ref$ = [1, -1, Math.pow(2, 16), Math.pow(2, 16) - 1, Math.pow(2, 31), Math.pow(2, 31) - 1, Math.pow(2, 32), Math.pow(2, 32) - 1, -0, 9007199254740991, -9007199254740991]).length; i$ < len$; ++i$) { x$ = ref$[i$]; assert.ok(isSafeInteger(x$), "isSafeInteger " + typeof x$ + " " + x$); } for (i$ = 0, len$ = (ref$ = [9007199254740992, -9007199254740992, NaN, 0.1, Infinity, 'NaN', '5', false, new Number(NaN), new Number(Infinity), new Number(5), new Number(0.1), void 8, null, {}, fn$, create(null)]).length; i$ < len$; ++i$) { y$ = ref$[i$]; assert.ok(!isSafeInteger(y$), "not isSafeInteger " + typeof y$ + " " + (fn1$())); } function fn$(){} function fn1$(){ try { return String(y$); } catch (e$) { e = e$; return 'Object.create(null)'; } } }); }).call(this); // Generated by LiveScript 1.4.0 (function(){ var module, test; module = QUnit.module, test = QUnit.test; module('ES6'); test('Number.MAX_SAFE_INTEGER', function(assert){ assert.strictEqual(core.Number.MAX_SAFE_INTEGER, Math.pow(2, 53) - 1, 'Is 2^53 - 1'); }); }).call(this); // Generated by LiveScript 1.4.0 (function(){ var module, test; module = QUnit.module, test = QUnit.test; module('ES6'); test('Number.MIN_SAFE_INTEGER', function(assert){ assert.strictEqual(core.Number.MIN_SAFE_INTEGER, -Math.pow(2, 53) + 1, 'Is -2^53 + 1'); }); }).call(this); // Generated by LiveScript 1.4.0 (function(){ var module, test; module = QUnit.module, test = QUnit.test; module('ES6'); test('Number.parseFloat', function(assert){ var parseFloat, ws; parseFloat = core.Number.parseFloat; assert.isFunction(parseFloat); assert.arity(parseFloat, 1); assert.same(parseFloat, core.parseFloat); assert.same(parseFloat('0'), 0); assert.same(parseFloat(' 0'), 0); assert.same(parseFloat('+0'), 0); assert.same(parseFloat(' +0'), 0); assert.same(parseFloat('-0'), -0); assert.same(parseFloat(' -0'), -0); ws = '\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u180E\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF'; assert.same(parseFloat(ws + '+0'), 0); assert.same(parseFloat(ws + '-0'), -0); assert.same(parseFloat(null), NaN); assert.same(parseFloat(void 8), NaN); }); }).call(this); // Generated by LiveScript 1.4.0 (function(){ var module, test; module = QUnit.module, test = QUnit.test; module('ES6'); test('Number.parseInt', function(assert){ var parseInt, i$, r, x$, ref$, len$, ws, fakeZero; parseInt = core.Number.parseInt; assert.isFunction(parseInt); assert.arity(parseInt, 2); assert.same(parseInt, core.parseInt); for (i$ = 2; i$ <= 36; ++i$) { r = i$; assert.same(parseInt('10', r), r, "radix " + r); } for (i$ = 0, len$ = (ref$ = ['01', '08', '10', '42']).length; i$ < len$; ++i$) { x$ = ref$[i$]; assert.same(parseInt(x$), parseInt(x$, 10), "default radix is 10: " + x$); } assert.same(parseInt('0x16'), parseInt('0x16', 16), "default radix is 16: 0x16"); ws = '\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u180E\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF'; assert.same(parseInt(' 0x16'), parseInt('0x16', 16), 'ignores leading whitespace #1'); assert.same(parseInt(' 42'), parseInt('42', 10), 'ignores leading whitespace #2'); assert.same(parseInt(' 08'), parseInt('08', 10), 'ignores leading whitespace #3'); assert.same(parseInt(ws + '08'), parseInt('08', 10), 'ignores leading whitespace #4'); assert.same(parseInt(ws + '0x16'), parseInt('0x16', 16), 'ignores leading whitespace #5'); fakeZero = { valueOf: function(){ return 0; } }; assert.same(parseInt('08', fakeZero), parseInt('08', 10), 'valueOf #1'); assert.same(parseInt('0x16', fakeZero), parseInt('0x16', 16), 'valueOf #2'); assert.same(parseInt('-0xF'), -15, 'signed hex #1'); assert.same(parseInt('-0xF', 16), -15, 'signed hex #2'); assert.same(parseInt('+0xF'), 15, 'signed hex #3'); assert.same(parseInt('+0xF', 16), 15, 'signed hex #4'); assert.same(parseInt('10', -4294967294), 2, 'radix uses ToUint32'); assert.same(parseInt(null), NaN); assert.same(parseInt(void 8), NaN); }); }).call(this); // Generated by LiveScript 1.4.0 (function(){ var module, test; module = QUnit.module, test = QUnit.test; module('ES6'); test('Number#toFixed', function(assert){ var toFixed; toFixed = core.Number.toFixed; assert.isFunction(toFixed); assert.same(toFixed(0.00008, 3), '0.000'); assert.same(toFixed(0.9, 0), '1'); assert.same(toFixed(1.255, 2), '1.25'); assert.same(toFixed(1843654265.0774949, 5), '1843654265.07749'); assert.same(toFixed(1000000000000000128, 0), '1000000000000000128'); assert.same(toFixed(1), '1'); assert.same(toFixed(1, 0), '1'); assert.same(toFixed(1, 1), '1.0'); assert.same(toFixed(1, 1.1), '1.0'); assert.same(toFixed(1, 0.9), '1'); assert.same(toFixed(1, '0'), '1'); assert.same(toFixed(1, '1'), '1.0'); assert.same(toFixed(1, '1.1'), '1.0'); assert.same(toFixed(1, '0.9'), '1'); assert.same(toFixed(1, NaN), '1'); assert.same(toFixed(1, 'some string'), '1'); assert.same((function(){ try { return toFixed(1, -0.1); } catch (e$) {} }()), '1'); assert.same(toFixed(Object(1)), '1'); assert.same(toFixed(Object(1), 0), '1'); assert.same(toFixed(Object(1), 1), '1.0'); assert.same(toFixed(Object(1), 1.1), '1.0'); assert.same(toFixed(Object(1), 0.9), '1'); assert.same(toFixed(Object(1), '0'), '1'); assert.same(toFixed(Object(1), '1'), '1.0'); assert.same(toFixed(Object(1), '1.1'), '1.0'); assert.same(toFixed(Object(1), '0.9'), '1'); assert.same(toFixed(Object(1), NaN), '1'); assert.same(toFixed(Object(1), 'some string'), '1'); assert.same((function(){ try { return toFixed(Object(1), -0.1); } catch (e$) {} }()), '1'); assert.same(toFixed(NaN), 'NaN'); assert.same(toFixed(NaN, 0), 'NaN'); assert.same(toFixed(NaN, 1), 'NaN'); assert.same(toFixed(NaN, 1.1), 'NaN'); assert.same(toFixed(NaN, 0.9), 'NaN'); assert.same(toFixed(NaN, '0'), 'NaN'); assert.same(toFixed(NaN, '1'), 'NaN'); assert.same(toFixed(NaN, '1.1'), 'NaN'); assert.same(toFixed(NaN, '0.9'), 'NaN'); assert.same(toFixed(NaN, NaN), 'NaN'); assert.same(toFixed(NaN, 'some string'), 'NaN'); assert.same((function(){ try { return toFixed(NaN, -0.1); } catch (e$) {} }()), 'NaN'); assert.same(toFixed(1e21), String(1e21)); assert.same(toFixed(1e21, 0), String(1e21)); assert.same(toFixed(1e21, 1), String(1e21)); assert.same(toFixed(1e21, 1.1), String(1e21)); assert.same(toFixed(1e21, 0.9), String(1e21)); assert.same(toFixed(1e21, '0'), String(1e21)); assert.same(toFixed(1e21, '1'), String(1e21)); assert.same(toFixed(1e21, '1.1'), String(1e21)); assert.same(toFixed(1e21, '0.9'), String(1e21)); assert.same(toFixed(1e21, NaN), String(1e21)); assert.same(toFixed(1e21, 'some string'), String(1e21)); assert.same((function(){ try { return toFixed(1e21, -0.1); } catch (e$) {} }()), String(1e21)); assert.throws(function(){ toFixed(1, -101); }, RangeError, 'If f < 0 or f > 20, throw a RangeError exception.'); assert.throws(function(){ toFixed(1, 101); }, RangeError, 'If f < 0 or f > 20, throw a RangeError exception.'); assert.throws(function(){ toFixed(NaN, Infinity); }, RangeError, 'If f < 0 or f > 20, throw a RangeError exception.'); assert.throws(function(){ toFixed({}, 1); }, TypeError, '? thisNumberValue(this value)'); assert.throws(function(){ toFixed('123', 1); }, TypeError, '? thisNumberValue(this value)'); assert.throws(function(){ toFixed(false, 1); }, TypeError, '? thisNumberValue(this value)'); assert.throws(function(){ toFixed(null, 1); }, TypeError, '? thisNumberValue(this value)'); assert.throws(function(){ toFixed(void 8, 1); }, TypeError, '? thisNumberValue(this value)'); }); }).call(this); // Generated by LiveScript 1.4.0 (function(){ var module, test; module = QUnit.module, test = QUnit.test; module('ES6'); test('Number#toPrecision', function(assert){ var toPrecision; toPrecision = core.Number.toPrecision; assert.isFunction(toPrecision); assert.same(toPrecision(0.00008, 3), '0.0000800', '0.00008.toPrecision(3)'); assert.same(toPrecision(1.255, 2), '1.3', '1.255.toPrecision(2)'); assert.same(toPrecision(1843654265.0774949, 13), '1843654265.077', '1843654265.0774949.toPrecision(13)'); assert.same(toPrecision(NaN, 1), 'NaN', 'If x is NaN, return the String "NaN".'); assert.same(toPrecision(123.456), '123.456', 'If precision is undefined, return ! ToString(x).'); assert.same(toPrecision(123.456, void 8), '123.456', 'If precision is undefined, return ! ToString(x).'); assert.throws(function(){ toPrecision(0.9, 0); }, RangeError, 'If p < 1 or p > 21, throw a RangeError exception.'); assert.throws(function(){ toPrecision(0.9, 101); }, RangeError, 'If p < 1 or p > 21, throw a RangeError exception.'); assert.throws(function(){ toPrecision({}, 1); }, TypeError, '? thisNumberValue(this value)'); assert.throws(function(){ toPrecision('123', 1); }, TypeError, '? thisNumberValue(this value)'); assert.throws(function(){ toPrecision(false, 1); }, TypeError, '? thisNumberValue(this value)'); assert.throws(function(){ toPrecision(null, 1); }, TypeError, '? thisNumberValue(this value)'); assert.throws(function(){ toPrecision(void 8, 1); }, TypeError, '? thisNumberValue(this value)'); }); }).call(this); // Generated by LiveScript 1.4.0 (function(){ var module, test; module = QUnit.module, test = QUnit.test; module('ES6'); test('Object.assign', function(assert){ var ref$, assign, keys, defineProperty, foo, str, c, d, D, O, string, i$, x$, len$; ref$ = core.Object, assign = ref$.assign, keys = ref$.keys, defineProperty = ref$.defineProperty; assert.isFunction(assign); foo = { q: 1 }; assert.strictEqual(foo, assign(foo, { bar: 2 }), 'assign return target'); assert.strictEqual(foo.bar, 2, 'assign define properties'); assert.deepEqual(assign({}, { q: 1 }, { w: 2 }), { q: 1, w: 2 }); assert.deepEqual(assign({}, 'qwe'), { 0: 'q', 1: 'w', 2: 'e' }); assert.throws(function(){ assign(null, { q: 1 }); }, TypeError); assert.throws(function(){ assign(void 8, { q: 1 }); }, TypeError); str = assign('qwe', { q: 1 }); assert.strictEqual(typeof str, 'object'); assert.strictEqual(String(str), 'qwe'); assert.strictEqual(str.q, 1); if (DESCRIPTORS) { foo = { baz: 1 }; assign(foo, defineProperty({}, 'bar', { get: function(){ return this.baz + 1; } })); assert.ok(foo.bar === void 8, "assign don't copy descriptors"); c = core.Symbol('c'); d = core.Symbol('d'); D = (ref$ = { a: 'a' }, ref$[c] = 'c', ref$); defineProperty(D, 'b', { value: 'b' }); defineProperty(D, d, { value: 'd' }); O = assign({}, D); assert.strictEqual(O.a, 'a', 'a'); assert.strictEqual(O.b, void 8, 'b'); assert.strictEqual(O[c], 'c', 'c'); assert.strictEqual(O[d], void 8, 'd'); try { assert.strictEqual(Function('return core.Object.assign({b: 1}, {get a(){delete this.b;},b: 2})')().b, 1); } catch (e$) {} try { assert.strictEqual(Function('return core.Object.assign({b: 1}, {get a(){Object.defineProperty(this, "b", {value:4,enumerable:false});},b: 2})')().b, 1); } catch (e$) {} } string = 'abcdefghijklmnopqrst'; O = {}; for (i$ = 0, len$ = (ref$ = string.split('')).length; i$ < len$; ++i$) { x$ = ref$[i$]; O[x$] = x$; } assert.strictEqual(keys(assign({}, O)).join(''), string); }); }).call(this); // Generated by LiveScript 1.4.0 (function(){ var module, test; module = QUnit.module, test = QUnit.test; module('ES6'); test('Object.create', function(assert){ var ref$, create, getPrototypeOf, getOwnPropertyNames, isObject, isPrototype, getPropertyNames, obj, fn; ref$ = core.Object, create = ref$.create, getPrototypeOf = ref$.getPrototypeOf, getOwnPropertyNames = ref$.getOwnPropertyNames; isObject = function(it){ return it === Object(it); }; isPrototype = function(a, b){ return {}.isPrototypeOf.call(a, b); }; getPropertyNames = function(object){ var result, i$, x$, ref$, len$; result = getOwnPropertyNames(object); while (object = getPrototypeOf(object)) { for (i$ = 0, len$ = (ref$ = getOwnPropertyNames(object)).length; i$ < len$; ++i$) { x$ = ref$[i$]; in$(x$, result) || result.push(x$); } } return result; }; assert.isFunction(create); assert.arity(create, 2); assert.ok(isPrototype(obj = { q: 1 }, create(obj))); assert.ok(create(obj).q === 1); fn = function(){ return this.a = 1; }; assert.ok(create(new fn) instanceof fn); assert.ok(fn.prototype === getPrototypeOf(getPrototypeOf(create(new fn)))); assert.ok(create(new fn).a === 1); assert.ok(create({}, { a: { value: 42 } }).a === 42); assert.ok(isObject(obj = create(null, { w: { value: 2 } }))); assert.ok(!('toString' in obj)); assert.ok(obj.w === 2); assert.deepEqual(getPropertyNames(create(null)), []); }); function in$(x, xs){ var i = -1, l = xs.length >>> 0; while (++i < l) if (x === xs[i]) return true; return false; } }).call(this); // Generated by LiveScript 1.4.0 (function(){ var module, test; module = QUnit.module, test = QUnit.test; module('ES6'); test('Object.defineProperties', function(assert){ var defineProperties, rez, src; defineProperties = core.Object.defineProperties; assert.isFunction(defineProperties); assert.arity(defineProperties, 2); assert.ok((rez = defineProperties(src = {}, { q: { value: 42 }, w: { value: 33 } })) === src); assert.ok(rez.q === 42) && rez.w === 33; }); }).call(this); // Generated by LiveScript 1.4.0 (function(){ var module, test; module = QUnit.module, test = QUnit.test; module('ES6'); test('Object.defineProperty', function(assert){ var ref$, defineProperty, create, rez, src; ref$ = core.Object, defineProperty = ref$.defineProperty, create = ref$.create; assert.isFunction(defineProperty); assert.arity(defineProperty, 3); assert.ok((rez = defineProperty(src = {}, 'q', { value: 42 })) === src); assert.ok(rez.q === 42); assert.throws(function(){ defineProperty(42, 1, {}); }); assert.throws(function(){ defineProperty({}, create(null), {}); }); assert.throws(function(){ defineProperty({}, 1, 1); }); }); }).call(this); // Generated by LiveScript 1.4.0 (function(){ var module, test, toString$ = {}.toString; module = QUnit.module, test = QUnit.test; module('ES6'); test('Object.freeze', function(assert){ var ref$, freeze, keys, getOwnPropertyNames, getOwnPropertySymbols, ownKeys, i$, len$, value, key; ref$ = core.Object, freeze = ref$.freeze, keys = ref$.keys, getOwnPropertyNames = ref$.getOwnPropertyNames, getOwnPropertySymbols = ref$.getOwnPropertySymbols; ownKeys = core.Reflect.ownKeys; assert.isFunction(freeze); assert.arity(freeze, 1); for (i$ = 0, len$ = (ref$ = [42, 'foo', false, null, void 8, {}]).length; i$ < len$; ++i$) { value = ref$[i$]; assert.ok((fn$()), "accept " + toString$.call(value).slice(8, -1)); assert.same(freeze(value), value, "returns target on " + toString$.call(value).slice(8, -1)); } assert.arrayEqual((function(){ var results$ = []; for (key in freeze({})) { results$.push(key); } return results$; }()), []); assert.arrayEqual(keys(freeze({})), []); assert.arrayEqual(getOwnPropertyNames(freeze({})), []); assert.arrayEqual(getOwnPropertySymbols(freeze({})), []); assert.arrayEqual(ownKeys(freeze({})), []); function fn$(){ try { freeze(value); return true; } catch (e$) {} } }); }).call(this); // Generated by LiveScript 1.4.0 (function(){ var module, test, toString$ = {}.toString; module = QUnit.module, test = QUnit.test; module('ES6'); test('Object.getOwnPropertyDescriptor', function(assert){ var getOwnPropertyDescriptor, i$, ref$, len$, value; getOwnPropertyDescriptor = core.Object.getOwnPropertyDescriptor; assert.isFunction(getOwnPropertyDescriptor); assert.arity(getOwnPropertyDescriptor, 2); assert.deepEqual(getOwnPropertyDescriptor({ q: 42 }, 'q'), { writable: true, enumerable: true, configurable: true, value: 42 }); assert.ok(getOwnPropertyDescriptor({}, 'toString') === void 8); for (i$ = 0, len$ = (ref$ = [42, 'foo', false]).length; i$ < len$; ++i$) { value = ref$[i$]; assert.ok((fn$()), "accept " + toString$.call(value).slice(8, -1)); } for (i$ = 0, len$ = (ref$ = [null, void 8]).length; i$ < len$; ++i$) { value = ref$[i$]; assert.throws(fn1$, TypeError, "throws on " + value); } function fn$(){ try { getOwnPropertyDescriptor(value); return true; } catch (e$) {} } function fn1$(){ getOwnPropertyDescriptor(value); } }); }).call(this); // Generated by LiveScript 1.4.0 (function(){ var module, test, toString$ = {}.toString; module = QUnit.module, test = QUnit.test; module('ES6'); test('Object.getOwnPropertyNames', function(assert){ var getOwnPropertyNames, fn1, fn2, names, i$, ref$, len$, value, iframe, w; getOwnPropertyNames = core.Object.getOwnPropertyNames; assert.isFunction(getOwnPropertyNames); assert.arity(getOwnPropertyNames, 1); fn1 = function(w){ this.w = w != null ? w : 2; }; fn2 = function(toString){ this.toString = toString != null ? toString : 2; }; fn1.prototype.q = fn2.prototype.q = 1; names = getOwnPropertyNames([1, 2, 3]); assert.strictEqual(names.length, 4); assert.ok(in$('0', names)); assert.ok(in$('1', names)); assert.ok(in$('2', names)); assert.ok(in$('length', names)); assert.deepEqual(getOwnPropertyNames(new fn1(1)), ['w']); assert.deepEqual(getOwnPropertyNames(new fn2(1)), ['toString']); assert.ok(in$('toString', getOwnPropertyNames(Array.prototype))); assert.ok(in$('toString', getOwnPropertyNames(Object.prototype))); assert.ok(in$('constructor', getOwnPropertyNames(Object.prototype))); for (i$ = 0, len$ = (ref$ = [42, 'foo', false]).length; i$ < len$; ++i$) { value = ref$[i$]; assert.ok((fn$()), "accept " + toString$.call(value).slice(8, -1)); } for (i$ = 0, len$ = (ref$ = [null, void 8]).length; i$ < len$; ++i$) { value = ref$[i$]; assert.throws(fn1$, TypeError, "throws on " + value); } if (typeof document != 'undefined' && document !== null) { assert.ok((function(){ try { iframe = document.createElement('iframe'); iframe.src = 'http://example.com'; document.documentElement.appendChild(iframe); w = iframe.contentWindow; document.documentElement.removeChild(iframe); return getOwnPropertyNames(w); } catch (e$) {} }()), 'IE11 bug with iframe and window'); } function fn$(){ try { getOwnPropertyNames(value); return true; } catch (e$) {} } function fn1$(){ getOwnPropertyNames(value); } }); function in$(x, xs){ var i = -1, l = xs.length >>> 0; while (++i < l) if (x === xs[i]) return true; return false; } }).call(this); // Generated by LiveScript 1.4.0 (function(){ var module, test, toString$ = {}.toString; module = QUnit.module, test = QUnit.test; module('ES6'); test('Object.getPrototypeOf', function(assert){ var ref$, create, getPrototypeOf, fn, obj, foo, bar, i$, len$, value; ref$ = core.Object, create = ref$.create, getPrototypeOf = ref$.getPrototypeOf; assert.isFunction(getPrototypeOf); assert.arity(getPrototypeOf, 1); assert.ok(getPrototypeOf({}) === Object.prototype); assert.ok(getPrototypeOf([]) === Array.prototype); assert.ok(getPrototypeOf(new (fn = (function(){ fn.displayName = 'fn'; var prototype = fn.prototype, constructor = fn; function fn(){} return fn; }()))) === fn.prototype); assert.ok(getPrototypeOf(create(obj = { q: 1 })) === obj); assert.ok(getPrototypeOf(create(null)) === null); assert.ok(getPrototypeOf(getPrototypeOf({})) === null); foo = function(){}; foo.prototype.foo = 'foo'; bar = function(){}; bar.prototype = create(foo.prototype); bar.prototype.constructor = bar; assert.strictEqual(getPrototypeOf(bar.prototype).foo, 'foo'); for (i$ = 0, len$ = (ref$ = [42, 'foo', false]).length; i$ < len$; ++i$) { value = ref$[i$]; assert.ok((fn$()), "accept " + toString$.call(value).slice(8, -1)); } for (i$ = 0, len$ = (ref$ = [null, void 8]).length; i$ < len$; ++i$) { value = ref$[i$]; assert.throws(fn1$, TypeError, "throws on " + value); } assert.strictEqual(getPrototypeOf('foo'), String.prototype); function fn$(){ try { getPrototypeOf(value); return true; } catch (e$) {} } function fn1$(){ getPrototypeOf(value); } }); }).call(this); // Generated by LiveScript 1.4.0 (function(){ var module, test, toString$ = {}.toString; module = QUnit.module, test = QUnit.test; module('ES6'); test('Object.isExtensible', function(assert){ var isExtensible, i$, ref$, len$, value; isExtensible = core.Object.isExtensible; assert.isFunction(isExtensible); assert.arity(isExtensible, 1); for (i$ = 0, len$ = (ref$ = [42, 'foo', false, null, void 8]).length; i$ < len$; ++i$) { value = ref$[i$]; assert.ok((fn$()), "accept " + toString$.call(value).slice(8, -1)); assert.same(isExtensible(value), false, "returns true on " + toString$.call(value).slice(8, -1)); } assert.same(isExtensible({}), true); function fn$(){ try { isExtensible(value); return true; } catch (e$) {} } }); }).call(this); // Generated by LiveScript 1.4.0 (function(){ var module, test, toString$ = {}.toString; module = QUnit.module, test = QUnit.test; module('ES6'); test('Object.isFrozen', function(assert){ var isFrozen, i$, ref$, len$, value; isFrozen = core.Object.isFrozen; assert.isFunction(isFrozen); assert.arity(isFrozen, 1); for (i$ = 0, len$ = (ref$ = [42, 'foo', false, null, void 8]).length; i$ < len$; ++i$) { value = ref$[i$]; assert.ok((fn$()), "accept " + toString$.call(value).slice(8, -1)); assert.same(isFrozen(value), true, "returns true on " + toString$.call(value).slice(8, -1)); } assert.same(isFrozen({}), false); function fn$(){ try { isFrozen(value); return true; } catch (e$) {} } }); }).call(this); // Generated by LiveScript 1.4.0 (function(){ var module, test, toString$ = {}.toString; module = QUnit.module, test = QUnit.test; module('ES6'); test('Object.isSealed', function(assert){ var isSealed, i$, ref$, len$, value; isSealed = core.Object.isSealed; assert.isFunction(isSealed); assert.arity(isSealed, 1); for (i$ = 0, len$ = (ref$ = [42, 'foo', false, null, void 8]).length; i$ < len$; ++i$) { value = ref$[i$]; assert.ok((fn$()), "accept " + toString$.call(value).slice(8, -1)); assert.same(isSealed(value), true, "returns true on " + toString$.call(value).slice(8, -1)); } assert.same(isSealed({}), false); function fn$(){ try { isSealed(value); return true; } catch (e$) {} } }); }).call(this); // Generated by LiveScript 1.4.0 (function(){ var module, test; module = QUnit.module, test = QUnit.test; module('ES6'); test('Object.is', function(assert){ var same; same = core.Object.is; assert.isFunction(same); assert.ok(same(1, 1), '1 is 1'); assert.ok(same(NaN, NaN), '1 is 1'); assert.ok(!same(0, -0), '0 isnt -0'); assert.ok(!same({}, {}), '{} isnt {}'); }); }).call(this); // Generated by LiveScript 1.4.0 (function(){ var module, test, toString$ = {}.toString; module = QUnit.module, test = QUnit.test; module('ES6'); test('Object.keys', function(assert){ var keys, fn1, fn2, i$, ref$, len$, value; keys = core.Object.keys; assert.isFunction(keys); assert.arity(keys, 1); fn1 = function(w){ this.w = w != null ? w : 2; }; fn2 = function(toString){ this.toString = toString != null ? toString : 2; }; fn1.prototype.q = fn2.prototype.q = 1; assert.deepEqual(keys([1, 2, 3]), ['0', '1', '2']); assert.deepEqual(keys(new fn1(1)), ['w']); assert.deepEqual(keys(new fn2(1)), ['toString']); assert.ok(!in$('push', keys(Array.prototype))); for (i$ = 0, len$ = (ref$ = [42, 'foo', false]).length; i$ < len$; ++i$) { value = ref$[i$]; assert.ok((fn$()), "accept " + toString$.call(value).slice(8, -1)); } for (i$ = 0, len$ = (ref$ = [null, void 8]).length; i$ < len$; ++i$) { value = ref$[i$]; assert.throws(fn1$, TypeError, "throws on " + value); } function fn$(){ try { keys(value); return true; } catch (e$) {} } function fn1$(){ keys(value); } }); function in$(x, xs){ var i = -1, l = xs.length >>> 0; while (++i < l) if (x === xs[i]) return true; return false; } }).call(this); // Generated by LiveScript 1.4.0 (function(){ var module, test, toString$ = {}.toString; module = QUnit.module, test = QUnit.test; module('ES6'); test('Object.preventExtensions', function(assert){ var ref$, preventExtensions, keys, getOwnPropertyNames, getOwnPropertySymbols, ownKeys, i$, len$, value, key; ref$ = core.Object, preventExtensions = ref$.preventExtensions, keys = ref$.keys, getOwnPropertyNames = ref$.getOwnPropertyNames, getOwnPropertySymbols = ref$.getOwnPropertySymbols; ownKeys = core.Reflect.ownKeys; assert.isFunction(preventExtensions); assert.arity(preventExtensions, 1); for (i$ = 0, len$ = (ref$ = [42, 'foo', false, null, void 8, {}]).length; i$ < len$; ++i$) { value = ref$[i$]; assert.ok((fn$()), "accept " + toString$.call(value).slice(8, -1)); assert.same(preventExtensions(value), value, "returns target on " + toString$.call(value).slice(8, -1)); } assert.arrayEqual((function(){ var results$ = []; for (key in preventExtensions({})) { results$.push(key); } return results$; }()), []); assert.arrayEqual(keys(preventExtensions({})), []); assert.arrayEqual(getOwnPropertyNames(preventExtensions({})), []); assert.arrayEqual(getOwnPropertySymbols(preventExtensions({})), []); assert.arrayEqual(ownKeys(preventExtensions({})), []); function fn$(){ try { preventExtensions(value); return true; } catch (e$) {} } }); }).call(this); // Generated by LiveScript 1.4.0 (function(){ var module, test, toString$ = {}.toString; module = QUnit.module, test = QUnit.test; module('ES6'); test('Object.seal', function(assert){ var ref$, seal, keys, getOwnPropertyNames, getOwnPropertySymbols, ownKeys, i$, len$, value, key; ref$ = core.Object, seal = ref$.seal, keys = ref$.keys, getOwnPropertyNames = ref$.getOwnPropertyNames, getOwnPropertySymbols = ref$.getOwnPropertySymbols; ownKeys = core.Reflect.ownKeys; assert.isFunction(seal); assert.arity(seal, 1); for (i$ = 0, len$ = (ref$ = [42, 'foo', false, null, void 8, {}]).length; i$ < len$; ++i$) { value = ref$[i$]; assert.ok((fn$()), "accept " + toString$.call(value).slice(8, -1)); assert.same(seal(value), value, "returns target on " + toString$.call(value).slice(8, -1)); } assert.arrayEqual((function(){ var results$ = []; for (key in seal({})) { results$.push(key); } return results$; }()), []); assert.arrayEqual(keys(seal({})), []); assert.arrayEqual(getOwnPropertyNames(seal({})), []); assert.arrayEqual(getOwnPropertySymbols(seal({})), []); assert.arrayEqual(ownKeys(seal({})), []); function fn$(){ try { seal(value); return true; } catch (e$) {} } }); }).call(this); // Generated by LiveScript 1.4.0 (function(){ var module, test; if (PROTO) { module = QUnit.module, test = QUnit.test; module('ES6'); test('Object.setPrototypeOf', function(assert){ var setPrototypeOf, tmp; setPrototypeOf = core.Object.setPrototypeOf; assert.isFunction(setPrototypeOf); assert.ok('apply' in setPrototypeOf({}, Function.prototype), 'Parent properties in target'); assert.strictEqual(setPrototypeOf({ a: 2 }, { b: function(){ return Math.pow(this.a, 2); } }).b(), 4, 'Child and parent properties in target'); assert.strictEqual(setPrototypeOf(tmp = {}, { a: 1 }), tmp, 'setPrototypeOf return target'); assert.ok(!('toString' in setPrototypeOf({}, null)), 'Can set null as prototype'); }); } }).call(this); // Generated by LiveScript 1.4.0 (function(){ var module, test; module = QUnit.module, test = QUnit.test; module('ES6'); test('parseFloat', function(assert){ var parseFloat, ws; parseFloat = core.parseFloat; assert.isFunction(parseFloat); assert.arity(parseFloat, 1); assert.same(parseFloat('0'), 0); assert.same(parseFloat(' 0'), 0); assert.same(parseFloat('+0'), 0); assert.same(parseFloat(' +0'), 0); assert.same(parseFloat('-0'), -0); assert.same(parseFloat(' -0'), -0); ws = '\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u180E\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF'; assert.same(parseFloat(ws + '+0'), 0); assert.same(parseFloat(ws + '-0'), -0); assert.same(parseFloat(null), NaN); assert.same(parseFloat(void 8), NaN); }); }).call(this); // Generated by LiveScript 1.4.0 (function(){ var module, test; module = QUnit.module, test = QUnit.test; module('ES6'); test('parseInt', function(assert){ var parseInt, i$, r, x$, ref$, len$, ws, fakeZero; parseInt = core.parseInt; assert.isFunction(parseInt); assert.arity(parseInt, 2); for (i$ = 2; i$ <= 36; ++i$) { r = i$; assert.same(parseInt('10', r), r, "radix " + r); } for (i$ = 0, len$ = (ref$ = ['01', '08', '10', '42']).length; i$ < len$; ++i$) { x$ = ref$[i$]; assert.same(parseInt(x$), parseInt(x$, 10), "default radix is 10: " + x$); } assert.same(parseInt('0x16'), parseInt('0x16', 16), "default radix is 16: 0x16"); ws = '\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u180E\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF'; assert.same(parseInt(' 0x16'), parseInt('0x16', 16), 'ignores leading whitespace #1'); assert.same(parseInt(' 42'), parseInt('42', 10), 'ignores leading whitespace #2'); assert.same(parseInt(' 08'), parseInt('08', 10), 'ignores leading whitespace #3'); assert.same(parseInt(ws + '08'), parseInt('08', 10), 'ignores leading whitespace #4'); assert.same(parseInt(ws + '0x16'), parseInt('0x16', 16), 'ignores leading whitespace #5'); fakeZero = { valueOf: function(){ return 0; } }; assert.same(parseInt('08', fakeZero), parseInt('08', 10), 'valueOf #1'); assert.same(parseInt('0x16', fakeZero), parseInt('0x16', 16), 'valueOf #2'); assert.same(parseInt('-0xF'), -15, 'signed hex #1'); assert.same(parseInt('-0xF', 16), -15, 'signed hex #2'); assert.same(parseInt('+0xF'), 15, 'signed hex #3'); assert.same(parseInt('+0xF', 16), 15, 'signed hex #4'); assert.same(parseInt('10', -4294967294), 2, 'radix uses ToUint32'); assert.same(parseInt(null), NaN); assert.same(parseInt(void 8), NaN); }); }).call(this); // Generated by LiveScript 1.4.0 (function(){ 'use strict'; var module, test, Promise, Symbol, iterator; module = QUnit.module, test = QUnit.test; module('ES6'); Promise = core.Promise, Symbol = core.Symbol; iterator = Symbol.iterator; test('Promise', function(assert){ assert.isFunction(Promise); assert.throws(function(){ Promise(); }, 'throws w/o `new`'); new Promise(function(resolve, reject){ assert.isFunction(Promise, 'resolver is function'); assert.isFunction(Promise, 'rejector is function'); assert.same(this, function(){ return this; }(), 'correct executor context'); }); }); if (DESCRIPTORS) { test('Promise operations order', function(assert){ var expected, async, result, resolve, p, resolve2, p2; assert.expect(1); expected = 'DEHAFGBC'; async = assert.async(); result = ''; p = new Promise(function(r){ resolve = r; }); resolve({ then: function(){ result += 'A'; throw Error(); } }); p['catch'](function(){ result += 'B'; }); p['catch'](function(){ result += 'C'; assert.same(result, expected); async(); }); p2 = new Promise(function(r){ resolve2 = r; }); resolve2(Object.defineProperty({}, 'then', { get: function(){ result += 'D'; throw Error(); } })); result += 'E'; p2['catch'](function(){ result += 'F'; }); p2['catch'](function(){ result += 'G'; }); result += 'H'; setTimeout(function(){ if (~result.indexOf('C')) { assert.same(result, expected); } }, 1e3); }); } test('Promise#then', function(assert){ var promise, FakePromise1, FakePromise2; assert.isFunction(Promise.prototype.then); assert.nonEnumerable(Promise.prototype, 'then'); promise = new Promise(function(it){ it(42); }); promise.constructor = FakePromise1 = function(it){ it(function(){}, function(){}); }; FakePromise1[Symbol != null ? Symbol.species : void 8] = FakePromise2 = function(it){ it(function(){}, function(){}); }; assert.ok(promise.then(function(){}) instanceof FakePromise2, 'subclassing, @@species pattern'); promise = new Promise(function(it){ it(42); }); promise.constructor = FakePromise1 = function(it){ it(function(){}, function(){}); }; assert.ok(promise.then(function(){}) instanceof Promise, 'subclassing, incorrect `this` pattern'); promise = new Promise(function(it){ it(42); }); promise.constructor = FakePromise1 = function(it){ it(function(){}, function(){}); }; FakePromise1[Symbol != null ? Symbol.species : void 8] = function(){}; assert.throws(function(){ promise.then(function(){}); }, 'NewPromiseCapability validations, #1'); FakePromise1[Symbol != null ? Symbol.species : void 8] = function(it){ it(null, function(){}); }; assert.throws(function(){ promise.then(function(){}); }, 'NewPromiseCapability validations, #2'); FakePromise1[Symbol != null ? Symbol.species : void 8] = function(it){ it(function(){}, null); }; assert.throws(function(){ promise.then(function(){}); }, 'NewPromiseCapability validations, #3'); }); test('Promise#catch', function(assert){ var promise, FakePromise1, FakePromise2; assert.isFunction(Promise.prototype['catch']); assert.nonEnumerable(Promise.prototype, 'catch'); promise = new Promise(function(it){ it(42); }); promise.constructor = FakePromise1 = function(it){ it(function(){}, function(){}); }; FakePromise1[Symbol != null ? Symbol.species : void 8] = FakePromise2 = function(it){ it(function(){}, function(){}); }; assert.ok(promise['catch'](function(){}) instanceof FakePromise2, 'subclassing, @@species pattern'); promise = new Promise(function(it){ it(42); }); promise.constructor = FakePromise1 = function(it){ it(function(){}, function(){}); }; assert.ok(promise['catch'](function(){}) instanceof Promise, 'subclassing, incorrect `this` pattern'); promise = new Promise(function(it){ it(42); }); promise.constructor = FakePromise1 = function(it){ it(function(){}, function(){}); }; FakePromise1[Symbol != null ? Symbol.species : void 8] = function(){}; assert.throws(function(){ promise['catch'](function(){}); }, 'NewPromiseCapability validations, #1'); FakePromise1[Symbol != null ? Symbol.species : void 8] = function(it){ it(null, function(){}); }; assert.throws(function(){ promise['catch'](function(){}); }, 'NewPromiseCapability validations, #2'); FakePromise1[Symbol != null ? Symbol.species : void 8] = function(it){ it(function(){}, null); }; assert.throws(function(){ promise['catch'](function(){}); }, 'NewPromiseCapability validations, #3'); assert.same(Promise.prototype['catch'].call({ then: function(x, y){ return y; } }, 42), 42, 'calling `.then`'); }); test('Promise#@@toStringTag', function(assert){ assert.ok(Promise.prototype[Symbol != null ? Symbol.toStringTag : void 8] === 'Promise', 'Promise::@@toStringTag is `Promise`'); }); test('Promise.all', function(assert){ var all, iter, a, done, resolve, FakePromise1, FakePromise2, FakePromise3; all = Promise.all; assert.isFunction(all); assert.arity(all, 1); iter = createIterable([1, 2, 3]); Promise.all(iter)['catch'](function(){}); assert.ok(iter.received, 'works with iterables: iterator received'); assert.ok(iter.called, 'works with iterables: next called'); a = []; done = false; a['@@iterator'] = void 8; a[Symbol != null ? Symbol.iterator : void 8] = function(){ done = true; return core.getIteratorMethod([]).call(this); }; Promise.all(a); assert.ok(done); assert.throws(function(){ all.call(null, [])['catch'](function(){}); }, TypeError, 'throws without context'); done = false; resolve = Promise.resolve; try { Promise.resolve = function(){ throw 42; }; Promise.all(createIterable([1, 2, 3], { 'return': function(){ done = true; } }))['catch'](function(){}); } catch (e$) {} Promise.resolve = resolve; assert.ok(done, 'iteration closing'); FakePromise1 = function(it){ it(function(){}, function(){}); }; FakePromise1[Symbol != null ? Symbol.species : void 8] = FakePromise2 = function(it){ it(function(){}, function(){}); }; FakePromise1.resolve = FakePromise2.resolve = bind$(Promise, 'resolve'); assert.ok(all.call(FakePromise1, [1, 2, 3]) instanceof FakePromise1, 'subclassing, `this` pattern'); FakePromise1 = function(){}; FakePromise2 = function(it){ it(null, function(){}); }; FakePromise3 = function(it){ it(function(){}, null); }; FakePromise1.resolve = FakePromise2.resolve = FakePromise3.resolve = bind$(Promise, 'resolve'); assert.throws(function(){ all.call(FakePromise1, [1, 2, 3]); }, 'NewPromiseCapability validations, #1'); assert.throws(function(){ all.call(FakePromise2, [1, 2, 3]); }, 'NewPromiseCapability validations, #2'); assert.throws(function(){ all.call(FakePromise3, [1, 2, 3]); }, 'NewPromiseCapability validations, #3'); }); test('Promise.race', function(assert){ var race, iter, a, done, resolve, FakePromise1, FakePromise2, FakePromise3; race = Promise.race; assert.isFunction(race); assert.arity(race, 1); iter = createIterable([1, 2, 3]); Promise.race(iter)['catch'](function(){}); assert.ok(iter.received, 'works with iterables: iterator received'); assert.ok(iter.called, 'works with iterables: next called'); a = []; done = false; a['@@iterator'] = void 8; a[Symbol != null ? Symbol.iterator : void 8] = function(){ done = true; return core.getIteratorMethod([]).call(this); }; Promise.race(a); assert.ok(done); assert.throws(function(){ race.call(null, [])['catch'](function(){}); }, TypeError, 'throws without context'); done = false; resolve = Promise.resolve; try { Promise.resolve = function(){ throw 42; }; Promise.race(createIterable([1, 2, 3], { 'return': function(){ done = true; } }))['catch'](function(){}); } catch (e$) {} Promise.resolve = resolve; assert.ok(done, 'iteration closing'); FakePromise1 = function(it){ it(function(){}, function(){}); }; FakePromise1[Symbol != null ? Symbol.species : void 8] = FakePromise2 = function(it){ it(function(){}, function(){}); }; FakePromise1.resolve = FakePromise2.resolve = bind$(Promise, 'resolve'); assert.ok(race.call(FakePromise1, [1, 2, 3]) instanceof FakePromise1, 'subclassing, `this` pattern'); FakePromise1 = function(){}; FakePromise2 = function(it){ it(null, function(){}); }; FakePromise3 = function(it){ it(function(){}, null); }; FakePromise1.resolve = FakePromise2.resolve = FakePromise3.resolve = bind$(Promise, 'resolve'); assert.throws(function(){ race.call(FakePromise1, [1, 2, 3]); }, 'NewPromiseCapability validations, #1'); assert.throws(function(){ race.call(FakePromise2, [1, 2, 3]); }, 'NewPromiseCapability validations, #2'); assert.throws(function(){ race.call(FakePromise3, [1, 2, 3]); }, 'NewPromiseCapability validations, #3'); }); test('Promise.resolve', function(assert){ var resolve, FakePromise1, FakePromise2; resolve = Promise.resolve; assert.isFunction(resolve); assert.throws(function(){ resolve.call(null, 1)['catch'](function(){}); }, TypeError, 'throws without context'); FakePromise1 = function(it){ it(function(){}, function(){}); }; FakePromise1[Symbol != null ? Symbol.species : void 8] = FakePromise2 = function(it){ it(function(){}, function(){}); }; assert.ok(resolve.call(FakePromise1, 42) instanceof FakePromise1, 'subclassing, `this` pattern'); assert.throws(function(){ resolve.call(function(){}, 42); }, 'NewPromiseCapability validations, #1'); assert.throws(function(){ resolve.call(function(it){ it(null, function(){}); }, 42); }, 'NewPromiseCapability validations, #2'); assert.throws(function(){ resolve.call(function(it){ it(function(){}, null); }, 42); }, 'NewPromiseCapability validations, #3'); }); test('Promise.reject', function(assert){ var reject, FakePromise1, FakePromise2; reject = Promise.reject; assert.isFunction(reject); assert.throws(function(){ reject.call(null, 1)['catch'](function(){}); }, TypeError, 'throws without context'); FakePromise1 = function(it){ it(function(){}, function(){}); }; FakePromise1[Symbol != null ? Symbol.species : void 8] = FakePromise2 = function(it){ it(function(){}, function(){}); }; assert.ok(reject.call(FakePromise1, 42) instanceof FakePromise1, 'subclassing, `this` pattern'); assert.throws(function(){ reject.call(function(){}, 42); }, 'NewPromiseCapability validations, #1'); assert.throws(function(){ reject.call(function(it){ it(null, function(){}); }, 42); }, 'NewPromiseCapability validations, #2'); assert.throws(function(){ reject.call(function(it){ it(function(){}, null); }, 42); }, 'NewPromiseCapability validations, #3'); }); if (PROTO) { test('Promise subclassing', function(assert){ var SubPromise, p1, p2, p3; SubPromise = function(it){ var self; self = new Promise(it); core.Object.setPrototypeOf(self, SubPromise.prototype); self.mine = 'subclass'; return self; }; core.Object.setPrototypeOf(SubPromise, Promise); SubPromise.prototype = core.Object.create(Promise.prototype); SubPromise.prototype.constructor = SubPromise; p1 = SubPromise.resolve(5); assert.strictEqual(p1.mine, 'subclass'); p1 = p1.then(function(it){ return assert.strictEqual(it, 5); }); assert.strictEqual(p1.mine, 'subclass'); p2 = new SubPromise(function(it){ return it(6); }); assert.strictEqual(p2.mine, 'subclass'); p2 = p2.then(function(it){ return assert.strictEqual(it, 6); }); assert.strictEqual(p2.mine, 'subclass'); p3 = SubPromise.all([p1, p2]); assert.strictEqual(p3.mine, 'subclass'); assert.ok(p3 instanceof Promise); assert.ok(p3 instanceof SubPromise); p3.then(assert.async(), function(it){ return assert.ok(it, false); }); }); } test('Unhandled rejection tracking', function(assert){ var done, start, onunhandledrejection, onrejectionhandled, $promise; done = false; start = assert.async(); if (typeof process != 'undefined' && process !== null) { assert.expect(3); process.on('unhandledRejection', onunhandledrejection = function(reason, promise){ process.removeListener('unhandledRejection', onunhandledrejection); assert.same(promise, $promise, 'unhandledRejection, promise'); assert.same(reason, 42, 'unhandledRejection, reason'); $promise['catch'](function(){}); }); process.on('rejectionHandled', onrejectionhandled = function(promise){ process.removeListener('rejectionHandled', onrejectionhandled); assert.same(promise, $promise, 'rejectionHandled, promise'); done || start(); done = true; }); } else { assert.expect(4); global.onunhandledrejection = function(it){ assert.same(it.promise, $promise, 'onunhandledrejection, promise'); assert.same(it.reason, 42, 'onunhandledrejection, reason'); setTimeout(function(){ $promise['catch'](function(){}); }, 1); global.onunhandledrejection = null; }; global.onrejectionhandled = function(it){ assert.same(it.promise, $promise, 'onrejectionhandled, promise'); assert.same(it.reason, 42, 'onrejectionhandled, reason'); global.onrejectionhandled = null; done || start(); done = true; }; } Promise.reject(43)['catch'](function(){}); $promise = Promise.reject(42); setTimeout(function(){ done || start(); done = true; }, 3e3); }); function bind$(obj, key, target){ return function(){ return (target || obj)[key].apply(obj, arguments) }; } }).call(this); // Generated by LiveScript 1.4.0 (function(){ var module, test; module = QUnit.module, test = QUnit.test; module('ES6'); test('Reflect.apply', function(assert){ var apply, C; apply = core.Reflect.apply; assert.isFunction(apply); assert.arity(apply, 3); if ('name' in apply) { assert.name(apply, 'apply'); } assert.strictEqual(apply(Array.prototype.push, [1, 2], [3, 4, 5]), 5); C = function(a, b, c){ return a + b + c; }; C.apply = 42; assert.strictEqual(apply(C, null, ['foo', 'bar', 'baz']), 'foobarbaz', 'works with redefined apply'); assert.throws(function(){ apply(42, null, []); }, TypeError, 'throws on primitive'); assert.throws(function(){ apply(function(){}, null); }, TypeError, 'throws without third argument'); assert.throws(function(){ apply(function(){}, null, '123'); }, TypeError, 'throws on primitive as third argument'); }); }).call(this); // Generated by LiveScript 1.4.0 (function(){ var module, test, getPrototypeOf; module = QUnit.module, test = QUnit.test; module('ES6'); getPrototypeOf = core.Object.getPrototypeOf; test('Reflect.construct', function(assert){ var construct, C, inst, f, e; construct = core.Reflect.construct; assert.isFunction(construct); assert.arity(construct, 2); if ('name' in construct) { assert.name(construct, 'construct'); } C = function(a, b, c){ return this.qux = a + b + c; }; assert.strictEqual(construct(C, ['foo', 'bar', 'baz']).qux, 'foobarbaz', 'basic'); C.apply = 42; assert.strictEqual(construct(C, ['foo', 'bar', 'baz']).qux, 'foobarbaz', 'works with redefined apply'); inst = construct(function(){ this.x = 42; }, [], Array); assert.strictEqual(inst.x, 42, 'constructor with newTarget'); assert.ok(inst instanceof Array, 'prototype with newTarget'); assert.throws(function(){ construct(42, []); }, TypeError, 'throws on primitive'); f = function(){}; f.prototype = 42; assert.ok((function(){ try { return getPrototypeOf(construct(f, [])) === Object.prototype; } catch (e$) { e = e$; return false; } }())); assert.same(typeof (function(){ try { return construct(Date, []).getTime(); } catch (e$) {} }()), 'number', 'works with native constructors with 2 arguments'); assert.throws(function(){ construct(function(){}); }, 'throws when the second argument is not an object'); }); }).call(this); // Generated by LiveScript 1.4.0 (function(){ var module, test, ref$, defineProperty, getOwnPropertyDescriptor; module = QUnit.module, test = QUnit.test; module('ES6'); ref$ = core.Object, defineProperty = ref$.defineProperty, getOwnPropertyDescriptor = ref$.getOwnPropertyDescriptor; test('Reflect.defineProperty', function(assert){ var defineProperty, create, O; defineProperty = core.Reflect.defineProperty; create = core.Object.create; assert.isFunction(defineProperty); assert.arity(defineProperty, 3); if ('name' in defineProperty) { assert.name(defineProperty, 'defineProperty'); } O = {}; assert.strictEqual(defineProperty(O, 'foo', { value: 123 }), true); assert.strictEqual(O.foo, 123); if (DESCRIPTORS) { O = {}; defineProperty(O, 'foo', { value: 123, enumerable: true }); assert.deepEqual(getOwnPropertyDescriptor(O, 'foo'), { value: 123, enumerable: true, configurable: false, writable: false }); assert.strictEqual(defineProperty(O, 'foo', { value: 42 }), false); } assert.throws(function(){ defineProperty(42, 'foo', { value: 42 }); }, TypeError, 'throws on primitive'); assert.throws(function(){ defineProperty(42, 1, {}); }); assert.throws(function(){ defineProperty({}, create(null), {}); }); assert.throws(function(){ defineProperty({}, 1, 1); }); }); }).call(this); // Generated by LiveScript 1.4.0 (function(){ var module, test, defineProperty; module = QUnit.module, test = QUnit.test; module('ES6'); defineProperty = core.Object.defineProperty; test('Reflect.deleteProperty', function(assert){ var deleteProperty, O; deleteProperty = core.Reflect.deleteProperty; assert.isFunction(deleteProperty); assert.arity(deleteProperty, 2); if ('name' in deleteProperty) { assert.name(deleteProperty, 'deleteProperty'); } O = { bar: 456 }; assert.strictEqual(deleteProperty(O, 'bar'), true); assert.ok(!in$('bar', O)); if (DESCRIPTORS) { assert.strictEqual(deleteProperty(defineProperty({}, 'foo', { value: 42 }), 'foo'), false); } assert.throws(function(){ deleteProperty(42, 'foo'); }, TypeError, 'throws on primitive'); }); function in$(x, xs){ var i = -1, l = xs.length >>> 0; while (++i < l) if (x === xs[i]) return true; return false; } }).call(this); // Generated by LiveScript 1.4.0 (function(){ var module, test, defineProperty, from; module = QUnit.module, test = QUnit.test; module('ES6'); defineProperty = core.Object.defineProperty; from = core.Array.from; test('Reflect.enumerate', function(assert){ var enumerate, iterator, obj, i, ref$; enumerate = core.Reflect.enumerate; iterator = core.Symbol.iterator; assert.isFunction(enumerate); assert.arity(enumerate, 1); if ('name' in enumerate) { assert.name(enumerate, 'enumerate'); } obj = { foo: 1, bar: 2 }; i = enumerate(obj); assert.isIterable(i); assert.deepEqual(from(i), ['foo', 'bar'], 'bisic'); obj = { q: 1, w: 2, e: 3 }; i = enumerate(obj); delete obj.w; assert.deepEqual(from(i), ['q', 'e'], 'ignore holes'); obj = (ref$ = clone$({ q: 1, w: 2, e: 3 }), ref$.a = 4, ref$.s = 5, ref$.d = 6, ref$); assert.deepEqual(from(enumerate(obj)).sort(), ['a', 'd', 'e', 'q', 's', 'w'], 'works with prototype'); assert.throws(function(){ enumerate(42); }, TypeError, 'throws on primitive'); }); function clone$(it){ function fun(){} fun.prototype = it; return new fun; } }).call(this); // Generated by LiveScript 1.4.0 (function(){ var module, test; module = QUnit.module, test = QUnit.test; module('ES6'); test('Reflect.getOwnPropertyDescriptor', function(assert){ var getOwnPropertyDescriptor, obj, desc; getOwnPropertyDescriptor = core.Reflect.getOwnPropertyDescriptor; assert.isFunction(getOwnPropertyDescriptor); assert.arity(getOwnPropertyDescriptor, 2); if ('name' in getOwnPropertyDescriptor) { assert.name(getOwnPropertyDescriptor, 'getOwnPropertyDescriptor'); } obj = { baz: 789 }; desc = getOwnPropertyDescriptor(obj, 'baz'); assert.strictEqual(desc.value, 789); assert.throws(function(){ getOwnPropertyDescriptor(42, 'constructor'); }, TypeError, 'throws on primitive'); }); }).call(this); // Generated by LiveScript 1.4.0 (function(){ var module, test; module = QUnit.module, test = QUnit.test; module('ES6'); test('Reflect.getPrototypeOf', function(assert){ var getPrototypeOf; getPrototypeOf = core.Reflect.getPrototypeOf; assert.isFunction(getPrototypeOf); assert.arity(getPrototypeOf, 1); if ('name' in getPrototypeOf) { assert.name(getPrototypeOf, 'getPrototypeOf'); } assert.strictEqual(getPrototypeOf([]), Array.prototype); assert.throws(function(){ getPrototypeOf(42); }, TypeError, 'throws on primitive'); }); }).call(this); // Generated by LiveScript 1.4.0 (function(){ var module, test, ref$, defineProperty, create; module = QUnit.module, test = QUnit.test; module('ES6'); ref$ = core.Object, defineProperty = ref$.defineProperty, create = ref$.create; test('Reflect.get', function(assert){ var get, target, receiver; get = core.Reflect.get; assert.isFunction(get); if ('name' in get) { assert.name(get, 'get'); } assert.strictEqual(get({ qux: 987 }, 'qux'), 987); if (DESCRIPTORS) { target = create(defineProperty({ z: 3 }, 'w', { get: function(){ return this; } }), { x: { value: 1 }, y: { get: function(){ return this; } } }); receiver = {}; assert.strictEqual(get(target, 'x', receiver), 1, 'get x'); assert.strictEqual(get(target, 'y', receiver), receiver, 'get y'); assert.strictEqual(get(target, 'z', receiver), 3, 'get z'); assert.strictEqual(get(target, 'w', receiver), receiver, 'get w'); assert.strictEqual(get(target, 'u', receiver), void 8, 'get u'); } assert.throws(function(){ get(42, 'constructor'); }, TypeError, 'throws on primitive'); }); }).call(this); // Generated by LiveScript 1.4.0 (function(){ var module, test; module = QUnit.module, test = QUnit.test; module('ES6'); test('Reflect.has', function(assert){ var has, O; has = core.Reflect.has; assert.isFunction(has); assert.arity(has, 2); if ('name' in has) { assert.name(has, 'has'); } O = { qux: 987 }; assert.strictEqual(has(O, 'qux'), true); assert.strictEqual(has(O, 'qwe'), false); assert.strictEqual(has(O, 'toString'), true); assert.throws(function(){ has(42, 'constructor'); }, TypeError, 'throws on primitive'); }); }).call(this); // Generated by LiveScript 1.4.0 (function(){ var module, test, ref$, defineProperty, preventExtensions; module = QUnit.module, test = QUnit.test; module('ES6'); ref$ = core.Object, defineProperty = ref$.defineProperty, preventExtensions = ref$.preventExtensions; test('Reflect.isExtensible', function(assert){ var isExtensible; isExtensible = core.Reflect.isExtensible; assert.isFunction(isExtensible); assert.arity(isExtensible, 1); if ('name' in isExtensible) { assert.name(isExtensible, 'isExtensible'); } assert.ok(isExtensible({})); if (DESCRIPTORS) { assert.ok(!isExtensible(preventExtensions({}))); } assert.throws(function(){ isExtensible(42); }, TypeError, 'throws on primitive'); }); }).call(this); // Generated by LiveScript 1.4.0 (function(){ var module, test, defineProperty; module = QUnit.module, test = QUnit.test; module('ES6'); defineProperty = core.Object.defineProperty; test('Reflect.ownKeys', function(assert){ var ownKeys, sym, O1, keys, O2; ownKeys = core.Reflect.ownKeys; sym = core.Symbol('c'); assert.isFunction(ownKeys); assert.arity(ownKeys, 1); if ('name' in ownKeys) { assert.name(ownKeys, 'ownKeys'); } O1 = { a: 1 }; defineProperty(O1, 'b', { value: 2 }); O1[sym] = 3; keys = ownKeys(O1); assert.strictEqual(keys.length, 3, 'ownKeys return all own keys'); assert.ok(in$('a', keys), 'ownKeys return all own keys: simple'); assert.ok(in$('b', keys), 'ownKeys return all own keys: hidden'); assert.strictEqual(O1[keys[2]], 3, 'ownKeys return all own keys: symbol'); O2 = clone$(O1); keys = ownKeys(O2); assert.strictEqual(keys.length, 0, 'ownKeys return only own keys'); assert.throws(function(){ ownKeys(42); }, TypeError, 'throws on primitive'); }); function in$(x, xs){ var i = -1, l = xs.length >>> 0; while (++i < l) if (x === xs[i]) return true; return false; } function clone$(it){ function fun(){} fun.prototype = it; return new fun; } }).call(this); // Generated by LiveScript 1.4.0 (function(){ var module, test, ref$, defineProperty, isExtensible; module = QUnit.module, test = QUnit.test; module('ES6'); ref$ = core.Object, defineProperty = ref$.defineProperty, isExtensible = ref$.isExtensible; test('Reflect.preventExtensions', function(assert){ var preventExtensions, obj; preventExtensions = core.Reflect.preventExtensions; assert.isFunction(preventExtensions); assert.arity(preventExtensions, 1); if ('name' in preventExtensions) { assert.name(preventExtensions, 'preventExtensions'); } obj = {}; assert.ok(preventExtensions(obj), true); if (DESCRIPTORS) { assert.ok(!isExtensible(obj)); } assert.throws(function(){ preventExtensions(42); }, TypeError, 'throws on primitive'); }); }).call(this); // Generated by LiveScript 1.4.0 (function(){ var module, test; if (PROTO) { module = QUnit.module, test = QUnit.test; module('ES6'); test('Reflect.setPrototypeOf', function(assert){ var setPrototypeOf, obj, o; setPrototypeOf = core.Reflect.setPrototypeOf; assert.isFunction(setPrototypeOf); if ('name' in setPrototypeOf) { assert.name(setPrototypeOf, 'setPrototypeOf'); } obj = {}; assert.ok(setPrototypeOf(obj, Array.prototype), true); assert.ok(obj instanceof Array); assert.throws(function(){ setPrototypeOf({}, 42); }, TypeError); assert.throws(function(){ setPrototypeOf(42, {}); }, TypeError, 'throws on primitive'); assert.ok(setPrototypeOf(o = {}, o) === false, 'false on recursive __proto__'); }); } }).call(this); // Generated by LiveScript 1.4.0 (function(){ var module, test, ref$, defineProperty, getOwnPropertyDescriptor, create; module = QUnit.module, test = QUnit.test; module('ES6'); ref$ = core.Object, defineProperty = ref$.defineProperty, getOwnPropertyDescriptor = ref$.getOwnPropertyDescriptor, create = ref$.create; test('Reflect.set', function(assert){ var set, obj, target, receiver, out; set = core.Reflect.set; assert.isFunction(set); if ('name' in set) { assert.name(set, 'set'); } obj = {}; assert.ok(set(obj, 'quux', 654), true); assert.strictEqual(obj.quux, 654); target = {}; receiver = {}; set(target, 'foo', 1, receiver); assert.strictEqual(target.foo, void 8, 'target.foo === undefined'); assert.strictEqual(receiver.foo, 1, 'receiver.foo === 1'); if (DESCRIPTORS) { defineProperty(receiver, 'bar', { value: 0, writable: true, enumerable: false, configurable: true }); set(target, 'bar', 1, receiver); assert.strictEqual(receiver.bar, 1, 'receiver.bar === 1'); assert.strictEqual(getOwnPropertyDescriptor(receiver, 'bar').enumerable, false, 'enumerability not overridden'); target = create(defineProperty({ z: 3 }, 'w', { set: function(){ out = this; } }), { x: { value: 1, writable: true, configurable: true }, y: { set: function(){ out = this; } }, c: { value: 1, writable: false, configurable: false } }); assert.strictEqual(set(target, 'x', 2, target), true, 'set x'); assert.strictEqual(target.x, 2, 'set x'); out = null; assert.strictEqual(set(target, 'y', 2, target), true, 'set y'); assert.strictEqual(out, target, 'set y'); assert.strictEqual(set(target, 'z', 4, target), true); assert.strictEqual(target.z, 4, 'set z'); out = null; assert.strictEqual(set(target, 'w', 1, target), true, 'set w'); assert.strictEqual(out, target, 'set w'); assert.strictEqual(set(target, 'u', 0, target), true, 'set u'); assert.strictEqual(target.u, 0, 'set u'); assert.strictEqual(set(target, 'c', 2, target), false, 'set c'); assert.strictEqual(target.c, 1, 'set c'); } assert.throws(function(){ set(42, 'q', 42); }, TypeError, 'throws on primitive'); }); }).call(this); // Generated by LiveScript 1.4.0 (function(){ var module, test, same, Set, Map, Symbol, ref$, getOwnPropertyDescriptor, freeze, iterator; module = QUnit.module, test = QUnit.test; module('ES6'); same = function(a, b){ if (a === b) { return a !== 0 || 1 / a === 1 / b; } else { return a != a && b != b; } }; Set = core.Set, Map = core.Map, Symbol = core.Symbol; ref$ = core.Object, getOwnPropertyDescriptor = ref$.getOwnPropertyDescriptor, freeze = ref$.freeze; iterator = core.Symbol.iterator; test('Set', function(assert){ var from, S, r, done, iter, _add, a, o, key, C; from = core.Array.from; assert.isFunction(Set); assert.ok('add' in Set.prototype, 'add in Set.prototype'); assert.ok('clear' in Set.prototype, 'clear in Set.prototype'); assert.ok('delete' in Set.prototype, 'delete in Set.prototype'); assert.ok('forEach' in Set.prototype, 'forEach in Set.prototype'); assert.ok('has' in Set.prototype, 'has in Set.prototype'); assert.ok(new Set instanceof Set, 'new Set instanceof Set'); assert.strictEqual(new Set(createIterable([1, 2, 3])).size, 3, 'Init from iterable'); assert.strictEqual(new Set([freeze({}), 1]).size, 2, 'Support frozen objects'); S = new Set([1, 2, 3, 2, 1]); assert.strictEqual(S.size, 3); r = []; S.forEach(function(v){ return r.push(v); }); assert.deepEqual(r, [1, 2, 3]); assert.strictEqual(new Set([NaN, NaN, NaN]).size, 1); assert.deepEqual(from(new Set([3, 4]).add(2).add(1)), [3, 4, 2, 1]); done = false; iter = createIterable([null, 1, 2], { 'return': function(){ return done = true; } }); _add = Set.prototype.add; Set.prototype.add = function(){ throw 42; }; try { new Set(iter); } catch (e$) {} Set.prototype.add = _add; assert.ok(done, '.return #throw'); a = []; done = false; a['@@iterator'] = void 8; a[iterator] = function(){ done = true; return core.getIteratorMethod([]).call(this); }; new Set(a); assert.ok(done); o = {}; new Set().add(o); if (DESCRIPTORS) { assert.arrayEqual((function(){ var results$ = []; for (key in o) { results$.push(key); } return results$; }()), []); assert.arrayEqual(core.Object.keys(o), []); } assert.arrayEqual(core.Object.getOwnPropertyNames(o), []); assert.arrayEqual(core.Object.getOwnPropertySymbols(o), []); assert.arrayEqual(core.Reflect.ownKeys(o), []); if (nativeSubclass) { C = nativeSubclass(Set); assert.ok(new C instanceof C, 'correct subclassing with native classes #1'); assert.ok(new C instanceof Set, 'correct subclassing with native classes #2'); assert.ok(new C().add(2).has(2), 'correct subclassing with native classes #3'); } }); test('Set#add', function(assert){ var a, S, chain, f; assert.isFunction(Set.prototype.add); a = []; S = new Set([NaN, 2, 3, 2, 1, a]); assert.strictEqual(S.size, 5); chain = S.add(NaN); assert.strictEqual(chain, S); assert.strictEqual(S.size, 5); S.add(2); assert.strictEqual(S.size, 5); S.add(a); assert.strictEqual(S.size, 5); S.add([]); assert.strictEqual(S.size, 6); S.add(4); assert.strictEqual(S.size, 7); S = new Set().add(freeze(f = {})); assert.ok(S.has(f)); }); test('Set#clear', function(assert){ var S, f; assert.isFunction(Set.prototype.clear); S = new Set; S.clear(); assert.strictEqual(S.size, 0); S = new Set([1, 2, 3, 2, 1]); S.clear(); assert.strictEqual(S.size, 0); assert.ok(!S.has(1)); assert.ok(!S.has(2)); assert.ok(!S.has(3)); S = new Set([1, f = freeze({})]); S.clear(); assert.strictEqual(S.size, 0, 'Support frozen objects'); assert.ok(!S.has(1)); assert.ok(!S.has(f)); }); test('Set#delete', function(assert){ var a, S, f; assert.isFunction(Set.prototype['delete']); a = []; S = new Set([NaN, 2, 3, 2, 1, a]); assert.strictEqual(S.size, 5); assert.strictEqual(S['delete'](NaN), true); assert.strictEqual(S.size, 4); assert.strictEqual(S['delete'](4), false); assert.strictEqual(S.size, 4); S['delete']([]); assert.strictEqual(S.size, 4); S['delete'](a); assert.strictEqual(S.size, 3); S.add(freeze(f = {})); assert.strictEqual(S.size, 4); S['delete'](f); assert.strictEqual(S.size, 3); }); test('Set#forEach', function(assert){ var r, count, S, set, s; assert.isFunction(Set.prototype.forEach); r = []; count = 0; S = new Set([1, 2, 3, 2, 1]); S.forEach(function(value){ count++; r.push(value); }); assert.strictEqual(count, 3); assert.deepEqual(r, [1, 2, 3]); set = new Set(['0', '1', '2', '3']); s = ""; set.forEach(function(it){ s += it; if (it === '2') { set['delete']('2'); set['delete']('3'); set['delete']('1'); return set.add('4'); } }); assert.strictEqual(s, '0124'); set = new Set(['0']); s = ""; set.forEach(function(it){ set['delete']('0'); if (s !== '') { throw '!!!'; } return s += it; }); assert.strictEqual(s, '0'); assert.throws(function(){ Set.prototype.forEach.call(new Map, function(){}); }, 'non-generic'); }); test('Set#has', function(assert){ var a, f, S; assert.isFunction(Set.prototype.has); a = []; f = freeze({}); S = new Set([NaN, 2, 3, 2, 1, f, a]); assert.ok(S.has(NaN)); assert.ok(S.has(a)); assert.ok(S.has(f)); assert.ok(S.has(2)); assert.ok(!S.has(4)); assert.ok(!S.has([])); }); test('Set#size', function(assert){ var size, sizeDesc; size = new Set([1]).size; assert.strictEqual(typeof size, 'number', 'size is number'); assert.strictEqual(size, 1, 'size is correct'); if (DESCRIPTORS) { sizeDesc = getOwnPropertyDescriptor(Set.prototype, 'size'); assert.ok(sizeDesc && sizeDesc.get, 'size is getter'); assert.ok(sizeDesc && !sizeDesc.set, 'size isnt setter'); assert.throws(function(){ Set.prototype.size; }, TypeError); } }); test('Set & -0', function(assert){ var set, x$; set = new Set; set.add(-0); assert.strictEqual(set.size, 1); assert.ok(set.has(0)); assert.ok(set.has(-0)); set.forEach(function(it){ return assert.ok(!same(it, -0)); }); set['delete'](-0); assert.strictEqual(set.size, 0); set = new Set([-0]); set.forEach(function(key){ return assert.ok(!same(key, -0)); }); x$ = set = new Set(); x$.add(4); x$.add(3); x$.add(2); x$.add(1); x$.add(0); assert.ok(set.has(-0)); }); test('Set#@@toStringTag', function(assert){ assert.strictEqual(Set.prototype[Symbol != null ? Symbol.toStringTag : void 8], 'Set', 'Set::@@toStringTag is `Set`'); }); test('Set Iterator', function(assert){ var set, keys, iterator; set = new Set(['a', 'b', 'c', 'd']); keys = []; iterator = set.keys(); keys.push(iterator.next().value); assert.ok(set['delete']('a')); assert.ok(set['delete']('b')); assert.ok(set['delete']('c')); set.add('e'); keys.push(iterator.next().value); keys.push(iterator.next().value); assert.ok(iterator.next().done); set.add('f'); assert.ok(iterator.next().done); assert.deepEqual(keys, ['a', 'd', 'e']); }); test('Set#keys', function(assert){ var iter; assert.isFunction(Set.prototype.keys); iter = new Set(['q', 'w', 'e']).keys(); assert.isIterator(iter); assert.isIterable(iter); assert.strictEqual(iter[Symbol != null ? Symbol.toStringTag : void 8], 'Set Iterator'); assert.deepEqual(iter.next(), { value: 'q', done: false }); assert.deepEqual(iter.next(), { value: 'w', done: false }); assert.deepEqual(iter.next(), { value: 'e', done: false }); assert.deepEqual(iter.next(), { value: void 8, done: true }); }); test('Set#values', function(assert){ var iter; assert.isFunction(Set.prototype.values); iter = new Set(['q', 'w', 'e']).values(); assert.isIterator(iter); assert.isIterable(iter); assert.strictEqual(iter[Symbol != null ? Symbol.toStringTag : void 8], 'Set Iterator'); assert.deepEqual(iter.next(), { value: 'q', done: false }); assert.deepEqual(iter.next(), { value: 'w', done: false }); assert.deepEqual(iter.next(), { value: 'e', done: false }); assert.deepEqual(iter.next(), { value: void 8, done: true }); }); test('Set#entries', function(assert){ var iter; assert.isFunction(Set.prototype.entries); iter = new Set(['q', 'w', 'e']).entries(); assert.isIterator(iter); assert.isIterable(iter); assert.strictEqual(iter[Symbol != null ? Symbol.toStringTag : void 8], 'Set Iterator'); assert.deepEqual(iter.next(), { value: ['q', 'q'], done: false }); assert.deepEqual(iter.next(), { value: ['w', 'w'], done: false }); assert.deepEqual(iter.next(), { value: ['e', 'e'], done: false }); assert.deepEqual(iter.next(), { value: void 8, done: true }); }); test('Set#@@iterator', function(assert){ var iter; iter = core.getIterator(new Set(['q', 'w', 'e'])); assert.isIterator(iter); assert.isIterable(iter); assert.strictEqual(iter[Symbol != null ? Symbol.toStringTag : void 8], 'Set Iterator'); assert.deepEqual(iter.next(), { value: 'q', done: false }); assert.deepEqual(iter.next(), { value: 'w', done: false }); assert.deepEqual(iter.next(), { value: 'e', done: false }); assert.deepEqual(iter.next(), { value: void 8, done: true }); }); }).call(this); // Generated by LiveScript 1.4.0 (function(){ var module, test; module = QUnit.module, test = QUnit.test; module('ES6'); test('String#anchor', function(assert){ var anchor; anchor = core.String.anchor; assert.isFunction(anchor); assert.same(anchor('a', 'b'), 'a', 'lower case'); assert.same(anchor('a', '"'), 'a', 'escape quotes'); }); }).call(this); // Generated by LiveScript 1.4.0 (function(){ var module, test; module = QUnit.module, test = QUnit.test; module('ES6'); test('String#big', function(assert){ var big; big = core.String.big; assert.isFunction(big); assert.same(big('a'), 'a', 'lower case'); }); }).call(this); // Generated by LiveScript 1.4.0 (function(){ var module, test; module = QUnit.module, test = QUnit.test; module('ES6'); test('String#blink', function(assert){ var blink; blink = core.String.blink; assert.isFunction(blink); assert.same(blink('a'), 'a', 'lower case'); }); }).call(this); // Generated by LiveScript 1.4.0 (function(){ var module, test; module = QUnit.module, test = QUnit.test; module('ES6'); test('String#bold', function(assert){ var bold; bold = core.String.bold; assert.isFunction(bold); assert.same(bold('a'), 'a', 'lower case'); }); }).call(this); // Generated by LiveScript 1.4.0 (function(){ var module, test; module = QUnit.module, test = QUnit.test; module('ES6'); test('String#codePointAt', function(assert){ var codePointAt; codePointAt = core.String.codePointAt; assert.isFunction(codePointAt); assert.strictEqual(codePointAt('abc\uD834\uDF06def', ''), 0x61); assert.strictEqual(codePointAt('abc\uD834\uDF06def', '_'), 0x61); assert.strictEqual(codePointAt('abc\uD834\uDF06def'), 0x61); assert.strictEqual(codePointAt('abc\uD834\uDF06def', -Infinity), void 8); assert.strictEqual(codePointAt('abc\uD834\uDF06def', -1), void 8); assert.strictEqual(codePointAt('abc\uD834\uDF06def', -0), 0x61); assert.strictEqual(codePointAt('abc\uD834\uDF06def', 0), 0x61); assert.strictEqual(codePointAt('abc\uD834\uDF06def', 3), 0x1D306); assert.strictEqual(codePointAt('abc\uD834\uDF06def', 4), 0xDF06); assert.strictEqual(codePointAt('abc\uD834\uDF06def', 5), 0x64); assert.strictEqual(codePointAt('abc\uD834\uDF06def', 42), void 8); assert.strictEqual(codePointAt('abc\uD834\uDF06def', Infinity), void 8); assert.strictEqual(codePointAt('abc\uD834\uDF06def', Infinity), void 8); assert.strictEqual(codePointAt('abc\uD834\uDF06def', NaN), 0x61); assert.strictEqual(codePointAt('abc\uD834\uDF06def', false), 0x61); assert.strictEqual(codePointAt('abc\uD834\uDF06def', null), 0x61); assert.strictEqual(codePointAt('abc\uD834\uDF06def', void 8), 0x61); assert.strictEqual(codePointAt('\uD834\uDF06def', ''), 0x1D306); assert.strictEqual(codePointAt('\uD834\uDF06def', '1'), 0xDF06); assert.strictEqual(codePointAt('\uD834\uDF06def', '_'), 0x1D306); assert.strictEqual(codePointAt('\uD834\uDF06def'), 0x1D306); assert.strictEqual(codePointAt('\uD834\uDF06def', -1), void 8); assert.strictEqual(codePointAt('\uD834\uDF06def', -0), 0x1D306); assert.strictEqual(codePointAt('\uD834\uDF06def', 0), 0x1D306); assert.strictEqual(codePointAt('\uD834\uDF06def', 1), 0xDF06); assert.strictEqual(codePointAt('\uD834\uDF06def', 42), void 8); assert.strictEqual(codePointAt('\uD834\uDF06def', false), 0x1D306); assert.strictEqual(codePointAt('\uD834\uDF06def', null), 0x1D306); assert.strictEqual(codePointAt('\uD834\uDF06def', void 8), 0x1D306); assert.strictEqual(codePointAt('\uD834abc', ''), 0xD834); assert.strictEqual(codePointAt('\uD834abc', '_'), 0xD834); assert.strictEqual(codePointAt('\uD834abc'), 0xD834); assert.strictEqual(codePointAt('\uD834abc', -1), void 8); assert.strictEqual(codePointAt('\uD834abc', -0), 0xD834); assert.strictEqual(codePointAt('\uD834abc', 0), 0xD834); assert.strictEqual(codePointAt('\uD834abc', false), 0xD834); assert.strictEqual(codePointAt('\uD834abc', NaN), 0xD834); assert.strictEqual(codePointAt('\uD834abc', null), 0xD834); assert.strictEqual(codePointAt('\uD834abc', void 8), 0xD834); assert.strictEqual(codePointAt('\uDF06abc', ''), 0xDF06); assert.strictEqual(codePointAt('\uDF06abc', '_'), 0xDF06); assert.strictEqual(codePointAt('\uDF06abc'), 0xDF06); assert.strictEqual(codePointAt('\uDF06abc', -1), void 8); assert.strictEqual(codePointAt('\uDF06abc', -0), 0xDF06); assert.strictEqual(codePointAt('\uDF06abc', 0), 0xDF06); assert.strictEqual(codePointAt('\uDF06abc', false), 0xDF06); assert.strictEqual(codePointAt('\uDF06abc', NaN), 0xDF06); assert.strictEqual(codePointAt('\uDF06abc', null), 0xDF06); assert.strictEqual(codePointAt('\uDF06abc', void 8), 0xDF06); if (STRICT) { assert.throws(function(){ codePointAt(null, 0); }, TypeError); assert.throws(function(){ codePointAt(void 8, 0); }, TypeError); } }); }).call(this); // Generated by LiveScript 1.4.0 (function(){ var module, test; module = QUnit.module, test = QUnit.test; module('ES6'); test('String#endsWith', function(assert){ var endsWith, re, ref$, e, O, ref1$; endsWith = core.String.endsWith; assert.isFunction(endsWith); assert.ok(endsWith('undefined')); assert.ok(!endsWith('undefined', null)); assert.ok(endsWith('abc', '')); assert.ok(endsWith('abc', 'c')); assert.ok(endsWith('abc', 'bc')); assert.ok(!endsWith('abc', 'ab')); assert.ok(endsWith('abc', '', NaN)); assert.ok(!endsWith('abc', 'c', -1)); assert.ok(endsWith('abc', 'a', 1)); assert.ok(endsWith('abc', 'c', Infinity)); assert.ok(endsWith('abc', 'a', true)); assert.ok(!endsWith('abc', 'c', 'x')); assert.ok(!endsWith('abc', 'a', 'x')); if (STRICT) { assert.throws(function(){ endsWith(null, '.'); }, TypeError); assert.throws(function(){ endsWith(void 8, '.'); }, TypeError); } re = /./; assert.throws(function(){ endsWith('/./', re); }, TypeError); re[(ref$ = core.Symbol) != null ? ref$.match : void 8] = false; assert.ok((function(){ try { return endsWith('/./', re); } catch (e$) { e = e$; return false; } }())); O = {}; assert.ok((function(){ try { return endsWith('[object Object]', O); } catch (e$) { e = e$; return false; } }())); O[(ref1$ = core.Symbol) != null ? ref1$.match : void 8] = true; assert.throws(function(){ endsWith('[object Object]', O); }, TypeError); }); }).call(this); // Generated by LiveScript 1.4.0 (function(){ var module, test; module = QUnit.module, test = QUnit.test; module('ES6'); test('String#fixed', function(assert){ var fixed; fixed = core.String.fixed; assert.isFunction(fixed); assert.same(fixed('a'), 'a', 'lower case'); }); }).call(this); // Generated by LiveScript 1.4.0 (function(){ var module, test; module = QUnit.module, test = QUnit.test; module('ES6'); test('String#fontcolor', function(assert){ var fontcolor; fontcolor = core.String.fontcolor; assert.isFunction(fontcolor); assert.same(fontcolor('a', 'b'), 'a', 'lower case'); assert.same(fontcolor('a', '"'), 'a', 'escape quotes'); }); }).call(this); // Generated by LiveScript 1.4.0 (function(){ var module, test; module = QUnit.module, test = QUnit.test; module('ES6'); test('String#fontsize', function(assert){ var fontsize; fontsize = core.String.fontsize; assert.isFunction(fontsize); assert.same(fontsize('a', 'b'), 'a', 'lower case'); assert.same(fontsize('a', '"'), 'a', 'escape quotes'); }); }).call(this); // Generated by LiveScript 1.4.0 (function(){ var module, test; module = QUnit.module, test = QUnit.test; module('ES6'); test('String.fromCodePoint', function(assert){ var fromCodePoint, tmp, counter, result; fromCodePoint = core.String.fromCodePoint; assert.isFunction(fromCodePoint); assert.arity(fromCodePoint, 1); if ('name' in fromCodePoint) { assert.name(fromCodePoint, 'fromCodePoint'); } assert.strictEqual(fromCodePoint(''), '\0'); assert.strictEqual(fromCodePoint(), ''); assert.strictEqual(fromCodePoint(-0), '\0'); assert.strictEqual(fromCodePoint(0), '\0'); assert.strictEqual(fromCodePoint(0x1D306), '\uD834\uDF06'); assert.strictEqual(fromCodePoint(0x1D306, 0x61, 0x1D307), '\uD834\uDF06a\uD834\uDF07'); assert.strictEqual(fromCodePoint(0x61, 0x62, 0x1D307), 'ab\uD834\uDF07'); assert.strictEqual(fromCodePoint(false), '\0'); assert.strictEqual(fromCodePoint(null), '\0'); assert.throws(function(){ fromCodePoint('_'); }, RangeError); assert.throws(function(){ fromCodePoint('+Infinity'); }, RangeError); assert.throws(function(){ fromCodePoint('-Infinity'); }, RangeError); assert.throws(function(){ fromCodePoint(-1); }, RangeError); assert.throws(function(){ fromCodePoint(0x10FFFF + 1); }, RangeError); assert.throws(function(){ fromCodePoint(3.14); }, RangeError); assert.throws(function(){ fromCodePoint(3e-2); }, RangeError); assert.throws(function(){ fromCodePoint(-Infinity); }, RangeError); assert.throws(function(){ fromCodePoint(Infinity); }, RangeError); assert.throws(function(){ fromCodePoint(NaN); }, RangeError); assert.throws(function(){ fromCodePoint(void 8); }, RangeError); assert.throws(function(){ fromCodePoint({}); }, RangeError); assert.throws(function(){ fromCodePoint(/./); }, RangeError); tmp = 0x60; assert.strictEqual(fromCodePoint({ valueOf: function(){ return ++tmp; } }), 'a'); assert.strictEqual(tmp, 0x61); counter = Math.pow(2, 15) * 3 / 2; result = []; while (--counter >= 0) { result.push(0); } fromCodePoint.apply(null, result); counter = Math.pow(2, 15) * 3 / 2; result = []; while (--counter >= 0) { result.push(0xFFFF + 1); } fromCodePoint.apply(null, result); }); }).call(this); // Generated by LiveScript 1.4.0 (function(){ var module, test; module = QUnit.module, test = QUnit.test; module('ES6'); test('String#includes', function(assert){ var includes, re, ref$, e, O, ref1$; includes = core.String.includes; assert.isFunction(includes); assert.ok(!includes('abc')); assert.ok(includes('aundefinedb')); assert.ok(includes('abcd', 'b', 1)); assert.ok(!includes('abcd', 'b', 2)); if (STRICT) { assert.throws(function(){ includes(null, '.'); }, TypeError); assert.throws(function(){ includes(void 8, '.'); }, TypeError); } re = /./; assert.throws(function(){ includes('/./', re); }, TypeError); re[(ref$ = core.Symbol) != null ? ref$.match : void 8] = false; assert.ok((function(){ try { return includes('/./', re); } catch (e$) { e = e$; return false; } }())); O = {}; assert.ok((function(){ try { return includes('[object Object]', O); } catch (e$) { e = e$; return false; } }())); O[(ref1$ = core.Symbol) != null ? ref1$.match : void 8] = true; assert.throws(function(){ includes('[object Object]', O); }, TypeError); }); }).call(this); // Generated by LiveScript 1.4.0 (function(){ var module, test; module = QUnit.module, test = QUnit.test; module('ES6'); test('String#italics', function(assert){ var italics; italics = core.String.italics; assert.isFunction(italics); assert.same(italics('a'), 'a', 'lower case'); }); }).call(this); // Generated by LiveScript 1.4.0 (function(){ var module, test; module = QUnit.module, test = QUnit.test; module('ES6'); test('String#@@iterator', function(assert){ var iter, ref$; iter = core.getIterator('qwe'); assert.isIterator(iter); assert.strictEqual(iter[(ref$ = core.Symbol) != null ? ref$.toStringTag : void 8], 'String Iterator'); assert.deepEqual(iter.next(), { value: 'q', done: false }); assert.deepEqual(iter.next(), { value: 'w', done: false }); assert.deepEqual(iter.next(), { value: 'e', done: false }); assert.deepEqual(iter.next(), { value: void 8, done: true }); assert.strictEqual(core.Array.from('𠮷𠮷𠮷').length, 3); iter = core.getIterator('𠮷𠮷𠮷'); assert.deepEqual(iter.next(), { value: '𠮷', done: false }); assert.deepEqual(iter.next(), { value: '𠮷', done: false }); assert.deepEqual(iter.next(), { value: '𠮷', done: false }); assert.deepEqual(iter.next(), { value: void 8, done: true }); }); }).call(this); // Generated by LiveScript 1.4.0 (function(){ var module, test; module = QUnit.module, test = QUnit.test; module('ES6'); test('String#link', function(assert){ var link; link = core.String.link; assert.isFunction(link); assert.same(link('a', 'b'), 'a', 'lower case'); assert.same(link('a', '"'), 'a', 'escape quotes'); }); }).call(this); // Generated by LiveScript 1.4.0 (function(){ var module, test; module = QUnit.module, test = QUnit.test; module('ES6'); test('String.raw', function(assert){ var raw; raw = core.String.raw; assert.isFunction(raw); assert.arity(raw, 1); if ('name' in raw) { assert.name(raw, 'raw'); } assert.strictEqual(raw({ raw: ['Hi\\n', '!'] }, 'Bob'), 'Hi\\nBob!', 'raw is array'); assert.strictEqual(raw({ raw: 'test' }, 0, 1, 2), 't0e1s2t', 'raw is string'); assert.strictEqual(raw({ raw: 'test' }, 0), 't0est', 'lacks substituting'); assert.throws(function(){ raw({}); }, TypeError); assert.throws(function(){ raw({ raw: null }); }, TypeError); }); }).call(this); // Generated by LiveScript 1.4.0 (function(){ var module, test; module = QUnit.module, test = QUnit.test; module('ES6'); test('String#repeat', function(assert){ var repeat; repeat = core.String.repeat; assert.isFunction(repeat); assert.strictEqual(repeat('qwe', 3), 'qweqweqwe'); assert.strictEqual(repeat('qwe', 2.5), 'qweqwe'); assert.throws(function(){ repeat('qwe', -1); }, RangeError); assert.throws(function(){ repeat('qwe', Infinity); }, RangeError); if (STRICT) { assert.throws(function(){ repeat(null, 1); }, TypeError); assert.throws(function(){ repeat(void 8, 1); }, TypeError); } }); }).call(this); // Generated by LiveScript 1.4.0 (function(){ var module, test; module = QUnit.module, test = QUnit.test; module('ES6'); test('String#small', function(assert){ var small; small = core.String.small; assert.isFunction(small); assert.same(small('a'), 'a', 'lower case'); }); }).call(this); // Generated by LiveScript 1.4.0 (function(){ var module, test; module = QUnit.module, test = QUnit.test; module('ES6'); test('String#startsWith', function(assert){ var startsWith, re, ref$, e, O, ref1$; startsWith = core.String.startsWith; assert.isFunction(startsWith); assert.ok(startsWith('undefined')); assert.ok(!startsWith('undefined', null)); assert.ok(startsWith('abc', '')); assert.ok(startsWith('abc', 'a')); assert.ok(startsWith('abc', 'ab')); assert.ok(!startsWith('abc', 'bc')); assert.ok(startsWith('abc', '', NaN)); assert.ok(startsWith('abc', 'a', -1)); assert.ok(!startsWith('abc', 'a', 1)); assert.ok(!startsWith('abc', 'a', Infinity)); assert.ok(startsWith('abc', 'b', true)); assert.ok(startsWith('abc', 'a', 'x')); if (STRICT) { assert.throws(function(){ startsWith(null, '.'); }, TypeError); assert.throws(function(){ startsWith(void 8, '.'); }, TypeError); } re = /./; assert.throws(function(){ startsWith('/./', re); }, TypeError); re[(ref$ = core.Symbol) != null ? ref$.match : void 8] = false; assert.ok((function(){ try { return startsWith('/./', re); } catch (e$) { e = e$; return false; } }())); O = {}; assert.ok((function(){ try { return startsWith('[object Object]', O); } catch (e$) { e = e$; return false; } }())); O[(ref1$ = core.Symbol) != null ? ref1$.match : void 8] = true; assert.throws(function(){ startsWith('[object Object]', O); }, TypeError); }); }).call(this); // Generated by LiveScript 1.4.0 (function(){ var module, test; module = QUnit.module, test = QUnit.test; module('ES6'); test('String#strike', function(assert){ var strike; strike = core.String.strike; assert.isFunction(strike); assert.same(strike('a'), 'a', 'lower case'); }); }).call(this); // Generated by LiveScript 1.4.0 (function(){ var module, test; module = QUnit.module, test = QUnit.test; module('ES6'); test('String#sub', function(assert){ var sub; sub = core.String.sub; assert.isFunction(sub); assert.same(sub('a'), 'a', 'lower case'); }); }).call(this); // Generated by LiveScript 1.4.0 (function(){ var module, test; module = QUnit.module, test = QUnit.test; module('ES6'); test('String#sup', function(assert){ var sup; sup = core.String.sup; assert.isFunction(sup); assert.same(sup('a'), 'a', 'lower case'); }); }).call(this); // Generated by LiveScript 1.4.0 (function(){ var module, test; module = QUnit.module, test = QUnit.test; module('ES6'); test('String#trim', function(assert){ var trim; trim = core.String.trim; assert.isFunction(trim); assert.strictEqual(trim(' \n q w e \n '), 'q w e', 'removes whitespaces at left & right side of string'); assert.strictEqual(trim('\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u180E\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF'), '', 'removes all whitespaces'); assert.strictEqual(trim('\u200b\u0085'), '\u200b\u0085', "shouldn't remove this symbols"); if (STRICT) { assert.throws(function(){ trim(null, 0); }, TypeError); assert.throws(function(){ trim(void 8, 0); }, TypeError); } }); }).call(this); // Generated by LiveScript 1.4.0 (function(){ var module, test, Symbol, JSON, ref$, defineProperty, getOwnPropertyDescriptor, create, i$, len$, $key; module = QUnit.module, test = QUnit.test; module('ES6'); Symbol = core.Symbol, JSON = core.JSON; ref$ = core.Object, defineProperty = ref$.defineProperty, getOwnPropertyDescriptor = ref$.getOwnPropertyDescriptor, create = ref$.create; test('Symbol', function(assert){ var s1, s2, O, count, i; assert.isFunction(Symbol); s1 = Symbol('foo'); s2 = Symbol('foo'); assert.ok(s1 !== s2, 'Symbol("foo") !== Symbol("foo")'); O = {}; O[s1] = 42; assert.ok(O[s1] === 42, 'Symbol() work as key'); assert.ok(O[s2] !== 42, 'Various symbols from one description are various keys'); if (DESCRIPTORS) { count = 0; for (i in O) { count++; } assert.ok(count === 0, 'object[Symbol()] is not enumerable'); } }); test('Well-known Symbols', function(assert){ var i$, x$, ref$, len$; for (i$ = 0, len$ = (ref$ = ['hasInstance', 'isConcatSpreadable', 'iterator', 'match', 'replace', 'search', 'species', 'split', 'toPrimitive', 'toStringTag', 'unscopables']).length; i$ < len$; ++i$) { x$ = ref$[i$]; assert.ok(x$ in Symbol, "Symbol." + x$ + " available"); assert.ok(Object(Symbol[x$]) instanceof Symbol, "Symbol." + x$ + " is symbol"); } }); test('Global symbol registry', function(assert){ var symbol; assert.isFunction(Symbol['for'], 'Symbol.for is function'); assert.isFunction(Symbol.keyFor, 'Symbol.keyFor is function'); symbol = Symbol['for']('foo'); assert.strictEqual(Symbol['for']('foo'), symbol); assert.strictEqual(Symbol.keyFor(symbol), 'foo'); assert.throws(function(){ Symbol.keyFor('foo'); }, 'throws on non-symbol'); }); test('Symbol#@@toPrimitive', function(assert){ var S; assert.isFunction(Symbol.prototype[Symbol.toPrimitive]); S = Symbol(); assert.same(S, S[Symbol.toPrimitive](), 'works'); }); test('Symbol#@@toStringTag', function(assert){ assert.ok(Symbol.prototype[Symbol.toStringTag] === 'Symbol', 'Symbol::@@toStringTag is `Symbol`'); }); test('Object.getOwnPropertySymbols', function(assert){ var ref$, getOwnPropertySymbols, getOwnPropertyNames, obj, foo; ref$ = core.Object, getOwnPropertySymbols = ref$.getOwnPropertySymbols, getOwnPropertyNames = ref$.getOwnPropertyNames; assert.isFunction(getOwnPropertySymbols); obj = { q: 1, w: 2, e: 3 }; obj[Symbol()] = 42; obj[Symbol()] = 43; assert.deepEqual(getOwnPropertyNames(obj).sort(), ['e', 'q', 'w']); assert.strictEqual(getOwnPropertySymbols(obj).length, 2); foo = (ref$ = clone$(obj), ref$.a = 1, ref$.s = 2, ref$.d = 3, ref$); foo[Symbol()] = 44; assert.deepEqual(getOwnPropertyNames(foo).sort(), ['a', 'd', 's']); assert.strictEqual(getOwnPropertySymbols(foo).length, 1); assert.strictEqual(getOwnPropertySymbols(Object.prototype).length, 0); }); if (JSON != null) { test('Symbols & JSON.stringify', function(assert){ var ref$; assert.strictEqual(JSON.stringify([1, Symbol('foo'), false, Symbol('bar'), {}]), '[1,null,false,null,{}]', 'array value'); assert.strictEqual(JSON.stringify({ foo: Symbol('foo') }), '{}', 'object value'); if (DESCRIPTORS) { assert.strictEqual(JSON.stringify((ref$ = {}, ref$[Symbol('foo')] = 1, ref$.bar = 2, ref$)), '{"bar":2}', 'object key'); } assert.strictEqual(JSON.stringify(Symbol('foo')), void 8, 'symbol value'); if (typeof Symbol() === 'symbol') { assert.strictEqual(JSON.stringify(Object(Symbol('foo'))), '{}', 'boxed symbol'); } }); } if (DESCRIPTORS) { test('Symbols & descriptors', function(assert){ var ref$, create, defineProperty, getOwnPropertyDescriptor, keys, getOwnPropertyNames, getOwnPropertySymbols, d, e, f, i, j, proto, O, desc; ref$ = core.Object, create = ref$.create, defineProperty = ref$.defineProperty, getOwnPropertyDescriptor = ref$.getOwnPropertyDescriptor, keys = ref$.keys, getOwnPropertyNames = ref$.getOwnPropertyNames, getOwnPropertySymbols = ref$.getOwnPropertySymbols; d = Symbol('d'); e = Symbol('e'); f = Symbol('f'); i = Symbol('i'); j = Symbol('j'); proto = (ref$ = { g: 'g' }, ref$[i] = 'i', ref$); defineProperty(proto, 'h', { value: 'h' }); defineProperty(proto, 'j', { value: 'j' }); O = create(proto); O.a = 'a'; O[d] = 'd'; defineProperty(O, 'b', { value: 'b' }); defineProperty(O, 'c', { value: 'c', enumerable: true }); defineProperty(O, e, { configurable: true, writable: true, value: 'e' }); desc = { value: 'f', enumerable: true }; defineProperty(O, f, desc); assert.strictEqual(desc.enumerable, true, 'defineProperty not changes descriptor object'); assert.deepEqual(getOwnPropertyDescriptor(O, 'a'), { configurable: true, writable: true, enumerable: true, value: 'a' }, 'getOwnPropertyDescriptor a'); assert.deepEqual(getOwnPropertyDescriptor(O, 'b'), { configurable: false, writable: false, enumerable: false, value: 'b' }, 'getOwnPropertyDescriptor b'); assert.deepEqual(getOwnPropertyDescriptor(O, 'c'), { configurable: false, writable: false, enumerable: true, value: 'c' }, 'getOwnPropertyDescriptor c'); assert.deepEqual(getOwnPropertyDescriptor(O, d), { configurable: true, writable: true, enumerable: true, value: 'd' }, 'getOwnPropertyDescriptor d'); assert.deepEqual(getOwnPropertyDescriptor(O, e), { configurable: true, writable: true, enumerable: false, value: 'e' }, 'getOwnPropertyDescriptor e'); assert.deepEqual(getOwnPropertyDescriptor(O, f), { configurable: false, writable: false, enumerable: true, value: 'f' }, 'getOwnPropertyDescriptor f'); assert.strictEqual(getOwnPropertyDescriptor(O, 'g'), void 8, 'getOwnPropertyDescriptor g'); assert.strictEqual(getOwnPropertyDescriptor(O, 'h'), void 8, 'getOwnPropertyDescriptor h'); assert.strictEqual(getOwnPropertyDescriptor(O, i), void 8, 'getOwnPropertyDescriptor i'); assert.strictEqual(getOwnPropertyDescriptor(O, j), void 8, 'getOwnPropertyDescriptor j'); assert.strictEqual(getOwnPropertyDescriptor(O, 'k'), void 8, 'getOwnPropertyDescriptor k'); assert.strictEqual(getOwnPropertyDescriptor(Object.prototype, 'toString').enumerable, false, 'getOwnPropertyDescriptor on Object.prototype'); assert.strictEqual(getOwnPropertyDescriptor(Object.prototype, d), void 8, 'getOwnPropertyDescriptor on Object.prototype missed symbol'); assert.strictEqual(keys(O).length, 2, 'Object.keys'); assert.strictEqual(getOwnPropertyNames(O).length, 3, 'Object.getOwnPropertyNames'); assert.strictEqual(getOwnPropertySymbols(O).length, 3, 'Object.getOwnPropertySymbols'); assert.strictEqual(core.Reflect.ownKeys(O).length, 6, 'Reflect.ownKeys'); delete O[e]; O[e] = 'e'; assert.deepEqual(getOwnPropertyDescriptor(O, e), { configurable: true, writable: true, enumerable: true, value: 'e' }, 'redefined non-enum key'); }); test('Symbols & Object.defineProperties', function(assert){ var ref$, defineProperty, defineProperties, c, d, D, O; ref$ = core.Object, defineProperty = ref$.defineProperty, defineProperties = ref$.defineProperties; c = core.Symbol('c'); d = core.Symbol('d'); D = (ref$ = { a: { value: 'a' } }, ref$[c] = { value: 'c' }, ref$); defineProperty(D, 'b', { value: { value: 'b' } }); defineProperty(D, d, { value: { value: 'd' } }); O = defineProperties({}, D); assert.strictEqual(O.a, 'a', 'a'); assert.strictEqual(O.b, void 8, 'b'); assert.strictEqual(O[c], 'c', 'c'); assert.strictEqual(O[d], void 8, 'd'); }); test('Symbols & Object.create', function(assert){ var ref$, defineProperty, create, c, d, D, O; ref$ = core.Object, defineProperty = ref$.defineProperty, create = ref$.create; c = core.Symbol('c'); d = core.Symbol('d'); D = (ref$ = { a: { value: 'a' } }, ref$[c] = { value: 'c' }, ref$); defineProperty(D, 'b', { value: { value: 'b' } }); defineProperty(D, d, { value: { value: 'd' } }); O = create(null, D); assert.strictEqual(O.a, 'a', 'a'); assert.strictEqual(O.b, void 8, 'b'); assert.strictEqual(O[c], 'c', 'c'); assert.strictEqual(O[d], void 8, 'd'); }); for (i$ = 0, len$ = (ref$ = ['Map', 'Set', 'Promise']).length; i$ < len$; ++i$) { $key = ref$[i$]; (fn$.call(this, $key)); } test("Array@@species", function(assert){ var C; assert.strictEqual(Array[core.Symbol.species], Array, "Array@@species === Array"); C = core.Object.create(Array); assert.strictEqual(C[core.Symbol.species], C, "Array sub"); }); } function clone$(it){ function fun(){} fun.prototype = it; return new fun; } function fn$(key){ test(key + "@@species", function(assert){ var C; assert.strictEqual(core[key][core.Symbol.species], core[key], key + "@@species === " + key); C = core.Object.create(core[key]); assert.strictEqual(C[core.Symbol.species], C, key + " sub"); }); } }).call(this); // Generated by LiveScript 1.4.0 (function(){ var module, test; module = QUnit.module, test = QUnit.test; module('ES6'); test('ArrayBuffer', function(assert){ var ArrayBuffer, b, ref$; ArrayBuffer = core.ArrayBuffer; assert.same(ArrayBuffer, Object(ArrayBuffer), 'is object'); b = new ArrayBuffer(123); assert.same(b.byteLength, 123, 'length'); assert.throws(function(){ new ArrayBuffer(-1); }, RangeError, 'negative length'); assert.throws(function(){ new ArrayBuffer(0.5); }, RangeError, 'fractional length'); assert.throws(function(){ new ArrayBuffer(); }, RangeError, 'missed length'); assert.throws(function(){ new ArrayBuffer(core.Number.MAX_SAFE_INTEGER + 1); }, RangeError, 'absurd length'); DESCRIPTORS && assert.same(ArrayBuffer[(ref$ = core.Symbol) != null ? ref$.species : void 8], ArrayBuffer, '@@species'); }); }).call(this); // Generated by LiveScript 1.4.0 (function(){ var module, test; module = QUnit.module, test = QUnit.test; module('ES6'); test('ArrayBuffer.isView', function(assert){ var ArrayBuffer, DataView, isView, i$, x$, ref$, len$, y$; ArrayBuffer = core.ArrayBuffer, DataView = core.DataView; isView = ArrayBuffer.isView; assert.isFunction(isView); assert.arity(isView, 1); for (i$ = 0, len$ = (ref$ = ['Float32Array', 'Float64Array', 'Int8Array', 'Int16Array', 'Int32Array', 'Uint8Array', 'Uint16Array', 'Uint32Array', 'Uint8ClampedArray']).length; i$ < len$; ++i$) { x$ = ref$[i$]; if (core[x$]) { assert.same(isView(new core[x$]([1])), true, x$ + " - true"); } } assert.same(isView(new DataView(new ArrayBuffer(1))), true, "DataView - true"); assert.same(isView(new ArrayBuffer(1)), false, "ArrayBuffer - false"); for (i$ = 0, len$ = (ref$ = [void 8, null, false, true, 0, 1, '', 'qwe', {}, [], fn$]).length; i$ < len$; ++i$) { y$ = ref$[i$]; assert.same(isView(y$), false, y$ + " - false"); } function fn$(){} }); }).call(this); // Generated by LiveScript 1.4.0 (function(){ var module, test; module = QUnit.module, test = QUnit.test; module('ES6'); test('ArrayBuffer#slice', function(assert){ var ArrayBuffer, slice, buffer; ArrayBuffer = core.ArrayBuffer; slice = ArrayBuffer.slice; assert.isFunction(slice); buffer = arrayToBuffer([1, 2, 3, 4, 5]); assert.ok(buffer instanceof ArrayBuffer, 'correct buffer'); assert.ok(slice(buffer) !== buffer, 'returns new buffer'); assert.ok(slice(buffer) instanceof ArrayBuffer, 'correct instance'); assert.arrayEqual(bufferToArray(slice(buffer)), [1, 2, 3, 4, 5]); assert.arrayEqual(bufferToArray(slice(buffer, 1, 3)), [2, 3]); assert.arrayEqual(bufferToArray(slice(buffer, 1, void 8)), [2, 3, 4, 5]); assert.arrayEqual(bufferToArray(slice(buffer, 1, -1)), [2, 3, 4]); assert.arrayEqual(bufferToArray(slice(buffer, -2, -1)), [4]); assert.arrayEqual(bufferToArray(slice(buffer, -2, -3)), []); }); }).call(this); // Generated by LiveScript 1.4.0 (function(){ var module, test, ref$, keys, getOwnPropertyDescriptor, defineProperty, ArrayBuffer, $name, $bytes; module = QUnit.module, test = QUnit.test; ref$ = core.Object, keys = ref$.keys, getOwnPropertyDescriptor = ref$.getOwnPropertyDescriptor, defineProperty = ref$.defineProperty; module('ES6'); if (DESCRIPTORS) { ArrayBuffer = core.ArrayBuffer; for ($name in ref$ = { Float32Array: 4, Float64Array: 8, Int8Array: 1, Int16Array: 2, Int32Array: 4, Uint8Array: 1, Uint16Array: 2, Uint32Array: 4, Uint8ClampedArray: 1 }) { $bytes = ref$[$name]; (fn$.call(this, $name, $bytes)); } } function import$(obj, src){ var own = {}.hasOwnProperty; for (var key in src) if (own.call(src, key)) obj[key] = src[key]; return obj; } function fn$(name, bytes){ var Typed, NATIVE_OR_ISNT_UINT8, this$ = this; Typed = core[name]; NATIVE_OR_ISNT_UINT8 = NATIVE || name !== 'Uint8Array'; test(name + " constructor", function(assert){ var a, e, b, ref$; assert.isFunction(Typed); assert.same(Typed.BYTES_PER_ELEMENT, bytes, name + ".BYTES_PER_ELEMENT"); a = new Typed(4); assert.same(a.BYTES_PER_ELEMENT, bytes, '#BYTES_PER_ELEMENT'); assert.same(a.byteOffset, 0, name + '#byteOffset, passed number'); assert.same(a.byteLength, 4 * bytes, '#byteLength, passed number'); assert.arrayEqual(a, [0, 0, 0, 0], 'correct values, passed number'); try { a = new Typed('0x4'); assert.same(a.byteOffset, 0, '#byteOffset, passed string'); assert.same(a.byteLength, 4 * bytes, '#byteLength, passed string'); assert.arrayEqual(a, [0, 0, 0, 0], 'correct values, passed string'); } catch (e$) { e = e$; assert.same(e, [0, 0, 0, 0], 'passed string'); } try { a = new Typed(true); assert.same(a.byteOffset, 0, '#byteOffset, passed boolean'); assert.same(a.byteLength, 1 * bytes, '#byteLength, passed boolean'); assert.arrayEqual(a, [0], 'correct values, passed boolean'); } catch (e$) { e = e$; assert.same(e, [0], 'passed boolean'); } assert.throws(function(){ new Typed; }, TypeError, 'throws without argument'); assert.throws(function(){ new Typed(void 8); }, TypeError, 'throws on undefined'); NATIVE_OR_ISNT_UINT8 && assert.throws(function(){ new Typed(1.5); }, RangeError, 'throws on 1.5'); NATIVE_OR_ISNT_UINT8 && assert.throws(function(){ new Typed(-1); }, RangeError, 'throws on -1'); NATIVE_OR_ISNT_UINT8 && assert.throws(function(){ new Typed(-0); }, RangeError, 'throws on -0'); NATIVE_OR_ISNT_UINT8 && assert.throws(function(){ new Typed(NaN); }, RangeError, 'throws on NaN'); try { a = new Typed(null); assert.same(a.byteOffset, 0, '#byteOffset, passed null'); assert.same(a.byteLength, 0, '#byteLength, passed null'); assert.arrayEqual(a, [], 'correct values, passed null'); } catch (e$) { e = e$; assert.same(e, [], 'passed null'); } a = new Typed([1, 2, 3, 4]); assert.same(a.byteOffset, 0, '#byteOffset, passed array'); assert.same(a.byteLength, 4 * bytes, '#byteLength, passed array'); assert.arrayEqual(a, [1, 2, 3, 4], 'correct values, passed array'); a = new Typed({ 0: 1, 1: 2, 2: 3, 3: 4, length: 4 }); assert.same(a.byteOffset, 0, '#byteOffset, passed array-like'); assert.same(a.byteLength, 4 * bytes, '#byteLength, passed array-like'); assert.arrayEqual(a, [1, 2, 3, 4], 'correct values, passed array-like'); try { a = new Typed({}); assert.same(a.byteOffset, 0, '#byteOffset, passed empty object (also array-like case)'); assert.same(a.byteLength, 0, '#byteLength, passed empty object (also array-like case)'); assert.arrayEqual(a, [], 'correct values, passed empty object (also array-like case)'); } catch (e$) { e = e$; assert.same(e, [], 'passed empty object (also array-like case)'); } try { a = new Typed(createIterable([1, 2, 3, 4])); assert.same(a.byteOffset, 0, '#byteOffset, passed iterable'); assert.same(a.byteLength, 4 * bytes, '#byteLength, passed iterable'); assert.arrayEqual(a, [1, 2, 3, 4], 'correct values, passed iterable'); } catch (e$) { e = e$; assert.same(e, [1, 2, 3, 4], 'passed iterable'); } a = new Typed(new Typed([1, 2, 3, 4])); assert.same(a.byteOffset, 0, '#byteOffset, passed typed array'); assert.same(a.byteLength, 4 * bytes, '#byteLength, passed typed array'); assert.arrayEqual(a, [1, 2, 3, 4], 'correct values, passed typed array'); b = new Typed([1, 2, 3, 4]); b[typeof Symbol != 'undefined' && Symbol !== null ? Symbol.iterator : void 8] = function(){ return createIterable([4, 3, 2, 1])[typeof Symbol != 'undefined' && Symbol !== null ? Symbol.iterator : void 8](); }; a = new Typed(b); assert.same(a.byteOffset, 0, '#byteOffset, passed typed array with custom iterator'); assert.same(a.byteLength, 4 * bytes, '#byteLength, passed typed array with custom iterator'); assert.arrayEqual(a, [1, 2, 3, 4], 'correct values, passed typed array with custom iterator'); a = new Typed(new ArrayBuffer(8)); assert.same(a.byteOffset, 0, '#byteOffset, passed buffer'); assert.same(a.byteLength, 8, '#byteLength, passed buffer'); assert.same(a.length, 8 / bytes, 'correct length, passed buffer'); a = new Typed(new ArrayBuffer(16), 8); assert.same(a.byteOffset, 8, '#byteOffset, passed buffer and byteOffset'); assert.same(a.byteLength, 8, '#byteLength, passed buffer and byteOffset'); assert.same(a.length, 8 / bytes, 'correct length, passed buffer and byteOffset'); a = new Typed(new ArrayBuffer(24), 8, 8 / bytes); assert.same(a.byteOffset, 8, '#byteOffset, passed buffer, byteOffset and length'); assert.same(a.byteLength, 8, '#byteLength, passed buffer, byteOffset and length'); assert.same(a.length, 8 / bytes, 'correct length, passed buffer, byteOffset and length'); a = new Typed(new ArrayBuffer(8), void 8); assert.same(a.byteOffset, 0, '#byteOffset, passed buffer and undefined'); assert.same(a.byteLength, 8, '#byteLength, passed buffer and undefined'); assert.same(a.length, 8 / bytes, 'correct length, passed buffer and undefined'); a = new Typed(new ArrayBuffer(16), 8, void 8); assert.same(a.byteOffset, 8, '#byteOffset, passed buffer, byteOffset and undefined'); assert.same(a.byteLength, 8, '#byteLength, passed buffer, byteOffset and undefined'); assert.same(a.length, 8 / bytes, 'correct length, passed buffer, byteOffset and undefined'); a = new Typed(new ArrayBuffer(8), 8); assert.same(a.byteOffset, 8, '#byteOffset, passed buffer and byteOffset with buffer length'); assert.same(a.byteLength, 0, '#byteLength, passed buffer and byteOffset with buffer length'); assert.arrayEqual(a, [], 'correct values, passed buffer and byteOffset with buffer length'); assert.throws(function(){ new Typed(new ArrayBuffer(8), -1); }, RangeError, 'If offset < 0, throw a RangeError exception'); if (bytes !== 1) { assert.throws(function(){ new Typed(new ArrayBuffer(8), 3); }, RangeError, 'If offset modulo elementSize ≠ 0, throw a RangeError exception'); } if (NATIVE) { if (bytes !== 1) { assert.throws(function(){ new Typed(new ArrayBuffer(9)); }, RangeError, 'If bufferByteLength modulo elementSize ≠ 0, throw a RangeError exception'); } assert.throws(function(){ new Typed(new ArrayBuffer(8), 16); }, RangeError, 'If newByteLength < 0, throw a RangeError exception'); assert.throws(function(){ new Typed(new ArrayBuffer(24), 8, 24); }, RangeError, 'If offset+newByteLength > bufferByteLength, throw a RangeError exception'); } else { assert.throws(function(){ new Typed(new ArrayBuffer(8), 16); }, 'If newByteLength < 0, throw a RangeError exception'); assert.throws(function(){ new Typed(new ArrayBuffer(24), 8, 24); }, 'If offset+newByteLength > bufferByteLength, throw a RangeError exception'); } assert.throws(function(){ Typed(1); }, TypeError, 'throws without `new`'); assert.same(Typed[(ref$ = core.Symbol) != null ? ref$.species : void 8], Typed, '@@species'); }); test(name + " descriptors", function(assert){ var typed, desc, base, key, e; typed = new Typed(2); desc = getOwnPropertyDescriptor(typed, 0); base = NATIVE ? { writable: true, enumerable: true, configurable: false } : { writable: desc.writable, enumerable: true, configurable: desc.configurable }; NATIVE && assert.arrayEqual((function(){ var results$ = []; for (key in typed) { results$.push(key); } return results$; }()), ['0', '1'], 'for-in'); NATIVE && assert.arrayEqual(keys(typed), ['0', '1'], 'Object.keys'); assert.deepEqual(getOwnPropertyDescriptor(typed, 0), import$({ value: 0 }, base), 'Object.getOwnPropertyDescriptor'); if (NATIVE) { defineProperty(typed, 0, { value: 1, writable: true, enumerable: true, configurable: false }); typed[0] = typed[1] = 2.5; assert.deepEqual(getOwnPropertyDescriptor(typed, 0), import$({ value: typed[1] }, base), 'Object.defineProperty, valid descriptor #1'); defineProperty(typed, 0, { value: 1 }); typed[0] = typed[1] = 3.5; assert.deepEqual(getOwnPropertyDescriptor(typed, 0), import$({ value: typed[1] }, base), 'Object.defineProperty, valid descriptor #2'); } NATIVE && (function(){ try { defineProperty(typed, 0, { value: 2, writable: false, enumerable: true, configurable: false }); return assert.ok(false, 'Object.defineProperty, invalid descriptor #1'); } catch (e$) { e = e$; return assert.ok(true, 'Object.defineProperty, invalid descriptor #1'); } }()); NATIVE && (function(){ try { defineProperty(typed, 0, { value: 2, writable: true, enumerable: false, configurable: false }); return assert.ok(false, 'Object.defineProperty, invalid descriptor #2'); } catch (e$) { e = e$; return assert.ok(true, 'Object.defineProperty, invalid descriptor #2'); } }()); NATIVE && (function(){ try { defineProperty(typed, 0, { get: function(){ return 2; } }); return assert.ok(false, 'Object.defineProperty, invalid descriptor #3'); } catch (e$) { e = e$; return assert.ok(true, 'Object.defineProperty, invalid descriptor #3'); } }()); try { defineProperty(typed, 0, { value: 2, get: function(){ return 2; } }); assert.ok(false, 'Object.defineProperty, invalid descriptor #4'); } catch (e$) { e = e$; assert.ok(true, 'Object.defineProperty, invalid descriptor #4'); } }); } }).call(this); // Generated by LiveScript 1.4.0 (function(){ var module, test; module = QUnit.module, test = QUnit.test; module('ES6'); DESCRIPTORS && test('Float32 conversions', function(assert){ var Uint8Array, DataView, NAME, ARRAY, Typed, SET, GET, data, typed, uint8, view, viewFrom, z, i$, len$, ref$, value, conversion, little, big, rep; Uint8Array = core.Uint8Array, DataView = core.DataView; NAME = 'Float32'; ARRAY = NAME + 'Array'; Typed = core[ARRAY]; SET = 'set' + NAME; GET = 'get' + NAME; data = [[0, 0, [0, 0, 0, 0]], [-0, -0, [0, 0, 0, 128]], [1, 1, [0, 0, 128, 63]], [-1, -1, [0, 0, 128, 191]], [1.1, 1.100000023841858, [205, 204, 140, 63]], [-1.1, -1.100000023841858, [205, 204, 140, 191]], [1.9, 1.899999976158142, [51, 51, 243, 63]], [-1.9, -1.899999976158142, [51, 51, 243, 191]], [127, 127, [0, 0, 254, 66]], [-127, -127, [0, 0, 254, 194]], [128, 128, [0, 0, 0, 67]], [-128, -128, [0, 0, 0, 195]], [255, 255, [0, 0, 127, 67]], [-255, -255, [0, 0, 127, 195]], [255.1, 255.10000610351562, [154, 25, 127, 67]], [255.9, 255.89999389648438, [102, 230, 127, 67]], [256, 256, [0, 0, 128, 67]], [32767, 32767, [0, 254, 255, 70]], [-32767, -32767, [0, 254, 255, 198]], [32768, 32768, [0, 0, 0, 71]], [-32768, -32768, [0, 0, 0, 199]], [65535, 65535, [0, 255, 127, 71]], [65536, 65536, [0, 0, 128, 71]], [65537, 65537, [128, 0, 128, 71]], [65536.54321, 65536.546875, [70, 0, 128, 71]], [-65536.54321, -65536.546875, [70, 0, 128, 199]], [2147483647, 2147483648, [0, 0, 0, 79]], [-2147483647, -2147483648, [0, 0, 0, 207]], [2147483648, 2147483648, [0, 0, 0, 79]], [-2147483648, -2147483648, [0, 0, 0, 207]], [2147483649, 2147483648, [0, 0, 0, 79]], [-2147483649, -2147483648, [0, 0, 0, 207]], [4294967295, 4294967296, [0, 0, 128, 79]], [4294967296, 4294967296, [0, 0, 128, 79]], [4294967297, 4294967296, [0, 0, 128, 79]], [9007199254740991, 9007199254740992, [0, 0, 0, 90]], [-9007199254740991, -9007199254740992, [0, 0, 0, 218]], [9007199254740992, 9007199254740992, [0, 0, 0, 90]], [-9007199254740992, -9007199254740992, [0, 0, 0, 218]], [9007199254740994, 9007199254740992, [0, 0, 0, 90]], [-9007199254740994, -9007199254740992, [0, 0, 0, 218]], [Infinity, Infinity, [0, 0, 128, 127]], [-Infinity, -Infinity, [0, 0, 128, 255]], [1.7976931348623157e+308, Infinity, [0, 0, 128, 127]], [-1.7976931348623157e+308, -Infinity, [0, 0, 128, 255]], [5e-324, 0, [0, 0, 0, 0]], [-5e-324, -0, [0, 0, 0, 128]]]; typed = new Typed(1); uint8 = new Uint8Array(typed.buffer); view = new DataView(typed.buffer); viewFrom = function(it){ return new DataView(new Uint8Array(it).buffer); }; z = function(it){ if (it === 0 && 1 / it === -Infinity) { return '-0'; } else { return it; } }; for (i$ = 0, len$ = data.length; i$ < len$; ++i$) { ref$ = data[i$], value = ref$[0], conversion = ref$[1], little = ref$[2]; big = little.slice().reverse(); rep = LITTLE_ENDIAN ? little : big; typed[0] = value; assert.same(typed[0], conversion, ARRAY + " " + z(value) + " -> " + z(conversion)); assert.arrayEqual(uint8, rep, ARRAY + " " + z(value) + " -> [" + rep + "]"); view[SET](0, value); assert.arrayEqual(uint8, big, "view." + SET + "(0, " + z(value) + ") -> [" + big + "]"); assert.same(viewFrom(big)[GET](0), conversion, "view{" + big + "}." + GET + "(0) -> " + z(conversion)); view[SET](0, value, false); assert.arrayEqual(uint8, big, "view." + SET + "(0, " + z(value) + ", false) -> [" + big + "]"); assert.same(viewFrom(big)[GET](0, false), conversion, "view{" + big + "}." + GET + "(0, false) -> " + z(conversion)); view[SET](0, value, true); assert.arrayEqual(uint8, little, "view." + SET + "(0, " + z(value) + ", true) -> [" + little + "]"); assert.same(viewFrom(little)[GET](0, true), conversion, "view{" + little + "}." + GET + "(0, true) -> " + z(conversion)); } typed[0] = NaN; assert.same(typed[0], NaN, "NaN -> NaN"); }); }).call(this); // Generated by LiveScript 1.4.0 (function(){ var module, test; module = QUnit.module, test = QUnit.test; module('ES6'); DESCRIPTORS && test('Float64 conversions', function(assert){ var Uint8Array, DataView, NAME, ARRAY, Typed, SET, GET, data, typed, uint8, view, viewFrom, z, i$, len$, ref$, value, conversion, little, big, rep; Uint8Array = core.Uint8Array, DataView = core.DataView; NAME = 'Float64'; ARRAY = NAME + 'Array'; Typed = core[ARRAY]; SET = 'set' + NAME; GET = 'get' + NAME; data = [[0, 0, [0, 0, 0, 0, 0, 0, 0, 0]], [-0, -0, [0, 0, 0, 0, 0, 0, 0, 128]], [1, 1, [0, 0, 0, 0, 0, 0, 240, 63]], [-1, -1, [0, 0, 0, 0, 0, 0, 240, 191]], [1.1, 1.1, [154, 153, 153, 153, 153, 153, 241, 63]], [-1.1, -1.1, [154, 153, 153, 153, 153, 153, 241, 191]], [1.9, 1.9, [102, 102, 102, 102, 102, 102, 254, 63]], [-1.9, -1.9, [102, 102, 102, 102, 102, 102, 254, 191]], [127, 127, [0, 0, 0, 0, 0, 192, 95, 64]], [-127, -127, [0, 0, 0, 0, 0, 192, 95, 192]], [128, 128, [0, 0, 0, 0, 0, 0, 96, 64]], [-128, -128, [0, 0, 0, 0, 0, 0, 96, 192]], [255, 255, [0, 0, 0, 0, 0, 224, 111, 64]], [-255, -255, [0, 0, 0, 0, 0, 224, 111, 192]], [255.1, 255.1, [51, 51, 51, 51, 51, 227, 111, 64]], [255.9, 255.9, [205, 204, 204, 204, 204, 252, 111, 64]], [256, 256, [0, 0, 0, 0, 0, 0, 112, 64]], [32767, 32767, [0, 0, 0, 0, 192, 255, 223, 64]], [-32767, -32767, [0, 0, 0, 0, 192, 255, 223, 192]], [32768, 32768, [0, 0, 0, 0, 0, 0, 224, 64]], [-32768, -32768, [0, 0, 0, 0, 0, 0, 224, 192]], [65535, 65535, [0, 0, 0, 0, 224, 255, 239, 64]], [65536, 65536, [0, 0, 0, 0, 0, 0, 240, 64]], [65537, 65537, [0, 0, 0, 0, 16, 0, 240, 64]], [65536.54321, 65536.54321, [14, 248, 252, 176, 8, 0, 240, 64]], [-65536.54321, -65536.54321, [14, 248, 252, 176, 8, 0, 240, 192]], [2147483647, 2147483647, [0, 0, 192, 255, 255, 255, 223, 65]], [-2147483647, -2147483647, [0, 0, 192, 255, 255, 255, 223, 193]], [2147483648, 2147483648, [0, 0, 0, 0, 0, 0, 224, 65]], [-2147483648, -2147483648, [0, 0, 0, 0, 0, 0, 224, 193]], [2147483649, 2147483649, [0, 0, 32, 0, 0, 0, 224, 65]], [-2147483649, -2147483649, [0, 0, 32, 0, 0, 0, 224, 193]], [4294967295, 4294967295, [0, 0, 224, 255, 255, 255, 239, 65]], [4294967296, 4294967296, [0, 0, 0, 0, 0, 0, 240, 65]], [4294967297, 4294967297, [0, 0, 16, 0, 0, 0, 240, 65]], [9007199254740991, 9007199254740991, [255, 255, 255, 255, 255, 255, 63, 67]], [-9007199254740991, -9007199254740991, [255, 255, 255, 255, 255, 255, 63, 195]], [9007199254740992, 9007199254740992, [0, 0, 0, 0, 0, 0, 64, 67]], [-9007199254740992, -9007199254740992, [0, 0, 0, 0, 0, 0, 64, 195]], [9007199254740994, 9007199254740994, [1, 0, 0, 0, 0, 0, 64, 67]], [-9007199254740994, -9007199254740994, [1, 0, 0, 0, 0, 0, 64, 195]], [Infinity, Infinity, [0, 0, 0, 0, 0, 0, 240, 127]], [-Infinity, -Infinity, [0, 0, 0, 0, 0, 0, 240, 255]], [-1.7976931348623157e+308, -1.7976931348623157e+308, [255, 255, 255, 255, 255, 255, 239, 255]], [1.7976931348623157e+308, 1.7976931348623157e+308, [255, 255, 255, 255, 255, 255, 239, 127]], [5e-324, 5e-324, [1, 0, 0, 0, 0, 0, 0, 0]], [-5e-324, -5e-324, [1, 0, 0, 0, 0, 0, 0, 128]]]; typed = new Typed(1); uint8 = new Uint8Array(typed.buffer); view = new DataView(typed.buffer); viewFrom = function(it){ return new DataView(new Uint8Array(it).buffer); }; z = function(it){ if (it === 0 && 1 / it === -Infinity) { return '-0'; } else { return it; } }; for (i$ = 0, len$ = data.length; i$ < len$; ++i$) { ref$ = data[i$], value = ref$[0], conversion = ref$[1], little = ref$[2]; big = little.slice().reverse(); rep = LITTLE_ENDIAN ? little : big; typed[0] = value; assert.same(typed[0], conversion, ARRAY + " " + z(value) + " -> " + z(conversion)); assert.arrayEqual(uint8, rep, ARRAY + " " + z(value) + " -> [" + rep + "]"); view[SET](0, value); assert.arrayEqual(uint8, big, "view." + SET + "(0, " + z(value) + ") -> [" + big + "]"); assert.same(viewFrom(big)[GET](0), conversion, "view{" + big + "}." + GET + "(0) -> " + z(conversion)); view[SET](0, value, false); assert.arrayEqual(uint8, big, "view." + SET + "(0, " + z(value) + ", false) -> [" + big + "]"); assert.same(viewFrom(big)[GET](0, false), conversion, "view{" + big + "}." + GET + "(0, false) -> " + z(conversion)); view[SET](0, value, true); assert.arrayEqual(uint8, little, "view." + SET + "(0, " + z(value) + ", true) -> [" + little + "]"); assert.same(viewFrom(little)[GET](0, true), conversion, "view{" + little + "}." + GET + "(0, true) -> " + z(conversion)); } typed[0] = NaN; assert.same(typed[0], NaN, "NaN -> NaN"); }); }).call(this); // Generated by LiveScript 1.4.0 (function(){ var module, test; module = QUnit.module, test = QUnit.test; module('ES6'); DESCRIPTORS && test('Int16 conversions', function(assert){ var Uint8Array, DataView, NAME, ARRAY, Typed, SET, GET, data, typed, uint8, view, viewFrom, z, i$, len$, ref$, value, conversion, little, big, rep; Uint8Array = core.Uint8Array, DataView = core.DataView; NAME = 'Int16'; ARRAY = NAME + 'Array'; Typed = core[ARRAY]; SET = 'set' + NAME; GET = 'get' + NAME; data = [[0, 0, [0, 0]], [-0, 0, [0, 0]], [1, 1, [1, 0]], [-1, -1, [255, 255]], [1.1, 1, [1, 0]], [-1.1, -1, [255, 255]], [1.9, 1, [1, 0]], [-1.9, -1, [255, 255]], [127, 127, [127, 0]], [-127, -127, [129, 255]], [128, 128, [128, 0]], [-128, -128, [128, 255]], [255, 255, [255, 0]], [-255, -255, [1, 255]], [255.1, 255, [255, 0]], [255.9, 255, [255, 0]], [256, 256, [0, 1]], [32767, 32767, [255, 127]], [-32767, -32767, [1, 128]], [32768, -32768, [0, 128]], [-32768, -32768, [0, 128]], [65535, -1, [255, 255]], [65536, 0, [0, 0]], [65537, 1, [1, 0]], [65536.54321, 0, [0, 0]], [-65536.54321, 0, [0, 0]], [2147483647, -1, [255, 255]], [-2147483647, 1, [1, 0]], [2147483648, 0, [0, 0]], [-2147483648, 0, [0, 0]], [4294967296, 0, [0, 0]], [9007199254740992, 0, [0, 0]], [-9007199254740992, 0, [0, 0]], [Infinity, 0, [0, 0]], [-Infinity, 0, [0, 0]], [-1.7976931348623157e+308, 0, [0, 0]], [1.7976931348623157e+308, 0, [0, 0]], [5e-324, 0, [0, 0]], [-5e-324, 0, [0, 0]], [NaN, 0, [0, 0]]]; if (NATIVE || !/Android [2-4]/.test(typeof navigator != 'undefined' && navigator !== null ? navigator.userAgent : void 8)) { data = data.concat([[2147483649, 1, [1, 0]], [-2147483649, -1, [255, 255]], [4294967295, -1, [255, 255]], [4294967297, 1, [1, 0]], [9007199254740991, -1, [255, 255]], [-9007199254740991, 1, [1, 0]], [9007199254740994, 2, [2, 0]], [-9007199254740994, -2, [254, 255]]]); } typed = new Typed(1); uint8 = new Uint8Array(typed.buffer); view = new DataView(typed.buffer); viewFrom = function(it){ return new DataView(new Uint8Array(it).buffer); }; z = function(it){ if (it === 0 && 1 / it === -Infinity) { return '-0'; } else { return it; } }; for (i$ = 0, len$ = data.length; i$ < len$; ++i$) { ref$ = data[i$], value = ref$[0], conversion = ref$[1], little = ref$[2]; big = little.slice().reverse(); rep = LITTLE_ENDIAN ? little : big; typed[0] = value; assert.same(typed[0], conversion, ARRAY + " " + z(value) + " -> " + z(conversion)); assert.arrayEqual(uint8, rep, ARRAY + " " + z(value) + " -> [" + rep + "]"); view[SET](0, value); assert.arrayEqual(uint8, big, "view." + SET + "(0, " + z(value) + ") -> [" + big + "]"); assert.same(viewFrom(big)[GET](0), conversion, "view{" + big + "}." + GET + "(0) -> " + z(conversion)); view[SET](0, value, false); assert.arrayEqual(uint8, big, "view." + SET + "(0, " + z(value) + ", false) -> [" + big + "]"); assert.same(viewFrom(big)[GET](0, false), conversion, "view{" + big + "}." + GET + "(0, false) -> " + z(conversion)); view[SET](0, value, true); assert.arrayEqual(uint8, little, "view." + SET + "(0, " + z(value) + ", true) -> [" + little + "]"); assert.same(viewFrom(little)[GET](0, true), conversion, "view{" + little + "}." + GET + "(0, true) -> " + z(conversion)); } }); }).call(this); // Generated by LiveScript 1.4.0 (function(){ var module, test; module = QUnit.module, test = QUnit.test; module('ES6'); DESCRIPTORS && test('Int32 conversions', function(assert){ var Uint8Array, DataView, NAME, ARRAY, Typed, SET, GET, data, typed, uint8, view, viewFrom, z, i$, len$, ref$, value, conversion, little, big, rep; Uint8Array = core.Uint8Array, DataView = core.DataView; NAME = 'Int32'; ARRAY = NAME + 'Array'; Typed = core[ARRAY]; SET = 'set' + NAME; GET = 'get' + NAME; data = [[0, 0, [0, 0, 0, 0]], [-0, 0, [0, 0, 0, 0]], [1, 1, [1, 0, 0, 0]], [-1, -1, [255, 255, 255, 255]], [1.1, 1, [1, 0, 0, 0]], [-1.1, -1, [255, 255, 255, 255]], [1.9, 1, [1, 0, 0, 0]], [-1.9, -1, [255, 255, 255, 255]], [127, 127, [127, 0, 0, 0]], [-127, -127, [129, 255, 255, 255]], [128, 128, [128, 0, 0, 0]], [-128, -128, [128, 255, 255, 255]], [255, 255, [255, 0, 0, 0]], [-255, -255, [1, 255, 255, 255]], [255.1, 255, [255, 0, 0, 0]], [255.9, 255, [255, 0, 0, 0]], [256, 256, [0, 1, 0, 0]], [32767, 32767, [255, 127, 0, 0]], [-32767, -32767, [1, 128, 255, 255]], [32768, 32768, [0, 128, 0, 0]], [-32768, -32768, [0, 128, 255, 255]], [65535, 65535, [255, 255, 0, 0]], [65536, 65536, [0, 0, 1, 0]], [65537, 65537, [1, 0, 1, 0]], [65536.54321, 65536, [0, 0, 1, 0]], [-65536.54321, -65536, [0, 0, 255, 255]], [2147483647, 2147483647, [255, 255, 255, 127]], [-2147483647, -2147483647, [1, 0, 0, 128]], [2147483648, -2147483648, [0, 0, 0, 128]], [-2147483648, -2147483648, [0, 0, 0, 128]], [2147483649, -2147483647, [1, 0, 0, 128]], [-2147483649, 2147483647, [255, 255, 255, 127]], [4294967295, -1, [255, 255, 255, 255]], [4294967296, 0, [0, 0, 0, 0]], [4294967297, 1, [1, 0, 0, 0]], [9007199254740991, -1, [255, 255, 255, 255]], [-9007199254740991, 1, [1, 0, 0, 0]], [9007199254740992, 0, [0, 0, 0, 0]], [-9007199254740992, 0, [0, 0, 0, 0]], [9007199254740994, 2, [2, 0, 0, 0]], [-9007199254740994, -2, [254, 255, 255, 255]], [Infinity, 0, [0, 0, 0, 0]], [-Infinity, 0, [0, 0, 0, 0]], [-1.7976931348623157e+308, 0, [0, 0, 0, 0]], [1.7976931348623157e+308, 0, [0, 0, 0, 0]], [5e-324, 0, [0, 0, 0, 0]], [-5e-324, 0, [0, 0, 0, 0]], [NaN, 0, [0, 0, 0, 0]]]; typed = new Typed(1); uint8 = new Uint8Array(typed.buffer); view = new DataView(typed.buffer); viewFrom = function(it){ return new DataView(new Uint8Array(it).buffer); }; z = function(it){ if (it === 0 && 1 / it === -Infinity) { return '-0'; } else { return it; } }; for (i$ = 0, len$ = data.length; i$ < len$; ++i$) { ref$ = data[i$], value = ref$[0], conversion = ref$[1], little = ref$[2]; big = little.slice().reverse(); rep = LITTLE_ENDIAN ? little : big; typed[0] = value; assert.same(typed[0], conversion, ARRAY + " " + z(value) + " -> " + z(conversion)); assert.arrayEqual(uint8, rep, ARRAY + " " + z(value) + " -> [" + rep + "]"); view[SET](0, value); assert.arrayEqual(uint8, big, "view." + SET + "(0, " + z(value) + ") -> [" + big + "]"); assert.same(viewFrom(big)[GET](0), conversion, "view{" + big + "}." + GET + "(0) -> " + z(conversion)); view[SET](0, value, false); assert.arrayEqual(uint8, big, "view." + SET + "(0, " + z(value) + ", false) -> [" + big + "]"); assert.same(viewFrom(big)[GET](0, false), conversion, "view{" + big + "}." + GET + "(0, false) -> " + z(conversion)); view[SET](0, value, true); assert.arrayEqual(uint8, little, "view." + SET + "(0, " + z(value) + ", true) -> [" + little + "]"); assert.same(viewFrom(little)[GET](0, true), conversion, "view{" + little + "}." + GET + "(0, true) -> " + z(conversion)); } }); }).call(this); // Generated by LiveScript 1.4.0 (function(){ var module, test; module = QUnit.module, test = QUnit.test; module('ES6'); DESCRIPTORS && test('Int8 conversions', function(assert){ var Uint8Array, DataView, NAME, ARRAY, Typed, SET, GET, data, typed, uint8, view, viewFrom, z, i$, len$, ref$, value, conversion, little; Uint8Array = core.Uint8Array, DataView = core.DataView; NAME = 'Int8'; ARRAY = NAME + 'Array'; Typed = core[ARRAY]; SET = 'set' + NAME; GET = 'get' + NAME; data = [[0, 0, [0]], [-0, 0, [0]], [1, 1, [1]], [-1, -1, [255]], [1.1, 1, [1]], [-1.1, -1, [255]], [1.9, 1, [1]], [-1.9, -1, [255]], [127, 127, [127]], [-127, -127, [129]], [128, -128, [128]], [-128, -128, [128]], [255, -1, [255]], [-255, 1, [1]], [255.1, -1, [255]], [255.9, -1, [255]], [256, 0, [0]], [32767, -1, [255]], [-32767, 1, [1]], [32768, 0, [0]], [-32768, 0, [0]], [65535, -1, [255]], [65536, 0, [0]], [65537, 1, [1]], [65536.54321, 0, [0]], [-65536.54321, 0, [0]], [2147483647, -1, [255]], [-2147483647, 1, [1]], [2147483648, 0, [0]], [-2147483648, 0, [0]], [4294967296, 0, [0]], [9007199254740992, 0, [0]], [-9007199254740992, 0, [0]], [Infinity, 0, [0]], [-Infinity, 0, [0]], [-1.7976931348623157e+308, 0, [0]], [1.7976931348623157e+308, 0, [0]], [5e-324, 0, [0]], [-5e-324, 0, [0]], [NaN, 0, [0]]]; if (NATIVE || !/Android [2-4]/.test(typeof navigator != 'undefined' && navigator !== null ? navigator.userAgent : void 8)) { data = data.concat([[2147483649, 1, [1]], [-2147483649, -1, [255]], [4294967295, -1, [255]], [4294967297, 1, [1]], [9007199254740991, -1, [255]], [-9007199254740991, 1, [1]], [9007199254740994, 2, [2]], [-9007199254740994, -2, [254]]]); } typed = new Typed(1); uint8 = new Uint8Array(typed.buffer); view = new DataView(typed.buffer); viewFrom = function(it){ return new DataView(new Uint8Array(it).buffer); }; z = function(it){ if (it === 0 && 1 / it === -Infinity) { return '-0'; } else { return it; } }; for (i$ = 0, len$ = data.length; i$ < len$; ++i$) { ref$ = data[i$], value = ref$[0], conversion = ref$[1], little = ref$[2]; typed[0] = value; assert.same(typed[0], conversion, ARRAY + " " + z(value) + " -> " + z(conversion)); assert.arrayEqual(uint8, little, ARRAY + " " + z(value) + " -> [" + little + "]"); view[SET](0, value); assert.arrayEqual(uint8, little, "view." + SET + "(0, " + z(value) + ") -> [" + little + "]"); assert.same(viewFrom(little)[GET](0), conversion, "view{" + little + "}." + GET + "(0) -> " + z(conversion)); } }); }).call(this); // Generated by LiveScript 1.4.0 (function(){ var module, test; module = QUnit.module, test = QUnit.test; module('ES6'); DESCRIPTORS && test('Uint16 conversions', function(assert){ var Uint8Array, DataView, NAME, ARRAY, Typed, SET, GET, data, typed, uint8, view, viewFrom, z, i$, len$, ref$, value, conversion, little, big, rep; Uint8Array = core.Uint8Array, DataView = core.DataView; NAME = 'Uint16'; ARRAY = NAME + 'Array'; Typed = core[ARRAY]; SET = 'set' + NAME; GET = 'get' + NAME; data = [[0, 0, [0, 0]], [-0, 0, [0, 0]], [1, 1, [1, 0]], [-1, 65535, [255, 255]], [1.1, 1, [1, 0]], [-1.1, 65535, [255, 255]], [1.9, 1, [1, 0]], [-1.9, 65535, [255, 255]], [127, 127, [127, 0]], [-127, 65409, [129, 255]], [128, 128, [128, 0]], [-128, 65408, [128, 255]], [255, 255, [255, 0]], [-255, 65281, [1, 255]], [255.1, 255, [255, 0]], [255.9, 255, [255, 0]], [256, 256, [0, 1]], [32767, 32767, [255, 127]], [-32767, 32769, [1, 128]], [32768, 32768, [0, 128]], [-32768, 32768, [0, 128]], [65535, 65535, [255, 255]], [65536, 0, [0, 0]], [65537, 1, [1, 0]], [65536.54321, 0, [0, 0]], [-65536.54321, 0, [0, 0]], [2147483647, 65535, [255, 255]], [-2147483647, 1, [1, 0]], [2147483648, 0, [0, 0]], [-2147483648, 0, [0, 0]], [4294967296, 0, [0, 0]], [9007199254740992, 0, [0, 0]], [-9007199254740992, 0, [0, 0]], [Infinity, 0, [0, 0]], [-Infinity, 0, [0, 0]], [-1.7976931348623157e+308, 0, [0, 0]], [1.7976931348623157e+308, 0, [0, 0]], [5e-324, 0, [0, 0]], [-5e-324, 0, [0, 0]], [NaN, 0, [0, 0]]]; if (NATIVE || !/Android [2-4]/.test(typeof navigator != 'undefined' && navigator !== null ? navigator.userAgent : void 8)) { data = data.concat([[2147483649, 1, [1, 0]], [-2147483649, 65535, [255, 255]], [4294967295, 65535, [255, 255]], [4294967297, 1, [1, 0]], [9007199254740991, 65535, [255, 255]], [-9007199254740991, 1, [1, 0]], [9007199254740994, 2, [2, 0]], [-9007199254740994, 65534, [254, 255]]]); } typed = new Typed(1); uint8 = new Uint8Array(typed.buffer); view = new DataView(typed.buffer); viewFrom = function(it){ return new DataView(new Uint8Array(it).buffer); }; z = function(it){ if (it === 0 && 1 / it === -Infinity) { return '-0'; } else { return it; } }; for (i$ = 0, len$ = data.length; i$ < len$; ++i$) { ref$ = data[i$], value = ref$[0], conversion = ref$[1], little = ref$[2]; big = little.slice().reverse(); rep = LITTLE_ENDIAN ? little : big; typed[0] = value; assert.same(typed[0], conversion, ARRAY + " " + z(value) + " -> " + z(conversion)); assert.arrayEqual(uint8, rep, ARRAY + " " + z(value) + " -> [" + rep + "]"); view[SET](0, value); assert.arrayEqual(uint8, big, "view." + SET + "(0, " + z(value) + ") -> [" + big + "]"); assert.same(viewFrom(big)[GET](0), conversion, "view{" + big + "}." + GET + "(0) -> " + z(conversion)); view[SET](0, value, false); assert.arrayEqual(uint8, big, "view." + SET + "(0, " + z(value) + ", false) -> [" + big + "]"); assert.same(viewFrom(big)[GET](0, false), conversion, "view{" + big + "}." + GET + "(0, false) -> " + z(conversion)); view[SET](0, value, true); assert.arrayEqual(uint8, little, "view." + SET + "(0, " + z(value) + ", true) -> [" + little + "]"); assert.same(viewFrom(little)[GET](0, true), conversion, "view{" + little + "}." + GET + "(0, true) -> " + z(conversion)); } }); }).call(this); // Generated by LiveScript 1.4.0 (function(){ var module, test; module = QUnit.module, test = QUnit.test; module('ES6'); DESCRIPTORS && test('Uint32 conversions', function(assert){ var Uint8Array, DataView, NAME, ARRAY, Typed, SET, GET, data, typed, uint8, view, viewFrom, z, i$, len$, ref$, value, conversion, little, big, rep; Uint8Array = core.Uint8Array, DataView = core.DataView; NAME = 'Uint32'; ARRAY = NAME + 'Array'; Typed = core[ARRAY]; SET = 'set' + NAME; GET = 'get' + NAME; data = [[0, 0, [0, 0, 0, 0]], [-0, 0, [0, 0, 0, 0]], [1, 1, [1, 0, 0, 0]], [-1, 4294967295, [255, 255, 255, 255]], [1.1, 1, [1, 0, 0, 0]], [-1.1, 4294967295, [255, 255, 255, 255]], [1.9, 1, [1, 0, 0, 0]], [-1.9, 4294967295, [255, 255, 255, 255]], [127, 127, [127, 0, 0, 0]], [-127, 4294967169, [129, 255, 255, 255]], [128, 128, [128, 0, 0, 0]], [-128, 4294967168, [128, 255, 255, 255]], [255, 255, [255, 0, 0, 0]], [-255, 4294967041, [1, 255, 255, 255]], [255.1, 255, [255, 0, 0, 0]], [255.9, 255, [255, 0, 0, 0]], [256, 256, [0, 1, 0, 0]], [32767, 32767, [255, 127, 0, 0]], [-32767, 4294934529, [1, 128, 255, 255]], [32768, 32768, [0, 128, 0, 0]], [-32768, 4294934528, [0, 128, 255, 255]], [65535, 65535, [255, 255, 0, 0]], [65536, 65536, [0, 0, 1, 0]], [65537, 65537, [1, 0, 1, 0]], [65536.54321, 65536, [0, 0, 1, 0]], [-65536.54321, 4294901760, [0, 0, 255, 255]], [2147483647, 2147483647, [255, 255, 255, 127]], [-2147483647, 2147483649, [1, 0, 0, 128]], [2147483648, 2147483648, [0, 0, 0, 128]], [-2147483648, 2147483648, [0, 0, 0, 128]], [2147483649, 2147483649, [1, 0, 0, 128]], [-2147483649, 2147483647, [255, 255, 255, 127]], [4294967295, 4294967295, [255, 255, 255, 255]], [4294967296, 0, [0, 0, 0, 0]], [4294967297, 1, [1, 0, 0, 0]], [9007199254740991, 4294967295, [255, 255, 255, 255]], [-9007199254740991, 1, [1, 0, 0, 0]], [9007199254740992, 0, [0, 0, 0, 0]], [-9007199254740992, 0, [0, 0, 0, 0]], [9007199254740994, 2, [2, 0, 0, 0]], [-9007199254740994, 4294967294, [254, 255, 255, 255]], [Infinity, 0, [0, 0, 0, 0]], [-Infinity, 0, [0, 0, 0, 0]], [-1.7976931348623157e+308, 0, [0, 0, 0, 0]], [1.7976931348623157e+308, 0, [0, 0, 0, 0]], [5e-324, 0, [0, 0, 0, 0]], [-5e-324, 0, [0, 0, 0, 0]], [NaN, 0, [0, 0, 0, 0]]]; typed = new Typed(1); uint8 = new Uint8Array(typed.buffer); view = new DataView(typed.buffer); viewFrom = function(it){ return new DataView(new Uint8Array(it).buffer); }; z = function(it){ if (it === 0 && 1 / it === -Infinity) { return '-0'; } else { return it; } }; for (i$ = 0, len$ = data.length; i$ < len$; ++i$) { ref$ = data[i$], value = ref$[0], conversion = ref$[1], little = ref$[2]; big = little.slice().reverse(); rep = LITTLE_ENDIAN ? little : big; typed[0] = value; assert.same(typed[0], conversion, ARRAY + " " + z(value) + " -> " + z(conversion)); assert.arrayEqual(uint8, rep, ARRAY + " " + z(value) + " -> [" + rep + "]"); view[SET](0, value); assert.arrayEqual(uint8, big, "view." + SET + "(0, " + z(value) + ") -> [" + big + "]"); assert.same(viewFrom(big)[GET](0), conversion, "view{" + big + "}." + GET + "(0) -> " + z(conversion)); view[SET](0, value, false); assert.arrayEqual(uint8, big, "view." + SET + "(0, " + z(value) + ", false) -> [" + big + "]"); assert.same(viewFrom(big)[GET](0, false), conversion, "view{" + big + "}." + GET + "(0, false) -> " + z(conversion)); view[SET](0, value, true); assert.arrayEqual(uint8, little, "view." + SET + "(0, " + z(value) + ", true) -> [" + little + "]"); assert.same(viewFrom(little)[GET](0, true), conversion, "view{" + little + "}." + GET + "(0, true) -> " + z(conversion)); } }); }).call(this); // Generated by LiveScript 1.4.0 (function(){ var module, test; module = QUnit.module, test = QUnit.test; module('ES6'); DESCRIPTORS && test('Uint8Clamped conversions', function(assert){ var Uint8Array, DataView, NAME, ARRAY, Typed, data, typed, uint8, z, i$, len$, ref$, value, conversion, little; Uint8Array = core.Uint8Array, DataView = core.DataView; NAME = 'Uint8Clamped'; ARRAY = NAME + 'Array'; Typed = core[ARRAY]; data = [[0, 0, [0]], [-0, 0, [0]], [1, 1, [1]], [-1, 0, [0]], [1.1, 1, [1]], [-1.1, 0, [0]], [1.9, 2, [2]], [-1.9, 0, [0]], [127, 127, [127]], [-127, 0, [0]], [128, 128, [128]], [-128, 0, [0]], [255, 255, [255]], [-255, 0, [0]], [255.1, 255, [255]], [255.9, 255, [255]], [256, 255, [255]], [32767, 255, [255]], [-32767, 0, [0]], [32768, 255, [255]], [-32768, 0, [0]], [65535, 255, [255]], [65536, 255, [255]], [65537, 255, [255]], [65536.54321, 255, [255]], [-65536.54321, 0, [0]], [2147483647, 255, [255]], [-2147483647, 0, [0]], [2147483648, 255, [255]], [-2147483648, 0, [0]], [2147483649, 255, [255]], [-2147483649, 0, [0]], [4294967295, 255, [255]], [4294967296, 255, [255]], [4294967297, 255, [255]], [9007199254740991, 255, [255]], [-9007199254740991, 0, [0]], [9007199254740992, 255, [255]], [-9007199254740992, 0, [0]], [9007199254740994, 255, [255]], [-9007199254740994, 0, [0]], [Infinity, 255, [255]], [-Infinity, 0, [0]], [-1.7976931348623157e+308, 0, [0]], [1.7976931348623157e+308, 255, [255]], [5e-324, 0, [0]], [-5e-324, 0, [0]], [NaN, 0, [0]]]; typed = new Typed(1); uint8 = new Uint8Array(typed.buffer); z = function(it){ if (it === 0 && 1 / it === -Infinity) { return '-0'; } else { return it; } }; for (i$ = 0, len$ = data.length; i$ < len$; ++i$) { ref$ = data[i$], value = ref$[0], conversion = ref$[1], little = ref$[2]; typed[0] = value; assert.same(typed[0], conversion, z(value) + " -> " + z(conversion)); assert.arrayEqual(uint8, little, z(value) + " -> [" + little + "]"); } }); }).call(this); // Generated by LiveScript 1.4.0 (function(){ var module, test; module = QUnit.module, test = QUnit.test; module('ES6'); DESCRIPTORS && test('Uint8 conversions', function(assert){ var Uint8Array, DataView, NAME, ARRAY, Typed, SET, GET, data, typed, view, viewFrom, z, i$, len$, ref$, value, conversion, little; Uint8Array = core.Uint8Array, DataView = core.DataView; NAME = 'Uint8'; ARRAY = NAME + 'Array'; Typed = core[ARRAY]; SET = 'set' + NAME; GET = 'get' + NAME; data = [[0, 0, [0]], [-0, 0, [0]], [1, 1, [1]], [-1, 255, [255]], [1.1, 1, [1]], [-1.1, 255, [255]], [1.9, 1, [1]], [-1.9, 255, [255]], [127, 127, [127]], [-127, 129, [129]], [128, 128, [128]], [-128, 128, [128]], [255, 255, [255]], [-255, 1, [1]], [255.1, 255, [255]], [255.9, 255, [255]], [256, 0, [0]], [32767, 255, [255]], [-32767, 1, [1]], [32768, 0, [0]], [-32768, 0, [0]], [65535, 255, [255]], [65536, 0, [0]], [65537, 1, [1]], [65536.54321, 0, [0]], [-65536.54321, 0, [0]], [2147483647, 255, [255]], [-2147483647, 1, [1]], [2147483648, 0, [0]], [-2147483648, 0, [0]], [4294967296, 0, [0]], [9007199254740992, 0, [0]], [-9007199254740992, 0, [0]], [Infinity, 0, [0]], [-Infinity, 0, [0]], [-1.7976931348623157e+308, 0, [0]], [1.7976931348623157e+308, 0, [0]], [5e-324, 0, [0]], [-5e-324, 0, [0]], [NaN, 0, [0]]]; if (NATIVE || !/Android [2-4]/.test(typeof navigator != 'undefined' && navigator !== null ? navigator.userAgent : void 8)) { data = data.concat([[2147483649, 1, [1]], [-2147483649, 255, [255]], [4294967295, 255, [255]], [4294967297, 1, [1]], [9007199254740991, 255, [255]], [-9007199254740991, 1, [1]], [9007199254740994, 2, [2]], [-9007199254740994, 254, [254]]]); } typed = new Typed(1); view = new DataView(typed.buffer); viewFrom = function(it){ return new DataView(new Uint8Array(it).buffer); }; z = function(it){ if (it === 0 && 1 / it === -Infinity) { return '-0'; } else { return it; } }; for (i$ = 0, len$ = data.length; i$ < len$; ++i$) { ref$ = data[i$], value = ref$[0], conversion = ref$[1], little = ref$[2]; typed[0] = value; assert.same(typed[0], conversion, ARRAY + " " + z(value) + " -> " + z(conversion)); assert.arrayEqual(typed, little, ARRAY + " " + z(value) + " -> [" + little + "]"); view[SET](0, value); assert.arrayEqual(typed, little, "view." + SET + "(0, " + z(value) + ") -> [" + little + "]"); assert.same(viewFrom(little)[GET](0), conversion, "view{" + little + "}." + GET + "(0) -> " + z(conversion)); } }); }).call(this); // Generated by LiveScript 1.4.0 (function(){ var module, test, DataView, ArrayBuffer, Uint8Array, i$, x$, ref$, len$, y$; module = QUnit.module, test = QUnit.test; module('ES6'); DataView = core.DataView, ArrayBuffer = core.ArrayBuffer, Uint8Array = core.Uint8Array; test('DataView', function(assert){ var a, d; assert.same(DataView, Object(DataView), 'is object'); a = new DataView(new ArrayBuffer(8)); assert.same(a.byteOffset, 0, '#byteOffset, passed buffer'); assert.same(a.byteLength, 8, '#byteLength, passed buffer'); a = new DataView(new ArrayBuffer(16), 8); assert.same(a.byteOffset, 8, '#byteOffset, passed buffer and byteOffset'); assert.same(a.byteLength, 8, '#byteLength, passed buffer and byteOffset'); a = new DataView(new ArrayBuffer(24), 8, 8); assert.same(a.byteOffset, 8, '#byteOffset, passed buffer, byteOffset and length'); assert.same(a.byteLength, 8, '#byteLength, passed buffer, byteOffset and length'); if (NATIVE) { a = new DataView(new ArrayBuffer(8), void 8); assert.same(a.byteOffset, 0, '#byteOffset, passed buffer and undefined'); assert.same(a.byteLength, 8, '#byteLength, passed buffer and undefined'); } if (NATIVE) { a = new DataView(new ArrayBuffer(16), 8, void 8); assert.same(a.byteOffset, 8, '#byteOffset, passed buffer, byteOffset and undefined'); assert.same(a.byteLength, 8, '#byteLength, passed buffer, byteOffset and undefined'); } if (NATIVE) { a = new DataView(new ArrayBuffer(8), 8); assert.same(a.byteOffset, 8, '#byteOffset, passed buffer and byteOffset with buffer length'); assert.same(a.byteLength, 0, '#byteLength, passed buffer and byteOffset with buffer length'); } if (NATIVE) { assert.throws(function(){ new DataView(new ArrayBuffer(8), -1); }, RangeError, 'If offset < 0, throw a RangeError exception'); assert.throws(function(){ new DataView(new ArrayBuffer(8), 16); }, RangeError, 'If newByteLength < 0, throw a RangeError exception'); assert.throws(function(){ new DataView(new ArrayBuffer(24), 8, 24); }, RangeError, 'If offset+newByteLength > bufferByteLength, throw a RangeError exception'); } else { assert.throws(function(){ new DataView(new ArrayBuffer(8), -1); }, 'If offset < 0, throw a RangeError exception'); assert.throws(function(){ new DataView(new ArrayBuffer(8), 16); }, 'If newByteLength < 0, throw a RangeError exception'); assert.throws(function(){ new DataView(new ArrayBuffer(24), 8, 24); }, 'If offset+newByteLength > bufferByteLength, throw a RangeError exception'); } if (NATIVE) { assert.throws(function(){ DataView(1); }, TypeError, 'throws without `new`'); } else { assert.throws(function(){ DataView(1); }, 'throws without `new`'); } d = new DataView(new ArrayBuffer(8)); d.setUint32(0, 0x12345678); assert.same(d.getUint32(0), 0x12345678, 'big endian/big endian'); d.setUint32(0, 0x12345678, true); assert.same(d.getUint32(0, true), 0x12345678, 'little endian/little endian'); d.setUint32(0, 0x12345678, true); assert.same(d.getUint32(0), 0x78563412, 'little endian/big endian'); d.setUint32(0, 0x12345678); assert.same(d.getUint32(0, true), 0x78563412, 'big endian/little endian'); assert.throws(function(){ new DataView({}); }, 'non-ArrayBuffer argument'); assert.ok(function(){ var e; try { new DataView('foo'); } catch (e$) { e = e$; return e; } }, 'non-ArrayBuffer argument'); }); DESCRIPTORS && test('DataView accessors', function(assert){ var u, d, i$, ref$, len$, i, x; u = new Uint8Array(8); d = new DataView(u.buffer); assert.arrayEqual(u, [0, 0, 0, 0, 0, 0, 0, 0]); d.setUint8(0, 255); assert.arrayEqual(u, [0xff, 0, 0, 0, 0, 0, 0, 0]); d.setInt8(1, -1); assert.arrayEqual(u, [0xff, 0xff, 0, 0, 0, 0, 0, 0]); d.setUint16(2, 0x1234); assert.arrayEqual(u, [0xff, 0xff, 0x12, 0x34, 0, 0, 0, 0]); d.setInt16(4, -1); assert.arrayEqual(u, [0xff, 0xff, 0x12, 0x34, 0xff, 0xff, 0, 0]); d.setUint32(1, 0x12345678); assert.arrayEqual(u, [0xff, 0x12, 0x34, 0x56, 0x78, 0xff, 0, 0]); d.setInt32(4, -2023406815); assert.arrayEqual(u, [0xff, 0x12, 0x34, 0x56, 0x87, 0x65, 0x43, 0x21]); d.setFloat32(2, 1.2e+38); assert.arrayEqual(u, [0xff, 0x12, 0x7e, 0xb4, 0x8e, 0x52, 0x43, 0x21]); d.setFloat64(0, -1.2345678e+301); assert.arrayEqual(u, [0xfe, 0x72, 0x6f, 0x51, 0x5f, 0x61, 0x77, 0xe5]); for (i$ = 0, len$ = (ref$ = [0x80, 0x81, 0x82, 0x83, 0x84, 0x85, 0x86, 0x87]).length; i$ < len$; ++i$) { i = i$; x = ref$[i$]; u[i] = x; } assert.same(d.getUint8(0), 128); assert.same(d.getInt8(1), -127); assert.same(d.getUint16(2), 33411); assert.same(d.getInt16(3), -31868); assert.same(d.getUint32(4), 2223343239); assert.same(d.getInt32(2), -2105310075); assert.same(d.getFloat32(2), -1.932478247535851e-37); assert.same(d.getFloat64(0), -3.116851295377095e-306); }); DESCRIPTORS && test('DataView endian', function(assert){ var rawbuf, d; rawbuf = new Uint8Array([0, 1, 2, 3, 4, 5, 6, 7]).buffer; d = new DataView(rawbuf); assert.same(d.byteLength, 8, 'buffer'); assert.same(d.byteOffset, 0, 'buffer'); assert.throws(function(){ return d.getUint8(-2); }); assert.throws(function(){ d.getUint8(8); }, 'bounds for buffer'); assert.throws(function(){ d.setUint8(-2, 0); }, 'bounds for buffer'); assert.throws(function(){ d.setUint8(8, 0); }, 'bounds for buffer'); d = new DataView(rawbuf, 2); assert.same(d.byteLength, 6, 'buffer, byteOffset'); assert.same(d.byteOffset, 2, 'buffer, byteOffset'); assert.same(d.getUint8(5), 7, 'buffer, byteOffset'); assert.throws(function(){ d.getUint8(-2); }, 'bounds for buffer, byteOffset'); assert.throws(function(){ d.getUint8(6); }, 'bounds for buffer, byteOffset'); assert.throws(function(){ d.setUint8(-2, 0); }, 'bounds for buffer, byteOffset'); assert.throws(function(){ d.setUint8(6, 0); }, 'bounds for buffer, byteOffset'); assert.throws(function(){ new DataView(rawbuf, -1); }, 'invalid byteOffset'); assert.throws(function(){ new DataView(rawbuf, 9); }, 'invalid byteOffset'); d = new DataView(rawbuf, 2, 4); assert.same(d.byteLength, 4, 'buffer, byteOffset, length'); assert.same(d.byteOffset, 2, 'buffer, byteOffset, length'); assert.same(d.getUint8(3), 5, 'buffer, byteOffset, length'); assert.throws(function(){ d.getUint8(-2); }, 'bounds for buffer, byteOffset, length'); assert.throws(function(){ d.getUint8(4); }, 'bounds for buffer, byteOffset, length'); assert.throws(function(){ d.setUint8(-2, 0); }, 'bounds for buffer, byteOffset, length'); assert.throws(function(){ d.setUint8(4, 0); }, 'bounds for buffer, byteOffset, length'); assert.throws(function(){ new DataView(rawbuf, 0, 9); }, 'invalid byteOffset+length'); assert.throws(function(){ new DataView(rawbuf, 8, 1); }, 'invalid byteOffset+length'); assert.throws(function(){ new DataView(rawbuf, 9, -1); }, 'invalid byteOffset+length'); }); for (i$ = 0, len$ = (ref$ = ['getUint8', 'getInt8', 'getUint16', 'getInt16', 'getUint32', 'getInt32', 'getFloat32', 'getFloat64']).length; i$ < len$; ++i$) { x$ = ref$[i$]; (fn$.call(this, x$)); } for (i$ = 0, len$ = (ref$ = ['setUint8', 'setInt8', 'setUint16', 'setInt16', 'setUint32', 'setInt32', 'setFloat32', 'setFloat64']).length; i$ < len$; ++i$) { y$ = ref$[i$]; (fn1$.call(this, y$)); } function fn$(name){ test('DataView#' + name, function(assert){ assert.isFunction(DataView.prototype[name]); NATIVE && assert.arity(DataView.prototype[name], 1); assert.same(new DataView(new ArrayBuffer(8))[name](0), 0, 'returns element'); }); } function fn1$(name){ test('DataView#' + name, function(assert){ assert.isFunction(DataView.prototype[name]); NATIVE && assert.arity(DataView.prototype[name], 2); assert.same(new DataView(new ArrayBuffer(8))[name](0, 0), void 8, 'void'); }); } }).call(this); // Generated by LiveScript 1.4.0 (function(){ var module, test, WeakMap, Map, freeze, iterator; module = QUnit.module, test = QUnit.test; module('ES6'); WeakMap = core.WeakMap, Map = core.Map; freeze = core.Object.freeze; iterator = core.Symbol.iterator; test('WeakMap', function(assert){ var a, f, M, done, iter, o, key, C, O; assert.isFunction(WeakMap); assert.ok('delete' in WeakMap.prototype, 'delete in WeakMap.prototype'); assert.ok('get' in WeakMap.prototype, 'get in WeakMap.prototype'); assert.ok('has' in WeakMap.prototype, 'has in WeakMap.prototype'); assert.ok('set' in WeakMap.prototype, 'set in WeakMap.prototype'); assert.ok(new WeakMap instanceof WeakMap, 'new WeakMap instanceof WeakMap'); assert.strictEqual(new WeakMap(createIterable([[a = {}, 42]])).get(a), 42, 'Init from iterable'); assert.strictEqual(new WeakMap([[f = freeze({}), 42]]).get(f), 42, 'Support frozen objects'); M = new WeakMap; M.set(freeze(f = {}), 42); assert.strictEqual(M.has(f), true, 'works with frozen objects, #1'); assert.strictEqual(M.get(f), 42, 'works with frozen objects, #2'); M['delete'](f); assert.strictEqual(M.has(f), false, 'works with frozen objects, #3'); assert.strictEqual(M.get(f), void 8, 'works with frozen objects, #4'); done = false; iter = createIterable([null, 1, 2], { 'return': function(){ return done = true; } }); try { new WeakMap(iter); } catch (e$) {} assert.ok(done, '.return #throw'); assert.ok(!('clear' in WeakMap.prototype), 'should not contains `.clear` method'); a = []; done = false; a['@@iterator'] = void 8; a[iterator] = function(){ done = true; return core.getIteratorMethod([]).call(this); }; new WeakMap(a); assert.ok(done); o = {}; new WeakMap().set(o, 1); if (DESCRIPTORS) { assert.arrayEqual((function(){ var results$ = []; for (key in o) { results$.push(key); } return results$; }()), []); assert.arrayEqual(core.Object.keys(o), []); } assert.arrayEqual(core.Object.getOwnPropertyNames(o), []); assert.arrayEqual(core.Object.getOwnPropertySymbols(o), []); assert.arrayEqual(core.Reflect.ownKeys(o), []); if (nativeSubclass) { C = nativeSubclass(WeakMap); assert.ok(new C instanceof C, 'correct subclassing with native classes #1'); assert.ok(new C instanceof WeakMap, 'correct subclassing with native classes #2'); assert.same(new C().set(O = {}, 2).get(O), 2, 'correct subclassing with native classes #3'); } }); test('WeakMap#delete', function(assert){ var M, a, b; assert.isFunction(WeakMap.prototype['delete']); M = new WeakMap([[a = {}, 42], [b = {}, 21]]); assert.ok(M.has(a) && M.has(b), 'WeakMap has values before .delete()'); M['delete'](a); assert.ok(!M.has(a) && M.has(b), 'WeakMap hasn`t value after .delete()'); assert.ok((function(){ try { return !M['delete'](1); } catch (e$) {} }()), 'return false on primitive'); }); test('WeakMap#get', function(assert){ var M, a; assert.isFunction(WeakMap.prototype.get); M = new WeakMap(); assert.strictEqual(M.get({}), void 8, 'WeakMap .get() before .set() return undefined'); M.set(a = {}, 42); assert.strictEqual(M.get(a), 42, 'WeakMap .get() return value'); M['delete'](a); assert.strictEqual(M.get(a), void 8, 'WeakMap .get() after .delete() return undefined'); assert.ok((function(){ try { return void 8 === M.get(1); } catch (e$) {} }()), 'return undefined on primitive'); }); test('WeakMap#has', function(assert){ var M, a; assert.isFunction(WeakMap.prototype.has); M = new WeakMap(); assert.ok(!M.has({}), 'WeakMap .has() before .set() return false'); M.set(a = {}, 42); assert.ok(M.has(a), 'WeakMap .has() return true'); M['delete'](a); assert.ok(!M.has(a), 'WeakMap .has() after .delete() return false'); assert.ok((function(){ try { return !M.has(1); } catch (e$) {} }()), 'return false on primitive'); }); test('WeakMap#set', function(assert){ var w, a, e; assert.isFunction(WeakMap.prototype.set); assert.ok((w = new WeakMap).set(a = {}, 42) === w, 'chaining'); assert.ok((function(){ try { new WeakMap().set(42, 42); return false; } catch (e$) { e = e$; return true; } }()), 'throws with primitive keys'); }); test('WeakMap#@@toStringTag', function(assert){ var ref$; assert.strictEqual(WeakMap.prototype[(ref$ = core.Symbol) != null ? ref$.toStringTag : void 8], 'WeakMap', 'WeakMap::@@toStringTag is `WeakMap`'); }); }).call(this); // Generated by LiveScript 1.4.0 (function(){ var module, test, WeakSet, freeze, iterator; module = QUnit.module, test = QUnit.test; module('ES6'); WeakSet = core.WeakSet; freeze = core.Object.freeze; iterator = core.Symbol.iterator; test('WeakSet', function(assert){ var a, f, S, done, iter, o, key, C, O; assert.isFunction(WeakSet); assert.ok('add' in WeakSet.prototype, 'add in WeakSet.prototype'); assert.ok('delete' in WeakSet.prototype, 'delete in WeakSet.prototype'); assert.ok('has' in WeakSet.prototype, 'has in WeakSet.prototype'); assert.ok(new WeakSet instanceof WeakSet, 'new WeakSet instanceof WeakSet'); assert.ok(new WeakSet(createIterable([a = {}])).has(a), 'Init from iterable'); assert.ok(new WeakSet([freeze(f = {})]).has(f), 'Support frozen objects'); S = new WeakSet; S.add(freeze(f = {})); assert.strictEqual(S.has(f), true, 'works with frozen objects, #1'); S['delete'](f); assert.strictEqual(S.has(f), false, 'works with frozen objects, #2'); done = false; iter = createIterable([null, 1, 2], { 'return': function(){ return done = true; } }); try { new WeakSet(iter); } catch (e$) {} assert.ok(done, '.return #throw'); assert.ok(!('clear' in WeakSet.prototype), 'should not contains `.clear` method'); a = []; done = false; a['@@iterator'] = void 8; a[iterator] = function(){ done = true; return core.getIteratorMethod([]).call(this); }; new WeakSet(a); assert.ok(done); o = {}; new WeakSet().add(o); if (DESCRIPTORS) { assert.arrayEqual((function(){ var results$ = []; for (key in o) { results$.push(key); } return results$; }()), []); assert.arrayEqual(core.Object.keys(o), []); } assert.arrayEqual(core.Object.getOwnPropertyNames(o), []); assert.arrayEqual(core.Object.getOwnPropertySymbols(o), []); assert.arrayEqual(core.Reflect.ownKeys(o), []); if (nativeSubclass) { C = nativeSubclass(WeakSet); assert.ok(new C instanceof C, 'correct subclassing with native classes #1'); assert.ok(new C instanceof WeakSet, 'correct subclassing with native classes #2'); assert.ok(new C().add(O = {}).has(O), 'correct subclassing with native classes #3'); } }); test('WeakSet#add', function(assert){ var w, e; assert.isFunction(WeakSet.prototype.add); assert.ok((w = new WeakSet).add({}) === w, 'chaining'); assert.ok((function(){ try { new WeakSet().add(42); return false; } catch (e$) { e = e$; return true; } }()), 'throws with primitive keys'); }); test('WeakSet#delete', function(assert){ var S, a, b; assert.isFunction(WeakSet.prototype['delete']); S = new WeakSet().add(a = {}).add(b = {}); assert.ok(S.has(a) && S.has(b), 'WeakSet has values before .delete()'); S['delete'](a); assert.ok(!S.has(a) && S.has(b), 'WeakSet has`nt value after .delete()'); assert.ok((function(){ try { return !S['delete'](1); } catch (e$) {} }()), 'return false on primitive'); }); test('WeakSet#has', function(assert){ var M, a; assert.isFunction(WeakSet.prototype.has); M = new WeakSet(); assert.ok(!M.has({}), 'WeakSet has`nt value'); M.add(a = {}); assert.ok(M.has(a), 'WeakSet has value after .add()'); M['delete'](a); assert.ok(!M.has(a), 'WeakSet hasn`t value after .delete()'); assert.ok((function(){ try { return !M.has(1); } catch (e$) {} }()), 'return false on primitive'); }); test('WeakSet::@@toStringTag', function(assert){ var ref$; assert.strictEqual(WeakSet.prototype[(ref$ = core.Symbol) != null ? ref$.toStringTag : void 8], 'WeakSet', 'WeakSet::@@toStringTag is `WeakSet`'); }); }).call(this); // Generated by LiveScript 1.4.0 (function(){ var module, test; module = QUnit.module, test = QUnit.test; module('ES7'); test('Array#includes', function(assert){ var includes, arr, o; includes = core.Array.includes; assert.isFunction(includes); arr = [1, 2, 3, -0, o = {}]; assert.ok(includes(arr, 1)); assert.ok(includes(arr, -0)); assert.ok(includes(arr, 0)); assert.ok(includes(arr, o)); assert.ok(!includes(arr, 4)); assert.ok(!includes(arr, -0.5)); assert.ok(!includes(arr, {})); assert.ok(includes(Array(1), void 8)); assert.ok(includes([NaN], NaN)); if (STRICT) { assert.throws(function(){ includes(null, 0); }, TypeError); assert.throws(function(){ includes(void 8, 0); }, TypeError); } }); }).call(this); // Generated by LiveScript 1.4.0 (function(){ var module, test; module = QUnit.module, test = QUnit.test; module('ES6'); test('asap', function(assert){ var asap, async, done, after; asap = core.asap; assert.expect(3); assert.isFunction(asap); assert.arity(asap, 1); async = assert.async(); done = false; asap(function(){ var done; if (!done) { done = true; assert.ok(after, 'works'); async(); } }); setTimeout(function(){ var done; if (!done) { done = true; assert.ok(false, 'fails'); async(); } }, 3e3); return after = true; }); }).call(this); // Generated by LiveScript 1.4.0 (function(){ var module, test; module = QUnit.module, test = QUnit.test; module('ES7'); test('Error.isError', function(assert){ var isError; isError = core.Error.isError; assert.isFunction(isError); assert.same(isError(new TypeError), true); assert.same(isError({}), false); assert.same(isError(null), false); }); }).call(this); // Generated by LiveScript 1.4.0 (function(){ var module, test; module = QUnit.module, test = QUnit.test; module('ES7'); test('Math.iaddh', function(assert){ var iaddh; iaddh = core.Math.iaddh; assert.isFunction(iaddh); assert.arity(iaddh, 4); assert.same(iaddh(0, 2, 1, 0), 2); assert.same(iaddh(0, 4, 1, 1), 5); assert.same(iaddh(2, 4, 1, 1), 5); assert.same(iaddh(0xffffffff, 4, 1, 1), 6); assert.same(iaddh(1, 4, 0xffffffff, 1), 6); }); }).call(this); // Generated by LiveScript 1.4.0 (function(){ var module, test; module = QUnit.module, test = QUnit.test; module('ES7'); test('Math.imulh', function(assert){ var imulh; imulh = core.Math.imulh; assert.isFunction(imulh); assert.arity(imulh, 2); assert.same(imulh(0xffffffff, 7), -1); assert.same(imulh(0xfffffff, 77), 4); assert.same(imulh(1, 7), 0); assert.same(imulh(-1, 7), -1); }); }).call(this); // Generated by LiveScript 1.4.0 (function(){ var module, test; module = QUnit.module, test = QUnit.test; module('ES7'); test('Math.isubh', function(assert){ var isubh; isubh = core.Math.isubh; assert.isFunction(isubh); assert.arity(isubh, 4); assert.same(isubh(0, 2, 1, 0), 1); assert.same(isubh(0, 4, 1, 1), 2); assert.same(isubh(2, 4, 1, 1), 3); assert.same(isubh(0xffffffff, 4, 1, 1), 3); assert.same(isubh(1, 4, 0xffffffff, 1), 2); }); }).call(this); // Generated by LiveScript 1.4.0 (function(){ var module, test; module = QUnit.module, test = QUnit.test; module('ES7'); test('Math.umulh', function(assert){ var umulh; umulh = core.Math.umulh; assert.isFunction(umulh); assert.arity(umulh, 2); assert.same(umulh(0xffffffff, 7), 6); assert.same(umulh(0xfffffff, 77), 4); assert.same(umulh(1, 7), 0); assert.same(umulh(-1, 7), 6); }); }).call(this); // Generated by LiveScript 1.4.0 (function(){ var module, test; module = QUnit.module, test = QUnit.test; module('ES7'); if (DESCRIPTORS) { test('Object#__defineGetter__', function(assert){ var ref$, __defineGetter__, __defineSetter__, O, i$, x$, len$; ref$ = core.Object, __defineGetter__ = ref$.__defineGetter__, __defineSetter__ = ref$.__defineSetter__; assert.isFunction(__defineGetter__); O = {}; assert.same(__defineGetter__(O, 'key', function(){ return 42; }), void 8, 'void'); assert.same(O.key, 42, 'works'); __defineSetter__(O, 'key', function(){ this.foo = 43; }); O.key = 44; assert.ok(O.key === 42 && O.foo === 43, 'works with setter'); if (STRICT) { for (i$ = 0, len$ = (ref$ = [null, void 8]).length; i$ < len$; ++i$) { x$ = ref$[i$]; assert.throws(fn$, TypeError, "Throws on " + x$ + " as `this`"); } } function fn$(){ __defineGetter__(x$, 1, function(){}); } }); } }).call(this); // Generated by LiveScript 1.4.0 (function(){ var module, test; module = QUnit.module, test = QUnit.test; module('ES7'); if (DESCRIPTORS) { test('Object#__defineSetter__', function(assert){ var ref$, __defineSetter__, __defineGetter__, O, i$, x$, len$; ref$ = core.Object, __defineSetter__ = ref$.__defineSetter__, __defineGetter__ = ref$.__defineGetter__; assert.isFunction(__defineSetter__); O = {}; assert.same(__defineSetter__(O, 'key', function(){ this.foo = 43; }), void 8, 'void'); O.key = 44; assert.same(O.foo, 43, 'works'); O = {}; __defineSetter__(O, 'key', function(){ this.foo = 43; }); __defineGetter__(O, 'key', function(){ return 42; }); O.key = 44; assert.ok(O.key === 42 && O.foo === 43, 'works with getter'); if (STRICT) { for (i$ = 0, len$ = (ref$ = [null, void 8]).length; i$ < len$; ++i$) { x$ = ref$[i$]; assert.throws(fn$, TypeError, "Throws on " + x$ + " as `this`"); } } function fn$(){ __defineSetter__(x$, 1, function(){}); } }); } }).call(this); // Generated by LiveScript 1.4.0 (function(){ var module, test; module = QUnit.module, test = QUnit.test; module('ES7'); test('Object.entries', function(assert){ var ref$, entries, create, assign; ref$ = core.Object, entries = ref$.entries, create = ref$.create, assign = ref$.assign; assert.isFunction(entries); assert.arity(entries, 1); if ('name' in entries) { assert.name(entries, 'entries'); } assert.deepEqual(entries({ q: 1, w: 2, e: 3 }), [['q', 1], ['w', 2], ['e', 3]]); assert.deepEqual(entries(new String('qwe')), [['0', 'q'], ['1', 'w'], ['2', 'e']]); assert.deepEqual(entries(assign(create({ q: 1, w: 2, e: 3 }), { a: 4, s: 5, d: 6 })), [['a', 4], ['s', 5], ['d', 6]]); try { assert.deepEqual(Function('return core.Object.entries({a: 1, get b(){delete this.c;return 2},c: 3})')(), [['a', 1], ['b', 2]]); } catch (e$) {} try { assert.deepEqual(Function('return core.Object.entries({a: 1, get b(){Object.defineProperty(this, "c", {value:4,enumerable:false});return 2},c: 3})')(), [['a', 1], ['b', 2]]); } catch (e$) {} }); }).call(this); // Generated by LiveScript 1.4.0 (function(){ var module, test, create; module = QUnit.module, test = QUnit.test; module('ES7'); create = core.Object.create; test('Object.getOwnPropertyDescriptors', function(assert){ var getOwnPropertyDescriptors, O, s, descs; getOwnPropertyDescriptors = core.Object.getOwnPropertyDescriptors; assert.isFunction(getOwnPropertyDescriptors); O = create({ q: 1 }, { e: { value: 3 } }); O.w = 2; s = core.Symbol('s'); O[s] = 4; descs = getOwnPropertyDescriptors(O); assert.strictEqual(descs.q, void 8); assert.deepEqual(descs.w, { enumerable: true, configurable: true, writable: true, value: 2 }); if (DESCRIPTORS) { assert.deepEqual(descs.e, { enumerable: false, configurable: false, writable: false, value: 3 }); } else { assert.deepEqual(descs.e, { enumerable: true, configurable: true, writable: true, value: 3 }); } assert.strictEqual(descs[s].value, 4); }); }).call(this); // Generated by LiveScript 1.4.0 (function(){ var module, test; module = QUnit.module, test = QUnit.test; module('ES7'); if (DESCRIPTORS) { test('Object#__lookupGetter__', function(assert){ var ref$, __lookupGetter__, __defineGetter__, create, O, F, i$, x$, len$; ref$ = core.Object, __lookupGetter__ = ref$.__lookupGetter__, __defineGetter__ = ref$.__defineGetter__; create = core.Object.create; assert.isFunction(__lookupGetter__); assert.same(__lookupGetter__({}, 'key'), void 8, 'empty object'); assert.same(__lookupGetter__({ key: 42 }, 'key'), void 8, 'data descriptor'); O = {}; F = function(){}; __defineGetter__(O, 'key', F); assert.same(__lookupGetter__(O, 'key'), F, 'own getter'); assert.same(__lookupGetter__(create(O), 'key'), F, 'proto getter'); assert.same(__lookupGetter__(create(O), 'foo'), void 8, 'empty proto'); if (STRICT) { for (i$ = 0, len$ = (ref$ = [null, void 8]).length; i$ < len$; ++i$) { x$ = ref$[i$]; assert.throws(fn$, TypeError, "Throws on " + x$ + " as `this`"); } } function fn$(){ __lookupGetter__(x$, 1); } }); } }).call(this); // Generated by LiveScript 1.4.0 (function(){ var module, test; module = QUnit.module, test = QUnit.test; module('ES7'); if (DESCRIPTORS) { test('Object#__lookupSetter__', function(assert){ var ref$, __lookupSetter__, __defineSetter__, create, O, F, i$, x$, len$; ref$ = core.Object, __lookupSetter__ = ref$.__lookupSetter__, __defineSetter__ = ref$.__defineSetter__; create = core.Object.create; assert.isFunction(__lookupSetter__); assert.same(__lookupSetter__({}, 'key'), void 8, 'empty object'); assert.same(__lookupSetter__({ key: 42 }, 'key'), void 8, 'data descriptor'); O = {}; F = function(){}; __defineSetter__(O, 'key', F); assert.same(__lookupSetter__(O, 'key'), F, 'own setter'); assert.same(__lookupSetter__(create(O), 'key'), F, 'proto setter'); assert.same(__lookupSetter__(create(O), 'foo'), void 8, 'empty proto'); if (STRICT) { for (i$ = 0, len$ = (ref$ = [null, void 8]).length; i$ < len$; ++i$) { x$ = ref$[i$]; assert.throws(fn$, TypeError, "Throws on " + x$ + " as `this`"); } } function fn$(){ __lookupSetter__(x$, 1); } }); } }).call(this); // Generated by LiveScript 1.4.0 (function(){ var module, test; module = QUnit.module, test = QUnit.test; module('ES7'); test('Object.values', function(assert){ var ref$, values, create, assign; ref$ = core.Object, values = ref$.values, create = ref$.create, assign = ref$.assign; assert.isFunction(values); assert.arity(values, 1); if ('name' in values) { assert.name(values, 'values'); } assert.deepEqual(values({ q: 1, w: 2, e: 3 }), [1, 2, 3]); assert.deepEqual(values(new String('qwe')), ['q', 'w', 'e']); assert.deepEqual(values(assign(create({ q: 1, w: 2, e: 3 }), { a: 4, s: 5, d: 6 })), [4, 5, 6]); try { assert.deepEqual(Function('return core.Object.values({a: 1, get b(){delete this.c;return 2},c: 3})')(), [1, 2]); } catch (e$) {} try { assert.deepEqual(Function('return core.Object.values({a: 1, get b(){Object.defineProperty(this, "c", {value:4,enumerable:false});return 2},c: 3})')(), [1, 2]); } catch (e$) {} }); }).call(this); // Generated by LiveScript 1.4.0 (function(){ 'use strict'; var module, test, Observable, Promise, Symbol; module = QUnit.module, test = QUnit.test; module('ES7'); Observable = core.Observable, Promise = core.Promise, Symbol = core.Symbol; test('Observable', function(assert){ var obsevable; assert.isFunction(Observable); assert.arity(Observable, 1); assert.throws(function(){ Observable(function(){}); }, 'throws w/o `new`'); obsevable = new Observable(function(subscriptionObserver){ var next, error, complete; assert.same(typeof subscriptionObserver, 'object', 'Subscription observer is object'); assert.same(subscriptionObserver.constructor, Object); next = subscriptionObserver.next, error = subscriptionObserver.error, complete = subscriptionObserver.complete; assert.isFunction(next); assert.isFunction(error); assert.isFunction(complete); assert.arity(next, 1); assert.arity(error, 1); assert.arity(complete, 1); if (STRICT) { assert.same(this, function(){ return this; }(), 'correct executor context'); } }); obsevable.subscribe({}); assert.ok(obsevable instanceof Observable); }); test('Observable#subscribe', function(assert){ var subscription; assert.isFunction(Observable.prototype.subscribe); assert.arity(Observable.prototype.subscribe, 1); subscription = new Observable(function(){}).subscribe({}); assert.same(typeof subscription, 'object', 'Subscription is object'); assert.same(subscription.constructor, Object); assert.isFunction(subscription.unsubscribe); assert.arity(subscription.unsubscribe, 0); }); test('Observable#forEach', function(assert){ assert.isFunction(Observable.prototype.forEach); assert.arity(Observable.prototype.forEach, 1); assert.ok(new Observable(function(){}).forEach(function(){}) instanceof Promise, 'returns Promise'); }); test('Observable#constructor', function(assert){ assert.same(Observable.prototype.constructor, Observable); }); test('Observable#@@observable', function(assert){ var observable; assert.isFunction(Observable.prototype[Symbol.observable]); observable = new Observable(function(){}); assert.same(observable[Symbol.observable](), observable); }); test('Observable.of', function(assert){ assert.isFunction(Observable.of); assert.arity(Observable.of, 0); }); test('Observable.from', function(assert){ assert.isFunction(Observable.from); assert.arity(Observable.from, 1); }); }).call(this); // Generated by LiveScript 1.4.0 (function(){ var module, test; module = QUnit.module, test = QUnit.test; module('ES7'); test('Reflect.defineMetadata', function(assert){ var defineMetadata; defineMetadata = core.Reflect.defineMetadata; assert.isFunction(defineMetadata); assert.arity(defineMetadata, 4); assert.throws(function(){ defineMetadata('key', 'value', void 8, void 8); }, TypeError); assert.same(defineMetadata('key', 'value', {}, void 8), void 8); assert.same(defineMetadata('key', 'value', {}, 'name'), void 8); }); }).call(this); // Generated by LiveScript 1.4.0 (function(){ var module, test; module = QUnit.module, test = QUnit.test; module('ES7'); test('Reflect.deleteMetadata', function(assert){ var ref$, defineMetadata, hasOwnMetadata, deleteMetadata, create, obj, prototype; ref$ = core.Reflect, defineMetadata = ref$.defineMetadata, hasOwnMetadata = ref$.hasOwnMetadata, deleteMetadata = ref$.deleteMetadata; create = core.Object.create; assert.isFunction(deleteMetadata); assert.arity(deleteMetadata, 2); assert.throws(function(){ deleteMetadata('key', void 8, void 8); }, TypeError); assert.same(deleteMetadata('key', {}, void 8), false); obj = {}; defineMetadata('key', 'value', obj, void 8); assert.same(deleteMetadata('key', obj, void 8), true); prototype = {}; defineMetadata('key', 'value', prototype, void 8); assert.same(deleteMetadata('key', create(prototype), void 8), false); obj = {}; defineMetadata('key', 'value', obj, void 8); deleteMetadata('key', obj, void 8); assert.same(hasOwnMetadata("key", obj, undefined), false); }); }).call(this); // Generated by LiveScript 1.4.0 (function(){ var module, test; module = QUnit.module, test = QUnit.test; module('ES7'); test('Reflect.getMetadataKeys', function(assert){ var ref$, defineMetadata, getMetadataKeys, create, obj, prototype; ref$ = core.Reflect, defineMetadata = ref$.defineMetadata, getMetadataKeys = ref$.getMetadataKeys; create = core.Object.create; assert.isFunction(getMetadataKeys); assert.arity(getMetadataKeys, 1); assert.throws(function(){ getMetadataKeys(void 8, void 8); }, TypeError); assert.deepEqual(getMetadataKeys({}, void 8), []); obj = {}; defineMetadata('key', 'value', obj, void 8); assert.deepEqual(getMetadataKeys(obj, void 8), ['key']); prototype = {}; obj = create(prototype); defineMetadata('key', 'value', prototype, void 8); assert.deepEqual(getMetadataKeys(obj, void 8), ['key']); obj = {}; defineMetadata('key0', 'value', obj, void 8); defineMetadata('key1', 'value', obj, void 8); assert.deepEqual(getMetadataKeys(obj, void 8), ['key0', 'key1']); obj = {}; defineMetadata('key0', 'value', obj, void 8); defineMetadata('key1', 'value', obj, void 8); defineMetadata('key0', 'value', obj, void 8); assert.deepEqual(getMetadataKeys(obj, void 8), ['key0', 'key1']); prototype = {}; defineMetadata('key2', 'value', prototype, void 8); obj = create(prototype); defineMetadata('key0', 'value', obj, void 8); defineMetadata('key1', 'value', obj, void 8); assert.deepEqual(getMetadataKeys(obj, void 8), ['key0', 'key1', 'key2']); obj = {}; assert.deepEqual(getMetadataKeys({}, 'name'), []); obj = {}; defineMetadata('key', 'value', obj, 'name'); assert.deepEqual(getMetadataKeys(obj, 'name'), ['key']); prototype = {}; obj = create(prototype); defineMetadata('key', 'value', prototype, 'name'); assert.deepEqual(getMetadataKeys(obj, 'name'), ['key']); obj = {}; defineMetadata('key0', 'value', obj, 'name'); defineMetadata('key1', 'value', obj, 'name'); defineMetadata('key0', 'value', obj, 'name'); assert.deepEqual(getMetadataKeys(obj, 'name'), ['key0', 'key1']); prototype = {}; defineMetadata('key2', 'value', prototype, 'name'); obj = create(prototype); defineMetadata('key0', 'value', obj, 'name'); defineMetadata('key1', 'value', obj, 'name'); assert.deepEqual(getMetadataKeys(obj, 'name'), ['key0', 'key1', 'key2']); }); }).call(this); // Generated by LiveScript 1.4.0 (function(){ var module, test; module = QUnit.module, test = QUnit.test; module('ES7'); test('Reflect.getMetadata', function(assert){ var ref$, defineMetadata, getMetadata, create, obj, prototype; ref$ = core.Reflect, defineMetadata = ref$.defineMetadata, getMetadata = ref$.getMetadata; create = core.Object.create; assert.isFunction(getMetadata); assert.arity(getMetadata, 2); assert.throws(function(){ getMetadata('key', void 8, void 8); }, TypeError); assert.same(getMetadata('key', {}, void 8), void 8); obj = {}; defineMetadata('key', 'value', obj, void 8); assert.same(getMetadata('key', obj, void 8), 'value'); prototype = {}; obj = create(prototype); defineMetadata('key', 'value', prototype, void 8); assert.same(getMetadata('key', obj, void 8), 'value'); assert.same(getMetadata('key', {}, 'name'), void 8); obj = {}; defineMetadata('key', 'value', obj, 'name'); assert.same(getMetadata('key', obj, 'name'), 'value'); prototype = {}; obj = create(prototype); defineMetadata('key', 'value', prototype, 'name'); assert.same(getMetadata('key', obj, 'name'), 'value'); }); }).call(this); // Generated by LiveScript 1.4.0 (function(){ var module, test; module = QUnit.module, test = QUnit.test; module('ES7'); test('Reflect.getOwnMetadata', function(assert){ var ref$, defineMetadata, getOwnMetadata, create, obj, prototype; ref$ = core.Reflect, defineMetadata = ref$.defineMetadata, getOwnMetadata = ref$.getOwnMetadata; create = core.Object.create; assert.isFunction(getOwnMetadata); assert.arity(getOwnMetadata, 2); assert.throws(function(){ getOwnMetadata('key', void 8, void 8); }, TypeError); assert.same(getOwnMetadata('key', {}, void 8), void 8); obj = {}; defineMetadata('key', 'value', obj, void 8); assert.same(getOwnMetadata('key', obj, void 8), 'value'); prototype = {}; obj = create(prototype); defineMetadata('key', 'value', prototype, void 8); assert.same(getOwnMetadata('key', obj, void 8), void 8); assert.same(getOwnMetadata('key', {}, 'name'), void 8); obj = {}; defineMetadata('key', 'value', obj, 'name'); assert.same(getOwnMetadata('key', obj, 'name'), 'value'); prototype = {}; obj = create(prototype); defineMetadata('key', 'value', prototype, 'name'); assert.same(getOwnMetadata('key', obj, 'name'), void 8); }); }).call(this); // Generated by LiveScript 1.4.0 (function(){ var module, test; module = QUnit.module, test = QUnit.test; module('ES7'); test('Reflect.getOwnMetadataKeys', function(assert){ var ref$, defineMetadata, getOwnMetadataKeys, create, obj, prototype; ref$ = core.Reflect, defineMetadata = ref$.defineMetadata, getOwnMetadataKeys = ref$.getOwnMetadataKeys; create = core.Object.create; assert.isFunction(getOwnMetadataKeys); assert.arity(getOwnMetadataKeys, 1); assert.throws(function(){ getOwnMetadataKeys(void 8, void 8); }, TypeError); assert.deepEqual(getOwnMetadataKeys({}, void 8), []); obj = {}; defineMetadata('key', 'value', obj, void 8); assert.deepEqual(getOwnMetadataKeys(obj, void 8), ['key']); prototype = {}; obj = create(prototype); defineMetadata('key', 'value', prototype, void 8); assert.deepEqual(getOwnMetadataKeys(obj, void 8), []); obj = {}; defineMetadata('key0', 'value', obj, void 8); defineMetadata('key1', 'value', obj, void 8); assert.deepEqual(getOwnMetadataKeys(obj, void 8), ['key0', 'key1']); obj = {}; defineMetadata('key0', 'value', obj, void 8); defineMetadata('key1', 'value', obj, void 8); defineMetadata('key0', 'value', obj, void 8); assert.deepEqual(getOwnMetadataKeys(obj, void 8), ['key0', 'key1']); prototype = {}; defineMetadata('key2', 'value', prototype, void 8); obj = create(prototype); defineMetadata('key0', 'value', obj, void 8); defineMetadata('key1', 'value', obj, void 8); assert.deepEqual(getOwnMetadataKeys(obj, void 8), ['key0', 'key1']); obj = {}; assert.deepEqual(getOwnMetadataKeys({}, 'name'), []); obj = {}; defineMetadata('key', 'value', obj, 'name'); assert.deepEqual(getOwnMetadataKeys(obj, 'name'), ['key']); prototype = {}; obj = create(prototype); defineMetadata('key', 'value', prototype, 'name'); assert.deepEqual(getOwnMetadataKeys(obj, 'name'), []); obj = {}; defineMetadata('key0', 'value', obj, 'name'); defineMetadata('key1', 'value', obj, 'name'); defineMetadata('key0', 'value', obj, 'name'); assert.deepEqual(getOwnMetadataKeys(obj, 'name'), ['key0', 'key1']); prototype = {}; defineMetadata('key2', 'value', prototype, 'name'); obj = create(prototype); defineMetadata('key0', 'value', obj, 'name'); defineMetadata('key1', 'value', obj, 'name'); assert.deepEqual(getOwnMetadataKeys(obj, 'name'), ['key0', 'key1']); }); }).call(this); // Generated by LiveScript 1.4.0 (function(){ var module, test; module = QUnit.module, test = QUnit.test; module('ES7'); test('Reflect.hasMetadata', function(assert){ var ref$, defineMetadata, hasMetadata, create, obj, prototype; ref$ = core.Reflect, defineMetadata = ref$.defineMetadata, hasMetadata = ref$.hasMetadata; create = core.Object.create; assert.isFunction(hasMetadata); assert.arity(hasMetadata, 2); assert.throws(function(){ hasMetadata('key', void 8, void 8); }, TypeError); assert.same(hasMetadata('key', {}, void 8), false); obj = {}; defineMetadata('key', 'value', obj, void 8); assert.same(hasMetadata('key', obj, void 8), true); prototype = {}; obj = create(prototype); defineMetadata('key', 'value', prototype, void 8); assert.same(hasMetadata('key', obj, void 8), true); assert.same(hasMetadata('key', {}, 'name'), false); obj = {}; defineMetadata('key', 'value', obj, 'name'); assert.same(hasMetadata('key', obj, 'name'), true); prototype = {}; obj = create(prototype); defineMetadata('key', 'value', prototype, 'name'); assert.same(hasMetadata('key', obj, 'name'), true); }); }).call(this); // Generated by LiveScript 1.4.0 (function(){ var module, test; module = QUnit.module, test = QUnit.test; module('ES7'); test('Reflect.hasOwnMetadata', function(assert){ var ref$, defineMetadata, hasOwnMetadata, create, obj, prototype; ref$ = core.Reflect, defineMetadata = ref$.defineMetadata, hasOwnMetadata = ref$.hasOwnMetadata; create = core.Object.create; assert.isFunction(hasOwnMetadata); assert.arity(hasOwnMetadata, 2); assert.throws(function(){ hasOwnMetadata('key', void 8, void 8); }, TypeError); assert.same(hasOwnMetadata('key', {}, void 8), false); obj = {}; defineMetadata('key', 'value', obj, void 8); assert.same(hasOwnMetadata('key', obj, void 8), true); prototype = {}; obj = create(prototype); defineMetadata('key', 'value', prototype, void 8); assert.same(hasOwnMetadata('key', obj, void 8), false); assert.same(hasOwnMetadata('key', {}, 'name'), false); obj = {}; defineMetadata('key', 'value', obj, 'name'); assert.same(hasOwnMetadata('key', obj, 'name'), true); prototype = {}; obj = create(prototype); defineMetadata('key', 'value', prototype, 'name'); assert.same(hasOwnMetadata('key', obj, 'name'), false); }); }).call(this); // Generated by LiveScript 1.4.0 (function(){ var module, test; module = QUnit.module, test = QUnit.test; module('ES7'); test('Reflect.metadata', function(assert){ var ref$, metadata, hasOwnMetadata, decorator, target; ref$ = core.Reflect, metadata = ref$.metadata, hasOwnMetadata = ref$.hasOwnMetadata; assert.isFunction(metadata); assert.arity(metadata, 2); assert.isFunction(metadata('key', 'value')); decorator = metadata('key', 'value'); assert.throws(function(){ decorator(void 8, 'name'); }, TypeError); assert.throws(function(){ decorator({}, void 8); }, TypeError); target = function(){}; decorator(target); assert.same(hasOwnMetadata('key', target, void 8), true); target = {}; decorator(target, 'name'); assert.same(hasOwnMetadata('key', target, 'name'), true); }); }).call(this); // Generated by LiveScript 1.4.0 (function(){ var module, test; module = QUnit.module, test = QUnit.test; module('ES7'); test('String#at', function(assert){ var at; at = core.String.at; assert.isFunction(at); assert.strictEqual(at('abc\uD834\uDF06def', -Infinity), ''); assert.strictEqual(at('abc\uD834\uDF06def', -1), ''); assert.strictEqual(at('abc\uD834\uDF06def', -0), 'a'); assert.strictEqual(at('abc\uD834\uDF06def', +0), 'a'); assert.strictEqual(at('abc\uD834\uDF06def', 1), 'b'); assert.strictEqual(at('abc\uD834\uDF06def', 3), '\uD834\uDF06'); assert.strictEqual(at('abc\uD834\uDF06def', 4), '\uDF06'); assert.strictEqual(at('abc\uD834\uDF06def', 5), 'd'); assert.strictEqual(at('abc\uD834\uDF06def', 42), ''); assert.strictEqual(at('abc\uD834\uDF06def', Infinity), ''); assert.strictEqual(at('abc\uD834\uDF06def', null), 'a'); assert.strictEqual(at('abc\uD834\uDF06def', void 8), 'a'); assert.strictEqual(at('abc\uD834\uDF06def'), 'a'); assert.strictEqual(at('abc\uD834\uDF06def', false), 'a'); assert.strictEqual(at('abc\uD834\uDF06def', NaN), 'a'); assert.strictEqual(at('abc\uD834\uDF06def', ''), 'a'); assert.strictEqual(at('abc\uD834\uDF06def', '_'), 'a'); assert.strictEqual(at('abc\uD834\uDF06def', '1'), 'b'); assert.strictEqual(at('abc\uD834\uDF06def', []), 'a'); assert.strictEqual(at('abc\uD834\uDF06def', {}), 'a'); assert.strictEqual(at('abc\uD834\uDF06def', -0.9), 'a'); assert.strictEqual(at('abc\uD834\uDF06def', 1.9), 'b'); assert.strictEqual(at('abc\uD834\uDF06def', 7.9), 'f'); assert.strictEqual(at('abc\uD834\uDF06def', Math.pow(2, 32)), ''); assert.strictEqual(at('\uD834\uDF06def', -Infinity), ''); assert.strictEqual(at('\uD834\uDF06def', -1), ''); assert.strictEqual(at('\uD834\uDF06def', -0), '\uD834\uDF06'); assert.strictEqual(at('\uD834\uDF06def', 0), '\uD834\uDF06'); assert.strictEqual(at('\uD834\uDF06def', 1), '\uDF06'); assert.strictEqual(at('\uD834\uDF06def', 2), 'd'); assert.strictEqual(at('\uD834\uDF06def', 3), 'e'); assert.strictEqual(at('\uD834\uDF06def', 4), 'f'); assert.strictEqual(at('\uD834\uDF06def', 42), ''); assert.strictEqual(at('\uD834\uDF06def', Infinity), ''); assert.strictEqual(at('\uD834\uDF06def', null), '\uD834\uDF06'); assert.strictEqual(at('\uD834\uDF06def', void 8), '\uD834\uDF06'); assert.strictEqual(at('\uD834\uDF06def'), '\uD834\uDF06'); assert.strictEqual(at('\uD834\uDF06def', false), '\uD834\uDF06'); assert.strictEqual(at('\uD834\uDF06def', NaN), '\uD834\uDF06'); assert.strictEqual(at('\uD834\uDF06def', ''), '\uD834\uDF06'); assert.strictEqual(at('\uD834\uDF06def', '_'), '\uD834\uDF06'); assert.strictEqual(at('\uD834\uDF06def', '1'), '\uDF06'); assert.strictEqual(at('\uD834abc', -Infinity), ''); assert.strictEqual(at('\uD834abc', -1), ''); assert.strictEqual(at('\uD834abc', -0), '\uD834'); assert.strictEqual(at('\uD834abc', 0), '\uD834'); assert.strictEqual(at('\uD834abc', 1), 'a'); assert.strictEqual(at('\uD834abc', 42), ''); assert.strictEqual(at('\uD834abc', Infinity), ''); assert.strictEqual(at('\uD834abc', null), '\uD834'); assert.strictEqual(at('\uD834abc', void 8), '\uD834'); assert.strictEqual(at('\uD834abc'), '\uD834'); assert.strictEqual(at('\uD834abc', false), '\uD834'); assert.strictEqual(at('\uD834abc', NaN), '\uD834'); assert.strictEqual(at('\uD834abc', ''), '\uD834'); assert.strictEqual(at('\uD834abc', '_'), '\uD834'); assert.strictEqual(at('\uD834abc', '1'), 'a'); assert.strictEqual(at('\uDF06abc', -Infinity), ''); assert.strictEqual(at('\uDF06abc', -1), ''); assert.strictEqual(at('\uDF06abc', -0), '\uDF06'); assert.strictEqual(at('\uDF06abc', 0), '\uDF06'); assert.strictEqual(at('\uDF06abc', 1), 'a'); assert.strictEqual(at('\uDF06abc', 42), ''); assert.strictEqual(at('\uDF06abc', Infinity), ''); assert.strictEqual(at('\uDF06abc', null), '\uDF06'); assert.strictEqual(at('\uDF06abc', void 8), '\uDF06'); assert.strictEqual(at('\uDF06abc'), '\uDF06'); assert.strictEqual(at('\uDF06abc', false), '\uDF06'); assert.strictEqual(at('\uDF06abc', NaN), '\uDF06'); assert.strictEqual(at('\uDF06abc', ''), '\uDF06'); assert.strictEqual(at('\uDF06abc', '_'), '\uDF06'); assert.strictEqual(at('\uDF06abc', '1'), 'a'); assert.strictEqual(at(42, 0), '4'); assert.strictEqual(at(42, 1), '2'); assert.strictEqual(at({ toString: function(){ return 'abc'; } }, 2), 'c'); if (STRICT) { assert.throws(function(){ at(null, 0); }, TypeError); assert.throws(function(){ at(void 8, 0); }, TypeError); } }); }).call(this); // Generated by LiveScript 1.4.0 (function(){ var module, test; module = QUnit.module, test = QUnit.test; module('ES7'); test('String#matchAll', function(assert){ var matchAll, assign, i$, x$, ref$, len$, iter, y$, z$; matchAll = core.String.matchAll; assign = core.Object.assign; assert.isFunction(matchAll); for (i$ = 0, len$ = (ref$ = [ 'aabc', { toString: fn$ } ]).length; i$ < len$; ++i$) { x$ = ref$[i$]; iter = matchAll(x$, /[ac]/); assert.isIterator(iter); assert.isIterable(iter); assert.deepEqual(iter.next(), { value: assign(['a'], { input: 'aabc', index: 0 }), done: false }); assert.deepEqual(iter.next(), { value: assign(['a'], { input: 'aabc', index: 1 }), done: false }); assert.deepEqual(iter.next(), { value: assign(['c'], { input: 'aabc', index: 3 }), done: false }); assert.deepEqual(iter.next(), { value: null, done: true }); } iter = matchAll('1111a2b3cccc', /(\d)(\D)/); assert.isIterator(iter); assert.isIterable(iter); assert.deepEqual(iter.next(), { value: assign(['1a', '1', 'a'], { input: '1111a2b3cccc', index: 3 }), done: false }); assert.deepEqual(iter.next(), { value: assign(['2b', '2', 'b'], { input: '1111a2b3cccc', index: 5 }), done: false }); assert.deepEqual(iter.next(), { value: assign(['3c', '3', 'c'], { input: '1111a2b3cccc', index: 7 }), done: false }); assert.deepEqual(iter.next(), { value: null, done: true }); for (i$ = 0, len$ = (ref$ = [null, void 8, 'qwe', NaN, 42, new Date(), {}, []]).length; i$ < len$; ++i$) { y$ = ref$[i$]; assert.throws(fn1$, TypeError, "Throws on " + y$ + " as first arguments"); } if (STRICT) { for (i$ = 0, len$ = (ref$ = [null, void 8]).length; i$ < len$; ++i$) { z$ = ref$[i$]; assert.throws(fn2$, TypeError, "Throws on " + z$ + " as `this`"); } } function fn$(){ return 'aabc'; } function fn1$(){ matchAll('', y$); } function fn2$(){ matchAll(z$, /./); } }); }).call(this); // Generated by LiveScript 1.4.0 (function(){ var module, test; module = QUnit.module, test = QUnit.test; module('ES7'); test('String#padEnd', function(assert){ var padEnd; padEnd = core.String.padEnd; assert.isFunction(padEnd); assert.strictEqual(padEnd('abc', 5), 'abc '); assert.strictEqual(padEnd('abc', 4, 'de'), 'abcd'); assert.strictEqual(padEnd('abc'), 'abc'); assert.strictEqual(padEnd('abc', 5, '_'), 'abc__'); assert.strictEqual(padEnd('', 0), ''); assert.strictEqual(padEnd('foo', 1), 'foo'); assert.strictEqual(padEnd('foo', 5, ''), 'foo'); if (STRICT) { assert.throws(function(){ padEnd(null, 0); }, TypeError); assert.throws(function(){ padEnd(void 8, 0); }, TypeError); } }); }).call(this); // Generated by LiveScript 1.4.0 (function(){ var module, test; module = QUnit.module, test = QUnit.test; module('ES7'); test('String#padStart', function(assert){ var padStart; padStart = core.String.padStart; assert.isFunction(padStart); assert.strictEqual(padStart('abc', 5), ' abc'); assert.strictEqual(padStart('abc', 4, 'de'), 'dabc'); assert.strictEqual(padStart('abc'), 'abc'); assert.strictEqual(padStart('abc', 5, '_'), '__abc'); assert.strictEqual(padStart('', 0), ''); assert.strictEqual(padStart('foo', 1), 'foo'); assert.strictEqual(padStart('foo', 5, ''), 'foo'); if (STRICT) { assert.throws(function(){ padStart(null, 0); }, TypeError); assert.throws(function(){ padStart(void 8, 0); }, TypeError); } }); }).call(this); // Generated by LiveScript 1.4.0 (function(){ var module, test; module = QUnit.module, test = QUnit.test; module('ES7'); test('String#trimLeft', function(assert){ var trimLeft; trimLeft = core.String.trimLeft; assert.isFunction(trimLeft); assert.strictEqual(trimLeft(' \n q w e \n '), 'q w e \n ', 'removes whitespaces at left side of string'); assert.strictEqual(trimLeft('\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u180E\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF'), '', 'removes all whitespaces'); assert.strictEqual(trimLeft('\u200b\u0085'), '\u200b\u0085', "shouldn't remove this symbols"); if (STRICT) { assert.throws(function(){ trimLeft(null, 0); }, TypeError); assert.throws(function(){ trimLeft(void 8, 0); }, TypeError); } }); test('String#trimStart', function(assert){ var trimStart; trimStart = core.String.trimStart; assert.isFunction(trimStart); assert.strictEqual(trimStart(' \n q w e \n '), 'q w e \n ', 'removes whitespaces at left side of string'); assert.strictEqual(trimStart('\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u180E\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF'), '', 'removes all whitespaces'); assert.strictEqual(trimStart('\u200b\u0085'), '\u200b\u0085', "shouldn't remove this symbols"); if (STRICT) { assert.throws(function(){ trimStart(null, 0); }, TypeError); assert.throws(function(){ trimStart(void 8, 0); }, TypeError); } }); }).call(this); // Generated by LiveScript 1.4.0 (function(){ var module, test; module = QUnit.module, test = QUnit.test; module('ES7'); test('String#trimRight', function(assert){ var trimRight; trimRight = core.String.trimRight; assert.isFunction(trimRight); assert.strictEqual(trimRight(' \n q w e \n '), ' \n q w e', 'removes whitespaces at right side of string'); assert.strictEqual(trimRight('\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u180E\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF'), '', 'removes all whitespaces'); assert.strictEqual(trimRight('\u200b\u0085'), '\u200b\u0085', "shouldn't remove this symbols"); if (STRICT) { assert.throws(function(){ trimRight(null, 0); }, TypeError); assert.throws(function(){ trimRight(void 8, 0); }, TypeError); } }); test('String#trimEnd', function(assert){ var trimEnd; trimEnd = core.String.trimEnd; assert.isFunction(trimEnd); assert.strictEqual(trimEnd(' \n q w e \n '), ' \n q w e', 'removes whitespaces at right side of string'); assert.strictEqual(trimEnd('\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u180E\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF'), '', 'removes all whitespaces'); assert.strictEqual(trimEnd('\u200b\u0085'), '\u200b\u0085', "shouldn't remove this symbols"); if (STRICT) { assert.throws(function(){ trimEnd(null, 0); }, TypeError); assert.throws(function(){ trimEnd(void 8, 0); }, TypeError); } }); }).call(this); // Generated by LiveScript 1.4.0 (function(){ var module, test; module = QUnit.module, test = QUnit.test; module('ES7'); test('Symbol.asyncIterator', function(assert){ var Symbol; Symbol = core.Symbol; assert.ok('asyncIterator' in Symbol, "Symbol.asyncIterator available"); assert.ok(Object(Symbol.asyncIterator) instanceof Symbol, "Symbol.asyncIterator is symbol"); }); }).call(this); // Generated by LiveScript 1.4.0 (function(){ var module, test; module = QUnit.module, test = QUnit.test; module('ES7'); test('Symbol.observable', function(assert){ var Symbol; Symbol = core.Symbol; assert.ok('observable' in Symbol, "Symbol.observable available"); assert.ok(Object(Symbol.observable) instanceof Symbol, "Symbol.observable is symbol"); }); }).call(this); // Generated by LiveScript 1.4.0 (function(){ var module, test; module = QUnit.module, test = QUnit.test; module('ES7'); test('System.global', function(assert){ var global; global = core.System.global; assert.same(global, Object(global), 'is object'); assert.same(global.Math, Math, 'contains globals'); }); }).call(this); // Generated by LiveScript 1.4.0 (function(){ var module, test; module = QUnit.module, test = QUnit.test; module('Web'); test('Iterable DOM collections', function(assert){ var absent, i$, x$, ref$, len$, Collection; absent = true; for (i$ = 0, len$ = (ref$ = ['NodeList', 'DOMTokenList', 'MediaList', 'StyleSheetList', 'CSSRuleList']).length; i$ < len$; ++i$) { x$ = ref$[i$]; Collection = global[x$]; if (Collection) { assert.same(Collection.prototype[core.Symbol.toStringTag], x$, x$ + "::@@toStringTag is '" + x$ + "'"); assert.isFunction(core.getIteratorMethod(Collection.prototype), x$ + "::@@iterator is function"); absent = false; } } if ((typeof NodeList != 'undefined' && NodeList !== null) && ((typeof document != 'undefined' && document !== null) && document.querySelectorAll) && document.querySelectorAll('div') instanceof NodeList) { assert.isFunction(core.getIteratorMethod(document.querySelectorAll('div')), 'works with document.querySelectorAll'); } if (absent) { assert.ok(true, 'DOM collections are absent'); } }); }).call(this); // Generated by LiveScript 1.4.0 (function(){ var module, test, timeLimitedPromise, setImmediate, clearImmediate, Promise; module = QUnit.module, test = QUnit.test; module('Web'); timeLimitedPromise = function(time, fn){ return Promise.race([ new Promise(fn), new Promise(function(res, rej){ return setTimeout(rej, time); }) ]); }; setImmediate = core.setImmediate, clearImmediate = core.clearImmediate, Promise = core.Promise; test('setImmediate / clearImmediate', function(assert){ var def; assert.expect(6); assert.isFunction(setImmediate, 'setImmediate is function'); assert.isFunction(clearImmediate, 'clearImmediate is function'); timeLimitedPromise(1e3, function(res){ setImmediate(function(){ def = 'a'; res(); }); }).then(function(){ assert.ok(true, 'setImmediate works'); })['catch'](function(){ assert.ok(false, 'setImmediate works'); }).then(assert.async()); assert.strictEqual(def, void 8, 'setImmediate is async'); timeLimitedPromise(1e3, function(res){ setImmediate(function(a, b){ res(a + b); }, 'a', 'b'); }).then(function(it){ assert.strictEqual(it, 'ab', 'setImmediate works with additional args'); })['catch'](function(){ assert.ok(false, 'setImmediate works with additional args'); }).then(assert.async()); timeLimitedPromise(50, function(res){ clearImmediate(setImmediate(res)); }).then(function(){ assert.ok(false, 'clearImmediate works'); })['catch'](function(){ assert.ok(true, 'clearImmediate works'); }).then(assert.async()); }); (function(it){ if (typeof window != 'undefined' && window !== null) { window.onload = it; } else { it(); } })(function(){ setTimeout(function(){ var x, now, inc; x = 0; now = +new Date; (inc = function(){ setImmediate(function(){ x = x + 1; if (+new Date() - now < 5e3) { inc(); } else { if (typeof console != 'undefined' && console !== null) { console.log("setImmediate: " + x / 5 + " per second"); } } }); })(); }, 5e3); }); }).call(this); // Generated by LiveScript 1.4.0 (function(){ var module, test, setTimeout, setInterval, Promise, timeLimitedPromise; module = QUnit.module, test = QUnit.test; module('Web'); setTimeout = core.setTimeout, setInterval = core.setInterval, Promise = core.Promise; timeLimitedPromise = function(time, fn){ return Promise.race([ new Promise(fn), new Promise(function(res, rej){ return setTimeout(rej, time); }) ]); }; test('setTimeout / clearTimeout', function(assert){ assert.expect(2); timeLimitedPromise(1e3, function(res){ return setTimeout(function(a, b){ return res(a + b); }, 10, 'a', 'b'); }).then(function(it){ return assert.strictEqual(it, 'ab', 'setTimeout works with additional args'); })['catch'](function(){ return assert.ok(false, 'setTimeout works with additional args'); }).then(assert.async()); timeLimitedPromise(50, function(res){ return clearTimeout(setTimeout(res, 10)); }).then(function(){ return assert.ok(false, 'clearImmediate works with wraped setTimeout'); })['catch'](function(){ return assert.ok(true, 'clearImmediate works with wraped setTimeout'); }).then(assert.async()); }); test('setInterval / clearInterval', function(assert){ var i; assert.expect(1); i = 0; timeLimitedPromise(1e4, function(res, rej){ var interval; return interval = setInterval(function(a, b){ if (a + b !== 'ab' || i > 2) { rej({ a: a, b: b, i: i }); } if (i++ === 2) { clearInterval(interval); return setTimeout(res, 30); } }, 5, 'a', 'b'); }).then(function(){ return assert.ok(true, 'setInterval & clearInterval works with additional args'); })['catch'](function(arg$){ var ref$, a, b, i; ref$ = arg$ != null ? arg$ : {}, a = ref$.a, b = ref$.b, i = ref$.i; return assert.ok(false, "setInterval & clearInterval works with additional args: " + a + ", " + b + ", times: " + i); }).then(assert.async()); }); }).call(this); core-js-2.4.1/tests/library/000077500000000000000000000000001274277553300157055ustar00rootroot00000000000000core-js-2.4.1/tests/library/core.delay.ls000066400000000000000000000007511274277553300202750ustar00rootroot00000000000000{module, test} = QUnit module 'core-js' {delay, Promise} = core timeLimitedPromise = (time, fn)-> Promise.race [new Promise(fn), new Promise (res, rej)!-> setTimeout rej, time] test 'delay' (assert)!-> assert.expect 3 assert.isFunction delay assert.ok delay(42) instanceof Promise, 'returns promises' timeLimitedPromise(1e3, (res)!-> delay(10).then !-> res it) .then !-> assert.ok it is on, 'resolves as `true`' .catch !-> assert.ok no 'rejected' .then assert.async!core-js-2.4.1/tests/library/core.dict.ls000066400000000000000000000143461274277553300201270ustar00rootroot00000000000000{module, test} = QUnit module 'core-js' {Dict, Set, Symbol} = core {keys, create, assign, make} = core.Object {from} = core.Array test 'Dict' (assert)!-> assert.isFunction Dict dict1 = Dict! assert.ok dict1 not instanceof Object assert.deepEqual keys(dict1), [] dict2 = Dict q:1 w:2 assert.ok dict2 not instanceof Object assert.deepEqual keys(dict2), <[q w]> assert.ok dict2.q is 1 assert.ok dict2.w is 2 dict3 = Dict createIterable [[1 1], [2 2]] assert.ok dict3 not instanceof Object assert.deepEqual keys(dict3), <[1 2]> assert.ok dict3.1 is 1 assert.ok dict3.2 is 2 # return #throw done = no iter = createIterable [null, 1, 2], return: !-> done := on try => new Dict iter assert.ok done, '.return #throw' test 'Dict.every' (assert)!-> {every} = Dict assert.isFunction every every obj = {q: 1} (val, key, that)!-> assert.ok val is 1 assert.ok key is \q assert.ok that is obj assert.ok @ is ctx , ctx = {} assert.ok every {q:1 w:2 e:3} -> typeof! it is \Number assert.ok not every {q:1 w:\2 e:3} -> typeof! it is \Number test 'Dict.filter' (assert)!-> {filter} = Dict assert.isFunction filter filter obj = {q: 1}, (val, key, that)!-> assert.ok val is 1 assert.ok key is \q assert.ok that is obj assert.ok @ is ctx , ctx = {} assert.deepEqual filter({q:1 w:2 e:3} -> it % 2), Dict q: 1 e: 3 test 'Dict.find' (assert)!-> {find} = Dict assert.isFunction find find obj = {q: 1}, (val, key, that)!-> assert.ok val is 1 assert.ok key is \q assert.ok that is obj assert.ok @ is ctx , ctx = {} assert.ok find({q:1 w:2 e:3} -> !(it % 2)) is 2 test 'Dict.findKey' (assert)!-> {findKey} = Dict assert.isFunction findKey findKey obj = {q: 1}, (val, key, that)!-> assert.ok val is 1 assert.ok key is \q assert.ok that is obj assert.ok @ is ctx , ctx = {} assert.ok findKey({q:1 w:2 e:3} -> it is 2) is \w test 'Dict.forEach' (assert)!-> {forEach} = Dict assert.isFunction forEach forEach obj = {q: 1}, (val, key, that)!-> assert.ok val is 1 assert.ok key is \q assert.ok that is obj assert.ok @ is ctx , ctx = {} rez = {} forEach {q: 1 w: 2} (!-> rez[&1] = &0 + @), \_ assert.deepEqual rez, q: \1_ w: \2_ rez = on forEach obj = {q: 1 w: 2} !-> rez &&= (obj is &2) assert.ok rez rez = {} forEach make({e: 3} {q: 1 w: 2}), !-> rez[&1] = &0 assert.ok !(\e of rez) rez = {} forEach [1 2] !-> rez[&1] = &0 assert.ok !(\length of rez) rez = {} forEach \123 !-> rez[&1] = &0 assert.ok \2 of rez test 'Dict.keyOf' (assert)!-> {keyOf} = Dict assert.isFunction keyOf assert.ok keyOf({q:1 w:2 e:3} 2) is \w assert.ok keyOf({q:1 w:2 e:3} 4) is void assert.ok keyOf({q:1 w:2 e:NaN} NaN) is void test 'Dict.map' (assert)!-> {map} = Dict assert.isFunction map map obj = {q: 1}, (val, key, that)!-> assert.ok val is 1 assert.ok key is \q assert.ok that is obj assert.ok @ is ctx , ctx = {} assert.deepEqual map({q:1 w:2 e:3} (^2)), Dict q:1 w:4 e:9 test 'Dict.mapPairs' (assert)!-> {mapPairs} = Dict assert.isFunction mapPairs mapPairs obj = {q: 1}, (val, key, that)!-> assert.ok val is 1 assert.ok key is \q assert.ok that is obj assert.ok @ is ctx , ctx = {} assert.deepEqual mapPairs({q:1 w:2 e:3}, (v, k)-> v != 2 && [k + k, v * v]), Dict qq:1 ee:9 test 'Dict.reduce' (assert)!-> {reduce} = Dict assert.isFunction reduce reduce (obj = a:1), (memo, val, key, that)!-> assert.ok memo is foo assert.ok val is 1 assert.ok key is \a assert.ok that is obj , foo = {} reduce {a:1 b:2}, (memo, val, key)!-> assert.ok memo is 1 assert.ok val is 2 assert.ok key is \b reduce {q:1 w:2 e:3} (that, it)-> that[it] = it that , memo = {} assert.deepEqual memo, 1:1 2:2 3:3 test 'Dict.some' (assert)!-> {some} = Dict assert.isFunction some some obj = {q: 1}, (val, key, that)!-> assert.ok val is 1 assert.ok key is \q assert.ok that is obj assert.ok @ is ctx , ctx = {} assert.ok not some {q:1 w:2 e:3} -> typeof! it is \String assert.ok some {q:1 w:\2 e:3} -> typeof! it is \String test 'Dict.includes' (assert)!-> {includes} = Dict assert.isFunction includes dict = {q:1, w: NaN, e: -0, r: o = {}} assert.ok includes dict, 1 assert.ok includes dict, -0 assert.ok includes dict, 0 assert.ok includes dict, NaN assert.ok includes dict, o assert.ok !includes dict, 4 assert.ok !includes dict, -0.5 assert.ok !includes dict, {} test 'Dict.has' (assert)!-> {has} = Dict assert.isFunction has assert.ok has q:1, \q assert.ok not has q:1, \w assert.ok has [1] 0 assert.ok not has [] 0 assert.ok not has ^^{q:1} \q assert.ok not has {} \toString test 'Dict.get' (assert)!-> {get} = Dict assert.isFunction get assert.ok get(q:1, \q) is 1 assert.ok get(q:1, \w) is void assert.ok get([1] 0) is 1 assert.ok get([] 0) is void assert.ok get(^^{q:1} \q) is void assert.ok get({} \toString) is void test 'Dict.values' (assert)!-> {values} = Dict assert.isFunction values iter = values {} assert.ok iter[Symbol?toStringTag] is 'Dict Iterator' assert.isIterator iter assert.isIterable iter assert.deepEqual from(values({q:1, w:2, e:3})), [1 2 3] assert.deepEqual from(values(new String \qwe)), <[q w e]> assert.deepEqual from(values(assign create({q:1, w:2, e:3}), {a:4, s:5, d:6})), [4 5 6] test 'Dict.keys' (assert)!-> {keys} = Dict assert.isFunction keys iter = keys {} assert.ok iter[Symbol?toStringTag] is 'Dict Iterator' assert.isIterator iter assert.isIterable iter assert.deepEqual from(keys({q:1, w:2, e:3})), <[q w e]> assert.deepEqual from(keys(new String \qwe)), <[0 1 2]> assert.deepEqual from(keys(assign create({q:1, w:2, e:3}), {a:4, s:5, d:6})), <[a s d]> test 'Dict.entries' (assert)!-> {entries} = Dict assert.isFunction entries iter = entries {} assert.ok iter[Symbol?toStringTag] is 'Dict Iterator' assert.isIterator iter assert.isIterable iter assert.deepEqual from(entries({q:1, w:2, e:3})),[[\q 1] [\w 2] [\e 3]] assert.deepEqual from(entries(new String \qwe)), [[\0 \q] [\1 \w] [\2 \e]] assert.deepEqual from(entries(assign create({q:1, w:2, e:3}), {a:4, s:5, d:6})), [[\a 4] [\s 5] [\d 6]]core-js-2.4.1/tests/library/core.function.part.ls000066400000000000000000000015661274277553300217760ustar00rootroot00000000000000{module, test} = QUnit module 'core-js' {map, every, reduce} = core.Array test 'Function#part' (assert)!-> {part} = core.Function $ = core._ assert.isFunction part assert.ok part((-> typeof! it is \String), \qwe)! obj = a: 42 obj.fn = part (-> @a + it), 21 assert.ok obj.fn! is 63 fn = -> map(&, String).join ' ' p = part fn, $, \Саша, $, \шоссе, $, \сосала assert.isFunction p, '.part with placeholders return function' assert.ok p(\Шла \по) is 'Шла Саша по шоссе undefined сосала', '.part with placeholders: args < placeholders' assert.ok p(\Шла \по \и) is 'Шла Саша по шоссе и сосала', '.part with placeholders: args == placeholders' assert.ok p(\Шла \по \и \сушку) is 'Шла Саша по шоссе и сосала сушку', '.part with placeholders: args > placeholders'core-js-2.4.1/tests/library/core.get-iterator-method.ls000066400000000000000000000007221274277553300230610ustar00rootroot00000000000000{module, test} = QUnit module \core-js test 'core.getIteratorMethod' (assert)!-> {getIteratorMethod} = core assert.isFunction getIteratorMethod iterable = createIterable [] iterFn = getIteratorMethod iterable assert.isFunction iterFn assert.isIterator iterFn.call iterable assert.isFunction getIteratorMethod [] assert.isFunction getIteratorMethod (->&)! assert.isFunction getIteratorMethod Array:: assert.strictEqual getIteratorMethod({}), voidcore-js-2.4.1/tests/library/core.get-iterator.ls000066400000000000000000000004561274277553300216070ustar00rootroot00000000000000{module, test} = QUnit module \core-js test 'core.getIterator' (assert)!-> {getIterator} = core assert.isFunction getIterator assert.isIterator getIterator [] assert.isIterator getIterator (->&)! assert.isIterator getIterator createIterable [] assert.throws (!-> getIterator {}), TypeErrorcore-js-2.4.1/tests/library/core.is-iterable.ls000066400000000000000000000004321274277553300213730ustar00rootroot00000000000000{module, test} = QUnit module \core-js test 'core.isIterable' (assert)!-> {isIterable} = core assert.isFunction isIterable assert.ok isIterable createIterable [] assert.ok isIterable [] assert.ok isIterable (->&)! assert.ok isIterable Array:: assert.ok !isIterable {}core-js-2.4.1/tests/library/core.number.iterator.ls000066400000000000000000000022461274277553300223200ustar00rootroot00000000000000{module, test} = QUnit module \core-js test 'Number#@@iterator' (assert)!-> {getIterator} = core {toStringTag} = core.Symbol iter1 = getIterator 2 assert.isIterator iter1 assert.isIterable iter1 assert.ok iter1[toStringTag] is 'Number Iterator', '@@toStringTag' assert.deepEqual iter1.next!, {done: no, value: 0}, '2 #1' assert.deepEqual iter1.next!, {done: no, value: 1}, '2 #2' assert.deepEqual iter1.next!, {done: on, value: void}, '2 #3' iter2 = getIterator 1.5 assert.deepEqual iter2.next!, {done: no, value: 0}, '1.5 #1' assert.deepEqual iter2.next!, {done: no, value: 1}, '1.5 #2' assert.deepEqual iter2.next!, {done: on, value: void}, '1.5 #3' iter3 = getIterator -1 assert.deepEqual iter3.next!, {done: on, value: void}, '-1' iter4 = getIterator NaN assert.deepEqual iter4.next!, {done: on, value: void}, 'NaN' iter5 = getIterator Infinity assert.deepEqual iter5.next!, {done: no, value: 0}, 'Infinity #1' assert.deepEqual iter5.next!, {done: no, value: 1}, 'Infinity #1' assert.deepEqual iter5.next!, {done: no, value: 2}, 'Infinity #1' iter6 = getIterator -Infinity assert.deepEqual iter6.next!, {done: on, value: void}, '-Infinity'core-js-2.4.1/tests/library/core.object.classof.ls000066400000000000000000000044001274277553300220710ustar00rootroot00000000000000{module, test} = QUnit module 'core-js' test 'Object.classof' (assert)!-> {classof} = core.Object assert.isFunction classof assert.ok classof(void) is \Undefined, 'classof undefined is `Undefined`' assert.ok classof(null) is \Null, 'classof null is `Null`' assert.ok classof(true) is \Boolean, 'classof bool is `Boolean`' assert.ok classof('string') is \String, 'classof string is `String`' assert.ok classof(7) is \Number, 'classof number is `Number`' assert.ok classof(core.Symbol!) is \Symbol, 'classof symbol is `Symbol`' assert.ok classof(new Boolean no) is \Boolean, 'classof new Boolean is `Boolean`' assert.ok classof(new String '') is \String, 'classof new String is `String`' assert.ok classof(new Number 7) is \Number, 'classof new Number is `Number`' assert.ok classof({}) is \Object, 'classof {} is `Object`' assert.ok classof([]) is \Array, 'classof array is `Array`' assert.ok classof(->) is \Function, 'classof function is `Function`' assert.ok classof(/./) is \RegExp, 'classof regexp is `Undefined`' assert.ok classof(TypeError!) is \Error, 'classof new TypeError is `RegExp`' assert.ok classof((->&)!) is \Arguments, 'classof arguments list is `Arguments`' assert.ok classof(new core.Set) is \Set, 'classof undefined is `Map`' assert.ok classof(new core.Map) is \Map, 'classof map is `Undefined`' assert.ok classof(new core.WeakSet) is \WeakSet, 'classof weakset is `WeakSet`' assert.ok classof(new core.WeakMap) is \WeakMap, 'classof weakmap is `WeakMap`' assert.ok classof(new core.Promise ->) is \Promise, 'classof promise is `Promise`' assert.ok classof(core.getIterator '') is 'String Iterator', 'classof String Iterator is `String Iterator`' assert.ok classof(core.getIterator []) is 'Array Iterator', 'classof Array Iterator is `Array Iterator`' assert.ok classof(new core.Set!entries!) is 'Set Iterator', 'classof Set Iterator is `Set Iterator`' assert.ok classof(new core.Map!entries!) is 'Map Iterator', 'classof Map Iterator is `Map Iterator`' assert.ok classof(Math) is \Math, 'classof Math is `Math`' if JSON? assert.ok classof(JSON) is \JSON, 'classof JSON is `JSON`' class Class @::[core.Symbol.toStringTag] = \Class assert.ok classof(new Class) is \Class, 'classof user class is [Symbol.toStringTag]'core-js-2.4.1/tests/library/core.object.define.ls000066400000000000000000000005211274277553300216710ustar00rootroot00000000000000{module, test} = QUnit module 'core-js' test 'Object.define' (assert)!-> {define, defineProperty} = core.Object assert.isFunction define foo = q:1 assert.ok foo is define foo, w:2 assert.ok foo.w is 2 if DESCRIPTORS foo = q:1 foo2 = defineProperty {}, \w, get: -> @q + 1 define foo, foo2 assert.ok foo.w is 2core-js-2.4.1/tests/library/core.object.is-object.ls000066400000000000000000000016771274277553300223330ustar00rootroot00000000000000{module, test} = QUnit module 'core-js' test 'Object.isObject' (assert)!-> {isObject} = core.Object assert.isFunction isObject assert.ok not isObject(void), 'isObject undefined return false' assert.ok not isObject(null), 'isObject null return false' assert.ok not isObject(1), 'isObject number return false' assert.ok not isObject(true), 'isObject bool return false' assert.ok not isObject('string'), 'isObject string return false' assert.ok isObject(new Number 1), 'isObject new Number return true' assert.ok isObject(new Boolean no), 'isObject new Boolean return true' assert.ok isObject(new String 1), 'isObject new String return true' assert.ok isObject({}), 'isObject object return true' assert.ok isObject([]), 'isObject array return true' assert.ok isObject(/./), 'isObject regexp return true' assert.ok isObject(->), 'isObject function return true' assert.ok isObject(new ->), 'isObject constructor instance return true'core-js-2.4.1/tests/library/core.object.make.ls000066400000000000000000000003521274277553300213560ustar00rootroot00000000000000{module, test} = QUnit module 'core-js' test 'Object.make' (assert)!-> {make} = core.Object assert.isFunction make object = make foo = {q:1}, {w:2} assert.ok core.Object.getPrototypeOf(object) is foo assert.ok object.w is 2core-js-2.4.1/tests/library/core.regexp.escape.ls000066400000000000000000000005151274277553300217260ustar00rootroot00000000000000{module, test} = QUnit module \core-js test 'RegExp.escape' (assert)!-> {escape} = core.RegExp assert.isFunction escape assert.strictEqual escape('qwe asd'), 'qwe asd', "Don't change simple string" assert.strictEqual escape('\\[]{}()*+?.^$|'), '\\\\\\[\\]\\{\\}\\(\\)\\*\\+\\?\\.\\^\\$\\|', 'Escape all RegExp special chars'core-js-2.4.1/tests/library/core.string.escape-html.ls000066400000000000000000000005301274277553300227010ustar00rootroot00000000000000{module, test} = QUnit module 'core-js' test 'String#escapeHTML' (assert)!-> {escapeHTML} = core.String assert.isFunction escapeHTML assert.strictEqual escapeHTML('qwe, asd'), 'qwe, asd' assert.strictEqual escapeHTML('
qwe
'), '<div>qwe</div>' assert.strictEqual escapeHTML("&<>\"'"), '&<>"''core-js-2.4.1/tests/library/core.string.unescape-html.ls000066400000000000000000000005441274277553300232510ustar00rootroot00000000000000{module, test} = QUnit module 'core-js' test 'String#unescapeHTML' (assert)!-> {unescapeHTML} = core.String assert.isFunction unescapeHTML assert.strictEqual unescapeHTML('qwe, asd'), 'qwe, asd' assert.strictEqual unescapeHTML('<div>qwe</div>'), '
qwe
' assert.strictEqual unescapeHTML('&<>"''), "&<>\"'"core-js-2.4.1/tests/library/es6.array.copy-within.ls000066400000000000000000000020351274277553300223300ustar00rootroot00000000000000{module, test} = QUnit module \ES6 test 'Array#copyWithin' (assert)!-> {copyWithin} = core.Array assert.isFunction copyWithin assert.strictEqual (a = copyWithin [1], 0), a assert.deepEqual copyWithin([1 2 3 4 5], 0 3), [4 5 3 4 5] assert.deepEqual copyWithin([1 2 3 4 5], 1 3), [1 4 5 4 5] assert.deepEqual copyWithin([1 2 3 4 5], 1 2), [1 3 4 5 5] assert.deepEqual copyWithin([1 2 3 4 5], 2 2), [1 2 3 4 5] assert.deepEqual copyWithin([1 2 3 4 5], 0 3 4), [4 2 3 4 5] assert.deepEqual copyWithin([1 2 3 4 5], 1 3 4), [1 4 3 4 5] assert.deepEqual copyWithin([1 2 3 4 5], 1 2 4), [1 3 4 4 5] assert.deepEqual copyWithin([1 2 3 4 5], 0 -2), [4 5 3 4 5] assert.deepEqual copyWithin([1 2 3 4 5], 0 -2 -1), [4 2 3 4 5] assert.deepEqual copyWithin([1 2 3 4 5], -4 -3 -2), [1 3 3 4 5] assert.deepEqual copyWithin([1 2 3 4 5], -4 -3 -1), [1 3 4 4 5] assert.deepEqual copyWithin([1 2 3 4 5], -4 -3), [1 3 4 5 5] if STRICT assert.throws (!-> copyWithin null, 0), TypeError assert.throws (!-> copyWithin void, 0), TypeErrorcore-js-2.4.1/tests/library/es6.array.every.ls000066400000000000000000000016011274277553300212060ustar00rootroot00000000000000{module, test} = QUnit module \ES6 test 'Array#every' (assert)!-> {every} = core.Array assert.isFunction every every (a = [1]), (val, key, that)!-> assert.same &length, 3, 'correct number of callback arguments' assert.same val, 1, 'correct value in callback' assert.same key, 0, 'correct index in callback' assert.same that, a, 'correct link to array in callback' assert.same @, ctx, 'correct callback context' , ctx = {} assert.ok every [1 2 3], -> typeof! it is \Number assert.ok every [1 2 3], (<4) assert.ok not every [1 2 3], (<3) assert.ok not every [1 2 3], -> typeof! it is \String assert.ok every [1 2 3], (-> +@ is 1 ), 1 rez = '' every [1 2 3], -> rez += &1 assert.ok rez is \012 assert.ok every (arr = [1 2 3]), -> &2 is arr if STRICT assert.throws (!-> every null, !->), TypeError assert.throws (!-> every void, !->), TypeErrorcore-js-2.4.1/tests/library/es6.array.fill.ls000066400000000000000000000010651274277553300210060ustar00rootroot00000000000000{module, test} = QUnit module \ES6 test 'Array#fill' (assert)!-> {fill} = core.Array assert.isFunction fill assert.strictEqual (a = fill Array(5), 5), a assert.deepEqual fill(Array(5), 5), [5 5 5 5 5] assert.deepEqual fill(Array(5), 5 1), [void 5 5 5 5] assert.deepEqual fill(Array(5), 5 1 4), [void 5 5 5 void] assert.deepEqual fill(Array(5), 5 6 1), [void void void void void] assert.deepEqual fill(Array(5), 5 -3 4), [void void 5 5 void] if STRICT assert.throws (!-> fill null, 0), TypeError assert.throws (!-> fill void, 0), TypeErrorcore-js-2.4.1/tests/library/es6.array.filter.ls000066400000000000000000000012161274277553300213430ustar00rootroot00000000000000{module, test} = QUnit module \ES6 test 'Array#filter' (assert)!-> {filter} = core.Array assert.isFunction filter filter (a = [1]), (val, key, that)!-> assert.same &length, 3, 'correct number of callback arguments' assert.same val, 1, 'correct value in callback' assert.same key, 0, 'correct index in callback' assert.same that, a, 'correct link to array in callback' assert.same @, ctx, 'correct callback context' , ctx = {} assert.deepEqual [1 2 3 4 5] filter [1 2 3 \q {} 4 on 5], -> typeof it is \number if STRICT assert.throws (!-> filter null, !->), TypeError assert.throws (!-> filter void, !->), TypeErrorcore-js-2.4.1/tests/library/es6.array.find-index.ls000066400000000000000000000007451274277553300221110ustar00rootroot00000000000000{module, test} = QUnit module \ES6 test 'Array#findIndex' (assert)!-> {findIndex} = core.Array assert.isFunction findIndex findIndex arr = [1], (val, key, that)!-> assert.strictEqual @, ctx assert.strictEqual val, 1 assert.strictEqual key, 0 assert.strictEqual that, arr , ctx = {} assert.strictEqual findIndex([1 3 NaN, 42 {}], (is 42)), 3 if STRICT assert.throws (!-> findIndex null, 0), TypeError assert.throws (!-> findIndex void, 0), TypeErrorcore-js-2.4.1/tests/library/es6.array.find.ls000066400000000000000000000007761274277553300210100ustar00rootroot00000000000000{module, test} = QUnit module \ES6 test 'Array#find' (assert)!-> {find} = core.Array assert.isFunction find find arr = [1], (val, key, that)!-> assert.strictEqual @, ctx assert.strictEqual val, 1 assert.strictEqual key, 0 assert.strictEqual that, arr , ctx = {} assert.strictEqual find([1 3 NaN, 42 {}], (is 42)), 42 assert.strictEqual find([1 3 NaN, 42 {}], (is 43)), void if STRICT assert.throws (!-> find null, 0), TypeError assert.throws (!-> find void, 0), TypeErrorcore-js-2.4.1/tests/library/es6.array.for-each.ls000066400000000000000000000016661274277553300215530ustar00rootroot00000000000000{module, test} = QUnit module \ES6 test 'Array#forEach' (assert)!-> {forEach} = core.Array assert.isFunction forEach forEach (a = [1]), (val, key, that)!-> assert.same &length, 3, 'correct number of callback arguments' assert.same val, 1, 'correct value in callback' assert.same key, 0, 'correct index in callback' assert.same that, a, 'correct link to array in callback' assert.same @, ctx, 'correct callback context' , ctx = {} rez = '' forEach [1 2 3], !-> rez += it assert.ok rez is \123 rez = '' forEach [1 2 3], !-> rez += &1 assert.ok rez is \012 rez = '' forEach [1 2 3], !-> rez += &2 assert.ok rez is '1,2,31,2,31,2,3' rez='' forEach [1 2 3], (!->rez+=@), 1 assert.ok rez is \111 rez = '' arr = [] arr.5 = '' forEach arr, (, k)!-> rez += k assert.ok rez is \5 if STRICT assert.throws (!-> forEach null, !->), TypeError assert.throws (!-> forEach void, !->), TypeErrorcore-js-2.4.1/tests/library/es6.array.from.ls000066400000000000000000000062471274277553300210320ustar00rootroot00000000000000{module, test} = QUnit module \ES6 test 'Array.from' (assert)!-> {from, isArray} = core.Array {defineProperty} = core.Object iterator = core.Symbol.iterator assert.isFunction from assert.arity from, 1 for type, col of {'array-like': {length: \3, 0: \1, 1: \2, 2: \3}, arguments: (-> &)(\1 \2 \3), array: <[1 2 3]>, iterable: createIterable(<[1 2 3]>), string: \123} assert.arrayEqual from(col), <[1 2 3]>, "Works with #type" assert.arrayEqual from(col, (^2)), [1 4 9], "Works with #type + mapFn" for type, col of {'array-like': {length: 1, 0: 1}, arguments: (-> &)(1), array: [1], iterable: createIterable([1]), string: \1} assert.arrayEqual (from col, (val, key)-> assert.same @, ctx, "Works with #type, correct callback context" assert.same val, if type is \string => \1 else 1, "Works with #type, correct callback key" assert.same key, 0, "Works with #type, correct callback value" assert.same &length, 2, "Works with #type, correct callback arguments number" 42 , ctx = {}), [42], "Works with #type, correct result" for [no on 0] assert.arrayEqual from(..), [], "Works with #{..}" for [null void] assert.throws (!-> from ..), TypeError, "Throws on #{..}" assert.arrayEqual from('𠮷𠮷𠮷'), <[𠮷 𠮷 𠮷]>, 'Uses correct string iterator' # return #default done = on iter = createIterable [1 2 3], return: -> done := no from iter, -> return no assert.ok done, '.return #default' # return #throw done = no iter = createIterable [1 2 3], return: -> done := on try => from iter, -> throw 42 assert.ok done, '.return #throw' # generic, iterable case F = !-> inst = from.call F, createIterable [1 2] assert.ok inst instanceof F, 'generic, iterable case, instanceof' assert.arrayEqual inst, [1 2], 'generic, iterable case, elements' # generic, array-like case inst = from.call F, {0: 1, 1: 2, length: 2} assert.ok inst instanceof F, 'generic, array-like case, instanceof' assert.arrayEqual inst, [1 2], 'generic, array-like case, elements' # call @@iterator in Array with custom iterator a = [1 2 3] done = no a['@@iterator'] = void a[iterator] = -> done := on core.getIteratorMethod([])call @ assert.arrayEqual from(a), [1 2 3], 'Array with custom iterator, elements' assert.ok done, 'call @@iterator in Array with custom iterator' array = [1 2 3] delete array.1 assert.arrayEqual from(array, String), <[1 undefined 3]>, 'Ignores holes' assert.ok (try from {length: -1, 0: 1}, !-> throw 42), 'Uses ToLength' assert.arrayEqual from([], undefined), [], "Works with undefined as asecond argument" assert.throws (!-> from [], null), TypeError, "Throws with null as second argument" assert.throws (!-> from [], 0), TypeError, "Throws with 0 as second argument" assert.throws (!-> from [], ''), TypeError, "Throws with '' as second argument" assert.throws (!-> from [], no), TypeError, "Throws with false as second argument" assert.throws (!-> from [], {}), TypeError, "Throws with {} as second argument" if DESCRIPTORS called = no F = !-> defineProperty F::, 0, set: !-> called = on from.call F, [1 2 3] assert.ok !called, 'Should not call prototype accessors'core-js-2.4.1/tests/library/es6.array.index-of.ls000066400000000000000000000011711274277553300215670ustar00rootroot00000000000000{module, test} = QUnit module \ES6 test 'Array#indexOf' (assert)!-> {indexOf} = core.Array assert.isFunction indexOf assert.same 0, indexOf [1 1 1], 1 assert.same -1, indexOf [1 2 3], 1 1 assert.same 1, indexOf [1 2 3], 2 1 assert.same -1, indexOf [1 2 3], 2 -1 assert.same 1, indexOf [1 2 3], 2 -2 assert.same -1, indexOf [NaN], NaN assert.same 3, indexOf Array(2)concat([1 2 3]), 2 assert.same -1, indexOf Array(1), void assert.same 0, indexOf([1], 1, -0), "shouldn't return negative zero" if STRICT assert.throws (!-> indexOf null, 0), TypeError assert.throws (!-> indexOf void, 0), TypeErrorcore-js-2.4.1/tests/library/es6.array.is-array.ls000066400000000000000000000003131274277553300216020ustar00rootroot00000000000000{module, test} = QUnit module \ES6 test 'Array.isArray' (assert)!-> {isArray} = core.Array assert.isFunction isArray assert.ok not isArray {} assert.ok not isArray do -> & assert.ok isArray []core-js-2.4.1/tests/library/es6.array.iterator.ls000066400000000000000000000033441274277553300217130ustar00rootroot00000000000000{module, test} = QUnit module \ES6 {Symbol} = core {keys, values, entries} = core.Array test 'Array#@@iterator' (assert)!-> assert.isFunction values iter = core.getIterator <[q w e]> assert.isIterator iter assert.isIterable iter assert.strictEqual iter[Symbol?toStringTag], 'Array Iterator' assert.deepEqual iter.next!, {value: \q, done: no} assert.deepEqual iter.next!, {value: \w, done: no} assert.deepEqual iter.next!, {value: \e, done: no} assert.deepEqual iter.next!, {value: void, done: on} test 'Array#keys' (assert)!-> assert.isFunction keys iter = keys <[q w e]> assert.isIterator iter assert.isIterable iter assert.strictEqual iter[Symbol?toStringTag], 'Array Iterator' assert.deepEqual iter.next!, {value: 0, done: no} assert.deepEqual iter.next!, {value: 1, done: no} assert.deepEqual iter.next!, {value: 2, done: no} assert.deepEqual iter.next!, {value: void, done: on} test 'Array#values' (assert)!-> assert.isFunction values iter = values <[q w e]> assert.isIterator iter assert.isIterable iter assert.strictEqual iter[Symbol?toStringTag], 'Array Iterator' assert.deepEqual iter.next!, {value: \q, done: no} assert.deepEqual iter.next!, {value: \w, done: no} assert.deepEqual iter.next!, {value: \e, done: no} assert.deepEqual iter.next!, {value: void, done: on} test 'Array#entries' (assert)!-> assert.isFunction entries iter = entries <[q w e]> assert.isIterator iter assert.isIterable iter assert.strictEqual iter[Symbol?toStringTag], 'Array Iterator' assert.deepEqual iter.next!, {value: [0 \q], done: no} assert.deepEqual iter.next!, {value: [1 \w], done: no} assert.deepEqual iter.next!, {value: [2 \e], done: no} assert.deepEqual iter.next!, {value: void, done: on}core-js-2.4.1/tests/library/es6.array.join.ls000066400000000000000000000005341274277553300210170ustar00rootroot00000000000000{module, test} = QUnit module \ES6 test 'Array#join' (assert)!-> {join} = core.Array assert.isFunction join assert.strictEqual join([1 2 3] void), '1,2,3' assert.strictEqual join(\123), '1,2,3' assert.strictEqual join(\123 \|), '1|2|3' if STRICT assert.throws (!-> join null), TypeError assert.throws (!-> join void), TypeErrorcore-js-2.4.1/tests/library/es6.array.last-index-of.ls000066400000000000000000000012601274277553300225270ustar00rootroot00000000000000{module, test} = QUnit module \ES6 test 'Array#lastIndexOf' (assert)!-> {lastIndexOf} = core.Array assert.isFunction lastIndexOf assert.same 2, lastIndexOf [1 1 1], 1 assert.same -1, lastIndexOf [1 2 3], 3 1 assert.same 1, lastIndexOf [1 2 3], 2 1 assert.same -1, lastIndexOf [1 2 3], 2 -3 assert.same -1, lastIndexOf [1 2 3], 1, -4 assert.same 1, lastIndexOf [1 2 3], 2 -2 assert.same -1, lastIndexOf [NaN], NaN assert.same 1, lastIndexOf [1 2 3]concat(Array 2), 2 assert.same 0, lastIndexOf([1], 1, -0), "shouldn't return negative zero" if STRICT assert.throws (!-> lastIndexOf null, 0), TypeError assert.throws (!-> lastIndexOf void, 0), TypeErrorcore-js-2.4.1/tests/library/es6.array.map.ls000066400000000000000000000012661274277553300206400ustar00rootroot00000000000000{module, test} = QUnit module \ES6 test 'Array#map' (assert)!-> {map} = core.Array assert.isFunction map map (a = [1]), (val, key, that)-> assert.same &length, 3, 'correct number of callback arguments' assert.same val, 1, 'correct value in callback' assert.same key, 0, 'correct index in callback' assert.same that, a, 'correct link to array in callback' assert.same @, ctx, 'correct callback context' , ctx = {} assert.deepEqual [2 3 4] map [1 2 3], (+ 1) assert.deepEqual [1 3 5] map [1 2 3], ( + ) assert.deepEqual [2 2 2] map [1 2 3], (-> +@), 2 if STRICT assert.throws (!-> map null, !->), TypeError assert.throws (!-> map void, !->), TypeErrorcore-js-2.4.1/tests/library/es6.array.of.ls000066400000000000000000000011451274277553300204630ustar00rootroot00000000000000{module, test} = QUnit module \ES6 test 'Array.of' (assert)!-> {Array} = core {defineProperty} = core.Object assert.isFunction Array.of assert.arity Array.of, 0 assert.deepEqual Array.of(1), [1] assert.deepEqual Array.of(1 2 3), [1 2 3] # generic F = !-> inst = Array.of.call F, 1, 2 assert.ok inst instanceof F assert.strictEqual inst.0, 1 assert.strictEqual inst.1, 2 assert.strictEqual inst.length, 2 if DESCRIPTORS called = no F = !-> defineProperty F::, 0, set: !-> called = on Array.of.call F, 1, 2, 3 assert.ok !called, 'Should not call prototype accessors'core-js-2.4.1/tests/library/es6.array.reduce-right.ls000066400000000000000000000024141274277553300224410ustar00rootroot00000000000000{module, test} = QUnit module \ES6 test 'Array#reduceRight' (assert)!-> {reduceRight} = core.Array assert.isFunction reduceRight reduceRight (a = [1]), (memo, val, key, that)!-> assert.same &length, 4, 'correct number of callback arguments' assert.same memo, accumulator, 'correct callback accumulator' assert.same val, 1, 'correct value in callback' assert.same key, 0, 'correct index in callback' assert.same that, a, 'correct link to array in callback' , accumulator = {} assert.same reduceRight([1 2 3], (+), 1), 7, 'works with initial accumulator' reduceRight (a = [1 2]), (memo, val, key, that)!-> assert.same memo, 2, 'correct default accumulator' assert.same val, 1, 'correct start value without initial accumulator' assert.same key, 0, 'correct start index without initial accumulator' assert.same reduceRight([1 2 3], (+)), 6, 'works without initial accumulator' v = '' k = '' reduceRight [1 2 3], (memo, a, b)!-> v += a k += b , 0 assert.same v, \321,'correct order #1' assert.same k, \210,'correct order #2' assert.same reduceRight({0: 1, 1: 2, length: 2}, (+)), 3, 'generic' if STRICT assert.throws (!-> reduceRight null, (!->), 1), TypeError assert.throws (!-> reduceRight void, (!->), 1), TypeErrorcore-js-2.4.1/tests/library/es6.array.reduce.ls000066400000000000000000000023241274277553300213260ustar00rootroot00000000000000{module, test} = QUnit module \ES6 test 'Array#reduce' (assert)!-> {reduce} = core.Array assert.isFunction reduce reduce (a = [1]), (memo, val, key, that)!-> assert.same &length, 4, 'correct number of callback arguments' assert.same memo, accumulator, 'correct callback accumulator' assert.same val, 1, 'correct value in callback' assert.same key, 0, 'correct index in callback' assert.same that, a, 'correct link to array in callback' , accumulator = {} assert.same reduce([1 2 3] (+), 1), 7, 'works with initial accumulator' reduce (a = [1 2]), (memo, val, key, that)!-> assert.same memo, 1, 'correct default accumulator' assert.same val, 2, 'correct start value without initial accumulator' assert.same key, 1, 'correct start index without initial accumulator' assert.same reduce([1 2 3], (+)), 6, 'works without initial accumulator' v = '' k = '' reduce [1 2 3], (memo, a, b)!-> v += a k += b , 0 assert.same v, \123,'correct order #1' assert.same k, \012,'correct order #2' assert.same reduce({0: 1, 1: 2, length: 2}, (+)), 3, 'generic' if STRICT assert.throws (!-> reduce null, (!->), 1), TypeError assert.throws (!-> reduce void, (!->), 1), TypeErrorcore-js-2.4.1/tests/library/es6.array.slice.ls000066400000000000000000000016151274277553300211600ustar00rootroot00000000000000{module, test} = QUnit module \ES6 test 'Array#slice' (assert)!-> {slice} = core.Array assert.isFunction slice arr = <[1 2 3 4 5]> assert.deepEqual slice(arr), arr assert.deepEqual slice(arr, 1 3), <[2 3]> assert.deepEqual slice(arr, 1 void), <[2 3 4 5]> assert.deepEqual slice(arr, 1 -1), <[2 3 4]> assert.deepEqual slice(arr, -2 -1), <[4]> assert.deepEqual slice(arr, -2 -3), [] str = \12345 assert.deepEqual slice(str), arr assert.deepEqual slice(str, 1 3), <[2 3]> assert.deepEqual slice(str, 1 void), <[2 3 4 5]> assert.deepEqual slice(str, 1 -1), <[2 3 4]> assert.deepEqual slice(str, -2 -1), <[4]> assert.deepEqual slice(str, -2 -3), [] if list = document?body?childNodes try assert.strictEqual typeof! slice(list), \Array catch => assert.ok no if NATIVE and STRICT assert.throws (!-> slice null), TypeError assert.throws (!-> slice void), TypeErrorcore-js-2.4.1/tests/library/es6.array.some.ls000066400000000000000000000016041274277553300210220ustar00rootroot00000000000000{module, test} = QUnit module \ES6 test 'Array#some' (assert)!-> {some} = core.Array assert.isFunction some some (a = [1]), (val, key, that)!-> assert.same &length, 3, 'correct number of callback arguments' assert.same val, 1, 'correct value in callback' assert.same key, 0, 'correct index in callback' assert.same that, a, 'correct link to array in callback' assert.same @, ctx, 'correct callback context' , ctx = {} assert.ok some [1 \2 3], -> typeof! it is \Number assert.ok some [1 2 3], (<3) assert.ok not some [1 2 3], (<0) assert.ok not some [1 2 3], -> typeof! it is \String assert.ok not some [1 2 3], (-> +@ isnt 1), 1 rez = '' some [1 2 3], -> rez += &1; no assert.ok rez is \012 assert.ok not some (arr = [1 2 3]), -> &2 isnt arr if STRICT assert.throws (!-> some null, !->), TypeError assert.throws (!-> some void, !->), TypeErrorcore-js-2.4.1/tests/library/es6.array.sort.ls000066400000000000000000000006531274277553300210510ustar00rootroot00000000000000{module, test} = QUnit module \ES6 test 'Array#sort' (assert)!-> {sort} = core.Array assert.isFunction sort assert.ok !!(try sort [1 2 3], void), 'works with undefined' assert.throws (!-> sort [1 2 3], null), 'throws on null' assert.throws (!-> sort [1 2 3], {}), 'throws on {}' if STRICT assert.throws (!-> sort null), TypeError, 'ToObject(this)' assert.throws (!-> sort void), TypeError, 'ToObject(this)'core-js-2.4.1/tests/library/es6.date.now.ls000066400000000000000000000002471274277553300204630ustar00rootroot00000000000000{module, test} = QUnit module \ES6 test 'Date.now' (assert)!-> {now} = core.Date assert.isFunction now assert.ok +new Date - now! < 10, 'Date.now() ~ +new Date'core-js-2.4.1/tests/library/es6.date.to-iso-string.ls000066400000000000000000000012301274277553300223670ustar00rootroot00000000000000{module, test} = QUnit module \ES6 test 'Date#toISOString' (assert)!-> {toISOString} = core.Date assert.isFunction toISOString assert.strictEqual toISOString(new Date 0), '1970-01-01T00:00:00.000Z' assert.strictEqual toISOString(new Date 1e12+1), '2001-09-09T01:46:40.001Z' assert.strictEqual toISOString(new Date -5e13-1), '0385-07-25T07:06:39.999Z' ft = toISOString new Date 1e15+1 assert.ok(ft is '+033658-09-27T01:46:40.001Z' or ft is '33658-09-27T01:46:40.001Z') bc = toISOString new Date -1e15+1 assert.ok(bc is '-029719-04-05T22:13:20.001Z' or bc is '-29719-04-05T22:13:20.001Z') assert.throws (!-> toISOString new Date NaN), RangeErrorcore-js-2.4.1/tests/library/es6.date.to-json.ls000066400000000000000000000005131274277553300212450ustar00rootroot00000000000000{module, test} = QUnit module \ES6 test 'Date#toJSON' (assert)!-> {toJSON, toISOString} = core.Date assert.isFunction toJSON if Date::toISOString d = new Date! assert.same toJSON(d), toISOString(d), 'base' assert.same toJSON(new Date NaN), null, 'not finite' assert.same toJSON(toISOString: -> 42), 42, 'generic'core-js-2.4.1/tests/library/es6.function.bind.ls000066400000000000000000000011421274277553300214770ustar00rootroot00000000000000{module, test} = QUnit module \ES6 test 'Function#bind' (assert)!-> {bind} = core.Function assert.isFunction bind obj = a: 42 assert.ok 42 is bind((-> @a), obj)! assert.ok void is new (bind((->), obj))!a fn = (@a, @b)-> inst = new (bind fn, null, 1) 2 assert.ok inst instanceof fn assert.strictEqual inst.a, 1 assert.strictEqual inst.b, 2 assert.ok 42 is bind((-> it), null 42)! fn = bind RegExp::test, /a/ assert.ok fn \a F = bind Date, null 2015 date = new F 6 assert.ok date instanceof Date assert.strictEqual date.getFullYear!, 2015 assert.strictEqual date.getMonth!, 6core-js-2.4.1/tests/library/es6.function.has-instance.ls000066400000000000000000000003421274277553300231410ustar00rootroot00000000000000{module, test} = QUnit module \ES6 test 'Function#@@hasInstance' (assert)!-> assert.ok core.Symbol.hasInstance of Function:: assert.ok Function[core.Symbol.hasInstance] -> assert.ok !Function[core.Symbol.hasInstance] {}core-js-2.4.1/tests/library/es6.map.ls000066400000000000000000000174501274277553300175250ustar00rootroot00000000000000{module, test} = QUnit module \ES6 same = (a, b)-> if a is b => a isnt 0 or 1 / a is 1 / b else a !~= a and b !~= b {Map, Set, Symbol} = core {getOwnPropertyDescriptor, freeze} = core.Object {iterator} = core.Symbol test 'Map' (assert)!-> assert.isFunction Map assert.ok \clear of Map::, 'clear in Map.prototype' assert.ok \delete of Map::, 'delete in Map.prototype' assert.ok \forEach of Map::, 'forEach in Map.prototype' assert.ok \get of Map::, 'get in Map.prototype' assert.ok \has of Map::, 'has in Map.prototype' assert.ok \set of Map::, 'set in Map.prototype' assert.ok new Map instanceof Map, 'new Map instanceof Map' assert.strictEqual new Map(createIterable [[1 1], [2 2], [3 3]]).size, 3, 'Init from iterable' assert.strictEqual new Map([[freeze({}), 1], [2 3]]).size, 2, 'Support frozen objects' # return #throw done = no iter = createIterable [null, 1, 2], return: -> done := on try => new Map iter assert.ok done, '.return #throw' # call @@iterator in Array with custom iterator a = [] done = no a['@@iterator'] = void a[iterator] = -> done := on core.getIteratorMethod([])call @ new Map a assert.ok done o = {} new Map!set o, 1 if DESCRIPTORS assert.arrayEqual [key for key of o], [] assert.arrayEqual core.Object.keys(o), [] assert.arrayEqual core.Object.getOwnPropertyNames(o), [] assert.arrayEqual core.Object.getOwnPropertySymbols(o), [] assert.arrayEqual core.Reflect.ownKeys(o), [] if nativeSubclass C = nativeSubclass Map assert.ok new C instanceof C, 'correct subclassing with native classes #1' assert.ok new C instanceof Map, 'correct subclassing with native classes #2' assert.same new C!set(1 2).get(1), 2, 'correct subclassing with native classes #3' test 'Map#clear' (assert)!-> assert.isFunction Map::clear M = new Map M.clear! assert.strictEqual M.size, 0 M = new Map!set 1 2 .set 2 3 .set 1 4 M.clear! assert.strictEqual M.size, 0 assert.ok !M.has 1 assert.ok !M.has 2 M = new Map!set 1 2 .set f = freeze({}), 3 M.clear! assert.strictEqual M.size, 0, 'Support frozen objects' assert.ok !M.has 1 assert.ok !M.has f test 'Map#delete' (assert)!-> assert.isFunction Map::delete a = [] M = new Map!set NaN, 1 .set 2 1 .set 3 1 .set 2 5 .set 1 4 .set a, {} assert.strictEqual M.size, 5 assert.ok M.delete(NaN) assert.strictEqual M.size, 4 assert.ok !M.delete(4) assert.strictEqual M.size, 4 M.delete [] assert.strictEqual M.size, 4 M.delete a assert.strictEqual M.size, 3 M.set freeze(f = {}), 42 assert.strictEqual M.size, 4 M.delete f assert.strictEqual M.size, 3 test 'Map#forEach' (assert)!-> assert.isFunction Map::forEach r = {} var T count = 0 M = new Map!set NaN, 1 .set 2 1 .set 3 7 .set 2 5 .set 1 4 .set a = {}, 9 M.forEach (value, key)!-> count++ r[value] = key assert.strictEqual count, 5 assert.deepEqual r, {1: NaN, 7: 3, 5: 2, 4: 1, 9: a} map = new Map [[\0 9], [\1 9], [\2 9], [\3 9]] s = ""; map.forEach (value, key)!-> s += key; if key is \2 map.delete \2 map.delete \3 map.delete \1 map.set \4 9 assert.strictEqual s, \0124 map = new Map [[\0 1]] s = ""; map.forEach !-> map.delete \0 if s isnt '' => throw '!!!' s += it assert.strictEqual s, \1 assert.throws (!-> Map::forEach.call new Set, !->), 'non-generic' test 'Map#get' (assert)!-> assert.isFunction Map::get o = {} f = freeze {} M = new Map [[NaN, 1], [2 1], [3 1], [2 5], [1 4], [f, 42], [o, o]] assert.strictEqual M.get(NaN), 1 assert.strictEqual M.get(4), void assert.strictEqual M.get({}), void assert.strictEqual M.get(o), o assert.strictEqual M.get(f), 42 assert.strictEqual M.get(2), 5 test 'Map#has' (assert)!-> assert.isFunction Map::has o = {} f = freeze {} M = new Map [[NaN, 1], [2 1], [3 1], [2 5], [1 4], [f, 42], [o, o]] assert.ok M.has NaN assert.ok M.has o assert.ok M.has 2 assert.ok M.has f assert.ok not M.has 4 assert.ok not M.has {} test 'Map#set' (assert)!-> assert.isFunction Map::set o = {} M = new Map!set NaN, 1 .set 2 1 .set 3 1 .set 2 5 .set 1 4 .set o, o assert.ok M.size is 5 chain = M.set(7 2) assert.strictEqual chain, M M.set 7 2 assert.strictEqual M.size, 6 assert.strictEqual M.get(7), 2 assert.strictEqual M.get(NaN), 1 M.set NaN, 42 assert.strictEqual M.size, 6 assert.strictEqual M.get(NaN), 42 M.set {}, 11 assert.strictEqual M.size, 7 assert.strictEqual M.get(o), o M.set o, 27 assert.strictEqual M.size, 7 assert.strictEqual M.get(o), 27 assert.strictEqual new Map!set(NaN, 2)set(NaN, 3)set(NaN, 4)size, 1 M = new Map!set freeze(f = {}), 42 assert.strictEqual M.get(f), 42 test 'Map#size' (assert)!-> size = new Map!set 2 1 .size assert.strictEqual typeof size, \number, 'size is number' assert.strictEqual size, 1, 'size is correct' if DESCRIPTORS sizeDesc = getOwnPropertyDescriptor Map::, \size assert.ok sizeDesc && sizeDesc.get, 'size is getter' assert.ok sizeDesc && !sizeDesc.set, 'size isnt setter' assert.throws (!-> Map::size), TypeError test 'Map & -0' (assert)!-> map = new Map map.set -0, 1 assert.strictEqual map.size, 1 assert.ok map.has 0 assert.ok map.has -0 assert.strictEqual map.get(0), 1 assert.strictEqual map.get(-0), 1 map.forEach (val, key)-> assert.ok !same key, -0 map.delete -0 assert.strictEqual map.size, 0 map = new Map [[-0 1]] map.forEach (val, key)-> assert.ok !same key, -0 map = new Map! ..set 4, 4 ..set 3, 3 ..set 2, 2 ..set 1, 1 ..set 0, 0 assert.ok map.has -0 test 'Map#@@toStringTag' (assert)!-> assert.strictEqual Map::[Symbol?toStringTag], \Map, 'Map::@@toStringTag is `Map`' test 'Map Iterator' (assert)!-> map = new Map [[\a 1], [\b 2], [\c 3], [\d 4]] keys = [] iterator = map.keys! keys.push iterator.next!value assert.ok map.delete \a assert.ok map.delete \b assert.ok map.delete \c map.set \e keys.push iterator.next!value keys.push iterator.next!value assert.ok iterator.next!done map.set \f assert.ok iterator.next!done assert.deepEqual keys, <[a d e]> test 'Map#keys' (assert)!-> assert.isFunction Map::keys iter = new Map([[\a \q],[\s \w],[\d \e]])keys! assert.isIterator iter assert.isIterable iter assert.strictEqual iter[Symbol?toStringTag], 'Map Iterator' assert.deepEqual iter.next!, {value: \a, done: no} assert.deepEqual iter.next!, {value: \s, done: no} assert.deepEqual iter.next!, {value: \d, done: no} assert.deepEqual iter.next!, {value: void, done: on} test 'Map#values' (assert)!-> assert.isFunction Map::values iter = new Map([[\a \q],[\s \w],[\d \e]])values! assert.isIterator iter assert.isIterable iter assert.strictEqual iter[Symbol?toStringTag], 'Map Iterator' assert.deepEqual iter.next!, {value: \q, done: no} assert.deepEqual iter.next!, {value: \w, done: no} assert.deepEqual iter.next!, {value: \e, done: no} assert.deepEqual iter.next!, {value: void, done: on} test 'Map#entries' (assert)!-> assert.isFunction Map::entries iter = new Map([[\a \q],[\s \w],[\d \e]])entries! assert.isIterator iter assert.isIterable iter assert.strictEqual iter[Symbol?toStringTag], 'Map Iterator' assert.deepEqual iter.next!, {value: [\a \q], done: no} assert.deepEqual iter.next!, {value: [\s \w], done: no} assert.deepEqual iter.next!, {value: [\d \e], done: no} assert.deepEqual iter.next!, {value: void, done: on} test 'Map#@@iterator' (assert)!-> iter = core.getIterator new Map [[\a \q],[\s \w],[\d \e]] assert.isIterator iter assert.isIterable iter assert.strictEqual iter[Symbol?toStringTag], 'Map Iterator' assert.deepEqual iter.next!, {value: [\a \q], done: no} assert.deepEqual iter.next!, {value: [\s \w], done: no} assert.deepEqual iter.next!, {value: [\d \e], done: no} assert.deepEqual iter.next!, {value: void, done: on}core-js-2.4.1/tests/library/es6.math.acosh.ls000066400000000000000000000012751274277553300207730ustar00rootroot00000000000000{module, test} = QUnit module \ES6 # Returns an implementation-dependent approximation to the inverse hyperbolic cosine of x. test 'Math.acosh' (assert)!-> {acosh} = core.Math assert.isFunction acosh assert.same acosh(NaN), NaN assert.same acosh(0.5), NaN assert.same acosh(-1), NaN assert.same acosh(-1e300), NaN assert.same acosh(1), 0 assert.strictEqual acosh(Infinity), Infinity assert.epsilon acosh(1234), 7.811163220849231 assert.epsilon acosh(8.88), 2.8737631531629235 assert.epsilon acosh(1e+160), 369.10676205960726 assert.epsilon acosh(Number.MAX_VALUE), 710.475860073944 #buggy v8 implementation assert.epsilon acosh(1 + core.Number.EPSILON), 2.1073424255447017e-8core-js-2.4.1/tests/library/es6.math.asinh.ls000066400000000000000000000011601274277553300207710ustar00rootroot00000000000000{module, test} = QUnit module \ES6 # Returns an implementation-dependent approximation to the inverse hyperbolic sine of x. test 'Math.asinh' (assert)!-> {asinh} = core.Math assert.isFunction asinh assert.same asinh(NaN), NaN assert.same asinh(0), 0 assert.same asinh(-0), -0 assert.strictEqual asinh(Infinity), Infinity assert.strictEqual asinh(-Infinity), -Infinity assert.epsilon asinh(1234), 7.811163549201245 assert.epsilon asinh(9.99), 2.997227420191335 assert.epsilon asinh(1e150), 346.0809111296668 assert.epsilon asinh(1e7), 16.811242831518268 assert.epsilon asinh(-1e7), -16.811242831518268core-js-2.4.1/tests/library/es6.math.atanh.ls000066400000000000000000000012761274277553300207720ustar00rootroot00000000000000{module, test} = QUnit module \ES6 # Returns an implementation-dependent approximation to the inverse hyperbolic tangent of x. test 'Math.atanh' (assert)!-> {atanh} = core.Math assert.isFunction atanh assert.same atanh(NaN), NaN assert.same atanh(-2), NaN assert.same atanh(-1.5), NaN assert.same atanh(2), NaN assert.same atanh(1.5), NaN assert.strictEqual atanh(-1), -Infinity assert.strictEqual atanh(1), Infinity assert.same atanh(0), 0 assert.same atanh(-0), -0 assert.same atanh(-1e300), NaN assert.same atanh(1e300), NaN assert.epsilon atanh(0.5), 0.5493061443340549 assert.epsilon atanh(-0.5), -0.5493061443340549 assert.epsilon atanh(0.444), 0.47720201260109457core-js-2.4.1/tests/library/es6.math.cbrt.ls000066400000000000000000000007711274277553300206300ustar00rootroot00000000000000{module, test} = QUnit module \ES6 # Returns an implementation-dependent approximation to the cube root of x. test 'Math.cbrt' (assert)!-> {cbrt} = core.Math assert.isFunction cbrt assert.same cbrt(NaN), NaN assert.same cbrt(0), 0 assert.same cbrt(-0), -0 assert.strictEqual cbrt(Infinity), Infinity assert.strictEqual cbrt(-Infinity), -Infinity assert.strictEqual cbrt(-8), -2 assert.strictEqual cbrt(8), 2 assert.epsilon cbrt(-1000), -10 # O_o assert.epsilon cbrt(1000), 10 # O_ocore-js-2.4.1/tests/library/es6.math.clz32.ls000066400000000000000000000004721274277553300206310ustar00rootroot00000000000000{module, test} = QUnit module \ES6 test 'Math.clz32' (assert)!-> {clz32} = core.Math assert.isFunction clz32 assert.strictEqual clz32(0), 32 assert.strictEqual clz32(1), 31 assert.same clz32(-1), 0 assert.strictEqual clz32(0.6), 32 assert.same clz32(2^32 - 1), 0 assert.strictEqual clz32(2^32), 32core-js-2.4.1/tests/library/es6.math.cosh.ls000066400000000000000000000011471274277553300206300ustar00rootroot00000000000000{module, test} = QUnit module \ES6 # Returns an implementation-dependent approximation to the hyperbolic cosine of x. test 'Math.cosh' (assert)!-> {cosh} = core.Math assert.isFunction cosh assert.same cosh(NaN), NaN assert.strictEqual cosh(0), 1 assert.strictEqual cosh(-0), 1 assert.strictEqual cosh(Infinity), Infinity assert.strictEqual cosh(-Infinity), Infinity # v8 bug! assert.epsilon cosh(12), 81377.39571257407, 3e-11 assert.epsilon cosh(22), 1792456423.065795780980053377, 1e-5 assert.epsilon cosh(-10), 11013.23292010332313972137 assert.epsilon cosh(-23), 4872401723.1244513000, 1e-5core-js-2.4.1/tests/library/es6.math.expm1.ls000066400000000000000000000007471274277553300207330ustar00rootroot00000000000000{module, test} = QUnit module \ES6 # Returns an implementation-dependent approximation to subtracting 1 from the exponential function of x test 'Math.expm1' (assert)!-> {expm1} = core.Math assert.isFunction expm1 assert.same expm1(NaN), NaN assert.same expm1(0), 0 assert.same expm1(-0), -0 assert.strictEqual expm1(Infinity), Infinity assert.strictEqual expm1(-Infinity), -1 assert.epsilon expm1(10), 22025.465794806718, assert.epsilon expm1(-10), -0.9999546000702375core-js-2.4.1/tests/library/es6.math.fround.ls000066400000000000000000000024741274277553300211750ustar00rootroot00000000000000{module, test} = QUnit module \ES6 test 'Math.fround' (assert)!-> # https://github.com/paulmillr/es6-shim/blob/master/test/math.js {fround} = core.Math assert.isFunction fround assert.same fround(void), NaN assert.same fround(NaN), NaN assert.same fround(0), 0 assert.same fround(-0), -0 assert.same fround(Number.MIN_VALUE), 0 assert.same fround(-Number.MIN_VALUE), -0 assert.strictEqual fround(Infinity), Infinity assert.strictEqual fround(-Infinity), -Infinity assert.strictEqual fround(1.7976931348623157e+308), Infinity assert.strictEqual fround(-1.7976931348623157e+308), -Infinity assert.strictEqual fround(3.4028235677973366e+38), Infinity assert.strictEqual fround(3), 3 assert.strictEqual fround(-3), -3 maxFloat32 = 3.4028234663852886e+38 minFloat32 = 1.401298464324817e-45 assert.strictEqual fround(maxFloat32), maxFloat32 assert.strictEqual fround(-maxFloat32), -maxFloat32 assert.strictEqual fround(maxFloat32 + 2 ** (2 ** (8 - 1) - 1 - 23 - 2)), maxFloat32 assert.strictEqual fround(minFloat32), minFloat32 assert.strictEqual fround(-minFloat32), -minFloat32 assert.same fround(minFloat32 / 2), 0 assert.same fround(-minFloat32 / 2), -0 assert.strictEqual fround(minFloat32 / 2 + 2 ** -202), minFloat32 assert.strictEqual fround(-minFloat32 / 2 - 2 ** -202), -minFloat32core-js-2.4.1/tests/library/es6.math.hypot.ls000066400000000000000000000033201274277553300210320ustar00rootroot00000000000000{module, test} = QUnit module \ES6 # Math.hypot returns an implementation-dependent approximation of the square root of the sum of squares of its arguments. test 'Math.hypot' (assert)!-> {hypot} = core.Math {sqrt} = Math assert.isFunction hypot assert.strictEqual hypot!, 0 assert.strictEqual hypot(1), 1 assert.same hypot('', 0), 0 assert.same hypot(0, ''), 0 assert.strictEqual hypot(Infinity, 0), Infinity assert.strictEqual hypot(-Infinity, 0), Infinity assert.strictEqual hypot(0, Infinity), Infinity assert.strictEqual hypot(0, -Infinity), Infinity assert.strictEqual hypot(Infinity, NaN), Infinity assert.strictEqual hypot(NaN, -Infinity), Infinity assert.same hypot(NaN, 0), NaN assert.same hypot(0, NaN), NaN assert.same hypot(0, -0), 0 assert.same hypot(0, 0), 0 assert.same hypot(-0, -0), 0 assert.same hypot(-0, 0), 0 assert.strictEqual hypot(0, 1), 1 assert.strictEqual hypot(0, -1), 1 assert.strictEqual hypot(-0, 1), 1 assert.strictEqual hypot(-0, -1), 1 assert.same hypot(0), 0 assert.strictEqual hypot(1), 1 assert.strictEqual hypot(2), 2 assert.strictEqual hypot(0 0 1), 1 assert.strictEqual hypot(0 1 0), 1 assert.strictEqual hypot(1 0 0), 1 assert.strictEqual hypot(2 3 4), sqrt(2 * 2 + 3 * 3 + 4 * 4) assert.strictEqual hypot(2 3 4 5), sqrt(2 * 2 + 3 * 3 + 4 * 4 + 5 * 5) assert.epsilon hypot(66 66), 93.33809511662427 assert.epsilon hypot(0.1 100), 100.0000499999875 assert.strictEqual hypot(1e+300, 1e+300), 1.4142135623730952e+300 assert.strictEqual Math.floor(hypot(1e-300, 1e-300) * 1e308), 141421356 assert.strictEqual hypot(1e+300, 1e+300, 2, 3), 1.4142135623730952e+300 assert.strictEqual hypot(-3, 4), 5 assert.strictEqual hypot(3, -4), 5core-js-2.4.1/tests/library/es6.math.imul.ls000066400000000000000000000024271274277553300206440ustar00rootroot00000000000000{module, test} = QUnit module \ES6 test 'Math.imul' (assert)!-> {imul} = core.Math assert.isFunction imul assert.same imul(0, 0), 0 assert.strictEqual imul(123, 456), 56088 assert.strictEqual imul(-123, 456), -56088 assert.strictEqual imul(123, -456), -56088 assert.strictEqual imul(16~01234567, 16~fedcba98), 602016552 assert.same imul(no 7), 0 assert.same imul(7 no), 0 assert.same imul(no no), 0 assert.strictEqual imul(on 7), 7 assert.strictEqual imul(7 on), 7 assert.strictEqual imul(on on), 1 assert.same imul(void 7), 0 assert.same imul(7 void), 0 assert.same imul(void void), 0 assert.same imul(\str 7), 0 assert.same imul(7 \str), 0 assert.same imul({} 7), 0 assert.same imul(7 {}), 0 assert.same imul([] 7), 0 assert.same imul(7 []), 0 assert.strictEqual imul(0xffffffff, 5), -5 assert.strictEqual imul(0xfffffffe, 5), -10 assert.strictEqual imul(2 4), 8 assert.strictEqual imul(-1 8), -8 assert.strictEqual imul(-2 -2), 4 assert.same imul(-0 7), 0 assert.same imul(7 -0), 0 assert.same imul(0.1 7), 0 assert.same imul(7 0.1), 0 assert.same imul(0.9 7), 0 assert.same imul(7 0.9), 0 assert.strictEqual imul(1.1 7), 7 assert.strictEqual imul(7 1.1), 7 assert.strictEqual imul(1.9 7), 7 assert.strictEqual imul(7 1.9), 7core-js-2.4.1/tests/library/es6.math.log10.ls000066400000000000000000000012131274277553300206100ustar00rootroot00000000000000{module, test} = QUnit module \ES6 # Returns an implementation-dependent approximation to the base 10 logarithm of x. test 'Math.log10' (assert)!-> {log10} = core.Math assert.isFunction log10 assert.same log10(''), log10 0 assert.same log10(NaN), NaN assert.same log10(-1), NaN assert.same log10(0), -Infinity assert.same log10(-0), -Infinity assert.same log10(1), 0 assert.same log10(Infinity), Infinity assert.epsilon log10(0.1), -1 # O_o assert.epsilon log10(0.5), -0.3010299956639812 assert.epsilon log10(1.5), 0.17609125905568124 assert.epsilon log10(5), 0.6989700043360189 assert.epsilon log10(50), 1.6989700043360187core-js-2.4.1/tests/library/es6.math.log1p.ls000066400000000000000000000011361274277553300207140ustar00rootroot00000000000000{module, test} = QUnit module \ES6 # Returns an implementation-dependent approximation to the natural logarithm of 1 + x. # The result is computed in a way that is accurate even when the value of x is close to zero. test 'Math.log1p' (assert)!-> {log1p} = core.Math assert.isFunction log1p assert.same log1p(''), log1p 0 assert.same log1p(NaN), NaN assert.same log1p(-2), NaN assert.same log1p(-1), -Infinity assert.same log1p(0), 0 assert.same log1p(-0), -0 assert.same log1p(Infinity), Infinity assert.epsilon log1p(5), 1.791759469228055 assert.epsilon log1p(50), 3.9318256327243257core-js-2.4.1/tests/library/es6.math.log2.ls000066400000000000000000000007741274277553300205440ustar00rootroot00000000000000{module, test} = QUnit module \ES6 # Returns an implementation-dependent approximation to the base 2 logarithm of x. test 'Math.log2' (assert)!-> {log2} = core.Math assert.isFunction log2 assert.same log2(''), log2 0 assert.same log2(NaN), NaN assert.same log2(-1), NaN assert.same log2(0), -Infinity assert.same log2(-0), -Infinity assert.same log2(1), 0 assert.same log2(Infinity), Infinity assert.same log2(0.5), -1 assert.same log2(32), 5 assert.epsilon log2(5), 2.321928094887362core-js-2.4.1/tests/library/es6.math.sign.ls000066400000000000000000000010421274277553300206260ustar00rootroot00000000000000{module, test} = QUnit module \ES6 # Returns the sign of the x, indicating whether x is positive, negative or zero. test 'Math.sign' (assert)!-> {sign} = core.Math assert.isFunction sign assert.same sign(NaN), NaN assert.same sign!, NaN assert.same sign(-0), -0 assert.same sign(0), 0 assert.strictEqual sign(Infinity), 1 assert.strictEqual sign(-Infinity), -1 assert.strictEqual sign(16~2fffffffffffff), 1 assert.strictEqual sign(-16~2fffffffffffff), -1 assert.strictEqual sign(42.5), 1 assert.strictEqual sign(-42.5), -1core-js-2.4.1/tests/library/es6.math.sinh.ls000066400000000000000000000007631274277553300206400ustar00rootroot00000000000000{module, test} = QUnit module \ES6 # Returns an implementation-dependent approximation to the hyperbolic sine of x. test 'Math.sinh' (assert)!-> {sinh} = core.Math assert.isFunction sinh assert.same sinh(NaN), NaN assert.same sinh(0), 0 assert.same sinh(-0), -0 assert.strictEqual sinh(Infinity), Infinity assert.strictEqual sinh(-Infinity), -Infinity assert.epsilon sinh(-5), -74.20321057778875 assert.epsilon sinh(2), 3.6268604078470186 assert.strictEqual sinh(-2e-17), -2e-17core-js-2.4.1/tests/library/es6.math.tanh.ls000066400000000000000000000007041274277553300206240ustar00rootroot00000000000000{module, test} = QUnit module \ES6 # Returns an implementation-dependent approximation to the hyperbolic tangent of x. test 'Math.tanh' (assert)!-> {tanh} = core.Math assert.isFunction tanh assert.same tanh(NaN), NaN assert.same tanh(0), 0 assert.same tanh(-0), -0 assert.strictEqual tanh(Infinity), 1 assert.strictEqual tanh(90), 1 assert.epsilon tanh(10), 0.9999999958776927 #assert.strictEqual tanh(710), 1 #buggy v8 implementationcore-js-2.4.1/tests/library/es6.math.trunc.ls000066400000000000000000000020761274277553300210310ustar00rootroot00000000000000{module, test} = QUnit module \ES6 # Returns the integral part of the number x, removing any fractional digits. If x is already an integer, the result is x. test 'Math.trunc' (assert)!-> {trunc} = core.Math assert.isFunction trunc assert.same trunc(NaN), NaN, 'NaN -> NaN' assert.same trunc(-0), -0, '-0 -> -0' assert.same trunc(0), 0, '0 -> 0' assert.same trunc(Infinity), Infinity, 'Infinity -> Infinity' assert.same trunc(-Infinity), -Infinity, '-Infinity -> -Infinity' assert.same trunc(null), 0, 'null -> 0' assert.same trunc({}), NaN, '{} -> NaN' assert.strictEqual trunc([]), 0, '[] -> 0' assert.strictEqual trunc(1.01), 1, '1.01 -> 0' assert.strictEqual trunc(1.99), 1, '1.99 -> 0' assert.strictEqual trunc(-1), -1, '-1 -> -1' assert.strictEqual trunc(-1.99), -1, '-1.99 -> -1' assert.strictEqual trunc(-555.555), -555, '-555.555 -> -555' assert.strictEqual trunc(0x20000000000001), 0x20000000000001, '0x20000000000001 -> 0x20000000000001' assert.strictEqual trunc(-0x20000000000001), -0x20000000000001, '-0x20000000000001 -> -0x20000000000001'core-js-2.4.1/tests/library/es6.number.epsilon.ls000066400000000000000000000004751274277553300217070ustar00rootroot00000000000000{module, test} = QUnit module \ES6 test 'Number.EPSILON' (assert)!-> {EPSILON} = core.Number assert.ok \EPSILON of core.Number, 'EPSILON in Number' assert.strictEqual EPSILON, 2^-52, 'Is 2^-52' assert.ok 1 isnt 1 + EPSILON, '1 isnt 1 + EPSILON' assert.strictEqual 1, 1 + EPSILON / 2, '1 is 1 + EPSILON / 2'core-js-2.4.1/tests/library/es6.number.is-finite.ls000066400000000000000000000010131274277553300221120ustar00rootroot00000000000000{module, test} = QUnit module \ES6 test 'Number.isFinite' (assert)!-> {isFinite} = core.Number {create} = core.Object assert.isFunction isFinite for [1 0.1 -1 2^16 2^16 - 1 2^31 2^31 - 1 2^32 2^32 - 1 -0] assert.ok isFinite(..), "isFinite #{typeof ..} #{..}" for [NaN, Infinity, \NaN, \5, no, new Number(NaN), new Number(Infinity), new Number(5), new Number(0.1), void, null, {}, ->, create(null)] assert.ok not isFinite(..), "not isFinite #{typeof ..} #{try String(..) catch e => 'Object.create(null)'}"core-js-2.4.1/tests/library/es6.number.is-integer.ls000066400000000000000000000010231274277553300222720ustar00rootroot00000000000000{module, test} = QUnit module \ES6 test 'Number.isInteger' (assert)!-> {isInteger} = core.Number {create} = core.Object assert.isFunction isInteger for [1 -1 2^16 2^16 - 1 2^31 2^31 - 1 2^32 2^32 - 1 -0] assert.ok isInteger(..), "isInteger #{typeof ..} #{..}" for [NaN, 0.1, Infinity, \NaN, \5, no, new Number(NaN), new Number(Infinity), new Number(5), new Number(0.1), void, null, {}, ->, create(null)] assert.ok not isInteger(..), "not isInteger #{typeof ..} #{try String(..) catch e => 'Object.create(null)'}"core-js-2.4.1/tests/library/es6.number.is-nan.ls000066400000000000000000000007471274277553300214250ustar00rootroot00000000000000{module, test} = QUnit module \ES6 test 'Number.isNaN' (assert)!-> {isNaN} = core.Number {create} = core.Object assert.isFunction isNaN assert.ok isNaN(NaN), 'Number.isNaN NaN' for [1 0.1 -1 2^16 2^16 - 1 2^31 2^31 - 1 2^32 2^32 - 1 -0 Infinity, \NaN, \5, no, new Number(NaN), new Number(Infinity), new Number(5), new Number(0.1), void, null, {}, ->, create(null)] assert.ok not isNaN(..), "not Number.isNaN #{typeof ..} #{try String(..) catch e => 'Object.create(null)'}"core-js-2.4.1/tests/library/es6.number.is-safe-integer.ls000066400000000000000000000011711274277553300232120ustar00rootroot00000000000000{module, test} = QUnit module \ES6 test 'Number.isSafeInteger' (assert)!-> {isSafeInteger} = core.Number {create} = core.Object assert.isFunction isSafeInteger for [1 -1 2^16 2^16 - 1 2^31 2^31 - 1 2^32 2^32 - 1 -0 16~1fffffffffffff -16~1fffffffffffff] assert.ok isSafeInteger(..), "isSafeInteger #{typeof ..} #{..}" for [16~20000000000000 -16~20000000000000 NaN, 0.1, Infinity, \NaN, \5, no, new Number(NaN), new Number(Infinity), new Number(5), new Number(0.1), void, null, {}, ->, create(null)] assert.ok not isSafeInteger(..), "not isSafeInteger #{typeof ..} #{try String(..) catch e => 'Object.create(null)'}"core-js-2.4.1/tests/library/es6.number.max-safe-integer.ls000066400000000000000000000002311274277553300233600ustar00rootroot00000000000000{module, test} = QUnit module \ES6 test 'Number.MAX_SAFE_INTEGER' (assert)!-> assert.strictEqual core.Number.MAX_SAFE_INTEGER, 2^53 - 1, 'Is 2^53 - 1'core-js-2.4.1/tests/library/es6.number.min-safe-integer.ls000066400000000000000000000002331274277553300233600ustar00rootroot00000000000000{module, test} = QUnit module \ES6 test 'Number.MIN_SAFE_INTEGER' (assert)!-> assert.strictEqual core.Number.MIN_SAFE_INTEGER, -2^53 + 1, 'Is -2^53 + 1'core-js-2.4.1/tests/library/es6.number.parse-float.ls000066400000000000000000000013111274277553300224410ustar00rootroot00000000000000{module, test} = QUnit module \ES6 test 'Number.parseFloat' (assert)!-> {parseFloat} = core.Number assert.isFunction parseFloat assert.arity parseFloat, 1 assert.same parseFloat, core.parseFloat assert.same parseFloat('0'), 0 assert.same parseFloat(' 0'), 0 assert.same parseFloat('+0'), 0 assert.same parseFloat(' +0'), 0 assert.same parseFloat('-0'), -0 assert.same parseFloat(' -0'), -0 ws = '\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u180E\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF' assert.same parseFloat(ws + '+0'), 0 assert.same parseFloat(ws + '-0'), -0 assert.same parseFloat(null), NaN assert.same parseFloat(void), NaNcore-js-2.4.1/tests/library/es6.number.parse-int.ls000066400000000000000000000027771274277553300221470ustar00rootroot00000000000000{module, test} = QUnit module \ES6 test 'Number.parseInt' (assert)!-> {parseInt} = core.Number assert.isFunction parseInt assert.arity parseInt, 2 assert.same parseInt, core.parseInt for r from 2 to 36 assert.same parseInt(\10 r), r, "radix #r" for <[01 08 10 42]> assert.same parseInt(..), parseInt(.., 10), "default radix is 10: #{..}" assert.same parseInt(\0x16), parseInt(\0x16 16), "default radix is 16: 0x16" ws = '\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u180E\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF' assert.same parseInt(' 0x16'), parseInt(\0x16 16), 'ignores leading whitespace #1' assert.same parseInt(' 42'), parseInt(\42 10), 'ignores leading whitespace #2' assert.same parseInt(' 08'), parseInt(\08 10), 'ignores leading whitespace #3' assert.same parseInt(ws + '08'), parseInt(\08 10), 'ignores leading whitespace #4' assert.same parseInt(ws + '0x16'), parseInt(\0x16 16), 'ignores leading whitespace #5' fakeZero = valueOf: -> 0 assert.same parseInt(\08 fakeZero), parseInt(\08 10), 'valueOf #1' assert.same parseInt(\0x16 fakeZero), parseInt(\0x16 16), 'valueOf #2' assert.same parseInt('-0xF'), -15, 'signed hex #1' assert.same parseInt('-0xF', 16), -15, 'signed hex #2' assert.same parseInt('+0xF'), 15, 'signed hex #3' assert.same parseInt('+0xF' 16), 15, 'signed hex #4' assert.same parseInt('10', -4294967294), 2, 'radix uses ToUint32' assert.same parseInt(null), NaN assert.same parseInt(void), NaNcore-js-2.4.1/tests/library/es6.number.to-fixed.ls000066400000000000000000000060121274277553300217460ustar00rootroot00000000000000{module, test} = QUnit module \ES6 test 'Number#toFixed' (assert)!-> {toFixed} = core.Number assert.isFunction toFixed assert.same toFixed(0.00008 3), '0.000' assert.same toFixed(0.9 0), '1' assert.same toFixed(1.255 2), '1.25' assert.same toFixed(1843654265.0774949 5), '1843654265.07749' assert.same toFixed(1000000000000000128 0), '1000000000000000128' assert.same toFixed(1), '1' assert.same toFixed(1 0), '1' assert.same toFixed(1 1), '1.0' assert.same toFixed(1 1.1), '1.0' assert.same toFixed(1 0.9), '1' assert.same toFixed(1 '0'), '1' assert.same toFixed(1 '1'), '1.0' assert.same toFixed(1 '1.1'), '1.0' assert.same toFixed(1 '0.9'), '1' assert.same toFixed(1 NaN), '1' assert.same toFixed(1 'some string'), '1' assert.same (try toFixed 1 -0.1), '1' assert.same toFixed(Object(1)), '1' assert.same toFixed(Object(1), 0), '1' assert.same toFixed(Object(1), 1), '1.0' assert.same toFixed(Object(1), 1.1), '1.0' assert.same toFixed(Object(1), 0.9), '1' assert.same toFixed(Object(1), '0'), '1' assert.same toFixed(Object(1), '1'), '1.0' assert.same toFixed(Object(1), '1.1'), '1.0' assert.same toFixed(Object(1), '0.9'), '1' assert.same toFixed(Object(1), NaN), '1' assert.same toFixed(Object(1), 'some string'), '1' assert.same (try toFixed Object(1), -0.1), '1' assert.same toFixed(NaN), 'NaN' assert.same toFixed(NaN, 0), 'NaN' assert.same toFixed(NaN, 1), 'NaN' assert.same toFixed(NaN, 1.1), 'NaN' assert.same toFixed(NaN, 0.9), 'NaN' assert.same toFixed(NaN, '0'), 'NaN' assert.same toFixed(NaN, '1'), 'NaN' assert.same toFixed(NaN, '1.1'), 'NaN' assert.same toFixed(NaN, '0.9'), 'NaN' assert.same toFixed(NaN, NaN), 'NaN' assert.same toFixed(NaN, 'some string'), 'NaN' assert.same (try toFixed NaN, -0.1), 'NaN' assert.same toFixed(1e21), String 1e21 assert.same toFixed(1e21 0), String 1e21 assert.same toFixed(1e21 1), String 1e21 assert.same toFixed(1e21 1.1), String 1e21 assert.same toFixed(1e21 0.9), String 1e21 assert.same toFixed(1e21 '0'), String 1e21 assert.same toFixed(1e21 '1'), String 1e21 assert.same toFixed(1e21 '1.1'), String 1e21 assert.same toFixed(1e21 '0.9'), String 1e21 assert.same toFixed(1e21 NaN), String 1e21 assert.same toFixed(1e21 'some string'), String 1e21 assert.same (try toFixed 1e21 -0.1), String 1e21 assert.throws (!-> toFixed 1 -101), RangeError, 'If f < 0 or f > 20, throw a RangeError exception.' assert.throws (!-> toFixed 1 101), RangeError, 'If f < 0 or f > 20, throw a RangeError exception.' assert.throws (!-> toFixed NaN, Infinity), RangeError, 'If f < 0 or f > 20, throw a RangeError exception.' assert.throws (!-> toFixed {}, 1), TypeError, '? thisNumberValue(this value)' assert.throws (!-> toFixed \123, 1), TypeError, '? thisNumberValue(this value)' assert.throws (!-> toFixed no, 1), TypeError, '? thisNumberValue(this value)' assert.throws (!-> toFixed null, 1), TypeError, '? thisNumberValue(this value)' assert.throws (!-> toFixed void, 1), TypeError, '? thisNumberValue(this value)'core-js-2.4.1/tests/library/es6.number.to-precision.ls000066400000000000000000000024271274277553300226500ustar00rootroot00000000000000{module, test} = QUnit module \ES6 test 'Number#toPrecision' (assert)!-> {toPrecision} = core.Number assert.isFunction toPrecision assert.same toPrecision(0.00008 3), '0.0000800', '0.00008.toPrecision(3)' assert.same toPrecision(1.255 2), '1.3', '1.255.toPrecision(2)' assert.same toPrecision(1843654265.0774949 13), '1843654265.077', '1843654265.0774949.toPrecision(13)' assert.same toPrecision(NaN, 1), 'NaN', 'If x is NaN, return the String "NaN".' assert.same toPrecision(123.456), '123.456', 'If precision is undefined, return ! ToString(x).' assert.same toPrecision(123.456 void), '123.456', 'If precision is undefined, return ! ToString(x).' assert.throws (!-> toPrecision 0.9 0), RangeError, 'If p < 1 or p > 21, throw a RangeError exception.' assert.throws (!-> toPrecision 0.9 101), RangeError, 'If p < 1 or p > 21, throw a RangeError exception.' assert.throws (!-> toPrecision {}, 1), TypeError, '? thisNumberValue(this value)' assert.throws (!-> toPrecision \123, 1), TypeError, '? thisNumberValue(this value)' assert.throws (!-> toPrecision no, 1), TypeError, '? thisNumberValue(this value)' assert.throws (!-> toPrecision null, 1), TypeError, '? thisNumberValue(this value)' assert.throws (!-> toPrecision void, 1), TypeError, '? thisNumberValue(this value)'core-js-2.4.1/tests/library/es6.object.assign.ls000066400000000000000000000031311274277553300214700ustar00rootroot00000000000000{module, test} = QUnit module \ES6 test 'Object.assign' (assert)!-> {assign, keys, defineProperty} = core.Object assert.isFunction assign foo = q: 1 assert.strictEqual foo, assign(foo, bar: 2), 'assign return target' assert.strictEqual foo.bar, 2, 'assign define properties' assert.deepEqual assign({}, {q: 1}, {w: 2}), {q: 1, w: 2} assert.deepEqual assign({}, \qwe), {0: \q, 1: \w, 2: \e} assert.throws (!-> assign null {q: 1}), TypeError assert.throws (!-> assign void, {q: 1}), TypeError str = assign(\qwe, {q: 1}) assert.strictEqual typeof str, \object assert.strictEqual String(str), \qwe assert.strictEqual str.q, 1 if DESCRIPTORS foo = baz: 1 assign foo, defineProperty {}, \bar, get: -> @baz + 1 assert.ok foo.bar is void, "assign don't copy descriptors" c = core.Symbol \c d = core.Symbol \d D = do a: \a (c): \c defineProperty D, \b, value: \b defineProperty D, d, value: \d O = assign {}, D assert.strictEqual O.a, \a, \a assert.strictEqual O.b, void, \b assert.strictEqual O[c], \c, \c assert.strictEqual O[d], void, \d try assert.strictEqual Function('return core.Object.assign({b: 1}, {get a(){delete this.b;},b: 2})')!b, 1 try assert.strictEqual Function('return core.Object.assign({b: 1}, {get a(){Object.defineProperty(this, "b", {value:4,enumerable:false});},b: 2})')!b, 1 # test deterministic property order, theoretical can fail with deterministic, but wrong, order string = 'abcdefghijklmnopqrst'; O = {} for string.split('') => O[..] = .. assert.strictEqual keys(assign {}, O)join(''), stringcore-js-2.4.1/tests/library/es6.object.create.ls000066400000000000000000000016111274277553300214500ustar00rootroot00000000000000{module, test} = QUnit module \ES6 test 'Object.create' (assert)!-> {create, getPrototypeOf, getOwnPropertyNames} = core.Object isObject = -> it is Object it isPrototype = (a, b)-> ({}).isPrototypeOf.call a, b getPropertyNames = (object)-> result = getOwnPropertyNames object while object = getPrototypeOf(object) for getOwnPropertyNames(object) .. in result or result.push .. result assert.isFunction create assert.arity create, 2 assert.ok isPrototype obj = q:1, create(obj) assert.ok create(obj)q is 1 fn = -> @a = 1 assert.ok create(new fn) instanceof fn assert.ok fn:: is getPrototypeOf getPrototypeOf create new fn assert.ok create(new fn)a is 1 assert.ok create({}, {a:value:42})a is 42 assert.ok isObject obj = create null w: value:2 assert.ok \toString not of obj assert.ok obj.w is 2 assert.deepEqual getPropertyNames(create null), []core-js-2.4.1/tests/library/es6.object.define-properties.ls000066400000000000000000000004641274277553300236360ustar00rootroot00000000000000{module, test} = QUnit module \ES6 test 'Object.defineProperties' (assert)!-> {defineProperties} = core.Object assert.isFunction defineProperties assert.arity defineProperties, 2 assert.ok (rez = defineProperties src = {}, q: {value: 42}, w: value: 33) is src assert.ok rez.q is 42 and rez.w is 33core-js-2.4.1/tests/library/es6.object.define-property.ls000066400000000000000000000006451274277553300233270ustar00rootroot00000000000000{module, test} = QUnit module \ES6 test 'Object.defineProperty' (assert)!-> {defineProperty, create} = core.Object assert.isFunction defineProperty assert.arity defineProperty, 3 assert.ok (rez = defineProperty src = {}, \q, value: 42) is src assert.ok rez.q is 42 assert.throws (!-> defineProperty 42 1 {}) assert.throws (!-> defineProperty {} create(null), {}) assert.throws (!-> defineProperty {} 1 1)core-js-2.4.1/tests/library/es6.object.freeze.ls000066400000000000000000000012141274277553300214640ustar00rootroot00000000000000{module, test} = QUnit module \ES6 test 'Object.freeze' (assert)!-> {freeze, keys, getOwnPropertyNames, getOwnPropertySymbols} = core.Object {ownKeys} = core.Reflect assert.isFunction freeze assert.arity freeze, 1 for value in [42 \foo no null void, {}] assert.ok (try => freeze value; on), "accept #{typeof! value}" assert.same freeze(value), value, "returns target on #{typeof! value}" assert.arrayEqual [key for key of freeze {}], [] assert.arrayEqual keys(freeze {}), [] assert.arrayEqual getOwnPropertyNames(freeze {}), [] assert.arrayEqual getOwnPropertySymbols(freeze {}), [] assert.arrayEqual ownKeys(freeze {}), []core-js-2.4.1/tests/library/es6.object.get-own-property-descriptor.ls000066400000000000000000000011411274277553300256210ustar00rootroot00000000000000{module, test} = QUnit module \ES6 test 'Object.getOwnPropertyDescriptor' (assert)!-> {getOwnPropertyDescriptor} = core.Object assert.isFunction getOwnPropertyDescriptor assert.arity getOwnPropertyDescriptor, 2 assert.deepEqual getOwnPropertyDescriptor(q:42, \q), {+writable, +enumerable, +configurable, value: 42} assert.ok getOwnPropertyDescriptor({}, \toString) is void for value in [42 \foo no] assert.ok (try => getOwnPropertyDescriptor value; on), "accept #{typeof! value}" for value in [null void] assert.throws (!-> getOwnPropertyDescriptor value), TypeError, "throws on #value"core-js-2.4.1/tests/library/es6.object.get-own-property-names.ls000066400000000000000000000023561274277553300245570ustar00rootroot00000000000000{module, test} = QUnit module \ES6 test 'Object.getOwnPropertyNames' (assert)!-> {getOwnPropertyNames} = core.Object assert.isFunction getOwnPropertyNames assert.arity getOwnPropertyNames, 1 fn1 = (@w = 2)-> fn2 = (@toString = 2)-> fn1::q = fn2::q = 1 names = getOwnPropertyNames [1 2 3] assert.strictEqual names.length, 4 assert.ok \0 in names assert.ok \1 in names assert.ok \2 in names assert.ok \length in names assert.deepEqual getOwnPropertyNames(new fn1 1), <[w]> assert.deepEqual getOwnPropertyNames(new fn2 1), <[toString]> assert.ok \toString in getOwnPropertyNames Array:: assert.ok \toString in getOwnPropertyNames Object:: assert.ok \constructor in getOwnPropertyNames Object:: for value in [42 \foo no] assert.ok (try => getOwnPropertyNames value; on), "accept #{typeof! value}" for value in [null void] assert.throws (!-> getOwnPropertyNames value), TypeError, "throws on #value" if document? assert.ok (try iframe = document.createElement \iframe iframe.src = 'http://example.com' document.documentElement.appendChild iframe w = iframe.contentWindow document.documentElement.removeChild iframe getOwnPropertyNames w ), 'IE11 bug with iframe and window'core-js-2.4.1/tests/library/es6.object.get-prototype-of.ls000066400000000000000000000015501274277553300234330ustar00rootroot00000000000000{module, test} = QUnit module \ES6 test 'Object.getPrototypeOf' (assert)!-> {create, getPrototypeOf} = core.Object assert.isFunction getPrototypeOf assert.arity getPrototypeOf, 1 assert.ok getPrototypeOf({}) is Object:: assert.ok getPrototypeOf([]) is Array:: assert.ok getPrototypeOf(new class fn) is fn:: assert.ok getPrototypeOf(create obj = q:1) is obj assert.ok getPrototypeOf(create null) is null assert.ok getPrototypeOf(getPrototypeOf {}) is null foo = -> foo::foo = \foo bar = -> bar:: = create foo:: bar::constructor = bar assert.strictEqual getPrototypeOf(bar::).foo, \foo for value in [42 \foo no] assert.ok (try => getPrototypeOf value; on), "accept #{typeof! value}" for value in [null void] assert.throws (!-> getPrototypeOf value), TypeError, "throws on #value" assert.strictEqual getPrototypeOf(\foo), String::core-js-2.4.1/tests/library/es6.object.is-extensible.ls000066400000000000000000000006071274277553300227640ustar00rootroot00000000000000{module, test} = QUnit module \ES6 test 'Object.isExtensible' (assert)!-> {isExtensible} = core.Object assert.isFunction isExtensible assert.arity isExtensible, 1 for value in [42 \foo no null void] assert.ok (try => isExtensible value; on), "accept #{typeof! value}" assert.same isExtensible(value), no, "returns true on #{typeof! value}" assert.same isExtensible({}), oncore-js-2.4.1/tests/library/es6.object.is-frozen.ls000066400000000000000000000005531274277553300221250ustar00rootroot00000000000000{module, test} = QUnit module \ES6 test 'Object.isFrozen' (assert)!-> {isFrozen} = core.Object assert.isFunction isFrozen assert.arity isFrozen, 1 for value in [42 \foo no null void] assert.ok (try => isFrozen value; on), "accept #{typeof! value}" assert.same isFrozen(value), on, "returns true on #{typeof! value}" assert.same isFrozen({}), nocore-js-2.4.1/tests/library/es6.object.is-sealed.ls000066400000000000000000000005531274277553300220570ustar00rootroot00000000000000{module, test} = QUnit module \ES6 test 'Object.isSealed' (assert)!-> {isSealed} = core.Object assert.isFunction isSealed assert.arity isSealed, 1 for value in [42 \foo no null void] assert.ok (try => isSealed value; on), "accept #{typeof! value}" assert.same isSealed(value), on, "returns true on #{typeof! value}" assert.same isSealed({}), nocore-js-2.4.1/tests/library/es6.object.is.ls000066400000000000000000000004101274277553300206140ustar00rootroot00000000000000{module, test} = QUnit module \ES6 test 'Object.is' (assert)!-> same = core.Object.is assert.isFunction same assert.ok same(1 1), '1 is 1' assert.ok same(NaN, NaN), '1 is 1' assert.ok not same(0 -0), '0 isnt -0' assert.ok not same({} {}), '{} isnt {}'core-js-2.4.1/tests/library/es6.object.keys.ls000066400000000000000000000010631274277553300211610ustar00rootroot00000000000000{module, test} = QUnit module \ES6 test 'Object.keys' (assert)!-> {keys} = core.Object assert.isFunction keys assert.arity keys, 1 fn1 = (@w = 2)-> fn2 = (@toString = 2)-> fn1::q = fn2::q = 1 assert.deepEqual keys([1,2,3]), <[0 1 2]> assert.deepEqual keys(new fn1 1), <[w]> assert.deepEqual keys(new fn2 1), <[toString]> assert.ok \push not in keys Array:: for value in [42 \foo no] assert.ok (try => keys value; on), "accept #{typeof! value}" for value in [null void] assert.throws (!-> keys value), TypeError, "throws on #value"core-js-2.4.1/tests/library/es6.object.prevent-extensions.ls000066400000000000000000000014051274277553300240660ustar00rootroot00000000000000{module, test} = QUnit module \ES6 test 'Object.preventExtensions' (assert)!-> {preventExtensions, keys, getOwnPropertyNames, getOwnPropertySymbols} = core.Object {ownKeys} = core.Reflect assert.isFunction preventExtensions assert.arity preventExtensions, 1 for value in [42 \foo no null void, {}] assert.ok (try => preventExtensions value; on), "accept #{typeof! value}" assert.same preventExtensions(value), value, "returns target on #{typeof! value}" assert.arrayEqual [key for key of preventExtensions {}], [] assert.arrayEqual keys(preventExtensions {}), [] assert.arrayEqual getOwnPropertyNames(preventExtensions {}), [] assert.arrayEqual getOwnPropertySymbols(preventExtensions {}), [] assert.arrayEqual ownKeys(preventExtensions {}), []core-js-2.4.1/tests/library/es6.object.seal.ls000066400000000000000000000011661274277553300211360ustar00rootroot00000000000000{module, test} = QUnit module \ES6 test 'Object.seal' (assert)!-> {seal, keys, getOwnPropertyNames, getOwnPropertySymbols} = core.Object {ownKeys} = core.Reflect assert.isFunction seal assert.arity seal, 1 for value in [42 \foo no null void, {}] assert.ok (try => seal value; on), "accept #{typeof! value}" assert.same seal(value), value, "returns target on #{typeof! value}" assert.arrayEqual [key for key of seal {}], [] assert.arrayEqual keys(seal {}), [] assert.arrayEqual getOwnPropertyNames(seal {}), [] assert.arrayEqual getOwnPropertySymbols(seal {}), [] assert.arrayEqual ownKeys(seal {}), []core-js-2.4.1/tests/library/es6.object.set-prototype-of.ls000066400000000000000000000010201274277553300234370ustar00rootroot00000000000000if PROTO {module, test} = QUnit module \ES6 test 'Object.setPrototypeOf' (assert)!-> {setPrototypeOf} = core.Object assert.isFunction setPrototypeOf assert.ok \apply of setPrototypeOf({} Function::), 'Parent properties in target' assert.strictEqual setPrototypeOf(a:2, {b: -> @a^2})b!, 4, 'Child and parent properties in target' assert.strictEqual setPrototypeOf(tmp = {}, {a: 1}), tmp, 'setPrototypeOf return target' assert.ok !(\toString of setPrototypeOf {} null), 'Can set null as prototype'core-js-2.4.1/tests/library/es6.parse-float.ls000066400000000000000000000012211274277553300211520ustar00rootroot00000000000000{module, test} = QUnit module \ES6 test 'parseFloat' (assert)!-> {parseFloat} = core assert.isFunction parseFloat assert.arity parseFloat, 1 assert.same parseFloat('0'), 0 assert.same parseFloat(' 0'), 0 assert.same parseFloat('+0'), 0 assert.same parseFloat(' +0'), 0 assert.same parseFloat('-0'), -0 assert.same parseFloat(' -0'), -0 ws = '\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u180E\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF' assert.same parseFloat(ws + '+0'), 0 assert.same parseFloat(ws + '-0'), -0 assert.same parseFloat(null), NaN assert.same parseFloat(void), NaNcore-js-2.4.1/tests/library/es6.parse-int.ls000066400000000000000000000027131274277553300206460ustar00rootroot00000000000000{module, test} = QUnit module \ES6 test 'parseInt' (assert)!-> {parseInt} = core assert.isFunction parseInt assert.arity parseInt, 2 for r from 2 to 36 assert.same parseInt(\10 r), r, "radix #r" for <[01 08 10 42]> assert.same parseInt(..), parseInt(.., 10), "default radix is 10: #{..}" assert.same parseInt(\0x16), parseInt(\0x16 16), "default radix is 16: 0x16" ws = '\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u180E\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF' assert.same parseInt(' 0x16'), parseInt(\0x16 16), 'ignores leading whitespace #1' assert.same parseInt(' 42'), parseInt(\42 10), 'ignores leading whitespace #2' assert.same parseInt(' 08'), parseInt(\08 10), 'ignores leading whitespace #3' assert.same parseInt(ws + '08'), parseInt(\08 10), 'ignores leading whitespace #4' assert.same parseInt(ws + '0x16'), parseInt(\0x16 16), 'ignores leading whitespace #5' fakeZero = valueOf: -> 0 assert.same parseInt(\08 fakeZero), parseInt(\08 10), 'valueOf #1' assert.same parseInt(\0x16 fakeZero), parseInt(\0x16 16), 'valueOf #2' assert.same parseInt('-0xF'), -15, 'signed hex #1' assert.same parseInt('-0xF', 16), -15, 'signed hex #2' assert.same parseInt('+0xF'), 15, 'signed hex #3' assert.same parseInt('+0xF' 16), 15, 'signed hex #4' assert.same parseInt('10', -4294967294), 2, 'radix uses ToUint32' assert.same parseInt(null), NaN assert.same parseInt(void), NaNcore-js-2.4.1/tests/library/es6.promise.ls000066400000000000000000000245021274277553300204220ustar00rootroot00000000000000'use strict' {module, test} = QUnit module \ES6 {Promise, Symbol} = core {iterator} = Symbol test 'Promise' (assert)!-> assert.isFunction Promise assert.throws (!-> Promise!), 'throws w/o `new`' new Promise (resolve, reject)!-> assert.isFunction Promise, 'resolver is function' assert.isFunction Promise, 'rejector is function' assert.same @, (-> @)!, 'correct executor context' # related https://github.com/zloirock/core-js/issues/78 if DESCRIPTORS => test 'Promise operations order' (assert)!-> assert.expect 1 expected = \DEHAFGBC async = assert.async! result = '' var resolve p = new Promise (r)!-> resolve := r resolve then: !-> result += \A throw Error! p.catch !-> result += \B p.catch !-> result += \C assert.same result, expected async! var resolve2 p2 = new Promise (r)!-> resolve2 := r resolve2 Object.defineProperty {}, \then, get: !-> result += \D throw Error! result += \E p2.catch !-> result += \F p2.catch !-> result += \G result += \H setTimeout (!-> if ~result.indexOf(\C) => assert.same result, expected), 1e3 test 'Promise#then' (assert)!-> assert.isFunction Promise::then assert.nonEnumerable Promise::, \then # subclassing, @@species pattern promise = new Promise !-> it 42 promise@@ = FakePromise1 = !-> it ->, -> FakePromise1[Symbol?species] = FakePromise2 = !-> it ->, -> assert.ok promise.then(->) instanceof FakePromise2, 'subclassing, @@species pattern' # subclassing, incorrect `this.constructor` pattern promise = new Promise !-> it 42 promise@@ = FakePromise1 = !-> it ->, -> assert.ok promise.then(->) instanceof Promise, 'subclassing, incorrect `this` pattern' # NewPromiseCapability validations promise = new Promise !-> it 42 promise@@ = FakePromise1 = !-> it ->, -> FakePromise1[Symbol?species] = !-> assert.throws (!-> promise.then(->)), 'NewPromiseCapability validations, #1' FakePromise1[Symbol?species] = !-> it null, -> assert.throws (!-> promise.then(->)), 'NewPromiseCapability validations, #2' FakePromise1[Symbol?species] = !-> it ->, null assert.throws (!-> promise.then(->)), 'NewPromiseCapability validations, #3' test 'Promise#catch' (assert)!-> assert.isFunction Promise::catch assert.nonEnumerable Promise::, \catch # subclassing, @@species pattern promise = new Promise !-> it 42 promise@@ = FakePromise1 = !-> it ->, -> FakePromise1[Symbol?species] = FakePromise2 = !-> it ->, -> assert.ok promise.catch(->) instanceof FakePromise2, 'subclassing, @@species pattern' # subclassing, incorrect `this.constructor` pattern promise = new Promise !-> it 42 promise@@ = FakePromise1 = !-> it ->, -> assert.ok promise.catch(->) instanceof Promise, 'subclassing, incorrect `this` pattern' # NewPromiseCapability validations promise = new Promise !-> it 42 promise@@ = FakePromise1 = !-> it ->, -> FakePromise1[Symbol?species] = !-> assert.throws (!-> promise.catch(->)), 'NewPromiseCapability validations, #1' FakePromise1[Symbol?species] = !-> it null, -> assert.throws (!-> promise.catch(->)), 'NewPromiseCapability validations, #2' FakePromise1[Symbol?species] = !-> it ->, null assert.throws (!-> promise.catch(->)), 'NewPromiseCapability validations, #3' # calling `.then` assert.same Promise::catch.call({then: (x, y)-> y }, 42), 42, 'calling `.then`' test 'Promise#@@toStringTag' !(assert)-> #assert.nonEnumerable Promise::, Symbol?toStringTag assert.ok Promise::[Symbol?toStringTag] is \Promise, 'Promise::@@toStringTag is `Promise`' test 'Promise.all' (assert)!-> {all} = Promise assert.isFunction all assert.arity all, 1 # works with iterables iter = createIterable [1 2 3] Promise.all iter .catch -> assert.ok iter.received, 'works with iterables: iterator received' assert.ok iter.called, 'works with iterables: next called' # call @@iterator in Array with custom iterator a = [] done = no a['@@iterator'] = void a[Symbol?iterator] = -> done := on core.getIteratorMethod([])call @ Promise.all a assert.ok done assert.throws (!-> all.call(null, []).catch !->), TypeError, 'throws without context' # iteration closing done = no {resolve} = Promise try Promise.resolve = !-> throw 42 Promise.all(createIterable [1 2 3], return: !-> done := on)catch !-> Promise.resolve = resolve assert.ok done, 'iteration closing' # subclassing, `this` pattern FakePromise1 = !-> it ->, -> FakePromise1[Symbol?species] = FakePromise2 = !-> it ->, -> FakePromise1.resolve = FakePromise2.resolve = Promise~resolve assert.ok all.call(FakePromise1, [1 2 3]) instanceof FakePromise1, 'subclassing, `this` pattern' # NewPromiseCapability validations FakePromise1 = !-> FakePromise2 = !-> it null, -> FakePromise3 = !-> it ->, null FakePromise1.resolve = FakePromise2.resolve = FakePromise3.resolve = Promise~resolve assert.throws (!-> all.call(FakePromise1, [1 2 3])), 'NewPromiseCapability validations, #1' assert.throws (!-> all.call(FakePromise2, [1 2 3])), 'NewPromiseCapability validations, #2' assert.throws (!-> all.call(FakePromise3, [1 2 3])), 'NewPromiseCapability validations, #3' test 'Promise.race' (assert)!-> {race} = Promise assert.isFunction race assert.arity race, 1 # works with iterables iter = createIterable [1 2 3] Promise.race iter .catch -> assert.ok iter.received, 'works with iterables: iterator received' assert.ok iter.called, 'works with iterables: next called' # call @@iterator in Array with custom iterator a = [] done = no a['@@iterator'] = void a[Symbol?iterator] = -> done := on core.getIteratorMethod([])call @ Promise.race a assert.ok done assert.throws (!-> race.call(null, []).catch !->), TypeError, 'throws without context' # iteration closing done = no {resolve} = Promise try Promise.resolve = !-> throw 42 Promise.race(createIterable [1 2 3], return: !-> done := on)catch !-> Promise.resolve = resolve assert.ok done, 'iteration closing' # subclassing, `this` pattern FakePromise1 = !-> it ->, -> FakePromise1[Symbol?species] = FakePromise2 = !-> it ->, -> FakePromise1.resolve = FakePromise2.resolve = Promise~resolve assert.ok race.call(FakePromise1, [1 2 3]) instanceof FakePromise1, 'subclassing, `this` pattern' # NewPromiseCapability validations FakePromise1 = !-> FakePromise2 = !-> it null, -> FakePromise3 = !-> it ->, null FakePromise1.resolve = FakePromise2.resolve = FakePromise3.resolve = Promise~resolve assert.throws (!-> race.call(FakePromise1, [1 2 3])), 'NewPromiseCapability validations, #1' assert.throws (!-> race.call(FakePromise2, [1 2 3])), 'NewPromiseCapability validations, #2' assert.throws (!-> race.call(FakePromise3, [1 2 3])), 'NewPromiseCapability validations, #3' test 'Promise.resolve' (assert)!-> {resolve} = Promise assert.isFunction resolve assert.throws (!-> resolve.call(null, 1).catch !->), TypeError, 'throws without context' # subclassing, `this` pattern FakePromise1 = !-> it ->, -> FakePromise1[Symbol?species] = FakePromise2 = !-> it ->, -> assert.ok resolve.call(FakePromise1, 42) instanceof FakePromise1, 'subclassing, `this` pattern' # NewPromiseCapability validations assert.throws (!-> resolve.call(!->, 42)), 'NewPromiseCapability validations, #1' assert.throws (!-> resolve.call((!-> it null, ->), 42)), 'NewPromiseCapability validations, #2' assert.throws (!-> resolve.call((!-> it ->, null), 42)), 'NewPromiseCapability validations, #3' test 'Promise.reject' (assert)!-> {reject} = Promise assert.isFunction reject assert.throws (!-> reject.call(null, 1).catch !->), TypeError, 'throws without context' # subclassing, `this` pattern FakePromise1 = !-> it ->, -> FakePromise1[Symbol?species] = FakePromise2 = !-> it ->, -> assert.ok reject.call(FakePromise1, 42) instanceof FakePromise1, 'subclassing, `this` pattern' # NewPromiseCapability validations assert.throws (!-> reject.call(!->, 42)), 'NewPromiseCapability validations, #1' assert.throws (!-> reject.call((!-> it null, ->), 42)), 'NewPromiseCapability validations, #2' assert.throws (!-> reject.call((!-> it ->, null), 42)), 'NewPromiseCapability validations, #3' if PROTO test 'Promise subclassing' (assert)!-> # this is ES5 syntax to create a valid ES6 subclass SubPromise = -> self = new Promise it core.Object.setPrototypeOf self, SubPromise:: self.mine = 'subclass' self core.Object.setPrototypeOf SubPromise, Promise SubPromise:: = core.Object.create Promise:: SubPromise::@@ = SubPromise # now let's see if this works like a proper subclass. p1 = SubPromise.resolve 5 assert.strictEqual p1.mine, 'subclass' p1 = p1.then -> assert.strictEqual it, 5 assert.strictEqual p1.mine, 'subclass' p2 = new SubPromise -> it 6 assert.strictEqual p2.mine, 'subclass' p2 = p2.then -> assert.strictEqual it, 6 assert.strictEqual p2.mine, 'subclass' p3 = SubPromise.all [p1, p2] assert.strictEqual p3.mine, 'subclass' # double check assert.ok p3 instanceof Promise assert.ok p3 instanceof SubPromise # check the async values p3.then assert.async!, -> assert.ok it, no test 'Unhandled rejection tracking' (assert)!-> done = no start = assert.async! if process? assert.expect 3 process.on \unhandledRejection, onunhandledrejection = (reason, promise)!-> process.removeListener \unhandledRejection, onunhandledrejection assert.same promise, $promise, 'unhandledRejection, promise' assert.same reason, 42, 'unhandledRejection, reason' $promise.catch -> process.on \rejectionHandled, onrejectionhandled = (promise)!-> process.removeListener \rejectionHandled, onrejectionhandled assert.same promise, $promise, 'rejectionHandled, promise' done or start! done := on else assert.expect 4 global.onunhandledrejection = !-> assert.same it.promise, $promise, 'onunhandledrejection, promise' assert.same it.reason, 42, 'onunhandledrejection, reason' setTimeout (!-> $promise.catch ->), 1 global.onunhandledrejection = null global.onrejectionhandled = !-> assert.same it.promise, $promise, 'onrejectionhandled, promise' assert.same it.reason, 42, 'onrejectionhandled, reason' global.onrejectionhandled = null done or start! done := on Promise.reject(43).catch -> $promise = Promise.reject 42 setTimeout (!-> done or start! done := on ), 3e3core-js-2.4.1/tests/library/es6.reflect.apply.ls000066400000000000000000000012071274277553300215110ustar00rootroot00000000000000{module, test} = QUnit module \ES6 test 'Reflect.apply' (assert)!-> {apply} = core.Reflect assert.isFunction apply assert.arity apply, 3 if \name of apply assert.name apply, \apply assert.strictEqual apply(Array::push, [1 2], [3 4 5]), 5 C = (a, b, c)-> a + b + c C.apply = 42 assert.strictEqual apply(C, null, <[foo bar baz]>), \foobarbaz, 'works with redefined apply' assert.throws (!-> apply 42, null, []), TypeError, 'throws on primitive' assert.throws (!-> apply (!->), null), TypeError, 'throws without third argument' assert.throws (!-> apply (!->), null, \123), TypeError, 'throws on primitive as third argument'core-js-2.4.1/tests/library/es6.reflect.construct.ls000066400000000000000000000020561274277553300224130ustar00rootroot00000000000000{module, test} = QUnit module \ES6 {getPrototypeOf} = core.Object test 'Reflect.construct' (assert)!-> {construct} = core.Reflect assert.isFunction construct assert.arity construct, 2 if \name of construct assert.name construct, \construct C = (a, b, c)-> @qux = a + b + c assert.strictEqual construct(C, <[foo bar baz]>).qux, \foobarbaz, \basic C.apply = 42 assert.strictEqual construct(C, <[foo bar baz]>).qux, \foobarbaz, 'works with redefined apply' inst = construct((!-> @x = 42), [], Array) assert.strictEqual inst.x, 42, 'constructor with newTarget' assert.ok inst instanceof Array, 'prototype with newTarget' # not works in native Edge 12 and FF43- implementations assert.throws (!-> construct 42, []), TypeError, 'throws on primitive' f = -> f:: = 42 assert.ok try getPrototypeOf(construct f, []) is Object:: catch => no assert.same typeof (try construct(Date, [])getTime!), \number, 'works with native constructors with 2 arguments' assert.throws (!-> construct !->), 'throws when the second argument is not an object'core-js-2.4.1/tests/library/es6.reflect.define-property.ls000066400000000000000000000016641274277553300235070ustar00rootroot00000000000000{module, test} = QUnit module \ES6 {defineProperty, getOwnPropertyDescriptor} = core.Object test 'Reflect.defineProperty' (assert)!-> {defineProperty} = core.Reflect {create} = core.Object assert.isFunction defineProperty assert.arity defineProperty, 3 if \name of defineProperty assert.name defineProperty, \defineProperty O = {} assert.strictEqual defineProperty(O, \foo, {value: 123}), on assert.strictEqual O.foo, 123 if DESCRIPTORS O = {} defineProperty O, \foo, {value: 123, enumerable: on} assert.deepEqual getOwnPropertyDescriptor(O, \foo), {value: 123, enumerable: on, configurable: no, writable: no} assert.strictEqual defineProperty(O, \foo, {value: 42}), no assert.throws (!-> defineProperty 42, \foo, {value: 42}), TypeError, 'throws on primitive' assert.throws (!-> defineProperty 42 1 {}) assert.throws (!-> defineProperty {} create(null), {}) assert.throws (!-> defineProperty {} 1 1)core-js-2.4.1/tests/library/es6.reflect.delete-property.ls000066400000000000000000000010641274277553300235110ustar00rootroot00000000000000{module, test} = QUnit module \ES6 {defineProperty} = core.Object test 'Reflect.deleteProperty' (assert)!-> {deleteProperty} = core.Reflect assert.isFunction deleteProperty assert.arity deleteProperty, 2 if \name of deleteProperty assert.name deleteProperty, \deleteProperty O = {bar: 456} assert.strictEqual deleteProperty(O, \bar), on assert.ok \bar not in O if DESCRIPTORS assert.strictEqual deleteProperty(defineProperty({}, \foo, {value: 42}), \foo), no assert.throws (!-> deleteProperty 42, \foo), TypeError, 'throws on primitive'core-js-2.4.1/tests/library/es6.reflect.enumerate.ls000066400000000000000000000013401274277553300223470ustar00rootroot00000000000000{module, test} = QUnit module \ES6 {defineProperty} = core.Object {from} = core.Array test 'Reflect.enumerate' (assert)!-> {enumerate} = core.Reflect {iterator} = core.Symbol assert.isFunction enumerate assert.arity enumerate, 1 if \name of enumerate assert.name enumerate, \enumerate obj = {foo: 1, bar: 2} i = enumerate obj assert.isIterable i assert.deepEqual from(i), <[foo bar]>, 'bisic' obj = {q: 1, w: 2, e: 3} i = enumerate obj delete obj.w assert.deepEqual from(i), <[q e]>, 'ignore holes' obj = {q: 1, w: 2, e: 3} with {a: 4, s: 5, d: 6} assert.deepEqual from(enumerate obj).sort!, <[a d e q s w]>, 'works with prototype' assert.throws (!-> enumerate 42), TypeError, 'throws on primitive'core-js-2.4.1/tests/library/es6.reflect.get-own-property-descriptor.ls000066400000000000000000000010131274277553300257750ustar00rootroot00000000000000{module, test} = QUnit module \ES6 test 'Reflect.getOwnPropertyDescriptor' (assert)!-> {getOwnPropertyDescriptor} = core.Reflect assert.isFunction getOwnPropertyDescriptor assert.arity getOwnPropertyDescriptor, 2 if \name of getOwnPropertyDescriptor assert.name getOwnPropertyDescriptor, \getOwnPropertyDescriptor obj = {baz: 789} desc = getOwnPropertyDescriptor obj, \baz assert.strictEqual desc.value, 789 assert.throws (!-> getOwnPropertyDescriptor 42 \constructor), TypeError, 'throws on primitive'core-js-2.4.1/tests/library/es6.reflect.get-prototype-of.ls000066400000000000000000000005731274277553300236150ustar00rootroot00000000000000{module, test} = QUnit module \ES6 test 'Reflect.getPrototypeOf' (assert)!-> {getPrototypeOf} = core.Reflect assert.isFunction getPrototypeOf assert.arity getPrototypeOf, 1 if \name of getPrototypeOf assert.name getPrototypeOf, \getPrototypeOf assert.strictEqual getPrototypeOf([]), Array:: assert.throws (!-> getPrototypeOf 42), TypeError, 'throws on primitive'core-js-2.4.1/tests/library/es6.reflect.get.ls000066400000000000000000000015111274277553300211410ustar00rootroot00000000000000{module, test} = QUnit module \ES6 {defineProperty, create} = core.Object test 'Reflect.get' (assert)!-> {get} = core.Reflect assert.isFunction get #assert.arity get, 2 # fails in MS Edge if \name of get assert.name get, \get assert.strictEqual get({qux: 987}, \qux), 987 if DESCRIPTORS target = create defineProperty({z:3}, \w, {get: -> @}), do x: value: 1 y: get: -> @ receiver = {} assert.strictEqual get(target, \x, receiver), 1, 'get x' assert.strictEqual get(target, \y, receiver), receiver, 'get y' assert.strictEqual get(target, \z, receiver), 3, 'get z' assert.strictEqual get(target, \w, receiver), receiver, 'get w' assert.strictEqual get(target, \u, receiver), void, 'get u' assert.throws (!-> get 42 \constructor), TypeError, 'throws on primitive'core-js-2.4.1/tests/library/es6.reflect.has.ls000066400000000000000000000006061274277553300211410ustar00rootroot00000000000000{module, test} = QUnit module \ES6 test 'Reflect.has' (assert)!-> {has} = core.Reflect assert.isFunction has assert.arity has, 2 if \name of has assert.name has, \has O = qux: 987 assert.strictEqual has(O, \qux), on assert.strictEqual has(O, \qwe), no assert.strictEqual has(O, \toString), on assert.throws (!-> has 42, \constructor), TypeError, 'throws on primitive'core-js-2.4.1/tests/library/es6.reflect.is-extensible.ls000066400000000000000000000007131274277553300231400ustar00rootroot00000000000000{module, test} = QUnit module \ES6 {defineProperty, preventExtensions} = core.Object test 'Reflect.isExtensible' (assert)!-> {isExtensible} = core.Reflect assert.isFunction isExtensible assert.arity isExtensible, 1 if \name of isExtensible assert.name isExtensible, \isExtensible assert.ok isExtensible {} if DESCRIPTORS assert.ok !isExtensible preventExtensions {} assert.throws (!-> isExtensible 42), TypeError, 'throws on primitive'core-js-2.4.1/tests/library/es6.reflect.own-keys.ls000066400000000000000000000014101274277553300221340ustar00rootroot00000000000000{module, test} = QUnit module \ES6 {defineProperty} = core.Object test 'Reflect.ownKeys' (assert)!-> {ownKeys} = core.Reflect sym = core.Symbol \c assert.isFunction ownKeys assert.arity ownKeys, 1 if \name of ownKeys assert.name ownKeys, \ownKeys O1 = {a: 1} defineProperty O1, \b, value: 2 O1[sym] = 3 keys = ownKeys O1 assert.strictEqual keys.length, 3, 'ownKeys return all own keys' assert.ok \a in keys, 'ownKeys return all own keys: simple' assert.ok \b in keys, 'ownKeys return all own keys: hidden' assert.strictEqual O1[keys.2], 3, 'ownKeys return all own keys: symbol' O2 = ^^O1 keys = ownKeys O2 assert.strictEqual keys.length, 0, 'ownKeys return only own keys' assert.throws (!-> ownKeys 42), TypeError, 'throws on primitive'core-js-2.4.1/tests/library/es6.reflect.prevent-extensions.ls000066400000000000000000000007631274277553300242520ustar00rootroot00000000000000{module, test} = QUnit module \ES6 {defineProperty, isExtensible} = core.Object test 'Reflect.preventExtensions' (assert)!-> {preventExtensions} = core.Reflect assert.isFunction preventExtensions assert.arity preventExtensions, 1 if \name of preventExtensions assert.name preventExtensions, \preventExtensions obj = {} assert.ok preventExtensions(obj), on if DESCRIPTORS assert.ok !isExtensible obj assert.throws (!-> preventExtensions 42), TypeError, 'throws on primitive'core-js-2.4.1/tests/library/es6.reflect.set-prototype-of.ls000066400000000000000000000011451274277553300236250ustar00rootroot00000000000000if PROTO {module, test} = QUnit module \ES6 test 'Reflect.setPrototypeOf' (assert)!-> {setPrototypeOf} = core.Reflect assert.isFunction setPrototypeOf #assert.arity setPrototypeOf, 2 # fails in MS Edge if \name of setPrototypeOf assert.name setPrototypeOf, \setPrototypeOf obj = {} assert.ok setPrototypeOf(obj, Array::), on assert.ok obj instanceof Array assert.throws (!-> setPrototypeOf {}, 42), TypeError assert.throws (!-> setPrototypeOf 42, {}), TypeError, 'throws on primitive' assert.ok setPrototypeOf(o = {}, o) is no, 'false on recursive __proto__'core-js-2.4.1/tests/library/es6.reflect.set.ls000066400000000000000000000034041274277553300211600ustar00rootroot00000000000000{module, test} = QUnit module \ES6 {defineProperty, getOwnPropertyDescriptor, create} = core.Object test 'Reflect.set' (assert)!-> {set} = core.Reflect assert.isFunction set #assert.arity set, 3 # fails in MS Edge if \name of set assert.name set, \set obj = {} assert.ok set(obj, \quux, 654), on assert.strictEqual obj.quux, 654 target = {} receiver = {} set target, \foo, 1, receiver assert.strictEqual target.foo, void, 'target.foo === undefined' assert.strictEqual receiver.foo, 1, 'receiver.foo === 1' if DESCRIPTORS defineProperty receiver, \bar, {value: 0, writable: on, enumerable: no, configurable: on} set target, \bar, 1, receiver assert.strictEqual receiver.bar, 1, 'receiver.bar === 1' assert.strictEqual getOwnPropertyDescriptor(receiver, \bar).enumerable, no, 'enumerability not overridden' var out target = create defineProperty({z: 3}, \w, {set: !-> out := @}), do x: value: 1, writable: on, configurable: on y: set: !-> out := @ c: value: 1, writable: no, configurable: no assert.strictEqual set(target, \x, 2, target), on, 'set x' assert.strictEqual target.x, 2, 'set x' out = null assert.strictEqual set(target, \y, 2, target), on, 'set y' assert.strictEqual out, target, 'set y' assert.strictEqual set(target, \z, 4, target), on assert.strictEqual target.z, 4, 'set z' out = null assert.strictEqual set(target, \w, 1, target), on 'set w' assert.strictEqual out, target, 'set w' assert.strictEqual set(target, \u, 0, target), on, 'set u' assert.strictEqual target.u, 0, 'set u' assert.strictEqual set(target, \c, 2, target), no, 'set c' assert.strictEqual target.c, 1, 'set c' assert.throws (!-> set 42, \q, 42), TypeError, 'throws on primitive'core-js-2.4.1/tests/library/es6.set.ls000066400000000000000000000160011274277553300175320ustar00rootroot00000000000000{module, test} = QUnit module \ES6 same = (a, b)-> if a is b => a isnt 0 or 1 / a is 1 / b else a !~= a and b !~= b {Set, Map, Symbol} = core {getOwnPropertyDescriptor, freeze} = core.Object {iterator} = core.Symbol test 'Set' (assert)!-> {from} = core.Array assert.isFunction Set assert.ok \add of Set::, 'add in Set.prototype' assert.ok \clear of Set::, 'clear in Set.prototype' assert.ok \delete of Set::, 'delete in Set.prototype' assert.ok \forEach of Set::, 'forEach in Set.prototype' assert.ok \has of Set::, 'has in Set.prototype' assert.ok new Set instanceof Set, 'new Set instanceof Set' assert.strictEqual new Set(createIterable [1 2 3]).size, 3, 'Init from iterable' assert.strictEqual new Set([freeze({}), 1]).size, 2, 'Support frozen objects' S = new Set [1 2 3 2 1] assert.strictEqual S.size, 3 r = [] S.forEach (v)-> r.push v assert.deepEqual r, [1 2 3] assert.strictEqual new Set([NaN, NaN, NaN])size, 1 assert.deepEqual from(new Set([3 4]).add 2 .add 1), [3 4 2 1] # return #throw done = no iter = createIterable [null, 1, 2], return: -> done := on _add = Set::add Set::add = -> throw 42 try => new Set iter Set::add = _add assert.ok done, '.return #throw' # call @@iterator in Array with custom iterator a = [] done = no a['@@iterator'] = void a[iterator] = -> done := on core.getIteratorMethod([])call @ new Set a assert.ok done o = {} new Set!add o if DESCRIPTORS assert.arrayEqual [key for key of o], [] assert.arrayEqual core.Object.keys(o), [] assert.arrayEqual core.Object.getOwnPropertyNames(o), [] assert.arrayEqual core.Object.getOwnPropertySymbols(o), [] assert.arrayEqual core.Reflect.ownKeys(o), [] if nativeSubclass C = nativeSubclass Set assert.ok new C instanceof C, 'correct subclassing with native classes #1' assert.ok new C instanceof Set, 'correct subclassing with native classes #2' assert.ok new C!add(2).has(2), 'correct subclassing with native classes #3' test 'Set#add' (assert)!-> assert.isFunction Set::add a = [] S = new Set [NaN, 2 3 2 1 a] assert.strictEqual S.size, 5 chain = S.add NaN assert.strictEqual chain, S assert.strictEqual S.size, 5 S.add 2 assert.strictEqual S.size, 5 S.add a assert.strictEqual S.size, 5 S.add [] assert.strictEqual S.size, 6 S.add 4 assert.strictEqual S.size, 7 S = new Set!add freeze f = {} assert.ok S.has f test 'Set#clear' (assert)!-> assert.isFunction Set::clear S = new Set S.clear! assert.strictEqual S.size, 0 S = new Set [1 2 3 2 1] S.clear! assert.strictEqual S.size, 0 assert.ok !S.has 1 assert.ok !S.has 2 assert.ok !S.has 3 S = new Set [1 f = freeze {}] S.clear! assert.strictEqual S.size, 0, 'Support frozen objects' assert.ok !S.has 1 assert.ok !S.has f test 'Set#delete' (assert)!-> assert.isFunction Set::delete a = [] S = new Set [NaN, 2 3 2 1 a] assert.strictEqual S.size, 5 assert.strictEqual S.delete(NaN), on assert.strictEqual S.size, 4 assert.strictEqual S.delete(4), no assert.strictEqual S.size, 4 S.delete [] assert.strictEqual S.size, 4 S.delete a assert.strictEqual S.size, 3 S.add freeze(f = {}) assert.strictEqual S.size, 4 S.delete f assert.strictEqual S.size, 3 test 'Set#forEach' (assert)!-> assert.isFunction Set::forEach r = [] count = 0 S = new Set [1 2 3 2 1] S.forEach (value)!-> count++ r.push value assert.strictEqual count, 3 assert.deepEqual r, [1 2 3] set = new Set <[0 1 2 3]> s = ""; set.forEach -> s += it; if it is \2 set.delete \2 set.delete \3 set.delete \1 set.add \4 assert.strictEqual s, \0124 set = new Set <[0]> s = ""; set.forEach -> set.delete \0 if s isnt '' => throw '!!!' s += it assert.strictEqual s, \0 assert.throws (!-> Set::forEach.call new Map, !->), 'non-generic' test 'Set#has' (assert)!-> assert.isFunction Set::has a = [] f = freeze {} S = new Set [NaN, 2 3 2 1 f, a] assert.ok S.has NaN assert.ok S.has a assert.ok S.has f assert.ok S.has 2 assert.ok not S.has 4 assert.ok not S.has [] test 'Set#size' (assert)!-> size = new Set([1]).size assert.strictEqual typeof size, \number, 'size is number' assert.strictEqual size, 1, 'size is correct' if DESCRIPTORS sizeDesc = getOwnPropertyDescriptor Set::, \size assert.ok sizeDesc && sizeDesc.get, 'size is getter' assert.ok sizeDesc && !sizeDesc.set, 'size isnt setter' assert.throws (!-> Set::size), TypeError test 'Set & -0' (assert)!-> set = new Set set.add -0 assert.strictEqual set.size, 1 assert.ok set.has 0 assert.ok set.has -0 set.forEach (it)-> assert.ok !same it, -0 set.delete -0 assert.strictEqual set.size, 0 set = new Set [-0] set.forEach (key)-> assert.ok !same key, -0 set = new Set! ..add 4 ..add 3 ..add 2 ..add 1 ..add 0 assert.ok set.has -0 test 'Set#@@toStringTag' (assert)!-> assert.strictEqual Set::[Symbol?toStringTag], \Set, 'Set::@@toStringTag is `Set`' test 'Set Iterator' (assert)!-> set = new Set <[a b c d]> keys = [] iterator = set.keys! keys.push iterator.next!value assert.ok set.delete \a assert.ok set.delete \b assert.ok set.delete \c set.add \e keys.push iterator.next!value keys.push iterator.next!value assert.ok iterator.next!done set.add \f assert.ok iterator.next!done assert.deepEqual keys, <[a d e]> test 'Set#keys' (assert)!-> assert.isFunction Set::keys iter = new Set(<[q w e]>)keys! assert.isIterator iter assert.isIterable iter assert.strictEqual iter[Symbol?toStringTag], 'Set Iterator' assert.deepEqual iter.next!, {value: \q, done: no} assert.deepEqual iter.next!, {value: \w, done: no} assert.deepEqual iter.next!, {value: \e, done: no} assert.deepEqual iter.next!, {value: void, done: on} test 'Set#values' (assert)!-> assert.isFunction Set::values iter = new Set(<[q w e]>)values! assert.isIterator iter assert.isIterable iter assert.strictEqual iter[Symbol?toStringTag], 'Set Iterator' assert.deepEqual iter.next!, {value: \q, done: no} assert.deepEqual iter.next!, {value: \w, done: no} assert.deepEqual iter.next!, {value: \e, done: no} assert.deepEqual iter.next!, {value: void, done: on} test 'Set#entries' (assert)!-> assert.isFunction Set::entries iter = new Set(<[q w e]>)entries! assert.isIterator iter assert.isIterable iter assert.strictEqual iter[Symbol?toStringTag], 'Set Iterator' assert.deepEqual iter.next!, {value: [\q \q], done: no} assert.deepEqual iter.next!, {value: [\w \w], done: no} assert.deepEqual iter.next!, {value: [\e \e], done: no} assert.deepEqual iter.next!, {value: void, done: on} test 'Set#@@iterator' (assert)!-> iter = core.getIterator(new Set <[q w e]>) assert.isIterator iter assert.isIterable iter assert.strictEqual iter[Symbol?toStringTag], 'Set Iterator' assert.deepEqual iter.next!, {value: \q, done: no} assert.deepEqual iter.next!, {value: \w, done: no} assert.deepEqual iter.next!, {value: \e, done: no} assert.deepEqual iter.next!, {value: void, done: on}core-js-2.4.1/tests/library/es6.string.anchor.ls000066400000000000000000000003761274277553300215260ustar00rootroot00000000000000{module, test} = QUnit module \ES6 test 'String#anchor' (assert)!-> {anchor} = core.String assert.isFunction anchor assert.same anchor(\a \b), 'a', 'lower case' assert.same anchor(\a \"), 'a', 'escape quotes'core-js-2.4.1/tests/library/es6.string.big.ls000066400000000000000000000002431274277553300210060ustar00rootroot00000000000000{module, test} = QUnit module \ES6 test 'String#big' (assert)!-> {big} = core.String assert.isFunction big assert.same big(\a), 'a', 'lower case'core-js-2.4.1/tests/library/es6.string.blink.ls000066400000000000000000000002571274277553300213510ustar00rootroot00000000000000{module, test} = QUnit module \ES6 test 'String#blink' (assert)!-> {blink} = core.String assert.isFunction blink assert.same blink(\a), 'a', 'lower case'core-js-2.4.1/tests/library/es6.string.bold.ls000066400000000000000000000002431274277553300211650ustar00rootroot00000000000000{module, test} = QUnit module \ES6 test 'String#bold' (assert)!-> {bold} = core.String assert.isFunction bold assert.same bold(\a), 'a', 'lower case'core-js-2.4.1/tests/library/es6.string.code-point-at.ls000066400000000000000000000065251274277553300227210ustar00rootroot00000000000000{module, test} = QUnit module \ES6 test 'String#codePointAt' (assert)!-> {codePointAt} = core.String assert.isFunction codePointAt # tests from https://github.com/mathiasbynens/String.prototype.codePointAt/blob/master/tests/tests.js assert.strictEqual codePointAt('abc\uD834\uDF06def', ''), 0x61 assert.strictEqual codePointAt('abc\uD834\uDF06def', \_), 0x61 assert.strictEqual codePointAt('abc\uD834\uDF06def'), 0x61 assert.strictEqual codePointAt('abc\uD834\uDF06def', -Infinity), void assert.strictEqual codePointAt('abc\uD834\uDF06def', -1), void assert.strictEqual codePointAt('abc\uD834\uDF06def', -0), 0x61 assert.strictEqual codePointAt('abc\uD834\uDF06def', 0), 0x61 assert.strictEqual codePointAt('abc\uD834\uDF06def', 3), 0x1D306 assert.strictEqual codePointAt('abc\uD834\uDF06def', 4), 0xDF06 assert.strictEqual codePointAt('abc\uD834\uDF06def', 5), 0x64 assert.strictEqual codePointAt('abc\uD834\uDF06def', 42), void assert.strictEqual codePointAt('abc\uD834\uDF06def', Infinity), void assert.strictEqual codePointAt('abc\uD834\uDF06def', Infinity), void assert.strictEqual codePointAt('abc\uD834\uDF06def', NaN), 0x61 assert.strictEqual codePointAt('abc\uD834\uDF06def', no), 0x61 assert.strictEqual codePointAt('abc\uD834\uDF06def', null), 0x61 assert.strictEqual codePointAt('abc\uD834\uDF06def', void), 0x61 assert.strictEqual codePointAt('\uD834\uDF06def', ''), 0x1D306 assert.strictEqual codePointAt('\uD834\uDF06def', \1), 0xDF06 assert.strictEqual codePointAt('\uD834\uDF06def', \_), 0x1D306 assert.strictEqual codePointAt('\uD834\uDF06def'), 0x1D306 assert.strictEqual codePointAt('\uD834\uDF06def', -1), void assert.strictEqual codePointAt('\uD834\uDF06def', -0), 0x1D306 assert.strictEqual codePointAt('\uD834\uDF06def', 0), 0x1D306 assert.strictEqual codePointAt('\uD834\uDF06def', 1), 0xDF06 assert.strictEqual codePointAt('\uD834\uDF06def', 42), void assert.strictEqual codePointAt('\uD834\uDF06def', no), 0x1D306 assert.strictEqual codePointAt('\uD834\uDF06def', null), 0x1D306 assert.strictEqual codePointAt('\uD834\uDF06def', void), 0x1D306 assert.strictEqual codePointAt('\uD834abc', ''), 0xD834 assert.strictEqual codePointAt('\uD834abc', \_), 0xD834 assert.strictEqual codePointAt('\uD834abc'), 0xD834 assert.strictEqual codePointAt('\uD834abc', -1), void assert.strictEqual codePointAt('\uD834abc', -0), 0xD834 assert.strictEqual codePointAt('\uD834abc', 0), 0xD834 assert.strictEqual codePointAt('\uD834abc', no), 0xD834 assert.strictEqual codePointAt('\uD834abc', NaN), 0xD834 assert.strictEqual codePointAt('\uD834abc', null), 0xD834 assert.strictEqual codePointAt('\uD834abc', void), 0xD834 assert.strictEqual codePointAt('\uDF06abc', ''), 0xDF06 assert.strictEqual codePointAt('\uDF06abc', \_), 0xDF06 assert.strictEqual codePointAt('\uDF06abc'), 0xDF06 assert.strictEqual codePointAt('\uDF06abc', -1), void assert.strictEqual codePointAt('\uDF06abc', -0), 0xDF06 assert.strictEqual codePointAt('\uDF06abc', 0), 0xDF06 assert.strictEqual codePointAt('\uDF06abc', no), 0xDF06 assert.strictEqual codePointAt('\uDF06abc', NaN), 0xDF06 assert.strictEqual codePointAt('\uDF06abc', null), 0xDF06 assert.strictEqual codePointAt('\uDF06abc', void), 0xDF06 if STRICT assert.throws (!-> codePointAt null, 0), TypeError assert.throws (!-> codePointAt void, 0), TypeErrorcore-js-2.4.1/tests/library/es6.string.ends-with.ls000066400000000000000000000017501274277553300221530ustar00rootroot00000000000000{module, test} = QUnit module \ES6 test 'String#endsWith' (assert)!-> {endsWith} = core.String assert.isFunction endsWith assert.ok endsWith 'undefined' assert.ok not endsWith 'undefined' null assert.ok endsWith 'abc' '' assert.ok endsWith 'abc' 'c' assert.ok endsWith 'abc' 'bc' assert.ok not endsWith 'abc' 'ab' assert.ok endsWith 'abc' '' NaN assert.ok not endsWith 'abc' \c -1 assert.ok endsWith 'abc' \a 1 assert.ok endsWith 'abc' \c Infinity assert.ok endsWith 'abc' \a on assert.ok not endsWith 'abc' \c \x assert.ok not endsWith 'abc' \a \x if STRICT assert.throws (!-> endsWith null, '.'), TypeError assert.throws (!-> endsWith void, '.'), TypeError re = /./ assert.throws (!-> endsWith '/./' re), TypeError re[core.Symbol?match] = no assert.ok try endsWith '/./' re catch e => no O = {} assert.ok try endsWith '[object Object]' O catch e => no O[core.Symbol?match] = on assert.throws (!-> endsWith '[object Object]' O), TypeErrorcore-js-2.4.1/tests/library/es6.string.fixed.ls000066400000000000000000000002511274277553300213430ustar00rootroot00000000000000{module, test} = QUnit module \ES6 test 'String#fixed' (assert)!-> {fixed} = core.String assert.isFunction fixed assert.same fixed(\a), 'a', 'lower case'core-js-2.4.1/tests/library/es6.string.fontcolor.ls000066400000000000000000000004331274277553300222530ustar00rootroot00000000000000{module, test} = QUnit module \ES6 test 'String#fontcolor' (assert)!-> {fontcolor} = core.String assert.isFunction fontcolor assert.same fontcolor(\a \b), 'a', 'lower case' assert.same fontcolor(\a \"), 'a', 'escape quotes'core-js-2.4.1/tests/library/es6.string.fontsize.ls000066400000000000000000000004241274277553300221070ustar00rootroot00000000000000{module, test} = QUnit module \ES6 test 'String#fontsize' (assert)!-> {fontsize} = core.String assert.isFunction fontsize assert.same fontsize(\a \b), 'a', 'lower case' assert.same fontsize(\a \"), 'a', 'escape quotes'core-js-2.4.1/tests/library/es6.string.from-code-point.ls000066400000000000000000000037011274277553300232510ustar00rootroot00000000000000{module, test} = QUnit module \ES6 test 'String.fromCodePoint' (assert)!-> {fromCodePoint} = core.String assert.isFunction fromCodePoint assert.arity fromCodePoint, 1 if \name of fromCodePoint assert.name fromCodePoint, \fromCodePoint # tests from https://github.com/mathiasbynens/String.fromCodePoint/blob/master/tests/tests.js assert.strictEqual fromCodePoint(''), '\0' assert.strictEqual fromCodePoint!, '' assert.strictEqual fromCodePoint(-0), '\0' assert.strictEqual fromCodePoint(0), '\0' assert.strictEqual fromCodePoint(0x1D306), '\uD834\uDF06' assert.strictEqual fromCodePoint(0x1D306, 0x61, 0x1D307), '\uD834\uDF06a\uD834\uDF07' assert.strictEqual fromCodePoint(0x61, 0x62, 0x1D307), 'ab\uD834\uDF07' assert.strictEqual fromCodePoint(false), '\0' assert.strictEqual fromCodePoint(null), '\0' assert.throws (!-> fromCodePoint \_), RangeError assert.throws (!-> fromCodePoint '+Infinity'), RangeError assert.throws (!-> fromCodePoint '-Infinity'), RangeError assert.throws (!-> fromCodePoint -1), RangeError assert.throws (!-> fromCodePoint 0x10FFFF + 1), RangeError assert.throws (!-> fromCodePoint 3.14), RangeError assert.throws (!-> fromCodePoint 3e-2), RangeError assert.throws (!-> fromCodePoint -Infinity), RangeError assert.throws (!-> fromCodePoint Infinity), RangeError assert.throws (!-> fromCodePoint NaN), RangeError assert.throws (!-> fromCodePoint void), RangeError assert.throws (!-> fromCodePoint {}), RangeError assert.throws (!-> fromCodePoint /./), RangeError tmp = 0x60; assert.strictEqual fromCodePoint({valueOf: -> ++tmp}), \a assert.strictEqual tmp, 0x61 counter = (2 ** 15) * 3 / 2 result = [] while --counter >= 0 => result.push 0 # one code unit per symbol fromCodePoint.apply null result # must not throw counter = (2 ** 15) * 3 / 2 result = [] while --counter >= 0 => result.push 0xFFFF + 1 # two code units per symbol fromCodePoint.apply null result # must not throwcore-js-2.4.1/tests/library/es6.string.includes.ls000066400000000000000000000012531274277553300220550ustar00rootroot00000000000000{module, test} = QUnit module \ES6 test 'String#includes' (assert)!-> {includes} = core.String assert.isFunction includes assert.ok not includes 'abc' assert.ok includes 'aundefinedb' assert.ok includes 'abcd' \b 1 assert.ok not includes 'abcd' \b 2 if STRICT assert.throws (!-> includes null, '.'), TypeError assert.throws (!-> includes void, '.'), TypeError re = /./ assert.throws (!-> includes '/./' re), TypeError re[core.Symbol?match] = no assert.ok try includes '/./' re catch e => no O = {} assert.ok try includes '[object Object]' O catch e => no O[core.Symbol?match] = on assert.throws (!-> includes '[object Object]' O), TypeErrorcore-js-2.4.1/tests/library/es6.string.italics.ls000066400000000000000000000002571274277553300217020ustar00rootroot00000000000000{module, test} = QUnit module \ES6 test 'String#italics' (assert)!-> {italics} = core.String assert.isFunction italics assert.same italics(\a), 'a', 'lower case'core-js-2.4.1/tests/library/es6.string.iterator.ls000066400000000000000000000013431274277553300221000ustar00rootroot00000000000000{module, test} = QUnit module \ES6 test 'String#@@iterator' (assert)!-> iter = core.getIterator 'qwe' assert.isIterator iter assert.strictEqual iter[core.Symbol?toStringTag], 'String Iterator' assert.deepEqual iter.next!, {value: \q, done: no} assert.deepEqual iter.next!, {value: \w, done: no} assert.deepEqual iter.next!, {value: \e, done: no} assert.deepEqual iter.next!, {value: void, done: on} assert.strictEqual core.Array.from(\𠮷𠮷𠮷).length, 3 iter = core.getIterator '𠮷𠮷𠮷' assert.deepEqual iter.next!, {value: \𠮷, done: no} assert.deepEqual iter.next!, {value: \𠮷, done: no} assert.deepEqual iter.next!, {value: \𠮷, done: no} assert.deepEqual iter.next!, {value: void, done: on}core-js-2.4.1/tests/library/es6.string.link.ls000066400000000000000000000003641274277553300212060ustar00rootroot00000000000000{module, test} = QUnit module \ES6 test 'String#link' (assert)!-> {link} = core.String assert.isFunction link assert.same link(\a \b), 'a', 'lower case' assert.same link(\a \"), 'a', 'escape quotes'core-js-2.4.1/tests/library/es6.string.raw.ls000066400000000000000000000007631274277553300210450ustar00rootroot00000000000000{module, test} = QUnit module \ES6 test 'String.raw' (assert)!-> {raw} = core.String assert.isFunction raw assert.arity raw, 1 if \name of raw assert.name raw, \raw assert.strictEqual raw({raw: ['Hi\\n', '!']} , \Bob), 'Hi\\nBob!', 'raw is array' assert.strictEqual raw({raw: \test}, 0, 1, 2), 't0e1s2t', 'raw is string' assert.strictEqual raw({raw: \test}, 0), 't0est', 'lacks substituting' assert.throws (!-> raw {}), TypeError assert.throws (!-> raw {raw: null}), TypeErrorcore-js-2.4.1/tests/library/es6.string.repeat.ls000066400000000000000000000006631274277553300215330ustar00rootroot00000000000000{module, test} = QUnit module \ES6 test 'String#repeat' (assert)!-> {repeat} = core.String assert.isFunction repeat assert.strictEqual repeat('qwe' 3), \qweqweqwe assert.strictEqual repeat('qwe' 2.5), \qweqwe assert.throws (!-> repeat 'qwe' -1), RangeError assert.throws (!-> repeat 'qwe' Infinity), RangeError if STRICT assert.throws (!-> repeat null, 1), TypeError assert.throws (!-> repeat void, 1), TypeErrorcore-js-2.4.1/tests/library/es6.string.small.ls000066400000000000000000000002571274277553300213620ustar00rootroot00000000000000{module, test} = QUnit module \ES6 test 'String#small' (assert)!-> {small} = core.String assert.isFunction small assert.same small(\a), 'a', 'lower case'core-js-2.4.1/tests/library/es6.string.starts-with.ls000066400000000000000000000017551274277553300225470ustar00rootroot00000000000000{module, test} = QUnit module \ES6 test 'String#startsWith' (assert)!-> {startsWith} = core.String assert.isFunction startsWith assert.ok startsWith 'undefined' assert.ok not startsWith 'undefined' null assert.ok startsWith 'abc' '' assert.ok startsWith 'abc' 'a' assert.ok startsWith 'abc' 'ab' assert.ok not startsWith 'abc' 'bc' assert.ok startsWith 'abc' '' NaN assert.ok startsWith 'abc' \a -1 assert.ok not startsWith 'abc' \a 1 assert.ok not startsWith 'abc' \a Infinity assert.ok startsWith 'abc' \b on assert.ok startsWith 'abc' \a \x if STRICT assert.throws (!-> startsWith null, '.'), TypeError assert.throws (!-> startsWith void, '.'), TypeError re = /./ assert.throws (!-> startsWith '/./' re), TypeError re[core.Symbol?match] = no assert.ok try startsWith '/./' re catch e => no O = {} assert.ok try startsWith '[object Object]' O catch e => no O[core.Symbol?match] = on assert.throws (!-> startsWith '[object Object]' O), TypeErrorcore-js-2.4.1/tests/library/es6.string.strike.ls000066400000000000000000000002651274277553300215520ustar00rootroot00000000000000{module, test} = QUnit module \ES6 test 'String#strike' (assert)!-> {strike} = core.String assert.isFunction strike assert.same strike(\a), 'a', 'lower case'core-js-2.4.1/tests/library/es6.string.sub.ls000066400000000000000000000002431274277553300210360ustar00rootroot00000000000000{module, test} = QUnit module \ES6 test 'String#sub' (assert)!-> {sub} = core.String assert.isFunction sub assert.same sub(\a), 'a', 'lower case'core-js-2.4.1/tests/library/es6.string.sup.ls000066400000000000000000000002431274277553300210540ustar00rootroot00000000000000{module, test} = QUnit module \ES6 test 'String#sup' (assert)!-> {sup} = core.String assert.isFunction sup assert.same sup(\a), 'a', 'lower case'core-js-2.4.1/tests/library/es6.string.trim.ls000066400000000000000000000011601274277553300212170ustar00rootroot00000000000000{module, test} = QUnit module \ES6 test 'String#trim' (assert)!-> {trim} = core.String assert.isFunction trim assert.strictEqual trim(' \n q w e \n '), 'q w e', 'removes whitespaces at left & right side of string' assert.strictEqual trim('\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u180E\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF'), '', 'removes all whitespaces' assert.strictEqual trim('\u200b\u0085'), '\u200b\u0085', "shouldn't remove this symbols" if STRICT assert.throws (!-> trim null, 0), TypeError assert.throws (!-> trim void, 0), TypeErrorcore-js-2.4.1/tests/library/es6.symbol.ls000066400000000000000000000152241274277553300202520ustar00rootroot00000000000000{module, test} = QUnit module \ES6 {Symbol, JSON} = core {defineProperty, getOwnPropertyDescriptor, create} = core.Object test 'Symbol' (assert)!-> assert.isFunction Symbol s1 = Symbol 'foo' s2 = Symbol 'foo' assert.ok s1 isnt s2, 'Symbol("foo") !== Symbol("foo")' O = {} O[s1] = 42 assert.ok O[s1] is 42, 'Symbol() work as key' assert.ok O[s2] isnt 42, 'Various symbols from one description are various keys' if DESCRIPTORS count = 0 for i of O => count++ assert.ok count is 0, 'object[Symbol()] is not enumerable' test 'Well-known Symbols' (assert)!-> for <[hasInstance isConcatSpreadable iterator match replace search species split toPrimitive toStringTag unscopables]> assert.ok .. of Symbol, "Symbol.#{..} available" assert.ok Object(Symbol[..]) instanceof Symbol, "Symbol.#{..} is symbol" test 'Global symbol registry' (assert)!-> assert.isFunction Symbol.for, 'Symbol.for is function' assert.isFunction Symbol.keyFor, 'Symbol.keyFor is function' symbol = Symbol.for \foo assert.strictEqual Symbol.for(\foo), symbol assert.strictEqual Symbol.keyFor(symbol), \foo assert.throws (!-> Symbol.keyFor \foo), 'throws on non-symbol' test 'Symbol#@@toPrimitive' (assert)!-> assert.isFunction Symbol::[Symbol.toPrimitive] S = Symbol! assert.same S, S[Symbol.toPrimitive]!, \works test 'Symbol#@@toStringTag' (assert)!-> assert.ok Symbol::[Symbol.toStringTag] is \Symbol, 'Symbol::@@toStringTag is `Symbol`' test 'Object.getOwnPropertySymbols' (assert)!-> {getOwnPropertySymbols, getOwnPropertyNames} = core.Object assert.isFunction getOwnPropertySymbols obj = {q: 1, w: 2, e: 3} obj[Symbol()] = 42 obj[Symbol()] = 43 assert.deepEqual getOwnPropertyNames(obj)sort!, <[e q w]> assert.strictEqual getOwnPropertySymbols(obj).length, 2 foo = obj with {a: 1, s: 2, d: 3} foo[Symbol()] = 44 assert.deepEqual getOwnPropertyNames(foo)sort!, <[a d s]> assert.strictEqual getOwnPropertySymbols(foo).length, 1 assert.strictEqual getOwnPropertySymbols(Object::).length, 0 if JSON? test 'Symbols & JSON.stringify' (assert)!-> assert.strictEqual JSON.stringify([1, Symbol(\foo), no, Symbol(\bar), {}]), '[1,null,false,null,{}]', 'array value' assert.strictEqual JSON.stringify({foo: Symbol \foo}), '{}', 'object value' if DESCRIPTORS => assert.strictEqual JSON.stringify({(Symbol(\foo)): 1, bar: 2}), '{"bar":2}', 'object key' assert.strictEqual JSON.stringify(Symbol \foo), void, 'symbol value' if typeof Symbol! is \symbol => assert.strictEqual JSON.stringify(Object Symbol \foo), '{}', 'boxed symbol' if DESCRIPTORS test 'Symbols & descriptors' (assert)!-> {create, defineProperty, getOwnPropertyDescriptor, keys, getOwnPropertyNames, getOwnPropertySymbols} = core.Object d = Symbol \d e = Symbol \e f = Symbol \f i = Symbol \i j = Symbol \j proto = {g: \g, (i): \i} defineProperty proto, \h, value: \h defineProperty proto, \j, value: \j O = create proto O.a = \a O[d] = \d defineProperty O, \b, value: \b defineProperty O, \c, value: \c, enumerable: on defineProperty O, e, configurable: on, writable:on, value: \e desc = value: \f, enumerable: on defineProperty O, f, desc assert.strictEqual desc.enumerable, on, 'defineProperty not changes descriptor object' assert.deepEqual getOwnPropertyDescriptor(O, \a), {configurable: on, writable:on, enumerable: on, value: \a}, 'getOwnPropertyDescriptor a' assert.deepEqual getOwnPropertyDescriptor(O, \b), {configurable: no, writable:no, enumerable: no, value: \b}, 'getOwnPropertyDescriptor b' assert.deepEqual getOwnPropertyDescriptor(O, \c), {configurable: no, writable:no, enumerable: on, value: \c}, 'getOwnPropertyDescriptor c' assert.deepEqual getOwnPropertyDescriptor(O, d), {configurable: on, writable:on, enumerable: on, value: \d}, 'getOwnPropertyDescriptor d' assert.deepEqual getOwnPropertyDescriptor(O, e), {configurable: on, writable:on, enumerable: no, value: \e}, 'getOwnPropertyDescriptor e' assert.deepEqual getOwnPropertyDescriptor(O, f), {configurable: no, writable:no, enumerable: on, value: \f}, 'getOwnPropertyDescriptor f' assert.strictEqual getOwnPropertyDescriptor(O, \g), void, 'getOwnPropertyDescriptor g' assert.strictEqual getOwnPropertyDescriptor(O, \h), void, 'getOwnPropertyDescriptor h' assert.strictEqual getOwnPropertyDescriptor(O, i), void, 'getOwnPropertyDescriptor i' assert.strictEqual getOwnPropertyDescriptor(O, j), void, 'getOwnPropertyDescriptor j' assert.strictEqual getOwnPropertyDescriptor(O, \k), void, 'getOwnPropertyDescriptor k' assert.strictEqual getOwnPropertyDescriptor(Object::, \toString).enumerable, no, 'getOwnPropertyDescriptor on Object.prototype' assert.strictEqual getOwnPropertyDescriptor(Object::, d), void, 'getOwnPropertyDescriptor on Object.prototype missed symbol' assert.strictEqual keys(O).length, 2, 'Object.keys' assert.strictEqual getOwnPropertyNames(O).length, 3, 'Object.getOwnPropertyNames' assert.strictEqual getOwnPropertySymbols(O).length, 3, 'Object.getOwnPropertySymbols' assert.strictEqual core.Reflect.ownKeys(O).length, 6, 'Reflect.ownKeys' delete O[e] O[e] = \e assert.deepEqual getOwnPropertyDescriptor(O, e), {configurable: on, writable:on, enumerable: on, value: \e}, 'redefined non-enum key' test 'Symbols & Object.defineProperties' (assert)!-> {defineProperty, defineProperties} = core.Object c = core.Symbol \c d = core.Symbol \d D = { a: value: \a (c): value: \c } defineProperty D, \b, value: value: \b defineProperty D, d, value: value: \d O = defineProperties {}, D assert.strictEqual O.a, \a, \a assert.strictEqual O.b, void, \b assert.strictEqual O[c], \c, \c assert.strictEqual O[d], void, \d test 'Symbols & Object.create' (assert)!-> {defineProperty, create} = core.Object c = core.Symbol \c d = core.Symbol \d D = { a: value: \a (c): value: \c } defineProperty D, \b, value: value: \b defineProperty D, d, value: value: \d O = create null, D assert.strictEqual O.a, \a, \a assert.strictEqual O.b, void, \b assert.strictEqual O[c], \c, \c assert.strictEqual O[d], void, \d for $key in <[Map Set Promise]> let key = $key => test "#key@@species" (assert)!-> assert.strictEqual core[key][core.Symbol.species], core[key], "#key@@species === #key" C = core.Object.create core[key] assert.strictEqual C[core.Symbol.species], C, "#key sub" test "Array@@species" (assert)!-> assert.strictEqual Array[core.Symbol.species], Array, "Array@@species === Array" C = core.Object.create Array assert.strictEqual C[core.Symbol.species], C, "Array sub"core-js-2.4.1/tests/library/es6.typed.array-buffer.constructor.ls000066400000000000000000000014521274277553300250400ustar00rootroot00000000000000{module, test} = QUnit module \ES6 test \ArrayBuffer, (assert)!-> {ArrayBuffer} = core assert.same ArrayBuffer, Object(ArrayBuffer), 'is object' # in Safari 5 typeof ArrayBuffer is 'object' b = new ArrayBuffer 123 assert.same b.byteLength, 123, \length assert.throws (!-> new ArrayBuffer -1), RangeError, 'negative length' # fails in Safari assert.throws (!-> new ArrayBuffer 0.5), RangeError, 'fractional length' # fails in most engines assert.throws (!-> new ArrayBuffer!), RangeError, 'missed length' # fails in all engines, maybe bug in the spec related https://bugs.ecmascript.org/show_bug.cgi?id=4516 assert.throws (!-> new ArrayBuffer(core.Number.MAX_SAFE_INTEGER + 1)), RangeError, 'absurd length' DESCRIPTORS and assert.same ArrayBuffer[core.Symbol?species], ArrayBuffer, '@@species'core-js-2.4.1/tests/library/es6.typed.array-buffer.is-view.ls000066400000000000000000000011531274277553300240340ustar00rootroot00000000000000{module, test} = QUnit module \ES6 test 'ArrayBuffer.isView' (assert)!-> {ArrayBuffer, DataView} = core {isView} = ArrayBuffer assert.isFunction isView assert.arity isView, 1 for <[Float32Array Float64Array Int8Array Int16Array Int32Array Uint8Array Uint16Array Uint32Array Uint8ClampedArray]> if core[..] => assert.same isView(new core[..]([1])), on, "#{..} - true" assert.same isView(new DataView new ArrayBuffer 1), on, "DataView - true" assert.same isView(new ArrayBuffer 1), no, "ArrayBuffer - false" for [void null no on 0 1 '' 'qwe' {}, [], ->] assert.same isView(..), no, "#{..} - false"core-js-2.4.1/tests/library/es6.typed.array-buffer.slice.ls000066400000000000000000000013641274277553300235540ustar00rootroot00000000000000{module, test} = QUnit module \ES6 test 'ArrayBuffer#slice' (assert)!-> {ArrayBuffer} = core {slice} = ArrayBuffer assert.isFunction slice buffer = arrayToBuffer [1 2 3 4 5] assert.ok buffer instanceof ArrayBuffer, 'correct buffer' assert.ok slice(buffer) isnt buffer, 'returns new buffer' assert.ok slice(buffer) instanceof ArrayBuffer, 'correct instance' assert.arrayEqual bufferToArray(slice buffer), [1 2 3 4 5] assert.arrayEqual bufferToArray(slice buffer, 1 3), [2 3] assert.arrayEqual bufferToArray(slice buffer, 1 void), [2 3 4 5] # FF buggy here assert.arrayEqual bufferToArray(slice buffer, 1 -1), [2 3 4] assert.arrayEqual bufferToArray(slice buffer, -2 -1), [4] assert.arrayEqual bufferToArray(slice buffer, -2 -3), []core-js-2.4.1/tests/library/es6.typed.constructors.ls000066400000000000000000000237051274277553300226440ustar00rootroot00000000000000{module, test} = QUnit {keys, getOwnPropertyDescriptor, defineProperty} = core.Object module \ES6 if DESCRIPTORS {ArrayBuffer} = core for $name, $bytes of {Float32Array: 4, Float64Array: 8, Int8Array: 1, Int16Array: 2, Int32Array: 4, Uint8Array: 1, Uint16Array: 2, Uint32Array: 4, Uint8ClampedArray: 1} let name = $name, bytes = $bytes Typed = core[name] NATIVE_OR_ISNT_UINT8 = NATIVE or name isnt \Uint8Array test "#{name} constructor" !(assert)~> assert.isFunction Typed assert.same Typed.BYTES_PER_ELEMENT, bytes, "#{name}.BYTES_PER_ELEMENT" a = new Typed 4 assert.same a.BYTES_PER_ELEMENT, bytes, '#BYTES_PER_ELEMENT' assert.same a.byteOffset, 0, name + '#byteOffset, passed number' assert.same a.byteLength, 4 * bytes, '#byteLength, passed number' assert.arrayEqual a, [0 0 0 0], 'correct values, passed number' try a = new Typed '0x4' # throws in IE / Edge / FF assert.same a.byteOffset, 0, '#byteOffset, passed string' assert.same a.byteLength, 4 * bytes, '#byteLength, passed string' assert.arrayEqual a, [0 0 0 0], 'correct values, passed string' catch e => assert.same e, [0 0 0 0], 'passed string' try a = new Typed on # throws in IE / Edge / FF assert.same a.byteOffset, 0, '#byteOffset, passed boolean' assert.same a.byteLength, 1 * bytes, '#byteLength, passed boolean' assert.arrayEqual a, [0], 'correct values, passed boolean' catch e => assert.same e, [0], 'passed boolean' assert.throws (!-> new Typed), TypeError, 'throws without argument' assert.throws (!-> new Typed void), TypeError, 'throws on undefined' NATIVE_OR_ISNT_UINT8 and assert.throws (!-> new Typed 1.5), RangeError, 'throws on 1.5' NATIVE_OR_ISNT_UINT8 and assert.throws (!-> new Typed -1), RangeError, 'throws on -1' NATIVE_OR_ISNT_UINT8 and assert.throws (!-> new Typed -0), RangeError, 'throws on -0' NATIVE_OR_ISNT_UINT8 and assert.throws (!-> new Typed NaN), RangeError, 'throws on NaN' try a = new Typed null # throws in most engines assert.same a.byteOffset, 0, '#byteOffset, passed null' assert.same a.byteLength, 0, '#byteLength, passed null' assert.arrayEqual a, [], 'correct values, passed null' catch e => assert.same e, [], 'passed null' a = new Typed [1 2 3 4] assert.same a.byteOffset, 0, '#byteOffset, passed array' assert.same a.byteLength, 4 * bytes, '#byteLength, passed array' assert.arrayEqual a, [1 2 3 4], 'correct values, passed array' a = new Typed {0: 1, 1: 2, 2: 3, 3: 4, length: 4} assert.same a.byteOffset, 0, '#byteOffset, passed array-like' assert.same a.byteLength, 4 * bytes, '#byteLength, passed array-like' assert.arrayEqual a, [1 2 3 4], 'correct values, passed array-like' try a = new Typed {} # throws in IE / Edge assert.same a.byteOffset, 0, '#byteOffset, passed empty object (also array-like case)' assert.same a.byteLength, 0, '#byteLength, passed empty object (also array-like case)' assert.arrayEqual a, [], 'correct values, passed empty object (also array-like case)' catch e => assert.same e, [], 'passed empty object (also array-like case)' try a = new Typed createIterable [1 2 3 4] assert.same a.byteOffset, 0, '#byteOffset, passed iterable' assert.same a.byteLength, 4 * bytes, '#byteLength, passed iterable' assert.arrayEqual a, [1 2 3 4], 'correct values, passed iterable' catch e => assert.same e, [1 2 3 4], 'passed iterable' a = new Typed new Typed [1 2 3 4] assert.same a.byteOffset, 0, '#byteOffset, passed typed array' assert.same a.byteLength, 4 * bytes, '#byteLength, passed typed array' assert.arrayEqual a, [1 2 3 4], 'correct values, passed typed array' b = new Typed [1 2 3 4] b[Symbol?iterator] = -> createIterable([4 3 2 1])[Symbol?iterator]! a = new Typed b assert.same a.byteOffset, 0, '#byteOffset, passed typed array with custom iterator' assert.same a.byteLength, 4 * bytes, '#byteLength, passed typed array with custom iterator' # V8 bug, https://code.google.com/p/v8/issues/detail?id=4552 assert.arrayEqual a, [1 2 3 4], 'correct values, passed typed array with custom iterator' a = new Typed new ArrayBuffer(8) assert.same a.byteOffset, 0, '#byteOffset, passed buffer' assert.same a.byteLength, 8, '#byteLength, passed buffer' assert.same a.length, 8 / bytes, 'correct length, passed buffer' a = new Typed new ArrayBuffer(16), 8 assert.same a.byteOffset, 8, '#byteOffset, passed buffer and byteOffset' assert.same a.byteLength, 8, '#byteLength, passed buffer and byteOffset' assert.same a.length, 8 / bytes, 'correct length, passed buffer and byteOffset' a = new Typed new ArrayBuffer(24), 8, 8 / bytes assert.same a.byteOffset, 8, '#byteOffset, passed buffer, byteOffset and length' assert.same a.byteLength, 8, '#byteLength, passed buffer, byteOffset and length' assert.same a.length, 8 / bytes, 'correct length, passed buffer, byteOffset and length' a = new Typed new ArrayBuffer(8), void assert.same a.byteOffset, 0, '#byteOffset, passed buffer and undefined' assert.same a.byteLength, 8, '#byteLength, passed buffer and undefined' assert.same a.length, 8 / bytes, 'correct length, passed buffer and undefined' a = new Typed new ArrayBuffer(16), 8, void assert.same a.byteOffset, 8, '#byteOffset, passed buffer, byteOffset and undefined' assert.same a.byteLength, 8, '#byteLength, passed buffer, byteOffset and undefined' assert.same a.length, 8 / bytes, 'correct length, passed buffer, byteOffset and undefined' a = new Typed new ArrayBuffer(8), 8 assert.same a.byteOffset, 8, '#byteOffset, passed buffer and byteOffset with buffer length' assert.same a.byteLength, 0, '#byteLength, passed buffer and byteOffset with buffer length' assert.arrayEqual a, [], 'correct values, passed buffer and byteOffset with buffer length' assert.throws (!-> new Typed new ArrayBuffer(8), -1), RangeError, 'If offset < 0, throw a RangeError exception' # FF bug - TypeError instead of RangeError if bytes isnt 1 assert.throws (!-> new Typed new ArrayBuffer(8), 3), RangeError, 'If offset modulo elementSize ≠ 0, throw a RangeError exception' # FF bug - TypeError instead of RangeError if NATIVE if bytes isnt 1 assert.throws (!-> new Typed new ArrayBuffer 9), RangeError, 'If bufferByteLength modulo elementSize ≠ 0, throw a RangeError exception' assert.throws (!-> new Typed new ArrayBuffer(8), 16), RangeError, 'If newByteLength < 0, throw a RangeError exception' assert.throws (!-> new Typed new ArrayBuffer(24), 8, 24), RangeError, 'If offset+newByteLength > bufferByteLength, throw a RangeError exception' else # FF bug - TypeError instead of RangeError # if bytes isnt 1 # assert.throws (!-> new Typed new ArrayBuffer 9), 'If bufferByteLength modulo elementSize ≠ 0, throw a RangeError exception' # fails in Opera 12 assert.throws (!-> new Typed new ArrayBuffer(8), 16), 'If newByteLength < 0, throw a RangeError exception' assert.throws (!-> new Typed new ArrayBuffer(24), 8, 24), 'If offset+newByteLength > bufferByteLength, throw a RangeError exception' assert.throws (!-> Typed 1), TypeError, 'throws without `new`' assert.same Typed[core.Symbol?species], Typed, '@@species' test "#{name} descriptors" (assert)!-> typed = new Typed 2 # V8 ~ Chrome 44- bug - descriptor marked as configurable # WebKit bug - marked as non-writable desc = getOwnPropertyDescriptor typed, 0 base = if NATIVE => {writable: on, enumerable: on, configurable: no} else {writable: desc.writable, enumerable: on, configurable: desc.configurable} NATIVE and assert.arrayEqual [key for key of typed], <[0 1]>, 'for-in' # fails in old WebKit NATIVE and assert.arrayEqual keys(typed), <[0 1]>, 'Object.keys' # fails in old WebKit assert.deepEqual getOwnPropertyDescriptor(typed, 0), {value: 0} <<< base, 'Object.getOwnPropertyDescriptor' if NATIVE # V8 ~ Chrome 44- / WebKit bug defineProperty typed, 0, {value: 1, writable: on, enumerable: on, configurable: no} typed[0] = typed[1] = 2.5 assert.deepEqual getOwnPropertyDescriptor(typed, 0), {value: typed[1]} <<< base, 'Object.defineProperty, valid descriptor #1' defineProperty typed, 0, {value: 1} typed[0] = typed[1] = 3.5 assert.deepEqual getOwnPropertyDescriptor(typed, 0), {value: typed[1]} <<< base, 'Object.defineProperty, valid descriptor #2' NATIVE and try # fails in old WebKit ~ PhantomJS defineProperty typed, 0, {value: 2, writable: no, enumerable: on, configurable: no} assert.ok no, 'Object.defineProperty, invalid descriptor #1' catch assert.ok on, 'Object.defineProperty, invalid descriptor #1' NATIVE and try # fails in old WebKit ~ Android 4.0 defineProperty typed, 0, {value: 2, writable: on, enumerable: no, configurable: no} assert.ok no, 'Object.defineProperty, invalid descriptor #2' catch assert.ok on, 'Object.defineProperty, invalid descriptor #2' NATIVE and try # fails in V8 ~ Chrome 44- defineProperty typed, 0, {get: -> 2} assert.ok no, 'Object.defineProperty, invalid descriptor #3' catch assert.ok on, 'Object.defineProperty, invalid descriptor #3' try defineProperty typed, 0, {value: 2, get: -> 2} assert.ok no, 'Object.defineProperty, invalid descriptor #4' catch assert.ok on, 'Object.defineProperty, invalid descriptor #4'core-js-2.4.1/tests/library/es6.typed.conversions.float32.ls000066400000000000000000000062411274277553300237110ustar00rootroot00000000000000{module, test} = QUnit module \ES6 DESCRIPTORS and test 'Float32 conversions' (assert)!-> {Uint8Array, DataView} = core NAME = \Float32 ARRAY = NAME + \Array Typed = core[ARRAY] SET = \set + NAME GET = \get + NAME data = [ [0 0 [0 0 0 0]] [-0 -0 [0 0 0 128]] [1 1 [0 0 128 63]] [-1 -1 [0 0 128 191]] [1.1 1.100000023841858 [205 204 140 63]] [-1.1 -1.100000023841858 [205 204 140 191]] [1.9 1.899999976158142 [51 51 243 63]] [-1.9 -1.899999976158142 [51 51 243 191]] [127 127 [0 0 254 66]] [-127 -127 [0 0 254 194]] [128 128 [0 0 0 67]] [-128 -128 [0 0 0 195]] [255 255 [0 0 127 67]] [-255 -255 [0 0 127 195]] [255.1 255.10000610351562 [154 25 127 67]] [255.9 255.89999389648438 [102 230 127 67]] [256 256 [0 0 128 67]] [32767 32767 [0 254 255 70]] [-32767 -32767 [0 254 255 198]] [32768 32768 [0 0 0 71]] [-32768 -32768 [0 0 0 199]] [65535 65535 [0 255 127 71]] [65536 65536 [0 0 128 71]] [65537 65537 [128 0 128 71]] [65536.54321 65536.546875 [70 0 128 71]] [-65536.54321 -65536.546875 [70 0 128 199]] [2147483647 2147483648 [0 0 0 79]] [-2147483647 -2147483648 [0 0 0 207]] [2147483648 2147483648 [0 0 0 79]] [-2147483648 -2147483648 [0 0 0 207]] [2147483649 2147483648 [0 0 0 79]] [-2147483649 -2147483648 [0 0 0 207]] [4294967295 4294967296 [0 0 128 79]] [4294967296 4294967296 [0 0 128 79]] [4294967297 4294967296 [0 0 128 79]] [9007199254740991,9007199254740992,[0,0,0,90]] [-9007199254740991,-9007199254740992,[0,0,0,218]] [9007199254740992,9007199254740992,[0,0,0,90]] [-9007199254740992,-9007199254740992,[0,0,0,218]] [9007199254740994,9007199254740992,[0,0,0,90]] [-9007199254740994,-9007199254740992,[0,0,0,218]] [Infinity, Infinity, [0 0 128 127]] [-Infinity, -Infinity, [0 0 128 255]] [1.7976931348623157e+308, Infinity, [0 0 128 127]] [-1.7976931348623157e+308, -Infinity, [0 0 128 255]] [5e-324 0 [0 0 0 0]] [-5e-324 -0 [0 0 0 128]] ] typed = new Typed 1 uint8 = new Uint8Array typed.buffer view = new DataView typed.buffer viewFrom = -> new DataView new Uint8Array(it).buffer z = -> if it is 0 and 1 / it is -Infinity => '-0' else it for [value, conversion, little] in data big = little.slice!reverse! rep = if LITTLE_ENDIAN => little else big typed[0] = value assert.same typed[0], conversion, "#ARRAY #{z value} -> #{z conversion}" assert.arrayEqual uint8, rep, "#ARRAY #{z value} -> [#rep]" view[SET] 0, value assert.arrayEqual uint8, big, "view.#SET(0, #{z value}) -> [#big]" assert.same viewFrom(big)[GET](0), conversion, "view{#big}.#GET(0) -> #{z conversion}" view[SET] 0, value, no assert.arrayEqual uint8, big, "view.#SET(0, #{z value}, false) -> [#big]" assert.same viewFrom(big)[GET](0, no), conversion, "view{#big}.#GET(0, false) -> #{z conversion}" view[SET] 0, value, on assert.arrayEqual uint8, little, "view.#SET(0, #{z value}, true) -> [#little]" assert.same viewFrom(little)[GET](0, on), conversion, "view{#little}.#GET(0, true) -> #{z conversion}" typed[0] = NaN assert.same typed[0], NaN, "NaN -> NaN" core-js-2.4.1/tests/library/es6.typed.conversions.float64.ls000066400000000000000000000072161274277553300237210ustar00rootroot00000000000000{module, test} = QUnit module \ES6 DESCRIPTORS and test 'Float64 conversions' (assert)!-> {Uint8Array, DataView} = core NAME = \Float64 ARRAY = NAME + \Array Typed = core[ARRAY] SET = \set + NAME GET = \get + NAME data = [ [0,0,[0,0,0,0,0,0,0,0]] [-0,-0,[0,0,0,0,0,0,0,128]] [1,1,[0,0,0,0,0,0,240,63]] [-1,-1,[0,0,0,0,0,0,240,191]] [1.1,1.1,[154,153,153,153,153,153,241,63]] [-1.1,-1.1,[154,153,153,153,153,153,241,191]] [1.9,1.9,[102,102,102,102,102,102,254,63]] [-1.9,-1.9,[102,102,102,102,102,102,254,191]] [127,127,[0,0,0,0,0,192,95,64]] [-127,-127,[0,0,0,0,0,192,95,192]] [128,128,[0,0,0,0,0,0,96,64]] [-128,-128,[0,0,0,0,0,0,96,192]] [255,255,[0,0,0,0,0,224,111,64]] [-255,-255,[0,0,0,0,0,224,111,192]] [255.1,255.1,[51,51,51,51,51,227,111,64]] [255.9,255.9,[205,204,204,204,204,252,111,64]] [256,256,[0,0,0,0,0,0,112,64]] [32767,32767,[0,0,0,0,192,255,223,64]] [-32767,-32767,[0,0,0,0,192,255,223,192]] [32768,32768,[0,0,0,0,0,0,224,64]] [-32768,-32768,[0,0,0,0,0,0,224,192]] [65535,65535,[0,0,0,0,224,255,239,64]] [65536,65536,[0,0,0,0,0,0,240,64]] [65537,65537,[0,0,0,0,16,0,240,64]] [65536.54321,65536.54321,[14,248,252,176,8,0,240,64]] [-65536.54321,-65536.54321,[14,248,252,176,8,0,240,192]] [2147483647,2147483647,[0,0,192,255,255,255,223,65]] [-2147483647,-2147483647,[0,0,192,255,255,255,223,193]] [2147483648,2147483648,[0,0,0,0,0,0,224,65]] [-2147483648,-2147483648,[0,0,0,0,0,0,224,193]] [2147483649,2147483649,[0,0,32,0,0,0,224,65]] [-2147483649,-2147483649,[0,0,32,0,0,0,224,193]] [4294967295,4294967295,[0,0,224,255,255,255,239,65]] [4294967296,4294967296,[0,0,0,0,0,0,240,65]] [4294967297,4294967297,[0,0,16,0,0,0,240,65]] [9007199254740991,9007199254740991,[255,255,255,255,255,255,63,67]] [-9007199254740991,-9007199254740991,[255,255,255,255,255,255,63,195]] [9007199254740992,9007199254740992,[0,0,0,0,0,0,64,67]] [-9007199254740992,-9007199254740992,[0,0,0,0,0,0,64,195]] [9007199254740994,9007199254740994,[1,0,0,0,0,0,64,67]] [-9007199254740994,-9007199254740994,[1,0,0,0,0,0,64,195]] [Infinity,Infinity,[0,0,0,0,0,0,240,127]] [-Infinity,-Infinity,[0,0,0,0,0,0,240,255]] [-1.7976931348623157e+308,-1.7976931348623157e+308,[255,255,255,255,255,255,239,255]] [1.7976931348623157e+308,1.7976931348623157e+308,[255,255,255,255,255,255,239,127]] [5e-324,5e-324,[1,0,0,0,0,0,0,0]] [-5e-324,-5e-324,[1,0,0,0,0,0,0,128]] ] typed = new Typed 1 uint8 = new Uint8Array typed.buffer view = new DataView typed.buffer viewFrom = -> new DataView new Uint8Array(it).buffer z = -> if it is 0 and 1 / it is -Infinity => '-0' else it for [value, conversion, little] in data big = little.slice!reverse! rep = if LITTLE_ENDIAN => little else big typed[0] = value assert.same typed[0], conversion, "#ARRAY #{z value} -> #{z conversion}" assert.arrayEqual uint8, rep, "#ARRAY #{z value} -> [#rep]" view[SET] 0, value assert.arrayEqual uint8, big, "view.#SET(0, #{z value}) -> [#big]" assert.same viewFrom(big)[GET](0), conversion, "view{#big}.#GET(0) -> #{z conversion}" view[SET] 0, value, no assert.arrayEqual uint8, big, "view.#SET(0, #{z value}, false) -> [#big]" assert.same viewFrom(big)[GET](0, no), conversion, "view{#big}.#GET(0, false) -> #{z conversion}" view[SET] 0, value, on assert.arrayEqual uint8, little, "view.#SET(0, #{z value}, true) -> [#little]" assert.same viewFrom(little)[GET](0, on), conversion, "view{#little}.#GET(0, true) -> #{z conversion}" typed[0] = NaN assert.same typed[0], NaN, "NaN -> NaN"core-js-2.4.1/tests/library/es6.typed.conversions.int16.ls000066400000000000000000000052161274277553300234010ustar00rootroot00000000000000{module, test} = QUnit module \ES6 DESCRIPTORS and test 'Int16 conversions' (assert)!-> {Uint8Array, DataView} = core NAME = \Int16 ARRAY = NAME + \Array Typed = core[ARRAY] SET = \set + NAME GET = \get + NAME data = [ [0,0,[0,0]] [-0,0,[0,0]] [1,1,[1,0]] [-1,-1,[255,255]] [1.1,1,[1,0]] [-1.1,-1,[255,255]] [1.9,1,[1,0]] [-1.9,-1,[255,255]] [127,127,[127,0]] [-127,-127,[129,255]] [128,128,[128,0]] [-128,-128,[128,255]] [255,255,[255,0]] [-255,-255,[1,255]] [255.1,255,[255,0]] [255.9,255,[255,0]] [256,256,[0,1]] [32767,32767,[255,127]] [-32767,-32767,[1,128]] [32768,-32768,[0,128]] [-32768,-32768,[0,128]] [65535,-1,[255,255]] [65536,0,[0,0]] [65537,1,[1,0]] [65536.54321,0,[0,0]] [-65536.54321,0,[0,0]] [2147483647,-1,[255,255]] [-2147483647,1,[1,0]] [2147483648,0,[0,0]] [-2147483648,0,[0,0]] [4294967296,0,[0,0]] [9007199254740992,0,[0,0]] [-9007199254740992,0,[0,0]] [Infinity,0,[0,0]] [-Infinity,0,[0,0]] [-1.7976931348623157e+308,0,[0,0]] [1.7976931348623157e+308,0,[0,0]] [5e-324,0,[0,0]] [-5e-324,0,[0,0]] [NaN,0,[0,0]] ] # Android 4.3- bug if NATIVE or !/Android [2-4]/.test navigator?userAgent data = data.concat [ [2147483649,1,[1,0]] [-2147483649,-1,[255,255]] [4294967295,-1,[255,255]] [4294967297,1,[1,0]] [9007199254740991,-1,[255,255]] [-9007199254740991,1,[1,0]] [9007199254740994,2,[2,0]] [-9007199254740994,-2,[254,255]] ] typed = new Typed 1 uint8 = new Uint8Array typed.buffer view = new DataView typed.buffer viewFrom = -> new DataView new Uint8Array(it).buffer z = -> if it is 0 and 1 / it is -Infinity => '-0' else it for [value, conversion, little] in data big = little.slice!reverse! rep = if LITTLE_ENDIAN => little else big typed[0] = value assert.same typed[0], conversion, "#ARRAY #{z value} -> #{z conversion}" assert.arrayEqual uint8, rep, "#ARRAY #{z value} -> [#rep]" view[SET] 0, value assert.arrayEqual uint8, big, "view.#SET(0, #{z value}) -> [#big]" assert.same viewFrom(big)[GET](0), conversion, "view{#big}.#GET(0) -> #{z conversion}" view[SET] 0, value, no assert.arrayEqual uint8, big, "view.#SET(0, #{z value}, false) -> [#big]" assert.same viewFrom(big)[GET](0, no), conversion, "view{#big}.#GET(0, false) -> #{z conversion}" view[SET] 0, value, on assert.arrayEqual uint8, little, "view.#SET(0, #{z value}, true) -> [#little]" assert.same viewFrom(little)[GET](0, on), conversion, "view{#little}.#GET(0, true) -> #{z conversion}"core-js-2.4.1/tests/library/es6.typed.conversions.int32.ls000066400000000000000000000055331274277553300234010ustar00rootroot00000000000000{module, test} = QUnit module \ES6 DESCRIPTORS and test 'Int32 conversions' (assert)!-> {Uint8Array, DataView} = core NAME = \Int32 ARRAY = NAME + \Array Typed = core[ARRAY] SET = \set + NAME GET = \get + NAME data = [ [0,0,[0,0,0,0]] [-0,0,[0,0,0,0]] [1,1,[1,0,0,0]] [-1,-1,[255,255,255,255]] [1.1,1,[1,0,0,0]] [-1.1,-1,[255,255,255,255]] [1.9,1,[1,0,0,0]] [-1.9,-1,[255,255,255,255]] [127,127,[127,0,0,0]] [-127,-127,[129,255,255,255]] [128,128,[128,0,0,0]] [-128,-128,[128,255,255,255]] [255,255,[255,0,0,0]] [-255,-255,[1,255,255,255]] [255.1,255,[255,0,0,0]] [255.9,255,[255,0,0,0]] [256,256,[0,1,0,0]] [32767,32767,[255,127,0,0]] [-32767,-32767,[1,128,255,255]] [32768,32768,[0,128,0,0]] [-32768,-32768,[0,128,255,255]] [65535,65535,[255,255,0,0]] [65536,65536,[0,0,1,0]] [65537,65537,[1,0,1,0]] [65536.54321,65536,[0,0,1,0]] [-65536.54321,-65536,[0,0,255,255]] [2147483647,2147483647,[255,255,255,127]] [-2147483647,-2147483647,[1,0,0,128]] [2147483648,-2147483648,[0,0,0,128]] [-2147483648,-2147483648,[0,0,0,128]] [2147483649,-2147483647,[1,0,0,128]] [-2147483649,2147483647,[255,255,255,127]] [4294967295,-1,[255,255,255,255]] [4294967296,0,[0,0,0,0]] [4294967297,1,[1,0,0,0]] [9007199254740991,-1,[255,255,255,255]] [-9007199254740991,1,[1,0,0,0]] [9007199254740992,0,[0,0,0,0]] [-9007199254740992,0,[0,0,0,0]] [9007199254740994,2,[2,0,0,0]] [-9007199254740994,-2,[254,255,255,255]] [Infinity,0,[0,0,0,0]] [-Infinity,0,[0,0,0,0]] [-1.7976931348623157e+308,0,[0,0,0,0]] [1.7976931348623157e+308,0,[0,0,0,0]] [5e-324,0,[0,0,0,0]] [-5e-324,0,[0,0,0,0]] [NaN,0,[0,0,0,0]] ] typed = new Typed 1 uint8 = new Uint8Array typed.buffer view = new DataView typed.buffer viewFrom = -> new DataView new Uint8Array(it).buffer z = -> if it is 0 and 1 / it is -Infinity => '-0' else it for [value, conversion, little] in data big = little.slice!reverse! rep = if LITTLE_ENDIAN => little else big typed[0] = value assert.same typed[0], conversion, "#ARRAY #{z value} -> #{z conversion}" assert.arrayEqual uint8, rep, "#ARRAY #{z value} -> [#rep]" view[SET] 0, value assert.arrayEqual uint8, big, "view.#SET(0, #{z value}) -> [#big]" assert.same viewFrom(big)[GET](0), conversion, "view{#big}.#GET(0) -> #{z conversion}" view[SET] 0, value, no assert.arrayEqual uint8, big, "view.#SET(0, #{z value}, false) -> [#big]" assert.same viewFrom(big)[GET](0, no), conversion, "view{#big}.#GET(0, false) -> #{z conversion}" view[SET] 0, value, on assert.arrayEqual uint8, little, "view.#SET(0, #{z value}, true) -> [#little]" assert.same viewFrom(little)[GET](0, on), conversion, "view{#little}.#GET(0, true) -> #{z conversion}"core-js-2.4.1/tests/library/es6.typed.conversions.int8.ls000066400000000000000000000040111274277553300233120ustar00rootroot00000000000000{module, test} = QUnit module \ES6 DESCRIPTORS and test 'Int8 conversions' (assert)!-> {Uint8Array, DataView} = core NAME = \Int8 ARRAY = NAME + \Array Typed = core[ARRAY] SET = \set + NAME GET = \get + NAME data = [ [0,0,[0]] [-0,0,[0]] [1,1,[1]] [-1,-1,[255]] [1.1,1,[1]] [-1.1,-1,[255]] [1.9,1,[1]] [-1.9,-1,[255]] [127,127,[127]] [-127,-127,[129]] [128,-128,[128]] [-128,-128,[128]] [255,-1,[255]] [-255,1,[1]] [255.1,-1,[255]] [255.9,-1,[255]] [256,0,[0]] [32767,-1,[255]] [-32767,1,[1]] [32768,0,[0]] [-32768,0,[0]] [65535,-1,[255]] [65536,0,[0]] [65537,1,[1]] [65536.54321,0,[0]] [-65536.54321,0,[0]] [2147483647,-1,[255]] [-2147483647,1,[1]] [2147483648,0,[0]] [-2147483648,0,[0]] [4294967296,0,[0]] [9007199254740992,0,[0]] [-9007199254740992,0,[0]] [Infinity,0,[0]] [-Infinity,0,[0]] [-1.7976931348623157e+308,0,[0]] [1.7976931348623157e+308,0,[0]] [5e-324,0,[0]] [-5e-324,0,[0]] [NaN,0,[0]] ] # Android 4.3- bug if NATIVE or !/Android [2-4]/.test navigator?userAgent data = data.concat [ [2147483649,1,[1]] [-2147483649,-1,[255]] [4294967295,-1,[255]] [4294967297,1,[1]] [9007199254740991,-1,[255]] [-9007199254740991,1,[1]] [9007199254740994,2,[2]] [-9007199254740994,-2,[254]] ] typed = new Typed 1 uint8 = new Uint8Array typed.buffer view = new DataView typed.buffer viewFrom = -> new DataView new Uint8Array(it).buffer z = -> if it is 0 and 1 / it is -Infinity => '-0' else it for [value, conversion, little] in data typed[0] = value assert.same typed[0], conversion, "#ARRAY #{z value} -> #{z conversion}" assert.arrayEqual uint8, little, "#ARRAY #{z value} -> [#little]" view[SET] 0, value assert.arrayEqual uint8, little, "view.#SET(0, #{z value}) -> [#little]" assert.same viewFrom(little)[GET](0), conversion, "view{#little}.#GET(0) -> #{z conversion}"core-js-2.4.1/tests/library/es6.typed.conversions.uint16.ls000066400000000000000000000052531274277553300235670ustar00rootroot00000000000000{module, test} = QUnit module \ES6 DESCRIPTORS and test 'Uint16 conversions' (assert)!-> {Uint8Array, DataView} = core NAME = \Uint16 ARRAY = NAME + \Array Typed = core[ARRAY] SET = \set + NAME GET = \get + NAME data = [ [0,0,[0,0]] [-0,0,[0,0]] [1,1,[1,0]] [-1,65535,[255,255]] [1.1,1,[1,0]] [-1.1,65535,[255,255]] [1.9,1,[1,0]] [-1.9,65535,[255,255]] [127,127,[127,0]] [-127,65409,[129,255]] [128,128,[128,0]] [-128,65408,[128,255]] [255,255,[255,0]] [-255,65281,[1,255]] [255.1,255,[255,0]] [255.9,255,[255,0]] [256,256,[0,1]] [32767,32767,[255,127]] [-32767,32769,[1,128]] [32768,32768,[0,128]] [-32768,32768,[0,128]] [65535,65535,[255,255]] [65536,0,[0,0]] [65537,1,[1,0]] [65536.54321,0,[0,0]] [-65536.54321,0,[0,0]] [2147483647,65535,[255,255]] [-2147483647,1,[1,0]] [2147483648,0,[0,0]] [-2147483648,0,[0,0]] [4294967296,0,[0,0]] [9007199254740992,0,[0,0]] [-9007199254740992,0,[0,0]] [Infinity,0,[0,0]] [-Infinity,0,[0,0]] [-1.7976931348623157e+308,0,[0,0]] [1.7976931348623157e+308,0,[0,0]] [5e-324,0,[0,0]] [-5e-324,0,[0,0]] [NaN,0,[0,0]] ] # Android 4.3- bug if NATIVE or !/Android [2-4]/.test navigator?userAgent data = data.concat [ [2147483649,1,[1,0]] [-2147483649,65535,[255,255]] [4294967295,65535,[255,255]] [4294967297,1,[1,0]] [9007199254740991,65535,[255,255]] [-9007199254740991,1,[1,0]] [9007199254740994,2,[2,0]] [-9007199254740994,65534,[254,255]] ] typed = new Typed 1 uint8 = new Uint8Array typed.buffer view = new DataView typed.buffer viewFrom = -> new DataView new Uint8Array(it).buffer z = -> if it is 0 and 1 / it is -Infinity => '-0' else it for [value, conversion, little] in data big = little.slice!reverse! rep = if LITTLE_ENDIAN => little else big typed[0] = value assert.same typed[0], conversion, "#ARRAY #{z value} -> #{z conversion}" assert.arrayEqual uint8, rep, "#ARRAY #{z value} -> [#rep]" view[SET] 0, value assert.arrayEqual uint8, big, "view.#SET(0, #{z value}) -> [#big]" assert.same viewFrom(big)[GET](0), conversion, "view{#big}.#GET(0) -> #{z conversion}" view[SET] 0, value, no assert.arrayEqual uint8, big, "view.#SET(0, #{z value}, false) -> [#big]" assert.same viewFrom(big)[GET](0, no), conversion, "view{#big}.#GET(0, false) -> #{z conversion}" view[SET] 0, value, on assert.arrayEqual uint8, little, "view.#SET(0, #{z value}, true) -> [#little]" assert.same viewFrom(little)[GET](0, on), conversion, "view{#little}.#GET(0, true) -> #{z conversion}"core-js-2.4.1/tests/library/es6.typed.conversions.uint32.ls000066400000000000000000000056471274277553300235740ustar00rootroot00000000000000{module, test} = QUnit module \ES6 DESCRIPTORS and test 'Uint32 conversions' (assert)!-> {Uint8Array, DataView} = core NAME = \Uint32 ARRAY = NAME + \Array Typed = core[ARRAY] SET = \set + NAME GET = \get + NAME data = [ [0,0,[0,0,0,0]] [-0,0,[0,0,0,0]] [1,1,[1,0,0,0]] [-1,4294967295,[255,255,255,255]] [1.1,1,[1,0,0,0]] [-1.1,4294967295,[255,255,255,255]] [1.9,1,[1,0,0,0]] [-1.9,4294967295,[255,255,255,255]] [127,127,[127,0,0,0]] [-127,4294967169,[129,255,255,255]] [128,128,[128,0,0,0]] [-128,4294967168,[128,255,255,255]] [255,255,[255,0,0,0]] [-255,4294967041,[1,255,255,255]] [255.1,255,[255,0,0,0]] [255.9,255,[255,0,0,0]] [256,256,[0,1,0,0]] [32767,32767,[255,127,0,0]] [-32767,4294934529,[1,128,255,255]] [32768,32768,[0,128,0,0]] [-32768,4294934528,[0,128,255,255]] [65535,65535,[255,255,0,0]] [65536,65536,[0,0,1,0]] [65537,65537,[1,0,1,0]] [65536.54321,65536,[0,0,1,0]] [-65536.54321,4294901760,[0,0,255,255]] [2147483647,2147483647,[255,255,255,127]] [-2147483647,2147483649,[1,0,0,128]] [2147483648,2147483648,[0,0,0,128]] [-2147483648,2147483648,[0,0,0,128]] [2147483649,2147483649,[1,0,0,128]] [-2147483649,2147483647,[255,255,255,127]] [4294967295,4294967295,[255,255,255,255]] [4294967296,0,[0,0,0,0]] [4294967297,1,[1,0,0,0]] [9007199254740991,4294967295,[255,255,255,255]] [-9007199254740991,1,[1,0,0,0]] [9007199254740992,0,[0,0,0,0]] [-9007199254740992,0,[0,0,0,0]] [9007199254740994,2,[2,0,0,0]] [-9007199254740994,4294967294,[254,255,255,255]] [Infinity,0,[0,0,0,0]] [-Infinity,0,[0,0,0,0]] [-1.7976931348623157e+308,0,[0,0,0,0]] [1.7976931348623157e+308,0,[0,0,0,0]] [5e-324,0,[0,0,0,0]] [-5e-324,0,[0,0,0,0]] [NaN,0,[0,0,0,0]] ] typed = new Typed 1 uint8 = new Uint8Array typed.buffer view = new DataView typed.buffer viewFrom = -> new DataView new Uint8Array(it).buffer z = -> if it is 0 and 1 / it is -Infinity => '-0' else it for [value, conversion, little] in data big = little.slice!reverse! rep = if LITTLE_ENDIAN => little else big typed[0] = value assert.same typed[0], conversion, "#ARRAY #{z value} -> #{z conversion}" assert.arrayEqual uint8, rep, "#ARRAY #{z value} -> [#rep]" view[SET] 0, value assert.arrayEqual uint8, big, "view.#SET(0, #{z value}) -> [#big]" assert.same viewFrom(big)[GET](0), conversion, "view{#big}.#GET(0) -> #{z conversion}" view[SET] 0, value, no assert.arrayEqual uint8, big, "view.#SET(0, #{z value}, false) -> [#big]" assert.same viewFrom(big)[GET](0, no), conversion, "view{#big}.#GET(0, false) -> #{z conversion}" view[SET] 0, value, on assert.arrayEqual uint8, little, "view.#SET(0, #{z value}, true) -> [#little]" assert.same viewFrom(little)[GET](0, on), conversion, "view{#little}.#GET(0, true) -> #{z conversion}"core-js-2.4.1/tests/library/es6.typed.conversions.uint8-clamped.ls000066400000000000000000000031361274277553300251110ustar00rootroot00000000000000{module, test} = QUnit module \ES6 DESCRIPTORS and test 'Uint8Clamped conversions' (assert)!-> {Uint8Array, DataView} = core NAME = \Uint8Clamped ARRAY = NAME + \Array Typed = core[ARRAY] data = [ [0,0,[0]] [-0,0,[0]] [1,1,[1]] [-1,0,[0]] [1.1,1,[1]] [-1.1,0,[0]] [1.9,2,[2]] [-1.9,0,[0]] [127,127,[127]] [-127,0,[0]] [128,128,[128]] [-128,0,[0]] [255,255,[255]] [-255,0,[0]] [255.1,255,[255]] [255.9,255,[255]] [256,255,[255]] [32767,255,[255]] [-32767,0,[0]] [32768,255,[255]] [-32768,0,[0]] [65535,255,[255]] [65536,255,[255]] [65537,255,[255]] [65536.54321,255,[255]] [-65536.54321,0,[0]] [2147483647,255,[255]] [-2147483647,0,[0]] [2147483648,255,[255]] [-2147483648,0,[0]] [2147483649,255,[255]] [-2147483649,0,[0]] [4294967295,255,[255]] [4294967296,255,[255]] [4294967297,255,[255]] [9007199254740991,255,[255]] [-9007199254740991,0,[0]] [9007199254740992,255,[255]] [-9007199254740992,0,[0]] [9007199254740994,255,[255]] [-9007199254740994,0,[0]] [Infinity,255,[255]] [-Infinity,0,[0]] [-1.7976931348623157e+308,0,[0]] [1.7976931348623157e+308,255,[255]] [5e-324,0,[0]] [-5e-324,0,[0]] [NaN,0,[0]] ] typed = new Typed 1 uint8 = new Uint8Array typed.buffer z = -> if it is 0 and 1 / it is -Infinity => '-0' else it for [value, conversion, little] in data typed[0] = value assert.same typed[0], conversion, "#{z value} -> #{z conversion}" assert.arrayEqual uint8, little, "#{z value} -> [#little]"core-js-2.4.1/tests/library/es6.typed.conversions.uint8.ls000066400000000000000000000037571274277553300235170ustar00rootroot00000000000000{module, test} = QUnit module \ES6 DESCRIPTORS and test 'Uint8 conversions' (assert)!-> {Uint8Array, DataView} = core NAME = \Uint8 ARRAY = NAME + \Array Typed = core[ARRAY] SET = \set + NAME GET = \get + NAME data = [ [0,0,[0]] [-0,0,[0]] [1,1,[1]] [-1,255,[255]] [1.1,1,[1]] [-1.1,255,[255]] [1.9,1,[1]] [-1.9,255,[255]] [127,127,[127]] [-127,129,[129]] [128,128,[128]] [-128,128,[128]] [255,255,[255]] [-255,1,[1]] [255.1,255,[255]] [255.9,255,[255]] [256,0,[0]] [32767,255,[255]] [-32767,1,[1]] [32768,0,[0]] [-32768,0,[0]] [65535,255,[255]] [65536,0,[0]] [65537,1,[1]] [65536.54321,0,[0]] [-65536.54321,0,[0]] [2147483647,255,[255]] [-2147483647,1,[1]] [2147483648,0,[0]] [-2147483648,0,[0]] [4294967296,0,[0]] [9007199254740992,0,[0]] [-9007199254740992,0,[0]] [Infinity,0,[0]] [-Infinity,0,[0]] [-1.7976931348623157e+308,0,[0]] [1.7976931348623157e+308,0,[0]] [5e-324,0,[0]] [-5e-324,0,[0]] [NaN,0,[0]] ] # Android 4.3- bug if NATIVE or !/Android [2-4]/.test navigator?userAgent data = data.concat [ [2147483649,1,[1]] [-2147483649,255,[255]] [4294967295,255,[255]] [4294967297,1,[1]] [9007199254740991,255,[255]] [-9007199254740991,1,[1]] [9007199254740994,2,[2]] [-9007199254740994,254,[254]] ] typed = new Typed 1 view = new DataView typed.buffer viewFrom = -> new DataView new Uint8Array(it).buffer z = -> if it is 0 and 1 / it is -Infinity => '-0' else it for [value, conversion, little] in data typed[0] = value assert.same typed[0], conversion, "#ARRAY #{z value} -> #{z conversion}" assert.arrayEqual typed, little, "#ARRAY #{z value} -> [#little]" view[SET] 0, value assert.arrayEqual typed, little, "view.#SET(0, #{z value}) -> [#little]" assert.same viewFrom(little)[GET](0), conversion, "view{#little}.#GET(0) -> #{z conversion}"core-js-2.4.1/tests/library/es6.typed.data-view.ls000066400000000000000000000162421274277553300217530ustar00rootroot00000000000000{module, test} = QUnit module \ES6 {DataView, ArrayBuffer, Uint8Array} = core test \DataView (assert)!-> assert.same DataView, Object(DataView), 'is object' # in Safari 5 typeof DataView is 'object' a = new DataView new ArrayBuffer(8) assert.same a.byteOffset, 0, '#byteOffset, passed buffer' assert.same a.byteLength, 8, '#byteLength, passed buffer' a = new DataView new ArrayBuffer(16), 8 assert.same a.byteOffset, 8, '#byteOffset, passed buffer and byteOffset' assert.same a.byteLength, 8, '#byteLength, passed buffer and byteOffset' a = new DataView new ArrayBuffer(24), 8, 8 assert.same a.byteOffset, 8, '#byteOffset, passed buffer, byteOffset and length' assert.same a.byteLength, 8, '#byteLength, passed buffer, byteOffset and length' if NATIVE # fails in IE / MS Edge a = new DataView new ArrayBuffer(8), void assert.same a.byteOffset, 0, '#byteOffset, passed buffer and undefined' assert.same a.byteLength, 8, '#byteLength, passed buffer and undefined' if NATIVE # fails in IE / MS Edge a = new DataView new ArrayBuffer(16), 8, void assert.same a.byteOffset, 8, '#byteOffset, passed buffer, byteOffset and undefined' assert.same a.byteLength, 8, '#byteLength, passed buffer, byteOffset and undefined' if NATIVE # fails in IE10 a = new DataView new ArrayBuffer(8), 8 assert.same a.byteOffset, 8, '#byteOffset, passed buffer and byteOffset with buffer length' assert.same a.byteLength, 0, '#byteLength, passed buffer and byteOffset with buffer length' if NATIVE # TypeError in IE assert.throws (!-> new DataView new ArrayBuffer(8), -1), RangeError, 'If offset < 0, throw a RangeError exception' # FF bug - TypeError instead of RangeError assert.throws (!-> new DataView new ArrayBuffer(8), 16), RangeError, 'If newByteLength < 0, throw a RangeError exception' assert.throws (!-> new DataView new ArrayBuffer(24), 8, 24), RangeError, 'If offset+newByteLength > bufferByteLength, throw a RangeError exception' else assert.throws (!-> new DataView new ArrayBuffer(8), -1), 'If offset < 0, throw a RangeError exception' # FF bug - TypeError instead of RangeError assert.throws (!-> new DataView new ArrayBuffer(8), 16), 'If newByteLength < 0, throw a RangeError exception' assert.throws (!-> new DataView new ArrayBuffer(24), 8, 24), 'If offset+newByteLength > bufferByteLength, throw a RangeError exception' if NATIVE # Android ~ 4.0 assert.throws (!-> DataView 1), TypeError, 'throws without `new`' else assert.throws (!-> DataView 1), 'throws without `new`' d = new DataView new ArrayBuffer 8 d.setUint32 0, 0x12345678 assert.same d.getUint32(0), 0x12345678, 'big endian/big endian' d.setUint32 0, 0x12345678, true assert.same d.getUint32(0, true), 0x12345678, 'little endian/little endian' d.setUint32 0, 0x12345678, true assert.same d.getUint32(0), 0x78563412, 'little endian/big endian' d.setUint32 0, 0x12345678 assert.same d.getUint32(0, true), 0x78563412, 'big endian/little endian' # Chrome allows no arguments, throws if non-ArrayBuffer #assert.same(new DataView().buffer.byteLength, 0, 'no arguments'); # Safari (iOS 5) does not #assert.throws(function () { return new DataView(); }, TypeError, 'no arguments'); # Chrome throws TypeError, Safari iOS5 throws isDOMException(INDEX_SIZE_ERR) assert.throws (!-> new DataView {}), 'non-ArrayBuffer argument'; # Opera 12 throws `true` assert.ok (-> try new DataView \foo void catch => e ), 'non-ArrayBuffer argument' DESCRIPTORS and test 'DataView accessors' (assert)!-> u = new Uint8Array 8 d = new DataView u.buffer assert.arrayEqual u, [0, 0, 0, 0, 0, 0, 0, 0] d.setUint8 0, 255 assert.arrayEqual u, [0xff, 0, 0, 0, 0, 0, 0, 0] d.setInt8 1, -1 assert.arrayEqual u, [0xff, 0xff, 0, 0, 0, 0, 0, 0] d.setUint16 2, 0x1234 assert.arrayEqual u, [0xff, 0xff, 0x12, 0x34, 0, 0, 0, 0] d.setInt16 4, -1 assert.arrayEqual u, [0xff, 0xff, 0x12, 0x34, 0xff, 0xff, 0, 0] d.setUint32 1, 0x12345678 assert.arrayEqual u, [0xff, 0x12, 0x34, 0x56, 0x78, 0xff, 0, 0] d.setInt32 4, -2023406815 assert.arrayEqual u, [0xff, 0x12, 0x34, 0x56, 0x87, 0x65, 0x43, 0x21] d.setFloat32 2, 1.2e+38 assert.arrayEqual u, [0xff, 0x12, 0x7e, 0xb4, 0x8e, 0x52, 0x43, 0x21] d.setFloat64 0, -1.2345678e+301 assert.arrayEqual u, [0xfe, 0x72, 0x6f, 0x51, 0x5f, 0x61, 0x77, 0xe5] for x, i in [0x80, 0x81, 0x82, 0x83, 0x84, 0x85, 0x86, 0x87] u[i] = x assert.same d.getUint8(0), 128 assert.same d.getInt8(1), -127 assert.same d.getUint16(2), 33411 assert.same d.getInt16(3), -31868 assert.same d.getUint32(4), 2223343239 assert.same d.getInt32(2), -2105310075 assert.same d.getFloat32(2), -1.932478247535851e-37 assert.same d.getFloat64(0), -3.116851295377095e-306 DESCRIPTORS and test 'DataView endian' (assert)!-> rawbuf = new Uint8Array([0 1 2 3 4 5 6 7]).buffer d = new DataView rawbuf assert.same d.byteLength, 8, \buffer assert.same d.byteOffset, 0, \buffer assert.throws -> d.getUint8 -2 # Chrome bug for index -, DOMException, 'bounds for buffer'? assert.throws (!-> d.getUint8 8), 'bounds for buffer' assert.throws (!-> d.setUint8 -2, 0), 'bounds for buffer' assert.throws (!-> d.setUint8 8, 0), 'bounds for buffer' d = new DataView rawbuf, 2 assert.same d.byteLength, 6, 'buffer, byteOffset' assert.same d.byteOffset, 2, 'buffer, byteOffset' assert.same d.getUint8(5), 7, 'buffer, byteOffset' assert.throws (!-> d.getUint8 -2), 'bounds for buffer, byteOffset' assert.throws (!-> d.getUint8 6), 'bounds for buffer, byteOffset' assert.throws (!-> d.setUint8 -2, 0), 'bounds for buffer, byteOffset' assert.throws (!-> d.setUint8 6, 0), 'bounds for buffer, byteOffset' assert.throws (!-> new DataView rawbuf, -1), 'invalid byteOffset' assert.throws (!-> new DataView rawbuf, 9), 'invalid byteOffset' d = new DataView rawbuf, 2, 4 assert.same d.byteLength, 4, 'buffer, byteOffset, length' assert.same d.byteOffset, 2, 'buffer, byteOffset, length' assert.same d.getUint8(3), 5, 'buffer, byteOffset, length' assert.throws (!-> d.getUint8 -2), 'bounds for buffer, byteOffset, length' assert.throws (!-> d.getUint8 4), 'bounds for buffer, byteOffset, length' assert.throws (!-> d.setUint8 -2, 0), 'bounds for buffer, byteOffset, length' assert.throws (!-> d.setUint8 4, 0), 'bounds for buffer, byteOffset, length' assert.throws (!-> new DataView rawbuf, 0, 9), 'invalid byteOffset+length' assert.throws (!-> new DataView rawbuf, 8, 1), 'invalid byteOffset+length' assert.throws (!-> new DataView rawbuf, 9, -1), 'invalid byteOffset+length' for <[getUint8 getInt8 getUint16 getInt16 getUint32 getInt32 getFloat32 getFloat64]> let name = .. => test 'DataView#' + name, (assert)!-> assert.isFunction DataView::[name] NATIVE and assert.arity DataView::[name], 1 # wrong in most engines assert.same new DataView(new ArrayBuffer 8)[name](0), 0, 'returns element' for <[setUint8 setInt8 setUint16 setInt16 setUint32 setInt32 setFloat32 setFloat64]> let name = .. => test 'DataView#' + name, (assert)!-> assert.isFunction DataView::[name] NATIVE and assert.arity DataView::[name], 2 # wrong in most engines assert.same new DataView(new ArrayBuffer 8)[name](0 0), void, 'void'core-js-2.4.1/tests/library/es6.weak-map.ls000066400000000000000000000067051274277553300204530ustar00rootroot00000000000000{module, test} = QUnit module \ES6 {WeakMap, Map} = core {freeze} = core.Object {iterator} = core.Symbol test 'WeakMap' (assert)!-> assert.isFunction WeakMap assert.ok \delete of WeakMap::, 'delete in WeakMap.prototype' assert.ok \get of WeakMap::, 'get in WeakMap.prototype' assert.ok \has of WeakMap::, 'has in WeakMap.prototype' assert.ok \set of WeakMap::, 'set in WeakMap.prototype' assert.ok new WeakMap instanceof WeakMap, 'new WeakMap instanceof WeakMap' assert.strictEqual new WeakMap(createIterable [[a = {}, 42]]).get(a), 42, 'Init from iterable' assert.strictEqual new WeakMap([[f = freeze({}), 42]]).get(f), 42, 'Support frozen objects' M = new WeakMap M.set freeze(f = {}), 42 assert.strictEqual M.has(f), on, 'works with frozen objects, #1' assert.strictEqual M.get(f), 42, 'works with frozen objects, #2' M.delete f assert.strictEqual M.has(f), no, 'works with frozen objects, #3' assert.strictEqual M.get(f), void, 'works with frozen objects, #4' # return #throw done = no iter = createIterable [null, 1, 2], return: -> done := on try => new WeakMap iter assert.ok done, '.return #throw' assert.ok !(\clear of WeakMap::), 'should not contains `.clear` method' # call @@iterator in Array with custom iterator a = [] done = no a['@@iterator'] = void a[iterator] = -> done := on core.getIteratorMethod([])call @ new WeakMap a assert.ok done o = {} new WeakMap!set o, 1 if DESCRIPTORS assert.arrayEqual [key for key of o], [] assert.arrayEqual core.Object.keys(o), [] assert.arrayEqual core.Object.getOwnPropertyNames(o), [] assert.arrayEqual core.Object.getOwnPropertySymbols(o), [] assert.arrayEqual core.Reflect.ownKeys(o), [] if nativeSubclass C = nativeSubclass WeakMap assert.ok new C instanceof C, 'correct subclassing with native classes #1' assert.ok new C instanceof WeakMap, 'correct subclassing with native classes #2' assert.same new C!set(O = {}, 2).get(O), 2, 'correct subclassing with native classes #3' test 'WeakMap#delete' (assert)!-> assert.isFunction WeakMap::delete M = new WeakMap [[a = {}, 42], [b = {}, 21]] assert.ok M.has(a) && M.has(b), 'WeakMap has values before .delete()' M.delete a assert.ok !M.has(a) && M.has(b), 'WeakMap hasn`t value after .delete()' assert.ok (try !M.delete 1), 'return false on primitive' test 'WeakMap#get' (assert)!-> assert.isFunction WeakMap::get M = new WeakMap! assert.strictEqual M.get({}), void, 'WeakMap .get() before .set() return undefined' M.set a = {}, 42 assert.strictEqual M.get(a), 42, 'WeakMap .get() return value' M.delete a assert.strictEqual M.get(a), void, 'WeakMap .get() after .delete() return undefined' assert.ok (try void is M.get 1), 'return undefined on primitive' test 'WeakMap#has' (assert)!-> assert.isFunction WeakMap::has M = new WeakMap! assert.ok !M.has({}), 'WeakMap .has() before .set() return false' M.set a = {}, 42 assert.ok M.has(a), 'WeakMap .has() return true' M.delete a assert.ok !M.has(a), 'WeakMap .has() after .delete() return false' assert.ok (try !M.has 1), 'return false on primitive' test 'WeakMap#set' (assert)!-> assert.isFunction WeakMap::set assert.ok (w = new WeakMap)set(a = {}, 42) is w, 'chaining' assert.ok (try new WeakMap!set(42, 42); no; catch => on), 'throws with primitive keys' test 'WeakMap#@@toStringTag' (assert)!-> assert.strictEqual WeakMap::[core.Symbol?toStringTag], \WeakMap, 'WeakMap::@@toStringTag is `WeakMap`'core-js-2.4.1/tests/library/es6.weak-set.ls000066400000000000000000000054021274277553300204620ustar00rootroot00000000000000{module, test} = QUnit module \ES6 {WeakSet} = core {freeze} = core.Object {iterator} = core.Symbol test 'WeakSet' (assert)!-> assert.isFunction WeakSet assert.ok \add of WeakSet::, 'add in WeakSet.prototype' assert.ok \delete of WeakSet::, 'delete in WeakSet.prototype' assert.ok \has of WeakSet::, 'has in WeakSet.prototype' assert.ok new WeakSet instanceof WeakSet, 'new WeakSet instanceof WeakSet' assert.ok new WeakSet(createIterable [a = {}]).has(a), 'Init from iterable' assert.ok new WeakSet([freeze f = {}]).has(f), 'Support frozen objects' S = new WeakSet S.add freeze f = {} assert.strictEqual S.has(f), on, 'works with frozen objects, #1' S.delete f assert.strictEqual S.has(f), no, 'works with frozen objects, #2' # return #throw done = no iter = createIterable [null, 1, 2], return: -> done := on try => new WeakSet iter assert.ok done, '.return #throw' assert.ok !(\clear of WeakSet::), 'should not contains `.clear` method' # call @@iterator in Array with custom iterator a = [] done = no a['@@iterator'] = void a[iterator] = -> done := on core.getIteratorMethod([])call @ new WeakSet a assert.ok done o = {} new WeakSet!add o if DESCRIPTORS assert.arrayEqual [key for key of o], [] assert.arrayEqual core.Object.keys(o), [] assert.arrayEqual core.Object.getOwnPropertyNames(o), [] assert.arrayEqual core.Object.getOwnPropertySymbols(o), [] assert.arrayEqual core.Reflect.ownKeys(o), [] if nativeSubclass C = nativeSubclass WeakSet assert.ok new C instanceof C, 'correct subclassing with native classes #1' assert.ok new C instanceof WeakSet, 'correct subclassing with native classes #2' assert.ok new C!add(O = {}).has(O), 'correct subclassing with native classes #3' test 'WeakSet#add' (assert)!-> assert.isFunction WeakSet::add assert.ok (w = new WeakSet)add({}) is w, 'chaining' assert.ok (try new WeakSet!add(42); no; catch => on), 'throws with primitive keys' test 'WeakSet#delete' (assert)!-> assert.isFunction WeakSet::delete S = new WeakSet! .add a = {} .add b = {} assert.ok S.has(a) && S.has(b), 'WeakSet has values before .delete()' S.delete a assert.ok !S.has(a) && S.has(b), 'WeakSet has`nt value after .delete()' assert.ok (try !S.delete 1), 'return false on primitive' test 'WeakSet#has' (assert)!-> assert.isFunction WeakSet::has M = new WeakSet! assert.ok not M.has({}), 'WeakSet has`nt value' M.add a = {} assert.ok M.has(a), 'WeakSet has value after .add()' M.delete a assert.ok not M.has(a), 'WeakSet hasn`t value after .delete()' assert.ok (try !M.has 1), 'return false on primitive' test 'WeakSet::@@toStringTag' (assert)!-> assert.strictEqual WeakSet::[core.Symbol?toStringTag], \WeakSet, 'WeakSet::@@toStringTag is `WeakSet`'core-js-2.4.1/tests/library/es7.array.includes.ls000066400000000000000000000010321274277553300216610ustar00rootroot00000000000000{module, test} = QUnit module \ES7 test 'Array#includes' (assert)!-> {includes} = core.Array assert.isFunction includes arr = [1 2 3 -0 o = {}] assert.ok includes arr, 1 assert.ok includes arr, -0 assert.ok includes arr, 0 assert.ok includes arr, o assert.ok !includes arr, 4 assert.ok !includes arr, -0.5 assert.ok !includes arr, {} assert.ok includes Array(1), void assert.ok includes [NaN], NaN if STRICT assert.throws (!-> includes null, 0), TypeError assert.throws (!-> includes void, 0), TypeErrorcore-js-2.4.1/tests/library/es7.asap.ls000066400000000000000000000005611274277553300176700ustar00rootroot00000000000000{module, test} = QUnit module 'ES6' test 'asap' (assert)-> {asap} = core assert.expect 3 assert.isFunction asap assert.arity asap, 1 async = assert.async! done = no asap !-> if !done done = on assert.ok after, \works async! setTimeout (!-> if !done done = on assert.ok no, \fails async! ), 3e3 after = oncore-js-2.4.1/tests/library/es7.error.is-error.ls000066400000000000000000000003401274277553300216310ustar00rootroot00000000000000{module, test} = QUnit module \ES7 test 'Error.isError' (assert)!-> {isError} = core.Error assert.isFunction isError assert.same isError(new TypeError), on assert.same isError({}), no assert.same isError(null), nocore-js-2.4.1/tests/library/es7.math.iaddh.ls000066400000000000000000000004731274277553300207470ustar00rootroot00000000000000{module, test} = QUnit module \ES7 test 'Math.iaddh' (assert)!-> {iaddh} = core.Math assert.isFunction iaddh assert.arity iaddh, 4 assert.same iaddh(0 2 1 0), 2 assert.same iaddh(0 4 1 1), 5 assert.same iaddh(2 4 1 1), 5 assert.same iaddh(0xffffffff 4 1 1), 6 assert.same iaddh(1 4 0xffffffff 1), 6core-js-2.4.1/tests/library/es7.math.imulh.ls000066400000000000000000000004161274277553300210110ustar00rootroot00000000000000{module, test} = QUnit module \ES7 test 'Math.imulh' (assert)!-> {imulh} = core.Math assert.isFunction imulh assert.arity imulh, 2 assert.same imulh(0xffffffff 7), -1 assert.same imulh(0xfffffff 77), 4 assert.same imulh(1 7), 0 assert.same imulh(-1 7), -1core-js-2.4.1/tests/library/es7.math.isubh.ls000066400000000000000000000004731274277553300210100ustar00rootroot00000000000000{module, test} = QUnit module \ES7 test 'Math.isubh' (assert)!-> {isubh} = core.Math assert.isFunction isubh assert.arity isubh, 4 assert.same isubh(0 2 1 0), 1 assert.same isubh(0 4 1 1), 2 assert.same isubh(2 4 1 1), 3 assert.same isubh(0xffffffff 4 1 1), 3 assert.same isubh(1 4 0xffffffff 1), 2core-js-2.4.1/tests/library/es7.math.umulh.ls000066400000000000000000000004141274277553300210230ustar00rootroot00000000000000{module, test} = QUnit module \ES7 test 'Math.umulh' (assert)!-> {umulh} = core.Math assert.isFunction umulh assert.arity umulh, 2 assert.same umulh(0xffffffff 7), 6 assert.same umulh(0xfffffff 77), 4 assert.same umulh(1 7), 0 assert.same umulh(-1 7), 6core-js-2.4.1/tests/library/es7.object.define-getter.ls000066400000000000000000000010161274277553300227270ustar00rootroot00000000000000{module, test} = QUnit module \ES7 if DESCRIPTORS => test 'Object#__defineGetter__' (assert)!-> {__defineGetter__, __defineSetter__} = core.Object assert.isFunction __defineGetter__ O = {} assert.same __defineGetter__(O, \key, -> 42), void, \void assert.same O.key, 42, \works __defineSetter__ O, \key, !-> @foo = 43 O.key = 44 assert.ok (O.key is 42 and O.foo is 43), 'works with setter' if STRICT => for [null void] assert.throws (!-> __defineGetter__ .., 1 ->), TypeError, "Throws on #{..} as `this`"core-js-2.4.1/tests/library/es7.object.define-setter.ls000066400000000000000000000011161274277553300227440ustar00rootroot00000000000000{module, test} = QUnit module \ES7 if DESCRIPTORS => test 'Object#__defineSetter__' (assert)!-> {__defineSetter__, __defineGetter__} = core.Object assert.isFunction __defineSetter__ O = {} assert.same __defineSetter__(O, \key, !-> @foo = 43), void, \void O.key = 44 assert.same O.foo, 43, \works O = {} __defineSetter__ O, \key, !-> @foo = 43 __defineGetter__ O, \key, -> 42 O.key = 44 assert.ok (O.key is 42 and O.foo is 43), 'works with getter' if STRICT => for [null void] assert.throws (!-> __defineSetter__ .., 1 ->), TypeError, "Throws on #{..} as `this`"core-js-2.4.1/tests/library/es7.object.entries.ls000066400000000000000000000013701274277553300216610ustar00rootroot00000000000000{module, test} = QUnit module \ES7 test 'Object.entries' (assert)!-> {entries, create, assign} = core.Object assert.isFunction entries assert.arity entries, 1 if \name of entries => assert.name entries, \entries assert.deepEqual entries({q:1, w:2, e:3}), [[\q 1] [\w 2] [\e 3]] assert.deepEqual entries(new String \qwe), [[\0 \q] [\1 \w] [\2 \e]] assert.deepEqual entries(assign create({q:1, w:2, e:3}), {a:4, s:5, d:6}), [[\a 4] [\s 5] [\d 6]] try assert.deepEqual Function('return core.Object.entries({a: 1, get b(){delete this.c;return 2},c: 3})')!, [[\a 1], [\b 2]] try assert.deepEqual Function('return core.Object.entries({a: 1, get b(){Object.defineProperty(this, "c", {value:4,enumerable:false});return 2},c: 3})')!, [[\a 1], [\b 2]]core-js-2.4.1/tests/library/es7.object.get-own-property-descriptors.ls000066400000000000000000000012151274277553300260070ustar00rootroot00000000000000{module, test} = QUnit module \ES7 {create} = core.Object test 'Object.getOwnPropertyDescriptors' (assert)!-> {getOwnPropertyDescriptors} = core.Object assert.isFunction getOwnPropertyDescriptors O = create {q: 1}, e: value: 3 O.w = 2 s = core.Symbol \s O[s] = 4 descs = getOwnPropertyDescriptors O assert.strictEqual descs.q, void assert.deepEqual descs.w, {+enumerable, +configurable, +writable, value: 2} if DESCRIPTORS => assert.deepEqual descs.e, {-enumerable, -configurable, -writable, value: 3} else assert.deepEqual descs.e, {+enumerable, +configurable, +writable, value: 3} assert.strictEqual descs[s].value, 4core-js-2.4.1/tests/library/es7.object.lookup-getter.ls000066400000000000000000000013031274277553300230050ustar00rootroot00000000000000{module, test} = QUnit module \ES7 if DESCRIPTORS => test 'Object#__lookupGetter__' (assert)!-> {__lookupGetter__, __defineGetter__} = core.Object {create} = core.Object assert.isFunction __lookupGetter__ assert.same __lookupGetter__({}, \key), void, 'empty object' assert.same __lookupGetter__({key: 42}, \key), void, 'data descriptor' O = {} F = -> __defineGetter__ O, \key F assert.same __lookupGetter__(O, \key), F, 'own getter' assert.same __lookupGetter__((create O), \key), F, 'proto getter' assert.same __lookupGetter__((create O), \foo), void, 'empty proto' if STRICT => for [null void] assert.throws (!-> __lookupGetter__ .., 1), TypeError, "Throws on #{..} as `this`"core-js-2.4.1/tests/library/es7.object.lookup-setter.ls000066400000000000000000000013031274277553300230210ustar00rootroot00000000000000{module, test} = QUnit module \ES7 if DESCRIPTORS => test 'Object#__lookupSetter__' (assert)!-> {__lookupSetter__, __defineSetter__} = core.Object {create} = core.Object assert.isFunction __lookupSetter__ assert.same __lookupSetter__({}, \key), void, 'empty object' assert.same __lookupSetter__({key: 42}, \key), void, 'data descriptor' O = {} F = -> __defineSetter__ O, \key F assert.same __lookupSetter__(O, \key), F, 'own setter' assert.same __lookupSetter__((create O), \key), F, 'proto setter' assert.same __lookupSetter__((create O), \foo), void, 'empty proto' if STRICT => for [null void] assert.throws (!-> __lookupSetter__ .., 1), TypeError, "Throws on #{..} as `this`"core-js-2.4.1/tests/library/es7.object.values.ls000066400000000000000000000012511274277553300215050ustar00rootroot00000000000000{module, test} = QUnit module \ES7 test 'Object.values' (assert)!-> {values, create, assign} = core.Object assert.isFunction values assert.arity values, 1 if \name of values => assert.name values, \values assert.deepEqual values({q:1, w:2, e:3}), [1 2 3] assert.deepEqual values(new String \qwe), [\q \w \e] assert.deepEqual values(assign create({q:1, w:2, e:3}), {a:4, s:5, d:6}), [4 5 6] try assert.deepEqual Function('return core.Object.values({a: 1, get b(){delete this.c;return 2},c: 3})')!, [1 2] try assert.deepEqual Function('return core.Object.values({a: 1, get b(){Object.defineProperty(this, "c", {value:4,enumerable:false});return 2},c: 3})')!, [1 2]core-js-2.4.1/tests/library/es7.observable.ls000066400000000000000000000034401274277553300210670ustar00rootroot00000000000000'use strict' {module, test} = QUnit module \ES7 {Observable, Promise, Symbol} = core test \Observable (assert)!-> assert.isFunction Observable assert.arity Observable, 1 assert.throws (!-> Observable ->), 'throws w/o `new`' obsevable = new Observable (subscriptionObserver)!-> assert.same typeof subscriptionObserver, \object, 'Subscription observer is object' assert.same subscriptionObserver@@, Object {next, error, complete} = subscriptionObserver assert.isFunction next assert.isFunction error assert.isFunction complete assert.arity next, 1 assert.arity error, 1 assert.arity complete, 1 if STRICT assert.same @, (-> @)!, 'correct executor context' obsevable.subscribe({}) assert.ok obsevable instanceof Observable test 'Observable#subscribe' (assert)!-> assert.isFunction Observable::subscribe assert.arity Observable::subscribe, 1 subscription = new Observable(!->).subscribe({}) assert.same typeof subscription, \object, 'Subscription is object' assert.same subscription@@, Object assert.isFunction subscription.unsubscribe assert.arity subscription.unsubscribe, 0 test 'Observable#forEach' (assert)!-> assert.isFunction Observable::forEach assert.arity Observable::forEach, 1 assert.ok new Observable(!->).forEach(!->) instanceof Promise, 'returns Promise' test 'Observable#constructor' (assert)!-> assert.same Observable::@@, Observable test 'Observable#@@observable' (assert)!-> assert.isFunction Observable::[Symbol.observable] observable = new Observable !-> assert.same observable[Symbol.observable]!, observable test 'Observable.of' (assert)!-> assert.isFunction Observable.of assert.arity Observable.of, 0 test 'Observable.from' (assert)!-> assert.isFunction Observable.from assert.arity Observable.from, 1core-js-2.4.1/tests/library/es7.reflect.define-metadata.ls000066400000000000000000000005541274277553300234010ustar00rootroot00000000000000{module, test} = QUnit module \ES7 test 'Reflect.defineMetadata' (assert)!-> {defineMetadata} = core.Reflect assert.isFunction defineMetadata assert.arity defineMetadata, 4 assert.throws (!-> defineMetadata \key \value void void), TypeError assert.same defineMetadata(\key \value {}, void), void assert.same defineMetadata(\key \value {}, \name), voidcore-js-2.4.1/tests/library/es7.reflect.delete-metadata.ls000066400000000000000000000013051274277553300234040ustar00rootroot00000000000000{module, test} = QUnit module \ES7 test 'Reflect.deleteMetadata' (assert)!-> {defineMetadata, hasOwnMetadata, deleteMetadata} = core.Reflect {create} = core.Object assert.isFunction deleteMetadata assert.arity deleteMetadata, 2 assert.throws (!-> deleteMetadata \key void void), TypeError assert.same deleteMetadata(\key {}, void), no obj = {} defineMetadata \key \value obj, void assert.same deleteMetadata(\key obj, void), on prototype = {} defineMetadata \key \value prototype, void assert.same deleteMetadata(\key create(prototype), void), no obj = {} defineMetadata \key \value obj, void deleteMetadata \key obj, void assert.same hasOwnMetadata("key", obj, undefined), nocore-js-2.4.1/tests/library/es7.reflect.get-metadata-keys.ls000066400000000000000000000035601274277553300236770ustar00rootroot00000000000000{module, test} = QUnit module \ES7 test 'Reflect.getMetadataKeys' (assert)!-> {defineMetadata, getMetadataKeys} = core.Reflect {create} = core.Object assert.isFunction getMetadataKeys assert.arity getMetadataKeys, 1 assert.throws (!-> getMetadataKeys void void), TypeError assert.deepEqual getMetadataKeys({}, void), [] obj = {} defineMetadata \key \value obj, void assert.deepEqual getMetadataKeys(obj, void), <[key]> prototype = {}; obj = create prototype defineMetadata \key \value prototype, void assert.deepEqual getMetadataKeys(obj, void), <[key]> obj = {} defineMetadata \key0 \value obj, void defineMetadata \key1 \value obj, void assert.deepEqual getMetadataKeys(obj, void), <[key0 key1]> obj = {} defineMetadata \key0 \value obj, void defineMetadata \key1 \value obj, void defineMetadata \key0 \value obj, void assert.deepEqual getMetadataKeys(obj, void), <[key0 key1]> prototype = {} defineMetadata \key2 \value prototype, void obj = create prototype defineMetadata \key0 \value obj, void defineMetadata \key1 \value obj, void assert.deepEqual getMetadataKeys(obj, void), <[key0 key1 key2]> obj = {} assert.deepEqual getMetadataKeys({}, \name), [] obj = {} defineMetadata \key \value obj, \name assert.deepEqual getMetadataKeys(obj, \name), <[key]> prototype = {} obj = create prototype defineMetadata \key \value prototype, \name assert.deepEqual getMetadataKeys(obj, \name), <[key]> obj = {} defineMetadata \key0 \value obj, \name defineMetadata \key1 \value obj, \name defineMetadata \key0 \value obj, \name assert.deepEqual getMetadataKeys(obj, \name), <[key0 key1]> prototype = {} defineMetadata \key2 \value prototype, \name obj = create prototype defineMetadata \key0 \value obj, \name defineMetadata \key1 \value obj, \name assert.deepEqual getMetadataKeys(obj, \name), <[key0 key1 key2]>core-js-2.4.1/tests/library/es7.reflect.get-metadata.ls000066400000000000000000000015111274277553300227200ustar00rootroot00000000000000{module, test} = QUnit module \ES7 test 'Reflect.getMetadata' (assert)!-> {defineMetadata, getMetadata} = core.Reflect {create} = core.Object assert.isFunction getMetadata assert.arity getMetadata, 2 assert.throws (!-> getMetadata \key void void), TypeError assert.same getMetadata(\key {}, void), void obj = {} defineMetadata \key \value obj, void assert.same getMetadata(\key obj, void), \value prototype = {} obj = create prototype defineMetadata \key \value prototype, void assert.same getMetadata(\key obj, void), \value assert.same getMetadata(\key {}, \name), void obj = {} defineMetadata \key \value obj, \name assert.same getMetadata(\key obj, \name), \value prototype = {} obj = create prototype defineMetadata \key \value prototype, \name assert.same getMetadata(\key obj, \name), \valuecore-js-2.4.1/tests/library/es7.reflect.get-own-matadata.ls000066400000000000000000000015461274277553300235250ustar00rootroot00000000000000{module, test} = QUnit module \ES7 test 'Reflect.getOwnMetadata' (assert)!-> {defineMetadata, getOwnMetadata} = core.Reflect {create} = core.Object assert.isFunction getOwnMetadata assert.arity getOwnMetadata, 2 assert.throws (!-> getOwnMetadata \key void void), TypeError assert.same getOwnMetadata(\key {}, void), void obj = {} defineMetadata \key \value obj, void assert.same getOwnMetadata(\key obj, void), \value prototype = {} obj = create prototype defineMetadata \key \value prototype, void assert.same getOwnMetadata(\key obj, void), void assert.same getOwnMetadata(\key {}, \name), void obj = {} defineMetadata \key \value obj, \name assert.same getOwnMetadata(\key obj, \name), \value prototype = {} obj = create prototype defineMetadata \key \value prototype, \name assert.same getOwnMetadata(\key obj, \name), voidcore-js-2.4.1/tests/library/es7.reflect.get-own-metadata-keys.ls000066400000000000000000000036141274277553300245000ustar00rootroot00000000000000{module, test} = QUnit module \ES7 test 'Reflect.getOwnMetadataKeys' (assert)!-> {defineMetadata, getOwnMetadataKeys} = core.Reflect {create} = core.Object assert.isFunction getOwnMetadataKeys assert.arity getOwnMetadataKeys, 1 assert.throws (!-> getOwnMetadataKeys void void), TypeError assert.deepEqual getOwnMetadataKeys({}, void), [] obj = {} defineMetadata \key \value obj, void assert.deepEqual getOwnMetadataKeys(obj, void), <[key]> prototype = {}; obj = create prototype defineMetadata \key \value prototype, void assert.deepEqual getOwnMetadataKeys(obj, void), [] obj = {} defineMetadata \key0 \value obj, void defineMetadata \key1 \value obj, void assert.deepEqual getOwnMetadataKeys(obj, void), <[key0 key1]> obj = {} defineMetadata \key0 \value obj, void defineMetadata \key1 \value obj, void defineMetadata \key0 \value obj, void assert.deepEqual getOwnMetadataKeys(obj, void), <[key0 key1]> prototype = {} defineMetadata \key2 \value prototype, void obj = create prototype defineMetadata \key0 \value obj, void defineMetadata \key1 \value obj, void assert.deepEqual getOwnMetadataKeys(obj, void), <[key0 key1]> obj = {} assert.deepEqual getOwnMetadataKeys({}, \name), [] obj = {} defineMetadata \key \value obj, \name assert.deepEqual getOwnMetadataKeys(obj, \name), <[key]> prototype = {} obj = create prototype defineMetadata \key \value prototype, \name assert.deepEqual getOwnMetadataKeys(obj, \name), [] obj = {} defineMetadata \key0 \value obj, \name defineMetadata \key1 \value obj, \name defineMetadata \key0 \value obj, \name assert.deepEqual getOwnMetadataKeys(obj, \name), <[key0 key1]> prototype = {} defineMetadata \key2 \value prototype, \name obj = create prototype defineMetadata \key0 \value obj, \name defineMetadata \key1 \value obj, \name assert.deepEqual getOwnMetadataKeys(obj, \name), <[key0 key1]>core-js-2.4.1/tests/library/es7.reflect.has-metadata.ls000066400000000000000000000014651274277553300227240ustar00rootroot00000000000000{module, test} = QUnit module \ES7 test 'Reflect.hasMetadata' (assert)!-> {defineMetadata, hasMetadata} = core.Reflect {create} = core.Object assert.isFunction hasMetadata assert.arity hasMetadata, 2 assert.throws (!-> hasMetadata \key void void), TypeError assert.same hasMetadata(\key {}, void), no obj = {} defineMetadata \key \value obj, void assert.same hasMetadata(\key obj, void), on prototype = {} obj = create prototype defineMetadata \key \value prototype, void assert.same hasMetadata(\key obj, void), on assert.same hasMetadata(\key {}, \name), no obj = {} defineMetadata \key \value obj, \name assert.same hasMetadata(\key obj, \name), on prototype = {} obj = create prototype defineMetadata \key \value prototype, \name assert.same hasMetadata(\key obj, \name), oncore-js-2.4.1/tests/library/es7.reflect.has-own-metadata.ls000066400000000000000000000015261274277553300235230ustar00rootroot00000000000000{module, test} = QUnit module \ES7 test 'Reflect.hasOwnMetadata' (assert)!-> {defineMetadata, hasOwnMetadata} = core.Reflect {create} = core.Object assert.isFunction hasOwnMetadata assert.arity hasOwnMetadata, 2 assert.throws (!-> hasOwnMetadata \key void void), TypeError assert.same hasOwnMetadata(\key {}, void), no obj = {} defineMetadata \key \value obj, void assert.same hasOwnMetadata(\key obj, void), on prototype = {} obj = create prototype defineMetadata \key \value prototype, void assert.same hasOwnMetadata(\key obj, void), no assert.same hasOwnMetadata(\key {}, \name), no obj = {} defineMetadata \key \value obj, \name assert.same hasOwnMetadata(\key obj, \name), on prototype = {} obj = create prototype defineMetadata \key \value prototype, \name assert.same hasOwnMetadata(\key obj, \name), nocore-js-2.4.1/tests/library/es7.reflect.metadata.ls000066400000000000000000000010241274277553300221420ustar00rootroot00000000000000{module, test} = QUnit module \ES7 test 'Reflect.metadata' (assert)!-> {metadata, hasOwnMetadata} = core.Reflect assert.isFunction metadata assert.arity metadata, 2 assert.isFunction metadata \key \value decorator = metadata \key \value assert.throws (!-> decorator void \name), TypeError assert.throws (!-> decorator {}, void), TypeError target = !-> decorator target assert.same hasOwnMetadata(\key target, void), on target = {} decorator target, \name assert.same hasOwnMetadata(\key target, \name), oncore-js-2.4.1/tests/library/es7.string.at.ls000066400000000000000000000104161274277553300206550ustar00rootroot00000000000000{module, test} = QUnit module \ES7 test 'String#at' (assert)!-> {at} = core.String assert.isFunction at # Tests from https://github.com/mathiasbynens/String.prototype.at/blob/master/tests/tests.js # String that starts with a BMP symbol assert.strictEqual at('abc\uD834\uDF06def', -Infinity), '' assert.strictEqual at('abc\uD834\uDF06def' -1), '' assert.strictEqual at('abc\uD834\uDF06def' -0), \a assert.strictEqual at('abc\uD834\uDF06def' +0), \a assert.strictEqual at('abc\uD834\uDF06def' 1), \b assert.strictEqual at('abc\uD834\uDF06def' 3), '\uD834\uDF06' assert.strictEqual at('abc\uD834\uDF06def' 4), '\uDF06' assert.strictEqual at('abc\uD834\uDF06def' 5), \d assert.strictEqual at('abc\uD834\uDF06def' 42), '' assert.strictEqual at('abc\uD834\uDF06def' Infinity), '' assert.strictEqual at('abc\uD834\uDF06def' null), \a assert.strictEqual at('abc\uD834\uDF06def' void), \a assert.strictEqual at('abc\uD834\uDF06def'), \a assert.strictEqual at('abc\uD834\uDF06def' no), \a assert.strictEqual at('abc\uD834\uDF06def' NaN), \a assert.strictEqual at('abc\uD834\uDF06def' ''), \a assert.strictEqual at('abc\uD834\uDF06def' \_), \a assert.strictEqual at('abc\uD834\uDF06def' \1), \b assert.strictEqual at('abc\uD834\uDF06def', []), \a assert.strictEqual at('abc\uD834\uDF06def', {}), \a assert.strictEqual at('abc\uD834\uDF06def' -0.9), \a assert.strictEqual at('abc\uD834\uDF06def' 1.9), \b assert.strictEqual at('abc\uD834\uDF06def' 7.9), \f assert.strictEqual at('abc\uD834\uDF06def' 2 ** 32), '' # String that starts with an astral symbol assert.strictEqual at('\uD834\uDF06def', -Infinity), '' assert.strictEqual at('\uD834\uDF06def' -1), '' assert.strictEqual at('\uD834\uDF06def' -0), '\uD834\uDF06' assert.strictEqual at('\uD834\uDF06def' 0), '\uD834\uDF06' assert.strictEqual at('\uD834\uDF06def' 1), '\uDF06' assert.strictEqual at('\uD834\uDF06def' 2), 'd' assert.strictEqual at('\uD834\uDF06def' 3), 'e' assert.strictEqual at('\uD834\uDF06def' 4), 'f' assert.strictEqual at('\uD834\uDF06def' 42), '' assert.strictEqual at('\uD834\uDF06def' Infinity), '' assert.strictEqual at('\uD834\uDF06def' null), '\uD834\uDF06' assert.strictEqual at('\uD834\uDF06def' void), '\uD834\uDF06' assert.strictEqual at('\uD834\uDF06def' ), '\uD834\uDF06' assert.strictEqual at('\uD834\uDF06def' no), '\uD834\uDF06' assert.strictEqual at('\uD834\uDF06def' NaN), '\uD834\uDF06' assert.strictEqual at('\uD834\uDF06def' ''), '\uD834\uDF06' assert.strictEqual at('\uD834\uDF06def' \_), '\uD834\uDF06' assert.strictEqual at('\uD834\uDF06def' \1), '\uDF06' # Lone high surrogates assert.strictEqual at('\uD834abc', -Infinity), '' assert.strictEqual at('\uD834abc' -1), '' assert.strictEqual at('\uD834abc' -0), '\uD834' assert.strictEqual at('\uD834abc' 0), '\uD834' assert.strictEqual at('\uD834abc' 1), \a assert.strictEqual at('\uD834abc' 42), '' assert.strictEqual at('\uD834abc' Infinity), '' assert.strictEqual at('\uD834abc' null), '\uD834' assert.strictEqual at('\uD834abc' void), '\uD834' assert.strictEqual at('\uD834abc'), '\uD834' assert.strictEqual at('\uD834abc' no), '\uD834' assert.strictEqual at('\uD834abc' NaN), '\uD834' assert.strictEqual at('\uD834abc' ''), '\uD834' assert.strictEqual at('\uD834abc' \_), '\uD834' assert.strictEqual at('\uD834abc' \1), \a # Lone low surrogates assert.strictEqual at('\uDF06abc', -Infinity), '' assert.strictEqual at('\uDF06abc' -1), '' assert.strictEqual at('\uDF06abc' -0), '\uDF06' assert.strictEqual at('\uDF06abc' 0), '\uDF06' assert.strictEqual at('\uDF06abc' 1), \a assert.strictEqual at('\uDF06abc' 42), '' assert.strictEqual at('\uDF06abc' Infinity), '' assert.strictEqual at('\uDF06abc' null), '\uDF06' assert.strictEqual at('\uDF06abc' void), '\uDF06' assert.strictEqual at('\uDF06abc'), '\uDF06' assert.strictEqual at('\uDF06abc' no), '\uDF06' assert.strictEqual at('\uDF06abc' NaN), '\uDF06' assert.strictEqual at('\uDF06abc' ''), '\uDF06' assert.strictEqual at('\uDF06abc' \_), '\uDF06' assert.strictEqual at('\uDF06abc' \1), \a assert.strictEqual at(42 0), \4 assert.strictEqual at(42 1), \2 assert.strictEqual at({toString: -> \abc}, 2), \c if STRICT assert.throws (!-> at null, 0), TypeError assert.throws (!-> at void, 0), TypeErrorcore-js-2.4.1/tests/library/es7.string.match-all.ls000066400000000000000000000024271274277553300221160ustar00rootroot00000000000000{module, test} = QUnit module \ES7 test 'String#matchAll' (assert)!-> {matchAll} = core.String {assign} = core.Object assert.isFunction matchAll for [\aabc {toString: -> \aabc}] iter = matchAll .., /[ac]/ assert.isIterator iter assert.isIterable iter assert.deepEqual iter.next!, {value: assign(<[a]> {input: \aabc, index: 0}), done: no} assert.deepEqual iter.next!, {value: assign(<[a]> {input: \aabc, index: 1}), done: no} assert.deepEqual iter.next!, {value: assign(<[c]> {input: \aabc, index: 3}), done: no} assert.deepEqual iter.next!, {value: null, done: on} iter = matchAll \1111a2b3cccc /(\d)(\D)/ assert.isIterator iter assert.isIterable iter assert.deepEqual iter.next!, {value: assign(<[1a 1 a]> {input: \1111a2b3cccc, index: 3}), done: no} assert.deepEqual iter.next!, {value: assign(<[2b 2 b]> {input: \1111a2b3cccc, index: 5}), done: no} assert.deepEqual iter.next!, {value: assign(<[3c 3 c]> {input: \1111a2b3cccc, index: 7}), done: no} assert.deepEqual iter.next!, {value: null, done: on} for [null void \qwe NaN, 42 new Date!, {} []] assert.throws (!-> matchAll '' ..), TypeError, "Throws on #{..} as first arguments" if STRICT => for [null void] assert.throws (!-> matchAll .., /./), TypeError, "Throws on #{..} as `this`"core-js-2.4.1/tests/library/es7.string.pad-end.ls000066400000000000000000000010341274277553300215550ustar00rootroot00000000000000{module, test} = QUnit module \ES7 test 'String#padEnd' (assert)!-> {padEnd} = core.String assert.isFunction padEnd assert.strictEqual padEnd(\abc 5), 'abc ' assert.strictEqual padEnd(\abc 4 \de), 'abcd' assert.strictEqual padEnd(\abc), \abc assert.strictEqual padEnd(\abc 5 '_'), 'abc__' assert.strictEqual padEnd('', 0), '' assert.strictEqual padEnd(\foo 1), \foo assert.strictEqual padEnd(\foo 5 ''), \foo if STRICT assert.throws (!-> padEnd null, 0), TypeError assert.throws (!-> padEnd void, 0), TypeErrorcore-js-2.4.1/tests/library/es7.string.pad-start.ls000066400000000000000000000010631274277553300221460ustar00rootroot00000000000000{module, test} = QUnit module \ES7 test 'String#padStart' (assert)!-> {padStart} = core.String assert.isFunction padStart assert.strictEqual padStart(\abc 5), ' abc' assert.strictEqual padStart(\abc 4 \de), \dabc assert.strictEqual padStart(\abc), \abc assert.strictEqual padStart(\abc 5 '_'), '__abc' assert.strictEqual padStart('' 0), '' assert.strictEqual padStart(\foo 1), \foo assert.strictEqual padStart(\foo 5 ''), \foo if STRICT assert.throws (!-> padStart null, 0), TypeError assert.throws (!-> padStart void, 0), TypeErrorcore-js-2.4.1/tests/library/es7.string.trim-left.ls000066400000000000000000000024001274277553300221460ustar00rootroot00000000000000{module, test} = QUnit module \ES7 test 'String#trimLeft' (assert)!-> {trimLeft} = core.String assert.isFunction trimLeft assert.strictEqual trimLeft(' \n q w e \n '), 'q w e \n ', 'removes whitespaces at left side of string' assert.strictEqual trimLeft('\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u180E\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF'), '', 'removes all whitespaces' assert.strictEqual trimLeft('\u200b\u0085'), '\u200b\u0085', "shouldn't remove this symbols" if STRICT assert.throws (!-> trimLeft null, 0), TypeError assert.throws (!-> trimLeft void, 0), TypeError test 'String#trimStart' (assert)!-> {trimStart} = core.String assert.isFunction trimStart assert.strictEqual trimStart(' \n q w e \n '), 'q w e \n ', 'removes whitespaces at left side of string' assert.strictEqual trimStart('\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u180E\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF'), '', 'removes all whitespaces' assert.strictEqual trimStart('\u200b\u0085'), '\u200b\u0085', "shouldn't remove this symbols" if STRICT assert.throws (!-> trimStart null, 0), TypeError assert.throws (!-> trimStart void, 0), TypeErrorcore-js-2.4.1/tests/library/es7.string.trim-right.ls000066400000000000000000000023721274277553300223410ustar00rootroot00000000000000{module, test} = QUnit module \ES7 test 'String#trimRight' (assert)!-> {trimRight} = core.String assert.isFunction trimRight assert.strictEqual trimRight(' \n q w e \n '), ' \n q w e', 'removes whitespaces at right side of string' assert.strictEqual trimRight('\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u180E\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF'), '', 'removes all whitespaces' assert.strictEqual trimRight('\u200b\u0085'), '\u200b\u0085', "shouldn't remove this symbols" if STRICT assert.throws (!-> trimRight null, 0), TypeError assert.throws (!-> trimRight void, 0), TypeError test 'String#trimEnd' (assert)!-> {trimEnd} = core.String assert.isFunction trimEnd assert.strictEqual trimEnd(' \n q w e \n '), ' \n q w e', 'removes whitespaces at right side of string' assert.strictEqual trimEnd('\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u180E\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF'), '', 'removes all whitespaces' assert.strictEqual trimEnd('\u200b\u0085'), '\u200b\u0085', "shouldn't remove this symbols" if STRICT assert.throws (!-> trimEnd null, 0), TypeError assert.throws (!-> trimEnd void, 0), TypeErrorcore-js-2.4.1/tests/library/es7.symbol.async-iterator.ls000066400000000000000000000004011274277553300232050ustar00rootroot00000000000000{module, test} = QUnit module \ES7 test 'Symbol.asyncIterator' (assert)!-> {Symbol} = core assert.ok \asyncIterator of Symbol, "Symbol.asyncIterator available" assert.ok Object(Symbol.asyncIterator) instanceof Symbol, "Symbol.asyncIterator is symbol"core-js-2.4.1/tests/library/es7.symbol.observable.ls000066400000000000000000000003621274277553300223730ustar00rootroot00000000000000{module, test} = QUnit module \ES7 test 'Symbol.observable' (assert)!-> {Symbol} = core assert.ok \observable of Symbol, "Symbol.observable available" assert.ok Object(Symbol.observable) instanceof Symbol, "Symbol.observable is symbol"core-js-2.4.1/tests/library/es7.system.global.ls000066400000000000000000000003101274277553300215170ustar00rootroot00000000000000{module, test} = QUnit module \ES7 test 'System.global' (assert)!-> global = core.System.global assert.same global, Object(global), 'is object' assert.same global.Math, Math, 'contains globals'core-js-2.4.1/tests/library/web.dom.iterable.ls000066400000000000000000000012661274277553300213730ustar00rootroot00000000000000{module, test} = QUnit module 'Web' test 'Iterable DOM collections' (assert)!-> absent = on; for <[NodeList DOMTokenList MediaList StyleSheetList CSSRuleList]> Collection = global[..] if Collection assert.same Collection::[core.Symbol.toStringTag], .., "#{..}::@@toStringTag is '#{..}'" assert.isFunction core.getIteratorMethod(Collection::), "#{..}::@@iterator is function" absent = no if NodeList? and document?querySelectorAll and document.querySelectorAll(\div) instanceof NodeList assert.isFunction core.getIteratorMethod(document.querySelectorAll(\div)), 'works with document.querySelectorAll' if absent => assert.ok on, 'DOM collections are absent'core-js-2.4.1/tests/library/web.immediate.ls000066400000000000000000000025111274277553300207560ustar00rootroot00000000000000{module, test} = QUnit module 'Web' timeLimitedPromise = (time, fn)-> Promise.race [new Promise(fn), new Promise (res, rej)-> setTimeout rej, time] {setImmediate, clearImmediate, Promise} = core test 'setImmediate / clearImmediate' (assert)!-> assert.expect 6 assert.isFunction setImmediate, 'setImmediate is function' assert.isFunction clearImmediate, 'clearImmediate is function' var def timeLimitedPromise(1e3, (res)!-> setImmediate !-> def := \a res! ) .then !-> assert.ok on 'setImmediate works' .catch !-> assert.ok no 'setImmediate works' .then assert.async! assert.strictEqual def, void, 'setImmediate is async' timeLimitedPromise(1e3, (res)!-> setImmediate(((a, b)!-> res a + b), \a \b)) .then !-> assert.strictEqual it, \ab, 'setImmediate works with additional args' .catch !-> assert.ok no 'setImmediate works with additional args' .then assert.async! timeLimitedPromise(50, (res)!-> clearImmediate setImmediate res) .then !-> assert.ok no 'clearImmediate works' .catch !-> assert.ok on 'clearImmediate works' .then assert.async! (!-> if window? => window.onload = it else it!) <| !-> setTimeout _, 5e3 <| !-> x = 0 now = +new Date do inc = !-> setImmediate !-> x := x + 1 if +new Date! - now < 5e3 => inc! else console?log "setImmediate: #{x / 5} per second"core-js-2.4.1/tests/library/web.timers.ls000066400000000000000000000023401274277553300203230ustar00rootroot00000000000000{module, test} = QUnit module 'Web' {setTimeout, setInterval, Promise} = core timeLimitedPromise = (time, fn)-> Promise.race [new Promise(fn), new Promise (res, rej)-> setTimeout rej, time] test 'setTimeout / clearTimeout' (assert)!-> assert.expect 2 timeLimitedPromise(1e3, (res)-> setTimeout(((a, b)-> res a + b), 10 \a \b)) .then -> assert.strictEqual it, \ab, 'setTimeout works with additional args' .catch -> assert.ok no 'setTimeout works with additional args' .then assert.async! timeLimitedPromise(50, (res)-> clearTimeout setTimeout res, 10) .then -> assert.ok no 'clearImmediate works with wraped setTimeout' .catch -> assert.ok on 'clearImmediate works with wraped setTimeout' .then assert.async! test 'setInterval / clearInterval' (assert)!-> assert.expect 1 i = 0 timeLimitedPromise(1e4, (res, rej)-> interval = setInterval(((a, b)-> if a + b isnt \ab or i > 2 => rej {a, b, i} if i++ is 2 clearInterval interval setTimeout res, 30 ), 5 \a \b)) .then -> assert.ok on 'setInterval & clearInterval works with additional args' .catch ({a, b, i} = {})-> assert.ok no "setInterval & clearInterval works with additional args: #a, #b, times: #i" .then assert.async!core-js-2.4.1/tests/native.html000066400000000000000000000006321274277553300164160ustar00rootroot00000000000000 Core
core-js-2.4.1/tests/observables/000077500000000000000000000000001274277553300165505ustar00rootroot00000000000000core-js-2.4.1/tests/observables/adapter-library.js000066400000000000000000000003461274277553300221730ustar00rootroot00000000000000delete global.Observable; var core = require('../../library'); require('../../library/modules/es7.observable'); global.Promise = core.Promise; global.Symbol = core.Symbol; require('es-observable-tests').runTests(core.Observable);core-js-2.4.1/tests/observables/adapter.js000066400000000000000000000002161274277553300205250ustar00rootroot00000000000000delete global.Observable; require('../../shim'); require('../../modules/es7.observable'); require('es-observable-tests').runTests(Observable);core-js-2.4.1/tests/promises-aplus-native.html000066400000000000000000000017651274277553300214070ustar00rootroot00000000000000 Promises/A+ Tests, Against Your Browser!
core-js-2.4.1/tests/promises-aplus.html000066400000000000000000000020431274277553300201110ustar00rootroot00000000000000 Promises/A+ Tests, Against Your Browser!
core-js-2.4.1/tests/promises-aplus/000077500000000000000000000000001274277553300172245ustar00rootroot00000000000000core-js-2.4.1/tests/promises-aplus/adapter.js000066400000000000000000000011231274277553300211770ustar00rootroot00000000000000delete global.Promise; var Promise = require('../../shim.js').Promise; var assert = require('assert') module.exports = { deferred: function(){ var o = {}; o.promise = new Promise(function(resolve,reject){ o.resolve = resolve; o.reject = reject; }); return o; }, resolved: function(val){ return Promise.resolve(val); }, rejected: function(reason){ return Promise.reject(reason); }, defineGlobalPromise: function(global){ global.Promise = Promise; global.assert = assert; }, removeGlobalPromise: function(){ delete global.Promise; } };core-js-2.4.1/tests/promises-aplus/bundle.js000066400000000000000000027231761274277553300210550ustar00rootroot00000000000000;(function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);throw new Error("Cannot find module '"+o+"'")}var f=n[o]={exports:{}};t[o][0].call(f.exports,function(e){var n=t[o][1][e];return s(n?n:e)},f,f.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o i; ++i) { if (array.hasOwnProperty(i)) { if (isValueSet) { value = callback(value, array[i], i, array); } else { value = array[i]; isValueSet = true; } } } return value; }; // String.prototype.substr - negative index don't work in IE8 if ('ab'.substr(-1) !== 'b') { exports.substr = function (str, start, length) { // did we get a negative start, calculate how much it is from the beginning of the string if (start < 0) start = str.length + start; // call the original function return str.substr(start, length); }; } else { exports.substr = function (str, start, length) { return str.substr(start, length); }; } // String.prototype.trim is supported in IE9 exports.trim = function (str) { if (str.trim) return str.trim(); return str.replace(/^\s+|\s+$/g, ''); }; // Function.prototype.bind is supported in IE9 exports.bind = function () { var args = Array.prototype.slice.call(arguments); var fn = args.shift(); if (fn.bind) return fn.bind.apply(fn, args); var self = args.shift(); return function () { fn.apply(self, args.concat([Array.prototype.slice.call(arguments)])); }; }; // Object.create is supported in IE9 function create(prototype, properties) { var object; if (prototype === null) { object = { '__proto__' : null }; } else { if (typeof prototype !== 'object') { throw new TypeError( 'typeof prototype[' + (typeof prototype) + '] != \'object\'' ); } var Type = function () {}; Type.prototype = prototype; object = new Type(); object.__proto__ = prototype; } if (typeof properties !== 'undefined' && Object.defineProperties) { Object.defineProperties(object, properties); } return object; } exports.create = typeof Object.create === 'function' ? Object.create : create; // Object.keys and Object.getOwnPropertyNames is supported in IE9 however // they do show a description and number property on Error objects function notObject(object) { return ((typeof object != "object" && typeof object != "function") || object === null); } function keysShim(object) { if (notObject(object)) { throw new TypeError("Object.keys called on a non-object"); } var result = []; for (var name in object) { if (hasOwnProperty.call(object, name)) { result.push(name); } } return result; } // getOwnPropertyNames is almost the same as Object.keys one key feature // is that it returns hidden properties, since that can't be implemented, // this feature gets reduced so it just shows the length property on arrays function propertyShim(object) { if (notObject(object)) { throw new TypeError("Object.getOwnPropertyNames called on a non-object"); } var result = keysShim(object); if (exports.isArray(object) && exports.indexOf(object, 'length') === -1) { result.push('length'); } return result; } var keys = typeof Object.keys === 'function' ? Object.keys : keysShim; var getOwnPropertyNames = typeof Object.getOwnPropertyNames === 'function' ? Object.getOwnPropertyNames : propertyShim; if (new Error().hasOwnProperty('description')) { var ERROR_PROPERTY_FILTER = function (obj, array) { if (toString.call(obj) === '[object Error]') { array = exports.filter(array, function (name) { return name !== 'description' && name !== 'number' && name !== 'message'; }); } return array; }; exports.keys = function (object) { return ERROR_PROPERTY_FILTER(object, keys(object)); }; exports.getOwnPropertyNames = function (object) { return ERROR_PROPERTY_FILTER(object, getOwnPropertyNames(object)); }; } else { exports.keys = keys; exports.getOwnPropertyNames = getOwnPropertyNames; } // Object.getOwnPropertyDescriptor - supported in IE8 but only on dom elements function valueObject(value, key) { return { value: value[key] }; } if (typeof Object.getOwnPropertyDescriptor === 'function') { try { Object.getOwnPropertyDescriptor({'a': 1}, 'a'); exports.getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor; } catch (e) { // IE8 dom element issue - use a try catch and default to valueObject exports.getOwnPropertyDescriptor = function (value, key) { try { return Object.getOwnPropertyDescriptor(value, key); } catch (e) { return valueObject(value, key); } }; } } else { exports.getOwnPropertyDescriptor = valueObject; } },{}],18:[function(require,module,exports){ // Copyright Joyent, Inc. and other Node contributors. // // Permission is hereby granted, free of charge, to any person obtaining a // copy of this software and associated documentation files (the // "Software"), to deal in the Software without restriction, including // without limitation the rights to use, copy, modify, merge, publish, // distribute, sublicense, and/or sell copies of the Software, and to permit // persons to whom the Software is furnished to do so, subject to the // following conditions: // // The above copyright notice and this permission notice shall be included // in all copies or substantial portions of the Software. // // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS // OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN // NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, // DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR // OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE // USE OR OTHER DEALINGS IN THE SOFTWARE. // UTILITY var util = require('util'); var shims = require('_shims'); var pSlice = Array.prototype.slice; // 1. The assert module provides functions that throw // AssertionError's when particular conditions are not met. The // assert module must conform to the following interface. var assert = module.exports = ok; // 2. The AssertionError is defined in assert. // new assert.AssertionError({ message: message, // actual: actual, // expected: expected }) assert.AssertionError = function AssertionError(options) { this.name = 'AssertionError'; this.actual = options.actual; this.expected = options.expected; this.operator = options.operator; this.message = options.message || getMessage(this); }; // assert.AssertionError instanceof Error util.inherits(assert.AssertionError, Error); function replacer(key, value) { if (util.isUndefined(value)) { return '' + value; } if (util.isNumber(value) && (isNaN(value) || !isFinite(value))) { return value.toString(); } if (util.isFunction(value) || util.isRegExp(value)) { return value.toString(); } return value; } function truncate(s, n) { if (util.isString(s)) { return s.length < n ? s : s.slice(0, n); } else { return s; } } function getMessage(self) { return truncate(JSON.stringify(self.actual, replacer), 128) + ' ' + self.operator + ' ' + truncate(JSON.stringify(self.expected, replacer), 128); } // At present only the three keys mentioned above are used and // understood by the spec. Implementations or sub modules can pass // other keys to the AssertionError's constructor - they will be // ignored. // 3. All of the following functions must throw an AssertionError // when a corresponding condition is not met, with a message that // may be undefined if not provided. All assertion methods provide // both the actual and expected values to the assertion error for // display purposes. function fail(actual, expected, message, operator, stackStartFunction) { throw new assert.AssertionError({ message: message, actual: actual, expected: expected, operator: operator, stackStartFunction: stackStartFunction }); } // EXTENSION! allows for well behaved errors defined elsewhere. assert.fail = fail; // 4. Pure assertion tests whether a value is truthy, as determined // by !!guard. // assert.ok(guard, message_opt); // This statement is equivalent to assert.equal(true, !!guard, // message_opt);. To test strictly for the value true, use // assert.strictEqual(true, guard, message_opt);. function ok(value, message) { if (!value) fail(value, true, message, '==', assert.ok); } assert.ok = ok; // 5. The equality assertion tests shallow, coercive equality with // ==. // assert.equal(actual, expected, message_opt); assert.equal = function equal(actual, expected, message) { if (actual != expected) fail(actual, expected, message, '==', assert.equal); }; // 6. The non-equality assertion tests for whether two objects are not equal // with != assert.notEqual(actual, expected, message_opt); assert.notEqual = function notEqual(actual, expected, message) { if (actual == expected) { fail(actual, expected, message, '!=', assert.notEqual); } }; // 7. The equivalence assertion tests a deep equality relation. // assert.deepEqual(actual, expected, message_opt); assert.deepEqual = function deepEqual(actual, expected, message) { if (!_deepEqual(actual, expected)) { fail(actual, expected, message, 'deepEqual', assert.deepEqual); } }; function _deepEqual(actual, expected) { // 7.1. All identical values are equivalent, as determined by ===. if (actual === expected) { return true; } else if (util.isBuffer(actual) && util.isBuffer(expected)) { if (actual.length != expected.length) return false; for (var i = 0; i < actual.length; i++) { if (actual[i] !== expected[i]) return false; } return true; // 7.2. If the expected value is a Date object, the actual value is // equivalent if it is also a Date object that refers to the same time. } else if (util.isDate(actual) && util.isDate(expected)) { return actual.getTime() === expected.getTime(); // 7.3 If the expected value is a RegExp object, the actual value is // equivalent if it is also a RegExp object with the same source and // properties (`global`, `multiline`, `lastIndex`, `ignoreCase`). } else if (util.isRegExp(actual) && util.isRegExp(expected)) { return actual.source === expected.source && actual.global === expected.global && actual.multiline === expected.multiline && actual.lastIndex === expected.lastIndex && actual.ignoreCase === expected.ignoreCase; // 7.4. Other pairs that do not both pass typeof value == 'object', // equivalence is determined by ==. } else if (!util.isObject(actual) && !util.isObject(expected)) { return actual == expected; // 7.5 For all other Object pairs, including Array objects, equivalence is // determined by having the same number of owned properties (as verified // with Object.prototype.hasOwnProperty.call), the same set of keys // (although not necessarily the same order), equivalent values for every // corresponding key, and an identical 'prototype' property. Note: this // accounts for both named and indexed properties on Arrays. } else { return objEquiv(actual, expected); } } function isArguments(object) { return Object.prototype.toString.call(object) == '[object Arguments]'; } function objEquiv(a, b) { if (util.isNullOrUndefined(a) || util.isNullOrUndefined(b)) return false; // an identical 'prototype' property. if (a.prototype !== b.prototype) return false; //~~~I've managed to break Object.keys through screwy arguments passing. // Converting to array solves the problem. if (isArguments(a)) { if (!isArguments(b)) { return false; } a = pSlice.call(a); b = pSlice.call(b); return _deepEqual(a, b); } try { var ka = shims.keys(a), kb = shims.keys(b), key, i; } catch (e) {//happens when one is a string literal and the other isn't return false; } // having the same number of owned properties (keys incorporates // hasOwnProperty) if (ka.length != kb.length) return false; //the same set of keys (although not necessarily the same order), ka.sort(); kb.sort(); //~~~cheap key test for (i = ka.length - 1; i >= 0; i--) { if (ka[i] != kb[i]) return false; } //equivalent values for every corresponding key, and //~~~possibly expensive deep test for (i = ka.length - 1; i >= 0; i--) { key = ka[i]; if (!_deepEqual(a[key], b[key])) return false; } return true; } // 8. The non-equivalence assertion tests for any deep inequality. // assert.notDeepEqual(actual, expected, message_opt); assert.notDeepEqual = function notDeepEqual(actual, expected, message) { if (_deepEqual(actual, expected)) { fail(actual, expected, message, 'notDeepEqual', assert.notDeepEqual); } }; // 9. The strict equality assertion tests strict equality, as determined by ===. // assert.strictEqual(actual, expected, message_opt); assert.strictEqual = function strictEqual(actual, expected, message) { if (actual !== expected) { fail(actual, expected, message, '===', assert.strictEqual); } }; // 10. The strict non-equality assertion tests for strict inequality, as // determined by !==. assert.notStrictEqual(actual, expected, message_opt); assert.notStrictEqual = function notStrictEqual(actual, expected, message) { if (actual === expected) { fail(actual, expected, message, '!==', assert.notStrictEqual); } }; function expectedException(actual, expected) { if (!actual || !expected) { return false; } if (Object.prototype.toString.call(expected) == '[object RegExp]') { return expected.test(actual); } else if (actual instanceof expected) { return true; } else if (expected.call({}, actual) === true) { return true; } return false; } function _throws(shouldThrow, block, expected, message) { var actual; if (util.isString(expected)) { message = expected; expected = null; } try { block(); } catch (e) { actual = e; } message = (expected && expected.name ? ' (' + expected.name + ').' : '.') + (message ? ' ' + message : '.'); if (shouldThrow && !actual) { fail(actual, expected, 'Missing expected exception' + message); } if (!shouldThrow && expectedException(actual, expected)) { fail(actual, expected, 'Got unwanted exception' + message); } if ((shouldThrow && actual && expected && !expectedException(actual, expected)) || (!shouldThrow && actual)) { throw actual; } } // 11. Expected to throw an error: // assert.throws(block, Error_opt, message_opt); assert.throws = function(block, /*optional*/error, /*optional*/message) { _throws.apply(this, [true].concat(pSlice.call(arguments))); }; // EXTENSION! This is annoying to write outside this module. assert.doesNotThrow = function(block, /*optional*/message) { _throws.apply(this, [false].concat(pSlice.call(arguments))); }; assert.ifError = function(err) { if (err) {throw err;}}; },{"_shims":17,"util":21}],19:[function(require,module,exports){ // not implemented // The reason for having an empty file and not throwing is to allow // untraditional implementation of this module. },{}],20:[function(require,module,exports){ var process=require("__browserify_process");// Copyright Joyent, Inc. and other Node contributors. // // Permission is hereby granted, free of charge, to any person obtaining a // copy of this software and associated documentation files (the // "Software"), to deal in the Software without restriction, including // without limitation the rights to use, copy, modify, merge, publish, // distribute, sublicense, and/or sell copies of the Software, and to permit // persons to whom the Software is furnished to do so, subject to the // following conditions: // // The above copyright notice and this permission notice shall be included // in all copies or substantial portions of the Software. // // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS // OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN // NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, // DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR // OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE // USE OR OTHER DEALINGS IN THE SOFTWARE. var util = require('util'); var shims = require('_shims'); // resolves . and .. elements in a path array with directory names there // must be no slashes, empty elements, or device names (c:\) in the array // (so also no leading and trailing slashes - it does not distinguish // relative and absolute paths) function normalizeArray(parts, allowAboveRoot) { // if the path tries to go above the root, `up` ends up > 0 var up = 0; for (var i = parts.length - 1; i >= 0; i--) { var last = parts[i]; if (last === '.') { parts.splice(i, 1); } else if (last === '..') { parts.splice(i, 1); up++; } else if (up) { parts.splice(i, 1); up--; } } // if the path is allowed to go above the root, restore leading ..s if (allowAboveRoot) { for (; up--; up) { parts.unshift('..'); } } return parts; } // Split a filename into [root, dir, basename, ext], unix version // 'root' is just a slash, or nothing. var splitPathRe = /^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/; var splitPath = function(filename) { return splitPathRe.exec(filename).slice(1); }; // path.resolve([from ...], to) // posix version exports.resolve = function() { var resolvedPath = '', resolvedAbsolute = false; for (var i = arguments.length - 1; i >= -1 && !resolvedAbsolute; i--) { var path = (i >= 0) ? arguments[i] : process.cwd(); // Skip empty and invalid entries if (!util.isString(path)) { throw new TypeError('Arguments to path.resolve must be strings'); } else if (!path) { continue; } resolvedPath = path + '/' + resolvedPath; resolvedAbsolute = path.charAt(0) === '/'; } // At this point the path should be resolved to a full absolute path, but // handle relative paths to be safe (might happen when process.cwd() fails) // Normalize the path resolvedPath = normalizeArray(shims.filter(resolvedPath.split('/'), function(p) { return !!p; }), !resolvedAbsolute).join('/'); return ((resolvedAbsolute ? '/' : '') + resolvedPath) || '.'; }; // path.normalize(path) // posix version exports.normalize = function(path) { var isAbsolute = exports.isAbsolute(path), trailingSlash = shims.substr(path, -1) === '/'; // Normalize the path path = normalizeArray(shims.filter(path.split('/'), function(p) { return !!p; }), !isAbsolute).join('/'); if (!path && !isAbsolute) { path = '.'; } if (path && trailingSlash) { path += '/'; } return (isAbsolute ? '/' : '') + path; }; // posix version exports.isAbsolute = function(path) { return path.charAt(0) === '/'; }; // posix version exports.join = function() { var paths = Array.prototype.slice.call(arguments, 0); return exports.normalize(shims.filter(paths, function(p, index) { if (!util.isString(p)) { throw new TypeError('Arguments to path.join must be strings'); } return p; }).join('/')); }; // path.relative(from, to) // posix version exports.relative = function(from, to) { from = exports.resolve(from).substr(1); to = exports.resolve(to).substr(1); function trim(arr) { var start = 0; for (; start < arr.length; start++) { if (arr[start] !== '') break; } var end = arr.length - 1; for (; end >= 0; end--) { if (arr[end] !== '') break; } if (start > end) return []; return arr.slice(start, end - start + 1); } var fromParts = trim(from.split('/')); var toParts = trim(to.split('/')); var length = Math.min(fromParts.length, toParts.length); var samePartsLength = length; for (var i = 0; i < length; i++) { if (fromParts[i] !== toParts[i]) { samePartsLength = i; break; } } var outputParts = []; for (var i = samePartsLength; i < fromParts.length; i++) { outputParts.push('..'); } outputParts = outputParts.concat(toParts.slice(samePartsLength)); return outputParts.join('/'); }; exports.sep = '/'; exports.delimiter = ':'; exports.dirname = function(path) { var result = splitPath(path), root = result[0], dir = result[1]; if (!root && !dir) { // No dirname whatsoever return '.'; } if (dir) { // It has a dirname, strip trailing slash dir = dir.substr(0, dir.length - 1); } return root + dir; }; exports.basename = function(path, ext) { var f = splitPath(path)[2]; // TODO: make this comparison case-insensitive on windows? if (ext && f.substr(-1 * ext.length) === ext) { f = f.substr(0, f.length - ext.length); } return f; }; exports.extname = function(path) { return splitPath(path)[3]; }; },{"__browserify_process":31,"_shims":17,"util":21}],21:[function(require,module,exports){ // Copyright Joyent, Inc. and other Node contributors. // // Permission is hereby granted, free of charge, to any person obtaining a // copy of this software and associated documentation files (the // "Software"), to deal in the Software without restriction, including // without limitation the rights to use, copy, modify, merge, publish, // distribute, sublicense, and/or sell copies of the Software, and to permit // persons to whom the Software is furnished to do so, subject to the // following conditions: // // The above copyright notice and this permission notice shall be included // in all copies or substantial portions of the Software. // // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS // OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN // NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, // DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR // OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE // USE OR OTHER DEALINGS IN THE SOFTWARE. var shims = require('_shims'); var formatRegExp = /%[sdj%]/g; exports.format = function(f) { if (!isString(f)) { var objects = []; for (var i = 0; i < arguments.length; i++) { objects.push(inspect(arguments[i])); } return objects.join(' '); } var i = 1; var args = arguments; var len = args.length; var str = String(f).replace(formatRegExp, function(x) { if (x === '%%') return '%'; if (i >= len) return x; switch (x) { case '%s': return String(args[i++]); case '%d': return Number(args[i++]); case '%j': try { return JSON.stringify(args[i++]); } catch (_) { return '[Circular]'; } default: return x; } }); for (var x = args[i]; i < len; x = args[++i]) { if (isNull(x) || !isObject(x)) { str += ' ' + x; } else { str += ' ' + inspect(x); } } return str; }; /** * Echos the value of a value. Trys to print the value out * in the best way possible given the different types. * * @param {Object} obj The object to print out. * @param {Object} opts Optional options object that alters the output. */ /* legacy: obj, showHidden, depth, colors*/ function inspect(obj, opts) { // default options var ctx = { seen: [], stylize: stylizeNoColor }; // legacy... if (arguments.length >= 3) ctx.depth = arguments[2]; if (arguments.length >= 4) ctx.colors = arguments[3]; if (isBoolean(opts)) { // legacy... ctx.showHidden = opts; } else if (opts) { // got an "options" object exports._extend(ctx, opts); } // set default options if (isUndefined(ctx.showHidden)) ctx.showHidden = false; if (isUndefined(ctx.depth)) ctx.depth = 2; if (isUndefined(ctx.colors)) ctx.colors = false; if (isUndefined(ctx.customInspect)) ctx.customInspect = true; if (ctx.colors) ctx.stylize = stylizeWithColor; return formatValue(ctx, obj, ctx.depth); } exports.inspect = inspect; // http://en.wikipedia.org/wiki/ANSI_escape_code#graphics inspect.colors = { 'bold' : [1, 22], 'italic' : [3, 23], 'underline' : [4, 24], 'inverse' : [7, 27], 'white' : [37, 39], 'grey' : [90, 39], 'black' : [30, 39], 'blue' : [34, 39], 'cyan' : [36, 39], 'green' : [32, 39], 'magenta' : [35, 39], 'red' : [31, 39], 'yellow' : [33, 39] }; // Don't use 'blue' not visible on cmd.exe inspect.styles = { 'special': 'cyan', 'number': 'yellow', 'boolean': 'yellow', 'undefined': 'grey', 'null': 'bold', 'string': 'green', 'date': 'magenta', // "name": intentionally not styling 'regexp': 'red' }; function stylizeWithColor(str, styleType) { var style = inspect.styles[styleType]; if (style) { return '\u001b[' + inspect.colors[style][0] + 'm' + str + '\u001b[' + inspect.colors[style][1] + 'm'; } else { return str; } } function stylizeNoColor(str, styleType) { return str; } function arrayToHash(array) { var hash = {}; shims.forEach(array, function(val, idx) { hash[val] = true; }); return hash; } function formatValue(ctx, value, recurseTimes) { // Provide a hook for user-specified inspect functions. // Check that value is an object with an inspect function on it if (ctx.customInspect && value && isFunction(value.inspect) && // Filter out the util module, it's inspect function is special value.inspect !== exports.inspect && // Also filter out any prototype objects using the circular check. !(value.constructor && value.constructor.prototype === value)) { var ret = value.inspect(recurseTimes); if (!isString(ret)) { ret = formatValue(ctx, ret, recurseTimes); } return ret; } // Primitive types cannot have properties var primitive = formatPrimitive(ctx, value); if (primitive) { return primitive; } // Look up the keys of the object. var keys = shims.keys(value); var visibleKeys = arrayToHash(keys); if (ctx.showHidden) { keys = shims.getOwnPropertyNames(value); } // Some type of object without properties can be shortcutted. if (keys.length === 0) { if (isFunction(value)) { var name = value.name ? ': ' + value.name : ''; return ctx.stylize('[Function' + name + ']', 'special'); } if (isRegExp(value)) { return ctx.stylize(RegExp.prototype.toString.call(value), 'regexp'); } if (isDate(value)) { return ctx.stylize(Date.prototype.toString.call(value), 'date'); } if (isError(value)) { return formatError(value); } } var base = '', array = false, braces = ['{', '}']; // Make Array say that they are Array if (isArray(value)) { array = true; braces = ['[', ']']; } // Make functions say that they are functions if (isFunction(value)) { var n = value.name ? ': ' + value.name : ''; base = ' [Function' + n + ']'; } // Make RegExps say that they are RegExps if (isRegExp(value)) { base = ' ' + RegExp.prototype.toString.call(value); } // Make dates with properties first say the date if (isDate(value)) { base = ' ' + Date.prototype.toUTCString.call(value); } // Make error with message first say the error if (isError(value)) { base = ' ' + formatError(value); } if (keys.length === 0 && (!array || value.length == 0)) { return braces[0] + base + braces[1]; } if (recurseTimes < 0) { if (isRegExp(value)) { return ctx.stylize(RegExp.prototype.toString.call(value), 'regexp'); } else { return ctx.stylize('[Object]', 'special'); } } ctx.seen.push(value); var output; if (array) { output = formatArray(ctx, value, recurseTimes, visibleKeys, keys); } else { output = keys.map(function(key) { return formatProperty(ctx, value, recurseTimes, visibleKeys, key, array); }); } ctx.seen.pop(); return reduceToSingleString(output, base, braces); } function formatPrimitive(ctx, value) { if (isUndefined(value)) return ctx.stylize('undefined', 'undefined'); if (isString(value)) { var simple = '\'' + JSON.stringify(value).replace(/^"|"$/g, '') .replace(/'/g, "\\'") .replace(/\\"/g, '"') + '\''; return ctx.stylize(simple, 'string'); } if (isNumber(value)) return ctx.stylize('' + value, 'number'); if (isBoolean(value)) return ctx.stylize('' + value, 'boolean'); // For some reason typeof null is "object", so special case here. if (isNull(value)) return ctx.stylize('null', 'null'); } function formatError(value) { return '[' + Error.prototype.toString.call(value) + ']'; } function formatArray(ctx, value, recurseTimes, visibleKeys, keys) { var output = []; for (var i = 0, l = value.length; i < l; ++i) { if (hasOwnProperty(value, String(i))) { output.push(formatProperty(ctx, value, recurseTimes, visibleKeys, String(i), true)); } else { output.push(''); } } shims.forEach(keys, function(key) { if (!key.match(/^\d+$/)) { output.push(formatProperty(ctx, value, recurseTimes, visibleKeys, key, true)); } }); return output; } function formatProperty(ctx, value, recurseTimes, visibleKeys, key, array) { var name, str, desc; desc = shims.getOwnPropertyDescriptor(value, key) || { value: value[key] }; if (desc.get) { if (desc.set) { str = ctx.stylize('[Getter/Setter]', 'special'); } else { str = ctx.stylize('[Getter]', 'special'); } } else { if (desc.set) { str = ctx.stylize('[Setter]', 'special'); } } if (!hasOwnProperty(visibleKeys, key)) { name = '[' + key + ']'; } if (!str) { if (shims.indexOf(ctx.seen, desc.value) < 0) { if (isNull(recurseTimes)) { str = formatValue(ctx, desc.value, null); } else { str = formatValue(ctx, desc.value, recurseTimes - 1); } if (str.indexOf('\n') > -1) { if (array) { str = str.split('\n').map(function(line) { return ' ' + line; }).join('\n').substr(2); } else { str = '\n' + str.split('\n').map(function(line) { return ' ' + line; }).join('\n'); } } } else { str = ctx.stylize('[Circular]', 'special'); } } if (isUndefined(name)) { if (array && key.match(/^\d+$/)) { return str; } name = JSON.stringify('' + key); if (name.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)) { name = name.substr(1, name.length - 2); name = ctx.stylize(name, 'name'); } else { name = name.replace(/'/g, "\\'") .replace(/\\"/g, '"') .replace(/(^"|"$)/g, "'"); name = ctx.stylize(name, 'string'); } } return name + ': ' + str; } function reduceToSingleString(output, base, braces) { var numLinesEst = 0; var length = shims.reduce(output, function(prev, cur) { numLinesEst++; if (cur.indexOf('\n') >= 0) numLinesEst++; return prev + cur.replace(/\u001b\[\d\d?m/g, '').length + 1; }, 0); if (length > 60) { return braces[0] + (base === '' ? '' : base + '\n ') + ' ' + output.join(',\n ') + ' ' + braces[1]; } return braces[0] + base + ' ' + output.join(', ') + ' ' + braces[1]; } // NOTE: These type checking functions intentionally don't use `instanceof` // because it is fragile and can be easily faked with `Object.create()`. function isArray(ar) { return shims.isArray(ar); } exports.isArray = isArray; function isBoolean(arg) { return typeof arg === 'boolean'; } exports.isBoolean = isBoolean; function isNull(arg) { return arg === null; } exports.isNull = isNull; function isNullOrUndefined(arg) { return arg == null; } exports.isNullOrUndefined = isNullOrUndefined; function isNumber(arg) { return typeof arg === 'number'; } exports.isNumber = isNumber; function isString(arg) { return typeof arg === 'string'; } exports.isString = isString; function isSymbol(arg) { return typeof arg === 'symbol'; } exports.isSymbol = isSymbol; function isUndefined(arg) { return arg === void 0; } exports.isUndefined = isUndefined; function isRegExp(re) { return isObject(re) && objectToString(re) === '[object RegExp]'; } exports.isRegExp = isRegExp; function isObject(arg) { return typeof arg === 'object' && arg; } exports.isObject = isObject; function isDate(d) { return isObject(d) && objectToString(d) === '[object Date]'; } exports.isDate = isDate; function isError(e) { return isObject(e) && objectToString(e) === '[object Error]'; } exports.isError = isError; function isFunction(arg) { return typeof arg === 'function'; } exports.isFunction = isFunction; function isPrimitive(arg) { return arg === null || typeof arg === 'boolean' || typeof arg === 'number' || typeof arg === 'string' || typeof arg === 'symbol' || // ES6 symbol typeof arg === 'undefined'; } exports.isPrimitive = isPrimitive; function isBuffer(arg) { return arg && typeof arg === 'object' && typeof arg.copy === 'function' && typeof arg.fill === 'function' && typeof arg.binarySlice === 'function' ; } exports.isBuffer = isBuffer; function objectToString(o) { return Object.prototype.toString.call(o); } function pad(n) { return n < 10 ? '0' + n.toString(10) : n.toString(10); } var months = ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec']; // 26 Feb 16:19:34 function timestamp() { var d = new Date(); var time = [pad(d.getHours()), pad(d.getMinutes()), pad(d.getSeconds())].join(':'); return [d.getDate(), months[d.getMonth()], time].join(' '); } // log is just a thin wrapper to console.log that prepends a timestamp exports.log = function() { console.log('%s - %s', timestamp(), exports.format.apply(exports, arguments)); }; /** * Inherit the prototype methods from one constructor into another. * * The Function.prototype.inherits from lang.js rewritten as a standalone * function (not on Function.prototype). NOTE: If this file is to be loaded * during bootstrapping this function needs to be rewritten using some native * functions as prototype setup using normal JavaScript does not work as * expected during bootstrapping (see mirror.js in r114903). * * @param {function} ctor Constructor function which needs to inherit the * prototype. * @param {function} superCtor Constructor function to inherit prototype from. */ exports.inherits = function(ctor, superCtor) { ctor.super_ = superCtor; ctor.prototype = shims.create(superCtor.prototype, { constructor: { value: ctor, enumerable: false, writable: true, configurable: true } }); }; exports._extend = function(origin, add) { // Don't do anything if add isn't an object if (!add || !isObject(add)) return origin; var keys = shims.keys(add); var i = keys.length; while (i--) { origin[keys[i]] = add[keys[i]]; } return origin; }; function hasOwnProperty(obj, prop) { return Object.prototype.hasOwnProperty.call(obj, prop); } },{"_shims":17}],22:[function(require,module,exports){ exports.readIEEE754 = function(buffer, offset, isBE, mLen, nBytes) { var e, m, eLen = nBytes * 8 - mLen - 1, eMax = (1 << eLen) - 1, eBias = eMax >> 1, nBits = -7, i = isBE ? 0 : (nBytes - 1), d = isBE ? 1 : -1, s = buffer[offset + i]; i += d; e = s & ((1 << (-nBits)) - 1); s >>= (-nBits); nBits += eLen; for (; nBits > 0; e = e * 256 + buffer[offset + i], i += d, nBits -= 8); m = e & ((1 << (-nBits)) - 1); e >>= (-nBits); nBits += mLen; for (; nBits > 0; m = m * 256 + buffer[offset + i], i += d, nBits -= 8); if (e === 0) { e = 1 - eBias; } else if (e === eMax) { return m ? NaN : ((s ? -1 : 1) * Infinity); } else { m = m + Math.pow(2, mLen); e = e - eBias; } return (s ? -1 : 1) * m * Math.pow(2, e - mLen); }; exports.writeIEEE754 = function(buffer, value, offset, isBE, mLen, nBytes) { var e, m, c, eLen = nBytes * 8 - mLen - 1, eMax = (1 << eLen) - 1, eBias = eMax >> 1, rt = (mLen === 23 ? Math.pow(2, -24) - Math.pow(2, -77) : 0), i = isBE ? (nBytes - 1) : 0, d = isBE ? -1 : 1, s = value < 0 || (value === 0 && 1 / value < 0) ? 1 : 0; value = Math.abs(value); if (isNaN(value) || value === Infinity) { m = isNaN(value) ? 1 : 0; e = eMax; } else { e = Math.floor(Math.log(value) / Math.LN2); if (value * (c = Math.pow(2, -e)) < 1) { e--; c *= 2; } if (e + eBias >= 1) { value += rt / c; } else { value += rt * Math.pow(2, 1 - eBias); } if (value * c >= 2) { e++; c /= 2; } if (e + eBias >= eMax) { m = 0; e = eMax; } else if (e + eBias >= 1) { m = (value * c - 1) * Math.pow(2, mLen); e = e + eBias; } else { m = value * Math.pow(2, eBias - 1) * Math.pow(2, mLen); e = 0; } } for (; mLen >= 8; buffer[offset + i] = m & 0xff, i += d, m /= 256, mLen -= 8); e = (e << mLen) | m; eLen += mLen; for (; eLen > 0; buffer[offset + i] = e & 0xff, i += d, e /= 256, eLen -= 8); buffer[offset + i - d] |= s * 128; }; },{}],23:[function(require,module,exports){ var assert; exports.Buffer = Buffer; exports.SlowBuffer = Buffer; Buffer.poolSize = 8192; exports.INSPECT_MAX_BYTES = 50; function stringtrim(str) { if (str.trim) return str.trim(); return str.replace(/^\s+|\s+$/g, ''); } function Buffer(subject, encoding, offset) { if(!assert) assert= require('assert'); if (!(this instanceof Buffer)) { return new Buffer(subject, encoding, offset); } this.parent = this; this.offset = 0; // Work-around: node's base64 implementation // allows for non-padded strings while base64-js // does not.. if (encoding == "base64" && typeof subject == "string") { subject = stringtrim(subject); while (subject.length % 4 != 0) { subject = subject + "="; } } var type; // Are we slicing? if (typeof offset === 'number') { this.length = coerce(encoding); // slicing works, with limitations (no parent tracking/update) // check https://github.com/toots/buffer-browserify/issues/19 for (var i = 0; i < this.length; i++) { this[i] = subject.get(i+offset); } } else { // Find the length switch (type = typeof subject) { case 'number': this.length = coerce(subject); break; case 'string': this.length = Buffer.byteLength(subject, encoding); break; case 'object': // Assume object is an array this.length = coerce(subject.length); break; default: throw new Error('First argument needs to be a number, ' + 'array or string.'); } // Treat array-ish objects as a byte array. if (isArrayIsh(subject)) { for (var i = 0; i < this.length; i++) { if (subject instanceof Buffer) { this[i] = subject.readUInt8(i); } else { this[i] = subject[i]; } } } else if (type == 'string') { // We are a string this.length = this.write(subject, 0, encoding); } else if (type === 'number') { for (var i = 0; i < this.length; i++) { this[i] = 0; } } } } Buffer.prototype.get = function get(i) { if (i < 0 || i >= this.length) throw new Error('oob'); return this[i]; }; Buffer.prototype.set = function set(i, v) { if (i < 0 || i >= this.length) throw new Error('oob'); return this[i] = v; }; Buffer.byteLength = function (str, encoding) { switch (encoding || "utf8") { case 'hex': return str.length / 2; case 'utf8': case 'utf-8': return utf8ToBytes(str).length; case 'ascii': case 'binary': return str.length; case 'base64': return base64ToBytes(str).length; default: throw new Error('Unknown encoding'); } }; Buffer.prototype.utf8Write = function (string, offset, length) { var bytes, pos; return Buffer._charsWritten = blitBuffer(utf8ToBytes(string), this, offset, length); }; Buffer.prototype.asciiWrite = function (string, offset, length) { var bytes, pos; return Buffer._charsWritten = blitBuffer(asciiToBytes(string), this, offset, length); }; Buffer.prototype.binaryWrite = Buffer.prototype.asciiWrite; Buffer.prototype.base64Write = function (string, offset, length) { var bytes, pos; return Buffer._charsWritten = blitBuffer(base64ToBytes(string), this, offset, length); }; Buffer.prototype.base64Slice = function (start, end) { var bytes = Array.prototype.slice.apply(this, arguments) return require("base64-js").fromByteArray(bytes); }; Buffer.prototype.utf8Slice = function () { var bytes = Array.prototype.slice.apply(this, arguments); var res = ""; var tmp = ""; var i = 0; while (i < bytes.length) { if (bytes[i] <= 0x7F) { res += decodeUtf8Char(tmp) + String.fromCharCode(bytes[i]); tmp = ""; } else tmp += "%" + bytes[i].toString(16); i++; } return res + decodeUtf8Char(tmp); } Buffer.prototype.asciiSlice = function () { var bytes = Array.prototype.slice.apply(this, arguments); var ret = ""; for (var i = 0; i < bytes.length; i++) ret += String.fromCharCode(bytes[i]); return ret; } Buffer.prototype.binarySlice = Buffer.prototype.asciiSlice; Buffer.prototype.inspect = function() { var out = [], len = this.length; for (var i = 0; i < len; i++) { out[i] = toHex(this[i]); if (i == exports.INSPECT_MAX_BYTES) { out[i + 1] = '...'; break; } } return ''; }; Buffer.prototype.hexSlice = function(start, end) { var len = this.length; if (!start || start < 0) start = 0; if (!end || end < 0 || end > len) end = len; var out = ''; for (var i = start; i < end; i++) { out += toHex(this[i]); } return out; }; Buffer.prototype.toString = function(encoding, start, end) { encoding = String(encoding || 'utf8').toLowerCase(); start = +start || 0; if (typeof end == 'undefined') end = this.length; // Fastpath empty strings if (+end == start) { return ''; } switch (encoding) { case 'hex': return this.hexSlice(start, end); case 'utf8': case 'utf-8': return this.utf8Slice(start, end); case 'ascii': return this.asciiSlice(start, end); case 'binary': return this.binarySlice(start, end); case 'base64': return this.base64Slice(start, end); case 'ucs2': case 'ucs-2': return this.ucs2Slice(start, end); default: throw new Error('Unknown encoding'); } }; Buffer.prototype.hexWrite = function(string, offset, length) { offset = +offset || 0; var remaining = this.length - offset; if (!length) { length = remaining; } else { length = +length; if (length > remaining) { length = remaining; } } // must be an even number of digits var strLen = string.length; if (strLen % 2) { throw new Error('Invalid hex string'); } if (length > strLen / 2) { length = strLen / 2; } for (var i = 0; i < length; i++) { var byte = parseInt(string.substr(i * 2, 2), 16); if (isNaN(byte)) throw new Error('Invalid hex string'); this[offset + i] = byte; } Buffer._charsWritten = i * 2; return i; }; Buffer.prototype.write = function(string, offset, length, encoding) { // Support both (string, offset, length, encoding) // and the legacy (string, encoding, offset, length) if (isFinite(offset)) { if (!isFinite(length)) { encoding = length; length = undefined; } } else { // legacy var swap = encoding; encoding = offset; offset = length; length = swap; } offset = +offset || 0; var remaining = this.length - offset; if (!length) { length = remaining; } else { length = +length; if (length > remaining) { length = remaining; } } encoding = String(encoding || 'utf8').toLowerCase(); switch (encoding) { case 'hex': return this.hexWrite(string, offset, length); case 'utf8': case 'utf-8': return this.utf8Write(string, offset, length); case 'ascii': return this.asciiWrite(string, offset, length); case 'binary': return this.binaryWrite(string, offset, length); case 'base64': return this.base64Write(string, offset, length); case 'ucs2': case 'ucs-2': return this.ucs2Write(string, offset, length); default: throw new Error('Unknown encoding'); } }; // slice(start, end) function clamp(index, len, defaultValue) { if (typeof index !== 'number') return defaultValue; index = ~~index; // Coerce to integer. if (index >= len) return len; if (index >= 0) return index; index += len; if (index >= 0) return index; return 0; } Buffer.prototype.slice = function(start, end) { var len = this.length; start = clamp(start, len, 0); end = clamp(end, len, len); return new Buffer(this, end - start, +start); }; // copy(targetBuffer, targetStart=0, sourceStart=0, sourceEnd=buffer.length) Buffer.prototype.copy = function(target, target_start, start, end) { var source = this; start || (start = 0); if (end === undefined || isNaN(end)) { end = this.length; } target_start || (target_start = 0); if (end < start) throw new Error('sourceEnd < sourceStart'); // Copy 0 bytes; we're done if (end === start) return 0; if (target.length == 0 || source.length == 0) return 0; if (target_start < 0 || target_start >= target.length) { throw new Error('targetStart out of bounds'); } if (start < 0 || start >= source.length) { throw new Error('sourceStart out of bounds'); } if (end < 0 || end > source.length) { throw new Error('sourceEnd out of bounds'); } // Are we oob? if (end > this.length) { end = this.length; } if (target.length - target_start < end - start) { end = target.length - target_start + start; } var temp = []; for (var i=start; i= this.length) { throw new Error('start out of bounds'); } if (end < 0 || end > this.length) { throw new Error('end out of bounds'); } for (var i = start; i < end; i++) { this[i] = value; } } // Static methods Buffer.isBuffer = function isBuffer(b) { return b instanceof Buffer || b instanceof Buffer; }; Buffer.concat = function (list, totalLength) { if (!isArray(list)) { throw new Error("Usage: Buffer.concat(list, [totalLength])\n \ list should be an Array."); } if (list.length === 0) { return new Buffer(0); } else if (list.length === 1) { return list[0]; } if (typeof totalLength !== 'number') { totalLength = 0; for (var i = 0; i < list.length; i++) { var buf = list[i]; totalLength += buf.length; } } var buffer = new Buffer(totalLength); var pos = 0; for (var i = 0; i < list.length; i++) { var buf = list[i]; buf.copy(buffer, pos); pos += buf.length; } return buffer; }; Buffer.isEncoding = function(encoding) { switch ((encoding + '').toLowerCase()) { case 'hex': case 'utf8': case 'utf-8': case 'ascii': case 'binary': case 'base64': case 'ucs2': case 'ucs-2': case 'utf16le': case 'utf-16le': case 'raw': return true; default: return false; } }; // helpers function coerce(length) { // Coerce length to a number (possibly NaN), round up // in case it's fractional (e.g. 123.456) then do a // double negate to coerce a NaN to 0. Easy, right? length = ~~Math.ceil(+length); return length < 0 ? 0 : length; } function isArray(subject) { return (Array.isArray || function(subject){ return {}.toString.apply(subject) == '[object Array]' }) (subject) } function isArrayIsh(subject) { return isArray(subject) || Buffer.isBuffer(subject) || subject && typeof subject === 'object' && typeof subject.length === 'number'; } function toHex(n) { if (n < 16) return '0' + n.toString(16); return n.toString(16); } function utf8ToBytes(str) { var byteArray = []; for (var i = 0; i < str.length; i++) if (str.charCodeAt(i) <= 0x7F) byteArray.push(str.charCodeAt(i)); else { var h = encodeURIComponent(str.charAt(i)).substr(1).split('%'); for (var j = 0; j < h.length; j++) byteArray.push(parseInt(h[j], 16)); } return byteArray; } function asciiToBytes(str) { var byteArray = [] for (var i = 0; i < str.length; i++ ) // Node's code seems to be doing this and not & 0x7F.. byteArray.push( str.charCodeAt(i) & 0xFF ); return byteArray; } function base64ToBytes(str) { return require("base64-js").toByteArray(str); } function blitBuffer(src, dst, offset, length) { var pos, i = 0; while (i < length) { if ((i+offset >= dst.length) || (i >= src.length)) break; dst[i + offset] = src[i]; i++; } return i; } function decodeUtf8Char(str) { try { return decodeURIComponent(str); } catch (err) { return String.fromCharCode(0xFFFD); // UTF 8 invalid char } } // read/write bit-twiddling Buffer.prototype.readUInt8 = function(offset, noAssert) { var buffer = this; if (!noAssert) { assert.ok(offset !== undefined && offset !== null, 'missing offset'); assert.ok(offset < buffer.length, 'Trying to read beyond buffer length'); } if (offset >= buffer.length) return; return buffer[offset]; }; function readUInt16(buffer, offset, isBigEndian, noAssert) { var val = 0; if (!noAssert) { assert.ok(typeof (isBigEndian) === 'boolean', 'missing or invalid endian'); assert.ok(offset !== undefined && offset !== null, 'missing offset'); assert.ok(offset + 1 < buffer.length, 'Trying to read beyond buffer length'); } if (offset >= buffer.length) return 0; if (isBigEndian) { val = buffer[offset] << 8; if (offset + 1 < buffer.length) { val |= buffer[offset + 1]; } } else { val = buffer[offset]; if (offset + 1 < buffer.length) { val |= buffer[offset + 1] << 8; } } return val; } Buffer.prototype.readUInt16LE = function(offset, noAssert) { return readUInt16(this, offset, false, noAssert); }; Buffer.prototype.readUInt16BE = function(offset, noAssert) { return readUInt16(this, offset, true, noAssert); }; function readUInt32(buffer, offset, isBigEndian, noAssert) { var val = 0; if (!noAssert) { assert.ok(typeof (isBigEndian) === 'boolean', 'missing or invalid endian'); assert.ok(offset !== undefined && offset !== null, 'missing offset'); assert.ok(offset + 3 < buffer.length, 'Trying to read beyond buffer length'); } if (offset >= buffer.length) return 0; if (isBigEndian) { if (offset + 1 < buffer.length) val = buffer[offset + 1] << 16; if (offset + 2 < buffer.length) val |= buffer[offset + 2] << 8; if (offset + 3 < buffer.length) val |= buffer[offset + 3]; val = val + (buffer[offset] << 24 >>> 0); } else { if (offset + 2 < buffer.length) val = buffer[offset + 2] << 16; if (offset + 1 < buffer.length) val |= buffer[offset + 1] << 8; val |= buffer[offset]; if (offset + 3 < buffer.length) val = val + (buffer[offset + 3] << 24 >>> 0); } return val; } Buffer.prototype.readUInt32LE = function(offset, noAssert) { return readUInt32(this, offset, false, noAssert); }; Buffer.prototype.readUInt32BE = function(offset, noAssert) { return readUInt32(this, offset, true, noAssert); }; /* * Signed integer types, yay team! A reminder on how two's complement actually * works. The first bit is the signed bit, i.e. tells us whether or not the * number should be positive or negative. If the two's complement value is * positive, then we're done, as it's equivalent to the unsigned representation. * * Now if the number is positive, you're pretty much done, you can just leverage * the unsigned translations and return those. Unfortunately, negative numbers * aren't quite that straightforward. * * At first glance, one might be inclined to use the traditional formula to * translate binary numbers between the positive and negative values in two's * complement. (Though it doesn't quite work for the most negative value) * Mainly: * - invert all the bits * - add one to the result * * Of course, this doesn't quite work in Javascript. Take for example the value * of -128. This could be represented in 16 bits (big-endian) as 0xff80. But of * course, Javascript will do the following: * * > ~0xff80 * -65409 * * Whoh there, Javascript, that's not quite right. But wait, according to * Javascript that's perfectly correct. When Javascript ends up seeing the * constant 0xff80, it has no notion that it is actually a signed number. It * assumes that we've input the unsigned value 0xff80. Thus, when it does the * binary negation, it casts it into a signed value, (positive 0xff80). Then * when you perform binary negation on that, it turns it into a negative number. * * Instead, we're going to have to use the following general formula, that works * in a rather Javascript friendly way. I'm glad we don't support this kind of * weird numbering scheme in the kernel. * * (BIT-MAX - (unsigned)val + 1) * -1 * * The astute observer, may think that this doesn't make sense for 8-bit numbers * (really it isn't necessary for them). However, when you get 16-bit numbers, * you do. Let's go back to our prior example and see how this will look: * * (0xffff - 0xff80 + 1) * -1 * (0x007f + 1) * -1 * (0x0080) * -1 */ Buffer.prototype.readInt8 = function(offset, noAssert) { var buffer = this; var neg; if (!noAssert) { assert.ok(offset !== undefined && offset !== null, 'missing offset'); assert.ok(offset < buffer.length, 'Trying to read beyond buffer length'); } if (offset >= buffer.length) return; neg = buffer[offset] & 0x80; if (!neg) { return (buffer[offset]); } return ((0xff - buffer[offset] + 1) * -1); }; function readInt16(buffer, offset, isBigEndian, noAssert) { var neg, val; if (!noAssert) { assert.ok(typeof (isBigEndian) === 'boolean', 'missing or invalid endian'); assert.ok(offset !== undefined && offset !== null, 'missing offset'); assert.ok(offset + 1 < buffer.length, 'Trying to read beyond buffer length'); } val = readUInt16(buffer, offset, isBigEndian, noAssert); neg = val & 0x8000; if (!neg) { return val; } return (0xffff - val + 1) * -1; } Buffer.prototype.readInt16LE = function(offset, noAssert) { return readInt16(this, offset, false, noAssert); }; Buffer.prototype.readInt16BE = function(offset, noAssert) { return readInt16(this, offset, true, noAssert); }; function readInt32(buffer, offset, isBigEndian, noAssert) { var neg, val; if (!noAssert) { assert.ok(typeof (isBigEndian) === 'boolean', 'missing or invalid endian'); assert.ok(offset !== undefined && offset !== null, 'missing offset'); assert.ok(offset + 3 < buffer.length, 'Trying to read beyond buffer length'); } val = readUInt32(buffer, offset, isBigEndian, noAssert); neg = val & 0x80000000; if (!neg) { return (val); } return (0xffffffff - val + 1) * -1; } Buffer.prototype.readInt32LE = function(offset, noAssert) { return readInt32(this, offset, false, noAssert); }; Buffer.prototype.readInt32BE = function(offset, noAssert) { return readInt32(this, offset, true, noAssert); }; function readFloat(buffer, offset, isBigEndian, noAssert) { if (!noAssert) { assert.ok(typeof (isBigEndian) === 'boolean', 'missing or invalid endian'); assert.ok(offset + 3 < buffer.length, 'Trying to read beyond buffer length'); } return require('./buffer_ieee754').readIEEE754(buffer, offset, isBigEndian, 23, 4); } Buffer.prototype.readFloatLE = function(offset, noAssert) { return readFloat(this, offset, false, noAssert); }; Buffer.prototype.readFloatBE = function(offset, noAssert) { return readFloat(this, offset, true, noAssert); }; function readDouble(buffer, offset, isBigEndian, noAssert) { if (!noAssert) { assert.ok(typeof (isBigEndian) === 'boolean', 'missing or invalid endian'); assert.ok(offset + 7 < buffer.length, 'Trying to read beyond buffer length'); } return require('./buffer_ieee754').readIEEE754(buffer, offset, isBigEndian, 52, 8); } Buffer.prototype.readDoubleLE = function(offset, noAssert) { return readDouble(this, offset, false, noAssert); }; Buffer.prototype.readDoubleBE = function(offset, noAssert) { return readDouble(this, offset, true, noAssert); }; /* * We have to make sure that the value is a valid integer. This means that it is * non-negative. It has no fractional component and that it does not exceed the * maximum allowed value. * * value The number to check for validity * * max The maximum value */ function verifuint(value, max) { assert.ok(typeof (value) == 'number', 'cannot write a non-number as a number'); assert.ok(value >= 0, 'specified a negative value for writing an unsigned value'); assert.ok(value <= max, 'value is larger than maximum value for type'); assert.ok(Math.floor(value) === value, 'value has a fractional component'); } Buffer.prototype.writeUInt8 = function(value, offset, noAssert) { var buffer = this; if (!noAssert) { assert.ok(value !== undefined && value !== null, 'missing value'); assert.ok(offset !== undefined && offset !== null, 'missing offset'); assert.ok(offset < buffer.length, 'trying to write beyond buffer length'); verifuint(value, 0xff); } if (offset < buffer.length) { buffer[offset] = value; } }; function writeUInt16(buffer, value, offset, isBigEndian, noAssert) { if (!noAssert) { assert.ok(value !== undefined && value !== null, 'missing value'); assert.ok(typeof (isBigEndian) === 'boolean', 'missing or invalid endian'); assert.ok(offset !== undefined && offset !== null, 'missing offset'); assert.ok(offset + 1 < buffer.length, 'trying to write beyond buffer length'); verifuint(value, 0xffff); } for (var i = 0; i < Math.min(buffer.length - offset, 2); i++) { buffer[offset + i] = (value & (0xff << (8 * (isBigEndian ? 1 - i : i)))) >>> (isBigEndian ? 1 - i : i) * 8; } } Buffer.prototype.writeUInt16LE = function(value, offset, noAssert) { writeUInt16(this, value, offset, false, noAssert); }; Buffer.prototype.writeUInt16BE = function(value, offset, noAssert) { writeUInt16(this, value, offset, true, noAssert); }; function writeUInt32(buffer, value, offset, isBigEndian, noAssert) { if (!noAssert) { assert.ok(value !== undefined && value !== null, 'missing value'); assert.ok(typeof (isBigEndian) === 'boolean', 'missing or invalid endian'); assert.ok(offset !== undefined && offset !== null, 'missing offset'); assert.ok(offset + 3 < buffer.length, 'trying to write beyond buffer length'); verifuint(value, 0xffffffff); } for (var i = 0; i < Math.min(buffer.length - offset, 4); i++) { buffer[offset + i] = (value >>> (isBigEndian ? 3 - i : i) * 8) & 0xff; } } Buffer.prototype.writeUInt32LE = function(value, offset, noAssert) { writeUInt32(this, value, offset, false, noAssert); }; Buffer.prototype.writeUInt32BE = function(value, offset, noAssert) { writeUInt32(this, value, offset, true, noAssert); }; /* * We now move onto our friends in the signed number category. Unlike unsigned * numbers, we're going to have to worry a bit more about how we put values into * arrays. Since we are only worrying about signed 32-bit values, we're in * slightly better shape. Unfortunately, we really can't do our favorite binary * & in this system. It really seems to do the wrong thing. For example: * * > -32 & 0xff * 224 * * What's happening above is really: 0xe0 & 0xff = 0xe0. However, the results of * this aren't treated as a signed number. Ultimately a bad thing. * * What we're going to want to do is basically create the unsigned equivalent of * our representation and pass that off to the wuint* functions. To do that * we're going to do the following: * * - if the value is positive * we can pass it directly off to the equivalent wuint * - if the value is negative * we do the following computation: * mb + val + 1, where * mb is the maximum unsigned value in that byte size * val is the Javascript negative integer * * * As a concrete value, take -128. In signed 16 bits this would be 0xff80. If * you do out the computations: * * 0xffff - 128 + 1 * 0xffff - 127 * 0xff80 * * You can then encode this value as the signed version. This is really rather * hacky, but it should work and get the job done which is our goal here. */ /* * A series of checks to make sure we actually have a signed 32-bit number */ function verifsint(value, max, min) { assert.ok(typeof (value) == 'number', 'cannot write a non-number as a number'); assert.ok(value <= max, 'value larger than maximum allowed value'); assert.ok(value >= min, 'value smaller than minimum allowed value'); assert.ok(Math.floor(value) === value, 'value has a fractional component'); } function verifIEEE754(value, max, min) { assert.ok(typeof (value) == 'number', 'cannot write a non-number as a number'); assert.ok(value <= max, 'value larger than maximum allowed value'); assert.ok(value >= min, 'value smaller than minimum allowed value'); } Buffer.prototype.writeInt8 = function(value, offset, noAssert) { var buffer = this; if (!noAssert) { assert.ok(value !== undefined && value !== null, 'missing value'); assert.ok(offset !== undefined && offset !== null, 'missing offset'); assert.ok(offset < buffer.length, 'Trying to write beyond buffer length'); verifsint(value, 0x7f, -0x80); } if (value >= 0) { buffer.writeUInt8(value, offset, noAssert); } else { buffer.writeUInt8(0xff + value + 1, offset, noAssert); } }; function writeInt16(buffer, value, offset, isBigEndian, noAssert) { if (!noAssert) { assert.ok(value !== undefined && value !== null, 'missing value'); assert.ok(typeof (isBigEndian) === 'boolean', 'missing or invalid endian'); assert.ok(offset !== undefined && offset !== null, 'missing offset'); assert.ok(offset + 1 < buffer.length, 'Trying to write beyond buffer length'); verifsint(value, 0x7fff, -0x8000); } if (value >= 0) { writeUInt16(buffer, value, offset, isBigEndian, noAssert); } else { writeUInt16(buffer, 0xffff + value + 1, offset, isBigEndian, noAssert); } } Buffer.prototype.writeInt16LE = function(value, offset, noAssert) { writeInt16(this, value, offset, false, noAssert); }; Buffer.prototype.writeInt16BE = function(value, offset, noAssert) { writeInt16(this, value, offset, true, noAssert); }; function writeInt32(buffer, value, offset, isBigEndian, noAssert) { if (!noAssert) { assert.ok(value !== undefined && value !== null, 'missing value'); assert.ok(typeof (isBigEndian) === 'boolean', 'missing or invalid endian'); assert.ok(offset !== undefined && offset !== null, 'missing offset'); assert.ok(offset + 3 < buffer.length, 'Trying to write beyond buffer length'); verifsint(value, 0x7fffffff, -0x80000000); } if (value >= 0) { writeUInt32(buffer, value, offset, isBigEndian, noAssert); } else { writeUInt32(buffer, 0xffffffff + value + 1, offset, isBigEndian, noAssert); } } Buffer.prototype.writeInt32LE = function(value, offset, noAssert) { writeInt32(this, value, offset, false, noAssert); }; Buffer.prototype.writeInt32BE = function(value, offset, noAssert) { writeInt32(this, value, offset, true, noAssert); }; function writeFloat(buffer, value, offset, isBigEndian, noAssert) { if (!noAssert) { assert.ok(value !== undefined && value !== null, 'missing value'); assert.ok(typeof (isBigEndian) === 'boolean', 'missing or invalid endian'); assert.ok(offset !== undefined && offset !== null, 'missing offset'); assert.ok(offset + 3 < buffer.length, 'Trying to write beyond buffer length'); verifIEEE754(value, 3.4028234663852886e+38, -3.4028234663852886e+38); } require('./buffer_ieee754').writeIEEE754(buffer, value, offset, isBigEndian, 23, 4); } Buffer.prototype.writeFloatLE = function(value, offset, noAssert) { writeFloat(this, value, offset, false, noAssert); }; Buffer.prototype.writeFloatBE = function(value, offset, noAssert) { writeFloat(this, value, offset, true, noAssert); }; function writeDouble(buffer, value, offset, isBigEndian, noAssert) { if (!noAssert) { assert.ok(value !== undefined && value !== null, 'missing value'); assert.ok(typeof (isBigEndian) === 'boolean', 'missing or invalid endian'); assert.ok(offset !== undefined && offset !== null, 'missing offset'); assert.ok(offset + 7 < buffer.length, 'Trying to write beyond buffer length'); verifIEEE754(value, 1.7976931348623157E+308, -1.7976931348623157E+308); } require('./buffer_ieee754').writeIEEE754(buffer, value, offset, isBigEndian, 52, 8); } Buffer.prototype.writeDoubleLE = function(value, offset, noAssert) { writeDouble(this, value, offset, false, noAssert); }; Buffer.prototype.writeDoubleBE = function(value, offset, noAssert) { writeDouble(this, value, offset, true, noAssert); }; },{"./buffer_ieee754":22,"assert":18,"base64-js":24}],24:[function(require,module,exports){ (function (exports) { 'use strict'; var lookup = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'; function b64ToByteArray(b64) { var i, j, l, tmp, placeHolders, arr; if (b64.length % 4 > 0) { throw 'Invalid string. Length must be a multiple of 4'; } // the number of equal signs (place holders) // if there are two placeholders, than the two characters before it // represent one byte // if there is only one, then the three characters before it represent 2 bytes // this is just a cheap hack to not do indexOf twice placeHolders = b64.indexOf('='); placeHolders = placeHolders > 0 ? b64.length - placeHolders : 0; // base64 is 4/3 + up to two characters of the original data arr = [];//new Uint8Array(b64.length * 3 / 4 - placeHolders); // if there are placeholders, only get up to the last complete 4 chars l = placeHolders > 0 ? b64.length - 4 : b64.length; for (i = 0, j = 0; i < l; i += 4, j += 3) { tmp = (lookup.indexOf(b64[i]) << 18) | (lookup.indexOf(b64[i + 1]) << 12) | (lookup.indexOf(b64[i + 2]) << 6) | lookup.indexOf(b64[i + 3]); arr.push((tmp & 0xFF0000) >> 16); arr.push((tmp & 0xFF00) >> 8); arr.push(tmp & 0xFF); } if (placeHolders === 2) { tmp = (lookup.indexOf(b64[i]) << 2) | (lookup.indexOf(b64[i + 1]) >> 4); arr.push(tmp & 0xFF); } else if (placeHolders === 1) { tmp = (lookup.indexOf(b64[i]) << 10) | (lookup.indexOf(b64[i + 1]) << 4) | (lookup.indexOf(b64[i + 2]) >> 2); arr.push((tmp >> 8) & 0xFF); arr.push(tmp & 0xFF); } return arr; } function uint8ToBase64(uint8) { var i, extraBytes = uint8.length % 3, // if we have 1 byte left, pad 2 bytes output = "", temp, length; function tripletToBase64 (num) { return lookup[num >> 18 & 0x3F] + lookup[num >> 12 & 0x3F] + lookup[num >> 6 & 0x3F] + lookup[num & 0x3F]; }; // go through the array every three bytes, we'll deal with trailing stuff later for (i = 0, length = uint8.length - extraBytes; i < length; i += 3) { temp = (uint8[i] << 16) + (uint8[i + 1] << 8) + (uint8[i + 2]); output += tripletToBase64(temp); } // pad the end with zeros, but make sure to not forget the extra bytes switch (extraBytes) { case 1: temp = uint8[uint8.length - 1]; output += lookup[temp >> 2]; output += lookup[(temp << 4) & 0x3F]; output += '=='; break; case 2: temp = (uint8[uint8.length - 2] << 8) + (uint8[uint8.length - 1]); output += lookup[temp >> 10]; output += lookup[(temp >> 4) & 0x3F]; output += lookup[(temp << 2) & 0x3F]; output += '='; break; } return output; } module.exports.toByteArray = b64ToByteArray; module.exports.fromByteArray = uint8ToBase64; }()); },{}],25:[function(require,module,exports){ var Buffer = require('buffer').Buffer; var intSize = 4; var zeroBuffer = new Buffer(intSize); zeroBuffer.fill(0); var chrsz = 8; function toArray(buf, bigEndian) { if ((buf.length % intSize) !== 0) { var len = buf.length + (intSize - (buf.length % intSize)); buf = Buffer.concat([buf, zeroBuffer], len); } var arr = []; var fn = bigEndian ? buf.readInt32BE : buf.readInt32LE; for (var i = 0; i < buf.length; i += intSize) { arr.push(fn.call(buf, i)); } return arr; } function toBuffer(arr, size, bigEndian) { var buf = new Buffer(size); var fn = bigEndian ? buf.writeInt32BE : buf.writeInt32LE; for (var i = 0; i < arr.length; i++) { fn.call(buf, arr[i], i * 4, true); } return buf; } function hash(buf, fn, hashSize, bigEndian) { if (!Buffer.isBuffer(buf)) buf = new Buffer(buf); var arr = fn(toArray(buf, bigEndian), buf.length * chrsz); return toBuffer(arr, hashSize, bigEndian); } module.exports = { hash: hash }; },{"buffer":23}],26:[function(require,module,exports){ var Buffer = require('buffer').Buffer var sha = require('./sha') var sha256 = require('./sha256') var rng = require('./rng') var md5 = require('./md5') var algorithms = { sha1: sha, sha256: sha256, md5: md5 } var blocksize = 64 var zeroBuffer = new Buffer(blocksize); zeroBuffer.fill(0) function hmac(fn, key, data) { if(!Buffer.isBuffer(key)) key = new Buffer(key) if(!Buffer.isBuffer(data)) data = new Buffer(data) if(key.length > blocksize) { key = fn(key) } else if(key.length < blocksize) { key = Buffer.concat([key, zeroBuffer], blocksize) } var ipad = new Buffer(blocksize), opad = new Buffer(blocksize) for(var i = 0; i < blocksize; i++) { ipad[i] = key[i] ^ 0x36 opad[i] = key[i] ^ 0x5C } var hash = fn(Buffer.concat([ipad, data])) return fn(Buffer.concat([opad, hash])) } function hash(alg, key) { alg = alg || 'sha1' var fn = algorithms[alg] var bufs = [] var length = 0 if(!fn) error('algorithm:', alg, 'is not yet supported') return { update: function (data) { if(!Buffer.isBuffer(data)) data = new Buffer(data) bufs.push(data) length += data.length return this }, digest: function (enc) { var buf = Buffer.concat(bufs) var r = key ? hmac(fn, key, buf) : fn(buf) bufs = null return enc ? r.toString(enc) : r } } } function error () { var m = [].slice.call(arguments).join(' ') throw new Error([ m, 'we accept pull requests', 'http://github.com/dominictarr/crypto-browserify' ].join('\n')) } exports.createHash = function (alg) { return hash(alg) } exports.createHmac = function (alg, key) { return hash(alg, key) } exports.randomBytes = function(size, callback) { if (callback && callback.call) { try { callback.call(this, undefined, new Buffer(rng(size))) } catch (err) { callback(err) } } else { return new Buffer(rng(size)) } } function each(a, f) { for(var i in a) f(a[i], i) } // the least I can do is make error messages for the rest of the node.js/crypto api. each(['createCredentials' , 'createCipher' , 'createCipheriv' , 'createDecipher' , 'createDecipheriv' , 'createSign' , 'createVerify' , 'createDiffieHellman' , 'pbkdf2'], function (name) { exports[name] = function () { error('sorry,', name, 'is not implemented yet') } }) },{"./md5":27,"./rng":28,"./sha":29,"./sha256":30,"buffer":23}],27:[function(require,module,exports){ /* * A JavaScript implementation of the RSA Data Security, Inc. MD5 Message * Digest Algorithm, as defined in RFC 1321. * Version 2.1 Copyright (C) Paul Johnston 1999 - 2002. * Other contributors: Greg Holt, Andrew Kepert, Ydnar, Lostinet * Distributed under the BSD License * See http://pajhome.org.uk/crypt/md5 for more info. */ var helpers = require('./helpers'); /* * Perform a simple self-test to see if the VM is working */ function md5_vm_test() { return hex_md5("abc") == "900150983cd24fb0d6963f7d28e17f72"; } /* * Calculate the MD5 of an array of little-endian words, and a bit length */ function core_md5(x, len) { /* append padding */ x[len >> 5] |= 0x80 << ((len) % 32); x[(((len + 64) >>> 9) << 4) + 14] = len; var a = 1732584193; var b = -271733879; var c = -1732584194; var d = 271733878; for(var i = 0; i < x.length; i += 16) { var olda = a; var oldb = b; var oldc = c; var oldd = d; a = md5_ff(a, b, c, d, x[i+ 0], 7 , -680876936); d = md5_ff(d, a, b, c, x[i+ 1], 12, -389564586); c = md5_ff(c, d, a, b, x[i+ 2], 17, 606105819); b = md5_ff(b, c, d, a, x[i+ 3], 22, -1044525330); a = md5_ff(a, b, c, d, x[i+ 4], 7 , -176418897); d = md5_ff(d, a, b, c, x[i+ 5], 12, 1200080426); c = md5_ff(c, d, a, b, x[i+ 6], 17, -1473231341); b = md5_ff(b, c, d, a, x[i+ 7], 22, -45705983); a = md5_ff(a, b, c, d, x[i+ 8], 7 , 1770035416); d = md5_ff(d, a, b, c, x[i+ 9], 12, -1958414417); c = md5_ff(c, d, a, b, x[i+10], 17, -42063); b = md5_ff(b, c, d, a, x[i+11], 22, -1990404162); a = md5_ff(a, b, c, d, x[i+12], 7 , 1804603682); d = md5_ff(d, a, b, c, x[i+13], 12, -40341101); c = md5_ff(c, d, a, b, x[i+14], 17, -1502002290); b = md5_ff(b, c, d, a, x[i+15], 22, 1236535329); a = md5_gg(a, b, c, d, x[i+ 1], 5 , -165796510); d = md5_gg(d, a, b, c, x[i+ 6], 9 , -1069501632); c = md5_gg(c, d, a, b, x[i+11], 14, 643717713); b = md5_gg(b, c, d, a, x[i+ 0], 20, -373897302); a = md5_gg(a, b, c, d, x[i+ 5], 5 , -701558691); d = md5_gg(d, a, b, c, x[i+10], 9 , 38016083); c = md5_gg(c, d, a, b, x[i+15], 14, -660478335); b = md5_gg(b, c, d, a, x[i+ 4], 20, -405537848); a = md5_gg(a, b, c, d, x[i+ 9], 5 , 568446438); d = md5_gg(d, a, b, c, x[i+14], 9 , -1019803690); c = md5_gg(c, d, a, b, x[i+ 3], 14, -187363961); b = md5_gg(b, c, d, a, x[i+ 8], 20, 1163531501); a = md5_gg(a, b, c, d, x[i+13], 5 , -1444681467); d = md5_gg(d, a, b, c, x[i+ 2], 9 , -51403784); c = md5_gg(c, d, a, b, x[i+ 7], 14, 1735328473); b = md5_gg(b, c, d, a, x[i+12], 20, -1926607734); a = md5_hh(a, b, c, d, x[i+ 5], 4 , -378558); d = md5_hh(d, a, b, c, x[i+ 8], 11, -2022574463); c = md5_hh(c, d, a, b, x[i+11], 16, 1839030562); b = md5_hh(b, c, d, a, x[i+14], 23, -35309556); a = md5_hh(a, b, c, d, x[i+ 1], 4 , -1530992060); d = md5_hh(d, a, b, c, x[i+ 4], 11, 1272893353); c = md5_hh(c, d, a, b, x[i+ 7], 16, -155497632); b = md5_hh(b, c, d, a, x[i+10], 23, -1094730640); a = md5_hh(a, b, c, d, x[i+13], 4 , 681279174); d = md5_hh(d, a, b, c, x[i+ 0], 11, -358537222); c = md5_hh(c, d, a, b, x[i+ 3], 16, -722521979); b = md5_hh(b, c, d, a, x[i+ 6], 23, 76029189); a = md5_hh(a, b, c, d, x[i+ 9], 4 , -640364487); d = md5_hh(d, a, b, c, x[i+12], 11, -421815835); c = md5_hh(c, d, a, b, x[i+15], 16, 530742520); b = md5_hh(b, c, d, a, x[i+ 2], 23, -995338651); a = md5_ii(a, b, c, d, x[i+ 0], 6 , -198630844); d = md5_ii(d, a, b, c, x[i+ 7], 10, 1126891415); c = md5_ii(c, d, a, b, x[i+14], 15, -1416354905); b = md5_ii(b, c, d, a, x[i+ 5], 21, -57434055); a = md5_ii(a, b, c, d, x[i+12], 6 , 1700485571); d = md5_ii(d, a, b, c, x[i+ 3], 10, -1894986606); c = md5_ii(c, d, a, b, x[i+10], 15, -1051523); b = md5_ii(b, c, d, a, x[i+ 1], 21, -2054922799); a = md5_ii(a, b, c, d, x[i+ 8], 6 , 1873313359); d = md5_ii(d, a, b, c, x[i+15], 10, -30611744); c = md5_ii(c, d, a, b, x[i+ 6], 15, -1560198380); b = md5_ii(b, c, d, a, x[i+13], 21, 1309151649); a = md5_ii(a, b, c, d, x[i+ 4], 6 , -145523070); d = md5_ii(d, a, b, c, x[i+11], 10, -1120210379); c = md5_ii(c, d, a, b, x[i+ 2], 15, 718787259); b = md5_ii(b, c, d, a, x[i+ 9], 21, -343485551); a = safe_add(a, olda); b = safe_add(b, oldb); c = safe_add(c, oldc); d = safe_add(d, oldd); } return Array(a, b, c, d); } /* * These functions implement the four basic operations the algorithm uses. */ function md5_cmn(q, a, b, x, s, t) { return safe_add(bit_rol(safe_add(safe_add(a, q), safe_add(x, t)), s),b); } function md5_ff(a, b, c, d, x, s, t) { return md5_cmn((b & c) | ((~b) & d), a, b, x, s, t); } function md5_gg(a, b, c, d, x, s, t) { return md5_cmn((b & d) | (c & (~d)), a, b, x, s, t); } function md5_hh(a, b, c, d, x, s, t) { return md5_cmn(b ^ c ^ d, a, b, x, s, t); } function md5_ii(a, b, c, d, x, s, t) { return md5_cmn(c ^ (b | (~d)), a, b, x, s, t); } /* * Add integers, wrapping at 2^32. This uses 16-bit operations internally * to work around bugs in some JS interpreters. */ function safe_add(x, y) { var lsw = (x & 0xFFFF) + (y & 0xFFFF); var msw = (x >> 16) + (y >> 16) + (lsw >> 16); return (msw << 16) | (lsw & 0xFFFF); } /* * Bitwise rotate a 32-bit number to the left. */ function bit_rol(num, cnt) { return (num << cnt) | (num >>> (32 - cnt)); } module.exports = function md5(buf) { return helpers.hash(buf, core_md5, 16); }; },{"./helpers":25}],28:[function(require,module,exports){ // Original code adapted from Robert Kieffer. // details at https://github.com/broofa/node-uuid (function() { var _global = this; var mathRNG, whatwgRNG; // NOTE: Math.random() does not guarantee "cryptographic quality" mathRNG = function(size) { var bytes = new Array(size); var r; for (var i = 0, r; i < size; i++) { if ((i & 0x03) == 0) r = Math.random() * 0x100000000; bytes[i] = r >>> ((i & 0x03) << 3) & 0xff; } return bytes; } if (_global.crypto && crypto.getRandomValues) { whatwgRNG = function(size) { var bytes = new Uint8Array(size); crypto.getRandomValues(bytes); return bytes; } } module.exports = whatwgRNG || mathRNG; }()) },{}],29:[function(require,module,exports){ /* * A JavaScript implementation of the Secure Hash Algorithm, SHA-1, as defined * in FIPS PUB 180-1 * Version 2.1a Copyright Paul Johnston 2000 - 2002. * Other contributors: Greg Holt, Andrew Kepert, Ydnar, Lostinet * Distributed under the BSD License * See http://pajhome.org.uk/crypt/md5 for details. */ var helpers = require('./helpers'); /* * Calculate the SHA-1 of an array of big-endian words, and a bit length */ function core_sha1(x, len) { /* append padding */ x[len >> 5] |= 0x80 << (24 - len % 32); x[((len + 64 >> 9) << 4) + 15] = len; var w = Array(80); var a = 1732584193; var b = -271733879; var c = -1732584194; var d = 271733878; var e = -1009589776; for(var i = 0; i < x.length; i += 16) { var olda = a; var oldb = b; var oldc = c; var oldd = d; var olde = e; for(var j = 0; j < 80; j++) { if(j < 16) w[j] = x[i + j]; else w[j] = rol(w[j-3] ^ w[j-8] ^ w[j-14] ^ w[j-16], 1); var t = safe_add(safe_add(rol(a, 5), sha1_ft(j, b, c, d)), safe_add(safe_add(e, w[j]), sha1_kt(j))); e = d; d = c; c = rol(b, 30); b = a; a = t; } a = safe_add(a, olda); b = safe_add(b, oldb); c = safe_add(c, oldc); d = safe_add(d, oldd); e = safe_add(e, olde); } return Array(a, b, c, d, e); } /* * Perform the appropriate triplet combination function for the current * iteration */ function sha1_ft(t, b, c, d) { if(t < 20) return (b & c) | ((~b) & d); if(t < 40) return b ^ c ^ d; if(t < 60) return (b & c) | (b & d) | (c & d); return b ^ c ^ d; } /* * Determine the appropriate additive constant for the current iteration */ function sha1_kt(t) { return (t < 20) ? 1518500249 : (t < 40) ? 1859775393 : (t < 60) ? -1894007588 : -899497514; } /* * Add integers, wrapping at 2^32. This uses 16-bit operations internally * to work around bugs in some JS interpreters. */ function safe_add(x, y) { var lsw = (x & 0xFFFF) + (y & 0xFFFF); var msw = (x >> 16) + (y >> 16) + (lsw >> 16); return (msw << 16) | (lsw & 0xFFFF); } /* * Bitwise rotate a 32-bit number to the left. */ function rol(num, cnt) { return (num << cnt) | (num >>> (32 - cnt)); } module.exports = function sha1(buf) { return helpers.hash(buf, core_sha1, 20, true); }; },{"./helpers":25}],30:[function(require,module,exports){ /** * A JavaScript implementation of the Secure Hash Algorithm, SHA-256, as defined * in FIPS 180-2 * Version 2.2-beta Copyright Angel Marin, Paul Johnston 2000 - 2009. * Other contributors: Greg Holt, Andrew Kepert, Ydnar, Lostinet * */ var helpers = require('./helpers'); var safe_add = function(x, y) { var lsw = (x & 0xFFFF) + (y & 0xFFFF); var msw = (x >> 16) + (y >> 16) + (lsw >> 16); return (msw << 16) | (lsw & 0xFFFF); }; var S = function(X, n) { return (X >>> n) | (X << (32 - n)); }; var R = function(X, n) { return (X >>> n); }; var Ch = function(x, y, z) { return ((x & y) ^ ((~x) & z)); }; var Maj = function(x, y, z) { return ((x & y) ^ (x & z) ^ (y & z)); }; var Sigma0256 = function(x) { return (S(x, 2) ^ S(x, 13) ^ S(x, 22)); }; var Sigma1256 = function(x) { return (S(x, 6) ^ S(x, 11) ^ S(x, 25)); }; var Gamma0256 = function(x) { return (S(x, 7) ^ S(x, 18) ^ R(x, 3)); }; var Gamma1256 = function(x) { return (S(x, 17) ^ S(x, 19) ^ R(x, 10)); }; var core_sha256 = function(m, l) { var K = new Array(0x428A2F98,0x71374491,0xB5C0FBCF,0xE9B5DBA5,0x3956C25B,0x59F111F1,0x923F82A4,0xAB1C5ED5,0xD807AA98,0x12835B01,0x243185BE,0x550C7DC3,0x72BE5D74,0x80DEB1FE,0x9BDC06A7,0xC19BF174,0xE49B69C1,0xEFBE4786,0xFC19DC6,0x240CA1CC,0x2DE92C6F,0x4A7484AA,0x5CB0A9DC,0x76F988DA,0x983E5152,0xA831C66D,0xB00327C8,0xBF597FC7,0xC6E00BF3,0xD5A79147,0x6CA6351,0x14292967,0x27B70A85,0x2E1B2138,0x4D2C6DFC,0x53380D13,0x650A7354,0x766A0ABB,0x81C2C92E,0x92722C85,0xA2BFE8A1,0xA81A664B,0xC24B8B70,0xC76C51A3,0xD192E819,0xD6990624,0xF40E3585,0x106AA070,0x19A4C116,0x1E376C08,0x2748774C,0x34B0BCB5,0x391C0CB3,0x4ED8AA4A,0x5B9CCA4F,0x682E6FF3,0x748F82EE,0x78A5636F,0x84C87814,0x8CC70208,0x90BEFFFA,0xA4506CEB,0xBEF9A3F7,0xC67178F2); var HASH = new Array(0x6A09E667, 0xBB67AE85, 0x3C6EF372, 0xA54FF53A, 0x510E527F, 0x9B05688C, 0x1F83D9AB, 0x5BE0CD19); var W = new Array(64); var a, b, c, d, e, f, g, h, i, j; var T1, T2; /* append padding */ m[l >> 5] |= 0x80 << (24 - l % 32); m[((l + 64 >> 9) << 4) + 15] = l; for (var i = 0; i < m.length; i += 16) { a = HASH[0]; b = HASH[1]; c = HASH[2]; d = HASH[3]; e = HASH[4]; f = HASH[5]; g = HASH[6]; h = HASH[7]; for (var j = 0; j < 64; j++) { if (j < 16) { W[j] = m[j + i]; } else { W[j] = safe_add(safe_add(safe_add(Gamma1256(W[j - 2]), W[j - 7]), Gamma0256(W[j - 15])), W[j - 16]); } T1 = safe_add(safe_add(safe_add(safe_add(h, Sigma1256(e)), Ch(e, f, g)), K[j]), W[j]); T2 = safe_add(Sigma0256(a), Maj(a, b, c)); h = g; g = f; f = e; e = safe_add(d, T1); d = c; c = b; b = a; a = safe_add(T1, T2); } HASH[0] = safe_add(a, HASH[0]); HASH[1] = safe_add(b, HASH[1]); HASH[2] = safe_add(c, HASH[2]); HASH[3] = safe_add(d, HASH[3]); HASH[4] = safe_add(e, HASH[4]); HASH[5] = safe_add(f, HASH[5]); HASH[6] = safe_add(g, HASH[6]); HASH[7] = safe_add(h, HASH[7]); } return HASH; }; module.exports = function sha256(buf) { return helpers.hash(buf, core_sha256, 32, true); }; },{"./helpers":25}],31:[function(require,module,exports){ // shim for using process in browser var process = module.exports = {}; process.nextTick = (function () { var canSetImmediate = typeof window !== 'undefined' && window.setImmediate; var canPost = typeof window !== 'undefined' && window.postMessage && window.addEventListener ; if (canSetImmediate) { return function (f) { return window.setImmediate(f) }; } if (canPost) { var queue = []; window.addEventListener('message', function (ev) { if (ev.source === window && ev.data === 'process-tick') { ev.stopPropagation(); if (queue.length > 0) { var fn = queue.shift(); fn(); } } }, true); return function nextTick(fn) { queue.push(fn); window.postMessage('process-tick', '*'); }; } return function nextTick(fn) { setTimeout(fn, 0); }; })(); process.title = 'browser'; process.browser = true; process.env = {}; process.argv = []; process.binding = function (name) { throw new Error('process.binding is not supported'); } // TODO(shtylman) process.cwd = function () { return '/' }; process.chdir = function (dir) { throw new Error('process.chdir is not supported'); }; },{}],32:[function(require,module,exports){ /*jslint eqeqeq: false, onevar: false, forin: true, nomen: false, regexp: false, plusplus: false*/ /*global module, require, __dirname, document*/ /** * Sinon core utilities. For internal use only. * * @author Christian Johansen (christian@cjohansen.no) * @license BSD * * Copyright (c) 2010-2013 Christian Johansen */ "use strict"; var sinon = (function (buster) { var div = typeof document != "undefined" && document.createElement("div"); var hasOwn = Object.prototype.hasOwnProperty; function isDOMNode(obj) { var success = false; try { obj.appendChild(div); success = div.parentNode == obj; } catch (e) { return false; } finally { try { obj.removeChild(div); } catch (e) { // Remove failed, not much we can do about that } } return success; } function isElement(obj) { return div && obj && obj.nodeType === 1 && isDOMNode(obj); } function isFunction(obj) { return typeof obj === "function" || !!(obj && obj.constructor && obj.call && obj.apply); } function mirrorProperties(target, source) { for (var prop in source) { if (!hasOwn.call(target, prop)) { target[prop] = source[prop]; } } } function isRestorable (obj) { return typeof obj === "function" && typeof obj.restore === "function" && obj.restore.sinon; } var sinon = { wrapMethod: function wrapMethod(object, property, method) { if (!object) { throw new TypeError("Should wrap property of object"); } if (typeof method != "function") { throw new TypeError("Method wrapper should be function"); } var wrappedMethod = object[property]; if (!isFunction(wrappedMethod)) { throw new TypeError("Attempted to wrap " + (typeof wrappedMethod) + " property " + property + " as function"); } if (wrappedMethod.restore && wrappedMethod.restore.sinon) { throw new TypeError("Attempted to wrap " + property + " which is already wrapped"); } if (wrappedMethod.calledBefore) { var verb = !!wrappedMethod.returns ? "stubbed" : "spied on"; throw new TypeError("Attempted to wrap " + property + " which is already " + verb); } // IE 8 does not support hasOwnProperty on the window object. var owned = hasOwn.call(object, property); object[property] = method; method.displayName = property; method.restore = function () { // For prototype properties try to reset by delete first. // If this fails (ex: localStorage on mobile safari) then force a reset // via direct assignment. if (!owned) { delete object[property]; } if (object[property] === method) { object[property] = wrappedMethod; } }; method.restore.sinon = true; mirrorProperties(method, wrappedMethod); return method; }, extend: function extend(target) { for (var i = 1, l = arguments.length; i < l; i += 1) { for (var prop in arguments[i]) { if (arguments[i].hasOwnProperty(prop)) { target[prop] = arguments[i][prop]; } // DONT ENUM bug, only care about toString if (arguments[i].hasOwnProperty("toString") && arguments[i].toString != target.toString) { target.toString = arguments[i].toString; } } } return target; }, create: function create(proto) { var F = function () {}; F.prototype = proto; return new F(); }, deepEqual: function deepEqual(a, b) { if (sinon.match && sinon.match.isMatcher(a)) { return a.test(b); } if (typeof a != "object" || typeof b != "object") { return a === b; } if (isElement(a) || isElement(b)) { return a === b; } if (a === b) { return true; } if ((a === null && b !== null) || (a !== null && b === null)) { return false; } var aString = Object.prototype.toString.call(a); if (aString != Object.prototype.toString.call(b)) { return false; } if (aString == "[object Array]") { if (a.length !== b.length) { return false; } for (var i = 0, l = a.length; i < l; i += 1) { if (!deepEqual(a[i], b[i])) { return false; } } return true; } if (aString == "[object Date]") { return a.valueOf() === b.valueOf(); } var prop, aLength = 0, bLength = 0; for (prop in a) { aLength += 1; if (!deepEqual(a[prop], b[prop])) { return false; } } for (prop in b) { bLength += 1; } return aLength == bLength; }, functionName: function functionName(func) { var name = func.displayName || func.name; // Use function decomposition as a last resort to get function // name. Does not rely on function decomposition to work - if it // doesn't debugging will be slightly less informative // (i.e. toString will say 'spy' rather than 'myFunc'). if (!name) { var matches = func.toString().match(/function ([^\s\(]+)/); name = matches && matches[1]; } return name; }, functionToString: function toString() { if (this.getCall && this.callCount) { var thisValue, prop, i = this.callCount; while (i--) { thisValue = this.getCall(i).thisValue; for (prop in thisValue) { if (thisValue[prop] === this) { return prop; } } } } return this.displayName || "sinon fake"; }, getConfig: function (custom) { var config = {}; custom = custom || {}; var defaults = sinon.defaultConfig; for (var prop in defaults) { if (defaults.hasOwnProperty(prop)) { config[prop] = custom.hasOwnProperty(prop) ? custom[prop] : defaults[prop]; } } return config; }, format: function (val) { return "" + val; }, defaultConfig: { injectIntoThis: true, injectInto: null, properties: ["spy", "stub", "mock", "clock", "server", "requests"], useFakeTimers: true, useFakeServer: true }, timesInWords: function timesInWords(count) { return count == 1 && "once" || count == 2 && "twice" || count == 3 && "thrice" || (count || 0) + " times"; }, calledInOrder: function (spies) { for (var i = 1, l = spies.length; i < l; i++) { if (!spies[i - 1].calledBefore(spies[i]) || !spies[i].called) { return false; } } return true; }, orderByFirstCall: function (spies) { return spies.sort(function (a, b) { // uuid, won't ever be equal var aCall = a.getCall(0); var bCall = b.getCall(0); var aId = aCall && aCall.callId || -1; var bId = bCall && bCall.callId || -1; return aId < bId ? -1 : 1; }); }, log: function () {}, logError: function (label, err) { var msg = label + " threw exception: " sinon.log(msg + "[" + err.name + "] " + err.message); if (err.stack) { sinon.log(err.stack); } setTimeout(function () { err.message = msg + err.message; throw err; }, 0); }, typeOf: function (value) { if (value === null) { return "null"; } else if (value === undefined) { return "undefined"; } var string = Object.prototype.toString.call(value); return string.substring(8, string.length - 1).toLowerCase(); }, createStubInstance: function (constructor) { if (typeof constructor !== "function") { throw new TypeError("The constructor should be a function."); } return sinon.stub(sinon.create(constructor.prototype)); }, restore: function (object) { if (object !== null && typeof object === "object") { for (var prop in object) { if (isRestorable(object[prop])) { object[prop].restore(); } } } else if (isRestorable(object)) { object.restore(); } } }; var isNode = typeof module == "object" && typeof require == "function"; if (isNode) { try { buster = { format: require("buster-format") }; } catch (e) {} module.exports = sinon; module.exports.spy = require("./sinon/spy"); module.exports.stub = require("./sinon/stub"); module.exports.mock = require("./sinon/mock"); module.exports.collection = require("./sinon/collection"); module.exports.assert = require("./sinon/assert"); module.exports.sandbox = require("./sinon/sandbox"); module.exports.test = require("./sinon/test"); module.exports.testCase = require("./sinon/test_case"); module.exports.assert = require("./sinon/assert"); module.exports.match = require("./sinon/match"); } if (buster) { var formatter = sinon.create(buster.format); formatter.quoteStrings = false; sinon.format = function () { return formatter.ascii.apply(formatter, arguments); }; } else if (isNode) { try { var util = require("util"); sinon.format = function (value) { return typeof value == "object" && value.toString === Object.prototype.toString ? util.inspect(value) : value; }; } catch (e) { /* Node, but no util module - would be very old, but better safe than sorry */ } } return sinon; }(typeof buster == "object" && buster)); },{"./sinon/assert":33,"./sinon/collection":34,"./sinon/match":35,"./sinon/mock":36,"./sinon/sandbox":37,"./sinon/spy":38,"./sinon/stub":39,"./sinon/test":40,"./sinon/test_case":41,"buster-format":43,"util":21}],33:[function(require,module,exports){ var global=typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {};/** * @depend ../sinon.js * @depend stub.js */ /*jslint eqeqeq: false, onevar: false, nomen: false, plusplus: false*/ /*global module, require, sinon*/ /** * Assertions matching the test spy retrieval interface. * * @author Christian Johansen (christian@cjohansen.no) * @license BSD * * Copyright (c) 2010-2013 Christian Johansen */ "use strict"; (function (sinon, global) { var commonJSModule = typeof module == "object" && typeof require == "function"; var slice = Array.prototype.slice; var assert; if (!sinon && commonJSModule) { sinon = require("../sinon"); } if (!sinon) { return; } function verifyIsStub() { var method; for (var i = 0, l = arguments.length; i < l; ++i) { method = arguments[i]; if (!method) { assert.fail("fake is not a spy"); } if (typeof method != "function") { assert.fail(method + " is not a function"); } if (typeof method.getCall != "function") { assert.fail(method + " is not stubbed"); } } } function failAssertion(object, msg) { object = object || global; var failMethod = object.fail || assert.fail; failMethod.call(object, msg); } function mirrorPropAsAssertion(name, method, message) { if (arguments.length == 2) { message = method; method = name; } assert[name] = function (fake) { verifyIsStub(fake); var args = slice.call(arguments, 1); var failed = false; if (typeof method == "function") { failed = !method(fake); } else { failed = typeof fake[method] == "function" ? !fake[method].apply(fake, args) : !fake[method]; } if (failed) { failAssertion(this, fake.printf.apply(fake, [message].concat(args))); } else { assert.pass(name); } }; } function exposedName(prefix, prop) { return !prefix || /^fail/.test(prop) ? prop : prefix + prop.slice(0, 1).toUpperCase() + prop.slice(1); }; assert = { failException: "AssertError", fail: function fail(message) { var error = new Error(message); error.name = this.failException || assert.failException; throw error; }, pass: function pass(assertion) {}, callOrder: function assertCallOrder() { verifyIsStub.apply(null, arguments); var expected = "", actual = ""; if (!sinon.calledInOrder(arguments)) { try { expected = [].join.call(arguments, ", "); var calls = slice.call(arguments); var i = calls.length; while (i) { if (!calls[--i].called) { calls.splice(i, 1); } } actual = sinon.orderByFirstCall(calls).join(", "); } catch (e) { // If this fails, we'll just fall back to the blank string } failAssertion(this, "expected " + expected + " to be " + "called in order but were called as " + actual); } else { assert.pass("callOrder"); } }, callCount: function assertCallCount(method, count) { verifyIsStub(method); if (method.callCount != count) { var msg = "expected %n to be called " + sinon.timesInWords(count) + " but was called %c%C"; failAssertion(this, method.printf(msg)); } else { assert.pass("callCount"); } }, expose: function expose(target, options) { if (!target) { throw new TypeError("target is null or undefined"); } var o = options || {}; var prefix = typeof o.prefix == "undefined" && "assert" || o.prefix; var includeFail = typeof o.includeFail == "undefined" || !!o.includeFail; for (var method in this) { if (method != "export" && (includeFail || !/^(fail)/.test(method))) { target[exposedName(prefix, method)] = this[method]; } } return target; } }; mirrorPropAsAssertion("called", "expected %n to have been called at least once but was never called"); mirrorPropAsAssertion("notCalled", function (spy) { return !spy.called; }, "expected %n to not have been called but was called %c%C"); mirrorPropAsAssertion("calledOnce", "expected %n to be called once but was called %c%C"); mirrorPropAsAssertion("calledTwice", "expected %n to be called twice but was called %c%C"); mirrorPropAsAssertion("calledThrice", "expected %n to be called thrice but was called %c%C"); mirrorPropAsAssertion("calledOn", "expected %n to be called with %1 as this but was called with %t"); mirrorPropAsAssertion("alwaysCalledOn", "expected %n to always be called with %1 as this but was called with %t"); mirrorPropAsAssertion("calledWithNew", "expected %n to be called with new"); mirrorPropAsAssertion("alwaysCalledWithNew", "expected %n to always be called with new"); mirrorPropAsAssertion("calledWith", "expected %n to be called with arguments %*%C"); mirrorPropAsAssertion("calledWithMatch", "expected %n to be called with match %*%C"); mirrorPropAsAssertion("alwaysCalledWith", "expected %n to always be called with arguments %*%C"); mirrorPropAsAssertion("alwaysCalledWithMatch", "expected %n to always be called with match %*%C"); mirrorPropAsAssertion("calledWithExactly", "expected %n to be called with exact arguments %*%C"); mirrorPropAsAssertion("alwaysCalledWithExactly", "expected %n to always be called with exact arguments %*%C"); mirrorPropAsAssertion("neverCalledWith", "expected %n to never be called with arguments %*%C"); mirrorPropAsAssertion("neverCalledWithMatch", "expected %n to never be called with match %*%C"); mirrorPropAsAssertion("threw", "%n did not throw exception%C"); mirrorPropAsAssertion("alwaysThrew", "%n did not always throw exception%C"); if (commonJSModule) { module.exports = assert; } else { sinon.assert = assert; } }(typeof sinon == "object" && sinon || null, typeof window != "undefined" ? window : (typeof self != "undefined") ? self : global)); },{"../sinon":32}],34:[function(require,module,exports){ /** * @depend ../sinon.js * @depend stub.js * @depend mock.js */ /*jslint eqeqeq: false, onevar: false, forin: true*/ /*global module, require, sinon*/ /** * Collections of stubs, spies and mocks. * * @author Christian Johansen (christian@cjohansen.no) * @license BSD * * Copyright (c) 2010-2013 Christian Johansen */ "use strict"; (function (sinon) { var commonJSModule = typeof module == "object" && typeof require == "function"; var push = [].push; var hasOwnProperty = Object.prototype.hasOwnProperty; if (!sinon && commonJSModule) { sinon = require("../sinon"); } if (!sinon) { return; } function getFakes(fakeCollection) { if (!fakeCollection.fakes) { fakeCollection.fakes = []; } return fakeCollection.fakes; } function each(fakeCollection, method) { var fakes = getFakes(fakeCollection); for (var i = 0, l = fakes.length; i < l; i += 1) { if (typeof fakes[i][method] == "function") { fakes[i][method](); } } } function compact(fakeCollection) { var fakes = getFakes(fakeCollection); var i = 0; while (i < fakes.length) { fakes.splice(i, 1); } } var collection = { verify: function resolve() { each(this, "verify"); }, restore: function restore() { each(this, "restore"); compact(this); }, verifyAndRestore: function verifyAndRestore() { var exception; try { this.verify(); } catch (e) { exception = e; } this.restore(); if (exception) { throw exception; } }, add: function add(fake) { push.call(getFakes(this), fake); return fake; }, spy: function spy() { return this.add(sinon.spy.apply(sinon, arguments)); }, stub: function stub(object, property, value) { if (property) { var original = object[property]; if (typeof original != "function") { if (!hasOwnProperty.call(object, property)) { throw new TypeError("Cannot stub non-existent own property " + property); } object[property] = value; return this.add({ restore: function () { object[property] = original; } }); } } if (!property && !!object && typeof object == "object") { var stubbedObj = sinon.stub.apply(sinon, arguments); for (var prop in stubbedObj) { if (typeof stubbedObj[prop] === "function") { this.add(stubbedObj[prop]); } } return stubbedObj; } return this.add(sinon.stub.apply(sinon, arguments)); }, mock: function mock() { return this.add(sinon.mock.apply(sinon, arguments)); }, inject: function inject(obj) { var col = this; obj.spy = function () { return col.spy.apply(col, arguments); }; obj.stub = function () { return col.stub.apply(col, arguments); }; obj.mock = function () { return col.mock.apply(col, arguments); }; return obj; } }; if (commonJSModule) { module.exports = collection; } else { sinon.collection = collection; } }(typeof sinon == "object" && sinon || null)); },{"../sinon":32}],35:[function(require,module,exports){ /* @depend ../sinon.js */ /*jslint eqeqeq: false, onevar: false, plusplus: false*/ /*global module, require, sinon*/ /** * Match functions * * @author Maximilian Antoni (mail@maxantoni.de) * @license BSD * * Copyright (c) 2012 Maximilian Antoni */ "use strict"; (function (sinon) { var commonJSModule = typeof module == "object" && typeof require == "function"; if (!sinon && commonJSModule) { sinon = require("../sinon"); } if (!sinon) { return; } function assertType(value, type, name) { var actual = sinon.typeOf(value); if (actual !== type) { throw new TypeError("Expected type of " + name + " to be " + type + ", but was " + actual); } } var matcher = { toString: function () { return this.message; } }; function isMatcher(object) { return matcher.isPrototypeOf(object); } function matchObject(expectation, actual) { if (actual === null || actual === undefined) { return false; } for (var key in expectation) { if (expectation.hasOwnProperty(key)) { var exp = expectation[key]; var act = actual[key]; if (match.isMatcher(exp)) { if (!exp.test(act)) { return false; } } else if (sinon.typeOf(exp) === "object") { if (!matchObject(exp, act)) { return false; } } else if (!sinon.deepEqual(exp, act)) { return false; } } } return true; } matcher.or = function (m2) { if (!isMatcher(m2)) { throw new TypeError("Matcher expected"); } var m1 = this; var or = sinon.create(matcher); or.test = function (actual) { return m1.test(actual) || m2.test(actual); }; or.message = m1.message + ".or(" + m2.message + ")"; return or; }; matcher.and = function (m2) { if (!isMatcher(m2)) { throw new TypeError("Matcher expected"); } var m1 = this; var and = sinon.create(matcher); and.test = function (actual) { return m1.test(actual) && m2.test(actual); }; and.message = m1.message + ".and(" + m2.message + ")"; return and; }; var match = function (expectation, message) { var m = sinon.create(matcher); var type = sinon.typeOf(expectation); switch (type) { case "object": if (typeof expectation.test === "function") { m.test = function (actual) { return expectation.test(actual) === true; }; m.message = "match(" + sinon.functionName(expectation.test) + ")"; return m; } var str = []; for (var key in expectation) { if (expectation.hasOwnProperty(key)) { str.push(key + ": " + expectation[key]); } } m.test = function (actual) { return matchObject(expectation, actual); }; m.message = "match(" + str.join(", ") + ")"; break; case "number": m.test = function (actual) { return expectation == actual; }; break; case "string": m.test = function (actual) { if (typeof actual !== "string") { return false; } return actual.indexOf(expectation) !== -1; }; m.message = "match(\"" + expectation + "\")"; break; case "regexp": m.test = function (actual) { if (typeof actual !== "string") { return false; } return expectation.test(actual); }; break; case "function": m.test = expectation; if (message) { m.message = message; } else { m.message = "match(" + sinon.functionName(expectation) + ")"; } break; default: m.test = function (actual) { return sinon.deepEqual(expectation, actual); }; } if (!m.message) { m.message = "match(" + expectation + ")"; } return m; }; match.isMatcher = isMatcher; match.any = match(function () { return true; }, "any"); match.defined = match(function (actual) { return actual !== null && actual !== undefined; }, "defined"); match.truthy = match(function (actual) { return !!actual; }, "truthy"); match.falsy = match(function (actual) { return !actual; }, "falsy"); match.same = function (expectation) { return match(function (actual) { return expectation === actual; }, "same(" + expectation + ")"); }; match.typeOf = function (type) { assertType(type, "string", "type"); return match(function (actual) { return sinon.typeOf(actual) === type; }, "typeOf(\"" + type + "\")"); }; match.instanceOf = function (type) { assertType(type, "function", "type"); return match(function (actual) { return actual instanceof type; }, "instanceOf(" + sinon.functionName(type) + ")"); }; function createPropertyMatcher(propertyTest, messagePrefix) { return function (property, value) { assertType(property, "string", "property"); var onlyProperty = arguments.length === 1; var message = messagePrefix + "(\"" + property + "\""; if (!onlyProperty) { message += ", " + value; } message += ")"; return match(function (actual) { if (actual === undefined || actual === null || !propertyTest(actual, property)) { return false; } return onlyProperty || sinon.deepEqual(value, actual[property]); }, message); }; } match.has = createPropertyMatcher(function (actual, property) { if (typeof actual === "object") { return property in actual; } return actual[property] !== undefined; }, "has"); match.hasOwn = createPropertyMatcher(function (actual, property) { return actual.hasOwnProperty(property); }, "hasOwn"); match.bool = match.typeOf("boolean"); match.number = match.typeOf("number"); match.string = match.typeOf("string"); match.object = match.typeOf("object"); match.func = match.typeOf("function"); match.array = match.typeOf("array"); match.regexp = match.typeOf("regexp"); match.date = match.typeOf("date"); if (commonJSModule) { module.exports = match; } else { sinon.match = match; } }(typeof sinon == "object" && sinon || null)); },{"../sinon":32}],36:[function(require,module,exports){ /** * @depend ../sinon.js * @depend stub.js */ /*jslint eqeqeq: false, onevar: false, nomen: false*/ /*global module, require, sinon*/ /** * Mock functions. * * @author Christian Johansen (christian@cjohansen.no) * @license BSD * * Copyright (c) 2010-2013 Christian Johansen */ "use strict"; (function (sinon) { var commonJSModule = typeof module == "object" && typeof require == "function"; var push = [].push; if (!sinon && commonJSModule) { sinon = require("../sinon"); } if (!sinon) { return; } function mock(object) { if (!object) { return sinon.expectation.create("Anonymous mock"); } return mock.create(object); } sinon.mock = mock; sinon.extend(mock, (function () { function each(collection, callback) { if (!collection) { return; } for (var i = 0, l = collection.length; i < l; i += 1) { callback(collection[i]); } } return { create: function create(object) { if (!object) { throw new TypeError("object is null"); } var mockObject = sinon.extend({}, mock); mockObject.object = object; delete mockObject.create; return mockObject; }, expects: function expects(method) { if (!method) { throw new TypeError("method is falsy"); } if (!this.expectations) { this.expectations = {}; this.proxies = []; } if (!this.expectations[method]) { this.expectations[method] = []; var mockObject = this; sinon.wrapMethod(this.object, method, function () { return mockObject.invokeMethod(method, this, arguments); }); push.call(this.proxies, method); } var expectation = sinon.expectation.create(method); push.call(this.expectations[method], expectation); return expectation; }, restore: function restore() { var object = this.object; each(this.proxies, function (proxy) { if (typeof object[proxy].restore == "function") { object[proxy].restore(); } }); }, verify: function verify() { var expectations = this.expectations || {}; var messages = [], met = []; each(this.proxies, function (proxy) { each(expectations[proxy], function (expectation) { if (!expectation.met()) { push.call(messages, expectation.toString()); } else { push.call(met, expectation.toString()); } }); }); this.restore(); if (messages.length > 0) { sinon.expectation.fail(messages.concat(met).join("\n")); } else { sinon.expectation.pass(messages.concat(met).join("\n")); } return true; }, invokeMethod: function invokeMethod(method, thisValue, args) { var expectations = this.expectations && this.expectations[method]; var length = expectations && expectations.length || 0, i; for (i = 0; i < length; i += 1) { if (!expectations[i].met() && expectations[i].allowsCall(thisValue, args)) { return expectations[i].apply(thisValue, args); } } var messages = [], available, exhausted = 0; for (i = 0; i < length; i += 1) { if (expectations[i].allowsCall(thisValue, args)) { available = available || expectations[i]; } else { exhausted += 1; } push.call(messages, " " + expectations[i].toString()); } if (exhausted === 0) { return available.apply(thisValue, args); } messages.unshift("Unexpected call: " + sinon.spyCall.toString.call({ proxy: method, args: args })); sinon.expectation.fail(messages.join("\n")); } }; }())); var times = sinon.timesInWords; sinon.expectation = (function () { var slice = Array.prototype.slice; var _invoke = sinon.spy.invoke; function callCountInWords(callCount) { if (callCount == 0) { return "never called"; } else { return "called " + times(callCount); } } function expectedCallCountInWords(expectation) { var min = expectation.minCalls; var max = expectation.maxCalls; if (typeof min == "number" && typeof max == "number") { var str = times(min); if (min != max) { str = "at least " + str + " and at most " + times(max); } return str; } if (typeof min == "number") { return "at least " + times(min); } return "at most " + times(max); } function receivedMinCalls(expectation) { var hasMinLimit = typeof expectation.minCalls == "number"; return !hasMinLimit || expectation.callCount >= expectation.minCalls; } function receivedMaxCalls(expectation) { if (typeof expectation.maxCalls != "number") { return false; } return expectation.callCount == expectation.maxCalls; } return { minCalls: 1, maxCalls: 1, create: function create(methodName) { var expectation = sinon.extend(sinon.stub.create(), sinon.expectation); delete expectation.create; expectation.method = methodName; return expectation; }, invoke: function invoke(func, thisValue, args) { this.verifyCallAllowed(thisValue, args); return _invoke.apply(this, arguments); }, atLeast: function atLeast(num) { if (typeof num != "number") { throw new TypeError("'" + num + "' is not number"); } if (!this.limitsSet) { this.maxCalls = null; this.limitsSet = true; } this.minCalls = num; return this; }, atMost: function atMost(num) { if (typeof num != "number") { throw new TypeError("'" + num + "' is not number"); } if (!this.limitsSet) { this.minCalls = null; this.limitsSet = true; } this.maxCalls = num; return this; }, never: function never() { return this.exactly(0); }, once: function once() { return this.exactly(1); }, twice: function twice() { return this.exactly(2); }, thrice: function thrice() { return this.exactly(3); }, exactly: function exactly(num) { if (typeof num != "number") { throw new TypeError("'" + num + "' is not a number"); } this.atLeast(num); return this.atMost(num); }, met: function met() { return !this.failed && receivedMinCalls(this); }, verifyCallAllowed: function verifyCallAllowed(thisValue, args) { if (receivedMaxCalls(this)) { this.failed = true; sinon.expectation.fail(this.method + " already called " + times(this.maxCalls)); } if ("expectedThis" in this && this.expectedThis !== thisValue) { sinon.expectation.fail(this.method + " called with " + thisValue + " as thisValue, expected " + this.expectedThis); } if (!("expectedArguments" in this)) { return; } if (!args) { sinon.expectation.fail(this.method + " received no arguments, expected " + sinon.format(this.expectedArguments)); } if (args.length < this.expectedArguments.length) { sinon.expectation.fail(this.method + " received too few arguments (" + sinon.format(args) + "), expected " + sinon.format(this.expectedArguments)); } if (this.expectsExactArgCount && args.length != this.expectedArguments.length) { sinon.expectation.fail(this.method + " received too many arguments (" + sinon.format(args) + "), expected " + sinon.format(this.expectedArguments)); } for (var i = 0, l = this.expectedArguments.length; i < l; i += 1) { if (!sinon.deepEqual(this.expectedArguments[i], args[i])) { sinon.expectation.fail(this.method + " received wrong arguments " + sinon.format(args) + ", expected " + sinon.format(this.expectedArguments)); } } }, allowsCall: function allowsCall(thisValue, args) { if (this.met() && receivedMaxCalls(this)) { return false; } if ("expectedThis" in this && this.expectedThis !== thisValue) { return false; } if (!("expectedArguments" in this)) { return true; } args = args || []; if (args.length < this.expectedArguments.length) { return false; } if (this.expectsExactArgCount && args.length != this.expectedArguments.length) { return false; } for (var i = 0, l = this.expectedArguments.length; i < l; i += 1) { if (!sinon.deepEqual(this.expectedArguments[i], args[i])) { return false; } } return true; }, withArgs: function withArgs() { this.expectedArguments = slice.call(arguments); return this; }, withExactArgs: function withExactArgs() { this.withArgs.apply(this, arguments); this.expectsExactArgCount = true; return this; }, on: function on(thisValue) { this.expectedThis = thisValue; return this; }, toString: function () { var args = (this.expectedArguments || []).slice(); if (!this.expectsExactArgCount) { push.call(args, "[...]"); } var callStr = sinon.spyCall.toString.call({ proxy: this.method || "anonymous mock expectation", args: args }); var message = callStr.replace(", [...", "[, ...") + " " + expectedCallCountInWords(this); if (this.met()) { return "Expectation met: " + message; } return "Expected " + message + " (" + callCountInWords(this.callCount) + ")"; }, verify: function verify() { if (!this.met()) { sinon.expectation.fail(this.toString()); } else { sinon.expectation.pass(this.toString()); } return true; }, pass: function(message) { sinon.assert.pass(message); }, fail: function (message) { var exception = new Error(message); exception.name = "ExpectationError"; throw exception; } }; }()); if (commonJSModule) { module.exports = mock; } else { sinon.mock = mock; } }(typeof sinon == "object" && sinon || null)); },{"../sinon":32}],37:[function(require,module,exports){ /** * @depend ../sinon.js * @depend collection.js * @depend util/fake_timers.js * @depend util/fake_server_with_clock.js */ /*jslint eqeqeq: false, onevar: false, plusplus: false*/ /*global require, module*/ /** * Manages fake collections as well as fake utilities such as Sinon's * timers and fake XHR implementation in one convenient object. * * @author Christian Johansen (christian@cjohansen.no) * @license BSD * * Copyright (c) 2010-2013 Christian Johansen */ "use strict"; if (typeof module == "object" && typeof require == "function") { var sinon = require("../sinon"); sinon.extend(sinon, require("./util/fake_timers")); } (function () { var push = [].push; function exposeValue(sandbox, config, key, value) { if (!value) { return; } if (config.injectInto) { config.injectInto[key] = value; } else { push.call(sandbox.args, value); } } function prepareSandboxFromConfig(config) { var sandbox = sinon.create(sinon.sandbox); if (config.useFakeServer) { if (typeof config.useFakeServer == "object") { sandbox.serverPrototype = config.useFakeServer; } sandbox.useFakeServer(); } if (config.useFakeTimers) { if (typeof config.useFakeTimers == "object") { sandbox.useFakeTimers.apply(sandbox, config.useFakeTimers); } else { sandbox.useFakeTimers(); } } return sandbox; } sinon.sandbox = sinon.extend(sinon.create(sinon.collection), { useFakeTimers: function useFakeTimers() { this.clock = sinon.useFakeTimers.apply(sinon, arguments); return this.add(this.clock); }, serverPrototype: sinon.fakeServer, useFakeServer: function useFakeServer() { var proto = this.serverPrototype || sinon.fakeServer; if (!proto || !proto.create) { return null; } this.server = proto.create(); return this.add(this.server); }, inject: function (obj) { sinon.collection.inject.call(this, obj); if (this.clock) { obj.clock = this.clock; } if (this.server) { obj.server = this.server; obj.requests = this.server.requests; } return obj; }, create: function (config) { if (!config) { return sinon.create(sinon.sandbox); } var sandbox = prepareSandboxFromConfig(config); sandbox.args = sandbox.args || []; var prop, value, exposed = sandbox.inject({}); if (config.properties) { for (var i = 0, l = config.properties.length; i < l; i++) { prop = config.properties[i]; value = exposed[prop] || prop == "sandbox" && sandbox; exposeValue(sandbox, config, prop, value); } } else { exposeValue(sandbox, config, "sandbox", value); } return sandbox; } }); sinon.sandbox.useFakeXMLHttpRequest = sinon.sandbox.useFakeServer; if (typeof module == "object" && typeof require == "function") { module.exports = sinon.sandbox; } }()); },{"../sinon":32,"./util/fake_timers":42}],38:[function(require,module,exports){ /** * @depend ../sinon.js * @depend match.js */ /*jslint eqeqeq: false, onevar: false, plusplus: false*/ /*global module, require, sinon*/ /** * Spy calls * * @author Christian Johansen (christian@cjohansen.no) * @author Maximilian Antoni (mail@maxantoni.de) * @license BSD * * Copyright (c) 2010-2013 Christian Johansen * Copyright (c) 2013 Maximilian Antoni */ "use strict"; var commonJSModule = typeof module == "object" && typeof require == "function"; if (!this.sinon && commonJSModule) { var sinon = require("../sinon"); } (function (sinon) { function throwYieldError(proxy, text, args) { var msg = sinon.functionName(proxy) + text; if (args.length) { msg += " Received [" + slice.call(args).join(", ") + "]"; } throw new Error(msg); } var slice = Array.prototype.slice; var callProto = { calledOn: function calledOn(thisValue) { if (sinon.match && sinon.match.isMatcher(thisValue)) { return thisValue.test(this.thisValue); } return this.thisValue === thisValue; }, calledWith: function calledWith() { for (var i = 0, l = arguments.length; i < l; i += 1) { if (!sinon.deepEqual(arguments[i], this.args[i])) { return false; } } return true; }, calledWithMatch: function calledWithMatch() { for (var i = 0, l = arguments.length; i < l; i += 1) { var actual = this.args[i]; var expectation = arguments[i]; if (!sinon.match || !sinon.match(expectation).test(actual)) { return false; } } return true; }, calledWithExactly: function calledWithExactly() { return arguments.length == this.args.length && this.calledWith.apply(this, arguments); }, notCalledWith: function notCalledWith() { return !this.calledWith.apply(this, arguments); }, notCalledWithMatch: function notCalledWithMatch() { return !this.calledWithMatch.apply(this, arguments); }, returned: function returned(value) { return sinon.deepEqual(value, this.returnValue); }, threw: function threw(error) { if (typeof error === "undefined" || !this.exception) { return !!this.exception; } return this.exception === error || this.exception.name === error; }, calledWithNew: function calledWithNew(thisValue) { return this.thisValue instanceof this.proxy; }, calledBefore: function (other) { return this.callId < other.callId; }, calledAfter: function (other) { return this.callId > other.callId; }, callArg: function (pos) { this.args[pos](); }, callArgOn: function (pos, thisValue) { this.args[pos].apply(thisValue); }, callArgWith: function (pos) { this.callArgOnWith.apply(this, [pos, null].concat(slice.call(arguments, 1))); }, callArgOnWith: function (pos, thisValue) { var args = slice.call(arguments, 2); this.args[pos].apply(thisValue, args); }, "yield": function () { this.yieldOn.apply(this, [null].concat(slice.call(arguments, 0))); }, yieldOn: function (thisValue) { var args = this.args; for (var i = 0, l = args.length; i < l; ++i) { if (typeof args[i] === "function") { args[i].apply(thisValue, slice.call(arguments, 1)); return; } } throwYieldError(this.proxy, " cannot yield since no callback was passed.", args); }, yieldTo: function (prop) { this.yieldToOn.apply(this, [prop, null].concat(slice.call(arguments, 1))); }, yieldToOn: function (prop, thisValue) { var args = this.args; for (var i = 0, l = args.length; i < l; ++i) { if (args[i] && typeof args[i][prop] === "function") { args[i][prop].apply(thisValue, slice.call(arguments, 2)); return; } } throwYieldError(this.proxy, " cannot yield to '" + prop + "' since no callback was passed.", args); }, toString: function () { var callStr = this.proxy.toString() + "("; var args = []; for (var i = 0, l = this.args.length; i < l; ++i) { args.push(sinon.format(this.args[i])); } callStr = callStr + args.join(", ") + ")"; if (typeof this.returnValue != "undefined") { callStr += " => " + sinon.format(this.returnValue); } if (this.exception) { callStr += " !" + this.exception.name; if (this.exception.message) { callStr += "(" + this.exception.message + ")"; } } return callStr; } }; callProto.invokeCallback = callProto.yield; function createSpyCall(spy, thisValue, args, returnValue, exception, id) { if (typeof id !== "number") { throw new TypeError("Call id is not a number"); } var proxyCall = sinon.create(callProto); proxyCall.proxy = spy; proxyCall.thisValue = thisValue; proxyCall.args = args; proxyCall.returnValue = returnValue; proxyCall.exception = exception; proxyCall.callId = id; return proxyCall; }; createSpyCall.toString = callProto.toString; // used by mocks sinon.spyCall = createSpyCall; }(typeof sinon == "object" && sinon || null)); /** * @depend ../sinon.js */ /*jslint eqeqeq: false, onevar: false, plusplus: false*/ /*global module, require, sinon*/ /** * Spy functions * * @author Christian Johansen (christian@cjohansen.no) * @license BSD * * Copyright (c) 2010-2013 Christian Johansen */ "use strict"; (function (sinon) { var commonJSModule = typeof module == "object" && typeof require == "function"; var push = Array.prototype.push; var slice = Array.prototype.slice; var callId = 0; function spy(object, property) { if (!property && typeof object == "function") { return spy.create(object); } if (!object && !property) { return spy.create(function () { }); } var method = object[property]; return sinon.wrapMethod(object, property, spy.create(method)); } function matchingFake(fakes, args, strict) { if (!fakes) { return; } var alen = args.length; for (var i = 0, l = fakes.length; i < l; i++) { if (fakes[i].matches(args, strict)) { return fakes[i]; } } } function incrementCallCount() { this.called = true; this.callCount += 1; this.notCalled = false; this.calledOnce = this.callCount == 1; this.calledTwice = this.callCount == 2; this.calledThrice = this.callCount == 3; } function createCallProperties() { this.firstCall = this.getCall(0); this.secondCall = this.getCall(1); this.thirdCall = this.getCall(2); this.lastCall = this.getCall(this.callCount - 1); } var vars = "a,b,c,d,e,f,g,h,i,j,k,l"; function createProxy(func) { // Retain the function length: var p; if (func.length) { eval("p = (function proxy(" + vars.substring(0, func.length * 2 - 1) + ") { return p.invoke(func, this, slice.call(arguments)); });"); } else { p = function proxy() { return p.invoke(func, this, slice.call(arguments)); }; } return p; } var uuid = 0; // Public API var spyApi = { reset: function () { this.called = false; this.notCalled = true; this.calledOnce = false; this.calledTwice = false; this.calledThrice = false; this.callCount = 0; this.firstCall = null; this.secondCall = null; this.thirdCall = null; this.lastCall = null; this.args = []; this.returnValues = []; this.thisValues = []; this.exceptions = []; this.callIds = []; if (this.fakes) { for (var i = 0; i < this.fakes.length; i++) { this.fakes[i].reset(); } } }, create: function create(func) { var name; if (typeof func != "function") { func = function () { }; } else { name = sinon.functionName(func); } var proxy = createProxy(func); sinon.extend(proxy, spy); delete proxy.create; sinon.extend(proxy, func); proxy.reset(); proxy.prototype = func.prototype; proxy.displayName = name || "spy"; proxy.toString = sinon.functionToString; proxy._create = sinon.spy.create; proxy.id = "spy#" + uuid++; return proxy; }, invoke: function invoke(func, thisValue, args) { var matching = matchingFake(this.fakes, args); var exception, returnValue; incrementCallCount.call(this); push.call(this.thisValues, thisValue); push.call(this.args, args); push.call(this.callIds, callId++); try { if (matching) { returnValue = matching.invoke(func, thisValue, args); } else { returnValue = (this.func || func).apply(thisValue, args); } } catch (e) { push.call(this.returnValues, undefined); exception = e; throw e; } finally { push.call(this.exceptions, exception); } push.call(this.returnValues, returnValue); createCallProperties.call(this); return returnValue; }, getCall: function getCall(i) { if (i < 0 || i >= this.callCount) { return null; } return sinon.spyCall(this, this.thisValues[i], this.args[i], this.returnValues[i], this.exceptions[i], this.callIds[i]); }, calledBefore: function calledBefore(spyFn) { if (!this.called) { return false; } if (!spyFn.called) { return true; } return this.callIds[0] < spyFn.callIds[spyFn.callIds.length - 1]; }, calledAfter: function calledAfter(spyFn) { if (!this.called || !spyFn.called) { return false; } return this.callIds[this.callCount - 1] > spyFn.callIds[spyFn.callCount - 1]; }, withArgs: function () { var args = slice.call(arguments); if (this.fakes) { var match = matchingFake(this.fakes, args, true); if (match) { return match; } } else { this.fakes = []; } var original = this; var fake = this._create(); fake.matchingAguments = args; push.call(this.fakes, fake); fake.withArgs = function () { return original.withArgs.apply(original, arguments); }; for (var i = 0; i < this.args.length; i++) { if (fake.matches(this.args[i])) { incrementCallCount.call(fake); push.call(fake.thisValues, this.thisValues[i]); push.call(fake.args, this.args[i]); push.call(fake.returnValues, this.returnValues[i]); push.call(fake.exceptions, this.exceptions[i]); push.call(fake.callIds, this.callIds[i]); } } createCallProperties.call(fake); return fake; }, matches: function (args, strict) { var margs = this.matchingAguments; if (margs.length <= args.length && sinon.deepEqual(margs, args.slice(0, margs.length))) { return !strict || margs.length == args.length; } }, printf: function (format) { var spy = this; var args = slice.call(arguments, 1); var formatter; return (format || "").replace(/%(.)/g, function (match, specifyer) { formatter = spyApi.formatters[specifyer]; if (typeof formatter == "function") { return formatter.call(null, spy, args); } else if (!isNaN(parseInt(specifyer), 10)) { return sinon.format(args[specifyer - 1]); } return "%" + specifyer; }); } }; function delegateToCalls(method, matchAny, actual, notCalled) { spyApi[method] = function () { if (!this.called) { if (notCalled) { return notCalled.apply(this, arguments); } return false; } var currentCall; var matches = 0; for (var i = 0, l = this.callCount; i < l; i += 1) { currentCall = this.getCall(i); if (currentCall[actual || method].apply(currentCall, arguments)) { matches += 1; if (matchAny) { return true; } } } return matches === this.callCount; }; } delegateToCalls("calledOn", true); delegateToCalls("alwaysCalledOn", false, "calledOn"); delegateToCalls("calledWith", true); delegateToCalls("calledWithMatch", true); delegateToCalls("alwaysCalledWith", false, "calledWith"); delegateToCalls("alwaysCalledWithMatch", false, "calledWithMatch"); delegateToCalls("calledWithExactly", true); delegateToCalls("alwaysCalledWithExactly", false, "calledWithExactly"); delegateToCalls("neverCalledWith", false, "notCalledWith", function () { return true; }); delegateToCalls("neverCalledWithMatch", false, "notCalledWithMatch", function () { return true; }); delegateToCalls("threw", true); delegateToCalls("alwaysThrew", false, "threw"); delegateToCalls("returned", true); delegateToCalls("alwaysReturned", false, "returned"); delegateToCalls("calledWithNew", true); delegateToCalls("alwaysCalledWithNew", false, "calledWithNew"); delegateToCalls("callArg", false, "callArgWith", function () { throw new Error(this.toString() + " cannot call arg since it was not yet invoked."); }); spyApi.callArgWith = spyApi.callArg; delegateToCalls("callArgOn", false, "callArgOnWith", function () { throw new Error(this.toString() + " cannot call arg since it was not yet invoked."); }); spyApi.callArgOnWith = spyApi.callArgOn; delegateToCalls("yield", false, "yield", function () { throw new Error(this.toString() + " cannot yield since it was not yet invoked."); }); // "invokeCallback" is an alias for "yield" since "yield" is invalid in strict mode. spyApi.invokeCallback = spyApi.yield; delegateToCalls("yieldOn", false, "yieldOn", function () { throw new Error(this.toString() + " cannot yield since it was not yet invoked."); }); delegateToCalls("yieldTo", false, "yieldTo", function (property) { throw new Error(this.toString() + " cannot yield to '" + property + "' since it was not yet invoked."); }); delegateToCalls("yieldToOn", false, "yieldToOn", function (property) { throw new Error(this.toString() + " cannot yield to '" + property + "' since it was not yet invoked."); }); spyApi.formatters = { "c": function (spy) { return sinon.timesInWords(spy.callCount); }, "n": function (spy) { return spy.toString(); }, "C": function (spy) { var calls = []; for (var i = 0, l = spy.callCount; i < l; ++i) { var stringifiedCall = " " + spy.getCall(i).toString(); if (/\n/.test(calls[i - 1])) { stringifiedCall = "\n" + stringifiedCall; } push.call(calls, stringifiedCall); } return calls.length > 0 ? "\n" + calls.join("\n") : ""; }, "t": function (spy) { var objects = []; for (var i = 0, l = spy.callCount; i < l; ++i) { push.call(objects, sinon.format(spy.thisValues[i])); } return objects.join(", "); }, "*": function (spy, args) { var formatted = []; for (var i = 0, l = args.length; i < l; ++i) { push.call(formatted, sinon.format(args[i])); } return formatted.join(", "); } }; sinon.extend(spy, spyApi); spy.spyCall = sinon.spyCall; if (commonJSModule) { module.exports = spy; } else { sinon.spy = spy; } }(typeof sinon == "object" && sinon || null)); },{"../sinon":32}],39:[function(require,module,exports){ var process=require("__browserify_process");/** * @depend ../sinon.js * @depend spy.js */ /*jslint eqeqeq: false, onevar: false*/ /*global module, require, sinon*/ /** * Stub functions * * @author Christian Johansen (christian@cjohansen.no) * @license BSD * * Copyright (c) 2010-2013 Christian Johansen */ "use strict"; (function (sinon) { var commonJSModule = typeof module == "object" && typeof require == "function"; if (!sinon && commonJSModule) { sinon = require("../sinon"); } if (!sinon) { return; } function stub(object, property, func) { if (!!func && typeof func != "function") { throw new TypeError("Custom stub should be function"); } var wrapper; if (func) { wrapper = sinon.spy && sinon.spy.create ? sinon.spy.create(func) : func; } else { wrapper = stub.create(); } if (!object && !property) { return sinon.stub.create(); } if (!property && !!object && typeof object == "object") { for (var prop in object) { if (typeof object[prop] === "function") { stub(object, prop); } } return object; } return sinon.wrapMethod(object, property, wrapper); } function getChangingValue(stub, property) { var index = stub.callCount - 1; var values = stub[property]; var prop = index in values ? values[index] : values[values.length - 1]; stub[property + "Last"] = prop; return prop; } function getCallback(stub, args) { var callArgAt = getChangingValue(stub, "callArgAts"); if (callArgAt < 0) { var callArgProp = getChangingValue(stub, "callArgProps"); for (var i = 0, l = args.length; i < l; ++i) { if (!callArgProp && typeof args[i] == "function") { return args[i]; } if (callArgProp && args[i] && typeof args[i][callArgProp] == "function") { return args[i][callArgProp]; } } return null; } return args[callArgAt]; } var join = Array.prototype.join; function getCallbackError(stub, func, args) { if (stub.callArgAtsLast < 0) { var msg; if (stub.callArgPropsLast) { msg = sinon.functionName(stub) + " expected to yield to '" + stub.callArgPropsLast + "', but no object with such a property was passed." } else { msg = sinon.functionName(stub) + " expected to yield, but no callback was passed." } if (args.length > 0) { msg += " Received [" + join.call(args, ", ") + "]"; } return msg; } return "argument at index " + stub.callArgAtsLast + " is not a function: " + func; } var nextTick = (function () { if (typeof process === "object" && typeof process.nextTick === "function") { return process.nextTick; } else if (typeof setImmediate === "function") { return setImmediate; } else { return function (callback) { setTimeout(callback, 0); }; } })(); function callCallback(stub, args) { if (stub.callArgAts.length > 0) { var func = getCallback(stub, args); if (typeof func != "function") { throw new TypeError(getCallbackError(stub, func, args)); } var callbackArguments = getChangingValue(stub, "callbackArguments"); var callbackContext = getChangingValue(stub, "callbackContexts"); if (stub.callbackAsync) { nextTick(function() { func.apply(callbackContext, callbackArguments); }); } else { func.apply(callbackContext, callbackArguments); } } } var uuid = 0; sinon.extend(stub, (function () { var slice = Array.prototype.slice, proto; function throwsException(error, message) { if (typeof error == "string") { this.exception = new Error(message || ""); this.exception.name = error; } else if (!error) { this.exception = new Error("Error"); } else { this.exception = error; } return this; } proto = { create: function create() { var functionStub = function () { callCallback(functionStub, arguments); if (functionStub.exception) { throw functionStub.exception; } else if (typeof functionStub.returnArgAt == 'number') { return arguments[functionStub.returnArgAt]; } else if (functionStub.returnThis) { return this; } return functionStub.returnValue; }; functionStub.id = "stub#" + uuid++; var orig = functionStub; functionStub = sinon.spy.create(functionStub); functionStub.func = orig; functionStub.callArgAts = []; functionStub.callbackArguments = []; functionStub.callbackContexts = []; functionStub.callArgProps = []; sinon.extend(functionStub, stub); functionStub._create = sinon.stub.create; functionStub.displayName = "stub"; functionStub.toString = sinon.functionToString; return functionStub; }, resetBehavior: function () { var i; this.callArgAts = []; this.callbackArguments = []; this.callbackContexts = []; this.callArgProps = []; delete this.returnValue; delete this.returnArgAt; this.returnThis = false; if (this.fakes) { for (i = 0; i < this.fakes.length; i++) { this.fakes[i].resetBehavior(); } } }, returns: function returns(value) { this.returnValue = value; return this; }, returnsArg: function returnsArg(pos) { if (typeof pos != "number") { throw new TypeError("argument index is not number"); } this.returnArgAt = pos; return this; }, returnsThis: function returnsThis() { this.returnThis = true; return this; }, "throws": throwsException, throwsException: throwsException, callsArg: function callsArg(pos) { if (typeof pos != "number") { throw new TypeError("argument index is not number"); } this.callArgAts.push(pos); this.callbackArguments.push([]); this.callbackContexts.push(undefined); this.callArgProps.push(undefined); return this; }, callsArgOn: function callsArgOn(pos, context) { if (typeof pos != "number") { throw new TypeError("argument index is not number"); } if (typeof context != "object") { throw new TypeError("argument context is not an object"); } this.callArgAts.push(pos); this.callbackArguments.push([]); this.callbackContexts.push(context); this.callArgProps.push(undefined); return this; }, callsArgWith: function callsArgWith(pos) { if (typeof pos != "number") { throw new TypeError("argument index is not number"); } this.callArgAts.push(pos); this.callbackArguments.push(slice.call(arguments, 1)); this.callbackContexts.push(undefined); this.callArgProps.push(undefined); return this; }, callsArgOnWith: function callsArgWith(pos, context) { if (typeof pos != "number") { throw new TypeError("argument index is not number"); } if (typeof context != "object") { throw new TypeError("argument context is not an object"); } this.callArgAts.push(pos); this.callbackArguments.push(slice.call(arguments, 2)); this.callbackContexts.push(context); this.callArgProps.push(undefined); return this; }, yields: function () { this.callArgAts.push(-1); this.callbackArguments.push(slice.call(arguments, 0)); this.callbackContexts.push(undefined); this.callArgProps.push(undefined); return this; }, yieldsOn: function (context) { if (typeof context != "object") { throw new TypeError("argument context is not an object"); } this.callArgAts.push(-1); this.callbackArguments.push(slice.call(arguments, 1)); this.callbackContexts.push(context); this.callArgProps.push(undefined); return this; }, yieldsTo: function (prop) { this.callArgAts.push(-1); this.callbackArguments.push(slice.call(arguments, 1)); this.callbackContexts.push(undefined); this.callArgProps.push(prop); return this; }, yieldsToOn: function (prop, context) { if (typeof context != "object") { throw new TypeError("argument context is not an object"); } this.callArgAts.push(-1); this.callbackArguments.push(slice.call(arguments, 2)); this.callbackContexts.push(context); this.callArgProps.push(prop); return this; } }; // create asynchronous versions of callsArg* and yields* methods for (var method in proto) { // need to avoid creating anotherasync versions of the newly added async methods if (proto.hasOwnProperty(method) && method.match(/^(callsArg|yields|thenYields$)/) && !method.match(/Async/)) { proto[method + 'Async'] = (function (syncFnName) { return function () { this.callbackAsync = true; return this[syncFnName].apply(this, arguments); }; })(method); } } return proto; }())); if (commonJSModule) { module.exports = stub; } else { sinon.stub = stub; } }(typeof sinon == "object" && sinon || null)); },{"../sinon":32,"__browserify_process":31}],40:[function(require,module,exports){ /** * @depend ../sinon.js * @depend stub.js * @depend mock.js * @depend sandbox.js */ /*jslint eqeqeq: false, onevar: false, forin: true, plusplus: false*/ /*global module, require, sinon*/ /** * Test function, sandboxes fakes * * @author Christian Johansen (christian@cjohansen.no) * @license BSD * * Copyright (c) 2010-2013 Christian Johansen */ "use strict"; (function (sinon) { var commonJSModule = typeof module == "object" && typeof require == "function"; if (!sinon && commonJSModule) { sinon = require("../sinon"); } if (!sinon) { return; } function test(callback) { var type = typeof callback; if (type != "function") { throw new TypeError("sinon.test needs to wrap a test function, got " + type); } return function () { var config = sinon.getConfig(sinon.config); config.injectInto = config.injectIntoThis && this || config.injectInto; var sandbox = sinon.sandbox.create(config); var exception, result; var args = Array.prototype.slice.call(arguments).concat(sandbox.args); try { result = callback.apply(this, args); } catch (e) { exception = e; } if (typeof exception !== "undefined") { sandbox.restore(); throw exception; } else { sandbox.verifyAndRestore(); } return result; }; } test.config = { injectIntoThis: true, injectInto: null, properties: ["spy", "stub", "mock", "clock", "server", "requests"], useFakeTimers: true, useFakeServer: true }; if (commonJSModule) { module.exports = test; } else { sinon.test = test; } }(typeof sinon == "object" && sinon || null)); },{"../sinon":32}],41:[function(require,module,exports){ /** * @depend ../sinon.js * @depend test.js */ /*jslint eqeqeq: false, onevar: false, eqeqeq: false*/ /*global module, require, sinon*/ /** * Test case, sandboxes all test functions * * @author Christian Johansen (christian@cjohansen.no) * @license BSD * * Copyright (c) 2010-2013 Christian Johansen */ "use strict"; (function (sinon) { var commonJSModule = typeof module == "object" && typeof require == "function"; if (!sinon && commonJSModule) { sinon = require("../sinon"); } if (!sinon || !Object.prototype.hasOwnProperty) { return; } function createTest(property, setUp, tearDown) { return function () { if (setUp) { setUp.apply(this, arguments); } var exception, result; try { result = property.apply(this, arguments); } catch (e) { exception = e; } if (tearDown) { tearDown.apply(this, arguments); } if (exception) { throw exception; } return result; }; } function testCase(tests, prefix) { /*jsl:ignore*/ if (!tests || typeof tests != "object") { throw new TypeError("sinon.testCase needs an object with test functions"); } /*jsl:end*/ prefix = prefix || "test"; var rPrefix = new RegExp("^" + prefix); var methods = {}, testName, property, method; var setUp = tests.setUp; var tearDown = tests.tearDown; for (testName in tests) { if (tests.hasOwnProperty(testName)) { property = tests[testName]; if (/^(setUp|tearDown)$/.test(testName)) { continue; } if (typeof property == "function" && rPrefix.test(testName)) { method = property; if (setUp || tearDown) { method = createTest(property, setUp, tearDown); } methods[testName] = sinon.test(method); } else { methods[testName] = tests[testName]; } } } return methods; } if (commonJSModule) { module.exports = testCase; } else { sinon.testCase = testCase; } }(typeof sinon == "object" && sinon || null)); },{"../sinon":32}],42:[function(require,module,exports){ var global=typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {};/*jslint eqeqeq: false, plusplus: false, evil: true, onevar: false, browser: true, forin: false*/ /*global module, require, window*/ /** * Fake timer API * setTimeout * setInterval * clearTimeout * clearInterval * tick * reset * Date * * Inspired by jsUnitMockTimeOut from JsUnit * * @author Christian Johansen (christian@cjohansen.no) * @license BSD * * Copyright (c) 2010-2013 Christian Johansen */ "use strict"; if (typeof sinon == "undefined") { var sinon = {}; } (function (global) { var id = 1; function addTimer(args, recurring) { if (args.length === 0) { throw new Error("Function requires at least 1 parameter"); } var toId = id++; var delay = args[1] || 0; if (!this.timeouts) { this.timeouts = {}; } this.timeouts[toId] = { id: toId, func: args[0], callAt: this.now + delay, invokeArgs: Array.prototype.slice.call(args, 2) }; if (recurring === true) { this.timeouts[toId].interval = delay; } return toId; } function parseTime(str) { if (!str) { return 0; } var strings = str.split(":"); var l = strings.length, i = l; var ms = 0, parsed; if (l > 3 || !/^(\d\d:){0,2}\d\d?$/.test(str)) { throw new Error("tick only understands numbers and 'h:m:s'"); } while (i--) { parsed = parseInt(strings[i], 10); if (parsed >= 60) { throw new Error("Invalid time " + str); } ms += parsed * Math.pow(60, (l - i - 1)); } return ms * 1000; } function createObject(object) { var newObject; if (Object.create) { newObject = Object.create(object); } else { var F = function () {}; F.prototype = object; newObject = new F(); } newObject.Date.clock = newObject; return newObject; } sinon.clock = { now: 0, create: function create(now) { var clock = createObject(this); if (typeof now == "number") { clock.now = now; } if (!!now && typeof now == "object") { throw new TypeError("now should be milliseconds since UNIX epoch"); } return clock; }, setTimeout: function setTimeout(callback, timeout) { return addTimer.call(this, arguments, false); }, clearTimeout: function clearTimeout(timerId) { if (!this.timeouts) { this.timeouts = []; } if (timerId in this.timeouts) { delete this.timeouts[timerId]; } }, setInterval: function setInterval(callback, timeout) { return addTimer.call(this, arguments, true); }, clearInterval: function clearInterval(timerId) { this.clearTimeout(timerId); }, tick: function tick(ms) { ms = typeof ms == "number" ? ms : parseTime(ms); var tickFrom = this.now, tickTo = this.now + ms, previous = this.now; var timer = this.firstTimerInRange(tickFrom, tickTo); var firstException; while (timer && tickFrom <= tickTo) { if (this.timeouts[timer.id]) { tickFrom = this.now = timer.callAt; try { this.callTimer(timer); } catch (e) { firstException = firstException || e; } } timer = this.firstTimerInRange(previous, tickTo); previous = tickFrom; } this.now = tickTo; if (firstException) { throw firstException; } return this.now; }, firstTimerInRange: function (from, to) { var timer, smallest, originalTimer; for (var id in this.timeouts) { if (this.timeouts.hasOwnProperty(id)) { if (this.timeouts[id].callAt < from || this.timeouts[id].callAt > to) { continue; } if (!smallest || this.timeouts[id].callAt < smallest) { originalTimer = this.timeouts[id]; smallest = this.timeouts[id].callAt; timer = { func: this.timeouts[id].func, callAt: this.timeouts[id].callAt, interval: this.timeouts[id].interval, id: this.timeouts[id].id, invokeArgs: this.timeouts[id].invokeArgs }; } } } return timer || null; }, callTimer: function (timer) { if (typeof timer.interval == "number") { this.timeouts[timer.id].callAt += timer.interval; } else { delete this.timeouts[timer.id]; } try { if (typeof timer.func == "function") { timer.func.apply(null, timer.invokeArgs); } else { eval(timer.func); } } catch (e) { var exception = e; } if (!this.timeouts[timer.id]) { if (exception) { throw exception; } return; } if (exception) { throw exception; } }, reset: function reset() { this.timeouts = {}; }, Date: (function () { var NativeDate = Date; function ClockDate(year, month, date, hour, minute, second, ms) { // Defensive and verbose to avoid potential harm in passing // explicit undefined when user does not pass argument switch (arguments.length) { case 0: return new NativeDate(ClockDate.clock.now); case 1: return new NativeDate(year); case 2: return new NativeDate(year, month); case 3: return new NativeDate(year, month, date); case 4: return new NativeDate(year, month, date, hour); case 5: return new NativeDate(year, month, date, hour, minute); case 6: return new NativeDate(year, month, date, hour, minute, second); default: return new NativeDate(year, month, date, hour, minute, second, ms); } } return mirrorDateProperties(ClockDate, NativeDate); }()) }; function mirrorDateProperties(target, source) { if (source.now) { target.now = function now() { return target.clock.now; }; } else { delete target.now; } if (source.toSource) { target.toSource = function toSource() { return source.toSource(); }; } else { delete target.toSource; } target.toString = function toString() { return source.toString(); }; target.prototype = source.prototype; target.parse = source.parse; target.UTC = source.UTC; target.prototype.toUTCString = source.prototype.toUTCString; return target; } var methods = ["Date", "setTimeout", "setInterval", "clearTimeout", "clearInterval"]; function restore() { var method; for (var i = 0, l = this.methods.length; i < l; i++) { method = this.methods[i]; if (global[method].hadOwnProperty) { global[method] = this["_" + method]; } else { delete global[method]; } } // Prevent multiple executions which will completely remove these props this.methods = []; } function stubGlobal(method, clock) { clock[method].hadOwnProperty = Object.prototype.hasOwnProperty.call(global, method); clock["_" + method] = global[method]; if (method == "Date") { var date = mirrorDateProperties(clock[method], global[method]); global[method] = date; } else { global[method] = function () { return clock[method].apply(clock, arguments); }; for (var prop in clock[method]) { if (clock[method].hasOwnProperty(prop)) { global[method][prop] = clock[method][prop]; } } } global[method].clock = clock; } sinon.useFakeTimers = function useFakeTimers(now) { var clock = sinon.clock.create(now); clock.restore = restore; clock.methods = Array.prototype.slice.call(arguments, typeof now == "number" ? 1 : 0); if (clock.methods.length === 0) { clock.methods = methods; } for (var i = 0, l = clock.methods.length; i < l; i++) { stubGlobal(clock.methods[i], clock); } return clock; }; }(typeof global != "undefined" && typeof global !== "function" ? global : this)); sinon.timers = { setTimeout: setTimeout, clearTimeout: clearTimeout, setInterval: setInterval, clearInterval: clearInterval, Date: Date }; if (typeof module == "object" && typeof require == "function") { module.exports = sinon; } },{}],43:[function(require,module,exports){ var global=typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {};if (typeof buster === "undefined") { var buster = {}; } if (typeof module === "object" && typeof require === "function") { buster = require("buster-core"); } buster.format = buster.format || {}; buster.format.excludeConstructors = ["Object", /^.$/]; buster.format.quoteStrings = true; buster.format.ascii = (function () { "use strict"; var hasOwn = Object.prototype.hasOwnProperty; var specialObjects = []; if (typeof global != "undefined") { specialObjects.push({ obj: global, value: "[object global]" }); } if (typeof document != "undefined") { specialObjects.push({ obj: document, value: "[object HTMLDocument]" }); } if (typeof window != "undefined") { specialObjects.push({ obj: window, value: "[object Window]" }); } function keys(object) { var k = Object.keys && Object.keys(object) || []; if (k.length == 0) { for (var prop in object) { if (hasOwn.call(object, prop)) { k.push(prop); } } } return k.sort(); } function isCircular(object, objects) { if (typeof object != "object") { return false; } for (var i = 0, l = objects.length; i < l; ++i) { if (objects[i] === object) { return true; } } return false; } function ascii(object, processed, indent) { if (typeof object == "string") { var quote = typeof this.quoteStrings != "boolean" || this.quoteStrings; return processed || quote ? '"' + object + '"' : object; } if (typeof object == "function" && !(object instanceof RegExp)) { return ascii.func(object); } processed = processed || []; if (isCircular(object, processed)) { return "[Circular]"; } if (Object.prototype.toString.call(object) == "[object Array]") { return ascii.array.call(this, object, processed); } if (!object) { return "" + object; } if (buster.isElement(object)) { return ascii.element(object); } if (typeof object.toString == "function" && object.toString !== Object.prototype.toString) { return object.toString(); } for (var i = 0, l = specialObjects.length; i < l; i++) { if (object === specialObjects[i].obj) { return specialObjects[i].value; } } return ascii.object.call(this, object, processed, indent); } ascii.func = function (func) { return "function " + buster.functionName(func) + "() {}"; }; ascii.array = function (array, processed) { processed = processed || []; processed.push(array); var pieces = []; for (var i = 0, l = array.length; i < l; ++i) { pieces.push(ascii.call(this, array[i], processed)); } return "[" + pieces.join(", ") + "]"; }; ascii.object = function (object, processed, indent) { processed = processed || []; processed.push(object); indent = indent || 0; var pieces = [], properties = keys(object), prop, str, obj; var is = ""; var length = 3; for (var i = 0, l = indent; i < l; ++i) { is += " "; } for (i = 0, l = properties.length; i < l; ++i) { prop = properties[i]; obj = object[prop]; if (isCircular(obj, processed)) { str = "[Circular]"; } else { str = ascii.call(this, obj, processed, indent + 2); } str = (/\s/.test(prop) ? '"' + prop + '"' : prop) + ": " + str; length += str.length; pieces.push(str); } var cons = ascii.constructorName.call(this, object); var prefix = cons ? "[" + cons + "] " : "" return (length + indent) > 80 ? prefix + "{\n " + is + pieces.join(",\n " + is) + "\n" + is + "}" : prefix + "{ " + pieces.join(", ") + " }"; }; ascii.element = function (element) { var tagName = element.tagName.toLowerCase(); var attrs = element.attributes, attribute, pairs = [], attrName; for (var i = 0, l = attrs.length; i < l; ++i) { attribute = attrs.item(i); attrName = attribute.nodeName.toLowerCase().replace("html:", ""); if (attrName == "contenteditable" && attribute.nodeValue == "inherit") { continue; } if (!!attribute.nodeValue) { pairs.push(attrName + "=\"" + attribute.nodeValue + "\""); } } var formatted = "<" + tagName + (pairs.length > 0 ? " " : ""); var content = element.innerHTML; if (content.length > 20) { content = content.substr(0, 20) + "[...]"; } var res = formatted + pairs.join(" ") + ">" + content + ""; return res.replace(/ contentEditable="inherit"/, ""); }; ascii.constructorName = function (object) { var name = buster.functionName(object && object.constructor); var excludes = this.excludeConstructors || buster.format.excludeConstructors || []; for (var i = 0, l = excludes.length; i < l; ++i) { if (typeof excludes[i] == "string" && excludes[i] == name) { return ""; } else if (excludes[i].test && excludes[i].test(name)) { return ""; } } return name; }; return ascii; }()); if (typeof module != "undefined") { module.exports = buster.format; } },{"buster-core":44}],44:[function(require,module,exports){ var process=require("__browserify_process");var buster = (function (setTimeout, B) { var isNode = typeof require == "function" && typeof module == "object"; var div = typeof document != "undefined" && document.createElement("div"); var F = function () {}; var buster = { bind: function bind(obj, methOrProp) { var method = typeof methOrProp == "string" ? obj[methOrProp] : methOrProp; var args = Array.prototype.slice.call(arguments, 2); return function () { var allArgs = args.concat(Array.prototype.slice.call(arguments)); return method.apply(obj, allArgs); }; }, partial: function partial(fn) { var args = [].slice.call(arguments, 1); return function () { return fn.apply(this, args.concat([].slice.call(arguments))); }; }, create: function create(object) { F.prototype = object; return new F(); }, extend: function extend(target) { if (!target) { return; } for (var i = 1, l = arguments.length, prop; i < l; ++i) { for (prop in arguments[i]) { target[prop] = arguments[i][prop]; } } return target; }, nextTick: function nextTick(callback) { if (typeof process != "undefined" && process.nextTick) { return process.nextTick(callback); } setTimeout(callback, 0); }, functionName: function functionName(func) { if (!func) return ""; if (func.displayName) return func.displayName; if (func.name) return func.name; var matches = func.toString().match(/function\s+([^\(]+)/m); return matches && matches[1] || ""; }, isNode: function isNode(obj) { if (!div) return false; try { obj.appendChild(div); obj.removeChild(div); } catch (e) { return false; } return true; }, isElement: function isElement(obj) { return obj && obj.nodeType === 1 && buster.isNode(obj); }, isArray: function isArray(arr) { return Object.prototype.toString.call(arr) == "[object Array]"; }, flatten: function flatten(arr) { var result = [], arr = arr || []; for (var i = 0, l = arr.length; i < l; ++i) { result = result.concat(buster.isArray(arr[i]) ? flatten(arr[i]) : arr[i]); } return result; }, each: function each(arr, callback) { for (var i = 0, l = arr.length; i < l; ++i) { callback(arr[i]); } }, map: function map(arr, callback) { var results = []; for (var i = 0, l = arr.length; i < l; ++i) { results.push(callback(arr[i])); } return results; }, parallel: function parallel(fns, callback) { function cb(err, res) { if (typeof callback == "function") { callback(err, res); callback = null; } } if (fns.length == 0) { return cb(null, []); } var remaining = fns.length, results = []; function makeDone(num) { return function done(err, result) { if (err) { return cb(err); } results[num] = result; if (--remaining == 0) { cb(null, results); } }; } for (var i = 0, l = fns.length; i < l; ++i) { fns[i](makeDone(i)); } }, series: function series(fns, callback) { function cb(err, res) { if (typeof callback == "function") { callback(err, res); } } var remaining = fns.slice(); var results = []; function callNext() { if (remaining.length == 0) return cb(null, results); var promise = remaining.shift()(next); if (promise && typeof promise.then == "function") { promise.then(buster.partial(next, null), next); } } function next(err, result) { if (err) return cb(err); results.push(result); callNext(); } callNext(); }, countdown: function countdown(num, done) { return function () { if (--num == 0) done(); }; } }; if (typeof process === "object" && typeof require === "function" && typeof module === "object") { var crypto = require("crypto"); var path = require("path"); buster.tmpFile = function (fileName) { var hashed = crypto.createHash("sha1"); hashed.update(fileName); var tmpfileName = hashed.digest("hex"); if (process.platform == "win32") { return path.join(process.env["TEMP"], tmpfileName); } else { return path.join("/tmp", tmpfileName); } }; } if (Array.prototype.some) { buster.some = function (arr, fn, thisp) { return arr.some(fn, thisp); }; } else { // https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Array/some buster.some = function (arr, fun, thisp) { "use strict"; if (arr == null) { throw new TypeError(); } arr = Object(arr); var len = arr.length >>> 0; if (typeof fun !== "function") { throw new TypeError(); } for (var i = 0; i < len; i++) { if (arr.hasOwnProperty(i) && fun.call(thisp, arr[i], i, arr)) { return true; } } return false; }; } if (Array.prototype.filter) { buster.filter = function (arr, fn, thisp) { return arr.filter(fn, thisp); }; } else { // https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Array/filter buster.filter = function (fn, thisp) { "use strict"; if (this == null) { throw new TypeError(); } var t = Object(this); var len = t.length >>> 0; if (typeof fn != "function") { throw new TypeError(); } var res = []; for (var i = 0; i < len; i++) { if (i in t) { var val = t[i]; // in case fun mutates this if (fn.call(thisp, val, i, t)) { res.push(val); } } } return res; }; } if (isNode) { module.exports = buster; buster.eventEmitter = require("./buster-event-emitter"); Object.defineProperty(buster, "defineVersionGetter", { get: function () { return require("./define-version-getter"); } }); } return buster.extend(B || {}, buster); }(setTimeout, buster)); },{"./buster-event-emitter":45,"./define-version-getter":46,"__browserify_process":31,"crypto":26,"path":20}],45:[function(require,module,exports){ /*jslint eqeqeq: false, onevar: false, plusplus: false*/ /*global buster, require, module*/ if (typeof require == "function" && typeof module == "object") { var buster = require("./buster-core"); } (function () { function eventListeners(eventEmitter, event) { if (!eventEmitter.listeners) { eventEmitter.listeners = {}; } if (!eventEmitter.listeners[event]) { eventEmitter.listeners[event] = []; } return eventEmitter.listeners[event]; } function throwLater(event, error) { buster.nextTick(function () { error.message = event + " listener threw error: " + error.message; throw error; }); } function addSupervisor(emitter, listener, thisObject) { if (!emitter.supervisors) { emitter.supervisors = []; } emitter.supervisors.push({ listener: listener, thisObject: thisObject }); } function notifyListener(emitter, event, listener, args) { try { listener.listener.apply(listener.thisObject || emitter, args); } catch (e) { throwLater(event, e); } } buster.eventEmitter = { create: function () { return buster.create(this); }, addListener: function addListener(event, listener, thisObject) { if (typeof event === "function") { return addSupervisor(this, event, listener); } if (typeof listener != "function") { throw new TypeError("Listener is not function"); } eventListeners(this, event).push({ listener: listener, thisObject: thisObject }); }, once: function once(event, listener, thisObject) { var self = this; this.addListener(event, listener); var wrapped = function () { self.removeListener(event, listener); self.removeListener(event, wrapped); }; this.addListener(event, wrapped); }, hasListener: function hasListener(event, listener, thisObject) { var listeners = eventListeners(this, event); for (var i = 0, l = listeners.length; i < l; i++) { if (listeners[i].listener === listener && listeners[i].thisObject === thisObject) { return true; } } return false; }, removeListener: function (event, listener) { var listeners = eventListeners(this, event); for (var i = 0, l = listeners.length; i < l; ++i) { if (listeners[i].listener == listener) { listeners.splice(i, 1); return; } } }, emit: function emit(event) { var listeners = eventListeners(this, event).slice(); var args = Array.prototype.slice.call(arguments, 1); for (var i = 0, l = listeners.length; i < l; i++) { notifyListener(this, event, listeners[i], args); } listeners = this.supervisors || []; args = Array.prototype.slice.call(arguments); for (i = 0, l = listeners.length; i < l; ++i) { notifyListener(this, event, listeners[i], args); } }, bind: function (object, events) { var method; if (!events) { for (method in object) { if (object.hasOwnProperty(method) && typeof object[method] == "function") { this.addListener(method, object[method], object); } } } else if (typeof events == "string" || Object.prototype.toString.call(events) == "[object Array]") { events = typeof events == "string" ? [events] : events; for (var i = 0, l = events.length; i < l; ++i) { this.addListener(events[i], object[events[i]], object); } } else { for (var prop in events) { if (events.hasOwnProperty(prop)) { method = events[prop]; if (typeof method == "function") { object[buster.functionName(method) || prop] = method; } else { method = object[events[prop]]; } this.addListener(prop, method, object); } } } return object; } }; buster.eventEmitter.on = buster.eventEmitter.addListener; }()); if (typeof module != "undefined") { module.exports = buster.eventEmitter; } },{"./buster-core":44}],46:[function(require,module,exports){ var path = require("path"); var fs = require("fs"); module.exports = function defineVersionGetter(mod, dirname) { Object.defineProperty(mod, "VERSION", { get: function () { if (!this.version) { var pkgJSON = path.resolve(dirname, "..", "package.json"); var pkg = JSON.parse(fs.readFileSync(pkgJSON, "utf8")); this.version = pkg.version; } return this.version; } }); }; },{"fs":19,"path":20}]},{},[1,2,4,3,5,6,7,8,9,10,11,12,13]) //@ sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZ2VuZXJhdGVkLmpzIiwic291cmNlcyI6WyJjOi9Vc2Vycy9Eb21lbmljL0Ryb3Bib3gvR2l0SHViL2RvbWVuaWMvYXBsdXMtdGVzdHMtYWdhaW5zdC10aGUtYnJvd3Nlci9saWIvdGVzdHMvMi4xLjIuanMiLCJjOi9Vc2Vycy9Eb21lbmljL0Ryb3Bib3gvR2l0SHViL2RvbWVuaWMvYXBsdXMtdGVzdHMtYWdhaW5zdC10aGUtYnJvd3Nlci9saWIvdGVzdHMvMi4xLjMuanMiLCJjOi9Vc2Vycy9Eb21lbmljL0Ryb3Bib3gvR2l0SHViL2RvbWVuaWMvYXBsdXMtdGVzdHMtYWdhaW5zdC10aGUtYnJvd3Nlci9saWIvdGVzdHMvMi4yLjEuanMiLCJjOi9Vc2Vycy9Eb21lbmljL0Ryb3Bib3gvR2l0SHViL2RvbWVuaWMvYXBsdXMtdGVzdHMtYWdhaW5zdC10aGUtYnJvd3Nlci9saWIvdGVzdHMvMi4yLjIuanMiLCJjOi9Vc2Vycy9Eb21lbmljL0Ryb3Bib3gvR2l0SHViL2RvbWVuaWMvYXBsdXMtdGVzdHMtYWdhaW5zdC10aGUtYnJvd3Nlci9saWIvdGVzdHMvMi4yLjMuanMiLCJjOi9Vc2Vycy9Eb21lbmljL0Ryb3Bib3gvR2l0SHViL2RvbWVuaWMvYXBsdXMtdGVzdHMtYWdhaW5zdC10aGUtYnJvd3Nlci9saWIvdGV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lsbGVkKCkge1xuICAgICAgICAgICAgICAgIGFzc2VydC5zdHJpY3RFcXVhbCgrK3RpbWVzQ2FsbGVkLCAxKTtcbiAgICAgICAgICAgICAgICBkb25lKCk7XG4gICAgICAgICAgICB9KTtcbiAgICAgICAgfSk7XG5cbiAgICAgICAgc3BlY2lmeShcInRyeWluZyB0byBmdWxmaWxsIGEgcGVuZGluZyBwcm9taXNlIG1vcmUgdGhhbiBvbmNlLCBpbW1lZGlhdGVseVwiLCBmdW5jdGlvbiAoZG9uZSkge1xuICAgICAgICAgICAgdmFyIGQgPSBkZWZlcnJlZCgpO1xuICAgICAgICAgICAgdmFyIHRpbWVzQ2FsbGVkID0gMDtcblxuICAgICAgICAgICAgZC5wcm9taXNlLnRoZW4oZnVuY3Rpb24gb25GdWxmaWxsZWQoKSB7XG4gICAgICAgICAgICAgICAgYXNzZXJ0LnN0cmljdEVxdWFsKCsrdGltZXNDYWxsZWQsIDEpO1xuICAgICAgICAgICAgICAgIGRvbmUoKTtcbiAgICAgICAgICAgIH0pO1xuXG4gICAgICAgICAgICBkLnJlc29sdmUoZHVtbXkpO1xuICAgICAgICAgICAgZC5yZXNvbHZlKGR1bW15KTtcbiAgICAgICAgfSk7XG5cbiAgICAgICAgc3BlY2lmeShcInRyeWluZyB0byBmdWxmaWxsIGEgcGVuZGluZyBwcm9taXNlIG1vcmUgdGhhbiBvbmNlLCBkZWxheWVkXCIsIGZ1bmN0aW9uIChkb25lKSB7XG4gICAgICAgICAgICB2YXIgZCA9IGRlZmVycmVkKCk7XG4gICAgICAgICAgICB2YXIgdGltZXNDYWxsZWQgPSAwO1xuXG4gICAgICAgICAgICBkLnByb21pc2UudGhlbihmdW5jdGlvbiBvbkZ1bGZpbGxlZCgpIHtcbiAgICAgICAgICAgICAgICBhc3NlcnQuc3RyaWN0RXF1YWwoKyt0aW1lc0NhbGxlZCwgMSk7XG4gICAgICAgICAgICAgICAgZG9uZSgpO1xuICAgICAgICAgICAgfSk7XG5cbiAgICAgIC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ICAgICAgICAgICAgICAgYXNzZXJ0LnN0cmljdEVxdWFsKCsrdGltZXNDYWxsZWRbMF0sIDEpO1xuICAgICAgICAgICAgfSk7XG5cbiAgICAgICAgICAgIHNldFRpbWVvdXQoZnVuY3Rpb24gKCkge1xuICAgICAgICAgICAgICAgIGQucHJvbWlzZS50aGVuKGZ1bmN0aW9uIG9uRnVsZmlsbGVkKCkge1xuICAgICAgICAgICAgICAgICAgICBhc3NlcnQuc3RyaWN0RXF1YWwoKyt0aW1lc0NhbGxlZFsxXSwgMSk7XG4gICAgICAgICAgICAgICAgfSk7XG4gICAgICAgICAgICB9LCA1MCk7XG5cbiAgICAgICAgICAgIHNldFRpbWVvdXQoZnVuY3Rpb24gKCkge1xuICAgICAgICAgICAgICAgIGQucHJvbWlzZS50aGVuKGZ1bmN0aW9uIG9uRnVsZmlsbGVkKCkge1xuICAgICAgICAgICAgICAgICAgICBhc3NlcnQuc3RyaWN0RXF1YWwoKyt0aW1lc0NhbGxlZFsyXSwgMSk7XG4gICAgICAgICAgICAgICAgICAgIGRvbmUoKTtcbiAgICAgICAgICAgICAgICB9KTtcbiAgICAgICAgICAgIH0sIDEwMCk7XG5cbiAgICAgICAgICAgIHNldFRpbWVvdXQoZnVuY3Rpb24gKCkge1xuICAgICAgICAgICAgICAgIGQucmVzb2x2ZShkdW1teSk7XG4gICAgICAgICAgICB9LCAxNTApO1xuICAgICAgICB9KTtcblxuICAgICAgICBzcGVjaWZ5KFwid2hlbiBgdGhlbmAgaXMgaW50ZXJsZWF2ZWQgd2l0aCBmdWxmaWxsbWVudFwiLCBmdW5jdGlvbiAoZG9uZSkge1xuICAgICAgICAgICAgdmFyIGQgPSBkZWZlcnJlZCgpO1xuICAgICAgICAgICAgdmFyIHRpbWVzQ2FsbGVkID0gWzAsIDBdO1xuXG4gICAgICAgICAgICBkLnByb21pc2UudGhlbihmdW5jdGlvbiBvbkZ1bGZpbGxlZCgpIHtcbiAgICAgICAgICAgICAgICBhc3NlcnQuc3Ry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ICAgICAgICAgZG9uZSgpO1xuICAgICAgICAgICAgfSk7XG5cbiAgICAgICAgICAgIHNldFRpbWVvdXQoZnVuY3Rpb24gKCkge1xuICAgICAgICAgICAgICAgIGQucmVqZWN0KGR1bW15KTtcbiAgICAgICAgICAgICAgICBpc1JlamVjdGVkID0gdHJ1ZTtcbiAgICAgICAgICAgIH0sIDUwKTtcbiAgICAgICAgfSk7XG5cbiAgICAgICAgc3BlY2lmeShcIm5ldmVyIHJlamVjdGVkXCIsIGZ1bmN0aW9uIChkb25lKSB7XG4gICAgICAgICAgICB2YXIgZCA9IGRlZmVycmVkKCk7XG4gICAgICAgICAgICB2YXIgb25SZWplY3RlZENhbGxlZCA9IGZhbHNlO1xuXG4gICAgICAgICAgICBkLnByb21pc2UudGhlbihudWxsLCBmdW5jdGlvbiBvblJlamVjdGVkKCkge1xuICAgICAgICAgICAgICAgIG9uUmVqZWN0ZWRDYWxsZWQgPSB0cnVlO1xuICAgICAgICAgICAgICAgIGRvbmUoKTtcbiAgICAgICAgICAgIH0pO1xuXG4gICAgICAgICAgICBzZXRUaW1lb3V0KGZ1bmN0aW9uICgpIHtcbiAgICAgICAgICAgICAgICBhc3NlcnQuc3RyaWN0RXF1YWwob25SZWplY3RlZENhbGxlZCwgZmFsc2UpO1xuICAgICAgICAgICAgICAgIGRvbmUoKTtcbiAgICAgICAgICAgIH0sIDE1MCk7XG4gICAgICAgIH0pO1xuICAgIH0pO1xuXG4gICAgZGVzY3JpYmUoXCIyLjIuMy4zOiBpdCBtdXN0IG5vdCBiZSBjYWxsZWQgbW9yZSB0aGFuIG9uY2UuXCIsIGZ1bmN0aW9uICgpIHtcbiAgICAgICAgc3BlY2lmeShcImFscmVhZHktcmVqZWN0ZWRcIiwgZnVuY3Rpb24gKGRvbmUpIHtcbiAgICAgICAgICAgIHZhciB0aW1lc0NhbGxlZCA9IDA7XG5cbiAgICAgICAgICAgIHJlamVjdGVkKGR1bW15KS50aGVuKG51bGwsIGZ1bmN0aW9uIG9uUmVqZWN0ZWQoKSB7XG4gICAgICAgICAgICAgICAgYXNzZXJ0LnN0cmljdEVxdWFsKCsrdGltZXNDYWxsZWQsIDEpO1xuICAgICAgICAgICAgICAgIGRvbmUoKTtcbiAgICAgICAgICAgIH0pO1xuICAgICAgICB9KTtcblxuICAgICAgICBzcGVjaWZ5KFwidHJ5aW5nIHRvIHJlamVjdCBhIHBlbmRpbmcgcHJvbWlzZSBtb3JlIHRoYW4gb25jZSwgaW1tZWRpYXRlbHlcIiwgZnVuY3Rpb24gKGRvbmUpIHtcbiAgICAgICAgICAgIHZhciBkID0gZGVmZXJyZWQoKTtcbiAgICAgICAgICAgIHZhciB0aW1lc0NhbGxlZCA9IDA7XG5cbiAgICAgICAgICAgIGQucHJvbWlzZS50aGVuKG51bGwsIGZ1bmN0aW9uIG9uUmVqZWN0ZWQoKSB7XG4gICAgICAgICAgICAgICAgYXNzZXJ0LnN0cmljdEVxdWFsKCsrdGltZXNDYWxsZWQsIDEpO1xuICAgICAgICAgICAgICAgIGRvbmUoKTtcbiAgICAgICAgICAgIH0pO1xuXG4gICAgICAgICAgICBkLnJlamVjdChkdW1teSk7XG4gICAgICAgICAgICBkLnJlamVjdChkdW1teSk7XG4gICAgICAgIH0pO1xuXG4gICAgICAgIHNwZWNpZnkoXCJ0cnlpbmcgdG8gcmVqZWN0IGEgcGVuZGluZyBwcm9taXNlIG1vcmUgdGhhbiBvbmNlLCBkZWxheWVkXCIsIGZ1bmN0aW9uIChkb25lKSB7XG4gICAgICAgICAgICB2YXIgZCA9IGRlZmVycmVkKCk7XG4gICAgICAgICAgICB2YXIgdGltZXNDYWxsZWQgPSAwO1xuXG4gICAgICAgICAgICBkLnByb21pc2UudGhlbihudWxsLCBmdW5jdGlvbiBvblJlamVjdGVkKCkge1xuICAgICAgICAgICAgICAgIGFzc2VydC5zdHJpY3RFcXVhbCgrK3RpbWVzQ2FsbGVkLCAxKTtcbiAgICAgICAgICAgICAgICBkb25lKCk7XG4gICAgICAgICAgICB9KTtcblxuICAgICAgICAgICAgc2V0VGltZW91dChmdW5jdGlvbiAoKSB7XG4gICAgICAgICAgICAgICAgZC5yZWplY3QoZHVtbXkpO1xuICAgICAgICAgICAgICAgIGQucmVqZWN0KGR1bW15KTtcbiAgICAgICAgICAgIH0sIDUwKTtcbiAgICAgICAgfSk7XG5cbiAgICAgICAgc3BlY2lmeShcInRyeWluZyB0byByZWplY3QgYSBwZW5kaW5nIHByb21pc2UgbW9yZSB0aGFuIG9uY2UsIGltbWVkaWF0ZWx5IHRoZW4gZGVsYXllZFwiLCBmdW5jdGlvbiAoZG9uZSkge1xuICAgICAgICAgICAgdmFyIGQgPSBkZWZlcnJlZCgpO1xuICAgICAgICAgICAgdmFyIHRpbWVzQ2FsbGVkID0gMDtcblxuICAgICAgICAgICAgZC5wcm9taXNlLnRoZW4obnVsbCwgZnVuY3Rpb24gb25SZWplY3RlZCgpIHtcbiAgICAgICAgICAgICAgICBhc3NlcnQuc3RyaWN0RXF1YWwoKyt0aW1lc0NhbGxlZCwgMSk7XG4gICAgICAgICAgICAgICAgZG9uZSgpO1xuICAgICAgICAgICAgfSk7XG5cbiAgICAgICAgICAgIGQucmVqZWN0KGR1bW15KTtcbiAgICAgICAgICAgIHNldFRpbWVvdXQoZnVuY3Rpb24gKCkge1xuICAgICAgICAgICAgICAgIGQucmVqZWN0KGR1bW15KTtcbiAgICAgICAgICAgIH0sIDUwKTtcbiAgICAgICAgfSk7XG5cbiAgICAgICAgc3BlY2lmeShcIndoZW4gbXVsdGlwbGUgYHRoZW5gIGNhbGxzIGFyZSBtYWRlLCBzcGFjZWQgYXBhcnQgaW4gdGltZVwiLCBmdW5jdGlvbiAoZG9uZSkge1xuICAgICAgICAgICAgdmFyIGQgPSBkZWZlcnJlZCgpO1xuICAgICAgICAgICAgdmFyIHRpbWVzQ2FsbGVkID0gWzAsIDAsIDBdO1xuXG4gICAgICAgICAgICBkLnByb21pc2UudGhlbihudWxsLCBmdW5jdGlvbiBvblJlamVjdGVkKCkge1xuICAgICAgICAgICAgICAgIGFzc2VydC5zdHJpY3RFcXVhbCgrK3RpbWVzQ2FsbGVkWzBdLCAxKTtcbiAgICAgICAgICAgIH0pO1xuXG4gICAgICAgICAgICBzZXRUaW1lb3V0KGZ1bmN0aW9uICgpIHtcbiAgICAgICAgICAgICAgICBkLnByb21pc2UudGhlbihudWxsLCBmdW5jdGlvbiBvblJlamVjdGVkKCkge1xuICAgICAgICAgICAgICAgICAgICBhc3NlcnQuc3RyaWN0RXF1YWwoKyt0aW1lc0NhbGxlZFsxXSwgMSk7XG4gICAgICAgICAgICAgICAgfSk7XG4gICAgICAgICAgICB9LCA1MCk7XG5cbiAgICAgICAgICAgIHNldFRpbWVvdXQoZnVuY3Rpb24gKCkge1xuICAgICAgICAgICAgICAgIGQucHJvbWlzZS50aGVuKG51bGwsIGZ1bmN0aW9uIG9uUmVqZWN0ZWQoKSB7XG4gICAgICAgICAgICAgICAgICAgIGFzc2VydC5zdHJpY3RFcXVhbCgrK3RpbWVzQ2FsbGVkWzJdLCAxKTtcbiAgICAgICAgICAgICAgICAgICAgZG9uZSgpO1xuICAgICAgICAgICAgICAgIH0pO1xuICAgICAgICAgICAgfSwgMTAwKTtcblxuICAgICAgICAgICAgc2V0VGltZW91dChmdW5jdGlvbiAoKSB7XG4gICAgICAgICAgICAgICAgZC5yZWplY3QoZHVtbXkpO1xuICAgICAgICAgICAgfSwgMTUwKTtcbiAgICAgICAgfSk7XG5cbiAgICAgICAgc3BlY2lmeShcIndoZW4gYHRoZW5gIGlzIGludGVybGVhdmVkIHdpdGggcmVqZWN0aW9uXCIsIGZ1bmN0aW9uIChkb25lKSB7XG4gICAgICAgICAgICB2YXIgZCA9IGRlZmVycmVkKCk7XG4gICAgICAgICAgICB2YXIgdGltZXNDYWxsZWQgPSBbMCwgMF07XG5cbiAgICAgICAgICAgIGQucHJvbWlzZS50aGVuKG51bGwsIGZ1bmN0aW9uIG9uUmVqZWN0ZWQoKSB7XG4gICAgICAg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N0T25SZWplY3RlZEZpbmlzaGVkID0gZmFsc2U7XG5cbiAgICAgICAgICAgIHByb21pc2UudGhlbihudWxsLCBmdW5jdGlvbiAoKSB7XG4gICAgICAgICAgICAgICAgcHJvbWlzZTIudGhlbihmdW5jdGlvbiAoKSB7XG4gICAgICAgICAgICAgICAgICAgIGFzc2VydC5zdHJpY3RFcXVhbChmaXJzdE9uUmVqZWN0ZWRGaW5pc2hlZCwgdHJ1ZSk7XG4gICAgICAgICAgICAgICAgICAgIGRvbmUoKTtcbiAgICAgICAgICAgICAgICB9KTtcbiAgICAgICAgICAgICAgICBmaXJzdE9uUmVqZWN0ZWRGaW5pc2hlZCA9IHRydWU7XG4gICAgICAgICAgICB9KTtcbiAgICAgICAgfSk7XG5cbiAgICAgICAgc3BlY2lmeShcIndoZW4gdGhlIHByb21pc2UgaXMgZnVsZmlsbGVkIGFzeW5jaHJvbm91c2x5XCIsIGZ1bmN0aW9uIChkb25lKSB7XG4gICAgICAgICAgICB2YXIgZCA9IGRlZmVycmVkKCk7XG4gICAgICAgICAgICB2YXIgZmlyc3RTdGFja0ZpbmlzaGVkID0gZmFsc2U7XG5cbiAgICAgICAgICAgIHNldFRpbWVvdXQoZnVuY3Rpb24gKCkge1xuICAgICAgICAgICAgICAgIGQucmVzb2x2ZShkdW1teSk7XG4gICAgICAgICAgICAgICAgZmlyc3RTdGFja0ZpbmlzaGVkID0gdHJ1ZTtcbiAgICAgICAgICAgIH0sIDApO1xuXG4gICAgICAgICAgICBkLnByb21pc2UudGhlbihmdW5jdGlvbiAoKSB7XG4gICAgICAgICAgICAgICAgYXNzZXJ0LnN0cmljdEVxdWFsKGZpcnN0U3RhY2tGaW5pc2hlZCwgdHJ1ZSk7XG4gICAgICAgICAgICAgICAgZG9uZSgpO1xuICAgICAgICAgICAgfSk7XG4gICAgICAgIH0pO1xuICAgIH0pO1xuXG4gICAgZGVzY3JpYmUoXCJDbGVhbi1zdGFjayBleGVjdXRpb24gb3JkZXJpbmcgdGVzdHMgKHJlamVjdGlvbiBjYXNlKVwiLCBmdW5jdGlvbiAoKSB7XG4gICAgICAgIHNwZWNpZnkoXCJ3aGVuIGBvblJlamVjdGVkYCBpcyBhZGRlZCBpbW1lZGlhdGVseSBiZWZvcmUgdGhlIHByb21pc2UgaXMgcmVqZWN0ZWRcIixcbiAgICAgICAgICAgICAgICBmdW5jdGlvbiAoKSB7XG4gICAgICAgICAgICB2YXIgZCA9IGRlZmVycmVkKCk7XG4gICAgICAgICAgICB2YXIgb25SZWplY3RlZENhbGxlZCA9IGZhbHNlO1xuXG4gICAgICAgICAgICBkLnByb21pc2UudGhlbihudWxsLCBmdW5jdGlvbiBvblJlamVjdGVkKCkge1xuICAgICAgICAgICAgICAgIG9uUmVqZWN0ZWRDYWxsZWQgPSB0cnVlO1xuICAgICAgICAgICAgfSk7XG5cbiAgICAgICAgICAgIGQucmVqZWN0KGR1bW15KTtcblxuICAgICAgICAgICAgYXNzZXJ0LnN0cmljdEVxdWFsKG9uUmVqZWN0ZWRDYWxsZWQsIGZhbHNlKTtcbiAgICAgICAgfSk7XG5cbiAgICAgICAgc3BlY2lmeShcIndoZW4gYG9uUmVqZWN0ZWRgIGlzIGFkZGVkIGltbWVkaWF0ZWx5IGFmdGVyIHRoZSBwcm9taXNlIGlzIHJlamVjdGVkXCIsXG4gICAgICAgICAgICAgICAgZnVuY3Rpb24gKCkge1xuICAgICAgICAgICAgdmFyIGQgPSBkZWZlcnJlZCgpO1xuICAgICAgICAgICAgdmFyIG9uUmVqZWN0ZWRDYWxsZWQgPSBmYWxzZTtcblxuICAgICAgICAgICAgZC5yZWplY3QoZHVtbXkpO1xuXG4gICAgICAgICAgICBkLnByb21pc2UudGhlbihudWxsLCBmdW5jdGlvbiBvblJlamVjdGVkKCkge1xuICAgICAgICAgICAgICAgIG9uUmVqZWN0ZWRDYWxsZWQgPSB0cnVlO1xuICAgICAgICAgICAgfSk7XG5cbiAgICAgICAgICAgIGFzc2VydC5zdHJpY3RFcXVhbChv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Ckge1xuICAgICAgICAgICAgICAgICAgICBhc3NlcnQuc3RyaWN0RXF1YWwoZmlyc3RPblJlamVjdGVkRmluaXNoZWQsIHRydWUpO1xuICAgICAgICAgICAgICAgICAgICBkb25lKCk7XG4gICAgICAgICAgICAgICAgfSk7XG4gICAgICAgICAgICAgICAgZmlyc3RPblJlamVjdGVkRmluaXNoZWQgPSB0cnVlO1xuICAgICAgICAgICAgfSk7XG4gICAgICAgIH0pO1xuXG4gICAgICAgIHNwZWNpZnkoXCJ3aGVuIHRoZSBwcm9taXNlIGlzIHJlamVjdGVkIGFzeW5jaHJvbm91c2x5XCIsIGZ1bmN0aW9uIChkb25lKSB7XG4gICAgICAgICAgICB2YXIgZCA9IGRlZmVycmVkKCk7XG4gICAgICAgICAgICB2YXIgZmlyc3RTdGFja0ZpbmlzaGVkID0gZmFsc2U7XG5cbiAgICAgICAgICAgIHNldFRpbWVvdXQoZnVuY3Rpb24gKCkge1xuICAgICAgICAgICAgICAgIGQucmVqZWN0KGR1bW15KTtcbiAgICAgICAgICAgICAgICBmaXJzdFN0YWNrRmluaXNoZWQgPSB0cnVlO1xuICAgICAgICAgICAgfSwgMCk7XG5cbiAgICAgICAgICAgIGQucHJvbWlzZS50aGVuKG51bGwsIGZ1bmN0aW9uICgpIHtcbiAgICAgICAgICAgICAgICBhc3NlcnQuc3RyaWN0RXF1YWwoZmlyc3RTdGFja0ZpbmlzaGVkLCB0cnVlKTtcbiAgICAgICAgICAgICAgICBkb25lKCk7XG4gICAgICAgICAgICB9KTtcbiAgICAgICAgfSk7XG4gICAgfSk7XG59KTtcbiIsInZhciBnbG9iYWw9dHlwZW9mIHNlbGYgIT09IFwidW5kZWZpbmVkXCIgPyBzZWxmIDogdHlwZW9mIHdpbmRvdyAhPT0gXCJ1bmRlZmluZWRcIiA/IHdpbmRvdyA6IHt9Oy8qanNoaW50IHN0cmljdDogZmFsc2UgKi9cblxudmFyIGFzc2VydCA9IHJlcXVpcmUoXCJhc3NlcnRcIik7XG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9uIG9uRnVsZmlsbGVkKCkge1xuICAgICAgICAgICAgICAgIFwidXNlIHN0cmljdFwiO1xuXG4gICAgICAgICAgICAgICAgYXNzZXJ0LnN0cmljdEVxdWFsKHRoaXMsIGRlZmF1bHRUaGlzU3RyaWN0KTtcbiAgICAgICAgICAgICAgICBkb25lKCk7XG4gICAgICAgICAgICB9KTtcbiAgICAgICAgfSk7XG5cbiAgICAgICAgc3BlY2lmeShcInJlamVjdGVkXCIsIGZ1bmN0aW9uIChkb25lKSB7XG4gICAgICAgICAgICByZWplY3RlZChkdW1teSkudGhlbihudWxsLCBmdW5jdGlvbiBvblJlamVjdGVkKCkge1xuICAgICAgICAgICAgICAgIFwidXNlIHN0cmljdFwiO1xuXG4gICAgICAgICAgICAgICAgYXNzZXJ0LnN0cmljdEVxdWFsKHRoaXMsIGRlZmF1bHRUaGlzU3RyaWN0KTtcbiAgICAgICAgICAgICAgICBkb25lKCk7XG4gICAgICAgICAgICB9KTtcbiAgICAgICAgfSk7XG4gICAgfSk7XG5cbiAgICBkZXNjcmliZShcInNsb3BweSBtb2RlXCIsIGZ1bmN0aW9uICgpIHtcbiAgICAgICAgc3BlY2lmeShcImZ1bGZpbGxlZFwiLCBmdW5jdGlvbiAoZG9uZSkge1xuICAgICAgICAgICAgcmVzb2x2ZWQoZHVtbXkpLnRoZW4oZnVuY3Rpb24gb25GdWxmaWxsZWQoKSB7XG4gICAgICAgICAgICAgICAgYXNzZXJ0LnN0cmljdEVxdWFsKHRoaXMsIGRlZmF1bHRUaGlzU2xvcHB5KTtcbiAgICAgICAgICAgICAgICBkb25lKCk7XG4gICAgICAgICAgICB9KTtcbiAgICAgICAgfSk7XG5cbiAgICAgICAgc3BlY2lmeShcInJlamVjdGVkXCIsIGZ1bmN0aW9uIChkb25lKSB7XG4gICAgICAgICAgICByZWplY3RlZChkdW1teSkudGhlbihudWxsLCBmdW5jdGlvbiBvblJlamVjdGVkKCkge1xuICAgICAgICAgICAgICAgIGFzc2VydC5zdHJp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KGhhbmRsZXIyLCBzcHkpO1xuICAgICAgICAgICAgICAgIHByb21pc2UudGhlbihoYW5kbGVyMywgc3B5KTtcblxuICAgICAgICAgICAgICAgIHByb21pc2UudGhlbihmdW5jdGlvbiAodmFsdWUpIHtcbiAgICAgICAgICAgICAgICAgICAgYXNzZXJ0LnN0cmljdEVxdWFsKHZhbHVlLCBzZW50aW5lbCk7XG5cbiAgICAgICAgICAgICAgICAgICAgc2lub24uYXNzZXJ0LmNhbGxlZFdpdGgoaGFuZGxlcjEsIHNpbm9uLm1hdGNoLnNhbWUoc2VudGluZWwpKTtcbiAgICAgICAgICAgICAgICAgICAgc2lub24uYXNzZXJ0LmNhbGxlZFdpdGgoaGFuZGxlcjIsIHNpbm9uLm1hdGNoLnNhbWUoc2VudGluZWwpKTtcbiAgICAgICAgICAgICAgICAgICAgc2lub24uYXNzZXJ0LmNhbGxlZFdpdGgoaGFuZGxlcjMsIHNpbm9uLm1hdGNoLnNhbWUoc2VudGluZWwpKTtcbiAgICAgICAgICAgICAgICAgICAgc2lub24uYXNzZXJ0Lm5vdENhbGxlZChzcHkpO1xuXG4gICAgICAgICAgICAgICAgICAgIGRvbmUoKTtcbiAgICAgICAgICAgICAgICB9KTtcbiAgICAgICAgICAgIH0pO1xuICAgICAgICB9KTtcblxuICAgICAgICBkZXNjcmliZShcIm11bHRpcGxlIGZ1bGZpbGxtZW50IGhhbmRsZXJzLCBvbmUgb2Ygd2hpY2ggdGhyb3dzXCIsIGZ1bmN0aW9uICgpIHtcbiAgICAgICAgICAgIHRlc3RGdWxmaWxsZWQoc2VudGluZWwsIGZ1bmN0aW9uIChwcm9taXNlLCBkb25lKSB7XG4gICAgICAgICAgICAgICAgdmFyIGhhbmRsZXIxID0gc2lub24uc3R1YigpLnJldHVybnMob3RoZXIpO1xuICAgICAgICAgICAgICAgIHZhciBoYW5kbGVyMiA9IHNpbm9uLnN0dWIoKS50aHJvd3Mob3RoZXIpO1xuICAgICAgICAgICAgICAgIHZhciBoYW5kbGVyMyA9IHNpbm9uLnN0dWIoKS5yZXR1cm5zKG90aGVyKTtcblxuICAgICAgICAgICAgICAgIHZhciBzcHkgPSBzaW5vbi5zcHkoKTtcbiAgICAgICAgICAgICAgICBwcm9taXNlLnRoZW4oaGFuZGxlcjEsIHNweSk7XG4gICAgICAgICAgICAgICAgcHJvbWlzZS50aGVuKGhhbmRsZXIyLCBzcHkpO1xuICAgICAgICAgICAgICAgIHByb21pc2UudGhlbihoYW5kbGVyMywgc3B5KTtcblxuICAgICAgICAgICAgICAgIHByb21pc2UudGhlbihmdW5jdGlvbiAodmFsdWUpIHtcbiAgICAgICAgICAgICAgICAgICAgYXNzZXJ0LnN0cmljdEVxdWFsKHZhbHVlLCBzZW50aW5lbCk7XG5cbiAgICAgICAgICAgICAgICAgICAgc2lub24uYXNzZXJ0LmNhbGxlZFdpdGgoaGFuZGxlcjEsIHNpbm9uLm1hdGNoLnNhbWUoc2VudGluZWwpKTtcbiAgICAgICAgICAgICAgICAgICAgc2lub24uYXNzZXJ0LmNhbGxlZFdpdGgoaGFuZGxlcjIsIHNpbm9uLm1hdGNoLnNhbWUoc2VudGluZWwpKTtcbiAgICAgICAgICAgICAgICAgICAgc2lub24uYXNzZXJ0LmNhbGxlZFdpdGgoaGFuZGxlcjMsIHNpbm9uLm1hdGNoLnNhbWUoc2VudGluZWwpKTtcbiAgICAgICAgICAgICAgICAgICAgc2lub24uYXNzZXJ0Lm5vdENhbGxlZChzcHkpO1xuXG4gICAgICAgICAgICAgICAgICAgIGRvbmUoKTtcbiAgICAgICAgICAgICAgICB9KTtcbiAgICAgICAgICAgIH0pO1xuICAgICAgICB9KTtcblxuICAgICAgICBkZXNjcmliZShcInJlc3VsdHMgaW4gbXVsdGlwbGUgYnJhbmNoaW5nIGNoYWlucyB3aXRoIHRoZWlyIG93biBmdWxmaWxsbWVudCB2YWx1ZXNcIiwgZnVuY3Rpb24gKCkge1xuICAgICAgICAgICAgdGVzdEZ1bGZpbGxlZChkdW1teSwgZnVuY3Rpb24gKHByb21pc2UsIGRvbmUpIHtcbiAgICAgICAgICAgICAgICB2YXIgc2VtaURvbmUgPSBjYWxsYmFja0FnZ3JlZ2F0b3IoMywgZG9uZSk7XG5cbiAgICAgICAgICAgICAgICBwcm9taXNlLnRoZW4oZnVuY3Rpb24gKCkge1xuICAgICAgICAgICAgICAgICAgICByZXR1cm4gc2VudGluZWw7XG4gICAgICAgICAgICAgICAgfSkudGhlbihmdW5jdGlvbiAodmFsdWUpIHtcbiAgICAgICAgICAgICAgICAgICAgYXNzZXJ0LnN0cmljdEVxdWFsKHZhbHVlLCBzZW50aW5lbCk7XG4gICAgICAgICAgICAgICAgICAgIHNlbWlEb25lKCk7XG4gICAgICAgICAgICAgICAgfSk7XG5cbiAgICAgICAgICAgICAgICBwcm9taXNlLnRoZW4oZnVuY3Rpb24gKCkge1xuICAgICAgICAgICAgICAgICAgICB0aHJvdyBzZW50aW5lbDI7XG4gICAgICAgICAgICAgICAgfSkudGhlbihudWxsLCBmdW5jdGlvbiAocmVhc29uKSB7XG4gICAgICAgICAgICAgICAgICAgIGFzc2VydC5zdHJpY3RFcXVhbChyZWFzb24sIHNlbnRpbmVsMik7XG4gICAgICAgICAgICAgICAgICAgIHNlbWlEb25lKCk7XG4gICAgICAgICAgICAgICAgfSk7XG5cbiAgICAgICAgICAgICAgICBwcm9taXNlLnRoZW4oZnVuY3Rpb24gKCkge1xuICAgICAgICAgICAgICAgICAgICByZXR1cm4gc2VudGluZWwzO1xuICAgICAgICAgICAgICAgIH0pLnRoZW4oZnVuY3Rpb24gKHZhbHVlKSB7XG4gICAgICAgICAgICAgICAgICAgIGFzc2VydC5zdHJpY3RFcXVhbCh2YWx1ZSwgc2VudGluZWwzKTtcbiAgICAgICAgICAgICAgICAgICAgc2VtaURvbmUoKTtcbiAgICAgICAgICAgICAgICB9KTtcbiAgICAgICAgICAgIH0pO1xuICAgICAgICB9KTtcblxuICAgICAgICBkZXNjcmliZShcImBvbkZ1bGZpbGxlZGAgaGFuZGxlcnMgYXJlIGNhbGxlZCBpbiB0aGUgb3JpZ2luYWwgb3JkZXJcIiwgZnVuY3Rpb24gKCkge1xuICAgICAgICAgICAgdGVzdEZ1bGZpbGxlZChkdW1teSwgZnVuY3Rpb24gKHByb21pc2UsIGRvbmUpIHtcbiAgICAgICAgICAgICAgICB2YXIgaGFuZGxlcjEgPSBzaW5vbi5zcHkoZnVuY3Rpb24gaGFuZGxlcjEoKSB7fSk7XG4gICAgICAgICAgICAgICAgdmFyIGhhbmRsZXIyID0gc2lub24uc3B5KGZ1bmN0aW9uIGhhbmRsZXIyKCkge30pO1xuICAgICAgICAgICAgICAgIHZhciBoYW5kbGVyMyA9IHNpbm9uLnNweShmdW5jdGlvbiBoYW5kbGVyMygpIHt9KTtcblxuICAgICAgICAgICAgICAgIHByb21pc2UudGhlbihoYW5kbGVyMSk7XG4gICAgICAgICAgICAgICAgcHJvbWlzZS50aGVuKGhhbmRsZXIyKTtcbiAgICAgICAgICAgICAgICBwcm9taXNlLnRoZW4oaGFuZGxlcjMpO1xuXG4gICAgICAgICAgICAgICAgcHJvbWlzZS50aGVuKGZ1bmN0aW9uICgpIHtcbiAgICAgICAgICAgICAgICAgICAgc2lub24uYXNzZXJ0LmNhbGxPcmRlcihoYW5kbGVyMSwgaGFuZGxlcjIsIGhhbmRsZXIzKTtcbiAgICAgICAgICAgICAgICAgICAgZG9uZSgpO1xuICAgICAgICAgICAgICAgIH0pO1xuICAgICAgICAgICAgfSk7XG5cbiAgICAgICAgICAgIGRlc2NyaWJlKFwiZXZlbiB3aGVuIG9uZSBoYW5kbGVyIGlzIGFkZGVkIGluc2lkZSBhbm90aGVyIGhhbmRsZXJcIiwgZnVuY3Rpb24gKCkge1xuICAgICAgICAgICAgICAgIHRlc3RGdWxmaWxsZWQoZHVtbXksIGZ1bmN0aW9uIChwcm9taXNlLCBkb25lKSB7XG4gICAgICAgICAgICAgICAgICAgIHZhciBoYW5kbGVyMSA9IHNpbm9uLnNweShmdW5jdGlvbiBoYW5kbGVyMSgpIHt9KTtcbiAgICAgICAgICAgICAgICAgICAgdmFyIGhhbmRsZXIyID0gc2lub24uc3B5KGZ1bmN0aW9uIGhhbmRsZXIyKCkge30pO1xuICAgICAgICAgICAgICAgICAgICB2YXIgaGFuZGxlcjMgPSBzaW5vbi5zcHkoZnVuY3Rpb24gaGFuZGxlcjMoKSB7fSk7XG5cbiAgICAgICAgICAgICAgICAgICAgcHJvbWlzZS50aGVuKGZ1bmN0aW9uICgpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGhhbmRsZXIxKCk7XG4gICAgICAgICAgICAgICAgICAgICAgICBwcm9taXNlLnRoZW4oaGFuZGxlcjMpO1xuICAgICAgICAgICAgICAgICAgICB9KTtcbiAgICAgICAgICAgICAgICAgICAgcHJvbWlzZS50aGVuKGhhbmRsZXIyKTtcblxuICAgICAgICAgICAgICAgICAgICBwcm9taXNlLnRoZW4oZnVuY3Rpb24gKCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgLy8gR2l2ZSBpbXBsZW1lbnRhdGlvbnMgYSBiaXQgb2YgZXh0cmEgdGltZSB0byBmbHVzaCB0aGVpciBpbnRlcm5hbCBxdWV1ZSwgaWYgbmVjZXNzYXJ5LlxuICAgICAgICAgICAgICAgICAgICAgICAgc2V0VGltZW91dChmdW5jdGlvbiAoKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgc2lub24uYXNzZXJ0LmNhbGxPcmRlcihoYW5kbGVyMSwgaGFuZGxlcjIsIGhhbmRsZXIzKTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBkb25lKCk7XG4gICAgICAgICAgICAgICAgICAgICAgICB9LCAxNSk7XG4gICAgICAgICAgICAgICAgICAgIH0pO1xuICAgICAgICAgICAgICAgIH0pO1xuICAgICAgICAgICAgfSk7XG4gICAgICAgIH0pO1xuICAgIH0pO1xuXG4gICAgZGVzY3JpYmUoXCIyLjIuNi4yOiBJZi93aGVuIGBwcm9taXNlYCBpcyByZWplY3RlZCwgYWxsIHJlc3BlY3RpdmUgYG9uUmVqZWN0ZWRgIGNhbGxiYWNrcyBtdXN0IGV4ZWN1dGUgaW4gdGhlIFwiICtcbiAgICAgICAgICAgICBcIm9yZGVyIG9mIHRoZWlyIG9yaWdpbmF0aW5nIGNhbGxzIHRvIGB0aGVuYC5cIiwgZnVuY3Rpb24gKCkge1xuICAgICAgICBkZXNjcmliZShcIm11bHRpcGxlIGJvcmluZyByZWplY3Rpb24gaGFuZGxlcnNcIiwgZnVuY3Rpb24gKCkge1xuICAgICAgICAgICAgdGVzdFJlamVjdGVkKHNlbnRpbmVsLCBmdW5jdGlvbiAocHJvbWlzZSwgZG9uZSkge1xuICAgICAgICAgICAgICAgIHZhciBoYW5kbGVyMSA9IHNpbm9uLnN0dWIoKS5yZXR1cm5zKG90aGVyKTtcbiAgICAgICAgICAgICAgICB2YXIgaGFuZGxlcjIgPSBzaW5vbi5zdHViKCkucmV0dXJucyhvdGhlcik7XG4gICAgICAgICAgICAgICAgdmFyIGhhbmRsZXIzID0gc2lub24uc3R1YigpLnJldHVybnMob3RoZXIpO1xuXG4gICAgICAgICAgICAgICAgdmFyIHNweSA9IHNpbm9uLnNweSgpO1xuICAgICAgICAgICAgICAgIHByb21pc2UudGhlbihzcHksIGhhbmRsZXIxKTtcbiAgICAgICAgICAgICAgICBwcm9taXNlLnRoZW4oc3B5LCBoYW5kbGVyMik7XG4gICAgICAgICAgICAgICAgcHJvbWlzZS50aGVuKHNweSwgaGFuZGxlcjMpO1xuXG4gICAgICAgICAgICAgICAgcHJvbWlzZS50aGVuKG51bGwsIGZ1bmN0aW9uIChyZWFzb24pIHtcbiAgICAgICAgICAgICAgICAgICAgYXNzZXJ0LnN0cmljdEVxdWFsKHJlYXNvbiwgc2VudGluZWwpO1xuXG4gICAgICAgICAgICAgICAgICAgIHNpbm9uLmFzc2VydC5jYWxsZWRXaXRoKGhhbmRsZXIxLCBzaW5vbi5tYXRjaC5zYW1lKHNlbnRpbmVsKSk7XG4gICAgICAgICAgICAgICAgICAgIHNpbm9uLmFzc2VydC5jYWxsZWRXaXRoKGhhbmRsZXIyLCBzaW5vbi5tYXRjaC5zYW1lKHNlbnRpbmVsKSk7XG4gICAgICAgICAgICAgICAgICAgIHNpbm9uLmFzc2VydC5jYWxsZWRXaXRoKGhhbmRsZXIzLCBzaW5vbi5tYXRjaC5zYW1lKHNlbnRpbmVsKSk7XG4gICAgICAgICAgICAgICAgICAgIHNpbm9uLmFzc2VydC5ub3RDYWxsZWQoc3B5KTtcblxuICAgICAgICAgICAgICAgICAgICBkb25lKCk7XG4gICAgICAgICAgICAgICAgfSk7XG4gICAgICAgICAgICB9KTtcbiAgICAgICAgfSk7XG5cbiAgICAgICAgZGVzY3JpYmUoXCJtdWx0aXBsZSByZWplY3Rpb24gaGFuZGxlcnMsIG9uZSBvZiB3aGljaCB0aHJvd3NcIiwgZnVuY3Rpb24gKCkge1xuICAgICAgICAgICAgdGVzdFJlamVjdGVkKHNlbnRpbmVsLCBmdW5jdGlvbiAocHJvbWlzZSwgZG9uZSkge1xuICAgICAgICAgICAgICAgIHZhciBoYW5kbGVyMSA9IHNpbm9uLnN0dWIoKS5yZXR1cm5zKG90aGVyKTtcbiAgICAgICAgICAgICAgICB2YXIgaGFuZGxlcjIgPSBzaW5vbi5zdHViKCkudGhyb3dzKG90aGVyKTtcbiAgICAgICAgICAgICAgICB2YXIgaGFuZGxlcjMgPSBzaW5vbi5zdHViKCkucmV0dXJucyhvdGhlcik7XG5cbiAgICAgICAgICAgICAgICB2YXIgc3B5ID0gc2lub24uc3B5KCk7XG4gICAgICAgICAgICAgICAgcHJvbWlzZS50aGVuKHNweSwgaGFuZGxlcjEpO1xuICAgICAgICAgICAgICAgIHByb21pc2UudGhlbihzcHksIGhhbmRsZXIyKTtcbiAgICAgICAgICAgICAgICBwcm9taXNlLnRoZW4oc3B5LCBoYW5kbGVyMyk7XG5cbiAgICAgICAgICAgICAgICBwcm9taXNlLnRoZW4obnVsbCwgZnVuY3Rpb24gKHJlYXNvbikge1xuICAgICAgICAgICAgICAgICAgICBhc3NlcnQuc3RyaWN0RXF1YWwocmVhc29uLCBzZW50aW5lbCk7XG5cbiAgICAgICAgICAgICAgICAgICAgc2lub24uYXNzZXJ0LmNhbGxlZFdpdGgoaGFuZGxlcjEsIHNpbm9uLm1hdGNoLnNhbWUoc2VudGluZWwpKTtcbiAgICAgICAgICAgICAgICAgICAgc2lub24uYXNzZXJ0LmNhbGxlZFdpdGgoaGFuZGxlcjIsIHNpbm9uLm1hdGNoLnNhbWUoc2VudGluZWwpKTtcbiAgICAgICAgICAgICAgICAgICAgc2lub24uYXNzZXJ0LmNhbGxlZFdpdGgoaGFuZGxlcjMsIHNpbm9uLm1hdGNoLnNhbWUoc2VudGluZWwpKTtcbiAgICAgICAgICAgICAgICAgICAgc2lub24uYXNzZXJ0Lm5vdENhbGxlZChzcHkpO1xuXG4gICAgICAgICAgICAgICAgICAgIGRvbmUoKTtcbiAgICAgICAgICAgICAgICB9KTtcbiAgICAgICAgICAgIH0pO1xuICAgICAgICB9KTtcblxuICAgICAgICBkZXNjcmliZShcInJlc3VsdHMgaW4gbXVsdGlwbGUgYnJhbmNoaW5nIGNoYWlucyB3aXRoIHRoZWlyIG93biBmdWxmaWxsbWVudCB2YWx1ZXNcIiwgZnVuY3Rpb24gKCkge1xuICAgICAgICAgICAgdGVzdFJlamVjdGVkKHNlbnRpbmVsLCBmdW5jdGlvbiAocHJvbWlzZSwgZG9uZSkge1xuICAgICAgICAgICAgICAgIHZhciBzZW1pRG9uZSA9IGNhbGxiYWNrQWdncmVnYXRvcigzLCBkb25lKTtcblxuICAgICAgICAgICAgICAgIHByb21pc2UudGhlbihudWxsLCBmdW5jdGlvbiAoKSB7XG4gICAgICAgICAgICAgICAgICAgIHJldHVybiBzZW50aW5lbDtcbiAgICAgICAgICAgICAgICB9KS50aGVuKGZ1bmN0aW9uICh2YWx1ZSkge1xuICAgICAgICAgICAgICAgICAgICBhc3NlcnQuc3RyaWN0RXF1YWwodmFsdWUsIHNlbnRpbmVsKTtcbiAgICAgICAgICAgICAgICAgICAgc2VtaURvbmUoKTtcbiAgICAgICAgICAgICAgICB9KTtcblxuICAgICAgICAgICAgICAgIHByb21pc2UudGhlbihudWxsLCBmdW5jdGlvbiAoKSB7XG4gICAgICAgICAgICAgICAgICAgIHRocm93IHNlbnRpbmVsMjtcbiAgICAgICAgICAgICAgICB9KS50aGVuKG51bGwsIGZ1bmN0aW9uIChyZWFzb24pIHtcbiAgICAgICAgICAgICAgICAgICAgYXNzZXJ0LnN0cmljdEVxdWFsKHJlYXNvbiwgc2VudGluZWwyKTtcbiAgICAgICAgICAgICAgICAgICAgc2VtaURvbmUoKTtcbiAgICAgICAgICAgICAgICB9KTtcblxuICAgICAgICAgICAgICAgIHByb21pc2UudGhlbihudWxsLCBmdW5jdGlvbiAoKSB7XG4gICAgICAgICAgICAgICAgICAgIHJldHVybiBzZW50aW5lbDM7XG4gICAgICAgICAgICAgICAgfSkudGhlbihmdW5jdGlvbiAodmFsdWUpIHtcbiAgICAgICAgICAgICAgICAgICAgYXNzZXJ0LnN0cmljdEVxdWFsKHZhbHVlLCBzZW50aW5lbDMpO1xuICAgICAgICAgICAgICAgICAgICBzZW1pRG9uZSgpO1xuICAgICAgICAgICAgICAgIH0pO1xuICAgICAgICAgICAgfSk7XG4gICAgICAgIH0pO1xuXG4gICAgICAgIGRlc2NyaWJlKFwiYG9uUmVqZWN0ZWRgIGhhbmRsZXJzIGFyZSBjYWxsZWQgaW4gdGhlIG9yaWdpbmFsIG9yZGVyXCIsIGZ1bmN0aW9uICgpIHtcbiAgICAgICAgICAgIHRlc3RSZWplY3RlZChkdW1teSwgZnVuY3Rpb24gKHByb21pc2UsIGRvbmUpIHtcbiAgICAgICAgICAgICAgICB2YXIgaGFuZGxlcjEgPSBzaW5vbi5zcHkoZnVuY3Rpb24gaGFuZGxlcjEoKSB7fSk7XG4gICAgICAgICAgICAgICAgdmFyIGhhbmRsZXIyID0gc2lub24uc3B5KGZ1bmN0aW9uIGhhbmRsZXIyKCkge30pO1xuICAgICAgICAgICAgICAgIHZhciBoYW5kbGVyMyA9IHNpbm9uLnNweShmdW5jdGlvbiBoYW5kbGVyMygpIHt9KTtcblxuICAgICAgICAgICAgICAgIHByb21pc2UudGhlbihudWxsLCBoYW5kbGVyMSk7XG4gICAgICAgICAgICAgICAgcHJvbWlzZS50aGVuKG51bGwsIGhhbmRsZXIyKTtcbiAgICAgICAgICAgICAgICBwcm9taXNlLnRoZW4obnVsbCwgaGFuZGxlcjMpO1xuXG4gICAgICAgICAgICAgICAgcHJvbWlzZS50aGVuKG51bGwsIGZ1bmN0aW9uICgpIHtcbiAgICAgICAgICAgICAgICAgICAgc2lub24uYXNzZXJ0LmNhbGxPcmRlcihoYW5kbGVyMSwgaGFuZGxlcjIsIGhhbmRsZXIzKTtcbiAgICAgICAgICAgICAgICAgICAgZG9uZSgpO1xuICAgICAgICAgICAgICAgIH0pO1xuICAgICAgICAgICAgfSk7XG5cbiAgICAgICAgICAgIGRlc2NyaWJlKFwiZXZlbiB3aGVuIG9uZSBoYW5kbGVyIGlzIGFkZGVkIGluc2lkZSBhbm90aGVyIGhhbmRsZXJcIiwgZnVuY3Rpb24gKCkge1xuICAgICAgICAgICAgICAgIHRlc3RSZWplY3RlZChkdW1teSwgZnVuY3Rpb24gKHByb21pc2UsIGRvbmUpIHtcbiAgICAgICAgICAgICAgICAgICAgdmFyIGhhbmRsZXIxID0gc2lub24uc3B5KGZ1bmN0aW9uIGhhbmRsZXIxKCkge30pO1xuICAgICAgICAgICAgICAgICAgICB2YXIgaGFuZGxlcjIgPSBzaW5vbi5zcHkoZnVuY3Rpb24gaGFuZGxlcjIoKSB7fSk7XG4gICAgICAgICAgICAgICAgICAgIHZhciBoYW5kbGVyMyA9IHNpbm9uLnNweShmdW5jdGlvbiBoYW5kbGVyMygpIHt9KTtcblxuICAgICAgICAgICAgICAgICAgICBwcm9taXNlLnRoZW4obnVsbCwgZnVuY3Rpb24gKCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgaGFuZGxlcjEoKTtcbiAgICAgICAgICAgICAgICAgICAgICAgIHByb21pc2UudGhlbihudWxsLCBoYW5kbGVyMyk7XG4gICAgICAgICAgICAgICAgICAgIH0pO1xuICAgICAgICAgICAgICAgICAgICBwcm9taXNlLnRoZW4obnVsbCwgaGFuZGxlcjIpO1xuXG4gICAgICAgICAgICAgICAgICAgIHByb21pc2UudGhlbihudWxsLCBmdW5jdGlvbiAoKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAvLyBHaXZlIGltcGxlbWVudGF0aW9ucyBhIGJpdCBvZiBleHRyYSB0aW1lIHRvIGZsdXNoIHRoZWlyIGludGVybmFsIHF1ZXVlLCBpZiBuZWNlc3NhcnkuXG4gICAgICAgICAgICAgICAgICAgICAgICBzZXRUaW1lb3V0KGZ1bmN0aW9uICgpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBzaW5vbi5hc3NlcnQuY2FsbE9yZGVyKGhhbmRsZXIxLCBoYW5kbGVyMiwgaGFuZGxlcjMpO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGRvbmUoKTtcbiAgICAgICAgICAgICAgICAgICAgICAgIH0sIDE1KTtcbiAgICAgICAgICAgICAgICAgICAgfSk7XG4gICAgICAgICAgICAgICAgfSk7XG4gICAgICAgICAgICB9KTtcbiAgICAgICAgfSk7XG4gICAgfSk7XG59KTtcbiIsInZhciBnbG9iYWw9dHlwZW9mIHNlbGYgIT09IFwidW5kZWZpbmVkXCIgPyBzZWxmIDogdHlwZW9mIHdpbmRvdyAhPT0gXCJ1bmRlZmluZWRcIiA/IHdpbmRvdyA6IHt9O1widXNlIHN0cmljdFwiO1xuXG52YXIgYXNzZXJ0ID0gcmVxdWlyZShcImFzc2VydFwiKTtcbnZhciB0ZXN0RnVsZmlsbGVkID0gcmVxdWlyZShcIi4vaGVscGVycy90ZXN0VGhyZWVDYXNlc1wiKS50ZX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2YXIgcHJvbWlzZTIgPSBwcm9taXNlMS50aGVuKGZ1bmN0aW9uIG9uRnVsZmlsbGVkKCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgdGhyb3cgZXhwZWN0ZWRSZWFzb247XG4gICAgICAgICAgICAgICAgICAgIH0pO1xuXG4gICAgICAgICAgICAgICAgICAgIHByb21pc2UyLnRoZW4obnVsbCwgZnVuY3Rpb24gb25Qcm9taXNlMlJlamVjdGVkKGFjdHVhbFJlYXNvbikge1xuICAgICAgICAgICAgICAgICAgICAgICAgYXNzZXJ0LnN0cmljdEVxdWFsKGFjdHVhbFJlYXNvbiwgZXhwZWN0ZWRSZWFzb24pO1xuICAgICAgICAgICAgICAgICAgICAgICAgZG9uZSgpO1xuICAgICAgICAgICAgICAgICAgICB9KTtcbiAgICAgICAgICAgICAgICB9KTtcbiAgICAgICAgICAgICAgICB0ZXN0UmVqZWN0ZWQoZHVtbXksIGZ1bmN0aW9uIChwcm9taXNlMSwgZG9uZSkge1xuICAgICAgICAgICAgICAgICAgICB2YXIgcHJvbWlzZTIgPSBwcm9taXNlMS50aGVuKG51bGwsIGZ1bmN0aW9uIG9uUmVqZWN0ZWQoKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICB0aHJvdyBleHBlY3RlZFJlYXNvbjtcbiAgICAgICAgICAgICAgICAgICAgfSk7XG5cbiAgICAgICAgICAgICAgICAgICAgcHJvbWlzZTIudGhlbihudWxsLCBmdW5jdGlvbiBvblByb21pc2UyUmVqZWN0ZWQoYWN0dWFsUmVhc29uKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBhc3NlcnQuc3RyaWN0RXF1YWwoYWN0dWFsUmVhc29uLCBleHBlY3RlZFJlYXNvbik7XG4gICAgICAgICAgICAgICAgICAgICAgICBkb25lKCk7XG4gICAgICAgICAgICAgICAgICAgIH0pO1xuICAgICAgICAgICAgICAgIH0pO1xuICAgICAgICAgICAgfSk7XG4gICAgICAgIH1cblxuICAgICAgICBPYmplY3Qua2V5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dWUsIHNlbnRpbmVsKTtcbiAgICAgICAgICAgICAgICAgICAgZG9uZSgpO1xuICAgICAgICAgICAgICAgIH0pO1xuICAgICAgICAgICAgfSk7XG4gICAgICAgIH0pO1xuXG4gICAgICAgIGRlc2NyaWJlKFwiYHhgIGlzIGV2ZW50dWFsbHktZnVsZmlsbGVkXCIsIGZ1bmN0aW9uICgpIHtcbiAgICAgICAgICAgIHZhciBkID0gbnVsbDtcblxuICAgICAgICAgICAgZnVuY3Rpb24geEZhY3RvcnkoKSB7XG4gICAgICAgICAgICAgICAgZCA9IGRlZmVycmVkKCk7XG4gICAgICAgICAgICAgICAgc2V0VGltZW91dChmdW5jdGlvbiAoKSB7XG4gICAgICAgICAgICAgICAgICAgIGQucmVzb2x2ZShzZW50aW5lbCk7XG4gICAgICAgICAgICAgICAgfSwgNTApO1xuICAgICAgICAgICAgICAgIHJldHVybiBkLnByb21pc2U7XG4gICAgICAgICAgICB9XG5cbiAgICAgICAgICAgIHRlc3RQcm9taXNlUmVzb2x1dGlvbih4RmFjdG9yeSwgZnVuY3Rpb24gKHByb21pc2UsIGRvbmUpIHtcbiAgICAgICAgICAgICAgICBwcm9taXNlLnRoZW4oZnVuY3Rpb24gb25Qcm9taXNlRnVsZmlsbGVkKHZhbHVlKSB7XG4gICAgICAgICAgICAgICAgICAgIGFzc2VydC5zdHJpY3RFcXVhbCh2YWx1ZSwgc2VudGluZWwpO1xuICAgICAgICAgICAgICAgICAgICBkb25lKCk7XG4gICAgICAgICAgICAgICAgfSk7XG4gICAgICAgICAgICB9KTtcbiAgICAgICAgfSk7XG4gICAgfSk7XG5cbiAgICBkZXNjcmliZShcIjIuMy4yLjM6IElmL3doZW4gYHhgIGlzIHJlamVjdGVkLCByZWplY3QgYHByb21pc2VgIHdpdGggdGhlIHNhbWUgcmVhc29uLlwiLCBmdW5jdGlvbiAoKSB7XG4gICAgICAgIGRlc2NyaWJlKFwiYHhgIGlzIGFscmVhZHktcmVqZWN0ZWRcIiwgZnVuY3Rpb24gKCkge1xuICAgICAgICAgICAgZnVuY3Rpb24geEZhY3RvcnkoKSB7XG4gICAgICAgICAgICAgICAgcmV0dXJuIHJlamVjdGVkKHNlbnRpbmVsKTtcbiAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgdGVzdFByb21pc2VSZXNvbHV0aW9uKHhGYWN0b3J5LCBmdW5jdGlvbiAocHJvbWlzZSwgZG9uZSkge1xuICAgICAgICAgICAgICAgIHByb21pc2UudGhlbihudWxsLCBmdW5jdGlvbiBvblByb21pc2VSZWplY3RlZChyZWFzb24pIHtcbiAgICAgICAgICAgICAgICAgICAgYXNzZXJ0LnN0cmljdEVxdWFsKHJlYXNvbiwgc2VudGluZWwpO1xuICAgICAgICAgICAgICAgICAgICBkb25lKCk7XG4gICAgICAgICAgICAgICAgfSk7XG4gICAgICAgICAgICB9KTtcbiAgICAgICAgfSk7XG5cbiAgICAgICAgZGVzY3JpYmUoXCJgeGAgaXMgZXZlbnR1YWxseS1yZWplY3RlZFwiLCBmdW5jdGlvbiAoKSB7XG4gICAgICAgICAgICB2YXIgZCA9IG51bGw7XG5cbiAgICAgICAgICAgIGZ1bmN0aW9uIHhGYWN0b3J5KCkge1xuICAgICAgICAgICAgICAgIGQgPSBkZWZlcnJlZCgpO1xuICAgICAgICAgICAgICAgIHNldFRpbWVvdXQoZnVuY3Rpb24gKCkge1xuICAgICAgICAgICAgICAgICAgICBkLnJlamVjdChzZW50aW5lbCk7XG4gICAgICAgICAgICAgICAgfSwgNTApO1xuICAgICAgICAgICAgICAgIHJldHVybiBkLnByb21pc2U7XG4gICAgICAgICAgICB9XG5cbiAgICAgICAgICAgIHRlc3RQcm9taXNlUmVzb2x1dGlvbih4RmFjdG9yeSwgZnVuY3Rpb24gKHByb21pc2UsIGRvbmUpIHtcbiAgICAgICAgICAgICAgICBwcm9taXNlLnRoZW4obnVsbCwgZnVuY3Rpb24gb25Qcm9taXNlUmVqZWN0ZWQocmVhc29uKSB7XG4gICAgICAgICAgICAgIC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2x2ZVByb21pc2VgIHN5bmNocm9ub3VzbHlcIiwgZnVuY3Rpb24gKCkge1xuICAgICAgICAgICAgZnVuY3Rpb24geEZhY3RvcnkoKSB7XG4gICAgICAgICAgICAgICAgcmV0dXJuIHtcbiAgICAgICAgICAgICAgICAgICAgdGhlbjogZnVuY3Rpb24gKHJlc29sdmVQcm9taXNlKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICByZXNvbHZlUHJvbWlzZSh5RmFjdG9yeSgpKTtcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIH07XG4gICAgICAgICAgICB9XG5cbiAgICAgICAgICAgIHRlc3RQcm9taXNlUmVzb2x1dGlvbih4RmFjdG9yeSwgdGVzdCk7XG4gICAgICAgIH0pO1xuXG4gICAgICAgIGRlc2NyaWJlKFwiYHRoZW5gIGNhbGxzIGByZXNvbHZlUHJvbWlzZWAgYXN5bmNocm9ub3VzbHlcIiwgZnVuY3Rpb24gKCkge1xuICAgICAgICAgICAgZnVuY3Rpb24geEZhY3RvcnkoKSB7XG4gICAgICAgICAgICAgICAgcmV0dXJuIHtcbiAgICAgICAgICAgICAgICAgICAgdGhlbjogZnVuY3Rpb24gKHJlc29sdmVQcm9taXNlKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBzZXRUaW1lb3V0KGZ1bmN0aW9uICgpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXNvbHZlUHJvbWlzZSh5RmFjdG9yeSgpKTtcbiAgICAgICAgICAgICAgICAgICAgICAgIH0sIDApO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgfTtcbiAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgdGVzdFByb21pc2VSZXNvbHV0aW9uKHhGYWN0b3J5LCB0ZXN0KTtcbiAgICAgICAgfSk7XG4gICAgfSk7XG59XG5cbmZ1bmN0aW9uIHRlc3RDYWxsaW5nUmVqZWN0UHJvbWlzZShyLCBzdHJpbmdSZXByZXNlbnRhdGlvbiwgdGVzdCkge1xuICAgIGRlc2NyaWJlKFwiYHJgIGlzIFwiICsgc3RyaW5nUmVwcmVzZW50YXRpb24sIGZ1bmN0aW9uICgpIHtcbiAgICAgICAgZGVzY3JpYmUoXCJgdGhlbmAgY2FsbHMgYHJlamVjdFByb21pc2VgIHN5bmNocm9ub3VzbHlcIiwgZnVuY3Rpb24gKCkge1xuICAgICAgICAgICAgZnVuY3Rpb24geEZhY3RvcnkoKSB7XG4gICAgICAgICAgICAgICAgcmV0dXJuIHtcbiAgICAgICAgICAgICAgICAgICAgdGhlbjogZnVuY3Rpb24gKHJlc29sdmVQcm9taXNlLCByZWplY3RQcm9taXNlKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICByZWplY3RQcm9taXNlKHIpO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgfTtcbiAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgdGVzdFByb21pc2VSZXNvbHV0aW9uKHhGYWN0b3J5LCB0ZXN0KTtcbiAgICAgICAgfSk7XG5cbiAgICAgICAgZGVzY3JpYmUoXCJgdGhlbmAgY2FsbHMgYHJlamVjdFByb21pc2VgIGFzeW5jaHJvbm91c2x5XCIsIGZ1bmN0aW9uICgpIHtcbiAgICAgICAgICAgIGZ1bmN0aW9uIHhGYWN0b3J5KCkge1xuICAgICAgICAgICAgICAgIHJldHVybiB7XG4gICAgICAgICAgICAgICAgICAgIHRoZW46IGZ1bmN0aW9uIChyZXNvbHZlUHJvbWlzZSwgcmVqZWN0UHJvbWlzZSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgc2V0VGltZW91dChmdW5jdGlvbiAoKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgcmVqZWN0UHJvbWlzZShyKTtcbiAgICAgICAgICAgICAgICAgICAgICAgIH0sIDApO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgfTtcbiAgICAgICAgICAgIH1cblxuICAgICAgICA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nVuY3Rpb24gKCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICsrbnVtYmVyT2ZUaW1lc1RoZW5XYXNSZXRyaWV2ZWQ7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIGZ1bmN0aW9uIHRoZW5NZXRob2RGb3JYKG9uRnVsZmlsbGVkKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIG9uRnVsZmlsbGVkKCk7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfTtcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIH0pO1xuICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICB0ZXN0UHJvbWlzZVJlc29sdXRpb24oeEZhY3RvcnksIGZ1bmN0aW9uIChwcm9taXNlLCBkb25lKSB7XG4gICAgICAgICAgICAgICAgcHJvbWlzZS50aGVuKGZ1bmN0aW9uICgpIHtcbiAgICAgICAgICAgICAgICAgICAgYXNzZXJ0LnN0cmljdEVxdWFsKG51bWJlck9mVGltZXNUaGVuV2FzUmV0cmlldmVkLCAxKTtcbiAgICAgICAgICAgICAgICAgICAgZG9uZSgpO1xuICAgICAgICAgICAgICAgIH0pO1xuICAgICAgICAgICAgfSk7XG4gICAgICAgIH0pO1xuXG4gICAgICAgIGRlc2NyaWJlKFwiYHhgIGlzIGFuIG9iamVjdCB3aXRoIG5vcm1hbCBPYmplY3QucHJvdG90eXBlXCIsIGZ1bmN0aW9uICgpIHtcbiAgICAgICAgICAgIHZhciBudW1iZXJPZlRpbWVzVGhlbldhc1JldHJpZXZlZCA9IG51bGw7XG5cbiAgICAgICAgICAgIGJlZm9yZUVhY2goZnVuY3Rpb24gKCkge1xuICAgICAgICAgICAgICAgIG51bWJlck9mVGltZXNUaGVuV2FzUmV0cmlldmVkID0gMDtcbiAgICAgICAgICAgIH0pO1xuXG4gICAgICAgICAgICBmdW5jdGlvbiB4RmFjdG9yeSgpIHtcbiAgICAgICAgICAgICAgICByZXR1cm4gT2JqZWN0LmNyZWF0ZShPYmplY3QucHJvdG90eXBlLCB7XG4gICAgICAgICAgICAgICAgICAgIHRoZW46IHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGdldDogZnVuY3Rpb24gKCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICsrbnVtYmVyT2ZUaW1lc1RoZW5XYXNSZXRyaWV2ZWQ7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIGZ1bmN0aW9uIHRoZW5NZXRob2RGb3JYKG9uRnVsZmlsbGVkKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIG9uRnVsZmlsbGVkKCk7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfTtcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIH0pO1xuICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICB0ZXN0UHJvbWlzZVJlc29sdXRpb24oeEZhY3RvcnksIGZ1bmN0aW9uIChwcm9taXNlLCBkb25lKSB7XG4gICAgICAgICAgICAgICAgcHJvbWlzZS50aGVuKGZ1bmN0aW9uICgpIHtcbiAgICAgICAgICAgICAgICAgICAgYXNzZXJ0LnN0cmljdEVxdWFsKG51bWJlck9mVGltZXNUaGVuV2FzUmV0cmlldmVkLCAxKTtcbiAgICAgICAgICAgICAgICAgICAgZG9uZSgpO1xuICAgICAgICAgICAgICAgIH0pO1xuICAgICAgICAgICAgfSk7XG4gICAgICAgIH0pO1xuXG4gICAgICAgIGRlc2NyaWJlKFwiYHhgIGlzIGEgZnVuY3Rpb25cIiwgZnVuY3Rpb24gKCkge1xuICAgICAgICAgICAgdmFyIG51bWJlck9mVGltZXNUaGVuV2FzUmV0cmlldmVkID0gbnVsbDtcblxuICAgICAgICAgICAgYmVmb3JlRWFjaChmdW5jdGlvbiAoKSB7XG4gICAgICAgICAgICAgICAgbnVtYmVyT2ZUaW1lc1RoZW5XYXNSZXRyaWV2ZWQgPSAwO1xuICAgICAgICAgICAgfSk7XG5cbiAgICAgICAgICAgIGZ1bmN0aW9uIHhGYWN0b3J5KCkge1xuICAgICAgICAgICAgICAgIGZ1bmN0aW9uIHgoKSB7IH1cblxuICAgICAgICAgICAgICAgIE9iamVjdC5kZWZpbmVQcm9wZXJ0eSh4LCBcInRoZW5cIiwge1xuICAgICAgICAgICAgICAgICAgICBnZXQ6IGZ1bmN0aW9uICgpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICsrbnVtYmVyT2ZUaW1lc1RoZW5XYXNSZXRyaWV2ZWQ7XG4gICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gZnVuY3Rpb24gdGhlbk1ldGhvZEZvclgob25GdWxmaWxsZWQpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBvbkZ1bGZpbGxlZCgpO1xuICAgICAgICAgICAgICAgICAgICAgICAgfTtcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIH0pO1xuXG4gICAgICAgICAgICAgICAgcmV0dXJuIHg7XG4gICAgICAgICAgICB9XG5cbiAgICAgICAgICAgIHRlc3RQcm9taXNlUmVzb2x1dGlvbih4RmFjdG9yeSwgZnVuY3Rpb24gKHByb21pc2UsIGRvbmUpIHtcbiAgICAgICAgICAgICAgICBwcm9taXNlLnRoZW4oZnVuY3Rpb24gKCkge1xuICAgICAgICAgICAgICAgICAgICBhc3NlcnQuc3RyaWN0RXF1YWwobnVtYmVyT2ZUaW1lc1RoZW5XYXNSZXRyaWV2ZWQsIDEpO1xuICAgICAgICAgICAgICAgICAgICBkb25lKCk7XG4gICAgICAgICAgICAgICAgfSk7XG4gICAgICAgICAgICB9KTtcbiAgICAgICAgfSk7XG4gICAgfSk7XG5cbiAgICBkZXNjcmliZShcIjIuMy4zLjI6IElmIHJldHJpZXZpbmcgdGhlIHByb3BlcnR5IGB4LnRoZW5gIHJlc3VsdHMgaW4gYSB0aHJvd24gZXhjZXB0aW9uIGBlYCwgcmVqZWN0IGBwcm9taXNlYCB3aXRoIFwiICtcbiAgICAgICAgICAgICBcImBlYCBhcyB0aGUgcmVhc29uLlwiLCBmdW5jdGlvbiAoKSB7XG4gICAgICAgIGZ1bmN0aW9uIHRlc3RSZWplY3Rpb25WaWFUaHJvd2luZ0dldHRlcihlLCBzdHJpbmdSZXByZXNlbnRhdGlvbikge1xuICAgICAgICAgICAgZnVuY3Rpb24geEZhY3RvcnkoKSB7XG4gICAgICAgICAgICAgICAgcmV0dXJuIE9iamVjdC5jcmVhdGUoT2JqZWN0LnByb3RvdHlwZSwge1xuICAgICAgICAgICAgICAgICAgICB0aGVuOiB7XG4gICAgICAgICAgICAgICAgICAgICAgICBnZXQ6IGZ1bmN0aW9uICgpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB0aHJvdyBlO1xuICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgfSk7XG4gICAgICAgICAgICB9XG5cbiAgICAgICAgICAgIGRlc2NyaWJlKFwiYGVgIGlzIFwiICsgc3RyaW5nUmVwcmVzZW50YXRpb24sIGZ1bmN0aW9uICgpIHtcbiAgICAgICAgICAgICAgICB0ZXN0UHJvbWlzZVJlc29sdXRpb24oeEZhY3RvcnksIGZ1bmN0aW9uIChwcm9taXNlLCBkb25lKSB7XG4gICAgICAgICAgICAgICAgICAgIHByb21pc2UudGhlbihudWxsLCBmdW5jdGlvbiAocmVhc29uKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBhc3NlcnQuc3RyaWN0RXF1YWwocmVhc29uLCBlKTtcbiAgICAgICAgICAgICAgICAgICAgICAgIGRvbmUoKTtcbiAgICAgICAgICAgICAgICAgICAgfSk7XG4gICAgICAgICAgICAgICAgfSk7XG4gICAgICAgICAgICB9KTtcbiAgICAgICAgfVxuXG4gICAgICAgIE9iamVjdC5rZXlzKH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gICAgICAgfVxuICAgICAgICAgICAgICAgIH07XG4gICAgICAgICAgICAgICAgcmV0dXJuIHg7XG4gICAgICAgICAgICB9XG5cbiAgICAgICAgICAgIHRlc3RQcm9taXNlUmVzb2x1dGlvbih4RmFjdG9yeSwgZnVuY3Rpb24gKHByb21pc2UsIGRvbmUpIHtcbiAgICAgICAgICAgICAgICBwcm9taXNlLnRoZW4oZnVuY3Rpb24gKCkge1xuICAgICAgICAgICAgICAgICAgICBkb25lKCk7XG4gICAgICAgICAgICAgICAgfSk7XG4gICAgICAgICAgICB9KTtcbiAgICAgICAgfSk7XG5cbiAgICAgICAgZGVzY3JpYmUoXCJVc2VzIHRoZSBvcmlnaW5hbCB2YWx1ZSBvZiBgdGhlbmBcIiwgZnVuY3Rpb24gKCkge1xuICAgICAgICAgICAgdmFyIG51bWJlck9mVGltZXNUaGVuV2FzUmV0cmlldmVkID0gbnVsbDtcblxuICAgICAgICAgICAgYmVmb3JlRWFjaChmdW5jdGlvbiAoKSB7XG4gICAgICAgICAgICAgICAgbnVtYmVyT2ZUaW1lc1RoZW5XYXNSZXRyaWV2ZWQgPSAwO1xuICAgICAgICAgICAgfSk7XG5cbiAgICAgICAgICAgIGZ1bmN0aW9uIHhGYWN0b3J5KCkge1xuICAgICAgICAgICAgICAgIHJldHVybiBPYmplY3QuY3JlYXRlKE9iamVjdC5wcm90b3R5cGUsIHtcbiAgICAgICAgICAgICAgICAgICAgdGhlbjoge1xuICAgICAgICAgICAgICAgICAgICAgICAgZ2V0OiBmdW5jdGlvbiAoKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKG51bWJlck9mVGltZXNUaGVuV2FzUmV0cmlldmVkID09PSAwKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBmdW5jdGlvbiAob25GdWxmaWxsZWQpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIG9uRnVsZmlsbGVkKCk7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH07XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBudWxsO1xuICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgfSk7XG4gICAgICAgICAgICB9XG5cbiAgICAgICAgICAgIHRlc3RQcm9taXNlUmVzb2x1dGlvbih4RmFjdG9yeSwgZnVuY3Rpb24gKHByb21pc2UsIGRvbmUpIHtcbiAgICAgICAgICAgICAgICBwcm9taXNlLnRoZW4oZnVuY3Rpb24gKCkge1xuICAgICAgICAgICAgICAgICAgICBkb25lKCk7XG4gICAgICAgICAgICAgICAgfSk7XG4gICAgICAgICAgICB9KTtcbiAgICAgICAgfSk7XG5cbiAgICAgICAgZGVzY3JpYmUoXCIyLjMuMy4zLjE6IElmL3doZW4gYHJlc29sdmVQcm9taXNlYCBpcyBjYWxsZWQgd2l0aCB2YWx1ZSBgeWAsIHJ1biBgW1tSZXNvbHZlXV0ocHJvbWlzZSwgeSlgXCIsXG4gICAgICAgICAgICAgICAgIGZ1bmN0aW9uICgpIHtcbiAgICAgICAgICAgIGRlc2NyaWJlKFwiYHlgIGlzIG5vdCBhIHRoZW5hYmxlXCIsIGZ1bmN0aW9uICgpIHtcbiAgICAgICAgICAgICAgICB0ZXN0Q2FsbGluZ1Jlc29sdmVQcm9taXNlRnVsZmlsbHNXaXRoKGZ1bmN0aW9uICgpIHsgcmV0dXJuIHVuZGVmaW5lZDsgfSwgXCJgdW5kZWZpbmVkYFwiLCB1bmRlZmluZWQpO1xuICAgICAgICAgICAgICAgIHRlc3RDYWxsaW5nUmVzb2x2ZVByb21pc2VGdWxmaWxsc1dpdGgoZnVuY3Rpb24gKCkgeyByZXR1cm4gbnVsbDsgfSwgXCJgbnVsbGBcIiwgbnVsbCk7XG4gICAgICAgICAgICAgICAgdGVzdENhbGxpbmdSZXNvbHZlUHJvbWlz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biAgICAgICAgICAgICAgICB9KTtcblxuICAgICAgICAgICAgICAgIE9iamVjdC5rZXlzKHRoZW5hYmxlcy5yZWplY3RlZCkuZm9yRWFjaChmdW5jdGlvbiAoc3RyaW5nUmVwcmVzZW50YXRpb24pIHtcbiAgICAgICAgICAgICAgICAgICAgZnVuY3Rpb24geUZhY3RvcnkoKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gdGhlbmFibGVzLnJlamVjdGVkW3N0cmluZ1JlcHJlc2VudGF0aW9uXShzZW50aW5lbCk7XG4gICAgICAgICAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgICAgICAgICB0ZXN0Q2FsbGluZ1Jlc29sdmVQcm9taXNlUmVqZWN0c1dpdGgoeUZhY3RvcnksIHN0cmluZ1JlcHJlc2VudGF0aW9uLCBzZW50aW5lbCk7XG4gICAgICAgICAgICAgICAgfSk7XG4gICAgICAgICAgICB9KTtcblxuICAgICAgICAgICAgZGVzY3JpYmUoXCJgeWAgaXMgYSB0aGVuYWJsZSBmb3IgYSB0aGVuYWJsZVwiLCBmdW5jdGlvbiAoKSB7XG4gICAgICAgICAgICAgICAgT2JqZWN0LmtleXModGhlbmFibGVzLmZ1bGZpbGxlZCkuZm9yRWFjaChmdW5jdGlvbiAob3V0ZXJTdHJpbmdSZXByZXNlbnRhdGlvbikge1xuICAgICAgICAgICAgICAgICAgICB2YXIgb3V0ZXJUaGVuYWJsZUZhY3RvcnkgPSB0aGVuYWJsZXMuZnVsZmlsbGVkW291dGVyU3RyaW5nUmVwcmVzZW50YXRpb25dO1xuXG4gICAgICAgICAgICAgICAgICAgIE9iamVjdC5rZXlzKHRoZW5hYmxlcy5mdWxmaWxsZWQpLmZvckVhY2goZnVuY3Rpb24gKGlubmVyU3RyaW5nUmVwcmVzZW50YXRpb24pIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIHZhciBpbm5lclRoZW5hYmxlRmFjdG9yeSA9IHRoZW5hYmxlcy5mdWxmaWxsZWRbaW5uZXJTdHJpbmdSZXByZXNlbnRhdGlvbl07XG5cbiAgICAgICAgICAgICAgICAgICAgICAgIHZhciBzdHJpbmdSZXByZXNlbnRhdGlvbiA9IG91dGVyU3RyaW5nUmVwcmVzZW50YXRpb24gKyBcIiBmb3IgXCIgKyBpbm5lclN0cmluZ1JlcHJlc2VudGF0aW9uO1xuXG4gICAgICAgICAgICAgICAgICAgICAgICBmdW5jdGlvbiB5RmFjdG9yeSgpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gb3V0ZXJUaGVuYWJsZUZhY3RvcnkoaW5uZXJUaGVuYWJsZUZhY3Rvcnkoc2VudGluZWwpKTtcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgICAgICAgICAgICAgdGVzdENhbGxpbmdSZXNvbHZlUHJvbWlzZUZ1bGZpbGxzV2l0aCh5RmFjdG9yeSwgc3RyaW5nUmVwcmVzZW50YXRpb24sIHNlbnRpbmVsKTtcbiAgICAgICAgICAgICAgICAgICAgfSk7XG5cbiAgICAgICAgICAgICAgICAgICAgT2JqZWN0LmtleXModGhlbmFibGVzLnJlamVjdGVkKS5mb3JFYWNoKGZ1bmN0aW9uIChpbm5lclN0cmluZ1JlcHJlc2VudGF0aW9uKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICB2YXIgaW5uZXJUaGVuYWJsZUZhY3RvcnkgPSB0aGVuYWJsZXMucmVqZWN0ZWRbaW5uZXJTdHJpbmdSZXByZXNlbnRhdGlvbl07XG5cbiAgICAgICAgICAgICAgICAgICAgICAgIHZhciBzdHJpbmdSZXByZXNlbnRhdGlvbiA9IG91dGVyU3RyaW5nUmVwcmVzZW50YXRpb24gKyBcIiBmb3IgXCIgKyBpbm5lclN0cmluZ1JlcHJlc2VudGF0aW9uO1xuXG4gICAgICAgICAgICAgICAgICAgICAgICBmdW5jdGlvbiB5RmFjdG9yeSgpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4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FyZSBpZ25vcmVkLlwiLFxuICAgICAgICAgICAgICAgICBmdW5jdGlvbiAoKSB7XG4gICAgICAgICAgICBkZXNjcmliZShcImNhbGxpbmcgYHJlc29sdmVQcm9taXNlYCB0aGVuIGByZWplY3RQcm9taXNlYCwgYm90aCBzeW5jaHJvbm91c2x5XCIsIGZ1bmN0aW9uICgpIHtcbiAgICAgICAgICAgICAgICBmdW5jdGlvbiB4RmFjdG9yeSgpIHtcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIHRoZW46IGZ1bmN0aW9uIChyZXNvbHZlUHJvbWlzZSwgcmVqZWN0UHJvbWlzZSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJlc29sdmVQcm9taXNlKHNlbnRpbmVsKTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICByZWplY3RQcm9taXNlKG90aGVyKTtcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgfTtcbiAgICAgICAgICAgICAgICB9XG5cbiAgICAgICAgICAgICAgICB0ZXN0UHJvbWlzZVJlc29sdXRpb24oeEZhY3RvcnksIGZ1bmN0aW9uIChwcm9taXNlLCBkb25lKSB7XG4gICAgICAgICAgICAgICAgICAgIHByb21pc2UudGhlbihmdW5jdGlvbiAodmFsdWUpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGFzc2VydC5zdHJpY3RFcXVhbCh2YWx1ZSwgc2VudGluZWwpO1xuICAgICAgICAgICAgICAgICAgICAgICAgZG9uZSgpO1xuICAgICAgICAgICAgICAgICAgICB9KTtcbiAgICAgICAgICAgICAgICB9KTtcbiAgICAgICAgICAgIH0pO1xuXG4gICAgICAgICAgICBkZXNjcmliZShcImNhbGxpbmcgYHJlc29sdmVQcm9taXNlYCBzeW5jaHJvbm91c2x5IHRoZW4gYHJlamVjdFByb21pc2VgIGFzeW5jaHJvbm91c2x5XCIsIGZ1bmN0aW9uICgpIHtcbiAgICAgICAgICAgICAgICBmdW5jdGlvbiB4RmFjdG9yeSgpIHtcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIHRoZW46IGZ1bmN0aW9uIChyZXNvbHZlUHJvbWlzZSwgcmVqZWN0UHJvbWlzZSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJlc29sdmVQcm9taXNlKHNlbnRpbmVsKTtcblxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHNldFRpbWVvdXQoZnVuY3Rpb24gKCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICByZWplY3RQcm9taXNlKG90aGVyKTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9LCAwKTtcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgfTtcbiAgICAgICAgICAgICAgICB9XG5cbiAgICAgICAgICAgICAgICB0ZXN0UHJvbWlzZVJlc29sdXRpb24oeEZhY3RvcnksIGZ1bmN0aW9uIChwcm9taXNlLCBkb25lKSB7XG4gICAgICAgICAgICAgICAgICAgIHByb21pc2UudGhlbihmdW5jdGlvbiAodmFsdWUpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGFzc2VydC5zdHJpY3RFcXVhbCh2YWx1ZSwgc2VudGluZWwpO1xuICAgICAgICAgICAgICAgICAgICAgICAgZG9uZSgpO1xuICAgICAgICAgICAgICAgICAgICB9KTtcbiAgICAgICAgICAgICAgICB9KTtcbiAgICAgICAgICAgIH0pO1xuXG4gICAgICAgICAgICBkZXNjcmliZShcImNhbGxpbmcgYHJlc29sdmVQcm9taXNlYCB0aGVuIGByZWplY3RQcm9taXNlYCwgYm90aCBhc3luY2hyb25vdXNseVwiLCBmdW5jdGlvbiAoKSB7XG4gICAgICAgICAgICAgICAgZnVuY3Rpb24geEZhY3RvcnkoKSB7XG4gICAgICAgICAgICAgICAgICAgIHJldHVybiB7XG4gICAgICAgICAgICAgICAgICAgICAgICB0aGVuOiBmdW5jdGlvbiAocmVzb2x2ZVByb21pc2UsIHJlamVjdFByb21pc2UpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBzZXRUaW1lb3V0KGZ1bmN0aW9uICgpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmVzb2x2ZVByb21pc2Uoc2VudGluZWwpO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0sIDApO1xuXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgc2V0VGltZW91dChmdW5jdGlvbiAoKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJlamVjdFByb21pc2Uob3RoZXIpO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0sIDApO1xuICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICB9O1xuICAgICAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgICAgIHRlc3RQcm9taXNlUmVzb2x1dGlvbih4RmFjdG9yeSwgZnVuY3Rpb24gKHByb21pc2UsIGRvbmUpIHtcbiAgICAgICAgICAgICAgICAgICAgcHJvbWlzZS50aGVuKGZ1bmN0aW9uICh2YWx1ZSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgYXNzZXJ0LnN0cmljdEVxdWFsKHZhbHVlLCBzZW50aW5lbCk7XG4gICAgICAgICAgICAgICAgICAgICAgICBkb25lKCk7XG4gICAgICAgICAgICAgICAgICAgIH0pO1xuICAgICAgICAgICAgICAgIH0pO1xuICAgICAgICAgICAgfSk7XG5cbiAgICAgICAgICAgIGRlc2NyaWJlKFwiY2FsbGluZyBgcmVzb2x2ZVByb21pc2VgIHdpdGggYW4gYXN5bmNocm9ub3VzbHktZnVsZmlsbGVkIHByb21pc2UsIHRoZW4gY2FsbGluZyBcIiArXG4gICAgICAgICAgICAgICAgICAgICBcImByZWplY3RQcm9taXNlYCwgYm90aCBzeW5jaHJvbm91c2x5XCIsIGZ1bmN0aW9uICgpIHtcbiAgICAgICAgICAgICAgICBmdW5jdGlvbiB4RmFjdG9yeSgpIHtcbiAgICAgICAgICAgICAgICAgICAgdmFyIGQgPSBkZWZlcnJlZCgpO1xuICAgICAgICAgICAgICAgICAgICBzZXRUaW1lb3V0KGZ1bmN0aW9uICgpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGQucmVzb2x2ZShzZW50aW5lbCk7XG4gICAgICAgICAgICAgICAgICAgIH0sIDUwKTtcblxuICAgICAgICAgICAgICAgICAgICByZXR1cm4ge1xuICAgICAgICAgICAgICAgICAgICAgICAgdGhlbjogZnVuY3Rpb24gKHJlc29sdmVQcm9taXNlLCByZWplY3RQcm9taXNlKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgcmVzb2x2ZVByb21pc2UoZC5wcm9taXNlKTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICByZWplY3RQcm9taXNlKG90aGVyKTtcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgfTtcbiAgICAgICAgICAgICAgICB9XG5cbiAgICAgICAgICAgICAgICB0ZXN0UHJvbWlzZVJlc29sdXRpb24oeEZhY3RvcnksIGZ1bmN0aW9uIChwcm9taXNlLCBkb25lKSB7XG4gICAgICAgICAgICAgICAgICAgIHByb21pc2UudGhlbihmdW5jdGlvbiAodmFsdWUpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGFzc2VydC5zdHJpY3RFcXVhbCh2YWx1ZSwgc2VudGluZWwpO1xuICAgICAgICAgICAgICAgICAgICAgICAgZG9uZSgpO1xuICAgICAgICAgICAgICAgICAgICB9KTtcbiAgICAgICAgICAgICAgICB9KTtcbiAgICAgICAgICAgIH0pO1xuXG4gICAgICAgICAgICBkZXNjcmliZShcImNhbGxpbmcgYHJlc29sdmVQcm9taXNlYCB3aXRoIGFuIGFzeW5jaHJvbm91c2x5LXJlamVjdGVkIHByb21pc2UsIHRoZW4gY2FsbGluZyBcIiArXG4gICAgICAgICAgICAgICAgICAgICBcImByZWplY3RQcm9taXNlYCwgYm90aCBzeW5jaHJvbm91c2x5XCIsIGZ1bmN0aW9uICgpIHtcbiAgICAgICAgICAgICAgICBmdW5jdGlvbiB4RmFjdG9yeSgpIHtcbiAgICAgICAgICAgICAgICAgICAgdmFyIGQgPSBkZWZlcnJlZCgpO1xuICAgICAgICAgICAgICAgICAgICBzZXRUaW1lb3V0KGZ1bmN0aW9uICgpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGQucmVqZWN0KHNlbnRpbmVsKTtcbiAgICAgICAgICAgICAgICAgICAgfSwgNTApO1xuXG4gICAgICAgICAgICAgICAgICAgIHJldHVybiB7XG4gICAgICAgICAgICAgICAgICAgICAgICB0aGVuOiBmdW5jdGlvbiAocmVzb2x2ZVByb21pc2UsIHJlamVjdFByb21pc2UpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXNvbHZlUHJvbWlzZShkLnByb21pc2UpO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJlamVjdFByb21pc2Uob3RoZXIpO1xuICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICB9O1xuICAgICAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgICAgIHRlc3RQcm9taXNlUmVzb2x1dGlvbih4RmFjdG9yeSwgZnVuY3Rpb24gKHByb21pc2UsIGRvbmUpIHtcbiAgICAgICAgICAgICAgICAgICAgcHJvbWlzZS50aGVuKG51bGwsIGZ1bmN0aW9uIChyZWFzb24pIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGFzc2VydC5zdHJpY3RFcXVhbChyZWFzb24sIHNlbnRpbmVsKTtcbiAgICAgICAgICAgICAgICAgICAgICAgIGRvbmUoKTtcbiAgICAgICAgICAgICAgICAgICAgfSk7XG4gICAgICAgICAgICAgICAgfSk7XG4gICAgICAgICAgICB9KTtcblxuICAgICAgICAgICAgZGVzY3JpYmUoXCJjYWxsaW5nIGByZWplY3RQcm9taXNlYCB0aGVuIGByZXNvbHZlUHJvbWlzZWAsIGJvdGggc3luY2hyb25vdXNseVwiLCBmdW5jdGlvbiAoKSB7XG4gICAgICAgICAgICAgICAgZnVuY3Rpb24geEZhY3RvcnkoKSB7XG4gICAgICAgICAgICAgICAgICAgIHJldHVybiB7XG4gICAgICAgICAgICAgICAgICAgICAgICB0aGVuOiBmdW5jdGlvbiAocmVzb2x2ZVByb21pc2UsIHJlamVjdFByb21pc2UpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICByZWplY3RQcm9taXNlKHNlbnRpbmVsKTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXNvbHZlUHJvbWlzZShvdGhlcik7XG4gICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIH07XG4gICAgICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAgICAgdGVzdFByb21pc2VSZXNvbHV0aW9uKHhGYWN0b3J5LCBmdW5jdGlvbiAocHJvbWlzZSwgZG9uZSkge1xuICAgICAgICAgICAgICAgICAgICBwcm9taXNlLnRoZW4obnVsbCwgZnVuY3Rpb24gKHJlYXNvbikge1xuICAgICAgICAgICAgICAgICAgICAgICAgYXNzZXJ0LnN0cmljdEVxdWFsKHJlYXNvbiwgc2VudGluZWwpO1xuICAgICAgICAgICAgICAgICAgICAgICAgZG9uZSgpO1xuICAgICAgICAgICAgICAgICAgICB9KTtcbiAgICAgICAgICAgICAgICB9KTtcbiAgICAgICAgICAgIH0pO1xuXG4gICAgICAgICAgICBkZXNjcmliZShcImNhbGxpbmcgYHJlamVjdFByb21pc2VgIHN5bmNocm9ub3VzbHkgdGhlbiBgcmVzb2x2ZVByb21pc2VgIGFzeW5jaHJvbm91c2x5XCIsIGZ1bmN0aW9uICgpIHtcbiAgICAgICAgICAgICAgICBmdW5jdGlvbiB4RmFjdG9yeSgpIHtcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIHRoZW46IGZ1bmN0aW9uIChyZXNvbHZlUHJvbWlzZSwgcmVqZWN0UHJvbWlzZSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJlamVjdFByb21pc2Uoc2VudGluZWwpO1xuXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgc2V0VGltZW91dChmdW5jdGlvbiAoKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJlc29sdmVQcm9taXNlKG90aGVyKTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9LCAwKTtcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgfTtcbiAgICAgICAgICAgICAgICB9XG5cbiAgICAgICAgICAgICAgICB0ZXN0UHJvbWlzZVJlc29sdXRpb24oeEZhY3RvcnksIGZ1bmN0aW9uIChwcm9taXNlLCBkb25lKSB7XG4gICAgICAgICAgICAgICAgICAgIHByb21pc2UudGhlbihudWxsLCBmdW5jdGlvbiAocmVhc29uKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBhc3NlcnQuc3RyaWN0RXF1YWwocmVhc29uLCBzZW50aW5lbCk7XG4gICAgICAgICAgICAgICAgICAgICAgICBkb25lKCk7XG4gICAgICAgICAgICAgICAgICAgIH0pO1xuICAgICAgICAgICAgICAgIH0pO1xuICAgICAgICAgICAgfSk7XG5cbiAgICAgICAgICAgIGRlc2NyaWJlKFwiY2FsbGluZyBgcmVqZWN0UHJvbWlzZWAgdGhlbiBgcmVzb2x2ZVByb21pc2VgLCBib3RoIGFzeW5jaHJvbm91c2x5XCIsIGZ1bmN0aW9uICgpIHtcbiAgICAgICAgICAgICAgICBmdW5jdGlvbiB4RmFjdG9yeSgpIHtcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIHRoZW46IGZ1bmN0aW9uIChyZXNvbHZlUHJvbWlzZSwgcmVqZWN0UHJvbWlzZSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHNldFRpbWVvdXQoZnVuY3Rpb24gKCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICByZWplY3RQcm9taXNlKHNlbnRpbmVsKTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9LCAwKTtcblxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHNldFRpbWVvdXQoZnVuY3Rpb24gKCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXNvbHZlUHJvbWlzZShvdGhlcik7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfSwgMCk7XG4gICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIH07XG4gICAgICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAgICAgdGVzdFByb21pc2VSZXNvbHV0aW9uKHhGYWN0b3J5LCBmdW5jdGlvbiAocHJvbWlzZSwgZG9uZSkge1xuICAgICAgICAgICAgICAgICAgICBwcm9taXNlLnRoZW4obnVsbCwgZnVuY3Rpb24gKHJlYXNvbikge1xuICAgICAgICAgICAgICAgICAgICAgICAgYXNzZXJ0LnN0cmljdEVxdWFsKHJlYXNvbiwgc2VudGluZWwpO1xuICAgICAgICAgICAgICAgICAgICAgICAgZG9uZSgpO1xuICAgICAgICAgICAgICAgICAgICB9KTtcbiAgICAgICAgICAgICAgICB9KTtcbiAgICAgICAgICAgIH0pO1xuXG4gICAgICAgICAgICBkZXNjcmliZShcImNhbGxpbmcgYHJlc29sdmVQcm9taXNlYCB0d2ljZSBzeW5jaHJvbm91c2x5XCIsIGZ1bmN0aW9uICgpIHtcbiAgICAgICAgICAgICAgICBmdW5jdGlvbiB4RmFjdG9yeSgpIHtcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIHRoZW46IGZ1bmN0aW9uIChyZXNvbHZlUHJvbWlzZSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJlc29sdmVQcm9taXNlKHNlbnRpbmVsKTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXNvbHZlUHJvbWlzZShvdGhlcik7XG4gICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIH07XG4gICAgICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAgICAgdGVzdFByb21pc2VSZXNvbHV0aW9uKHhGYWN0b3J5LCBmdW5jdGlvbiAocHJvbWlzZSwgZG9uZSkge1xuICAgICAgICAgICAgICAgICAgICBwcm9taXNlLnRoZW4oZnVuY3Rpb24gKHZhbHVlKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBhc3NlcnQuc3RyaWN0RXF1YWwodmFsdWUsIHNlbnRpbmVsKTtcbiAgICAgICAgICAgICAgICAgICAgICAgIGRvbmUoKTtcbiAgICAgICAgICAgICAgICAgICAgfSk7XG4gICAgICAgICAgICAgICAgfSk7XG4gICAgICAgICAgICB9KTtcblxuICAgICAgICAgICAgZGVzY3JpYmUoXCJjYWxsaW5nIGByZXNvbHZlUHJvbWlzZWAgdHdpY2UsIGZpcnN0IHN5bmNocm9ub3VzbHkgdGhlbiBhc3luY2hyb25vdXNseVwiLCBmdW5jdGlvbiAoKSB7XG4gICAgICAgICAgICAgICAgZnVuY3Rpb24geEZhY3RvcnkoKSB7XG4gICAgICAgICAgICAgICAgICAgIHJldHVybiB7XG4gICAgICAgICAgICAgICAgICAgICAgICB0aGVuOiBmdW5jdGlvbiAocmVzb2x2ZVByb21pc2UpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXNvbHZlUHJvbWlzZShzZW50aW5lbCk7XG5cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBzZXRUaW1lb3V0KGZ1bmN0aW9uICgpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmVzb2x2ZVByb21pc2Uob3RoZXIpO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0sIDApO1xuICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICB9O1xuICAgICAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgICAgIHRlc3RQcm9taXNlUmVzb2x1dGlvbih4RmFjdG9yeSwgZnVuY3Rpb24gKHByb21pc2UsIGRvbmUpIHtcbiAgICAgICAgICAgICAgICAgICAgcHJvbWlzZS50aGVuKGZ1bmN0aW9uICh2YWx1ZSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgYXNzZXJ0LnN0cmljdEVxdWFsKHZhbHVlLCBzZW50aW5lbCk7XG4gICAgICAgICAgICAgICAgICAgICAgICBkb25lKCk7XG4gICAgICAgICAgICAgICAgICAgIH0pO1xuICAgICAgICAgICAgICAgIH0pO1xuICAgICAgICAgICAgfSk7XG5cbiAgICAgICAgICAgIGRlc2NyaWJlKFwiY2FsbGluZyBgcmVzb2x2ZVByb21pc2VgIHR3aWNlLCBib3RoIHRpbWVzIGFzeW5jaHJvbm91c2x5XCIsIGZ1bmN0aW9uICgpIHtcbiAgICAgICAgICAgICAgICBmdW5jdGlvbiB4RmFjdG9yeSgpIHtcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIHRoZW46IGZ1bmN0aW9uIChyZXNvbHZlUHJvbWlzZSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHNldFRpbWVvdXQoZnVuY3Rpb24gKCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXNvbHZlUHJvbWlzZShzZW50aW5lbCk7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfSwgMCk7XG5cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBzZXRUaW1lb3V0KGZ1bmN0aW9uICgpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmVzb2x2ZVByb21pc2Uob3RoZXIpO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0sIDApO1xuICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICB9O1xuICAgICAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgICAgIHRlc3RQcm9taXNlUmVzb2x1dGlvbih4RmFjdG9yeSwgZnVuY3Rpb24gKHByb21pc2UsIGRvbmUpIHtcbiAgICAgICAgICAgICAgICAgICAgcHJvbWlzZS50aGVuKGZ1bmN0aW9uICh2YWx1ZSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgYXNzZXJ0LnN0cmljdEVxdWFsKHZhbHVlLCBzZW50aW5lbCk7XG4gICAgICAgICAgICAgICAgICAgICAgICBkb25lKCk7XG4gICAgICAgICAgICAgICAgICAgIH0pO1xuICAgICAgICAgICAgICAgIH0pO1xuICAgICAgICAgICAgfSk7XG5cbiAgICAgICAgICAgIGRlc2NyaWJlKFwiY2FsbGluZyBgcmVzb2x2ZVByb21pc2VgIHdpdGggYW4gYXN5bmNocm9ub3VzbHktZnVsZmlsbGVkIHByb21pc2UsIHRoZW4gY2FsbGluZyBpdCBhZ2FpbiwgYm90aCBcIiArXG4gICAgICAgICAgICAgICAgICAgICBcInRpbWVzIHN5bmNocm9ub3VzbHlcIiwgZnVuY3Rpb24gKCkge1xuICAgICAgICAgICAgICAgIGZ1bmN0aW9uIHhGYWN0b3J5KCkge1xuICAgICAgICAgICAgICAgICAgICB2YXIgZCA9IGRlZmVycmVkKCk7XG4gICAgICAgICAgICAgICAgICAgIHNldFRpbWVvdXQoZnVuY3Rpb24gKCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgZC5yZXNvbHZlKHNlbnRpbmVsKTtcbiAgICAgICAgICAgICAgICAgICAgfSwgNTApO1xuXG4gICAgICAgICAgICAgICAgICAgIHJldHVybiB7XG4gICAgICAgICAgICAgICAgICAgICAgICB0aGVuOiBmdW5jdGlvbiAocmVzb2x2ZVByb21pc2UpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXNvbHZlUHJvbWlzZShkLnByb21pc2UpO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJlc29sdmVQcm9taXNlKG90aGVyKTtcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgfTtcbiAgICAgICAgICAgICAgICB9XG5cbiAgICAgICAgICAgICAgICB0ZXN0UHJvbWlzZVJlc29sdXRpb24oeEZhY3RvcnksIGZ1bmN0aW9uIChwcm9taXNlLCBkb25lKSB7XG4gICAgICAgICAgICAgICAgICAgIHByb21pc2UudGhlbihmdW5jdGlvbiAodmFsdWUpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGFzc2VydC5zdHJpY3RFcXVhbCh2YWx1ZSwgc2VudGluZWwpO1xuICAgICAgICAgICAgICAgICAgICAgICAgZG9uZSgpO1xuICAgICAgICAgICAgICAgICAgICB9KTtcbiAgICAgICAgICAgICAgICB9KTtcbiAgICAgICAgICAgIH0pO1xuXG4gICAgICAgICAgICBkZXNjcmliZShcImNhbGxpbmcgYHJlc29sdmVQcm9taXNlYCB3aXRoIGFuIGFzeW5jaHJvbm91c2x5LXJlamVjdGVkIHByb21pc2UsIHRoZW4gY2FsbGluZyBpdCBhZ2FpbiwgYm90aCBcIiArXG4gICAgICAgICAgICAgICAgICAgICBcInRpbWVzIHN5bmNocm9ub3VzbHlcIiwgZnVuY3Rpb24gKCkge1xuICAgICAgICAgICAgICAgIGZ1bmN0aW9uIHhGYWN0b3J5KCkge1xuICAgICAgICAgICAgICAgICAgICB2YXIgZCA9IGRlZmVycmVkKCk7XG4gICAgICAgICAgICAgICAgICAgIHNldFRpbWVvdXQoZnVuY3Rpb24gKCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgZC5yZWplY3Qoc2VudGluZWwpO1xuICAgICAgICAgICAgICAgICAgICB9LCA1MCk7XG5cbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIHRoZW46IGZ1bmN0aW9uIChyZXNvbHZlUHJvbWlzZSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJlc29sdmVQcm9taXNlKGQucHJvbWlzZSk7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgcmVzb2x2ZVByb21pc2Uob3RoZXIpO1xuICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICB9O1xuICAgICAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgICAgIHRlc3RQcm9taXNlUmVzb2x1dGlvbih4RmFjdG9yeSwgZnVuY3Rpb24gKHByb21pc2UsIGRvbmUpIHtcbiAgICAgICAgICAgICAgICAgICAgcHJvbWlzZS50aGVuKG51bGwsIGZ1bmN0aW9uIChyZWFzb24pIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGFzc2VydC5zdHJpY3RFcXVhbChyZWFzb24sIHNlbnRpbmVsKTtcbiAgICAgICAgICAgICAgICAgICAgICAgIGRvbmUoKTtcbiAgICAgICAgICAgICAgICAgICAgfSk7XG4gICAgICAgICAgICAgICAgfSk7XG4gICAgICAgICAgICB9KTtcblxuICAgICAgICAgICAgZGVzY3JpYmUoXCJjYWxsaW5nIGByZWplY3RQcm9taXNlYCB0d2ljZSBzeW5jaHJvbm91c2x5XCIsIGZ1bmN0aW9uICgpIHtcbiAgICAgICAgICAgICAgICBmdW5jdGlvbiB4RmFjdG9yeSgpIHtcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIHRoZW46IGZ1bmN0aW9uIChyZXNvbHZlUHJvbWlzZSwgcmVqZWN0UHJvbWlzZSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJlamVjdFByb21pc2Uoc2VudGluZWwpO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJlamVjdFByb21pc2Uob3RoZXIpO1xuICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICB9O1xuICAgICAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgICAgIHRlc3RQcm9taXNlUmVzb2x1dGlvbih4RmFjdG9yeSwgZnVuY3Rpb24gKHByb21pc2UsIGRvbmUpIHtcbiAgICAgICAgICAgICAgICAgICAgcHJvbWlzZS50aGVuKG51bGwsIGZ1bmN0aW9uIChyZWFzb24pIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGFzc2VydC5zdHJpY3RFcXVhbChyZWFzb24sIHNlbnRpbmVsKTtcbiAgICAgICAgICAgICAgICAgICAgICAgIGRvbmUoKTtcbiAgICAgICAgICAgICAgICAgICAgfSk7XG4gICAgICAgICAgICAgICAgfSk7XG4gICAgICAgICAgICB9KTtcblxuICAgICAgICAgICAgZGVzY3JpYmUoXCJjYWxsaW5nIGByZWplY3RQcm9taXNlYCB0d2ljZSwgZmlyc3Qgc3luY2hyb25vdXNseSB0aGVuIGFzeW5jaHJvbm91c2x5XCIsIGZ1bmN0aW9uICgpIHtcbiAgICAgICAgICAgICAgICBmdW5jdGlvbiB4RmFjdG9yeSgpIHtcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIHRoZW46IGZ1bmN0aW9uIChyZXNvbHZlUHJvbWlzZSwgcmVqZWN0UHJvbWlzZSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJlamVjdFByb21pc2Uoc2VudGluZWwpO1xuXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgc2V0VGltZW91dChmdW5jdGlvbiAoKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJlamVjdFByb21pc2Uob3RoZXIpO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0sIDApO1xuICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICB9O1xuICAgICAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgICAgIHRlc3RQcm9taXNlUmVzb2x1dGlvbih4RmFjdG9yeSwgZnVuY3Rpb24gKHByb21pc2UsIGRvbmUpIHtcbiAgICAgICAgICAgICAgICAgICAgcHJvbWlzZS50aGVuKG51bGwsIGZ1bmN0aW9uIChyZWFzb24pIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGFzc2VydC5zdHJpY3RFcXVhbChyZWFzb24sIHNlbnRpbmVsKTtcbiAgICAgICAgICAgICAgICAgICAgICAgIGRvbmUoKTtcbiAgICAgICAgICAgICAgICAgICAgfSk7XG4gICAgICAgICAgICAgICAgfSk7XG4gICAgICAgICAgICB9KTtcblxuICAgICAgICAgICAgZGVzY3JpYmUoXCJjYWxsaW5nIGByZWplY3RQcm9taXNlYCB0d2ljZSwgYm90aCB0aW1lcyBhc3luY2hyb25vdXNseVwiLCBmdW5jdGlvbiAoKSB7XG4gICAgICAgICAgICAgICAgZnVuY3Rpb24geEZhY3RvcnkoKSB7XG4gICAgICAgICAgICAgICAgICAgIHJldHVybiB7XG4gICAgICAgICAgICAgICAgICAgICAgICB0aGVuOiBmdW5jdGlvbiAocmVzb2x2ZVByb21pc2UsIHJlamVjdFByb21pc2UpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBzZXRUaW1lb3V0KGZ1bmN0aW9uICgpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmVqZWN0UHJvbWlzZShzZW50aW5lbCk7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfSwgMCk7XG5cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBzZXRUaW1lb3V0KGZ1bmN0aW9uICgpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmVqZWN0UHJvbWlzZShvdGhlcik7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfSwgMCk7XG4gICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIH07XG4gICAgICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAgICAgdGVzdFByb21pc2VSZXNvbHV0aW9uKHhGYWN0b3J5LCBmdW5jdGlvbiAocHJvbWlzZSwgZG9uZSkge1xuICAgICAgICAgICAgICAgICAgICBwcm9taXNlLnRoZW4obnVsbCwgZnVuY3Rpb24gKHJlYXNvbikge1xuICAgICAgICAgICAgICAgICAgICAgICAgYXNzZXJ0LnN0cmljdEVxdWFsKHJlYXNvbiwgc2VudGluZWwpO1xuICAgICAgICAgICAgICAgICAgICAgICAgZG9uZSgpO1xuICAgICAgICAgICAgICAgICAgICB9KTtcbiAgICAgICAgICAgICAgICB9KTtcbiAgICAgICAgICAgIH0pO1xuXG4gICAgICAgICAgICBkZXNjcmliZShcInNhdmluZyBhbmQgYWJ1c2luZyBgcmVzb2x2ZVByb21pc2VgIGFuZCBgcmVqZWN0UHJvbWlzZWBcIiwgZnVuY3Rpb24gKCkge1xuICAgICAgICAgICAgICAgIHZhciBzYXZlZFJlc29sdmVQcm9taXNlLCBzYXZlZFJlamVjdFByb21pc2U7XG5cbiAgICAgICAgICAgICAgICBmdW5jdGlvbiB4RmFjdG9yeSgpIHtcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIHRoZW46IGZ1bmN0aW9uIChyZXNvbHZlUHJvbWlzZSwgcmVqZWN0UHJvbWlzZSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHNhdmVkUmVzb2x2ZVByb21pc2UgPSByZXNvbHZlUHJvbWlzZTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBzYXZlZFJlamVjdFByb21pc2UgPSByZWplY3RQcm9taXNlO1xuICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICB9O1xuICAgICAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgICAgIGJlZm9yZUVhY2goZnVuY3Rpb24gKCkge1xuICAgICAgICAgICAgICAgICAgICBzYXZlZFJlc29sdmVQcm9taXNlID0gbnVsbDtcbiAgICAgICAgICAgICAgICAgICAgc2F2ZWRSZWplY3RQcm9taXNlID0gbnVsbDtcbiAgICAgICAgICAgICAgICB9KTtcblxuICAgICAgICAgICAgICAgIHRlc3RQcm9taXNlUmVzb2x1dGlvbih4RmFjdG9yeSwgZnVuY3Rpb24gKHByb21pc2UsIGRvbmUpIHtcbiAgICAgICAgICAgICAgICAgICAgdmFyIHRpbWVzRnVsZmlsbGVkID0gMDtcbiAgICAgICAgICAgICAgICAgICAgdmFyIHRpbWVzUmVqZWN0ZWQgPSAwO1xuXG4gICAgICAgICAgICAgICAgICAgIHByb21pc2UudGhlbihcbiAgICAgICAgICAgICAgICAgICAgICAgIGZ1bmN0aW9uICgpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICArK3RpbWVzRnVsZmlsbGVkO1xuICAgICAgICAgICAgICAgICAgICAgICAgfSxcbiAgICAgICAgICAgICAgICAgICAgICAgIGZ1bmN0aW9uICgpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICArK3RpbWVzUmVqZWN0ZWQ7XG4gICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgICk7XG5cbiAgICAgICAgICAgICAgICAgICAgaWYgKHNhdmVkUmVzb2x2ZVByb21pc2UgJiYgc2F2ZWRSZWplY3RQcm9taXNlKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBzYXZlZFJlc29sdmVQcm9taXNlKGR1bW15KTtcbiAgICAgICAgICAgICAgICAgICAgICAgIHNhdmVkUmVzb2x2ZVByb21pc2UoZHVtbXkpO1xuICAgICAgICAgICAgICAgICAgICAgICAgc2F2ZWRSZWplY3RQcm9taXNlKGR1bW15KTtcbiAgICAgICAgICAgICAgICAgICAgICAgIHNhdmVkUmVqZWN0UHJvbWlzZShkdW1teSk7XG4gICAgICAgICAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgICAgICAgICBzZXRUaW1lb3V0KGZ1bmN0aW9uICgpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIHNhdmVkUmVzb2x2ZVByb21pc2UoZHVtbXkpO1xuICAgICAgICAgICAgICAgICAgICAgICAgc2F2ZWRSZXNvbHZlUHJvbWlzZShkdW1teSk7XG4gICAgICAgICAgICAgICAgICAgICAgICBzYXZlZFJlamVjdFByb21pc2UoZHVtbXkpO1xuICAgICAgICAgICAgICAgICAgICAgICAgc2F2ZWRSZWplY3RQcm9taXNlKGR1bW15KTtcbiAgICAgICAgICAgICAgICAgICAgfSwgNTApO1xuXG4gICAgICAgICAgICAgICAgICAgIHNldFRpbWVvdXQoZnVuY3Rpb24gKCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgYXNzZXJ0LnN0cmljdEVxdWFsKHRpbWVzRnVsZmlsbGVkLCAxKTtcbiAgICAgICAgICAgICAgICAgICAgICAgIGFzc2VydC5zdHJpY3RFcXVhbCh0aW1lc1JlamVjdGVkLCAwKTtcbiAgICAgICAgICAgICAgICAgICAgICAgIGRvbmUoKTtcbiAgICAgICAgICAgICAgICAgICAgfSwgMTAwKTtcbiAgICAgICAgICAgICAgICB9KTtcbiAgICAgICAgICAgIH0pO1xuICAgICAgICB9KTtcblxuICAgICAgICBkZXNjcmliZShcIjIuMy4zLjMuNDogSWYgY2FsbGluZyBgdGhlbmAgdGhyb3dzIGFuIGV4Y2VwdGlvbiBgZWAsXCIsIGZ1bmN0aW9uICgpIHtcbiAgICAgICAgICAgIGRlc2NyaWJlKFwiMi4zLjMuMy40LjE6IElmIGByZXNvbHZlUHJvbWlzZWAgb3IgYHJlamVjdFByb21pc2VgIGhhdmUgYmVlbiBjYWxsZWQsIGlnbm9yZSBpdC5cIiwgZnVuY3Rpb24gKCkge1xuICAgICAgICAgICAgICAgIGRlc2NyaWJlKFwiYHJlc29sdmVQcm9taXNlYCB3YXMgY2FsbGVkIHdpdGggYSBub24tdGhlbmFibGVcIiwgZnVuY3Rpb24gKCkge1xuICAgICAgICAgICAgICAgICAgICBmdW5jdGlvbiB4RmFjdG9yeSgpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgdGhlbjogZnVuY3Rpb24gKHJlc29sdmVQcm9taXNlKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJlc29sdmVQcm9taXNlKHNlbnRpbmVsKTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdGhyb3cgb3RoZXI7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAgICAgfTtcbiAgICAgICAgICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAgICAgICAgIHRlc3RQcm9taXNlUmVzb2x1dGlvbih4RmFjdG9yeSwgZnVuY3Rpb24gKHByb21pc2UsIGRvbmUpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIHByb21pc2UudGhlbihmdW5jdGlvbiAodmFsdWUpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBhc3NlcnQuc3RyaWN0RXF1YWwodmFsdWUsIHNlbnRpbmVsKTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBkb25lKCk7XG4gICAgICAgICAgICAgICAgICAgICAgICB9KTtcbiAgICAgICAgICAgICAgICAgICAgfSk7XG4gICAgICAgICAgICAgICAgfSk7XG5cbiAgICAgICAgICAgICAgICBkZXNjcmliZShcImByZXNvbHZlUHJvbWlzZWAgd2FzIGNhbGxlZCB3aXRoIGFuIGFzeW5jaHJvbm91c2x5LWZ1bGZpbGxlZCBwcm9taXNlXCIsIGZ1bmN0aW9uICgpIHtcbiAgICAgICAgICAgICAgICAgICAgZnVuY3Rpb24geEZhY3RvcnkoKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICB2YXIgZCA9IGRlZmVycmVkKCk7XG4gICAgICAgICAgICAgICAgICAgICAgICBzZXRUaW1lb3V0KGZ1bmN0aW9uICgpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBkLnJlc29sdmUoc2VudGluZWwpO1xuICAgICAgICAgICAgICAgICAgICAgICAgfSwgNTApO1xuXG4gICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4ge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRoZW46IGZ1bmN0aW9uIChyZXNvbHZlUHJvbWlzZSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXNvbHZlUHJvbWlzZShkLnByb21pc2UpO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB0aHJvdyBvdGhlcjtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgICAgICB9O1xuICAgICAgICAgICAgICAgICAgICB9XG5cbiAgICAgICAgICAgICAgICAgICAgdGVzdFByb21pc2VSZXNvbHV0aW9uKHhGYWN0b3J5LCBmdW5jdGlvbiAocHJvbWlzZSwgZG9uZSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgcHJvbWlzZS50aGVuKGZ1bmN0aW9uICh2YWx1ZSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGFzc2VydC5zdHJpY3RFcXVhbCh2YWx1ZSwgc2VudGluZWwpO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGRvbmUoKTtcbiAgICAgICAgICAgICAgICAgICAgICAgIH0pO1xuICAgICAgICAgICAgICAgICAgICB9KTtcbiAgICAgICAgICAgICAgICB9KTtcblxuICAgICAgICAgICAgICAgIGRlc2NyaWJlKFwiYHJlc29sdmVQcm9taXNlYCB3YXMgY2FsbGVkIHdpdGggYW4gYXN5bmNocm9ub3VzbHktcmVqZWN0ZWQgcHJvbWlzZVwiLCBmdW5jdGlvbiAoKSB7XG4gICAgICAgICAgICAgICAgICAgIGZ1bmN0aW9uIHhGYWN0b3J5KCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgdmFyIGQgPSBkZWZlcnJlZCgpO1xuICAgICAgICAgICAgICAgICAgICAgICAgc2V0VGltZW91dChmdW5jdGlvbiAoKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgZC5yZWplY3Qoc2VudGluZWwpO1xuICAgICAgICAgICAgICAgICAgICAgICAgfSwgNTApO1xuXG4gICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4ge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRoZW46IGZ1bmN0aW9uIChyZXNvbHZlUHJvbWlzZSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXNvbHZlUHJvbWlzZShkLnByb21pc2UpO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB0aHJvdyBvdGhlcjtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgICAgICB9O1xuICAgICAgICAgICAgICAgICAgICB9XG5cbiAgICAgICAgICAgICAgICAgICAgdGVzdFByb21pc2VSZXNvbHV0aW9uKHhGYWN0b3J5LCBmdW5jdGlvbiAocHJvbWlzZSwgZG9uZSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgcHJvbWlzZS50aGVuKG51bGwsIGZ1bmN0aW9uIChyZWFzb24pIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBhc3NlcnQuc3RyaWN0RXF1YWwocmVhc29uLCBzZW50aW5lbCk7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgZG9uZSgpO1xuICAgICAgICAgICAgICAgICAgICAgICAgfSk7XG4gICAgICAgICAgICAgICAgICAgIH0pO1xuICAgICAgICAgICAgICAgIH0pO1xuXG4gICAgICAgICAgICAgICAgZGVzY3JpYmUoXCJgcmVqZWN0UHJvbWlzZWAgd2FzIGNhbGxlZFwiLCBmdW5jdGlvbiAoKSB7XG4gICAgICAgICAgICAgICAgICAgIGZ1bmN0aW9uIHhGYWN0b3J5KCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB0aGVuOiBmdW5jdGlvbiAocmVzb2x2ZVByb21pc2UsIHJlamVjdFByb21pc2UpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmVqZWN0UHJvbWlzZShzZW50aW5lbCk7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRocm93IG90aGVyO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgIH07XG4gICAgICAgICAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgICAgICAgICB0ZXN0UHJvbWlzZVJlc29sdXRpb24oeEZhY3RvcnksIGZ1bmN0aW9uIChwcm9taXNlLCBkb25lKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBwcm9taXNlLnRoZW4obnVsbCwgZnVuY3Rpb24gKHJlYXNvbikge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGFzc2VydC5zdHJpY3RFcXVhbChyZWFzb24sIHNlbnRpbmVsKTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBkb25lKCk7XG4gICAgICAgICAgICAgICAgICAgICAgICB9KTtcbiAgICAgICAgICAgICAgICAgICAgfSk7XG4gICAgICAgICAgICAgICAgfSk7XG5cbiAgICAgICAgICAgICAgICBkZXNjcmliZShcImByZXNvbHZlUHJvbWlzZWAgdGhlbiBgcmVqZWN0UHJvbWlzZWAgd2VyZSBjYWxsZWRcIiwgZnVuY3Rpb24gKCkge1xuICAgICAgICAgICAgICAgICAgICBmdW5jdGlvbiB4RmFjdG9yeSgpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgdGhlbjogZnVuY3Rpb24gKHJlc29sdmVQcm9taXNlLCByZWplY3RQcm9taXNlKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJlc29sdmVQcm9taXNlKHNlbnRpbmVsKTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmVqZWN0UHJvbWlzZShvdGhlcik7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRocm93IG90aGVyO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgIH07XG4gICAgICAgICAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgICAgICAgICB0ZXN0UHJvbWlzZVJlc29sdXRpb24oeEZhY3RvcnksIGZ1bmN0aW9uIChwcm9taXNlLCBkb25lKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBwcm9taXNlLnRoZW4oZnVuY3Rpb24gKHZhbHVlKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgYXNzZXJ0LnN0cmljdEVxdWFsKHZhbHVlLCBzZW50aW5lbCk7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgZG9uZSgpO1xuICAgICAgICAgICAgICAgICAgICAgICAgfSk7XG4gICAgICAgICAgICAgICAgICAgIH0pO1xuICAgICAgICAgICAgICAgIH0pO1xuXG4gICAgICAgICAgICAgICAgZGVzY3JpYmUoXCJgcmVqZWN0UHJvbWlzZWAgdGhlbiBgcmVzb2x2ZVByb21pc2VgIHdlcmUgY2FsbGVkXCIsIGZ1bmN0aW9uICgpIHtcbiAgICAgICAgICAgICAgICAgICAgZnVuY3Rpb24geEZhY3RvcnkoKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4ge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRoZW46IGZ1bmN0aW9uIChyZXNvbHZlUHJvbWlzZSwgcmVqZWN0UHJvbWlzZSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICByZWplY3RQcm9taXNlKHNlbnRpbmVsKTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmVzb2x2ZVByb21pc2Uob3RoZXIpO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB0aHJvdyBvdGhlcjtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgICAgICB9O1xuICAgICAgICAgICAgICAgICAgICB9XG5cbiAgICAgICAgICAgICAgICAgICAgdGVzdFByb21pc2VSZXNvbHV0aW9uKHhGYWN0b3J5LCBmdW5jdGlvbiAocHJvbWlzZSwgZG9uZSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgcHJvbWlzZS50aGVuKG51bGwsIGZ1bmN0aW9uIChyZWFzb24pIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBhc3NlcnQuc3RyaWN0RXF1YWwocmVhc29uLCBzZW50aW5lbCk7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgZG9uZSgpO1xuICAgICAgICAgICAgICAgICAgICAgICAgfSk7XG4gICAgICAgICAgICAgICAgICAgIH0pO1xuICAgICAgICAgICAgICAgIH0pO1xuICAgICAgICAgICAgfSk7XG5cbiAgICAgICAgICAgIGRlc2NyaWJlKFwiMi4zLjMuMy40LjI6IE90aGVyd2lzZSwgcmVqZWN0IGBwcm9taXNlYCB3aXRoIGBlYCBhcyB0aGUgcmVhc29uLlwiLCBmdW5jdGlvbiAoKSB7XG4gICAgICAgICAgICAgICAgZGVzY3JpYmUoXCJzdHJhaWdodGZvcndhcmQgY2FzZVwiLCBmdW5jdGlvbiAoKSB7XG4gICAgICAgICAgICAgICAgICAgIGZ1bmN0aW9uIHhGYWN0b3J5KCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB0aGVuOiBmdW5jdGlvbiAoKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRocm93IHNlbnRpbmVsO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgIH07XG4gICAgICAgICAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgICAgICAgICB0ZXN0UHJvbWlzZVJlc29sdXRpb24oeEZhY3RvcnksIGZ1bmN0aW9uIChwcm9taXNlLCBkb25lKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBwcm9taXNlLnRoZW4obnVsbCwgZnVuY3Rpb24gKHJlYXNvbikge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGFzc2VydC5zdHJpY3RFcXVhbChyZWFzb24sIHNlbnRpbmVsKTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBkb25lKCk7XG4gICAgICAgICAgICAgICAgICAgICAgICB9KTtcbiAgICAgICAgICAgICAgICAgICAgfSk7XG4gICAgICAgICAgICAgICAgfSk7XG5cbiAgICAgICAgICAgICAgICBkZXNjcmliZShcImByZXNvbHZlUHJvbWlzZWAgaXMgY2FsbGVkIGFzeW5jaHJvbm91c2x5IGJlZm9yZSB0aGUgYHRocm93YFwiLCBmdW5jdGlvbiAoKSB7XG4gICAgICAgICAgICAgICAgICAgIGZ1bmN0aW9uIHhGYWN0b3J5KCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB0aGVuOiBmdW5jdGlvbiAocmVzb2x2ZVByb21pc2UpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgc2V0VGltZW91dChmdW5jdGlvbiAoKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXNvbHZlUHJvbWlzZShvdGhlcik7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0sIDApO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB0aHJvdyBzZW50aW5lbDtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgICAgICB9O1xuICAgICAgICAgICAgICAgICAgICB9XG5cbiAgICAgICAgICAgICAgICAgICAgdGVzdFByb21pc2VSZXNvbHV0aW9uKHhGYWN0b3J5LCBmdW5jdGlvbiAocHJvbWlzZSwgZG9uZSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgcHJvbWlzZS50aGVuKG51bGwsIGZ1bmN0aW9uIChyZWFzb24pIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBhc3NlcnQuc3RyaWN0RXF1YWwocmVhc29uLCBzZW50aW5lbCk7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgZG9uZSgpO1xuICAgICAgICAgICAgICAgICAgICAgICAgfSk7XG4gICAgICAgICAgICAgICAgICAgIH0pO1xuICAgICAgICAgICAgICAgIH0pO1xuXG4gICAgICAgICAgICAgICAgZGVzY3JpYmUoXCJgcmVqZWN0UHJvbWlzZWAgaXMgY2FsbGVkIGFzeW5jaHJvbm91c2x5IGJlZm9yZSB0aGUgYHRocm93YFwiLCBmdW5jdGlvbiAoKSB7XG4gICAgICAgICAgICAgICAgICAgIGZ1bmN0aW9uIHhGYWN0b3J5KCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB0aGVuOiBmdW5jdGlvbiAocmVzb2x2ZVByb21pc2UsIHJlamVjdFByb21pc2UpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgc2V0VGltZW91dChmdW5jdGlvbiAoKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICByZWplY3RQcm9taXNlKG90aGVyKTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfSwgMCk7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRocm93IHNlbnRpbmVsO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgIH07XG4gICAgICAgICAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgICAgICAgICB0ZXN0UHJvbWlzZVJlc29sdXRpb24oeEZhY3RvcnksIGZ1bmN0aW9uIChwcm9taXNlLCBkb25lKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBwcm9taXNlLnRoZW4obnVsbCwgZnVuY3Rpb24gKHJlYXNvbikge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGFzc2VydC5zdHJpY3RFcXVhbChyZWFzb24sIHNlbnRpbmVsKTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBkb25lKCk7XG4gICAgICAgICAgICAgICAgICAgICAgICB9KTtcbiAgICAgICAgICAgICAgICAgICAgfSk7XG4gICAgICAgICAgICAgICAgfSk7XG4gICAgICAgICAgICB9KTtcbiAgICAgICAgfSk7XG4gICAgfSk7XG5cbiAgICBkZXNjcmliZShcIjIuMy4zLjQ6IElmIGB0aGVuYCBpcyBub3QgYSBmdW5jdGlvbiwgZnVsZmlsbCBwcm9taXNlIHdpdGggYHhgXCIsIGZ1bmN0aW9uICgpIHtcbiAgICAgICAgZnVuY3Rpb24gdGVzdEZ1bGZpbGxWaWFOb25GdW5jdGlvbih0aGVuLCBzdHJpbmdSZXByZXNlbnRhdGlvbikge1xuICAgICAgICAgICAgdmFyIHggPSBudWxsO1xuXG4gICAgICAgICAgICBiZWZvcmVFYWNoKGZ1bmN0aW9uICgpIHtcbiAgICAgICAgICAgICAgICB4ID0geyB0aGVuOiB0aGVuIH07XG4gICAgICAgICAgICB9KTtcblxuICAgICAgICAgICAgZnVuY3Rpb24geEZhY3RvcnkoKSB7XG4gICAgICAgICAgICAgICAgcmV0dXJuIHg7XG4gICAgICAgICAgICB9XG5cbiAgICAgICAgICAgIGRlc2NyaWJlKFwiYHRoZW5gIGlzIFwiICsgc3RyaW5nUmVwcmVzZW50YXRpb24sIGZ1bmN0aW9uICgpIHtcbiAgICAgICAgICAgICAgICB0ZXN0UHJvbWlzZVJlc29sdXRpb24oeEZhY3RvcnksIGZ1bmN0aW9uIChwcm9taXNlLCBkb25lKSB7XG4gICAgICAgICAgICAgICAgICAgIHByb21pc2UudGhlbihmdW5jdGlvbiAodmFsdWUpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGFzc2VydC5zdHJpY3RFcXVhbCh2YWx1ZSwgeCk7XG4gICAgICAgICAgICAgICAgICAgICAgICBkb25lKCk7XG4gICAgICAgICAgICAgICAgICAgIH0pO1xuICAgICAgICAgICAgICAgIH0pO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ZpbGwgYHByb21pc2VgIHdpdGggYHhgXCIsIGZ1bmN0aW9uICgpIHtcbiAgICBmdW5jdGlvbiB0ZXN0VmFsdWUoZXhwZWN0ZWRWYWx1ZSwgc3RyaW5nUmVwcmVzZW50YXRpb24sIGJlZm9yZUVhY2hIb29rLCBhZnRlckVhY2hIb29rKSB7XG4gICAgICAgIGRlc2NyaWJlKFwiVGhlIHZhbHVlIGlzIFwiICsgc3RyaW5nUmVwcmVzZW50YXRpb24sIGZ1bmN0aW9uICgpIHtcbiAgICAgICAgICAgIGlmICh0eXBlb2YgYmVmb3JlRWFjaEhvb2sgPT09IFwiZnVuY3Rpb25cIikge1xuICAgICAgICAgICAgICAgIGJlZm9yZUVhY2goYmVmb3JlRWFjaEhvb2spO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgaWYgKHR5cGVvZiBhZnRlckVhY2hIb29rID09PSBcImZ1bmN0aW9uXCIpIHtcbiAgICAgICAgICAgICAgICBhZnRlckVhY2goYWZ0ZXJFYWNoSG9vayk7XG4gICAgICAgICAgICB9XG5cbiAgICAgICAgICAgIHRlc3RGdWxmaWxsZWQoZHVtbXksIGZ1bmN0aW9uIChwcm9taXNlMSwgZG9uZSkge1xuICAgICAgICAgICAgICAgIHZhciBwcm9taXNlMiA9IHByb21pc2UxLnRoZW4oZnVuY3Rpb24gb25GdWxmaWxsZWQoKSB7XG4gICAgICAgICAgICAgICAgICAgIHJldHVybiBleHBlY3RlZFZhbHVlO1xuICAgICAgICAgICAgICAgIH0pO1xuXG4gICAgICAgICAgICAgICAgcHJvbWlzZTIudGhlbihmdW5jdGlvbiBvblByb21pc2UyRnVsZmlsbGVkKGFjdHVhbFZhbHVlKSB7XG4gICAgICAgICAgICAgICAgICAgIGFzc2VydC5zdHJpY3RFcXVhbChhY3R1YWxWYWx1ZSwgZXhwZWN0ZWRWYWx1ZSk7XG4gICAgICAgICAgICAgICAgICAgIGRvbmUoKTtcbiAgICAgICAgICAgICAgICB9KTtcbiAgICAgICA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RoZW5hYmxlXCI6IGZ1bmN0aW9uICh2YWx1ZSkge1xuICAgICAgICByZXR1cm4ge1xuICAgICAgICAgICAgdGhlbjogZnVuY3Rpb24gKG9uRnVsZmlsbGVkKSB7XG4gICAgICAgICAgICAgICAgb25GdWxmaWxsZWQodmFsdWUpO1xuICAgICAgICAgICAgfVxuICAgICAgICB9O1xuICAgIH0sXG5cbiAgICBcImFuIGFzeW5jaHJvbm91c2x5LWZ1bGZpbGxlZCBjdXN0b20gdGhlbmFibGVcIjogZnVuY3Rpb24gKHZhbHVlKSB7XG4gICAgICAgIHJldHVybiB7XG4gICAgICAgICAgICB0aGVuOiBmdW5jdGlvbiAob25GdWxmaWxsZWQpIHtcbiAgICAgICAgICAgICAgICBzZXRUaW1lb3V0KGZ1bmN0aW9uICgpIHtcbiAgICAgICAgICAgICAgICAgICAgb25GdWxmaWxsZWQodmFsdWUpO1xuICAgICAgICAgICAgICAgIH0sIDApO1xuICAgICAgICAgICAgfVxuICAgICAgICB9O1xuICAgIH0sXG5cbiAgICBcImEgc3luY2hyb25vdXNseS1mdWxmaWxsZWQgb25lLXRpbWUgdGhlbmFibGVcIjogZnVuY3Rpb24gKHZhbHVlKSB7XG4gICAgICAgIHZhciBudW1iZXJPZlRpbWVzVGhlblJldHJpZXZlZCA9IDA7XG4gICAgICAgIHJldHVybiBPYmplY3QuY3JlYXRlKG51bGwsIHtcbiAgICAgICAgICAgIHRoZW46IHtcbiAgICAgICAgICAgICAgICBnZXQ6IGZ1bmN0aW9uICgpIHtcbiAgICAgICAgICAgICAgICAgICAgaWYgKG51bWJlck9mVGltZXNUaGVuUmV0cmlldmVkID09PSAwKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICArK251bWJlck9mVGltZXNUaGVuUmV0cmlldmVkO1xuICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIGZ1bmN0aW9uIChvbkZ1bGZpbGxlZCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIG9uRnVsZmlsbGVkKHZhbHVlKTtcbiAgICAgICAgICAgICAgICAgICAgICAgIH07XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIG51bGw7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfVxuICAgICAgICB9KTtcbiAgICB9LFxuXG4gICAgXCJhIHRoZW5hYmxlIHRoYXQgdHJpZXMgdG8gZnVsZmlsbCB0d2ljZVwiOiBmdW5jdGlvbiAodmFsdWUpIHtcbiAgICAgICAgcmV0dXJuIHtcbiAgICAgICAgICAgIHRoZW46IGZ1bmN0aW9uIChvbkZ1bGZpbGxlZCkge1xuICAgICAgICAgICAgICAgIG9uRnVsZmlsbGVkKHZhbHVlKTtcbiAgICAgICAgICAgICAgICBvbkZ1bGZpbGxlZChvdGhlcik7XG4gICAgICAgICAgICB9XG4gICAgICAgIH07XG4gICAgfSxcblxuICAgIFwiYSB0aGVuYWJsZSB0aGF0IGZ1bGZpbGxzIGJ1dCB0aGVuIHRocm93c1wiOiBmdW5jdGlvbiAodmFsdWUpIHtcbiAgICAgICAgcmV0dXJuIHtcbiAgICAgICAgICAgIHRoZW46IGZ1bmN0aW9uIChvbkZ1bGZpbGxlZCkge1xuICAgICAgICAgICAgICAgIG9uRnVsZmlsbGVkKHZhbHVlKTtcbiAgICAgICAgICAgICAgICB0aHJvdyBvdGhlcjtcbiAgICAgICAgICAgIH1cbiAgICAgICAgfTtcbiAgICB9LFxuXG4gICAgXCJhbiBhbHJlYWR5LWZ1bGZpbGxlZCBwcm9taXNlXCI6IGZ1bmN0aW9uICh2YWx1ZSkge1xuICAgICAgICByZXR1cm4gcmVzb2x2ZWQodmFsdWUpO1xuICAgIH0sXG5cbiAgICBcImFuIGV2ZW50dWFsbHktZnVsZmlsbGVkIHByb21pc2VcIjogZnVuY3Rpb24gKHZhbHVlKSB7XG4gICAgICAgIHZhciBkID0gZGVmZXJyZWQoKTtcbiAgICAgICAgc2V0VGltZW91dChmdW5jdGlvbiAoKSB7XG4gICAgICAgICAgICBkLnJlc29sdmUodmFsdWUpO1xuICAgICAgICB9LCA1MCk7XG4gICAgICAgIHJldHVybiBkLnByb21pc2U7XG4gICAgfVxufTtcblxuZXhwb3J0cy5yZWplY3RlZCA9IHtcbiAgICBcImEgc3luY2hyb25vdXNseS1yZWplY3RlZCBjdXN0b20gdGhlbmFibGVcIjogZnVuY3Rpb24gKHJlYXNvbikge1xuICAgICAgICByZXR1cm4ge1xuICAgICAgICAgICAgdGhlbjogZnVuY3Rpb24gKG9uRnVsZmlsbGVkLCBvblJlamVjdGVkKSB7XG4gICAgICAgICAgICAgICAgb25SZWplY3RlZChyZWFzb24pO1xuICAgICAgICAgICAgfVxuICAgICAgICB9O1xuICAgIH0sXG5cbiAgICBcImFuIGFzeW5jaHJvbm91c2x5LXJlamVjdGVkIGN1c3RvbSB0aGVuYWJsZVwiOiBmdW5jdGlvbiAocmVhc29uKSB7XG4gICAgICAgIHJldHVybiB7XG4gICAgICAgICAgICB0aGVuOiBmdW5jdGlvbiAob25GdWxmaWxsZWQsIG9uUmVqZWN0ZWQpIHtcbiAgICAgICAgICAgICAgICBzZXRUaW1lb3V0KGZ1bmN0aW9uICgpIHtcbiAgICAgICAgICAgICAgICAgICAgb25SZWplY3RlZChyZWFzb24pO1xuICAgICAgICAgICAgICAgIH0sIDApO1xuICAgICAgICAgICAgfVxuICAgICAgICB9O1xuICAgIH0sXG5cbiAgICBcImEgc3luY2hyb25vdXNseS1yZWplY3RlZCBvbmUtdGltZSB0aGVuYWJsZVwiOiBmdW5jdGlvbiAocmVhc29uKSB7XG4gICAgICAgIHZhciBudW1iZXJPZlRpbWVzVGhlblJldHJpZXZlZCA9IDA7XG4gICAgICAgIHJldHVybiBPYmplY3QuY3JlYXRlKG51bGwsIHtcbiAgICAgICAgICAgIHRoZW46IHtcbiAgICAgICAgICAgICAgICBnZXQ6IGZ1bmN0aW9uICgpIHtcbiAgICAgICAgICAgICAgICAgICAgaWYgKG51bWJlck9mVGltZXNUaGVuUmV0cmlldmVkID09PSAwKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICArK251bWJlck9mVGltZXNUaGVuUmV0cmlldmVkO1xuICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIGZ1bmN0aW9uIChvbkZ1bGZpbGxlZCwgb25SZWplY3RlZCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIG9uUmVqZWN0ZWQocmVhc29uKTtcbiAgICAgICAgICAgICAgICAgICAgICAgIH07XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIG51bGw7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfVxuICAgICAgICB9KTtcbiAgICB9LFxuXG4gICAgXCJhIHRoZW5hYmxlIHRoYXQgaW1tZWRpYXRlbHkgdGhyb3dzIGluIGB0aGVuYFwiOiBmdW5jdGlvbiAocmVhc29uKSB7XG4gICAgICAgIHJldHVybiB7XG4gICAgICAgICAgICB0aGVuOiBmdW5jdGlvbiAoKSB7XG4gICAgICAgICAgICAgICAgdGhyb3cgcmVhc29uO1xuICAgICAgICAgICAgfVxuICAgICAgICB9O1xuICAgIH0sXG5cbiAgICBcImFuIG9iamVjdCB3aXRoIGEgdGhyb3dpbmcgYHRoZW5gIGFjY2Vzc29yXCI6IGZ1bmN0aW9uIChyZWFzb24pIHtcbiAgICAgICAgcmV0dXJuIE9iamVjdC5jcmVhdGUobnVsbCwge1xuICAgICAgICAgICAgdGhlbjoge1xuICAgICAgICAgICAgICAgIGdldDogZnVuY3Rpb24gKCkge1xuICAgICAgICAgICAgICAgICAgICB0aHJvdyByZWFzb247XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfVxuICAgICAgICB9KTtcbiAgICB9LFxuXG4gICAgXCJhbiBhbHJlYWR5LXJlamVjdGVkIHByb21pc2VcIjogZnVuY3Rpb24gKHJlYXNvbikge1xuICAgICAgICByZXR1cm4gcmVqZWN0ZWQocmVhc29u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E1lc3NhZ2UgJiYgd2luZG93LmFkZEV2ZW50TGlzdGVuZXJcbiAgICA7XG5cbiAgICBpZiAoY2FuU2V0SW1tZWRpYXRlKSB7XG4gICAgICAgIHJldHVybiBmdW5jdGlvbiAoZikgeyByZXR1cm4gd2luZG93LnNldEltbWVkaWF0ZShmKSB9O1xuICAgIH1cblxuICAgIGlmIChjYW5Qb3N0KSB7XG4gICAgICAgIHZhciBxdWV1ZSA9IFtdO1xuICAgICAgICB3aW5kb3cuYWRkRXZlbnRMaXN0ZW5lcignbWVzc2FnZScsIGZ1bmN0aW9uIChldikge1xuICAgICAgICAgICAgaWYgKGV2LnNvdXJjZSA9PT0gd2luZG93ICYmIGV2LmRhdGEgPT09ICdwcm9jZXNzLXRpY2snKSB7XG4gICAgICAgICAgICAgICAgZXYuc3RvcFByb3BhZ2F0aW9uKCk7XG4gICAgICAgICAgICAgICAgaWYgKHF1ZXVlLmxlbmd0aCA+IDApIHtcbiAgICAgICAgICAgICAgICAgICAgdmFyIGZuID0gcXVldWUuc2hpZnQoKTtcbiAgICAgICAgICAgICAgICAgICAgZm4oKTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9XG4gICAgICAgIH0sIHRydWUpO1xuXG4gICAgICAgIHJldHVybiBmdW5jdGlvbiBuZXh0VGljayhmbikge1xuICAgICAgICAgICAgcXVldWUucHVzaChmbik7XG4gICAgICAgICAgICB3aW5kb3cucG9zdE1lc3NhZ2UoJ3Byb2Nlc3MtdGljaycsICcqJyk7XG4gICAgICAgIH07XG4gICAgfVxuXG4gICAgcmV0dXJuIGZ1bmN0aW9uIG5leHRUaWNrKGZuKSB7XG4gICAgICAgIHNldFRpbWVvdXQoZm4sIDApO1xuICAgIH07XG59KSgpO1xuXG5wcm9jZXNzLnRpdGxlID0gJ2Jyb3dzZXInO1xucHJvY2Vzcy5icm93c2VyID0gdHJ1ZTtcbnByb2Nlc3MuZW52ID0ge307XG5wcm9jZXNzLmFyZ3YgPSBbXTtcblxuc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ZSBzYWZhcmkpIHRoZW4gZm9yY2UgYSByZXNldFxuICAgICAgICAgICAgICAgIC8vIHZpYSBkaXJlY3QgYXNzaWdubWVudC5cbiAgICAgICAgICAgICAgICBpZiAoIW93bmVkKSB7XG4gICAgICAgICAgICAgICAgICAgIGRlbGV0ZSBvYmplY3RbcHJvcGVydHldO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICBpZiAob2JqZWN0W3Byb3BlcnR5XSA9PT0gbWV0aG9kKSB7XG4gICAgICAgICAgICAgICAgICAgIG9iamVjdFtwcm9wZXJ0eV0gPSB3cmFwcGVkTWV0aG9kO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH07XG5cbiAgICAgICAgICAgIG1ldGhvZC5yZXN0b3JlLnNpbm9uID0gdHJ1ZTtcbiAgICAgICAgICAgIG1pcnJvclByb3BlcnRpZXMobWV0aG9kLCB3cmFwcGVkTWV0aG9kKTtcblxuICAgICAgICAgICAgcmV0dXJuIG1ldGhvZDtcbiAgICAgICAgfSxcblxuICAgICAgICBleHRlbmQ6IGZ1bmN0aW9uIGV4dGVuZCh0YXJnZXQpIHtcbiAgICAgICAgICAgIGZvciAodmFyIGkgPSAxLCBsID0gYXJndW1lbnRzLmxlbmd0aDsgaSA8IGw7IGkgKz0gMSkge1xuICAgICAgICAgICAgICAgIGZvciAodmFyIHByb3AgaW4gYXJndW1lbnRzW2ldKSB7XG4gICAgICAgICAgICAgICAgICAgIGlmIChhcmd1bWVudHNbaV0uaGFzT3duUHJvcGVydHkocHJvcCkpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIHRhcmdldFtwcm9wXSA9IGFyZ3VtZW50c1tpXVtwcm9wXTtcbiAgICAgICAgICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAgICAgICAgIC8vIERPTlQgRU5VTSBidWcsIG9ubHkgY2FyZSBhYm91dCB0b1N0cmluZ1xuICAgICAgICAgICAgICAgICAgICBpZiAoYXJndW1lbnRzW2ldLmhhc093blByb3BlcnR5KFwidG9TdHJpbmdcIikgJiZcbiAgICAgICAgICAgICAgICAgICAgICAgIGFyZ3VtZW50c1tpXS50b1N0cmluZyAhPSB0YXJnZXQudG9TdHJpbmcpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIHRhcmdldC50b1N0cmluZyA9IGFyZ3VtZW50c1tpXS50b1N0cmluZztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgcmV0dXJuIHRhcmdldDtcbiAgICAgICAgfSxcblxuICAgICAgICBjcmVhdGU6IGZ1bmN0aW9uIGNyZWF0ZShwcm90bykge1xuICAgICAgICAgICAgdmFyIEYgPSBmdW5jdGlvbiAoKSB7fTtcbiAgICAgICAgICAgIEYucHJvdG90eXBlID0gcHJvdG87XG4gICAgICAgICAgICByZXR1cm4gbmV3IEYoKTtcbiAgICAgICAgfSxcblxuICAgICAgICBkZWVwRXF1YWw6IGZ1bmN0aW9uIGRlZXBFcXVhbChhLCBiKSB7XG4gICAgICAgICAgICBpZiAoc2lub24ubWF0Y2ggJiYgc2lub24ubWF0Y2guaXNNYXRjaGVyKGEpKSB7XG4gICAgICAgICAgICAgICAgcmV0dXJuIGEudGVzdChiKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGlmICh0eXBlb2YgYSAhPSBcIm9iamVjdFwiIHx8IHR5cGVvZiBiICE9IFwib2JqZWN0XCIpIHtcbiAgICAgICAgICAgICAgICByZXR1cm4gYSA9PT0gYjtcbiAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgaWYgKGlzRWxlbWVudChhKSB8fCBpc0VsZW1lbnQoYikpIHtcbiAgICAgICAgICAgICAgICByZXR1cm4gYSA9PT0gYjtcbiAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgaWYgKGEgPT09IGIpIHtcbiAgICAgICAgICAgICAgICByZXR1cm4gdHJ1ZTtcbiAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgaWYgKChhID09PSBudWxsICYmIGIgIT09IG51bGwpIHx8IChhICE9PSBudWxsICYmIGIgPT09IG51bGwpKSB7XG4gICAgICAgICAgICAgICAgcmV0dXJuIGZhbHNlO1xuICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICB2YXIgYVN0cmluZyA9IE9iamVjdC5wcm90b3R5cGUudG9TdHJpbmcuY2FsbChhKTtcbiAgICAgICAgICAgIGlmIChhU3RyaW5nICE9IE9iamVjdC5wcm90b3R5cGUudG9TdHJpbmcuY2FsbChiKSkge1xuICAgICAgICAgICAgICAgIHJldHVybiBmYWxzZTtcbiAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgaWYgKGFTdHJpbmcgPT0gXCJbb2JqZWN0IEFycmF5XVwiKSB7XG4gICAgICAgICAgICAgICAgaWYgKGEubGVuZ3RoICE9PSBiLmxlbmd0aCkge1xuICAgICAgICAgICAgICAgICAgICByZXR1cm4gZmFsc2U7XG4gICAgICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAgICAgZm9yICh2YXIgaSA9IDAsIGwgPSBhLmxlbmd0aDsgaSA8IGw7IGkgKz0gMSkge1xuICAgICAgICAgICAgICAgICAgICBpZiAoIWRlZXBFcXVhbChhW2ldLCBiW2ldKSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIGZhbHNlO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAgICAgcmV0dXJuIHRydWU7XG4gICAgICAgICAgICB9XG5cbiAgICAgICAgICAgIGlmIChhU3RyaW5nID09IFwiW29iamVjdCBEYXRlXVwiKSB7XG4gICAgICAgICAgICAgICAgcmV0dXJuIGEudmFsdWVPZigpID09PSBiLnZhbHVlT2YoKTtcbiAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgdmFyIHByb3AsIGFMZW5ndGggPSAwLCBiTGVuZ3RoID0gMDtcblxuICAgICAgICAgICAgZm9yIChwcm9wI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hlc1sxXTtcbiAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgcmV0dXJuIG5hbWU7XG4gICAgICAgIH0sXG5cbiAgICAgICAgZnVuY3Rpb25Ub1N0cmluZzogZnVuY3Rpb24gdG9TdHJpbmcoKSB7XG4gICAgICAgICAgICBpZiAodGhpcy5nZXRDYWxsICYmIHRoaXMuY2FsbENvdW50KSB7XG4gICAgICAgICAgICAgICAgdmFyIHRoaXNWYWx1ZSwgcHJvcCwgaSA9IHRoaXMuY2FsbENvdW50O1xuXG4gICAgICAgICAgICAgICAgd2hpbGUgKGktLSkge1xuICAgICAgICAgICAgICAgICAgICB0aGlzVmFsdWUgPSB0aGlzLmdldENhbGwoaSkudGhpc1ZhbHVlO1xuXG4gICAgICAgICAgICAgICAgICAgIGZvciAocHJvcCBpbiB0aGlzVmFsdWUpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGlmICh0aGlzVmFsdWVbcHJvcF0gPT09IHRoaXMpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gcHJvcDtcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgcmV0dXJuIHRoaXMuZGlzcGxheU5hbWUgfHwgXCJzaW5vbiBmYWtlXCI7XG4gICAgICAgIH0sXG5cbiAgICAgICAgZ2V0Q29uZmlnOiBmdW5jdGlvbiAoY3VzdG9tKSB7XG4gICAgICAgICAgICB2YXIgY29uZmlnID0ge307XG4gICAgICAgICAgICBjdXN0b20gPSBjdXN0b20gfHwge307XG4gICAgICAgICAgICB2YXIgZGVmYXVsdHMgPSBzaW5vbi5kZWZhdWx0Q29uZmlnO1xuXG4gICAgICAgICAgICBmb3IgKHZhciBwcm9wIGluIGRlZmF1bHRzKSB7XG4gICAgICAgICAgICAgICAgaWYgKGRlZmF1bHRzLmhhc093blByb3BlcnR5KHByb3ApKSB7XG4gICAgICAgICAgICAgICAgICAgIGNvbmZpZ1twcm9wXSA9IGN1c3RvbS5oYXNPd25Qcm9wZXJ0eShwcm9wKSA/IGN1c3RvbVtwcm9wXSA6IGRlZmF1bHRzW3Byb3BdO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgcmV0dXJuIGNvbmZpZztcbiAgICAgICAgfSxcblxuICAgICAgICBmb3JtYXQ6IGZ1bmN0aW9uICh2YWwpIHtcbiAgICAgICAgICAgIHJldHVybiBcIlwiICsgdmFsO1xuICAgICAgICB9LFxuXG4gICAgICAgIGRlZmF1bHRDb25maWc6IHtcbiAgICAgICAgICAgIGluamVjdEludG9UaGlzOiB0cnVlLFxuICAgICAgICAgICAgaW5qZWN0SW50bzogbnVsbCxcbiAgICAgICAgICAgIHByb3BlcnRpZXM6IFtcInNweVwiLCBcInN0dWJcIiwgXCJtb2NrXCIsIFwiY2xvY2tcIiwgXCJzZXJ2ZXJcIiwgXCJyZXF1ZXN0c1wiXSxcbiAgICAgICAgICAgIHVzZUZha2VUaW1lcnM6IHRydWUsXG4gICAgICAgICAgICB1c2VGYWtlU2VydmVyOiB0cnVlXG4gICAgICAgIH0sXG5cbiAgICAgICAgdGltZXNJbldvcmRzOiBmdW5jdGlvbiB0aW1lc0luV29yZHMoY291bnQpIHtcbiAgICAgICAgICAgIHJldHVybiBjb3VudCA9PSAxICYmIFwib25jZVwiIHx8XG4gICAgICAgICAgICAgICAgY291bnQgPT0gMiAmJiBcInR3aWNlXCIgfHxcbiAgICAgICAgICAgICAgICBjb3VudCA9PSAzICYmIFwidGhyaWNlXCIgfHxcbiAgICAgICAgICAgICAgICAoY291bnQgfHwgMCkgKyBcIiB0aW1lc1wiO1xuICAgICAgICB9LFxuXG4gICAgICAgIGNhbGxlZEluT3JkZXI6IGZ1bmN0aW9uIChzcGllcykge1xuICAgICAgICAgICAgZm9yICh2YXIgaSA9IDEsIGwgPSBzcGllcy5sZW5ndGg7IGkgPCBsOyBpKyspIHtcbiAgICAgICAgICAgICAgICBpZiAoIXNwaWVzW2kgLSAxXS5jYWxsZWRCZWZvcmUoc3BpZXNbaV0pIHx8ICFzcGllc1tpXS5jYWxsZWQpIHtcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIGZhbHNlO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgcmV0dXJuIHRydWU7XG4gICAgICAgIH0sXG5cbiAgICAgICAgb3JkZXJCeUZpcnN0Q2FsbDogZnVuY3Rpb24gKHNwaWVzKSB7XG4gICAgICAgICAgICByZXR1cm4gc3BpZXMuc29ydChmdW5jdGlvbiAoYSwgYikge1xuICAgICAgICAgICAgICAgIC8vIHV1aWQsIHdvbid0IGV2ZXIgYmUgZXF1YWxcbiAgICAgICAgICAgICAgICB2YXIgYUNhbGwgPSBhLmdldENhbGwoMCk7XG4gICAgICAgICAgICAgICAgdmFyIGJDYWxsID0gYi5nZXRDYWxsKDApO1xuICAgICAgICAgICAgICAgIHZhciBhSWQgPSBhQ2FsbCAmJiBhQ2FsbC5jYWxsSWQgfHwgLTE7XG4gICAgICAgICAgICAgICAgdmFyIGJJZCA9IGJDYWxsICYmIGJDYWxsLmNhbGxJZCB8fCAtMTtcblxuICAgICAgICAgICAgICAgIHJldHVybiBhSWQgPCBiSWQgPyAtMSA6IDE7XG4gICAgICAgICAgICB9KTtcbiAgICAgICAgfSxcblxuICAgICAgICBsb2c6IGZ1bmN0aW9uICgpIHt9LFxuXG4gICAgICAgIGxvZ0Vycm9yOiBmdW5jdGlvbiAobGFiZWwsIGVycikge1xuICAgICAgICAgICAgdmFyIG1zZyA9IGxhYmVsICsgXCIgdGhyZXcgZXhjZXB0aW9uOiBcIlxuICAgICAgICAgICAgc2lub24ubG9nKG1zZyArIFwiW1wiICsgZXJyLm5hbWUgKyBcIl0gXCIgKyBlcnIubWVzc2FnZSk7XG4gICAgICAgICAgICBpZiAoZXJyLnN0YWNrKSB7IHNpbm9uLmxvZyhlcnIuc3RhY2spOyB9XG5cbiAgICAgICAgICAgIHNldFRpbWVvdXQoZnVuY3Rpb24gKCkge1xuICAgICAgICAgICAgICAgIGVyci5tZXNzYWdlID0gbXNnICsgZXJyLm1lc3NhZ2U7XG4gICAgICAgICAgICAgICAgdGhyb3cgZXJyO1xuICAgICAgICAgICAgfSwgMCk7XG4gICAgICAgIH0sXG5cbiAgICAgICAgdHlwZU9mOiBmdW5jdGlvbiAodmFsdWUpIHtcbiAgICAgICAgICAgIGlmICh2YWx1ZSA9PT0gbnVsbCkge1xuICAgICAgICAgICAgICAgIHJldHVybiBcIm51bGxcIjtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGVsc2UgaWYgKHZhbHVlID09PSB1bmRlZmluZWQpIHtcbiAgICAgICAgICAgICAgICByZXR1cm4gXCJ1bmRlZmluZWRcIjtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIHZhciBzdHJpbmcgPSBPYmplY3QucHJvdG90eXBlLnRvU3RyaW5nLmNhbGwodmFsdWUpO1xuICAgICAgICAgICAgcmV0dXJuIHN0cmluZy5zdWJzdHJpbmcoOCwgc3RyaW5nLmxlbmd0aCAtIDEpLnRvTG93ZXJDYXNlKCk7XG4gICAgICAgIH0sXG5cbiAgICAgICAgY3JlYXRlU3R1Ykluc3RhbmNlOiBmdW5jdGlvbiAoY29uc3RydWN0b3IpIHtcbiAgICAgICAgICAgIGlmICh0eXBlb2YgY29uc3RydWN0b3IgIT09IFwiZnVuY3Rpb25cIikge1xuICAgICAgICAgICAgICAgIHRocm93IG5ldyBUeXBlRXJyb3IoXCJUaGUgY29uc3RydWN0b3Igc2hvdWxkIGJlIGEgZnVuY3Rpb24uXCIpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgcmV0dXJuIHNpbm9uLnN0dWIoc2lub24uY3JlYXRlKGNvbnN0cnVjdG9yLnByb3RvdHlwZSkpO1xuICAgICAgICB9LFxuXG4gICAgICAgIHJlc3RvcmU6IGZ1bmN0aW9uIChvYmplY3QpIHtcbiAgICAgICAgICAgIGlmIChvYmplY3QgIT09IG51bGwgJiYgdHlwZW9mIG9iamVjdCA9PT0gXCJvYmplY3RcIikge1xuICAgICAgICAgICAgICAgIGZvciAodmFyIHByb3AgaW4gb2JqZWN0KSB7XG4gICAgICAgICAgICAgICAgICAgIGlmIChpc1Jlc3RvcmFibGUob2JqZWN0W3Byb3BdKSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgb2JqZWN0W3Byb3BdLnJlc3RvcmUoKTtcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGVsc2UgaWYgKGlzUmVzdG9yYWJsZShvYmplY3QpKSB7XG4gICAgICAgICAgICAgICAgb2JqZWN0LnJlc3RvcmUoKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgfVxuICAgIH07XG5cbiAgICB2YXIgaXNOb2RlID0gdHlwZW9mIG1vZHVsZSA9PSBcIm9iamVjdFwiICYmIHR5cGVvZiByZXF1aXJlID09IFwiZnVuY3Rpb25cIjtcblxuICAgIGlmIChpc05vZGUpIHtcbiAgICAgICAgdHJ5IHtcbiAgICAgICAgICAgIGJ1c3RlciA9IHsgZm9ybWF0OiByZXF1aXJlKFwiYnVzdGVyLWZvcm1hdFwiKSB9O1xuICAgICAgICB9IGNhdGNoIChlKSB7fVxuICAgICAgICBtb2R1bGUuZXhwb3J0cyA9IHNpbm9uO1xuICAgICAgICBtb2R1bGUuZXhwb3J0cy5zcHkgPSByZXF1aXJlKFwiLi9zaW5vbi9zcHlcIik7XG4gICAgICAgIG1vZHVsZS5leHBvcnRzLnN0dWIgPSByZXF1aXJlKFwiLi9zaW5vbi9zdHViXCIpO1xuICAgICAgICBtb2R1bGUuZXhwb3J0cy5tb2NrID0gcmVxdWlyZShcIi4vc2lub24vbW9ja1wiKTtcbiAgICAgICAgbW9kdWxlLmV4cG9ydHMuY29s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yeSB7XG4gICAgICAgICAgICAgICAgICAgIGV4cGVjdGVkID0gW10uam9pbi5jYWxsKGFyZ3VtZW50cywgXCIsIFwiKTtcbiAgICAgICAgICAgICAgICAgICAgdmFyIGNhbGxzID0gc2xpY2UuY2FsbChhcmd1bWVudHMpO1xuICAgICAgICAgICAgICAgICAgICB2YXIgaSA9IGNhbGxzLmxlbmd0aDtcbiAgICAgICAgICAgICAgICAgICAgd2hpbGUgKGkpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGlmICghY2FsbHNbLS1pXS5jYWxsZWQpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBjYWxscy5zcGxpY2UoaSwgMSk7XG4gICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgYWN0dWFsID0gc2lub24ub3JkZXJCeUZpcnN0Q2FsbChjYWxscykuam9pbihcIiwgXCIpO1xuICAgICAgICAgICAgICAgIH0gY2F0Y2ggKGUpIHtcbiAgICAgICAgICAgICAgICAgICAgLy8gSWYgdGhpcyBmYWlscywgd2UnbGwganVzdCBmYWxsIGJhY2sgdG8gdGhlIGJsYW5rIHN0cmluZ1xuICAgICAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgICAgIGZhaWxBc3NlcnRpb24odGhpcywgXCJleHBlY3RlZCBcIiArIGV4cGVjdGVkICsgXCIgdG8gYmUgXCIgK1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXCJjYWxsZWQgaW4gb3JkZXIgYnV0IHdlcmUgY2FsbGVkIGFzIFwiICsgYWN0dWFsKTtcbiAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgYXNzZXJ0LnBhc3MoXCJjYWxsT3JkZXJcIik7XG4gICAgICAgICAgICB9XG4gICAgICAgIH0sXG5cbiAgICAgICAgY2FsbENvdW50OiBmdW5jdGlvbiBhc3NlcnRDYWxsQ291bnQobWV0aG9kLCBjb3VudCkge1xuICAgICAgICAgICAgdmVyaWZ5SXNTdHViKG1ldGhvZCk7XG5cbiAgICAgICAgICAgIGlmIChtZXRob2QuY2FsbENvdW50ICE9IGNvdW50KSB7XG4gICAgICAgICAgICAgICAgdmFyIG1zZyA9IFwiZXhwZWN0ZWQgJW4gdG8gYmUgY2FsbGVkIFwiICsgc2lub24udGltZXNJbldvcmRzKGNvdW50KSArXG4gICAgICAgICAgICAgICAgICAgIFwiIGJ1dCB3YXMgY2FsbGVkICVjJUNcIjtcbiAgICAgICAgICAgICAgICBmYWlsQXNzZXJ0aW9uKHRoaXMsIG1ldGhvZC5wcmludGYobXNnKSk7XG4gICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgIGFzc2VydC5wYXNzKFwiY2FsbENvdW50XCIpO1xuICAgICAgICAgICAgfVxuICAgICAgICB9LFxuXG4gICAgICAgIGV4cG9zZTogZnVuY3Rpb24gZXhwb3NlKHRhcmdldCwgb3B0aW9ucykge1xuICAgICAgICAgICAgaWYgKCF0YXJnZXQpIHtcbiAgICAgICAgICAgICAgICB0aHJvdyBuZXcgVHlwZUVycm9yKFwidGFyZ2V0IGlzIG51bGwgb3IgdW5kZWZpbmVkXCIpO1xuICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICB2YXIgbyA9IG9wdGlvbnMgfHwge307XG4gICAgICAgICAgICB2YXIgcHJlZml4ID0gdHlwZW9mIG8ucHJlZml4ID09IFwidW5kZWZpbmVkXCIgJiYgXCJhc3NlcnRcIiB8fCBvLnByZWZpeDtcbiAgICAgICAgICAgIHZhciBpbmNsdWRlRmFpbCA9IHR5cGVvZiBvLmluY2x1ZGVGYWlsID09IFwidW5kZWZpbmVkXCIgfHwgISFvLmluY2x1ZGVGYWlsO1xuXG4gICAgICAgICAgICBmb3IgKHZhciBtZXRob2QgaW4gdGhpcykge1xuICAgICAgICAgICAgICAgIGlmIChtZXRob2QgIT0gXCJleHBvcnRcIiAmJiAoaW5jbHVkZUZhaWwgfHwgIS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ZFJlc3RvcmUoKSB7XG4gICAgICAgICAgICB2YXIgZXhjZXB0aW9uO1xuXG4gICAgICAgICAgICB0cnkge1xuICAgICAgICAgICAgICAgIHRoaXMudmVyaWZ5KCk7XG4gICAgICAgICAgICB9IGNhdGNoIChlKSB7XG4gICAgICAgICAgICAgICAgZXhjZXB0aW9uID0gZTtcbiAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgdGhpcy5yZXN0b3JlKCk7XG5cbiAgICAgICAgICAgIGlmIChleGNlcHRpb24pIHtcbiAgICAgICAgICAgICAgICB0aHJvdyBleGNlcHRpb247XG4gICAgICAgICAgICB9XG4gICAgICAgIH0sXG5cbiAgICAgICAgYWRkOiBmdW5jdGlvbiBhZGQoZmFrZSkge1xuICAgICAgICAgICAgcHVzaC5jYWxsKGdldEZha2VzKHRoaXMpLCBmYWtlKTtcbiAgICAgICAgICAgIHJldHVybiBmYWtlO1xuICAgICAgICB9LFxuXG4gICAgICAgIHNweTogZnVuY3Rpb24gc3B5KCkge1xuICAgICAgICAgICAgcmV0dXJuIHRoaXMuYWRkKHNpbm9uLnNweS5hcHBseShzaW5vbiwgYXJndW1lbnRzKSk7XG4gICAgICAgIH0sXG5cbiAgICAgICAgc3R1YjogZnVuY3Rpb24gc3R1YihvYmplY3QsIHByb3BlcnR5LCB2YWx1ZSkge1xuICAgICAgICAgICAgaWYgKHByb3BlcnR5KSB7XG4gICAgICAgICAgICAgICAgdmFyIG9yaWdpbmFsID0gb2JqZWN0W3Byb3BlcnR5XTtcblxuICAgICAgICAgICAgICAgIGlmICh0eXBlb2Ygb3JpZ2luYWwgIT0gXCJmdW5jdGlvblwiKSB7XG4gICAgICAgICAgICAgICAgICAgIGlmICghaGFzT3duUHJvcGVydHkuY2FsbChvYmplY3QsIHByb3BlcnR5KSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgdGhyb3cgbmV3IFR5cGVFcnJvcihcIkNhbm5vdCBzdHViIG5vbi1leGlzdGVudCBvd24gcHJvcGVydHkgXCIgKyBwcm9wZXJ0eSk7XG4gICAgICAgICAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgICAgICAgICBvYmplY3RbcHJvcGVydHldID0gdmFsdWU7XG5cbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHRoaXMuYWRkKHtcbiAgICAgICAgICAgICAgICAgICAgICAgIHJlc3RvcmU6IGZ1bmN0aW9uICgpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBvYmplY3RbcHJvcGVydHldID0gb3JpZ2luYWw7XG4gICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIH0pO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGlmICghcHJvcGVydHkgJiYgISFvYmplY3QgJiYgdHlwZW9mIG9iamVjdCA9PSBcIm9iamVjdFwiKSB7XG4gICAgICAgICAgICAgICAgdmFyIHN0dWJiZWRPYmogPSBzaW5vbi5zdHViLmFwcGx5KHNpbm9uLCBhcmd1bWVudHMpO1xuXG4gICAgICAgICAgICAgICAgZm9yICh2YXIgcHJvcCBpbiBzdHViYmVkT2JqKSB7XG4gICAgICAgICAgICAgICAgICAgIGlmICh0eXBlb2Ygc3R1YmJlZE9ialtwcm9wXSA9PT0gXCJmdW5jdGlvblwiKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICB0aGlzLmFkZChzdHViYmVkT2JqW3Byb3BdKTtcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgICAgIHJldHVybiBzdHViYmVkT2JqO1xuICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICByZXR1cm4gdGhpcy5hZGQoc2lub24uc3R1Yi5hcHBseShzaW5vbiwgYXJndW1lbnRzKSk7XG4gICAgICAgIH0sXG5cbiAgICAgICAgbW9jazogZnVuY3Rpb24gbW9jaygpIHtcbiAgICAgICAgICAgIHJldHVybiB0aGlzLmFkZChzaW5vbi5tb2N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mN0aW9uIG1hdGNoT2JqZWN0KGV4cGVjdGF0aW9uLCBhY3R1YWwpIHtcbiAgICAgICAgaWYgKGFjdHVhbCA9PT0gbnVsbCB8fCBhY3R1YWwgPT09IHVuZGVmaW5lZCkge1xuICAgICAgICAgICAgcmV0dXJuIGZhbHNlO1xuICAgICAgICB9XG4gICAgICAgIGZvciAodmFyIGtleSBpbiBleHBlY3RhdGlvbikge1xuICAgICAgICAgICAgaWYgKGV4cGVjdGF0aW9uLmhhc093blByb3BlcnR5KGtleSkpIHtcbiAgICAgICAgICAgICAgICB2YXIgZXhwID0gZXhwZWN0YXRpb25ba2V5XTtcbiAgICAgICAgICAgICAgICB2YXIgYWN0ID0gYWN0dWFsW2tleV07XG4gICAgICAgICAgICAgICAgaWYgKG1hdGNoLmlzTWF0Y2hlcihleHApKSB7XG4gICAgICAgICAgICAgICAgICAgIGlmICghZXhwLnRlc3QoYWN0KSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIGZhbHNlO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgfSBlbHNlIGlmIChzaW5vbi50eXBlT2YoZXhwKSA9PT0gXCJvYmplY3RcIikge1xuICAgICAgICAgICAgICAgICAgICBpZiAoIW1hdGNoT2JqZWN0KGV4cCwgYWN0KSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIGZhbHNlO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgfSBlbHNlIGlmICghc2lub24uZGVlcEVxdWFsKGV4cCwgYWN0KSkge1xuICAgICAgICAgICAgICAgICAgICByZXR1cm4gZmFsc2U7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfVxuICAgICAgICB9XG4gICAgICAgIHJldHVybiB0cnVlO1xuICAgIH1cblxuICAgIG1hdGNoZXIub3IgPSBmdW5jdGlvbiAobTIpIHtcbiAgICAgICAgaWYgKCFpc01hdGNoZXIobTIpKSB7XG4gICAgICAg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ICB2YXIgdHlwZSA9IHNpbm9uLnR5cGVPZihleHBlY3RhdGlvbik7XG4gICAgICAgIHN3aXRjaCAodHlwZSkge1xuICAgICAgICBjYXNlIFwib2JqZWN0XCI6XG4gICAgICAgICAgICBpZiAodHlwZW9mIGV4cGVjdGF0aW9uLnRlc3QgPT09IFwiZnVuY3Rpb25cIikge1xuICAgICAgICAgICAgICAgIG0udGVzdCA9IGZ1bmN0aW9uIChhY3R1YWwpIHtcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIGV4cGVjdGF0aW9uLnRlc3QoYWN0dWFsKSA9PT0gdHJ1ZTtcbiAgICAgICAgICAgICAgICB9O1xuICAgICAgICAgICAgICAgIG0ubWVzc2FnZSA9IFwibWF0Y2goXCIgKyBzaW5vbi5mdW5jdGlvbk5hbWUoZXhwZWN0YXRpb24udGVzdCkgKyBcIilcIjtcbiAgICAgICAgICAgICAgICByZXR1cm4gbTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIHZhciBzdHIgPSBbXTtcbiAgICAgICAgICAgIGZvciAodmFyIGtleSBpbiBleHBlY3RhdGlvbikge1xuICAgICAgICAgICAgICAgIGlmIChleHBlY3RhdGlvbi5oYXNPd25Qcm9wZXJ0eShrZXkpKSB7XG4gICAgICAgICAgICAgICAgICAgIHN0ci5wdXNoKGtleSArIFwiOiBcIiArIGV4cGVjdGF0aW9uW2tleV0pO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIG0udGVzdCA9IGZ1bmN0aW9uIChhY3R1YWwpIHtcbiAgICAgICAgICAgICAgICByZXR1cm4gbWF0Y2hPYmplY3QoZXhwZWN0YXRpb24sIGFjdHVhbCk7XG4gICAgICAgICAgICB9O1xuICAgICAgICAgICAgbS5tZXNzYWdlID0gXCJtYXRjaChcIiArIHN0ci5qb2luKFwiLCBcIikgKyBcIilcIjtcbiAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICBjYXNlIFwibnVtYmVyXCI6XG4gICAgICAgICAgICBtLnRlc3QgPSBmdW5jdGlvbiAoYWN0dWFsKSB7XG4gICAgICAgICAgICAgICAgcmV0dXJuIGV4cGVjdGF0aW9uID09IGFjdHVhbDtcbiAgICAgICAgICAgIH07XG4gICAgICAgICAgICBicmVhaztcbiAgICAgICAgY2FzZSBcInN0cmluZ1wiOlxuICAgICAgICAgICAgbS50ZXN0ID0gZnVuY3Rpb24gKGFjdHVhbCkge1xuICAgICAgICAgICAgICAgIGlmICh0eXBlb2YgYWN0dWFsICE9PSBcInN0cmluZ1wiKSB7XG4gICAgICAgICAgICAgICAgICAgIHJldHVybiBmYWxzZTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgcmV0dXJuIGFjdHVhbC5pbmRleE9mKGV4cGVjdGF0aW9uKSAhPT0gLTE7XG4gICAgICAgICAgICB9O1xuICAgICAgICAgICAgbS5tZXNzYWdlID0gXCJtYXRjaChcXFwiXCIgKyBleHBlY3RhdGlvbiArIFwiXFxcIilcIjtcbiAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICBjYXNlIFwicmVnZXhwXCI6XG4gICAgICAgICAgICBtLnRlc3QgPSBmdW5jdGlvbiAoYWN0dWFsKSB7XG4gICAgICAgICAgICAgICAgaWYgKHR5cGVvZiBhY3R1YWwgIT09IFwic3RyaW5nXCIpIHtcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIGZhbHNlO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICByZXR1cm4gZXhwZWN0YXRpb24udGVzdChhY3R1YWwpO1xuICAgICAgICAgICAgfTtcbiAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICBjYXNlIFwiZnVuY3Rpb25cIjpcbiAgICAgICAgICAgIG0udGVzdCA9IGV4cGVjdGF0aW9uO1xuICAgICAgICAgICAgaWYgKG1lc3NhZ2UpIHtcbiAgICAgICAgICAgICAgICBtLm1lc3NhZ2UgPSBtZXNzYWdlO1xuICAgICAgICAgICA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IFwic3RyaW5nXCIsIFwicHJvcGVydHlcIik7XG4gICAgICAgICAgICB2YXIgb25seVByb3BlcnR5ID0gYXJndW1lbnRzLmxlbmd0aCA9PT0gMTtcbiAgICAgICAgICAgIHZhciBtZXNzYWdlID0gbWVzc2FnZVByZWZpeCArIFwiKFxcXCJcIiArIHByb3BlcnR5ICsgXCJcXFwiXCI7XG4gICAgICAgICAgICBpZiAoIW9ubHlQcm9wZXJ0eSkge1xuICAgICAgICAgICAgICAgIG1lc3NhZ2UgKz0gXCIsIFwiICsgdmFsdWU7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBtZXNzYWdlICs9IFwiKVwiO1xuICAgICAgICAgICAgcmV0dXJuIG1hdGNoKGZ1bmN0aW9uIChhY3R1YWwpIHtcbiAgICAgICAgICAgICAgICBpZiAoYWN0dWFsID09PSB1bmRlZmluZWQgfHwgYWN0dWFsID09PSBudWxsIHx8XG4gICAgICAgICAgICAgICAgICAgICAgICAhcHJvcGVydHlUZXN0KGFjdHVhbCwgcHJvcGVydHkpKSB7XG4gICAgICAgICAgICAgICAgICAgIHJldHVybiBmYWxzZTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgcmV0dXJuIG9ubHlQcm9wZXJ0eSB8fCBzaW5vbi5kZWVwRXF1YWwodmFsdWUsIGFjdHVhbFtwcm9wZXJ0eV0pO1xuICAgICAgICAgICAgfSwgbWVzc2FnZSk7XG4gICAgICAgIH07XG4gICAgfVxuXG4gICAgbWF0Y2guaGFzID0gY3JlYXRlUHJvcGVydHlNYXRjaGVyKGZ1bmN0aW9uIChhY3R1YWwsIHByb3BlcnR5KSB7XG4gICAgICAgIGlmICh0eXBlb2YgYWN0dWFsID09PSBcIm9iamVjdFwiKSB7XG4gICAgICAgICAgICByZXR1cm4gcHJvcGVydHkgaW4gYWN0dWFsO1xuICAgICAgICB9XG4gICAgICAgIHJldHVybiBhY3R1YWxbcHJvcGVydHldICE9PSB1bmRlZmluZWQ7XG4gICAg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gICAgICBmb3IgKHZhciBpID0gMCwgbCA9IGNvbGxlY3Rpb24ubGVuZ3RoOyBpIDwgbDsgaSArPSAxKSB7XG4gICAgICAgICAgICAgICAgY2FsbGJhY2soY29sbGVjdGlvbltpXSk7XG4gICAgICAgICAgICB9XG4gICAgICAgIH1cblxuICAgICAgICByZXR1cm4ge1xuICAgICAgICAgICAgY3JlYXRlOiBmdW5jdGlvbiBjcmVhdGUob2JqZWN0KSB7XG4gICAgICAgICAgICAgICAgaWYgKCFvYmplY3QpIHtcbiAgICAgICAgICAgICAgICAgICAgdGhyb3cgbmV3IFR5cGVFcnJvcihcIm9iamVjdCBpcyBudWxsXCIpO1xuICAgICAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgICAgIHZhciBtb2NrT2JqZWN0ID0gc2lub24uZXh0ZW5kKHt9LCBtb2NrKTtcbiAgICAgICAgICAgICAgICBtb2NrT2JqZWN0Lm9iamVjdCA9IG9iamVjdDtcbiAgICAgICAgICAgICAgICBkZWxldGUgbW9ja09iamVjdC5jcmVhdGU7XG5cbiAgICAgICAgICAgICAgICByZXR1cm4gbW9ja09iamVjdDtcbiAgICAgICAgICAgIH0sXG5cbiAgICAgICAgICAgIGV4cGVjdHM6IGZ1bmN0aW9uIGV4cGVjdHMobWV0aG9kKSB7XG4gICAgICAgICAgICAgICAgaWYgKCFtZXRob2QpIHtcbiAgICAgICAgICAgICAgICAgICAgdGhyb3cgbmV3IFR5cGVFcnJvcihcIm1ldGhvZCBpcyBmYWxzeVwiKTtcbiAgICAgICAgICAgICAgICB9XG5cbiAgICAgICAgICAgICAgICBpZiAoIXRoaXMuZXhwZWN0YXRpb25zKSB7XG4gICAgICAgICAgICAgICAgICAgIHRoaXMuZXhwZWN0YXRpb25zID0ge307XG4gICAgICAgICAgICAgICAgICAgIHRoaXMucHJveGllcyA9IFtdO1xuICAgICAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgICAgIGlmICghdGhpcy5leHBlY3RhdGlvbnNbbWV0aG9kXSkge1xuICAgICAgICAgICAgICAgICAgICB0aGlzLmV4cGVjdGF0aW9uc1ttZXRob2RdID0gW107XG4gICAgICAgICAgICAgICAgICAgIHZhciBtb2NrT2JqZWN0ID0gdGhpcztcblxuICAgICAgICAgICAgICAgICAgICBzaW5vbi53cmFwTWV0aG9kKHRoaXMub2JqZWN0LCBtZXRob2QsIGZ1bmN0aW9uICgpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBtb2NrT2JqZWN0Lmludm9rZU1ldGhvZChtZXRob2QsIHRoaXMsIGFyZ3VtZW50cyk7XG4gICAgICAgICAgICAgICAgICAgIH0pO1xuXG4gICAgICAgICAgICAgICAgICAgIHB1c2guY2FsbCh0aGlzLnByb3hpZXMsIG1ldGhvZCk7XG4gICAgICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAgICAgdmFyIGV4cGVjdGF0aW9uID0gc2lub24uZXhwZWN0YXRpb24uY3JlYXRlKG1ldGhvZCk7XG4gICAgICAgICAgICAgICAgcHVzaC5jYWxsKHRoaXMuZXhwZWN0YXRpb25zW21ldGhvZF0sIGV4cGVjdGF0aW9uKTtcblxuICAgICAgICAgICAgICAgIHJldHVybiBleHBlY3RhdGlvbjtcbiAgICAgICAgICAgIH0sXG5cbiAgICAgICAgICAgIHJlc3RvcmU6IGZ1bmN0aW9uIHJlc3RvcmUoKSB7XG4gICAgICAgICAgICAgICAgdmFyIG9iamVjdCA9IHRoaXMub2JqZWN0O1xuXG4gICAgICAgICAgICAgICAgZWFjaCh0aGlzLnByb3hpZXMsIGZ1bmN0aW9uIChwcm94eSkge1xuICAgICAgICAgICAgICAgICAgICBpZiAodHlwZW9mIG9iamVjdFtwcm94eV0ucmVzdG9yZSA9PSBcImZ1bmN0aW9uXCIpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIG9iamVjdFtwcm94eV0ucmVzdG9yZSgpO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgfSk7XG4gICAgICAgICAgICB9LFxuXG4gICAgICAgICAgICB2ZXJpZnk6IGZ1bmN0aW9uIHZlcmlmeSgpIHtcbiAgICAgICAgICAgICAgICB2YXIgZXhwZWN0YXRpb25zID0gdGhpcy5leHBlY3RhdGlvbnMgfHwge307XG4gICAgICAgICAgICAgICAgdmFyIG1lc3NhZ2VzID0gW10sIG1ldCA9IFtdO1xuXG4gICAgICAgICAgICAgICAgZWFjaCh0aGlzLnByb3hpZXMsIGZ1bmN0aW9uIChwcm94eSkge1xuICAgICAgICAgICAgICAgICAgICBlYWNoKGV4cGVjdGF0aW9uc1twcm94eV0sIGZ1bmN0aW9uIChleHBlY3RhdGlvbikge1xuICAgICAgICAgICAgICAgICAgICAgICAgaWYgKCFleHBlY3RhdGlvbi5tZXQoKSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHB1c2guY2FsbChtZXNzYWdlcywgZXhwZWN0YXRpb24udG9TdHJpbmcoKSk7XG4gICAgICAgICAgICAgICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHB1c2guY2FsbChtZXQsIGV4cGVjdGF0aW9uLnRvU3RyaW5nKCkpO1xuICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICB9KTtcbiAgICAgICAgICAgICAgICB9KTtcblxuICAgICAgICAgICAgICAgIHRoaXMucmVzdG9yZSgpO1xuXG4gICAgICAgICAgICAgICAgaWYgKG1lc3NhZ2VzLmxlbmd0aCA+IDApIHtcbiAgICAgICAgICAgICAgICAgICAgc2lub24uZXhwZWN0YXRpb24uZmFpbChtZXNzYWdlcy5jb25jYXQobWV0KS5qb2luKFwiXFxuXCIpKTtcbiAgICAgICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgICAgICBzaW5vbi5leHBlY3RhdGlvbi5wYXNzKG1lc3NhZ2VzLmNvbmNhdChtZXQpLmpvaW4oXCJcXG5cIikpO1xuICAgICAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgICAgIHJldHVybiB0cnVlO1xuICAgICAgICAgICAgfSxcblxuICAgICAgICAgICAgaW52b2tlTWV0aG9kOiBmdW5jdGlvbiBpbnZva2VNZXRob2QobWV0aG9kLCB0aGlzVmFsdWUsIGFyZ3MpIHtcbiAgICAgICAgICAgICAgICB2YXIgZXhwZWN0YXRpb25zID0gdGhpcy5leHBlY3RhdGlvbnMgJiYgdGhpcy5leHBlY3RhdGlvbnNbbWV0aG9kXTtcbiAgICAgICAgICAgICAgICB2YXIgbGVuZ3RoID0gZXhwZWN0YXRpb25zICYmIGV4cGVjdGF0aW9ucy5sZW5ndGggfHwgMCwgaTtcblxuICAgICAgICAgICAgICAgIGZvciAoaSA9IDA7IGkgPCBsZW5ndGg7IGkgKz0gMSkge1xuICAgICAgICAgICAgICAgICAgICBpZiAoIWV4cGVjdGF0aW9uc1tpXS5tZXQoKSAmJlxuICAgICAgICAgICAgICAgICAgICAgICAgZXhwZWN0YXRpb25zW2ldLmFsbG93c0NhbGwodGhpc1ZhbHVlLCBhcmdzKSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIGV4cGVjdGF0aW9uc1tpXS5hcHBseSh0aGlzVmFsdWUsIGFyZ3MpO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAgICAgdmFyIG1lc3NhZ2VzID0gW10sIGF2YWlsYWJsZSwgZXhoYXVzdGVkID0gMDtcblxuICAgICAgICAgICAgICAgIGZvciAoaSA9IDA7IGkgPCBsZW5ndGg7IGkgKz0gMSkge1xuICAgICAgICAgICAgICAgICAgICBpZiAoZXhwZWN0YXRpb25zW2ldLmFsbG93c0NhbGwodGhpc1ZhbHVlLCBhcmdzKSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgYXZhaWxhYmxlID0gYXZhaWxhYmxlIHx8IGV4cGVjdGF0aW9uc1tpXTtcbiAgICAgICAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGV4aGF1c3RlZCArPSAxO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIHB1c2guY2FsbChtZXNzYWdlcywgXCIgICAgXCIgKyBleHBlY3RhdGlvbnNbaV0udG9TdHJpbmcoKSk7XG4gICAgICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAgICAgaWYgKGV4aGF1c3RlZCA9PT0gMCkge1xuICAgICAgICAgICAgICAgICAgICByZXR1cm4gYXZhaWxhYmxlLmFwcGx5KHRoaXNWYWx1ZSwgYXJncyk7XG4gICAgICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAgICAgbWVzc2FnZXMudW5zaGlmdChcIlVuZXhwZWN0ZWQgY2FsbDogXCIgKyBzaW5vbi5zcHlDYWxsLnRvU3RyaW5nLmNhbGwoe1xuICAgICAgICAgICAgICAgICAgICBwcm94eTogbWV0aG9kLFxuICAgICAgICAgICAgICAgICAgICBhcmdzOiBhcmdzXG4gICAgICAgICAgICAgICAgfSkpO1xuXG4gICAgICAgICAgICAgICAgc2lub24uZXhwZWN0YXRpb24uZmFpbChtZXNzYWdlcy5qb2luKFwiXFxuXCIpKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgfTtcbiAgICB9KCkpKTtcblxuICAgIHZhciB0aW1lcyA9IHNpbm9uLnRpbWVzSW5Xb3JkcztcblxuICAgIHNpbm9uLmV4cGVjdGF0aW9uID0gKGZ1bmN0aW9uICgpIHtcbiAgICAgICAgdmFyIHNsaWNlID0gQXJyYXkucHJvdG90eXBlLnNsaWNlO1xuICAgICAgICB2YXIgX2ludm9rZSA9IHNpbm9uLnNweS5pbnZva2U7XG5cbiAgICAgICAgZnVuY3Rpb24gY2FsbENvdW50SW5Xb3JkcyhjYWxsQ291bnQpIHtcbiAgICAgICAgICAgIGlmIChjYWxsQ291bnQgPT0gMCkge1xuICAgICAgICAgICAgICAgIHJldHVybiBcIm5ldmVyIGNhbGxlZFwiO1xuICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICByZXR1cm4gXCJjYWxsZWQgXCIgKyB0aW1lcyhjYWxsQ291bnQpO1xuICAgICAgICAgICAgfVxuICAgICAgICB9XG5cbiAgICAgICAgZnVuY3Rpb24gZXhwZWN0ZWRDYWxsQ291bnRJbldvcmRzKGV4cGVjdGF0aW9uKSB7XG4gICAgICAgICAgICB2YXIgbWluID0gZXhwZWN0YXRpb24ubWluQ2FsbHM7XG4gICAgICAgICAgICB2YXIgbWF4ID0gZXhwZWN0YXRpb24ubWF4Q2FsbHM7XG5cbiAgICAgICAgICAgIGlmICh0eXBlb2YgbWluID09IFwibnVtYmVyXCIgJiYgdHlwZW9mIG1heCA9PSBcIm51bWJlclwiKSB7XG4gICAgICAgICAgICAgICAgdmFyIHN0ciA9IHRpbWVzKG1pbik7XG5cbiAgICAgICAgICAgICAgICBpZiAobWluICE9IG1heCkge1xuICAgICAgICAgICAgICAgICAgICBzdHIgPSBcImF0IGxlYXN0IFwiICsgc3RyICsgXCIgYW5kIGF0IG1vc3QgXCIgKyB0aW1lcyhtYXgpO1xuICAgICAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgICAgIHJldHVybiBzdHI7XG4gICAgICAgICAgICB9XG5cbiAgICAgICAgICAgIGlmICh0eXBlb2YgbWluID09IFwibnVtYmVyXCIpIHtcbiAgICAgICAgICAgICAgICByZXR1cm4gXCJhdCBsZWFzdCBcIiArIHRpbWVzKG1pbik7XG4gICAgICAgICAgICB9XG5cbiAgICAgICAgICAgIHJldHVybiBcImF0IG1vc3QgXCIgKyB0aW1lcyhtYXgpO1xuICAgICAgICB9XG5cbiAgICAgICAgZnVuY3Rpb24gcmVjZWl2ZWRNaW5DYWxscyhleHBlY3RhdGlvbikge1xuICAgICAgICAgICAgdmFyIGhhc01pbkxpbWl0ID0gdHlwZW9mIGV4cGVjdGF0aW9uLm1pbkNhbGxzID09IFwibnVtYmVyXCI7XG4gICAgICAgICAgICByZXR1cm4gIWhhc01pbkxpbWl0IHx8IGV4cGVjdGF0aW9uLmNhbGxDb3VudCA+PSBleHBlY3RhdGlvbi5taW5DYWxscztcbiAgICAgICAgfVxuXG4gICAgICAgIGZ1bmN0aW9uIHJlY2VpdmVkTWF4Q2FsbHMoZXhwZWN0YXRpb24pIHtcbiAgICAgICAgICAgIGlmICh0eXBlb2YgZXhwZWN0YXRpb24ubWF4Q2FsbHMgIT0gXCJudW1iZXJcIikge1xuICAgICAgICAgICAgICAgIHJldHVybiBmYWxzZTtcbiAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgcmV0dXJuIGV4cGVjdGF0aW9uLmNhbGxDb3VudCA9PSBleHBlY3RhdGlvbi5tYXhDYWxscztcbiAgICAgICAgfVxuXG4gICAgICAgIHJldHVybiB7XG4gICAgICAgICAgICBtaW5DYWxsczogMSxcbiAgICAgICAgICAgIG1heENhbGxzOiAxLFxuXG4gICAgICAgICAgICBjcmVhdGU6IGZ1bmN0aW9uIGNyZWF0ZShtZXRob2ROYW1lKSB7XG4gICAgICAgICAgICAgICAgdmFyIGV4cGVjdGF0aW9uID0gc2lub24uZXh0ZW5kKHNpbm9uLnN0dWIuY3JlYXRlKCksIHNpbm9uLmV4cGVjdGF0aW9uKTtcbiAgICAgICAgICAgICAgICBkZWxldGUgZXhwZWN0YXRpb24uY3JlYXRlO1xuICAgICAgICAgICAgICAgIGV4cGVjdGF0aW9uLm1ldGhvZCA9IG1ldGhvZE5hbWU7XG5cbiAgICAgICAgICAgICAgICByZXR1cm4gZXhwZWN0YXRpb247XG4gICAgICAgICAgICB9LFxuXG4gICAgICAgICAgICBpbnZva2U6IGZ1bmN0aW9uIGludm9rZShmdW5jLCB0aGlzVmFsdWUsIGFyZ3MpIHtcbiAgICAgICAgICAgICAgICB0aGlzLnZlcmlmeUNhbGxBbGxvd2VkKHRoaXNWYWx1ZSwgYXJncyk7XG5cbiAgICAgICAgICAgICAgICByZXR1cm4gX2ludm9rZS5hcHBseSh0aGlzLCBhcmd1bWVudHMpO1xuICAgICAgICAgICAgfSxcblxuICAgICAgICAgICAgYXRMZWFzdDogZnVuY3Rpb24gYXRMZWFzdChudW0pIHtcbiAgICAgICAgICAgICAgICBpZiAodHlwZW9mIG51bSAhPSBcIm51bWJlclwiKSB7XG4gICAgICAgICAgICAgICAgICAgIHRocm93IG5ldyBUeXBlRXJyb3IoXCInXCIgKyBudW0gKyBcIicgaXMgbm90IG51bWJlclwiKTtcbiAgICAgICAgICAgICAgICB9XG5cbiAgICAgICAgICAgICAgICBpZiAoIXRoaXMubGltaXRzU2V0KSB7XG4gICAgICAgICAgICAgICAgICAgIHRoaXMubWF4Q2FsbHMgPSBudWxsO1xuICAgICAgICAgICAgICAgICAgICB0aGlzLmxpbWl0c1NldCA9IHRydWU7XG4gICAgICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAgICAgdGhpcy5taW5DYWxscyA9IG51bTtcblxuICAgICAgICAgICAgICAgIHJldHVybiB0aGlzO1xuICAgICAgICAgICAgfSxcblxuICAgICAgICAgICAgYXRNb3N0OiBmdW5jdGlvbiBhdE1vc3QobnVtKSB7XG4gICAgICAgICAgICAgICAgaWYgKHR5cGVvZiBudW0gIT0gXCJudW1iZXJcIikge1xuICAgICAgICAgICAgICAgICAgICB0aHJvdyBuZXcgVHlwZUVycm9yKFwiJ1wiICsgbnVtICsgXCInIGlzIG5vdCBudW1iZXJcIik7XG4gICAgICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAgICAgaWYgKCF0aGlzLmxpbWl0c1NldCkge1xuICAgICAgICAgICAgICAgICAgICB0aGlzLm1pbkNhbGxzID0gbnVsbDtcbiAgICAgICAgICAgICAgICAgICAgdGhpcy5saW1pdHNTZXQgPSB0cnVlO1xuICAgICAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgICAgIHRoaXMubWF4Q2FsbHMgPSBudW07XG5cbiAgICAgICAgICAgICAgICByZXR1cm4gdGhpcztcbiAgICAgICAgICAgIH0sXG5cbiAgICAgICAgICAgIG5ldmVyOiBmdW5jdGlvbiBuZXZlcigpIHtcbiAgICAgICAgICAgICAgICByZXR1cm4gdGhpcy5leGFjdGx5KDApO1xuICAgICAgICAgICAgfSxcblxuICAgICAgICAgICAgb25jZTogZnVuY3Rpb24gb25jZSgpIHtcbiAgICAgICAgICAgICAgICByZXR1cm4gdGhpcy5leGFjdGx5KDEpO1xuICAgICAgICAgICAgfSxcblxuICAgICAgICAgICAgdHdpY2U6IGZ1bmN0aW9uIHR3aWNlKCkge1xuICAgICAgICAgICAgICAgIHJldHVybiB0aGlzLmV4YWN0bHkoMik7XG4gICAgICAgICAgICB9LFxuXG4gICAgICAgICAgICB0aHJpY2U6IGZ1bmN0aW9uIHRocmljZSgpIHtcbiAgICAgICAgICAgICAgICByZXR1cm4gdGhpcy5leGFjdGx5KDMpO1xuICAgICAgICAgICAgfSxcblxuICAgICAgICAgICAgZXhhY3RseTogZnVuY3Rpb24gZXhhY3RseShudW0pIHtcbiAgICAgICAgICAgICAgICBpZiAodHlwZW9mIG51bSAhPSBcIm51bWJlclwiKSB7XG4gICAgICAgICAgICAgICAgICAgIHRocm93IG5ldyBUeXBlRXJyb3IoXCInXCIgKyBudW0gKyBcIicgaXMgbm90IGEgbnVtYmVyXCIpO1xuICAgICAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgICAgIHRoaXMuYXRMZWFzdChudW0pO1xuICAgICAgICAgICAgICAgIHJldHVybiB0aGlzLmF0TW9zdChudW0pO1xuICAgICAgICAgICAgfSxcblxuICAgICAgICAgICAgbWV0OiBmdW5jdGlvbiBtZXQoKSB7XG4gICAgICAgICAgICAgICAgcmV0dXJuICF0aGlzLmZhaWxlZCAmJiByZWNlaXZlZE1pbkNhbGxzKHRoaXMpO1xuICAgICAgICAgICAgfSxcblxuICAgICAgICAgICAgdmVyaWZ5Q2FsbEFsbG93ZWQ6IGZ1bmN0aW9uIHZlcmlmeUNhbGxBbGxvd2VkKHRoaXNWYWx1ZSwgYXJncykge1xuICAgICAgICAgICAgICAgIGlmIChyZWNlaXZlZE1heENhbGxzKHRoaXMpKSB7XG4gICAgICAgICAgICAgICAgICAgIHRoaXMuZmFpbGVkID0gdHJ1ZTtcbiAgICAgICAgICAgICAgICAgICAgc2lub24uZXhwZWN0YXRpb24uZmFpbCh0aGlzLm1ldGhvZCArIFwiIGFscmVhZHkgY2FsbGVkIFwiICsgdGltZXModGhpcy5tYXhDYWxscykpO1xuICAgICAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgICAgIGlmIChcImV4cGVjdGVkVGhpc1wiIGluIHRoaXMgJiYgdGhpcy5leHBlY3RlZFRoaXMgIT09IHRoaXNWYWx1ZSkge1xuICAgICAgICAgICAgICAgICAgICBzaW5vbi5leHBlY3RhdGlvbi5mYWlsKHRoaXMubWV0aG9kICsgXCIgY2FsbGVkIHdpdGggXCIgKyB0aGlzVmFsdWUgKyBcIiBhcyB0aGlzVmFsdWUsIGV4cGVjdGVkIFwiICtcbiAgICAgICAgICAgICAgICAgICAgICAgIHRoaXMuZXhwZWN0ZWRUaGlzKTtcbiAgICAgICAgICAgICAgICB9XG5cbiAgICAgICAgICAgICAgICBpZiAoIShcImV4cGVjdGVkQXJndW1lbnRzXCIgaW4gdGhpcykpIHtcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuO1xuICAgICAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgICAgIGlmICghYXJncykge1xuICAgICAgICAgICAgICAgICAgICBzaW5vbi5leHBlY3RhdGlvbi5mYWlsKHRoaXMubWV0aG9kICsgXCIgcmVjZWl2ZWQgbm8gYXJndW1lbnRzLCBleHBlY3RlZCBcIiArXG4gICAgICAgICAgICAgICAgICAgICAgICBzaW5vbi5mb3JtYXQodGhpcy5leHBlY3RlZEFyZ3VtZW50cykpO1xuICAgICAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgICAgIGlmIChhcmdzLmxlbmd0aCA8IHRoaXMuZXhwZWN0ZWRBcmd1bWVudHMubGVuZ3RoKSB7XG4gICAgICAgICAgICAgICAgICAgIHNpbm9uLmV4cGVjdGF0aW9uLmZhaWwodGhpcy5tZXRob2QgKyBcIiByZWNlaXZlZCB0b28gZmV3IGFyZ3VtZW50cyAoXCIgKyBzaW5vbi5mb3JtYXQoYXJncykgK1xuICAgICAgICAgICAgICAgICAgICAgICAgXCIpLCBleHBlY3RlZCBcIiArIHNpbm9uLmZvcm1hdCh0aGlzLmV4cGVjdGVkQXJndW1lbnRzKSk7XG4gICAgICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAgICAgaWYgKHRoaXMuZXhwZWN0c0V4YWN0QXJnQ291bnQgJiZcbiAgICAgICAgICAgICAgICAgICAgYXJncy5sZW5ndGggIT0gdGhpcy5leHBlY3RlZEFyZ3VtZW50cy5sZW5ndGgpIHtcbiAgICAgICAgICAgICAgICAgICAgc2lub24uZXhwZWN0YXRpb24uZmFpbCh0aGlzLm1ldGhvZCArIFwiIHJlY2VpdmVkIHRvbyBtYW55IGFyZ3VtZW50cyAoXCIgKyBzaW5vbi5mb3JtYXQoYXJncykgK1xuICAgICAgICAgICAgICAgICAgICAgICAgXCIpLCBleHBlY3RlZCBcIiArIHNpbm9uLmZvcm1hdCh0aGlzLmV4cGVjdGVkQXJndW1lbnRzKSk7XG4gICAgICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAgICAgZm9yICh2YXIgaSA9IDAsIGwgPSB0aGlzLmV4cGVjdGVkQXJndW1lbnRzLmxlbmd0aDsgaSA8IGw7IGkgKz0gMSkge1xuICAgICAgICAgICAgICAgICAgICBpZiAoIXNpbm9uLmRlZXBFcXVhbCh0aGlzLmV4cGVjdGVkQXJndW1lbnRzW2ldLCBhcmdzW2ldKSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgc2lub24uZXhwZWN0YXRpb24uZmFpbCh0aGlzLm1ldGhvZCArIFwiIHJlY2VpdmVkIHdyb25nIGFyZ3VtZW50cyBcIiArIHNpbm9uLmZvcm1hdChhcmdzKSArXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgXCIsIGV4cGVjdGVkIFwiICsgc2lub24uZm9ybWF0KHRoaXMuZXhwZWN0ZWRBcmd1bWVudHMpKTtcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH0sXG5cbiAgICAgICAgICAgIGFsbG93c0NhbGw6IGZ1bmN0aW9uIGFsbG93c0NhbGwodGhpc1ZhbHVlLCBhcmdzKSB7XG4gICAgICAgICAgICAgICAgaWYgKHRoaXMubWV0KCkgJiYgcmVjZWl2ZWRNYXhDYWxscyh0aGlzKSkge1xuICAgICAgICAgICAgICAgICAgICByZXR1cm4gZmFsc2U7XG4gICAgICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAgICAgaWYgKFwiZXhwZWN0ZWRUaGlzXCIgaW4gdGhpcyAmJiB0aGlzLmV4cGVjdGVkVGhpcyAhPT0gdGhpc1ZhbHVlKSB7XG4gICAgICAgICAgICAgICAgICAgIHJldHVybiBmYWxzZTtcbiAgICAgICAgICAgICAgICB9XG5cbiAgICAgICAgICAgICAgICBpZiAoIShcImV4cGVjdGVkQXJndW1lbnRzXCIgaW4gdGhpcykpIHtcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHRydWU7XG4gICAgICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAgICAgYXJncyA9IGFyZ3MgfHwgW107XG5cbiAgICAgICAgICAgICAgICBpZiAoYXJncy5sZW5ndGggPCB0aGlzLmV4cGVjdGVkQXJndW1lbnRzLmxlbmd0aCkge1xuICAgICAgICAgICAgICAgICAgICByZXR1cm4gZmFsc2U7XG4gICAgICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAgICAgaWYgKHRoaXMuZXhwZWN0c0V4YWN0QXJnQ291bnQgJiZcbiAgICAgICAgICAgICAgICAgICAgYXJncy5sZW5ndGggIT0gdGhpcy5leHBlY3RlZEFyZ3VtZW50cy5sZW5ndGgpIHtcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIGZhbHNlO1xuICAgICAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgICAgIGZvciAodmFyIGkgPSAwLCBsID0gdGhpcy5leHBlY3RlZEFyZ3VtZW50cy5sZW5ndGg7IGkgPCBsOyBpICs9IDEpIHtcbiAgICAgICAgICAgICAgICAgICAgaWYgKCFzaW5vbi5kZWVwRXF1YWwodGhpcy5leHBlY3RlZEFyZ3VtZW50c1tpXSwgYXJnc1tpXSkpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBmYWxzZTtcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgICAgIHJldHVybiB0cnVlO1xuICAgICAgICAgICAgfSxcblxuICAgICAgICAgICAgd2l0aEFyZ3M6IGZ1bmN0aW9uIHdpdGhBcmdzKCkge1xuICAgICAgICAgICAgICAgIHRoaXMuZXhwZWN0ZWRBcmd1bWVudHMgPSBzbGljZS5jYWxsKGFyZ3VtZW50cyk7XG4gICAgICAgICAgICAgICAgcmV0dXJuIHRoaXM7XG4gICAgICAgICAgICB9LFxuXG4gICAgICAgICAgICB3aXRoRXhhY3RBcmdzOiBmdW5jdGlvbiB3aXRoRXhhY3RBcmdzKCkge1xuICAgICAgICAgICAgICAgIHRoaXMud2l0aEFyZ3MuYXBwbHkodGhpcywgYXJndW1lbnRzKTtcbiAgICAgICAgICAgICAgICB0aGlzLmV4cGVjdHNFeGFjdEFyZ0NvdW50ID0gdHJ1ZTtcbiAgICAgICAgICAgICAgICByZXR1cm4gdGhpcztcbiAgICAgICAgICAgIH0sXG5cbiAgICAgICAgICAgIG9uOiBmdW5jdGlvbiBvbih0aGlzVmFsdWUpIHtcbiAgICAgICAgICAgICAgICB0aGlzLmV4cGVjdGVkVGhpcyA9IHRoaXNWYWx1ZTtcbiAgICAgICAgICAgICAgICByZXR1cm4gdGhpcztcbiAgICAgICAgICAgIH0sXG5cbiAgICAgICAgICAgIHRvU3RyaW5nOiBmdW5jdGlvbiAoKSB7XG4gICAgICAgICAgICAgICAgdmFyIGFyZ3MgPSAodGhpcy5leHBlY3RlZEFyZ3VtZW50cyB8fCBbXSkuc2xpY2UoKTtcblxuICAgICAgICAgICAgICAgIGlmICghdGhpcy5leHBlY3RzRXhhY3RBcmdDb3VudCkge1xuICAgICAgICAgICAgICAgICAgICBwdXNoLmNhbGwoYXJncywgXCJbLi4uXVwiKTtcbiAgICAgICAgICAgICAgICB9XG5cbiAgICAgICAgICAgICAgICB2YXIgY2FsbFN0ciA9IHNpbm9uLnNweUNhbGwudG9TdHJpbmcuY2FsbCh7XG4gICAgICAgICAgICAgICAgICAgIHByb3h5OiB0aGlzLm1ldGhvZCB8fCBcImFub255bW91cyBtb2NrIGV4cGVjdGF0aW9uXCIsXG4gICAgICAgICAgICAgICAgICAgIGFyZ3M6IGFyZ3NcbiAgICAgICAgICAgICAgICB9KTtcblxuICAgICAgICAgICAgICAgIHZhciBtZXNzYWdlID0gY2FsbFN0ci5yZXBsYWNlKFwiLCBbLi4uXCIsIFwiWywgLi4uXCIpICsgXCIgXCIgK1xuICAgICAgICAgICAgICAgICAgICBleHBlY3RlZENhbGxDb3VudEluV29yZHModGhpcyk7XG5cbiAgICAgICAgICAgICAgICBpZiAodGhpcy5tZXQoKSkge1xuICAgICAgICAgICAgICAgICAgICByZXR1cm4gXCJFeHBlY3RhdGlvbiBtZXQ6IFwiICsgbWVzc2FnZTtcbiAgICAgICAgICAgICAgICB9XG5cbiAgICAgICAgICAgICAgICByZXR1cm4gXCJFeHBlY3RlZCBcIiArIG1lc3NhZ2UgKyBcIiAoXCIgK1xuICAgICAgICAgICAgICAgICAgICBjYWxsQ291bnRJbldvcmRzKHRoaXMuY2FsbENvdW50KSArIFwiKVwiO1xuICAgICAgICAgICAgfSxcblxuICAgICAgICAgICAgdmVyaWZ5OiBmdW5jdGlvbiB2ZXJpZnkoKSB7XG4gICAgICAgICAgICAgICAgaWYgKCF0aGlzLm1ldCgpKSB7XG4gICAgICAgICAgICAgICAgICAgIHNpbm9uLmV4cGVjdGF0aW9uLmZhaWwodGhpcy50b1N0cmluZygpKTtcbiAgICAgICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgICAgICBzaW5vbi5leHBlY3RhdGlvbi5wYXNzKHRoaXMudG9TdHJpbmcoKSk7XG4gICAgICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAgICAgcmV0dXJuIHRydWU7XG4gICAgICAgICAgICB9LFxuXG4gICAgICAgICAgICBwYXNzOiBmdW5jdGlvbihtZXNzYWdlKSB7XG4gICAgICAgICAgICAgIHNpbm9uLmFzc2VydC5wYXNzKG1lc3NhZ2UpO1xuICAgICAgICAgICAgfSxcbiAgICAgICAgICAgIGZhaWw6IGZ1bmN0aW9uIChtZXNzYWdlKSB7XG4gICAgICAgICAgICAgICAgdmFyIGV4Y2VwdGlvbiA9IG5ldyBFcnJvcihtZXNzYWdlKTtcbiAgICAgICAgICAgICAgICBleGNlcHRpb24ubmFtZSA9IFwiRXhwZWN0YXRpb25FcnJvclwiO1xuXG4gICAgICAgICAgICAgICAgdGhyb3cgZXhjZXB0aW9uO1xuICAgICAgICAgICAgfVxuICAgICAgICB9O1xuICAgIH0oKSk7XG5cbiAgICBpZiAoY29tbW9uSlNNb2R1bGUpIHtcbiAgICAgICAgbW9kdWxlLmV4cG9ydHMgPSBtb2NrO1xuICAgIH0gZWxzZSB7XG4gICAgICAgIHNpbm9uLm1vY2sgPSBtb2NrO1xuICAgIH1cbn0odHlwZW9mIHNpbm9uID09IFwib2JqZWN0XCIgJiYgc2lub24gfHwgbnVsbCkpO1xuIiwiLyoqXG4gKiBAZGVwZW5kIC4uL3Npbm9uLmpzXG4gKiBAZGVwZW5kIGNvbGxlY3Rpb24uanNcbiAqIEBkZXBlbmQgdXRpbC9mYWtlX3RpbWVycy5qc1xuICogQGRlcGVuZCB1dGlsL2Zha2Vfc2VydmVyX3dpdGhfY2xvY2suanNcbiAqL1xuLypqc2xpb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YWxsKHNhbmRib3guYXJncywgdmFsdWUpO1xuICAgICAgICB9XG4gICAgfVxuXG4gICAgZnVuY3Rpb24gcHJlcGFyZVNhbmRib3hGcm9tQ29uZmlnKGNvbmZpZykge1xuICAgICAgICB2YXIgc2FuZGJveCA9IHNpbm9uLmNyZWF0ZShzaW5vbi5zYW5kYm94KTtcblxuICAgICAgICBpZiAoY29uZmlnLnVzZUZha2VTZXJ2ZXIpIHtcbiAgICAgICAgICAgIGlmICh0eXBlb2YgY29uZmlnLnVzZUZha2VTZXJ2ZXIgPT0gXCJvYmplY3RcIikge1xuICAgICAgICAgICAgICAgIHNhbmRib3guc2VydmVyUHJvdG90eXBlID0gY29uZmlnLnVzZUZha2VTZXJ2ZXI7XG4gICAgICAgICAgICB9XG5cbiAgICAgICAgICAgIHNhbmRib3gudXNlRmFrZVNlcnZlcigpO1xuICAgICAgICB9XG5cbiAgICAgICAgaWYgKGNvbmZpZy51c2VGYWtlVGltZXJzKSB7XG4gICAgICAgICAgICBpZiAodHlwZW9mIGNvbmZpZy51c2VGYWtlVGltZXJzID09IFwib2JqZWN0XCIpIHtcbiAgICAgICAgICAgICAgICBzYW5kYm94LnVzZUZha2VUaW1lcnMuYXBwbHkoc2FuZGJveCwgY29uZmlnLnVzZUZha2VUaW1lcnMpO1xuICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICBzYW5kYm94LnVzZUZha2VUaW1lcnMoKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgfVxuXG4gICAgICAgIHJldHVybiBzYW5kYm94O1xuICAgIH1cblxuICAgIHNpbm9uLnNhbmRib3ggPSBzaW5vbi5leHRlbmQoc2lub24uY3JlYXRlKHNpbm9uLmNvbGxlY3Rpb24pLCB7XG4gICAgICAgIHVzZUZha2VUaW1lcnM6IGZ1bmN0aW9uIHVzZUZha2VUaW1lcnMoKSB7XG4gICAgICAgICAgICB0aGlzLmNsb2NrID0gc2lub24udXNlRmFrZVRpbWVycy5hcHBseShzaW5vbiwgYXJndW1lbnRzKTtcblxuICAgICAgICAgICAgcmV0dXJuIHRoaXMuYWRkKHRoaXMuY2xvY2spO1xuICAgICAgICB9LFxuXG4gICAgICAgIHNlcnZlclByb3RvdHlwZTogc2lub24uZmFrZVNlcnZlcixcblxuICAgICAgICB1c2VGYWtlU2VydmVyOiBmdW5jdGlvbiB1c2VGYWtlU2VydmVyKCkge1xuICAgICAgICAgICAgdmFyIHByb3RvID0gdGhpcy5zZXJ2ZXJQcm90b3R5cGUgfHwgc2lub24uZmFrZVNlcnZlcjtcblxuICAgICAgICAgICAgaWYgKCFwcm90byB8fCAhcHJvdG8uY3JlYXRlKSB7XG4gICAgICAgICAgICAgICAgcmV0dXJuIG51bGw7XG4gICAgICAgICAgICB9XG5cbiAgICAgICAgICAgIHRoaXMuc2VydmVyID0gcHJvdG8uY3JlYXRlKCk7XG4gICAgICAgICAgICByZXR1cm4gdGhpcy5hZGQodGhpcy5zZXJ2ZXIpO1xuICAgICAgICB9LFxuXG4gICAgICAgIGluamVjdDogZnVuY3Rpb24gKG9iaikge1xuICAgICAgICAgICAgc2lub24uY29sbGVjdGlvbi5pbmplY3QuY2FsbCh0aGlzLCBvYmopO1xuXG4gICAgICAgICAgICBpZiAodGhpcy5jbG9jaykge1xuICAgICAgICAgICAgICAgIG9iai5jbG9jayA9IHRoaXMuY2xvY2s7XG4gICAgICAgICAgICB9XG5cbiAgICAgICAgICAgIGlmICh0aGlzLnNlcnZlcikge1xuICAgICAgICAgICAgICAgIG9iai5zZXJ2ZXIgPSB0aGlzLnNlcnZlcjtcbiAgICAgICAgICAgICAgICBvYmoucmVxdWVzdHMgPSB0aGlzLnNlcnZlci5yZXF1ZXN0cztcbiAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgcmV0dXJuIG9iajtcbiAgICAgICAgfSxcblxuICAgICAgICBjcmVhdGU6IGZ1bmN0aW9uIChjb25maWcpIHtcbiAgICAgICAgICAgIGlmICghY29uZmlnKSB7XG4gICAgICAgICAgICAgICAgcmV0dXJuIHNpbm9uLmNyZWF0ZShzaW5vbi5zYW5kYm94KTtcbiAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgdmFyIHNhbmRib3ggPSBwcmVwYXJlU2FuZGJveEZyb21Db25maWcoY29uZmlnKTtcbiAgICAgICAgICAgIHNhbmRib3guYXJncyA9IHNhbmRib3guYXJncyB8fCBbXTtcbiAgICAgICAgICAgIHZhciBwcm9wLCB2YWx1ZSwgZXhwb3NlZCA9IHNhbmRib3guaW5qZWN0KHt9KTtcblxuICAgICAgICAgICAgaWYgKGNvbmZpZy5wcm9wZXJ0aWVzKSB7XG4gICAgICAgICAgICAgICAgZm9yICh2YXIgaSA9IDAsIGwgPSBjb25maWcucHJvcGVydGllcy5sZW5ndGg7IGkgPCBsOyBpKyspIHtcbiAgICAgICAgICAgICAgICAgICAgcHJvcCA9IGNvbmZpZy5wcm9wZXJ0aWVzW2ldO1xuICAgICAgICAgICAgICAgICAgICB2YWx1ZSA9IGV4cG9zZWRbcHJvcF0gfHwgcHJvcCA9PSBcInNhbmRib3hcIiAmJiBzYW5kYm94O1xuICAgICAgICAgICAgICAgICAgICBleHBvc2VWYWx1ZShzYW5kYm94LCBjb25maWcsIHByb3AsIHZhbHVlKTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgIGV4cG9zZVZhbHVlKHNhbmRib3gsIGNvbmZpZywgXCJzYW5kYm94XCIsIHZhbHVlKTtcbiAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgcmV0dXJuIHNhbmRib3g7XG4gICAgICAgIH1cbiAgICB9KTtcblxuICAgIHNpbm9uLnNhbmRib3gudXNlRmFrZVhNTEh0dHBSZXF1ZXN0ID0gc2lub24uc2FuZGJveC51c2VGYWtlU2VydmVyO1xuXG4gICAgaWYgKHR5cGVvZiBtb2R1bGUgPT0gXCJvYmplY3RcIiAmJiB0eXBlb2YgcmVxdWlyZSA9PSBcImZ1bmN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nV2l0aDogZnVuY3Rpb24gKHBvcykge1xuICAgICAgICAgICAgdGhpcy5jYWxsQXJnT25XaXRoLmFwcGx5KHRoaXMsIFtwb3MsIG51bGxdLmNvbmNhdChzbGljZS5jYWxsKGFyZ3VtZW50cywgMSkpKTtcbiAgICAgICAgfSxcblxuICAgICAgICBjYWxsQXJnT25XaXRoOiBmdW5jdGlvbiAocG9zLCB0aGlzVmFsdWUpIHtcbiAgICAgICAgICAgIHZhciBhcmdzID0gc2xpY2UuY2FsbChhcmd1bWVudHMsIDIpO1xuICAgICAgICAgICAgdGhpcy5hcmdzW3Bvc10uYXBwbHkodGhpc1ZhbHVlLCBhcmdzKTtcbiAgICAgICAgfSxcblxuICAgICAgICBcInlpZWxkXCI6IGZ1bmN0aW9uICgpIHtcbiAgICAgICAgICAgIHRoaXMueWllbGRPbi5hcHBseSh0aGlzLCBbbnVsbF0uY29uY2F0KHNsaWNlLmNhbGwoYXJndW1lbnRzLCAwKSkpO1xuICAgICAgICB9LFxuXG4gICAgICAgIHlpZWxkT246IGZ1bmN0aW9uICh0aGlzVmFsdWUpIHtcbiAgICAgICAgICAgIHZhciBhcmdzID0gdGhpcy5hcmdzO1xuICAgICAgICAgICAgZm9yICh2YXIgaSA9IDAsIGwgPSBhcmdzLmxlbmd0aDsgaSA8IGw7ICsraSkge1xuICAgICAgICAgICAgICAgIGlmICh0eXBlb2YgYXJnc1tpXSA9PT0gXCJmdW5jdGlvblwiKSB7XG4gICAgICAgICAgICAgICAgICAgIGFyZ3NbaV0uYXBwbHkodGhpc1ZhbHVlLCBzbGljZS5jYWxsKGFyZ3VtZW50cywgMSkpO1xuICAgICAgICAgICAgICAgICAgICByZXR1cm47XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfVxuICAgICAgICAgICAgdGhyb3dZaWVsZEVycm9yKHRoaXMucHJveHksIFwiIGNhbm5vdCB5aWVsZCBzaW5jZSBubyBjYWxsYmFjayB3YXMgcGFzc2VkLlwiLCBhcmdzKTtcbiAgICAgICAgfSxcblxuICAgICAgICB5aWVsZFRvOiBmdW5jdGlvbiAocHJvcCkge1xuICAgICAgICAgICAgdGhpcy55aWVsZFRvT24uYXBwbHkodGhpcywgW3Byb3AsIG51bGxdLmNvbmNhdChzbGljZS5jYWxsKGFyZ3VtZW50cywgMSkpKTtcbiAgICAgICAgfSxcblxuICAgICAgICB5aWVsZFRvT246IGZ1bmN0aW9uIChwcm9wLCB0aGlzVmFsdWUpIHtcbiAgICAgICAgICAgIHZhciBhcmdzID0gdGhpcy5hcmdzO1xuICAgICAgICAgICAgZm9yICh2YXIgaSA9IDAsIGwgPSBhcmdzLmxlbmd0aDsgaSA8IGw7ICsraSkge1xuICAgICAgICAgICAgICAgIGlmIChhcmdzW2ldICYmIHR5cGVvZiBhcmdzW2ldW3Byb3BdID09PSBcImZ1bmN0aW9uXCIpIHtcbiAgICAgICAgICAgICAgICAgICAgYXJnc1tpXVtwcm9wXS5hcHBseSh0aGlzVmFsdWUsIHNsaWNlLmNhbGwoYXJndW1lbnRzLCAyKSk7XG4gICAgICAgICAgICAgICAgICAgIHJldHVybjtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICB0aHJvd1lpZWxkRXJyb3IodGhpcy5wcm94eSwgXCIgY2Fubm90IHlpZWxkIHRvICdcIiArIHByb3AgK1xuICAgICAgICAgICAgICAgIFwiJyBzaW5jZSBubyBjYWxsYmFjayB3YXMgcGFzc2VkLlwiLCBhcmdzKTtcbiAgICAgICAgfSxcblxuICAgICAgICB0b1N0cmluZzogZnVuY3Rpb24gKCkge1xuICAgICAgICAgICAgdmFyIGNhbGxTdHIgPSB0aGlzLnByb3h5LnRvU3RyaW5nKCkgKyBcIihcIjtcbiAgICAgICAgICAgIHZhciBhcmdzID0gW107XG5cbiAgICAgICAgICAgIGZvciAodmFyIGkgPSAwLCBsID0gdGhpcy5hcmdzLmxlbmd0aDsgaSA8IGw7ICsraSkge1xuICAgICAgICAgICAgICAgIGFyZ3MucHVzaChzaW5vbi5mb3JtYXQodGhpcy5hcmdzW2ldKSk7XG4gICAgICAgICAgICB9XG5cbiAgICAgICAgICAgIGNhbGxTdHIgPSBjYWxsU3RyICsgYXJncy5qb2luKFwiLCBcIikgKyBcIilcIjtcblxuICAgICAgICAgICAgaWYgKHR5cGVvZiB0aGlzLnJldHVyblZhbHVlICE9IFwidW5kZWZpbmVkXCIpIHtcbiAgICAgICAgICAgICAgICBjYWxsU3RyICs9IFwiID0+IFwiICsgc2lub24uZm9ybWF0KHRoaXMucmV0dXJuVmFsdWUpO1xuICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICBpZiAodGhpcy5leGNlcHRpb24pIHtcbiAgICAgICAgICAgICAgICBjYWxsU3RyICs9IFwiICFcIiArIHRoaXMuZXhjZXB0aW9uLm5hbWU7XG5cbiAgICAgICAgICAgICAgICBpZiAodGhpcy5leGNlcHRpb24ubWVzc2FnZSkge1xuICAgICAgICAgICAgICAgICAgICBjYWxsU3RyICs9IFwiKFwiICsgdGhpcy5leGNlcHRpb24ubWVzc2FnZSArIFwiKVwiO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgcmV0dXJuIGNhbGxTdHI7XG4gICAgICAgIH1cbiAgICB9O1xuXG4gICAgY2FsbFByb3RvLmludm9rZUNhbGxiYWNrID0gY2FsbFByb3RvLnlpZWxkO1xuXG4gICAgZnVuY3Rpb24gY3JlYXRlU3B5Q2FsbChzcHksIHRoaXNWYWx1ZSwgYXJncywgcmV0dXJuVmFsdWUsIGV4Y2VwdGlvbiwgaWQpIHtcbiAgICAgICAgaWYgKHR5cGVvZiBpZCAhPT0gXCJudW1iZXJcIikge1xuICAgICAgICAgICAgdGhyb3cgbmV3IFR5cGVFcnJvcihcIkNhbGwgaWQgaXMgbm90IGEgbnVtYmVyXCIpO1xuICAgICAgICB9XG4gICAgICAgIHZhciBwcm94eUNhbGwgPSBzaW5vbi5jcmVhdGUoY2Fs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Z3VtZW50cykpOyB9KTtcIik7XG4gICAgICAgIH1cbiAgICAgICAgZWxzZSB7XG4gICAgICAgICAgICBwID0gZnVuY3Rpb24gcHJveHkoKSB7XG4gICAgICAgICAgICAgICAgcmV0dXJuIHAuaW52b2tlKGZ1bmMsIHRoaXMsIHNsaWNlLmNhbGwoYXJndW1lbnRzKSk7XG4gICAgICAgICAgICB9O1xuICAgICAgICB9XG4gICAgICAgIHJldHVybiBwO1xuICAgIH1cblxuICAgIHZhciB1dWlkID0gMDtcblxuICAgIC8vIFB1YmxpYyBBUElcbiAgICB2YXIgc3B5QXBpID0ge1xuICAgICAgICByZXNldDogZnVuY3Rpb24gKCkge1xuICAgICAgICAgICAgdGhpcy5jYWxsZWQgPSBmYWxzZTtcbiAgICAgICAgICAgIHRoaXMubm90Q2FsbGVkID0gdHJ1ZTtcbiAgICAgICAgICAgIHRoaXMuY2FsbGVkT25jZSA9IGZhbHNlO1xuICAgICAgICAgICAgdGhpcy5jYWxsZWRUd2ljZSA9IGZhbHNlO1xuICAgICAgICAgICAgdGhpcy5jYWxsZWRUaHJpY2UgPSBmYWxzZTtcbiAgICAgICAgICAgIHRoaXMuY2FsbENvdW50ID0gMDtcbiAgICAgICAgICAgIHRoaXMuZmlyc3RDYWxsID0gbnVsbDtcbiAgICAgICAgICAgIHRoaXMuc2Vjb25kQ2FsbCA9IG51bGw7XG4gICAgICAgICAgICB0aGlzLnRoaXJkQ2FsbCA9IG51bGw7XG4gICAgICAgICAgICB0aGlzLmxhc3RDYWxsID0gbnVsbDtcbiAgICAgICAgICAgIHRoaXMuYXJncyA9IFtdO1xuICAgICAgICAgICAgdGhpcy5yZXR1cm5WYWx1ZXMgPSBbXTtcbiAgICAgICAgICAgIHRoaXMudGhpc1ZhbHVlcyA9IFtdO1xuICAgICAgICAgICAgdGhpcy5leGNlcHRpb25zID0gW107XG4gICAgICAgICAgICB0aGlzLmNhbGxJZHMgPSBbXTtcbiAgICAgICAgICAgIGlmICh0aGlzLmZha2VzKSB7XG4gICAgICAgICAgICAgICAgZm9yICh2YXIgaSA9IDA7IGkgPCB0aGlzLmZha2VzLmxlbmd0aDsgaSsrKSB7XG4gICAgICAgICAgICAgICAgICAgIHRoaXMuZmFrZXNbaV0ucmVzZXQoKTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9XG4gICAgICAgIH0sXG5cbiAgICAgICAgY3JlYXRlOiBmdW5jdGlvbiBjcmVhdGUoZnVuYykge1xuICAgICAgICAgICAgdmFyIG5hbWU7XG5cbiAgICAgICAgICAgIGlmICh0eXBlb2YgZnVuYyAhPSBcImZ1bmN0aW9uXCIpIHtcbiAgICAgICAgICAgICAgICBmdW5jID0gZnVuY3Rpb24gKCkgeyB9O1xuICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICBuYW1lID0gc2lub24uZnVuY3Rpb25OYW1lKGZ1bmMpO1xuICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICB2YXIgcHJveHkgPSBjcmVhdGVQcm94eShmdW5jKTtcblxuICAgICAgICAgICAgc2lub24uZXh0ZW5kKHByb3h5LCBzcHkpO1xuICAgICAgICAgICAgZGVsZXRlIHByb3h5LmNyZWF0ZTtcbiAgICAgICAgICAgIHNpbm9uLmV4dGVuZChwcm94eSwgZnVuYyk7XG5cbiAgICAgICAgICAgIHByb3h5LnJlc2V0KCk7XG4gICAgICAgICAgICBwcm94eS5wcm90b3R5cGUgPSBmdW5jLnByb3RvdHlwZTtcbiAgICAgICAgICAgIHByb3h5LmRpc3BsYXlOYW1lID0gbmFtZSB8fCBcInNweVwiO1xuICAgICAgICAgICAgcHJveHkudG9TdHJpbmcgPSBzaW5vbi5mdW5jdGlvblRvU3RyaW5nO1xuICAgICAgICAgICAgcHJveHkuX2NyZWF0ZSA9IHNpbm9uLnNweS5jcmVhdGU7XG4gICAgICAgICAgICBwcm94eS5pZCA9IFwic3B5I1wiICsgdXVpZCsrO1xuXG4gICAgICAgICAgICByZXR1cm4gcHJveHk7XG4gICAgICAgIH0sXG5cbiAgICAgICAgaW52b2tlOiBmdW5jdGlvbiBpbnZva2UoZnVuYywgdGhpc1ZhbHVlLCBhcmdzKSB7XG4gICAgICAgICAgICB2YXIgbWF0Y2hpbmcgPSBtYXRjaGluZ0Zha2UodGhpcy5mYWtlcywgYXJncyk7XG4gICAgICAgICAgICB2YXIgZXhjZXB0aW9uLCByZXR1cm5WYWx1ZTtcblxuICAgICAgICAgICAgaW5jcmVtZW50Q2FsbENvdW50LmNhbGwodGhpcyk7XG4gICAgICAgICAgICBwdXNoLmNhbGwodGhpcy50aGlzVmFsdWVzLCB0aGlzVmFsdWUpO1xuICAgICAgICAgICAgcHVzaC5jYWxsKHRoaXMuYXJncywgYXJncyk7XG4gICAgICAgICAgICBwdXNoLmNhbGwodGhpcy5jYWxsSWRzLCBjYWxsSWQrKyk7XG5cbiAgICAgICAgICAgIHRyeSB7XG4gICAgICAgICAgICAgICAgaWYgKG1hdGNoaW5nKSB7XG4gICAgICAgICAgICAgICAgICAgIHJldHVyblZhbHVlID0gbWF0Y2hpbmcuaW52b2tlKGZ1bmMsIHRoaXNWYWx1ZSwgYXJncyk7XG4gICAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuVmFsdWUgPSAodGhpcy5mdW5jIHx8IGZ1bmMpLmFwcGx5KHRoaXNWYWx1ZSwgYXJncyk7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfSBjYXRjaCAoZSkge1xuICAgICAgICAgICAgICAgIHB1c2guY2FsbCh0aGlzLnJldHVyblZhbHVlcywgdW5kZWZpbmVkKTtcbiAgICAgICAgICAgICAgICBleGNlcHRpb24gPSBlO1xuICAgICAgICAgICAgICAgIHRocm93IGU7XG4gICAgICAgICAgICB9IGZpbmFsbHkge1xuICAgICAgICAgICAgICAgIHB1c2guY2FsbCh0aGlzLmV4Y2VwdGlvbnMsIGV4Y2VwdGlvbik7XG4gICAgICAgICAgICB9XG5cbiAgICAgICAgICAgIHB1c2guY2FsbCh0aGlzLnJldHVyblZhbHVlcywgcmV0dXJuVmFsdWUpO1xuXG4gICAgICAgICAgICBjcmVhdGVDYWxsUHJvcGVydGllcy5jYWxsKHRoaXMpO1xuXG4gICAgICAgICAgICByZXR1cm4gcmV0dXJuVmFsdWU7XG4gICAgICAgIH0sXG5cbiAgICAgICAgZ2V0Q2FsbDogZnVuY3Rpb24gZ2V0Q2FsbChpKSB7XG4gICAgICAgICAgICBpZiAoaSA8IDAgfHwgaSA+PSB0aGlzLmNhbGxDb3VudCkge1xuICAgICAgICAgICAgICAgIHJldHVybiBudWxsO1xuICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICByZXR1cm4gc2lub24uc3B5Q2FsbCh0aGlzLCB0aGlzLnRoaXNWYWx1ZXNbaV0sIHRoaXMuYXJnc1tpXSxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRoaXMucmV0dXJuVmFsdWVzW2ldLCB0aGlzLmV4Y2VwdGlvbnNbaV0sXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB0aGlzLmNhbGxJZHNbaV0pO1xuICAgICAgICB9LFxuXG4gICAgICAgIGNhbGxlZEJlZm9yZTogZnVuY3Rpb24gY2FsbGVkQmVmb3JlKHNweUZuKSB7XG4gICAgICAgICAgICBpZiAoIXRoaXMuY2FsbGVkKSB7XG4gICAgICAgICAgICAgICAgcmV0dXJuIGZhbHNlO1xuICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICBpZiAoIXNweUZuLmNhbGxlZCkge1xuICAgICAgICAgICAgICAgIHJldHVybiB0cnVlO1xuICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICByZXR1cm4gdGhpcy5jYWxsSWRzWzBdIDwgc3B5Rm4uY2FsbElkc1tzcHlGbi5jYWxsSWRzLmxlbmd0aCAtIDFdO1xuICAgICAgICB9LFxuXG4gICAgICAgIGNhbGxlZEFmdGVyOiBmdW5jdGlvbiBjYWxsZWRBZnRlcihzcHlGbikge1xuICAgICAgICAgICAgaWYgKCF0aGlzLmNhbGxlZCB8fCAhc3B5Rm4uY2FsbGVkKSB7XG4gICAgICAgICAgICAgICAgcmV0dXJuIGZhbHNlO1xuICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICByZXR1cm4gdGhpcy5jYWxsSWRzW3RoaXMuY2FsbENvdW50IC0gMV0gPiBzcHlGbi5jYWxsSWRzW3NweUZuLmNhbGxDb3VudCAtIDFdO1xuICAgICAgICB9LFxuXG4gICAgICAgIHdpdGhBcmdzOiBmdW5jdGlvbiAoKSB7XG4gICAgICAgICAgICB2YXIgYXJncyA9IHNsaWNlLmNhbGwoYXJndW1lbnRzKTtcblxuICAgICAgICAgICAgaWYgKHRoaXMuZmFrZXMpIHtcbiAgICAgICAgICAgICAgICB2YXIgbWF0Y2ggPSBtYXRjaGluZ0Zha2UodGhpcy5mYWtlcywgYXJncywgdHJ1ZSk7XG5cbiAgICAgICAgICAgICAgICBpZiAobWF0Y2gpIHtcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIG1hdGNoO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgdGhpcy5mYWtlcyA9IFtdO1xuICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICB2YXIgb3JpZ2luYWwgPSB0aGlzO1xuICAgICAgICAgICAgdmFyIGZha2UgPSB0aGlzLl9jcmVhdGUoKTtcbiAgICAgICAgICAgIGZha2UubWF0Y2hpbmdBZ3VtZW50cyA9IGFyZ3M7XG4gICAgICAgICAgICBwdXNoLmNhbGwodGhpcy5mYWtlcywgZmFrZSk7XG5cbiAgICAgICAgICAgIGZha2Uud2l0aEFyZ3MgPSBmdW5jdGlvbiAoKSB7XG4gICAgICAgICAgICAgICAgcmV0dXJuIG9yaWdpbmFsLndpdGhBcmdzLmFwcGx5KG9yaWdpbmFsLCBhcmd1bWVudHMpO1xuICAgICAgICAgICAgfTtcblxuICAgICAgICAgICAgZm9yICh2YXIgaSA9IDA7IGkgPCB0aGlzLmFyZ3MubGVuZ3RoOyBpKyspIHtcbiAgICAgICAgICAgICAgICBpZiAoZmFrZS5tYXRjaGVzKHRoaXMuYXJnc1tpXSkpIHtcbiAgICAgICAgICAgICAgICAgICAgaW5jcmVtZW50Q2FsbENvdW50LmNhbGwoZmFrZSk7XG4gICAgICAgICAgICAgICAgICAgIHB1c2guY2FsbChmYWtlLnRoaXNWYWx1ZXMsIHRoaXMudGhpc1ZhbHVlc1tpXSk7XG4gICAgICAgICAgICAgICAgICAgIHB1c2guY2FsbChmYWtlLmFyZ3MsIHRoaXMuYXJnc1tpXSk7XG4gICAgICAgICAgICAgICAgICAgIHB1c2guY2FsbChmYWtlLnJldHVyblZhbHVlcywgdGhpcy5yZXR1cm5WYWx1ZXNbaV0pO1xuICAgICAgICAgICAgICAgICAgICBwdXNoLmNhbGwoZmFrZS5leGNlcHRpb25zLCB0aGlzLmV4Y2VwdGlvbnNbaV0pO1xuICAgICAgICAgICAgICAgICAgICBwdXNoLmNhbGwoZmFrZS5jYWxsSWRzLCB0aGlzLmNhbGxJZHNbaV0pO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGNyZWF0ZUNhbGxQcm9wZXJ0aWVzLmNhbGwoZmFrZSk7XG5cbiAgICAgICAgICAgIHJldHVybiBmYWtlO1xuICAgICAgICB9LFxuXG4gICAgICAgIG1hdGNoZXM6IGZ1bmN0aW9uIChhcmdzLCBzdHJpY3QpIHtcbiAgICAgICAgICAgIHZhciBtYXJncyA9IHRoaXMubWF0Y2hpbmdBZ3VtZW50cztcblxuICAgICAgICAgICAgaWYgKG1hcmdzLmxlbmd0aCA8PSBhcmdzLmxlbmd0aCAmJlxuICAgICAgICAgICAgICAgIHNpbm9uLmRlZXBFcXVhbChtYXJncywgYXJncy5zbGljZSgwLCBtYXJncy5sZW5ndGgpKSkge1xuICAgICAgICA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iAoIXRoaXMuY2FsbGVkKSB7XG4gICAgICAgICAgICAgICAgaWYgKG5vdENhbGxlZCkge1xuICAgICAgICAgICAgICAgICAgICByZXR1cm4gbm90Q2FsbGVkLmFwcGx5KHRoaXMsIGFyZ3VtZW50cyk7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIHJldHVybiBmYWxzZTtcbiAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgdmFyIGN1cnJlbnRDYWxsO1xuICAgICAgICAgICAgdmFyIG1hdGNoZXMgPSAwO1xuXG4gICAgICAgICAgICBmb3IgKHZhciBpID0gMCwgbCA9IHRoaXMuY2FsbENvdW50OyBpIDwgbDsgaSArPSAxKSB7XG4gICAgICAgICAgICAgICAgY3VycmVudENhbGwgPSB0aGlzLmdldENhbGwoaSk7XG5cbiAgICAgICAgICAgICAgICBpZiAoY3VycmVudENhbGxbYWN0dWFsIHx8IG1ldGhvZF0uYXBwbHkoY3VycmVudENhbGwsIGFyZ3VtZW50cykpIHtcbiAgICAgICAgICAgICAgICAgICAgbWF0Y2hlcyArPSAxO1xuXG4gICAgICAgICAgICAgICAgICAgIGlmIChtYXRjaEFueSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHRydWU7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9XG5cbiAgICAgICAgICAgIHJldHVybiBtYXRjaGVzID09PSB0aGlzLmNhbGxDb3VudDtcbiAgICAgICAgfTtcbiAgICB9XG5cbiAgICBkZWxlZ2F0ZVRvQ2FsbHMoXCJjYWxsZWRPblwiLCB0cnVlKTtcbiAgICBkZWxlZ2F0ZVRvQ2FsbHMoXCJhbHdheXNDYWxsZWRPblwiLCBmYWxzZSwgXCJjYWxsZWRPblwiKTtcbiAgICBkZWxlZ2F0ZVRvQ2FsbHMoXCJjYWxsZWRXaXRoXCIsIHRydWUpO1xuICAgIGRlbGVnYXRlVG9DYWxscyhcImNhbGx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IFwiQ1wiOiBmdW5jdGlvbiAoc3B5KSB7XG4gICAgICAgICAgICB2YXIgY2FsbHMgPSBbXTtcblxuICAgICAgICAgICAgZm9yICh2YXIgaSA9IDAsIGwgPSBzcHkuY2FsbENvdW50OyBpIDwgbDsgKytpKSB7XG4gICAgICAgICAgICAgICAgdmFyIHN0cmluZ2lmaWVkQ2FsbCA9IFwiICAgIFwiICsgc3B5LmdldENhbGwoaSkudG9TdHJpbmcoKTtcbiAgICAgICAgICAgICAgICBpZiAoL1xcbi8udGVzdChjYWxsc1tpIC0gMV0pKSB7XG4gICAgICAgICAgICAgICAgICAgIHN0cmluZ2lmaWVkQ2FsbCA9IFwiXFxuXCIgKyBzdHJpbmdpZmllZENhbGw7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIHB1c2guY2FsbChjYWxscywgc3RyaW5naWZpZWRDYWxsKTtcbiAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgcmV0dXJuIGNhbGxzLmxlbmd0aCA+IDAgPyBcIlxcblwiICsgY2FsbHMuam9pbihcIlxcblwiKSA6IFwiXCI7XG4gICAgICAgIH0sXG5cbiAgICAgICAgXCJ0XCI6IGZ1bmN0aW9uIChzcHkpIHtcbiAgICAgICAgICAgIHZhciBvYmplY3RzID0gW107XG5cbiAgICAgICAgICAgIGZvciAodmFyIGkgPSAwLCBsID0gc3B5LmNhbGxDb3VudDsgaSA8IGw7ICsraSkge1xuICAgICAgICAgICAgICAgIHB1c2guY2FsbChvYmplY3RzLCBzaW5vbi5mb3JtYXQoc3B5LnRoaXNWYWx1ZXNbaV0pKTtcbiAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgcmV0dXJuIG9iamVjdHMuam9pbihcIiwgXCIpO1xuICAgICAgICB9LFxuXG4gICAgICAgIFwiKlwiOiBmdW5jdGlvbiAoc3B5LCBhcmdzKSB7XG4gICAgICAgICAgICB2YXIgZm9ybWF0dGVkID0gW107XG5cbiAgICAgICAgICAgIGZvciAodmFyIG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dzW2ldO1xuICAgICAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgICAgIGlmIChjYWxsQXJnUHJvcCAmJiBhcmdzW2ldICYmXG4gICAgICAgICAgICAgICAgICAgIHR5cGVvZiBhcmdzW2ldW2NhbGxBcmdQcm9wXSA9PSBcImZ1bmN0aW9uXCIpIHtcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIGFyZ3NbaV1bY2FsbEFyZ1Byb3BdO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgcmV0dXJuIG51bGw7XG4gICAgICAgIH1cblxuICAgICAgICByZXR1cm4gYXJnc1tjYWxsQXJnQXRdO1xuICAgIH1cblxuICAgIHZhciBqb2luID0gQXJyYXkucHJvdG90eXBlLmpvaW47XG5cbiAgICBmdW5jdGlvbiBnZXRDYWxsYmFja0Vycm9yKHN0dWIsIGZ1bmMsIGFyZ3MpIHtcbiAgICAgICAgaWYgKHN0dWIuY2FsbEFyZ0F0c0xhc3QgPCAwKSB7XG4gICAgICAgICAgICB2YXIgbXNnO1xuXG4gICAgICAgICAgICBpZiAoc3R1Yi5jYWxsQXJnUHJvcHNMYXN0KSB7XG4gICAgICAgICAgICAgICAgbXNnID0gc2lub24uZnVuY3Rpb25OYW1lKHN0dWIpICtcbiAgICAgICAgICAgICAgICAgICAgXCIgZXhwZWN0ZWQgdG8geWllbGQgdG8gJ1wiICsgc3R1Yi5jYWxsQXJnUHJvcHNMYXN0ICtcbiAgICAgICAgICAgICAgICAgICAgXCInLCBidXQgbm8gb2JqZWN0IHdpdGggc3VjaCBhIHByb3BlcnR5IHdhcyBwYXNzZWQuXCJcbiAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgbXNnID0gc2lub24uZnVuY3Rpb25OYW1lKHN0dWIpICtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBcIiBleHBlY3RlZCB0byB5aWVsZCwgYnV0IG5vIGNhbGxiYWNrIHdhcyBwYXNzZWQuXCJcbiAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgaWYgKGFyZ3MubGVuZ3RoID4gMCkge1xuICAgICAgICAgICAgICAgIG1zZyArPSBcIiBSZWNlaXZlZCBbXCIgKyBqb2luLmNhbGwoYXJncywgXCIsIFwiKSArIFwiXVwiO1xuICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICByZXR1cm4gbXNnO1xuICAgICAgICB9XG5cbiAgICAgICAgcmV0dXJuIFwiYXJndW1lbnQgYXQgaW5kZXggXCIgKyBzdHViLmNhbGxBcmdBdHNMYXN0ICsgXCIgaXMgbm90IGEgZnVuY3Rpb246IFwiICsgZnVuYztcbiAgICB9XG5cbiAgICB2YXIgbmV4dFRpY2sgPSAoZnVuY3Rpb24gKCkge1xuICAgICAgICBpZiAodHlwZW9mIHByb2Nlc3MgPT09IFwib2JqZWN0XCIgJiYgdHlwZW9mIHByb2Nlc3MubmV4dFRpY2sgPT09IFwiZnVuY3Rpb25cIikge1xuICAgICAgICAgICAgcmV0dXJuIHByb2Nlc3MubmV4dFRpY2s7XG4gICAgICAgIH0gZWxzZSBpZiAodHlwZW9mIHNldEltbWVkaWF0ZSA9PT0gXCJmdW5jdGlvblwiKSB7XG4gICAgICAgICAgICByZXR1cm4gc2V0SW1tZWRpYXRlO1xuICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgcmV0dXJuIGZ1bmN0aW9uIChjYWxsYmFjaykge1xuICAgICAgICAgICAgICAgIHNldFRpbWVvdXQoY2FsbGJhY2ssIDApO1xuICAgICAgICAgICAgfTtcbiAgICAgICAgfVxuICAgIH0pKCk7XG5cbiAgICBmdW5jdGlvbiBjYWxsQ2FsbGJhY2soc3R1YiwgYXJncykge1xuICAgICAgICBpZiAoc3R1Yi5jYWxsQXJnQXRzLmxlbmd0aCA+IDApIHtcbiAgICAgICAgICAgIHZhciBmdW5jID0gZ2V0Q2FsbGJhY2soc3R1YiwgYXJncyk7XG5cbiAgICAgICAgICAgIGlmICh0eXBlb2YgZnVuYyAhPSBcImZ1bmN0aW9uXCIpIHtcbiAgICAgICAgICAgICAgICB0aHJvdyBuZXcgVHlwZUVycm9yKGdldENhbGxiYWNrRXJyb3Ioc3R1YiwgZnVuYywgYXJncykpO1xuICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICB2YXIgY2FsbGJhY2tBcmd1bWVudHMgPSBnZXRDaGFuZ2luZ1ZhbHVlKHN0dWIsIFwiY2FsbGJhY2tBcmd1bWVudHNcIik7XG4gICAgICAgICAgICB2YXIgY2FsbGJhY2tDb250ZXh0ID0gZ2V0Q2hhbmdpbmdWYWx1ZShzdHViLCBcImNhbGxiYWNrQ29udGV4dHNcIik7XG5cbiAgICAgICAgICAgIGlmIChzdHViLmNhbGxiYWNrQXN5bmMpIHtcbiAgICAgICAgICAgICAgICBuZXh0VGljayhmdW5jdGlvbigpIHtcbiAgICAgICAgICAgICAgICAgICAgZnVuYy5hcHBseShjYWxsYmFja0NvbnRleHQsIGNhbGxiYWNrQXJndW1lbnRzKTtcbiAgICAgICAgICAgICAgICB9KTtcbiAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgZnVuYy5hcHBseShjYWxsYmFja0NvbnRleHQsIGNhbGxiYWNrQXJndW1lbnRzKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgfVxuICAgIH1cblxuICAgIHZhciB1dWlkID0gMDtcblxuICAgIHNpbm9uLmV4dGVuZChzdHViLCAoZnVuY3Rpb24gKCkge1xuICAgICAgICB2YXIgc2xpY2UgPSBBcnJheS5wcm90b3R5cGUuc2xpY2UsIHByb3RvO1xuXG4gICAgICAgIGZ1bmN0aW9uIHRocm93c0V4Y2VwdGlvbihlcnJvciwgbWVzc2FnZSkge1xuICAgICAgICAgICAgaWYgKHR5cGVvZiBlcnJvciA9PSBcInN0cmluZ1wiKSB7XG4gICAgICAgICAgICAgICAgdGhpcy5leGNlcHRpb24gPSBuZXcgRXJyb3IobWVzc2FnZSB8fCBcIlwiKTtcbiAgICAgICAgICAgICAgICB0aGlzLmV4Y2VwdGlvbi5uYW1lID0gZXJyb3I7XG4gICAgICAgICAgICB9IGVsc2UgaWYgKCFlcnJvcikge1xuICAgICAgICAgICAgICAgIHRoaXMuZXhjZXB0aW9uID0gbmV3IEVycm9yKFwiRXJyb3JcIik7XG4gICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgIHRoaXMuZXhjZXB0aW9uID0gZXJyb3I7XG4gICAgICAgICAgICB9XG5cbiAgICAgICAgICAgIHJldHVybiB0aGlzO1xuICAgICAgICB9XG5cbiAgICAgICAgcHJvdG8gPSB7XG4gICAgICAgICAgICBjcmVhdGU6IGZ1bmN0aW9uIGNyZWF0ZSgpIHtcbiAgICAgICAgICAgICAgICB2YXIgZnVuY3Rpb25TdHViID0gZnVuY3Rpb24gKCkge1xuXG4gICAgICAgICAgICAgICAgICAgIGNhbGxDYWxsYmFjayhmdW5jdGlvblN0dWIsIGFyZ3VtZW50cyk7XG5cbiAgICAgICAgICAgICAgICAgICAgaWYgKGZ1bmN0aW9uU3R1Yi5leGNlcHRpb24pIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIHRocm93IGZ1bmN0aW9uU3R1Yi5leGNlcHRpb247XG4gICAgICAgICAgICAgICAgICAgIH0gZWxzZSBpZiAodHlwZW9mIGZ1bmN0aW9uU3R1Yi5yZXR1cm5BcmdBdCA9PSAnbnVtYmVyJykge1xuICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIGFyZ3VtZW50c1tmdW5jdGlvblN0dWIucmV0dXJuQXJnQXRdO1xuICAgICAgICAgICAgICAgICAgICB9IGVsc2UgaWYgKGZ1bmN0aW9uU3R1Yi5yZXR1cm5UaGlzKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gdGhpcztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICByZXR1cm4gZnVuY3Rpb25TdHViLnJldHVyblZhbHVlO1xuICAgICAgICAgICAgICAgIH07XG5cbiAgICAgICAgICAgICAgICBmdW5jdGlvblN0dWIuaWQgPSBcInN0dWIjXCIgKyB1dWlkKys7XG4gICAgICAgICAgICAgICAgdmFyIG9yaWcgPSBmdW5jdGlvblN0dWI7XG4gICAgICAgICAgICAgICAgZnVuY3Rpb25TdHViID0gc2lub24uc3B5LmNyZWF0ZShmdW5jdGlvblN0dWIpO1xuICAgICAgICAgICAgICAgIGZ1bmN0aW9uU3R1Yi5mdW5jID0gb3JpZztcblxuICAgICAgICAgICAgICAgIGZ1bmN0aW9uU3R1Yi5jYWxsQXJnQXRzID0gW107XG4gICAgICAgICAgICAgICAgZnVuY3Rpb25TdHViLmNhbGxiYWNrQXJndW1lbnRzID0gW107XG4gICAgICAgICAgICAgICAgZnVuY3Rpb25TdHViLmNhbGxiYWNrQ29udGV4dHMgPSBbXTtcbiAgICAgICAgICAgICAgICBmdW5jdGlvblN0dWIuY2FsbEFyZ1Byb3BzID0gW107XG5cbiAgICAgICAgICAgICAgICBzaW5vbi5leHRlbmQoZnVuY3Rpb25TdHViLCBzdHViKTtcbiAgICAgICAgICAgICAgICBmdW5jdGlvblN0dWIuX2NyZWF0ZSA9IHNpbm9uLnN0dWIuY3JlYXRlO1xuICAgICAgICAgICAgICAgIGZ1bmN0aW9uU3R1Yi5kaXNwbGF5TmFtZSA9IFwic3R1YlwiO1xuICAgICAgICAgICAgICAgIGZ1bmN0aW9uU3R1Yi50b1N0cmluZyA9IHNpbm9uLmZ1bmN0aW9uVG9TdHJpbmc7XG5cbiAgICAgICAgICAgICAgICByZXR1cm4gZnVuY3Rpb25TdHViO1xuICAgICAgICAgICAgfSxcblxuICAgICAgICAgICAgcmVzZXRCZWhhdmlvcjogZnVuY3Rpb24gKCkge1xuICAgICAgICAgICAgICAgIHZhciBpO1xuXG4gICAgICAgICAgICAgICAgdGhpcy5jYWxsQXJnQXRzID0gW107XG4gICAgICAgICAgICAgICAgdGhpcy5jYWxsYmFja0FyZ3VtZW50cyA9IFtdO1xuICAgICAgICAgICAgICAgIHRoaXMuY2FsbGJhY2tDb250ZXh0cyA9IFtdO1xuICAgICAgICAgICAgICAgIHRoaXMuY2FsbEFyZ1Byb3BzID0gW107XG5cbiAgICAgICAgICAgICAgICBkZWxldGUgdGhpcy5yZXR1cm5WYWx1ZTtcbiAgICAgICAgICAgICAgICBkZWxldGUgdGhpcy5yZXR1cm5BcmdBdDtcbiAgICAgICAgICAgICAgICB0aGlzLnJldHVyblRoaXMgPSBmYWxzZTtcblxuICAgICAgICAgICAgICAgIGlmICh0aGlzLmZha2VzKSB7XG4gICAgICAgICAgICAgICAgICAgIGZvciAoaSA9IDA7IGkgPCB0aGlzLmZha2VzLmxlbmd0aDsgaSsrKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICB0aGlzLmZha2VzW2ldLnJlc2V0QmVoYXZpb3IoKTtcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH0sXG5cbiAgICAgICAgICAgIHJldHVybnM6IGZ1bmN0aW9uIHJldHVybnModmFsdWUpIHtcbiAgICAgICAgICAgICAgICB0aGlzLnJldHVyblZhbHVlID0gdmFsdWU7XG5cbiAgICAgICAgICAgICAgICByZXR1cm4gdGhpcztcbiAgICAgICAgICAgIH0sXG5cbiAgICAgICAgICAgIHJldHVybnNBcmc6IGZ1bmN0aW9uIHJldHVybnNBcmcocG9zKSB7XG4gICAgICAgICAgICAgICAgaWYgKHR5cGVvZiBwb3MgIT0gXCJudW1iZXJcIikge1xuICAgICAgICAgICAgICAgICAgICB0aHJvdyBuZXcgVHlwZUVycm9yKFwiYXJndW1lbnQgaW5kZXggaXMgbm90IG51bWJlclwiKTtcbiAgICAgICAgICAgICAgICB9XG5cbiAgICAgICAgICAgICAgICB0aGlzLnJldHVybkFyZ0F0ID0gcG9zO1xuXG4gICAgICAgICAgICAgICAgcmV0dXJuIHRoaXM7XG4gICAgICAgICAgICB9LFxuXG4gICAgICAgICAgICByZXR1cm5zVGhpczogZnVuY3Rpb24gcmV0dXJuc1RoaXMoKSB7XG4gICAgICAgICAgICAgICAgdGhpcy5yZXR1cm5UaGlzID0gdHJ1ZTtcblxuICAgICAgICAgICAgICAgIHJldHVybiB0aGlzO1xuICAgICAgICAgICAgfSxcblxuICAgICAgICAgICAgXCJ0aHJvd3NcIjogdGhyb3dzRXhjZXB0aW9uLFxuICAgICAgICAgICAgdGhyb3dzRXhjZXB0aW9uOiB0aHJvd3NFeGNlcHRpb24sXG5cbiAgICAgICAgICAgIGNhbGxzQXJnOiBmdW5jdGlvbiBjYWxsc0FyZyhwb3MpIHtcbiAgICAgICAgICAgICAgICBpZiAodHlwZW9mIHBvcyAhPSBcIm51bWJlclwiKSB7XG4gICAgICAgICAgICAgICAgICAgIHRocm93IG5ldyBUeXBlRXJyb3IoXCJhcmd1bWVudCBpbmRleCBpcyBub3QgbnVtYmVyXCIpO1xuICAgICAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgICAgIHRoaXMuY2FsbEFyZ0F0cy5wdXNoKHBvcyk7XG4gICAgICAgICAgICAgICAgdGhpcy5jYWxsYmFja0FyZ3VtZW50cy5wdXNoKFtdKTtcbiAgICAgICAgICAgICAgICB0aGlzLmNhbGxiYWNrQ29udGV4dHMucHVzaCh1bmRlZmluZWQpO1xuICAgICAgICAgICAgICAgIHRoaXMuY2FsbEFyZ1Byb3BzLnB1c2godW5kZWZpbmVkKTtcblxuICAgICAgICAgICAgICAgIHJldHVybiB0aGlzO1xuICAgICAgICAgICAgfSxcblxuICAgICAgICAgICAgY2FsbHNBcmdPbjogZnVuY3Rpb24gY2FsbHNBcmdPbihwb3MsIGNvbnRleHQpIHtcbiAgICAgICAgICAgICAgICBpZiAodHlwZW9mIHBvcyAhPSBcIm51bWJlclwiKSB7XG4gICAgICAgICAgICAgICAgICAgIHRocm93IG5ldyBUeXBlRXJyb3IoXCJhcmd1bWVudCBpbmRleCBpcyBub3QgbnVtYmVyXCIpO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICBpZiAodHlwZW9mIGNvbnRleHQgIT0gXCJvYmplY3RcIikge1xuICAgICAgICAgICAgICAgICAgICB0aHJvdyBuZXcgVHlwZUVycm9yKFwiYXJndW1lbnQgY29udGV4dCBpcyBub3QgYW4gb2JqZWN0XCIpO1xuICAgICAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgICAgIHRoaXMuY2FsbEFyZ0F0cy5wdXNoKHBvcyk7XG4gICAgICAgICAgICAgICAgdGhpcy5jYWxsYmFja0FyZ3VtZW50cy5wdXNoKFtdKTtcbiAgICAgICAgICAgICAgICB0aGlzLmNhbGxiYWNrQ29udGV4dHMucHVzaChjb250ZXh0KTtcbiAgICAgICAgICAgICAgICB0aGlzLmNhbGxBcmdQcm9wcy5wdXNoKHVuZGVmaW5lZCk7XG5cbiAgICAgICAgICAgICAgICByZXR1cm4gdGhpcztcbiAgICAgICAgICAgIH0sXG5cbiAgICAgICAgICAgIGNhbGxzQXJnV2l0aDogZnVuY3Rpb24gY2FsbHNBcmdXaXRoKHBvcykge1xuICAgICAgICAgICAgICAgIGlmICh0eXBlb2YgcG9zICE9IFwibnVtYmVyXCIpIHtcbiAgICAgICAgICAgICAgICAgICAgdGhyb3cgbmV3IFR5cGVFcnJvcihcImFyZ3VtZW50IGluZGV4IGlzIG5vdCBudW1iZXJcIik7XG4gICAgICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAgICAgdGhpcy5jYWxsQXJnQXRzLnB1c2gocG9zKTtcbiAgICAgICAgICAgICAgICB0aGlzLmNhbGxiYWNrQXJndW1lbnRzLnB1c2goc2xpY2UuY2FsbChhcmd1bWVudHMsIDEpKTtcbiAgICAgICAgICAgICAgICB0aGlzLmNhbGxiYWNrQ29udGV4dHMucHVzaCh1bmRlZmluZWQpO1xuICAgICAgICAgICAgICAgIHRoaXMuY2FsbEFyZ1Byb3BzLnB1c2godW5kZWZpbmVkKTtcblxuICAgICAgICAgICAgICAgIHJldHVybiB0aGlzO1xuICAgICAgICAgICAgfSxcblxuICAgICAgICAgICAgY2FsbHNBcmdPbldpdGg6IGZ1bmN0aW9uIGNhbGxzQXJnV2l0aChwb3MsIGNvbnRleHQpIHtcbiAgICAgICAgICAgICAgICBpZiAodHlwZW9mIHBvcyAhPSBcIm51bWJlclwiKSB7XG4gICAgICAgICAgICAgICAgICAgIHRocm93IG5ldyBUeXBlRXJyb3IoXCJhcmd1bWVudCBpbmRleCBpcyBub3QgbnVtYmVyXCIpO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICBpZiAodHlwZW9mIGNvbnRleHQgIT0gXCJvYmplY3RcIikge1xuICAgICAgICAgICAgICAgICAgICB0aHJvdyBuZXcgVHlwZUVycm9yKFwiYXJndW1lbnQgY29udGV4dCBpcyBub3QgYW4gb2JqZWN0XCIpO1xuICAgICAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgICAgIHRoaXMuY2FsbEFyZ0F0cy5wdXNoKHBvcyk7XG4gICAgICAgICAgICAgICAgdGhpcy5jYWxsYmFja0FyZ3VtZW50cy5wdXNoKHNsaWNlLmNhbGwoYXJndW1lbnRzLCAyKSk7XG4gICAgICAgICAgICAgICAgdGhpcy5jYWxsYmFja0NvbnRleHRzLnB1c2goY29udGV4dCk7XG4gICAgICAgICAgICAgICAgdGhpcy5jYWxsQXJnUHJvcHMucHVzaCh1bmRlZmluZWQpO1xuXG4gICAgICAgICAgICAgICAgcmV0dXJuIHRoaXM7XG4gICAgICAgICAgICB9LFxuXG4gICAgICAgICAgICB5aWVsZHM6IGZ1bmN0aW9uICgpIHtcbiAgICAgICAgICAgICAgICB0aGlzLmNhbGxBcmdBdHMucHVzaCgtMSk7XG4gICAgICAgICAgICAgICAgdGhpcy5jYWxsYmFja0FyZ3VtZW50cy5wdXNoKHNsaWNlLmNhbGwoYXJndW1lbnRzLCAwKSk7XG4gICAgICAgICAgICAgICAgdGhpcy5jYWxsYmFja0NvbnRleHRzLnB1c2godW5kZWZpbmVkKTtcbiAgICAgICAgICAgICAgICB0aGlzLmNhbGxBcmdQcm9wcy5wdXNoKHVuZGVmaW5lZCk7XG5cbiAgICAgICAgICAgICAgICByZXR1cm4gdGhpcztcbiAgICAgICAgICAgIH0sXG5cbiAgICAgICAgICAgIHlpZWxkc09uOiBmdW5jdGlvbiAoY29udGV4dCkge1xuICAgICAgICAgICAgICAgIGlmICh0eXBlb2YgY29udGV4dCAhPSBcIm9iamVjdFwiKSB7XG4gICAgICAgICAgICAgICAgICAgIHRocm93IG5ldyBUeXBlRXJyb3IoXCJhcmd1bWVudCBjb250ZXh0IGlzIG5vdCBhbiBvYmplY3RcIik7XG4gICAgICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAgICAgdGhpcy5jYWxsQXJnQXRzLnB1c2goLTEpO1xuICAgICAgICAgICAgICAgIHRoaXMuY2FsbGJhY2tBcmd1bWVudHMucHVzaChzbGljZS5jYWxsKGFyZ3VtZW50cywgMSkpO1xuICAgICAgICAgICAgICAgIHRoaXMuY2FsbGJhY2tDb250ZXh0cy5wdXNoKGNvbnRleHQpO1xuICAgICAgICAgICAgICAgIHRoaXMuY2FsbEFyZ1Byb3BzLnB1c2godW5kZWZpbmVkKTtcblxuICAgICAgICAgICAgICAgIHJldHVybiB0aGlzO1xuICAgICAgICAgICAgfSxcblxuICAgICAgICAgICAgeWllbGRzVG86IGZ1bmN0aW9uIChwcm9wKSB7XG4gICAgICAgICAgICAgICAgdGhpcy5jYWxsQXJnQXRzLnB1c2goLTEpO1xuICAgICAgICAgICAgICAgIHRoaXMuY2FsbGJhY2tBcmd1bWVudHMucHVzaChzbGljZS5jYWxsKGFyZ3VtZW50cywgMSkpO1xuICAgICAgICAgICAgICAgIHRoaXMuY2FsbGJhY2tDb250ZXh0cy5wdXNoKHVuZGVmaW5lZCk7XG4gICAgICAgICAgICAgICAgdGhpcy5jYWxsQXJnUHJvcHMucHVzaChwcm9wKTtcblxuICAgICAgICAgICAgICAgIHJldHVybiB0aGlzO1xuICAgICAgICAgICAgfSxcblxuICAgICAgICAgICAgeWllbGRzVG9PbjogZnVuY3Rpb24gKHByb3AsIGNvbnRleHQpIHtcbiAgICAgICAgICAgICAgICBpZiAodHlwZW9mIGNvbnRleHQgIT0gXCJvYmplY3RcIikge1xuICAgICAgICAgICAgICAgICAgICB0aHJvdyBuZXcgVHlwZUVycm9yKFwiYXJndW1lbnQgY29udGV4dCBpcyBub3QgYW4gb2JqZWN0XCIpO1xuICAgICAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgICAgIHRoaXMuY2FsbEFyZ0F0cy5wdXNoKC0xKTtcbiAgICAgICAgICAgICAgICB0aGlzLmNhbGxiYWNrQXJndW1lbnRzLnB1c2goc2xpY2UuY2FsbChhcmd1bWVudHMsIDIpKTtcbiAgICAgICAgICAgICAgICB0aGlzLmNhbGxiYWNrQ29udGV4dHMucHVzaChjb250ZXh0KTtcbiAgICAgICAgICAgICAgICB0aGlzLmNhbGxBcmdQcm9wcy5wdXNoKHByb3ApO1xuXG4gICAgICAgICAgICAgICAgcmV0dXJuIHRoaXM7XG4gICAgICAgICAgICB9XG4gICAgICAgIH07XG5cbiAgICAgICAgLy8gY3JlYXRlIGFzeW5jaHJvbm91cyB2ZXJzaW9ucyBvZiBjYWxsc0FyZyogYW5kIHlpZWxkcyogbWV0aG9kc1xuICAgICAgICBmb3IgKHZhciBtZXRob2QgaW4gcHJvdG8pIHtcbiAgICAgICAgICAgIC8vIG5lZWQgdG8gYXZvaWQgY3JlYXRpbmcgYW5vdGhlcmFzeW5jIHZlcnNpb25zIG9mIHRoZSBuZXdseSBhZGRlZCBhc3luYyBtZXRob2RzXG4gICAgICAgICAgICBpZiAocHJvdG8uaGFzT3duUHJvcGVydHkobWV0aG9kKSAmJlxuICAgICAgICAgICAgICAgIG1ldGhvZC5tYXRjaCgvXihjYWxsc0FyZ3x5aWVsZHN8dGhlbllpZWxkcyQpLykgJiZcbiAgICAgICAgICAgICAgICAhbWV0aG9kLm1h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nByb3RvdHlwZS5zbGljZS5jYWxsKGFyZ3VtZW50cykuY29uY2F0KHNhbmRib3guYXJncyk7XG5cbiAgICAgICAgICAgIHRyeSB7XG4gICAgICAgICAgICAgICAgcmVzdWx0ID0gY2FsbGJhY2suYXBwbHkodGhpcywgYXJncyk7XG4gICAgICAgICAgICB9IGNhdGNoIChlKSB7XG4gICAgICAgICAgICAgICAgZXhjZXB0aW9uID0gZTtcbiAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgaWYgKHR5cGVvZiBleGNlcHRpb24gIT09IFwidW5kZWZpbmVkXCIpIHtcbiAgICAgICAgICAgICAgICBzYW5kYm94LnJlc3RvcmUoKTtcbiAgICAgICAgICAgICAgICB0aHJvdyBleGNlcHRpb247XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBlbHNlIHtcbiAgICAgICAgICAgICAgICBzYW5kYm94LnZlcmlmeUFuZFJlc3RvcmUoKTtcbiAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgcmV0dXJuIHJlc3VsdDtcbiAgICAgICAgfTtcbiAgICB9XG5cbiAgICB0ZXN0LmNvbmZpZyA9IHtcbiAgICAgICAgaW5qZWN0SW50b1RoaXM6IHRydWUsXG4gICAgICAgIGluamVjdEludG86IG51bGwsXG4gICAgICAgIHByb3BlcnRpZXM6IFtcInNweVwiLCBcInN0dWJcIiwgXCJtb2NrXCIsIFwiY2xvY2tcIiwgXCJzZXJ2ZXJcIiwgXCJyZXF1ZXN0c1wiXSxcbiAgICAgICAgdXNlRmFrZVRpbWVyczogdHJ1ZSxcbiAgICAgICAgdXNlRmFrZVNlcnZlcjogdHJ1ZVxuICAgIH07XG5cbiAgICBpZiAoY29tbW9uSlNNb2R1bGUpIHtcbiAgICAgICAgbW9kdWxlLmV4cG9ydHMgPSB0ZXN0O1xuICAgIH0gZWxzZSB7XG4gICAgICAgIHNpbm9uLnRlc3QgPSB0ZXN0O1xuICAgIH1cbn0odHlwZW9mIHNpbm9uID09IFwib2JqZWN0XCIg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ICB9XG5cbiAgICAgICAgICAgIHZhciBleGNlcHRpb24sIHJlc3VsdDtcblxuICAgICAgICAgICAgdHJ5IHtcbiAgICAgICAgICAgICAgICByZXN1bHQgPSBwcm9wZXJ0eS5hcHBseSh0aGlzLCBhcmd1bWVudHMpO1xuICAgICAgICAgICAgfSBjYXRjaCAoZSkge1xuICAgICAgICAgICAgICAgIGV4Y2VwdGlvbiA9IGU7XG4gICAgICAgICAgICB9XG5cbiAgICAgICAgICAgIGlmICh0ZWFyRG93bikge1xuICAgICAgICAgICAgICAgIHRlYXJEb3duLmFwcGx5KHRoaXMsIGFyZ3VtZW50cyk7XG4gICAgICAgICAgICB9XG5cbiAgICAgICAgICAgIGlmIChleGNlcHRpb24pIHtcbiAgICAgICAgICAgICAgICB0aHJvdyBleGNlcHRpb247XG4gICAgICAgICAgICB9XG5cbiAgICAgICAgICAgIHJldHVybiByZXN1bHQ7XG4gICAgICAgIH07XG4gICAgfVxuXG4gICAgZnVuY3Rpb24gdGVzdENhc2UodGVzdHMsIHByZWZpeCkge1xuICAgICAgICAvKmpzbDppZ25vcmUqL1xuICAgICAgICBpZiAoIXRlc3RzIHx8IHR5cGVvZiB0ZXN0cyAhPSBcIm9iamVjdFwiKSB7XG4gICAgICAgICAgICB0aHJvdyBuZXcgVHlwZUVycm9yKFwic2lub24udGVzdENhc2UgbmVlZHMgYW4gb2JqZWN0IHdpdGggdGVzdCBmdW5jdGlvbnNcIik7XG4gICAgICAgIH1cbiAgICAgICAgLypqc2w6ZW5kKi9cblxuICAgICAgICBwcmVmaXggPSBwcmVmaXggfHwgXCJ0ZXN0XCI7XG4gICAgICAgIHZhciByUHJlZml4ID0gbmV3IFJlZ0V4cChcIl5cIiArIHByZWZpeCk7XG4gICAgICAgIHZhciBtZXRob2RzID0ge30sIHRlc3ROYW1lLCBwcm9wZXJ0eSwgbWV0aG9kO1xuICAgICAgICB2YXIgc2V0VXAgPSB0ZXN0cy5zZXRVcDtcbiAgICAgICAgdmFyIHRlYXJEb3duID0gdGVzdHMudGVhckRvd247XG5cbiAgICAgICAgZm9yICh0ZXN0TmFtZSBpbiB0ZXN0cykge1xuICAgICAgICAgICAgaWYgKHRlc3RzLmhhc093blByb3BlcnR5KHRlc3ROYW1lKSkge1xuICAgICAgICAgICAgICAgIHByb3BlcnR5ID0gdGVzdHNbdGVzdE5hbWVdO1xuXG4gICAgICAgICAgICAgICAgaWYgKC9eKHNldFVwfHRlYXJEb3duKSQvLnRlc3QodGVzdE5hbWUpKSB7XG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgICAgIGlmICh0eXBlb2YgcHJvcGVydHkgPT0gXCJmdW5jdGlvblwiICYmIHJQcmVmaXgudGVzdCh0ZXN0TmFtZSkpIHtcbiAgICAgICAgICAgICAgICAgICAgbWV0aG9kID0gcHJvcGVydHk7XG5cbiAgICAgICAgICAgICAgICAgICAgaWYgKHNldFVwIHx8IHRlYXJEb3duKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBtZXRob2QgPSBjcmVhdGVUZXN0KHByb3BlcnR5LCBzZXRVcCwgdGVhckRvd24pO1xuICAgICAgICAgICAgICAgICAgICB9XG5cbiAgICAgICAgICAgICAgICAgICAgbWV0aG9kc1t0ZXN0TmFtZV0gPSBzaW5vbi50ZXN0KG1ldGhvZCk7XG4gICAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgbWV0aG9kc1t0ZXN0TmFtZV0gPSB0ZXN0c1t0ZXN0TmFtZV07XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfVxuICAgICAgICB9XG5cbiAgICAgICAgcmV0dXJuIG1ldGhvZHM7XG4gICAgfVxuXG4gICAgaWYgKGNvbW1vbkpTTW9kdWxlKSB7XG4gICAgICAgIG1vZHVsZS5leHBvcnRzID0gdGVzdENhc2U7XG4gICAgfSBlbHNlIHtcbiAgICAgICAgc2lub24udGVzdENhc2Ug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ICAgIHRocm93IG5ldyBFcnJvcihcIkZ1bmN0aW9uIHJlcXVpcmVzIGF0IGxlYXN0IDEgcGFyYW1ldGVyXCIpO1xuICAgICAgICB9XG5cbiAgICAgICAgdmFyIHRvSWQgPSBpZCsrO1xuICAgICAgICB2YXIgZGVsYXkgPSBhcmdzWzFdIHx8IDA7XG5cbiAgICAgICAgaWYgKCF0aGlzLnRpbWVvdXRzKSB7XG4gICAgICAgICAgICB0aGlzLnRpbWVvdXRzID0ge307XG4gICAgICAgIH1cblxuICAgICAgICB0aGlzLnRpbWVvdXRzW3RvSWRdID0ge1xuICAgICAgICAgICAgaWQ6IHRvSWQsXG4gICAgICAgICAgICBmdW5jOiBhcmdzWzBdLFxuICAgICAgICAgICAgY2FsbEF0OiB0aGlzLm5vdyArIGRlbGF5LFxuICAgICAgICAgICAgaW52b2tlQXJnczogQXJyYXkucHJvdG90eXBlLnNsaWNlLmNhbGwoYXJncywgMilcbiAgICAgICAgfTtcblxuICAgICAgICBpZiAocmVjdXJyaW5nID09PSB0cnVlKSB7XG4gICAgICAgICAgICB0aGlzLnRpbWVvdXRzW3RvSWRdLmludGVydmFsID0gZGVsYXk7XG4gICAgICAgIH1cblxuICAgICAgICByZXR1cm4gdG9JZDtcbiAgICB9XG5cbiAgICBmdW5jdGlvbiBwYXJzZVRpbWUoc3RyKSB7XG4gICAgICAgIGlmICghc3RyKSB7XG4gICAgICAgICAgICByZXR1cm4gMDtcbiAgICAgICAgfVxuXG4gICAgICAgIHZhciBzdHJpbmdzID0gc3RyLnNwbGl0KFwiOlwiKTtcbiAgICAgICAgdmFyIGwgPSBzdHJpbmdzLmxlbmd0aCwgaSA9IGw7XG4gICAgICAgIHZhciBtcyA9IDAsIHBhcnNlZDtcblxuICAgICAgICBpZiAobCA+IDMgfHwgIS9eKFxcZFxcZDopezAsMn1cXGRcXGQ/JC8udGVzdChzdHIpKSB7XG4gICAgICAgICAgICB0aHJvdyBuZXcgRXJyb3IoXCJ0aWNrIG9ubHkgdW5kZXJzdGFuZHMgbnVtYmVycyBhbmQgJ2g6bTpzJ1wiKTtcbiAgICAgICAgfVxuXG4gICAgICAgIHdoaWxlIChpLS0pIHtcbiAgICAgICAgICAgIHBhcnNlZCA9IHBhcnNlSW50KHN0cmluZ3NbaV0sIDEwKTtcblxuICAgICAgICAgICAgaWYgKHBhcnNlZCA+PSA2MCkge1xuICAgICAgICAgICAgICAgIHRocm93IG5ldyBFcnJvcihcIkludmFsaWQgdGltZSBcIiArIHN0cik7XG4gICAgICAgICAgICB9XG5cbiAgICAgICAgICAgIG1zICs9IHBhcnNlZCAqIE1hdGgucG93KDYwLCAobCAtIGkgLSAxKSk7XG4gICAgICAgIH1cblxuICAgICAgICByZXR1cm4gbXMgKiAxMDAwO1xuICAgIH1cblxuICAgIGZ1bmN0aW9uIGNyZWF0ZU9iamVjdChvYmplY3QpIHtcbiAgICAgICAgdmFyIG5ld09iamVjdDtcblxuICAgICAgICBpZiAoT2JqZWN0LmNyZWF0ZSkge1xuICAgICAgICAgICAgbmV3T2JqZWN0ID0gT2JqZWN0LmNyZWF0ZShvYmplY3QpO1xuICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgdmFyIEYgPSBmdW5jdGlvbiAoKSB7fTtcbiAgICAgICAgICAgIEYucHJvdG90eXBlID0gb2JqZWN0O1xuICAgICAgICAgICAgbmV3T2JqZWN0ID0gbmV3IEYoKTtcbiAgICAgICAgfVxuXG4gICAgICAgIG5ld09iamVjdC5EYXRlLmNsb2NrID0gbmV3T2JqZWN0O1xuICAgICAgICByZXR1cm4gbmV3T2JqZWN0O1xuICAgIH1cblxuICAgIHNpbm9uLmNsb2NrID0ge1xuICAgICAgICBub3c6IDAsXG5cbiAgICAgICAgY3JlYXRlOiBmdW5jdGlvbiBjcmVhdGUobm93KSB7XG4gICAgICAgICAgICB2YXIgY2xvY2sgPSBjcmVhdGVPYmplY3QodGhpcyk7XG5cbiAgICAgICAgICAgIGlmICh0eXBlb2Ygbm93ID09IFwibnVtYmVyXCIpIHtcbiAgICAgICAgICAgICAgICBjbG9jay5ub3cgPSBub3c7XG4gICAgICAgICAgICB9XG5cbiAgICAgICAgICAgIGlmICghIW5vdyAmJiB0eXBlb2Ygbm93ID09IFwib2JqZWN0XCIpIHtcbiAgICAgICAgICAgICAgICB0aHJvdyBuZXcgVHlwZUVycm9yKFwibm93IHNob3VsZCBiZSBtaWxsaXNlY29uZHMgc2luY2UgVU5JWCBlcG9jaFwiKTtcbiAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgcmV0dXJuIGNsb2NrO1xuICAgICAgICB9LFxuXG4gICAgICAgIHNldFRpbWVvdXQ6IGZ1bmN0aW9uIHNldFRpbWVvdXQoY2FsbGJhY2ssIHRpbWVvdXQpIHtcbiAgICAgICAgICAgIHJldHVybiBhZGRUaW1lci5jYWxsKHRoaXMsIGFyZ3VtZW50cywgZmFsc2UpO1xuICAgICAgICB9LFxuXG4gICAgICAgIGNsZWFyVGltZW91dDogZnVuY3Rpb24gY2xlYXJUaW1lb3V0KHRpbWVySWQpIHtcbiAgICAgICAgICAgIGlmICghdGhpcy50aW1lb3V0cykge1xuICAgICAgICAgICAgICAgIHRoaXMudGltZW91dHMgPSBbXTtcbiAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgaWYgKHRpbWVySWQgaW4gdGhpcy50aW1lb3V0cykge1xuICAgICAgICAgICAgICAgIGRlbGV0ZSB0aGlzLnRpbWVvdXRzW3RpbWVySWRdO1xuICAgICAgICAgICAgfVxuICAgICAgICB9LFxuXG4gICAgICAgIHNldEludGVydmFsOiBmdW5jdGlvbiBzZXRJbnRlcnZhbChjYWxsYmFjaywgdGltZW91dCkge1xuICAgICAgICAgICAgcmV0dXJuIGFkZFRpbWVyLmNhbGwodGhpcywgYXJndW1lbnRzLCB0cnVlKTtcbiAgICAgICAgfSxcblxuICAgICAgICBjbGVhckludGVydmFsOiBmdW5jdGlvbiBjbGVhckludGVydmFsKHRpbWVySWQpIHtcbiAgICAgICAgICAgIHRoaXMuY2xlYXJUaW1lb3V0KHRpbWVySWQpO1xuICAgICAgICB9LFxuXG4gICAgICAgIHRpY2s6IGZ1bmN0aW9uIHRpY2sobXMpIHtcbiAgICAgICAgICAgIG1zID0gdHlwZW9mIG1zID09IFwibnVtYmVyXCIgPyBtcyA6IHBhcnNlVGltZShtcyk7XG4gICAgICAgICAgICB2YXIgdGlja0Zyb20gPSB0aGlzLm5vdywgdGlja1RvID0gdGhpcy5ub3cgKyBtcywgcHJldmlvdXMgPSB0aGlzLm5vdztcbiAgICAgICAgICAgIHZhciB0aW1lciA9IHRoaXMuZmlyc3RUaW1lckluUmFuZ2UodGlja0Zyb20sIHRpY2tUbyk7XG5cbiAgICAgICAgICAgIHZhciBmaXJzdEV4Y2VwdGlvbjtcbiAgICAgICAgICAgIHdoaWxlICh0aW1lciAmJiB0aWNrRnJvbSA8PSB0aWNrVG8pIHtcbiAgICAgICAgICAgICAgICBpZiAodGhpcy50aW1lb3V0c1t0aW1lci5pZF0pIHtcbiAgICAgICAgICAgICAgICAgICAgdGlja0Zyb20gPSB0aGlzLm5vdyA9IHRpbWVyLmNhbGxBdDtcbiAgICAgICAgICAgICAgICAgICAgdHJ5IHtcbiAgICAgICAgICAgICAgICAgICAgICB0aGlzLmNhbGxUaW1lcih0aW1lcik7XG4gICAgICAgICAgICAgICAgICAgIH0gY2F0Y2ggKGUpIHtcbiAgICAgICAgICAgICAgICAgICAgICBmaXJzdEV4Y2VwdGlvbiA9IGZpcnN0RXhjZXB0aW9uIHx8IGU7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICB9XG5cbiAgICAgICAgICAgICAgICB0aW1lciA9IHRoaXMuZmlyc3RUaW1lckluUmFuZ2UocHJldmlvdXMsIHRpY2tUbyk7XG4gICAgICAgICAgICAgICAgcHJldmlvdXMgPSB0aWNrRnJvbTtcbiAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgdGhpcy5ub3cgPSB0aWNrVG87XG5cbiAgICAgICAgICAgIGlmIChmaXJzdEV4Y2VwdGlvbikge1xuICAgICAgICAgICAgICB0aHJvdyBmaXJzdEV4Y2VwdGlvbjtcbiAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgcmV0dXJuIHRoaXMubm93O1xuICAgICAgICB9LFxuXG4gICAgICAgIGZpcnN0VGltZXJJblJhbmdlOiBmdW5jdGlvbiAoZnJvbSwgdG8pIHtcbiAgICAgICAgICAgIHZhciB0aW1lciwgc21hbGxlc3QsIG9yaWdpbmFsVGltZXI7XG5cbiAgICAgICAgICAgIGZvciAodmFyIGlkIGluIHRoaXMudGltZW91dHMpIHtcbiAgICAgICAgICAgICAgICBpZiAodGhpcy50aW1lb3V0cy5oYXNPd25Qcm9wZXJ0eShpZCkpIHtcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRoaXMudGltZW91dHNbaWRdLmNhbGxBdCA8IGZyb20gfHwgdGhpcy50aW1lb3V0c1tpZF0uY2FsbEF0ID4gdG8pIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgICAgICAgICB9XG5cbiAgICAgICAgICAgICAgICAgICAgaWYgKCFzbWFsbGVzdCB8fCB0aGlzLnRpbWVvdXRzW2lkXS5jYWxsQXQgPCBzbWFsbGVzdCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgb3JpZ2luYWxUaW1lciA9IHRoaXMudGltZW91dHNbaWRdO1xuICAgICAgICAgICAgICAgICAgICAgICAgc21hbGxlc3QgPSB0aGlzLnRpbWVvdXRzW2lkXS5jYWxsQXQ7XG5cbiAgICAgICAgICAgICAgICAgICAgICAgIHRpbWVyID0ge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGZ1bmM6IHRoaXMudGltZW91dHNbaWRdLmZ1bmMsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgY2FsbEF0OiB0aGlzLnRpbWVvdXRzW2lkXS5jYWxsQXQsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgaW50ZXJ2YWw6IHRoaXMudGltZW91dHNbaWRdLmludGVydmFsLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlkOiB0aGlzLnRpbWVvdXRzW2lkXS5pZCxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBpbnZva2VBcmdzOiB0aGlzLnRpbWVvdXRzW2lkXS5pbnZva2VBcmdzXG4gICAgICAgICAgICAgICAgICAgICAgICB9O1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICByZXR1cm4gdGltZXIgfHwgbnVsbDtcbiAgICAgICAgfSxcblxuICAgICAgICBjYWxsVGltZXI6IGZ1bmN0aW9uICh0aW1lcikge1xuICAgICAgICAgICAgaWYgKHR5cGVvZiB0aW1lci5pbnRlcnZhbCA9PSBcIm51bWJlclwiKSB7XG4gICAgICAgICAgICAgICAgdGhpcy50aW1lb3V0c1t0aW1lci5pZF0uY2FsbEF0ICs9IHRpbWVyLmludGVydmFsO1xuICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICBkZWxldGUgdGhpcy50aW1lb3V0c1t0aW1lci5pZF07XG4gICAgICAgICAgICB9XG5cbiAgICAgICAgICAgIHRyeSB7XG4gICAgICAgICAgICAgICAgaWYgKHR5cGVvZiB0aW1lci5mdW5jID09IFwiZnVuY3Rpb25cIikge1xuICAgICAgICAgICAgICAgICAgICB0aW1lci5mdW5jLmFwcGx5KG51bGwsIHRpbWVyLmludm9rZUFyZ3MpO1xuICAgICAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgICAgIGV2YWwodGltZXIuZnVuYyk7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfSBjYXRjaCAoZSkge1xuICAgICAgICAgICAgICB2YXIgZXhjZXB0aW9uID0gZTtcbiAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgaWYgKCF0aGlzLnRpbWVvdXRzW3RpbWVyLmlkXSkge1xuICAgICAgICAgICAgICAgIGlmIChleGNlcHRpb24pIHtcbiAgICAgICAgICAgICAgICAgIHRocm93IGV4Y2VwdGlvbjtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgcmV0dXJuO1xuICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICBpZiAoZXhjZXB0aW9uKSB7XG4gICAgICAgICAgICAgIHRocm93IGV4Y2VwdGlvbjtcbiAgICAgICAgICAgIH1cbiAgICAgICAgfSxcblxuICAgICAgICByZXNldDogZnVuY3Rpb24gcmVzZXQoKSB7XG4gICAgICAgICAgICB0aGlzLnRpbWVvdXRzID0ge307XG4gICAgICAgIH0sXG5cbiAgICAgICAgRGF0ZTogKGZ1bmN0aW9uICgpIHtcbiAgICAgICAgICAgIHZhciBOYXRpdmVEYXRlID0gRGF0ZTtcblxuICAgICAgICAgICAgZnVuY3Rpb24gQ2xvY2tEYXRlKHllYXIsIG1vbnRoLCBkYXRlLCBob3VyLCBtaW51dGUsIHNlY29uZCwgbXMpIHtcbiAgICAgICAgICAgICAgICAvLyBEZWZlbnNpdmUgYW5kIHZlcmJvc2UgdG8gYXZvaWQgcG90ZW50aWFsIGhhcm0gaW4gcGFzc2luZ1xuICAgICAgICAgICAgICAgIC8vIGV4cGxpY2l0IHVuZGVmaW5lZCB3aGVuIHVzZXIgZG9lcyBub3QgcGFzcyBhcmd1bWVudFxuICAgICAgICAgICAgICAgIHN3aXRjaCAoYXJndW1lbnRzLmxlbmd0aCkge1xuICAgICAgICAgICAgICAgIGNhc2UgMDpcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIG5ldyBOYXRpdmVEYXRlKENsb2NrRGF0ZS5jbG9jay5ub3cpO1xuICAgICAgICAgICAgICAgIGNhc2UgMTpcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIG5ldyBOYXRpdmVEYXRlKHllYXIpO1xuICAgICAgICAgICAgICAgIGNhc2UgMjpcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIG5ldyBOYXRpdmVEYXRlKHllYXIsIG1vbnRoKTtcbiAgICAgICAgICAgICAgICBjYXNlIDM6XG4gICAgICAgICAgICAgICAgICAgIHJldHVybiBuZXcgTmF0aXZlRGF0ZSh5ZWFyLCBtb250aCwgZGF0ZSk7XG4gICAgICAgICAgICAgICAgY2FzZSA0OlxuICAgICAgICAgICAgICAgICAgICByZXR1cm4gbmV3IE5hdGl2ZURhdGUoeWVhciwgbW9udGgsIGRhdGUsIGhvdXIpO1xuICAgICAgICAgICAgICAgIGNhc2UgNTpcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIG5ldyBOYXRpdmVEYXRlKHllYXIsIG1vbnRoLCBkYXRlLCBob3VyLCBtaW51dGUpO1xuICAgICAgICAgICAgICAgIGNhc2UgNjpcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIG5ldyBOYXRpdmVEYXRlKHllYXIsIG1vbnRoLCBkYXRlLCBob3VyLCBtaW51dGUsIHNlY29uZCk7XG4gICAgICAgICAgICAgICAgZGVmYXVsdDpcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIG5ldyBOYXRpdmVEYXRlKHllYXIsIG1vbnRoLCBkYXRlLCBob3VyLCBtaW51dGUsIHNlY29uZCwgbXMpO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgcmV0dXJuIG1pcnJvckRhdGVQcm9wZXJ0aWVzKENsb2NrRGF0ZSwgTmF0aXZlRGF0ZSk7XG4gICAgICAgIH0oKSlcbiAgICB9O1xuXG4gICAgZnVuY3Rpb24gbWlycm9yRGF0ZVByb3BlcnRpZXModGFyZ2V0LCBzb3VyY2UpIHtcbiAgICAgICAgaWYgKHNvdXJjZS5ub3cpIHtcbiAgICAgICAgICAgIHRhcmdldC5ub3cgPSBmdW5jdGlvbiBub3coKSB7XG4gICAgICAgICAgICAgICAgcmV0dXJuIHRhcmdldC5jbG9jay5ub3c7XG4gICAgICAgICAgICB9O1xuICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgZGVsZXRlIHRhcmdldC5ub3c7XG4gICAgICAgIH1cblxuICAgICAgICBpZiAoc291cmNlLnRvU291cmNlKSB7XG4gICAgICAgICAgICB0YXJnZXQudG9Tb3VyY2UgPSBmdW5jdGlvbiB0b1NvdXJjZSgpIHtcbiAgICAgICAgICAgICAgICByZXR1cm4gc291cmNlLnRvU291cmNlKCk7XG4gICAgICAgICAgICB9O1xuICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgZGVsZXRlIHRhcmdldC50b1NvdXJjZTtcbiAgICAgICAgfVxuXG4gICAgICAgIHRhcmdldC50b1N0cmluZyA9IGZ1bmN0aW9uIHRvU3RyaW5nKCkge1xuICAgICAgICAgICAgcmV0dXJuIHNvdXJjZS50b1N0cmluZygpO1xuICAgICAgICB9O1xuXG4gICAgICAgIHRhcmdldC5wcm90b3R5cGUgPSBzb3VyY2UucHJvdG90eXBlO1xuICAgICAgICB0YXJnZXQucGFyc2UgPSBzb3VyY2UucGFyc2U7XG4gICAgICAgIHRhcmdldC5VVEMgPSBzb3VyY2UuVVRDO1xuICAgICAgICB0YXJnZXQucHJvdG90eXBlLnRvVVRDU3RyaW5nID0gc291cmNlLnByb3RvdHlwZS50b1VUQ1N0cmluZztcbiAgICAgICAgcmV0dXJuIHRhcmdldDtcbiAgICB9XG5cbiAgICB2YXIgbWV0aG9kcyA9IFtcIkRhdGVcIiwgXCJzZXRUaW1lb3V0XCIsIFwic2V0SW50ZXJ2YWxcIixcbiAgICAgICAgICAgICAgICAgICBcImNsZWFyVGltZW91dFwiLCBcImNsZWFySW50ZXJ2YWxcIl07XG5cbiAgICBmdW5jdGlvbiByZXN0b3JlKCkge1xuICAgICAgICB2YXIgbWV0aG9kO1xuXG4gICAgICAgIGZvciAodmFyIGkgPSAwLCBsID0gdGhpcy5tZXRob2RzLmxlbmd0aDsgaSA8IGw7IGkrKykge1xuICAgICAgICAgICAgbWV0aG9kID0gdGhpcy5tZXRob2RzW2ldO1xuICAgICAgICAgICAgaWYgKGdsb2JhbFttZXRob2RdLmhhZE93blByb3BlcnR5KSB7XG4gICAgICAgICAgICAgICAgZ2xvYmFsW21ldGhvZF0gPSB0aGlzW1wiX1wiICsgbWV0aG9kXTtcbiAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgZGVsZXRlIGdsb2JhbFttZXRob2RdO1xuICAgICAgICAgICAgfVxuICAgICAgICB9XG5cbiAgICAgICAgLy8gUHJldmVudCBtdWx0aXBsZSBleGVjdXRpb25zIHdoaWNoIHdpbGwgY29tcGxldGVseSByZW1vdmUgdGhlc2UgcHJvcHNcbiAgICAgICAgdGhpcy5tZXRob2RzID0gW107XG4gICAgfVxuXG4gICAgZnVuY3Rpb24gc3R1Ykdsb2JhbChtZXRob2QsIGNsb2NrKSB7XG4gICAgICAgIGNsb2NrW21ldGhvZF0uaGFkT3duUHJvcGVydHkgPSBPYmplY3QucHJvdG90eXBlLmhhc093blByb3BlcnR5LmNhbGwoZ2xvYmFsLCBtZXRob2QpO1xuICAgICAgICBjbG9ja1tcIl9cIiArIG1ldGhvZF0gPSBnbG9iYWxbbWV0aG9kXTtcblxuICAgICAgICBpZiAobWV0aG9kID09IFwiRGF0ZVwiKSB7XG4gICAgICAgICAgICB2YXIgZGF0ZSA9IG1pcnJvckRhdGVQcm9wZXJ0aWVzKGNsb2NrW21ldGhvZF0sIGdsb2JhbFttZXRob2RdKTtcbiAgICAgICAgICAgIGdsb2JhbFttZXRob2RdID0gZGF0ZTtcbiAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgIGdsb2JhbFttZXRob2RdID0gZnVuY3Rpb24gKCkge1xuICAgICAgICAgICAgICAgIHJldHVybiBjbG9ja1ttZXRob2RdLmFwcGx5KGNsb2NrLCBhcmd1bWVudHMpO1xuICAgICAgICAgICAgfTtcblxuICAgICAgICAgICAgZm9yICh2YXIgcHJvcCBpbiBjbG9ja1ttZXRob2RdKSB7XG4gICAgICAgICAgICAgICAgaWYgKGNsb2NrW21ldGhvZF0uaGFzT3duUHJvcGVydHkocHJvcCkpIHtcbiAgICAgICAgICAgICAgICAgICAgZ2xvYmFsW21ldGhvZF1bcHJvcF0gPSBjbG9ja1ttZXRob2RdW3Byb3BdO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH1cbiAgICAgICAgfVxuXG4gICAgICAgIGdsb2JhbFttZXRob2RdLmNsb2NrID0gY2xvY2s7XG4gICAgfVxuXG4gICAgc2lub24udXNlRmFrZVRpbWVycyA9IGZ1bmN0aW9uIHVzZUZha2VUaW1lcnMobm93KSB7XG4gICAgICAgIHZhciBjbG9jayA9IHNpbm9uLmNsb2NrLmNyZWF0ZShub3cpO1xuICAgICAgICBjbG9jay5yZXN0b3JlID0gcmVzdG9yZTtcbiAgICAgICAgY2xvY2subWV0aG9kcyA9IEFycmF5LnByb3RvdHlwZS5zbGljZS5jYWxsKGFyZ3VtZW50cyxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHR5cGVvZiBub3cgPT0gXCJudW1iZXJcIiA/IDEgOiAwKTtcblxuICAgICAgICBpZiAoY2xvY2subWV0aG9kcy5sZW5ndGggPT09IDApIHtcbiAgICAgICAgICAgIGNsb2NrLm1ldGhvZHMgPSBtZXRob2RzO1xuICAgICAgICB9XG5cbiAgICAgICAgZm9yICh2YXIgaSA9IDAsIGwgPSBjbG9jay5tZXRob2RzLmxlbmd0aDsgaSA8IGw7IGkrKykge1xuICAgICAgICAgICAgc3R1Ykdsb2JhbChjbG9jay5tZXRob2RzW2ldLCBjbG9jayk7XG4gICAgICAgIH1cblxuICAgICAgICByZXR1cm4gY2xvY2s7XG4gICAgfTtcbn0odHlwZW9mIGdsb2JhbCAhPSBcInVuZGVmaW5lZFwiICYmIHR5cGVvZiBnbG9iYWwgIT09IFwiZnVuY3Rpb25cIiA/IGdsb2JhbCA6IHRoaXMpKTtcblxuc2l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4gYXNjaWkuYXJyYXkuY2FsbCh0aGlzLCBvYmplY3QsIHByb2Nlc3NlZCk7XG4gICAgICAgIH1cblxuICAgICAgICBpZiAoIW9iamVjdCkge1xuICAgICAgICAgICAgcmV0dXJuIFwiXCIgKyBvYmplY3Q7XG4gICAgICAgIH1cblxuICAgICAgICBpZiAoYnVzdGVyLmlzRWxlbWVudChvYmplY3QpKSB7XG4gICAgICAgICAgICByZXR1cm4gYXNjaWkuZWxlbWVudChvYmplY3QpO1xuICAgICAgICB9XG5cbiAgICAgICAgaWYgKHR5cGVvZiBvYmplY3QudG9TdHJpbmcgPT0gXCJmdW5jdGlvblwiICYmXG4gICAgICAgICAgICBvYmplY3QudG9TdHJpbmcgIT09IE9iamVjdC5wcm90b3R5cGUudG9TdHJpbmcpIHtcbiAgICAgICAgICAgIHJldHVybiBvYmplY3QudG9TdHJpbmcoKTtcbiAgICAgICAgfVxuXG4gICAgICAgIGZvciAodmFyIGkgPSAwLCBsID0gc3BlY2lhbE9iamVjdHMubGVuZ3RoOyBpIDwgbDsgaSsrKSB7XG4gICAgICAgICAgICBpZiAob2JqZWN0ID09PSBzcGVjaWFsT2JqZWN0c1tpXS5vYmopIHtcbiAgICAgICAgICAgICAgICByZXR1cm4gc3BlY2lhbE9iamVjdHNbaV0udmFsdWU7XG4gICAgICAgICAgICB9XG4gICAgICAgIH1cblxuICAgICAgICByZXR1cm4gYXNjaWkub2JqZWN0LmNhbGwodGhpcywgb2JqZWN0LCBwcm9jZXNzZWQsIGluZGVudCk7XG4gICAgfVxuXG4gICAgYXNjaWkuZnVuYyA9IGZ1bmN0aW9uIChmdW5jKSB7XG4gICAgICAgIHJldHVybiBcImZ1bmN0aW9uIFwiICsgYnVzdGVyLmZ1bmN0aW9uTmFtZShmdW5jKSArIFwiKCkge31cIjtcbiAgICB9O1xuXG4gICAgYXNjaWkuYXJyYXkgPSBmdW5jdGlvbiAoYXJyYXksIHByb2Nlc3NlZCkge1xuICAgICAgICBwcm9jZXNzZW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ICAgICAgICAgc3RyID0gXCJbQ2lyY3VsYXJdXCI7XG4gICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgIHN0ciA9IGFzY2lpLmNhbGwodGhpcywgb2JqLCBwcm9jZXNzZWQsIGluZGVudCArIDIpO1xuICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICBzdHIgPSAoL1xccy8udGVzdChwcm9wKSA/ICdcIicgKyBwcm9wICsgJ1wiJyA6IHByb3ApICsgXCI6IFwiICsgc3RyO1xuICAgICAgICAgICAgbGVuZ3RoICs9IHN0ci5sZW5ndGg7XG4gICAgICAgICAgICBwaWVjZXMucHVzaChzdHIpO1xuICAgICAgICB9XG5cbiAgICAgICAgdmFyIGNvbnMgPSBhc2NpaS5jb25zdHJ1Y3Rvck5hbWUuY2FsbCh0aGlzLCBvYmplY3QpO1xuICAgICAgICB2YXIgcHJlZml4ID0gY29ucyA/IFwiW1wiICsgY29ucyArIFwiXSBcIiA6IFwiXCJcblxuICAgICAgICByZXR1cm4gKGxlbmd0aCArIGluZGVudCkgPiA4MCA/XG4gICAgICAgICAgICBwcmVmaXggKyBcIntcXG4gIFwiICsgaXMgKyBwaWVjZXMuam9pbihcIixcXG4gIFwiICsgaXMpICsgXCJcXG5cIiArIGlzICsgXCJ9XCIgOlxuICAgICAgICAgICAgcHJlZml4ICsgXCJ7IFwiICsgcGllY2VzLmpvaW4oXCIsIFwiKSArIFwiIH1cIjtcbiAgICB9O1xuXG4gICAgYXNjaWkuZWxlbWVudCA9IGZ1bmN0aW9uIChlbGVtZW50KSB7XG4gICAgICAgIHZhciB0YWdOYW1lID0gZWxlbWVudC50YWdOYW1lLnRvTG93ZXJDYXNlKCk7XG4gICAgICAgIHZhciBhdHRycyA9IGVsZW1lbnQuYXR0cmlidXRlcywgYXR0cmlidXRlLCBwYWlycyA9IFtdLCBhdHRyTmFtZTtcblxuICAgICAgICBmb3IgKHZhciBpID0gMCwgbCA9IGF0dHJzLmxlbmd0aDsgaSA8IGw7ICsraSkge1xuICAgICAgICAgICAgYXR0cmlidXRlID0gYXR0cnMuaXRlbShpKTtcbiAgICAgICAgICAgIGF0dHJOYW1lID0gYXR0cmlidXRlLm5vZGVOYW1lLnRvTG93ZXJDYXNlKCkucmVwbGFjZShcImh0bWw6XCIsIFwiXCIpO1xuXG4gICAgICAgICAgICBpZiAoYXR0ck5hbWUgPT0gXCJjb250ZW50ZWRpdGFibGVcIiAmJiBhdHRyaWJ1dGUubm9kZVZhbHVlID09IFwiaW5oZXJpdFwiKSB7XG4gICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICB9XG5cbiAgICAgICAgICAgIGlmICghIWF0dHJpYnV0ZS5ub2RlVmFsdWUpIHtcbiAgICAgICAgICAgICAgICBwYWlycy5wdXNoKGF0dHJOYW1lICsgXCI9XFxcIlwiICsgYXR0cmlidXRlLm5vZGVWYWx1ZSArIFwiXFxcIlwiKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgfVxuXG4gICAgICAgIHZhciBmb3JtYXR0ZWQgPSBcIjxcIiArIHRhZ05hbWUgKyAocGFpcnMubGVuZ3RoID4gMCA/IFwiIFwiIDogXCJcIik7XG4gICAgICAgIHZhciBjb250ZW50ID0gZWxlbWVudC5pbm5lckhUTUw7XG5cbiAgICAgICAgaWYgKGNvbnRlbnQubGVuZ3RoID4gMjApIHtcbiAgICAgICAgICAgIGNvbnRlbnQgPSBjb250ZW50LnN1YnN0cigwLCAyMCkgKyBcIlsuLi5dXCI7XG4gICAgICAgIH1cblxuICAgICAgICB2YXIgcmVzID0gZm9ybWF0dGVkICsgcGFpcnMuam9pbihcIiBcIikgKyBcIj5cIiArIGNvbnRlbnQgKyBcIjwvXCIgKyB0YWdOYW1lICsgXCI+XCI7XG5cbiAgICAgICAgcmV0dXJuIHJlcy5yZXBsYWNlKC8gY29udGVudEVkaXRhYmxlPVwiaW5oZXJpdFwiLywgXCJcIik7XG4gICAgfTtcblxuICAgIGFzY2lpLmNvbnN0cnVjdG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W9mIGRvY3VtZW50ICE9IFwidW5kZWZpbmVkXCIgJiYgZG9jdW1lbnQuY3JlYXRlRWxlbWVudChcImRpdlwiKTtcbiAgICB2YXIgRiA9IGZ1bmN0aW9uICgpIHt9O1xuXG4gICAgdmFyIGJ1c3RlciA9IHtcbiAgICAgICAgYmluZDogZnVuY3Rpb24gYmluZChvYmosIG1ldGhPclByb3ApIHtcbiAgICAgICAgICAgIHZhciBtZXRob2QgPSB0eXBlb2YgbWV0aE9yUHJvcCA9PSBcInN0cmluZ1wiID8gb2JqW21ldGhPclByb3BdIDogbWV0aE9yUHJvcDtcbiAgICAgICAgICAgIHZhciBhcmdzID0gQXJyYXkucHJvdG90eXBlLnNsaWNlLmNhbGwoYXJndW1lbnRzLCAyKTtcbiAgICAgICAgICAgIHJldHVybiBmdW5jdGlvbiAoKSB7XG4gICAgICAgICAgICAgICAgdmFyIGFsbEFyZ3MgPSBhcmdzLmNvbmNhdChBcnJheS5wcm90b3R5cGUuc2xpY2UuY2FsbChhcmd1bWVudHMpKTtcbiAgICAgICAgICAgICAgICByZXR1cm4gbWV0aG9kLmFwcGx5KG9iaiwgYWxsQXJncyk7XG4gICAgICAgICAgICB9O1xuICAgICAgICB9LFxuXG4gICAgICAgIHBhcnRpYWw6IGZ1bmN0aW9uIHBhcnRpYWwoZm4pIHtcbiAgICAgICAgICAgIHZhciBhcmdzID0gW10uc2xpY2UuY2FsbChhcmd1bWVudHMsIDEpO1xuICAgICAgICAgICAgcmV0dXJuIGZ1bmN0aW9uICgpIHtcbiAgICAgICAgICAgICAgICByZXR1cm4gZm4uYXBwbHkodGhpcywgYXJncy5jb25jYXQoW10uc2xpY2UuY2FsbChhcmd1bWVudHMpKSk7XG4gICAgICAgICAgICB9O1xuICAgICAgICB9LFxuXG4gICAgICAgIGNyZWF0ZTogZnVuY3Rpb24gY3JlYXRlKG9iamVjdCkge1xuICAgICAgICAgICAgRi5wcm90b3R5cGUgPSBvYmplY3Q7XG4gICAgICAgICAgICByZXR1cm4gbmV3IEYoKTtcbiAgICAgICAgfSxcblxuICAgICAgICBleHRlbmQ6IGZ1bmN0aW9uIGV4dGVuZCh0YXJnZXQpIHtcbiAgICAgICAgICAgIGlmICghdGFyZ2V0KSB7IHJldHVybjsgfVxuICAgICAgICAgICAgZm9yICh2YXIgaSA9IDEsIGwgPSBhcmd1bWVudHMubGVuZ3RoLCBwcm9wOyBpIDwgbDsgKytpKSB7XG4gICAgICAgICAgICAgICAgZm9yIChwcm9wIGluIGFyZ3VtZW50c1tpXSkge1xuICAgICAgICAgICAgICAgICAgICB0YXJnZXRbcHJvcF0gPSBhcmd1bWVudHNbaV1bcHJvcF07XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfVxuICAgICAgICAgICAgcmV0dXJuIHRhcmdldDtcbiAgICAgICAgfSxcblxuICAgICAgICBuZXh0VGljazogZnVuY3Rpb24gbmV4dFRpY2soY2FsbGJhY2spIHtcbiAgICAgICAgICAgIGlmICh0eXBlb2YgcHJvY2VzcyAhPSBcInVuZGVmaW5lZFwiICYmIHByb2Nlc3MubmV4dFRpY2spIHtcbiAgICAgICAgICAgICAgICByZXR1cm4gcHJvY2Vzcy5uZXh0VGljayhjYWxsYmFjayk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBzZXRUaW1lb3V0KGNhbGxiYWNrLCAwKTtcbiAgICAgICAgfSxcblxuICAgICAgICBmdW5jdGlvbk5hbWU6IGZ1bmN0aW9uIGZ1bmN0aW9uTmFtZShmdW5jKSB7XG4gICAgICAgICAgICBpZiAoIWZ1bmMpIHJldHVybiBcIlwiO1xuICAgICAgICAgICAgaWYgKGZ1bmMuZGlzcGxheU5hbWUpIHJldHVybiBmdW5jLmRpc3BsYXlOYW1lO1xuICAgICAgICAgICAgaWYgKGZ1bmMubmFtZSkgcmV0dXJuIGZ1bmMubmFtZTtcbiAgICAgICAgICAgIHZhciBtYXRjaGVzID0gZnVuYy50b1N0cmluZygpLm1hdGNoKC9mdW5jdGlvblxccysoW15cXChdKykvbSk7XG4gICAgICAgICAgICByZXR1cm4gbWF0Y2hlcyAmJiBtYXRjaGVzWzFdIHx8IFwiXCI7XG4gICAgICAgIH0sXG5cbiAgICAgICAgaXNOb2RlOiBmdW5jdGlvbiBpc05vZGUob2JqKSB7XG4gICAgICAgICAgICBpZiAoIWRpdikgcmV0dXJuIGZhbHNlO1xuICAgICAgICAgICAgdHJ5IHtcbiAgICAgICAgICAgICAgICBvYmouYXBwZW5kQ2hpbGQoZGl2KTtcbiAgICAgICAgICAgICAgICBvYmoucmVtb3ZlQ2hpbGQoZGl2KTtcbiAgICAgICAgICAgIH0gY2F0Y2ggKGUpIHtcbiAgICAgICAgICAgICAgICByZXR1cm4gZmFsc2U7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICByZXR1cm4gdHJ1ZTtcbiAgICAgICAgfSxcblxuICAgICAgICBpc0VsZW1lbnQ6IGZ1bmN0aW9uIGlzRWxlbWVudChvYmopIHtcbiAgICAgICAgICAgIHJldHVybiBvYmogJiYgb2JqLm5vZGVUeXBlID09PSAxICYmIGJ1c3Rlci5pc05vZGUob2JqKTtcbiAgICAgICAgfSxcblxuICAgICAgICBpc0FycmF5OiBmdW5jdGlvbiBpc0FycmF5KGFycikge1xuICAgICAgICAgICAgcmV0dXJuIE9iamVjdC5wcm90b3R5cGUudG9TdHJpbmcuY2FsbChhcnIpID09IFwiW29iamVjdCBBcnJheV1cIjtcbiAgICAgICAgfSxcblxuICAgICAgICBmbGF0dGVuOiBmdW5jdGlvbiBmbGF0dGVuKGFycikge1xuICAgICAgICAgICAgdmFyIHJlc3VsdCA9IFtdLCBhcnIgPSBhcnIgfHwgW107XG4gICAgICAgICAgICBmb3IgKHZhciBpID0gMCwgbCA9IGFyci5sZW5ndGg7IGkgPCBsOyArK2kpIHtcbiAgICAgICAgICAgICAgICByZXN1bHQgPSByZXN1bHQuY29uY2F0KGJ1c3Rlci5pc0FycmF5KGFycltpXSkgPyBmbGF0dGVuKGFycltpXSkgOiBhcnJbaV0pO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgcmV0dXJuIHJlc3VsdDtcbiAgICAgICAgfSxcblxuICAgICAgICBlYWNoOiBmdW5jdGlvbiBlYWNoKGFyciwgY2FsbGJhY2spIHtcbiAgICAgICAgICAgIGZvciAodmFyIGkgPSAwLCBsID0gYXJyLmxlbmd0aDsgaSA8IGw7ICsraSkge1xuICAgICAgICAgICAgICAgIGNhbGxiYWNrKGFycltpXSk7XG4gICAgICAgICAgICB9XG4gICAgICAgIH0sXG5cbiAgICAgICAgbWFwOiBmdW5jdGlvbiBtYXAoYXJyLCBjYWxsYmFjaykge1xuICAgICAgICAgICAgdmFyIHJlc3VsdHMgPSBbXTtcbiAgICAgICAgICAgIGZvciAodmFyIGkgPSAwLCBsID0gYXJyLmxlbmd0aDsgaSA8IGw7ICsraSkge1xuICAgICAgICAgICAgICAgIHJlc3VsdHMucHVzaChjYWxsYmFjayhhcnJbaV0pKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIHJldHVybiByZXN1bHRzO1xuICAgICAgICB9LFxuXG4gICAgICAgIHBhcmFsbGVsOiBmdW5jdGlvbiBwYXJhbGxlbChmbnMsIGNhbGxiYWNrKSB7XG4gICAgICAgICAgICBmdW5jdGlvbiBjYihlcnIsIHJlcykge1xuICAgICAgICAgICAgICAgIGlmICh0eXBlb2YgY2FsbGJhY2sgPT0gXCJmdW5jdGlvblwiKSB7XG4gICAgICAgICAgICAgICAgICAgIGNhbGxiYWNrKGVyciwgcmVzKTtcbiAgICAgICAgICAgICAgICAgICAgY2FsbGJhY2sgPSBudWxsO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGlmIChmbnMubGVuZ3RoID09IDApIHsgcmV0dXJuIGNiKG51bGwsIFtdKTsgfVxuICAgICAgICAgICAgdmFyIHJlbWFpbmluZyA9IGZucy5sZW5ndGgsIHJlc3VsdHMgPSBbXTtcbiAgICAgICAgICAgIGZ1bmN0aW9uIG1ha2VEb25lKG51bSkge1xuICAgICAgICAgICAgICAgIHJldHVybiBmdW5jdGlvbiBkb25lKGVyciwgcmVzdWx0KSB7XG4gICAgICAgICAgICAgICAgICAgIGlmIChlcnIpIHsgcmV0dXJuIGNiKGVycik7IH1cbiAgICAgICAgICAgICAgICAgICAgcmVzdWx0c1tudW1dID0gcmVzdWx0O1xuICAgICAgICAgICAgICAgICAgICBpZiAoLS1yZW1haW5pbmcgPT0gMCkgeyBjYihudWxsLCByZXN1bHRzKTsgfVxuICAgICAgICAgICAgICAgIH07XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBmb3IgKHZhciBpID0gMCwgbCA9IGZucy5sZW5ndGg7IGkgPCBsOyArK2kpIHtcbiAgICAgICAgICAgICAgICBmbnNbaV0obWFrZURvbmUoaSkpO1xuICAgICAgICAgICAgfVxuICAgICAgICB9LFxuXG4gICAgICAgIHNlcmllczogZnVuY3Rpb24gc2VyaWVzKGZucywgY2FsbGJhY2spIHtcbiAgICAgICAgICAgIGZ1bmN0aW9uIGNiKGVyciwgcmVzKSB7XG4gICAgICAgICAgICAgICAgaWYgKHR5cGVvZiBjYWxsYmFjayA9PSBcImZ1bmN0aW9uXCIpIHtcbiAgICAgICAgICAgICAgICAgICAgY2FsbGJhY2soZXJyLCByZXMpO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIHZhciByZW1haW5pbmcgPSBmbnMuc2xpY2UoKTtcbiAgICAgICAgICAgIHZhciByZXN1bHRzID0gW107XG4gICAgICAgICAgICBmdW5jdGlvbiBjYWxsTmV4dCgpIHtcbiAgICAgICAgICAgICAgICBpZiAocmVtYWluaW5nLmxlbmd0aCA9PSAwKSByZXR1cm4gY2IobnVsbCwgcmVzdWx0cyk7XG4gICAgICAgICAgICAgICAgdmFyIHByb21pc2UgPSByZW1haW5pbmcuc2hpZnQoKShuZXh0KTtcbiAgICAgICAgICAgICAgICBpZiAocHJvbWlzZSAmJiB0eXBlb2YgcHJvbWlzZS50aGVuID09IFwiZnVuY3Rpb25cIikge1xuICAgICAgICAgICAgICAgICAgICBwcm9taXNlLnRoZW4oYnVzdGVyLnBhcnRpYWwobmV4dCwgbnVsbCksIG5leHQpO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGZ1bmN0aW9uIG5leHQoZXJyLCByZXN1bHQpIHtcbiAgICAgICAgICAgICAgICBpZiAoZXJyKSByZXR1cm4gY2IoZXJyKTtcbiAgICAgICAgICAgICAgICByZXN1bHRzLnB1c2gocmVzdWx0KTtcbiAgICAgICAgICAgICAgICBjYWxsTmV4dCgpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgY2FsbE5leHQoKTtcbiAgICAgICAgfSxcblxuICAgICAgICBjb3VudGRvd246IGZ1bmN0aW9uIGNvdW50ZG93bihudW0sIGRvbmUpIHtcbiAgICAgICAgICAgIHJldHVybiBmdW5jdGlvbiAoKSB7XG4gICAgICAgICAgICAgICAgaWYgKC0tbnVtID09IDApIGRvbmUoKTtcbiAgICAgICAgICAgIH07XG4gICAgICAgIH1cbiAgICB9O1xuXG4gICAgaWYgKHR5cGVvZiBwcm9jZXNzID09PSBcIm9iamVjdFwiICYmXG4gICAgICAgIHR5cGVvZiByZXF1aXJlID09PSBcImZ1bmN0aW9uXCIgJiYgdHlwZW9mIG1vZHVsZSA9PT0gXCJvYmplY3RcIikge1xuICAgICAgICB2YXIgY3J5cHRvID0gcmVxdWlyZShcImNyeXB0b1wiKTtcbiAgICAgICAgdmFyIHBhdGggPSByZXF1aXJlKFwicGF0aFwiKTtcblxuICAgICAgICBidXN0ZXIudG1wRmlsZSA9IGZ1bmN0aW9uIChmaWxlTmFtZSkge1xuICAgICAgICAgICAgdmFyIGhhc2hlZCA9IGNyeXB0by5jcmVhdGVIYXNoKFwic2hhMVwiKTtcbiAgICAgICAgICAgIGhhc2hlZC51cGRhdGUoZmlsZU5hbWUpO1xuICAgICAgICAgICAgdmFyIHRtcGZpbGVOYW1lID0gaGFzaGVkLmRpZ2VzdChcImhleFwiKTtcblxuICAgICAgICAgICAgaWYgKHByb2Nlc3MucGxhdGZvcm0gPT0gXCJ3aW4zMlwiKSB7XG4gICAgICAgICAgICAgICAgcmV0dXJuIHBhdGguam9pbihwcm9jZXNzLmVudltcIlRFTVBcIl0sIHRtcGZpbGVOYW1lKTtcbiAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgcmV0dXJuIHBhdGguam9pbihcIi90bXBcIiwgdG1wZmlsZU5hbWUpO1xuICAgICAgICAgICAgfVxuICAgICAgICB9O1xuICAgIH1cblxuICAgIGlmIChBcnJheS5wcm90b3R5cGUuc29tZSkge1xuICAgICAgICBidXN0ZXIuc29tZSA9IGZ1bmN0aW9uIChhcnIsIGZuLCB0aGlzcCkge1xuICAgICAgICAgICAgcmV0dXJuIGFyci5zb21lKGZuLCB0aGlzcCk7XG4gICAgICAgIH07XG4gICAgfSBlbHNlIHtcbiAgICAgICAgLy8gaHR0cHM6Ly9kZXZlbG9wZXIubW96aWxsYS5vcmcvZW4vSmF2YVNjcmlwdC9SZWZlcmVuY2UvR2xvYmFsX09iamVjdHMvQXJyYXkvc29tZVxuICAgICAgICBidXN0ZXIuc29tZSA9IGZ1bmN0aW9uIChhcnIsIGZ1biwgdGhpc3ApIHtcbiAgICAgICAgICAgIFwidXNlIHN0cmljdFwiO1xuICAgICAgICAgICAgaWYgKGFyciA9PSBudWxsKSB7IHRocm93IG5ldyBUeXBlRXJyb3IoKTsgfVxuICAgICAgICAgICAgYXJyID0gT2JqZWN0KGFycik7XG4gICAgICAgICAgICB2YXIgbGVuID0gYXJyLmxlbmd0aCA+Pj4gMDtcbiAgICAgICAgICAgIGlmICh0eXBlb2YgZnVuICE9PSBcImZ1bmN0aW9uXCIpIHsgdGhyb3cgbmV3IFR5cGVFcnJvcigpOyB9XG5cbiAgICAgICAgICAgIGZvciAodmFyIGkgPSAwOyBpIDwgbGVuOyBpKyspIHtcbiAgICAgICAgICAgICAgICBpZiAoYXJyLmhhc093blByb3BlcnR5KGkpICYmIGZ1bi5jYWxsKHRoaXNwLCBhcnJbaV0sIGksIGFycikpIHtcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHRydWU7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICByZXR1cm4gZmFsc2U7XG4gICAgICAgIH07XG4gICAgfVxuXG4gICAgaWYgKEFycmF5LnByb3RvdHlwZS5maWx0ZXIpIHtcbiAgICAgICAgYnVzdGVyLmZpbHRlciA9IGZ1bmN0aW9uIChhcnIsIGZuLCB0aGlzcCkge1xuICAgICAgICAgICAgcmV0dXJuIGFyci5maWx0ZXIoZm4sIHRoaXNwKTtcbiAgICAgICAgfTtcbiAgICB9IGVsc2Uge1xuICAgICAgICAvLyBodHRwczovL2RldmVsb3Blci5tb3ppbGxhLm9yZy9lbi9KYXZhU2NyaXB0L1JlZmVyZW5jZS9HbG9iYWxfT2JqZWN0cy9BcnJheS9maWx0ZXJcbiAgICAgICAgYnVzdGVyLmZpbHRlciA9IGZ1bmN0aW9uIChmbiwgdGhpc3ApIHtcbiAgICAgICAgICAgIFwidXNlIHN0cmljdFwiO1xuICAgICAgICAgICAgaWYgKHRoaXMgPT0gbnVsbCkgeyB0aHJvdyBuZXcgVHlwZUVycm9yKCk7IH1cblxuICAgICAgICAgICAgdmFyIHQgPSBPYmplY3QodGhpcyk7XG4gICAgICAgICAgICB2YXIgbGVuID0gdC5sZW5ndGggPj4+IDA7XG4gICAgICAgICAgICBpZiAodHlwZW9mIGZuICE9IFwiZnVuY3Rpb25cIikgeyB0aHJvdyBuZXcgVHlwZUVycm9yKCk7IH1cblxuICAgICAgICAgICAgdmFyIHJlcyA9IFtdO1xuICAgICAgICAgICAgZm9yICh2YXIgaSA9IDA7IGkgPCBsZW47IGkrKykge1xuICAgICAgICAgICAgICAgIGlmIChpIGluIHQpIHtcbi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3RlbmVycyh0aGlzLCBldmVudCk7XG5cbiAgICAgICAgICAgIGZvciAodmFyIGkgPSAwLCBsID0gbGlzdGVuZXJzLmxlbmd0aDsgaSA8IGw7ICsraSkge1xuICAgICAgICAgICAgICAgIGlmIChsaXN0ZW5lcnNbaV0ubGlzdGVuZXIgPT0gbGlzdGVuZXIpIHtcbiAgICAgICAgICAgICAgICAgICAgbGlzdGVuZXJzLnNwbGljZShpLCAxKTtcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH1cbiAgICAgICAgfSxcblxuICAgICAgICBlbWl0OiBmdW5jdGlvbiBlbWl0KGV2ZW50KSB7XG4gICAgICAgICAgICB2YXIgbGlzdGVuZXJzID0gZXZlbnRMaXN0ZW5lcnModGhpcywgZXZlbnQpLnNsaWNlKCk7XG4gICAgICAgICAgICB2YXIgYXJncyA9IEFycmF5LnByb3RvdHlwZS5zbGljZS5jYWxsKGFyZ3VtZW50cywgMSk7XG5cbiAgICAgICAgICAgIGZvciAodmFyIGkgPSAwLCBsID0gbGlzdGVuZXJzLmxlbmd0aDsgaSA8IGw7IGkrKykge1xuICAgICAgICAgICAgICAgIG5vdGlmeUxpc3RlbmVyKHRoaXMsIGV2ZW50LCBsaXN0ZW5lcnNbaV0sIGFyZ3MpO1xuICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICBsaXN0ZW5lcnMgPSB0aGlzLnN1cGVydmlzb3JzIHx8IFtdO1xuICAgICAgICAgICAgYXJncyA9IEFycmF5LnByb3RvdHlwZS5zbGljZS5jYWxsKGFyZ3VtZW50cyk7XG4gICAgICAgICAgICBmb3IgKGkgPSAwLCBsID0gbGlzdGVuZXJzLmxlbmd0aDsgaSA8IGw7ICsraSkge1xuICAgICAgICAgICAgICAgIG5vdGlmeUxpc3RlbmVyKHRoaXMsIGV2ZW50LCBsaXN0ZW5lcnNbaV0sIGFyZ3MpO1xuICAgICAgICAgICAgfVxuICAgICAgICB9LFxuXG4gICAgICAgIGJpbmQ6IGZ1bmN0aW9uIChvYmplY3QsIGV2ZW50cykge1xuICAgICAgICAgICAgdmFyIG1ldGhvZDtcblxuICAgICAgICAgICAgaWYgKCFldmVudHMpIHtcbiAgICAgICAgICAgICAgICBmb3IgKG1ldGhvZCBpbiBvYmplY3QpIHtcbiAgICAgICAgICAgICAgICAgICAgaWYgKG9iamVjdC5oYXNPd25Qcm9wZXJ0eShtZXRob2QpICYmIHR5cGVvZiBvYmplY3RbbWV0aG9kXSA9PSBcImZ1bmN0aW9uXCIpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIHRoaXMuYWRkTGlzdGVuZXIobWV0aG9kLCBvYmplY3RbbWV0aG9kXSwgb2JqZWN0KTtcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH0gZWxzZSBpZiAodHlwZW9mIGV2ZW50cyA9PSBcInN0cmluZ1wiIHx8XG4gICAgICAgICAgICAgICAgICAgICAgIE9iamVjdC5wcm90b3R5cGUudG9TdHJpbmcuY2FsbChldmVudHMpID09IFwiW29iamVjdCBBcnJheV1cIikge1xuICAgICAgICAgICAgICAgIGV2ZW50cyA9IHR5cGVvZiBldmVudHMgPT0gXCJzdHJpbmdcIiA/IFtldmVudHNdIDogZXZlbnRzO1xuXG4gICAgICAgICAgICAgICAgZm9yICh2YXIgaSA9IDAsIGwgPSBldmVudHMubGVuZ3RoOyBpIDwgbDsgKytpKSB7XG4gICAgICAgICAgICAgICAgICAgIHRoaXMuYWRkTGlzdGVuZXIoZXZlbnRzW2ldLCBvYmplY3RbZXZlbnRzW2ldXSwgb2JqZWN0KTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgIGZvciAodmFyIHByb3AgaW4gZXZlbnRzKSB7XG4gICAgICAgICAgICAgICAgICAgIGlmIChldmVudHMuaGFzT3duUHJvcGVydHkocHJvcCkpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIG1ldGhvZCA9IGV2ZW50c1twcm9wXTtcblxuICAgICAgICAgICAgICAgICAgICAgICAgaWYgKHR5cGVvZiBtZXRob2QgPT0gXCJmdW5jdGlvblwiKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgb2JqZWN0W2J1c3Rlci5mdW5jdGlvbk5hbWUobWV0aG9kKSB8fCBwcm9wXSA9IG1ldGhvZDtcbiAgICAgICAgICAgICAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgbWV0aG9kID0gb2JqZWN0W2V2ZW50c1twcm9wXV07XG4gICAgICAgICAgICAgICAgICAgICAgICB9XG5cbiAgICAgICAgICAgICAgICAgICAgICAgIHRoaXMuYWRkTGlzdGVuZXIocHJvcCwgbWV0aG9kLCBvYmplY3QpO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICByZXR1cm4gb2JqZWN0O1xuICAgICAgICB9XG4gICAgfTtcblxuICAgIGJ1c3Rlci5ldmVudEVtaXR0ZXIub24gPSBidXN0ZXIuZXZlbnRFbWl0dGVyLmFkZExpc3RlbmVyO1xufSgpKTtcblxuaWYgKHR5cGVvZiBtb2R1bGUgIT0gXCJ1bmRlZmluZWRcIikge1xuICAgIG1vZHVsZS5leHBvcnRzID0gYnVzdGVyLmV2ZW50RW1pdHRlcjtcbn1cbiIsInZhciBwYXRoID0gcmVxdWlyZShcInBhdGhcIik7XG52YXIgZnMgPSByZXF1aXJlKFwiZnNcIik7XG5cbm1vZHVsZS5leHBvcnRzID0gZnVuY3Rpb24gZGVmaW5lVmVyc2lvbkdldHRlcihtb2QsIGRpcm5hbWUpIHtcbiAgICBPYmplY3QuZGVmaW5lUHJvcGVydHkobW9kLCBcIlZFUlNJT05cIiwge1xuICAgICAgICBnZXQ6IGZ1bmN0aW9uICgpIHtcbiAgICAgICAgICAgIGlmICghdGhpcy52ZXJzaW9uKSB7XG4gICAgICAgICAgICAgICAgdmFyIHBrZ0pTT04gPSBwYXRoLnJlc29sdmUoZGlybmFtZSwgXCIuLlwiLCBcInBhY2thZ2UuanNvblwiKTtcbiAgICAgICAgICAgICAgICB2YXIgcGtnID0gSlNPTi5wYXJzZShmcy5yZWFkRmlsZVN5bmMocGtnSlNPTiwgXCJ1dGY4XCIpKTtcbiAgICAgICAgICAgICAgICB0aGlzLnZlcnNpb24gPSBwa2cudmVyc2lvbjtcbiAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgcmV0dXJuIHRoaXMudmVyc2lvbjtcbiAgICAgICAgfVxuICAgIH0pO1xufTtcbiJdfQ== ;core-js-2.4.1/tests/tests.html000066400000000000000000000005661274277553300163000ustar00rootroot00000000000000 Core
core-js-2.4.1/tests/tests.js000066400000000000000000016326171274277553300157610ustar00rootroot00000000000000// Generated by LiveScript 1.4.0 (function(){ var module, test, timeLimitedPromise; module = QUnit.module, test = QUnit.test; module('core-js'); timeLimitedPromise = function(time, fn){ return Promise.race([ new Promise(fn), new Promise(function(res, rej){ return setTimeout(rej, time); }) ]); }; test('delay', function(assert){ assert.expect(6); assert.isFunction(delay); assert.arity(delay, 1); assert.name(delay, 'delay'); assert.looksNative(delay); assert.ok(delay(42) instanceof Promise, 'returns promises'); timeLimitedPromise(1e3, function(res){ delay(10).then(function(it){ res(it); }); }).then(function(it){ return assert.ok(it === true, 'resolves as `true`'); })['catch'](function(){ return assert.ok(false, 'rejected'); }).then(assert.async()); }); }).call(this); // Generated by LiveScript 1.4.0 (function(){ var module, test, keys, create, assign, from, toString$ = {}.toString; module = QUnit.module, test = QUnit.test; module('core-js'); keys = Object.keys, create = Object.create, assign = Object.assign; from = Array.from; test('Dict', function(assert){ var dict1, dict2, dict3, done, iter; assert.isFunction(Dict); assert.arity(Dict, 1); assert.name(Dict, 'Dict'); assert.looksNative(Dict); dict1 = Dict(); assert.ok(!(dict1 instanceof Object)); assert.deepEqual(keys(dict1), []); dict2 = Dict({ q: 1, w: 2 }); assert.ok(!(dict2 instanceof Object)); assert.deepEqual(keys(dict2), ['q', 'w']); assert.ok(dict2.q === 1); assert.ok(dict2.w === 2); dict3 = Dict(createIterable([[1, 1], [2, 2]])); assert.ok(!(dict3 instanceof Object)); assert.deepEqual(keys(dict3), ['1', '2']); assert.ok(dict3[1] === 1); assert.ok(dict3[2] === 2); done = false; iter = createIterable([null, 1, 2], { 'return': function(){ return done = true; } }); try { Dict(iter); } catch (e$) {} assert.ok(done, '.return #throw'); }); test('Dict.every', function(assert){ var every, obj, ctx; every = Dict.every; assert.isFunction(every); every(obj = { q: 1 }, function(val, key, that){ assert.ok(val === 1); assert.ok(key === 'q'); assert.ok(that === obj); assert.ok(this === ctx); }, ctx = {}); assert.ok(every({ q: 1, w: 2, e: 3 }, function(it){ return toString$.call(it).slice(8, -1) === 'Number'; })); assert.ok(!every({ q: 1, w: '2', e: 3 }, function(it){ return toString$.call(it).slice(8, -1) === 'Number'; })); }); test('Dict.filter', function(assert){ var filter, obj, ctx; filter = Dict.filter; assert.isFunction(filter); filter(obj = { q: 1 }, function(val, key, that){ assert.ok(val === 1); assert.ok(key === 'q'); assert.ok(that === obj); assert.ok(this === ctx); }, ctx = {}); assert.deepEqual(filter({ q: 1, w: 2, e: 3 }, function(it){ return it % 2; }), Dict({ q: 1, e: 3 })); }); test('Dict.find', function(assert){ var find, obj, ctx; find = Dict.find; assert.isFunction(find); find(obj = { q: 1 }, function(val, key, that){ assert.ok(val === 1); assert.ok(key === 'q'); assert.ok(that === obj); assert.ok(this === ctx); }, ctx = {}); assert.ok(find({ q: 1, w: 2, e: 3 }, function(it){ return !(it % 2); }) === 2); }); test('Dict.findKey', function(assert){ var findKey, obj, ctx; findKey = Dict.findKey; assert.isFunction(findKey); findKey(obj = { q: 1 }, function(val, key, that){ assert.ok(val === 1); assert.ok(key === 'q'); assert.ok(that === obj); return assert.ok(this === ctx); }, ctx = {}); assert.ok(findKey({ q: 1, w: 2, e: 3 }, function(it){ return it === 2; }) === 'w'); }); test('Dict.forEach', function(assert){ var forEach, obj, ctx, rez; forEach = Dict.forEach; assert.isFunction(forEach); forEach(obj = { q: 1 }, function(val, key, that){ assert.ok(val === 1); assert.ok(key === 'q'); assert.ok(that === obj); assert.ok(this === ctx); }, ctx = {}); rez = {}; forEach({ q: 1, w: 2 }, function(){ rez[arguments[1]] = arguments[0] + this; }, '_'); assert.deepEqual(rez, { q: '1_', w: '2_' }); rez = true; forEach(obj = { q: 1, w: 2 }, function(){ var rez; rez && (rez = obj === arguments[2]); }); assert.ok(rez); rez = {}; forEach(Object.make({ e: 3 }, { q: 1, w: 2 }), function(){ rez[arguments[1]] = arguments[0]; }); assert.ok(!('e' in rez)); rez = {}; forEach([1, 2], function(){ rez[arguments[1]] = arguments[0]; }); assert.ok(!('length' in rez)); rez = {}; forEach('123', function(){ rez[arguments[1]] = arguments[0]; }); assert.ok('2' in rez); }); test('Dict.keyOf', function(assert){ var keyOf; keyOf = Dict.keyOf; assert.isFunction(keyOf); assert.ok(keyOf({ q: 1, w: 2, e: 3 }, 2) === 'w'); assert.ok(keyOf({ q: 1, w: 2, e: 3 }, 4) === void 8); assert.ok(keyOf({ q: 1, w: 2, e: NaN }, NaN) === void 8); }); test('Dict.map', function(assert){ var map, obj, ctx; map = Dict.map; assert.isFunction(map); map(obj = { q: 1 }, function(val, key, that){ assert.ok(val === 1); assert.ok(key === 'q'); assert.ok(that === obj); assert.ok(this === ctx); }, ctx = {}); assert.deepEqual(map({ q: 1, w: 2, e: 3 }, (function(it){ return Math.pow(it, 2); })), Dict({ q: 1, w: 4, e: 9 })); }); test('Dict.mapPairs', function(assert){ var mapPairs, obj, ctx; mapPairs = Dict.mapPairs; assert.isFunction(mapPairs); mapPairs(obj = { q: 1 }, function(val, key, that){ assert.ok(val === 1); assert.ok(key === 'q'); assert.ok(that === obj); assert.ok(this === ctx); }, ctx = {}); assert.deepEqual(mapPairs({ q: 1, w: 2, e: 3 }, function(v, k){ return v !== 2 && [k + k, v * v]; }), Dict({ qq: 1, ee: 9 })); }); test('Dict.reduce', function(assert){ var reduce, obj, foo, memo; reduce = Dict.reduce; assert.isFunction(reduce); reduce(obj = { a: 1 }, function(memo, val, key, that){ assert.ok(memo === foo); assert.ok(val === 1); assert.ok(key === 'a'); assert.ok(that === obj); }, foo = {}); reduce({ a: 1, b: 2 }, function(memo, val, key){ assert.ok(memo === 1); assert.ok(val === 2); return assert.ok(key === 'b'); }); reduce({ q: 1, w: 2, e: 3 }, function(that, it){ that[it] = it; return that; }, memo = {}); assert.deepEqual(memo, { 1: 1, 2: 2, 3: 3 }); }); test('Dict.some', function(assert){ var some, obj, ctx; some = Dict.some; assert.isFunction(some); some(obj = { q: 1 }, function(val, key, that){ assert.ok(val === 1); assert.ok(key === 'q'); assert.ok(that === obj); assert.ok(this === ctx); }, ctx = {}); assert.ok(!some({ q: 1, w: 2, e: 3 }, function(it){ return toString$.call(it).slice(8, -1) === 'String'; })); assert.ok(some({ q: 1, w: '2', e: 3 }, function(it){ return toString$.call(it).slice(8, -1) === 'String'; })); }); test('Dict.includes', function(assert){ var includes, dict, o; includes = Dict.includes; assert.isFunction(includes); dict = { q: 1, w: NaN, e: -0, r: o = {} }; assert.ok(includes(dict, 1)); assert.ok(includes(dict, -0)); assert.ok(includes(dict, 0)); assert.ok(includes(dict, NaN)); assert.ok(includes(dict, o)); assert.ok(!includes(dict, 4)); assert.ok(!includes(dict, -0.5)); assert.ok(!includes(dict, {})); }); test('Dict.has', function(assert){ var has; has = Dict.has; assert.isFunction(has); assert.ok(has({ q: 1 }, 'q')); assert.ok(!has({ q: 1 }, 'w')); assert.ok(has([1], 0)); assert.ok(!has([], 0)); assert.ok(!has(clone$({ q: 1 }), 'q')); assert.ok(!has({}, 'toString')); }); test('Dict.get', function(assert){ var get; get = Dict.get; assert.isFunction(get); assert.ok(get({ q: 1 }, 'q') === 1); assert.ok(get({ q: 1 }, 'w') === void 8); assert.ok(get([1], 0) === 1); assert.ok(get([], 0) === void 8); assert.ok(get(clone$({ q: 1 }), 'q') === void 8); assert.ok(get({}, 'toString') === void 8); }); test('Dict.values', function(assert){ var values, iter; values = Dict.values; assert.isFunction(values); iter = values({}); assert.ok(iter[typeof Symbol != 'undefined' && Symbol !== null ? Symbol.toStringTag : void 8] === 'Dict Iterator'); assert.isIterator(iter); assert.isIterable(iter); assert.deepEqual(from(values({ q: 1, w: 2, e: 3 })), [1, 2, 3]); assert.deepEqual(from(values(new String('qwe'))), ['q', 'w', 'e']); assert.deepEqual(from(values(assign(create({ q: 1, w: 2, e: 3 }), { a: 4, s: 5, d: 6 }))), [4, 5, 6]); }); test('Dict.keys', function(assert){ var keys, iter; keys = Dict.keys; assert.isFunction(keys); iter = keys({}); assert.ok(iter[typeof Symbol != 'undefined' && Symbol !== null ? Symbol.toStringTag : void 8] === 'Dict Iterator'); assert.isIterator(iter); assert.isIterable(iter); assert.deepEqual(from(keys({ q: 1, w: 2, e: 3 })), ['q', 'w', 'e']); assert.deepEqual(from(keys(new String('qwe'))), ['0', '1', '2']); assert.deepEqual(from(keys(assign(create({ q: 1, w: 2, e: 3 }), { a: 4, s: 5, d: 6 }))), ['a', 's', 'd']); }); test('Dict.entries', function(assert){ var entries, iter; entries = Dict.entries; assert.isFunction(entries); iter = entries({}); assert.ok(iter[typeof Symbol != 'undefined' && Symbol !== null ? Symbol.toStringTag : void 8] === 'Dict Iterator'); assert.isIterator(iter); assert.isIterable(iter); assert.deepEqual(from(entries({ q: 1, w: 2, e: 3 })), [['q', 1], ['w', 2], ['e', 3]]); assert.deepEqual(from(entries(new String('qwe'))), [['0', 'q'], ['1', 'w'], ['2', 'e']]); assert.deepEqual(from(entries(assign(create({ q: 1, w: 2, e: 3 }), { a: 4, s: 5, d: 6 }))), [['a', 4], ['s', 5], ['d', 6]]); }); function clone$(it){ function fun(){} fun.prototype = it; return new fun; } }).call(this); // Generated by LiveScript 1.4.0 (function(){ var module, test, toString$ = {}.toString; module = QUnit.module, test = QUnit.test; module('core-js'); test('Function#part', function(assert){ var obj, $, fn, part; assert.isFunction(Function.prototype.part); assert.ok(function(it){ return toString$.call(it).slice(8, -1) === 'String'; }.part('qwe')()); obj = { a: 42 }; obj.fn = function(it){ return this.a + it; }.part(21); assert.ok(obj.fn() === 63); $ = _; fn = function(){ return Array.prototype.map.call(arguments, String).join(' '); }; part = fn.part($, 'Саша', $, 'шоссе', $, 'сосала'); assert.isFunction(part, '.part with placeholders return function'); assert.ok(part('Шла', 'по') === 'Шла Саша по шоссе undefined сосала', '.part with placeholders: args < placeholders'); assert.ok(part('Шла', 'по', 'и') === 'Шла Саша по шоссе и сосала', '.part with placeholders: args == placeholders'); assert.ok(part('Шла', 'по', 'и', 'сушку') === 'Шла Саша по шоссе и сосала сушку', '.part with placeholders: args > placeholders'); }); }).call(this); // Generated by LiveScript 1.4.0 (function(){ var module, test, from; module = QUnit.module, test = QUnit.test; module('core-js'); from = Array.from; test('core.getIteratorMethod', function(assert){ var getIteratorMethod, iterable, iterFn; getIteratorMethod = core.getIteratorMethod; assert.isFunction(getIteratorMethod); iterable = createIterable([]); iterFn = getIteratorMethod(iterable); assert.isFunction(iterFn); assert.isIterator(iterFn.call(iterable)); assert.isFunction(getIteratorMethod([])); assert.isFunction(getIteratorMethod(function(){ return arguments; }())); assert.isFunction(getIteratorMethod(Array.prototype)); assert.isFunction(getIteratorMethod(String.prototype)); assert.strictEqual(getIteratorMethod({}), void 8); }); }).call(this); // Generated by LiveScript 1.4.0 (function(){ var module, test, from; module = QUnit.module, test = QUnit.test; module('core-js'); from = Array.from; test('core.getIterator', function(assert){ var getIterator; getIterator = core.getIterator; assert.isFunction(getIterator); assert.isIterator(getIterator([])); assert.isIterator(getIterator(function(){ return arguments; }())); assert.isIterator(getIterator(createIterable([]))); assert.throws(function(){ getIterator({}); }, TypeError); }); }).call(this); // Generated by LiveScript 1.4.0 (function(){ var module, test; module = QUnit.module, test = QUnit.test; module('core-js'); test('core.isIterable', function(assert){ var isIterable; isIterable = core.isIterable; assert.isFunction(isIterable); assert.ok(isIterable(createIterable([]))); assert.ok(isIterable([])); assert.ok(isIterable(function(){ return arguments; }())); assert.ok(isIterable(Array.prototype)); assert.ok(isIterable(String.prototype)); assert.ok(!isIterable({})); }); }).call(this); // Generated by LiveScript 1.4.0 (function(){ var module, test; module = QUnit.module, test = QUnit.test; module('core-js'); test('Number#@@iterator', function(assert){ var iterator, toStringTag, iter1, iter2, iter3, iter4, iter5, iter6; iterator = Symbol.iterator, toStringTag = Symbol.toStringTag; assert.isIterable(Number.prototype); iter1 = 2[iterator](); assert.isIterator(iter1); assert.isIterable(iter1); assert.ok(iter1[toStringTag] === 'Number Iterator', '@@toStringTag'); assert.deepEqual(iter1.next(), { done: false, value: 0 }, '2 #1'); assert.deepEqual(iter1.next(), { done: false, value: 1 }, '2 #2'); assert.deepEqual(iter1.next(), { done: true, value: void 8 }, '2 #3'); iter2 = 1.5[iterator](); assert.deepEqual(iter2.next(), { done: false, value: 0 }, '1.5 #1'); assert.deepEqual(iter2.next(), { done: false, value: 1 }, '1.5 #2'); assert.deepEqual(iter2.next(), { done: true, value: void 8 }, '1.5 #3'); iter3 = (-1)[iterator](); assert.deepEqual(iter3.next(), { done: true, value: void 8 }, '-1'); iter4 = NaN[iterator](); assert.deepEqual(iter4.next(), { done: true, value: void 8 }, 'NaN'); iter5 = Infinity[iterator](); assert.deepEqual(iter5.next(), { done: false, value: 0 }, 'Infinity #1'); assert.deepEqual(iter5.next(), { done: false, value: 1 }, 'Infinity #1'); assert.deepEqual(iter5.next(), { done: false, value: 2 }, 'Infinity #1'); iter6 = (-Infinity)[iterator](); assert.deepEqual(iter6.next(), { done: true, value: void 8 }, '-Infinity'); }); }).call(this); // Generated by LiveScript 1.4.0 (function(){ var module, test; module = QUnit.module, test = QUnit.test; module('core-js'); test('Object.classof', function(assert){ var classof, Class; classof = Object.classof; assert.isFunction(classof); assert.ok(classof(void 8) === 'Undefined', 'classof undefined is `Undefined`'); assert.ok(classof(null) === 'Null', 'classof null is `Null`'); assert.ok(classof(true) === 'Boolean', 'classof bool is `Boolean`'); assert.ok(classof('string') === 'String', 'classof string is `String`'); assert.ok(classof(7) === 'Number', 'classof number is `Number`'); assert.ok(classof(Symbol()) === 'Symbol', 'classof symbol is `Symbol`'); assert.ok(classof(new Boolean(false)) === 'Boolean', 'classof new Boolean is `Boolean`'); assert.ok(classof(new String('')) === 'String', 'classof new String is `String`'); assert.ok(classof(new Number(7)) === 'Number', 'classof new Number is `Number`'); assert.ok(classof({}) === 'Object', 'classof {} is `Object`'); assert.ok(classof([]) === 'Array', 'classof array is `Array`'); assert.ok(classof(function(){}) === 'Function', 'classof function is `Function`'); assert.ok(classof(/./) === 'RegExp', 'classof regexp is `Undefined`'); assert.ok(classof(TypeError()) === 'Error', 'classof new TypeError is `RegExp`'); assert.ok(classof(function(){ return arguments; }()) === 'Arguments', 'classof arguments list is `Arguments`'); assert.ok(classof(new Set) === 'Set', 'classof undefined is `Map`'); assert.ok(classof(new Map) === 'Map', 'classof map is `Undefined`'); assert.ok(classof(new WeakSet) === 'WeakSet', 'classof weakset is `WeakSet`'); assert.ok(classof(new WeakMap) === 'WeakMap', 'classof weakmap is `WeakMap`'); assert.ok(classof(new Promise(function(){})) === 'Promise', 'classof promise is `Promise`'); assert.ok(classof(''[Symbol.iterator]()) === 'String Iterator', 'classof String Iterator is `String Iterator`'); assert.ok(classof([].entries()) === 'Array Iterator', 'classof Array Iterator is `Array Iterator`'); assert.ok(classof(new Set().entries()) === 'Set Iterator', 'classof Set Iterator is `Set Iterator`'); assert.ok(classof(new Map().entries()) === 'Map Iterator', 'classof Map Iterator is `Map Iterator`'); assert.ok(classof(Math) === 'Math', 'classof Math is `Math`'); if (typeof JSON != 'undefined' && JSON !== null) { assert.ok(classof(JSON) === 'JSON', 'classof JSON is `JSON`'); } Class = (function(){ Class.displayName = 'Class'; var prototype = Class.prototype, constructor = Class; Class.prototype[typeof Symbol != 'undefined' && Symbol !== null ? Symbol.toStringTag : void 8] = 'Class'; function Class(){} return Class; }()); assert.ok(classof(new Class) === 'Class', 'classof user class is [Symbol.toStringTag]'); }); }).call(this); // Generated by LiveScript 1.4.0 (function(){ var module, test; module = QUnit.module, test = QUnit.test; module('core-js'); test('Object.define', function(assert){ var define, defineProperty, foo, foo2; define = Object.define, defineProperty = Object.defineProperty; assert.isFunction(define); foo = { q: 1 }; assert.ok(foo === define(foo, { w: 2 })); assert.ok(foo.w === 2); if (DESCRIPTORS) { foo = { q: 1 }; foo2 = defineProperty({}, 'w', { get: function(){ return this.q + 1; } }); define(foo, foo2); assert.ok(foo.w === 2); } }); }).call(this); // Generated by LiveScript 1.4.0 (function(){ var module, test; module = QUnit.module, test = QUnit.test; module('core-js'); test('Object.isObject', function(assert){ var isObject; isObject = Object.isObject; assert.isFunction(isObject); assert.ok(!isObject(void 8), 'isObject undefined return false'); assert.ok(!isObject(null), 'isObject null return false'); assert.ok(!isObject(1), 'isObject number return false'); assert.ok(!isObject(true), 'isObject bool return false'); assert.ok(!isObject('string'), 'isObject string return false'); assert.ok(isObject(new Number(1)), 'isObject new Number return true'); assert.ok(isObject(new Boolean(false)), 'isObject new Boolean return true'); assert.ok(isObject(new String(1)), 'isObject new String return true'); assert.ok(isObject({}), 'isObject object return true'); assert.ok(isObject([]), 'isObject array return true'); assert.ok(isObject(/./), 'isObject regexp return true'); assert.ok(isObject(function(){}), 'isObject function return true'); assert.ok(isObject(new function(){}), 'isObject constructor instance return true'); }); }).call(this); // Generated by LiveScript 1.4.0 (function(){ var module, test; module = QUnit.module, test = QUnit.test; module('core-js'); test('Object.make', function(assert){ var make, object, foo; make = Object.make; assert.isFunction(make); object = make(foo = { q: 1 }, { w: 2 }); assert.ok(Object.getPrototypeOf(object) === foo); assert.ok(object.w === 2); }); }).call(this); // Generated by LiveScript 1.4.0 (function(){ var module, test; module = QUnit.module, test = QUnit.test; module('core-js'); test('RegExp.escape', function(assert){ var escape; escape = RegExp.escape; assert.isFunction(escape); assert.arity(escape, 1); assert.name(escape, 'escape'); assert.looksNative(escape); assert.strictEqual(escape('qwe asd'), 'qwe asd', "Don't change simple string"); assert.strictEqual(escape('\\[]{}()*+?.^$|'), '\\\\\\[\\]\\{\\}\\(\\)\\*\\+\\?\\.\\^\\$\\|', 'Escape all RegExp special chars'); }); }).call(this); // Generated by LiveScript 1.4.0 (function(){ var module, test; module = QUnit.module, test = QUnit.test; module('core-js'); test('String#escapeHTML', function(assert){ assert.isFunction(String.prototype.escapeHTML); assert.arity(String.prototype.escapeHTML, 0); assert.name(String.prototype.escapeHTML, 'escapeHTML'); assert.looksNative(String.prototype.escapeHTML); assert.strictEqual('qwe, asd'.escapeHTML(), 'qwe, asd'); assert.strictEqual('
qwe
'.escapeHTML(), '<div>qwe</div>'); assert.strictEqual("&<>\"'".escapeHTML(), '&<>"''); }); }).call(this); // Generated by LiveScript 1.4.0 (function(){ var module, test; module = QUnit.module, test = QUnit.test; module('core-js'); test('String#unescapeHTML', function(assert){ assert.isFunction(String.prototype.unescapeHTML); assert.arity(String.prototype.unescapeHTML, 0); assert.name(String.prototype.unescapeHTML, 'unescapeHTML'); assert.looksNative(String.prototype.unescapeHTML); assert.strictEqual('qwe, asd'.unescapeHTML(), 'qwe, asd'); assert.strictEqual('<div>qwe</div>'.unescapeHTML(), '
qwe
'); assert.strictEqual('&<>"''.unescapeHTML(), "&<>\"'"); }); }).call(this); // Generated by LiveScript 1.4.0 (function(){ var module, test; module = QUnit.module, test = QUnit.test; module('ES6'); test('Array#copyWithin', function(assert){ var a; assert.isFunction(Array.prototype.copyWithin); assert.arity(Array.prototype.copyWithin, 2); assert.name(Array.prototype.copyWithin, 'copyWithin'); assert.looksNative(Array.prototype.copyWithin); assert.strictEqual(a = [1].copyWithin(0), a); assert.nonEnumerable(Array.prototype, 'copyWithin'); assert.deepEqual([1, 2, 3, 4, 5].copyWithin(0, 3), [4, 5, 3, 4, 5]); assert.deepEqual([1, 2, 3, 4, 5].copyWithin(1, 3), [1, 4, 5, 4, 5]); assert.deepEqual([1, 2, 3, 4, 5].copyWithin(1, 2), [1, 3, 4, 5, 5]); assert.deepEqual([1, 2, 3, 4, 5].copyWithin(2, 2), [1, 2, 3, 4, 5]); assert.deepEqual([1, 2, 3, 4, 5].copyWithin(0, 3, 4), [4, 2, 3, 4, 5]); assert.deepEqual([1, 2, 3, 4, 5].copyWithin(1, 3, 4), [1, 4, 3, 4, 5]); assert.deepEqual([1, 2, 3, 4, 5].copyWithin(1, 2, 4), [1, 3, 4, 4, 5]); assert.deepEqual([1, 2, 3, 4, 5].copyWithin(0, -2), [4, 5, 3, 4, 5]); assert.deepEqual([1, 2, 3, 4, 5].copyWithin(0, -2, -1), [4, 2, 3, 4, 5]); assert.deepEqual([1, 2, 3, 4, 5].copyWithin(-4, -3, -2), [1, 3, 3, 4, 5]); assert.deepEqual([1, 2, 3, 4, 5].copyWithin(-4, -3, -1), [1, 3, 4, 4, 5]); assert.deepEqual([1, 2, 3, 4, 5].copyWithin(-4, -3), [1, 3, 4, 5, 5]); if (STRICT) { assert.throws(function(){ return Array.prototype.copyWithin.call(null, 0); }, TypeError); assert.throws(function(){ return Array.prototype.copyWithin.call(void 8, 0); }, TypeError); } if (NATIVE) { assert.deepEqual(Array.prototype.copyWithin.call({ 0: 1, 1: 2, 2: 3, length: -1 }, 1, 2), { 0: 1, 1: 2, 2: 3, length: -1 }, 'uses ToLength'); } assert.ok('copyWithin' in Array.prototype[Symbol.unscopables], 'In Array#@@unscopables'); }); }).call(this); // Generated by LiveScript 1.4.0 (function(){ var module, test, toString$ = {}.toString; module = QUnit.module, test = QUnit.test; module('ES6'); test('Array#every', function(assert){ var a, ctx, rez, arr; assert.isFunction(Array.prototype.every); assert.arity(Array.prototype.every, 1); assert.name(Array.prototype.every, 'every'); assert.looksNative(Array.prototype.every); assert.nonEnumerable(Array.prototype, 'every'); (a = [1]).every(function(val, key, that){ assert.same(arguments.length, 3, 'correct number of callback arguments'); assert.same(val, 1, 'correct value in callback'); assert.same(key, 0, 'correct index in callback'); assert.same(that, a, 'correct link to array in callback'); assert.same(this, ctx, 'correct callback context'); }, ctx = {}); assert.ok([1, 2, 3].every(function(it){ return toString$.call(it).slice(8, -1) === 'Number'; })); assert.ok([1, 2, 3].every((function(it){ return it < 4; }))); assert.ok(![1, 2, 3].every((function(it){ return it < 3; }))); assert.ok(![1, 2, 3].every(function(it){ return toString$.call(it).slice(8, -1) === 'String'; })); assert.ok([1, 2, 3].every(function(){ return +this === 1; }, 1)); rez = ''; [1, 2, 3].every(function(){ return rez += arguments[1]; }); assert.ok(rez === '012'); assert.ok((arr = [1, 2, 3]).every(function(){ return arguments[2] === arr; })); if (STRICT) { assert.throws(function(){ Array.prototype.every.call(null, function(){}); }, TypeError); assert.throws(function(){ Array.prototype.every.call(void 8, function(){}); }, TypeError); } if (NATIVE) { assert.ok((function(){ try { return true === Array.prototype.every.call({ length: -1, 0: 1 }, function(){ throw 42; }); } catch (e$) {} }()), 'uses ToLength'); } }); }).call(this); // Generated by LiveScript 1.4.0 (function(){ var module, test; module = QUnit.module, test = QUnit.test; module('ES6'); test('Array#fill', function(assert){ var a; assert.isFunction(Array.prototype.fill); assert.arity(Array.prototype.fill, 1); assert.name(Array.prototype.fill, 'fill'); assert.looksNative(Array.prototype.fill); assert.nonEnumerable(Array.prototype, 'fill'); assert.strictEqual(a = Array(5).fill(5), a); assert.deepEqual(Array(5).fill(5), [5, 5, 5, 5, 5]); assert.deepEqual(Array(5).fill(5, 1), [void 8, 5, 5, 5, 5]); assert.deepEqual(Array(5).fill(5, 1, 4), [void 8, 5, 5, 5, void 8]); assert.deepEqual(Array(5).fill(5, 6, 1), [void 8, void 8, void 8, void 8, void 8]); assert.deepEqual(Array(5).fill(5, -3, 4), [void 8, void 8, 5, 5, void 8]); if (STRICT) { assert.throws(function(){ return Array.prototype.fill.call(null, 0); }, TypeError); assert.throws(function(){ return Array.prototype.fill.call(void 8, 0); }, TypeError); } if (NATIVE && DESCRIPTORS) { assert.ok((function(){ try { return Array.prototype.fill.call(Object.defineProperty({ length: -1 }, 0, { set: function(){ throw Error(); } })); } catch (e$) {} }()), 'uses ToLength'); } assert.ok('fill' in Array.prototype[Symbol.unscopables], 'In Array#@@unscopables'); }); }).call(this); // Generated by LiveScript 1.4.0 (function(){ var module, test; module = QUnit.module, test = QUnit.test; module('ES6'); test('Array#filter', function(assert){ var a, ctx; assert.isFunction(Array.prototype.filter); assert.arity(Array.prototype.filter, 1); assert.name(Array.prototype.filter, 'filter'); assert.looksNative(Array.prototype.filter); assert.nonEnumerable(Array.prototype, 'filter'); (a = [1]).filter(function(val, key, that){ assert.same(arguments.length, 3, 'correct number of callback arguments'); assert.same(val, 1, 'correct value in callback'); assert.same(key, 0, 'correct index in callback'); assert.same(that, a, 'correct link to array in callback'); assert.same(this, ctx, 'correct callback context'); }, ctx = {}); assert.deepEqual([1, 2, 3, 4, 5], [1, 2, 3, 'q', {}, 4, true, 5].filter(function(it){ return typeof it === 'number'; })); if (STRICT) { assert.throws(function(){ Array.prototype.filter.call(null, function(){}); }, TypeError); assert.throws(function(){ Array.prototype.filter.call(void 8, function(){}); }, TypeError); } if (NATIVE) { assert.ok((function(){ try { return Array.prototype.filter.call({ length: -1, 0: 1 }, function(){ throw 42; }); } catch (e$) {} }()), 'uses ToLength'); } }); }).call(this); // Generated by LiveScript 1.4.0 (function(){ var module, test; module = QUnit.module, test = QUnit.test; module('ES6'); test('Array#findIndex', function(assert){ var a, ctx; assert.isFunction(Array.prototype.findIndex); assert.arity(Array.prototype.findIndex, 1); assert.name(Array.prototype.findIndex, 'findIndex'); assert.looksNative(Array.prototype.findIndex); assert.nonEnumerable(Array.prototype, 'findIndex'); (a = [1]).findIndex(function(val, key, that){ assert.same(arguments.length, 3, 'correct number of callback arguments'); assert.same(val, 1, 'correct value in callback'); assert.same(key, 0, 'correct index in callback'); assert.same(that, a, 'correct link to array in callback'); assert.same(this, ctx, 'correct callback context'); }, ctx = {}); assert.same([1, 3, NaN, 42, {}].findIndex((function(it){ return it === 42; })), 3); assert.same([1, 3, NaN, 42, {}].findIndex((function(it){ return it === 43; })), -1); if (STRICT) { assert.throws(function(){ return Array.prototype.findIndex.call(null, 0); }, TypeError); assert.throws(function(){ return Array.prototype.findIndex.call(void 8, 0); }, TypeError); } if (NATIVE && DESCRIPTORS) { assert.ok((function(){ try { return -1 === Array.prototype.findIndex.call({ length: -1, 0: 1 }, function(){ throw 42; }); } catch (e$) {} }()), 'uses ToLength'); } assert.ok('findIndex' in Array.prototype[Symbol.unscopables], 'In Array#@@unscopables'); }); }).call(this); // Generated by LiveScript 1.4.0 (function(){ var module, test; module = QUnit.module, test = QUnit.test; module('ES6'); test('Array#find', function(assert){ var a, ctx; assert.isFunction(Array.prototype.find); assert.arity(Array.prototype.find, 1); assert.name(Array.prototype.find, 'find'); assert.looksNative(Array.prototype.find); assert.nonEnumerable(Array.prototype, 'find'); (a = [1]).find(function(val, key, that){ assert.same(arguments.length, 3, 'correct number of callback arguments'); assert.same(val, 1, 'correct value in callback'); assert.same(key, 0, 'correct index in callback'); assert.same(that, a, 'correct link to array in callback'); assert.same(this, ctx, 'correct callback context'); }, ctx = {}); assert.same([1, 3, NaN, 42, {}].find((function(it){ return it === 42; })), 42); assert.same([1, 3, NaN, 42, {}].find((function(it){ return it === 43; })), void 8); if (STRICT) { assert.throws(function(){ return Array.prototype.find.call(null, 0); }, TypeError); assert.throws(function(){ return Array.prototype.find.call(void 8, 0); }, TypeError); } if (NATIVE && DESCRIPTORS) { assert.ok((function(){ try { return void 8 === Array.prototype.find.call({ length: -1, 0: 1 }, function(){ throw 42; }); } catch (e$) {} }()), 'uses ToLength'); } assert.ok('find' in Array.prototype[Symbol.unscopables], 'In Array#@@unscopables'); }); }).call(this); // Generated by LiveScript 1.4.0 (function(){ var module, test; module = QUnit.module, test = QUnit.test; module('ES6'); test('Array#forEach', function(assert){ var a, ctx, rez, arr; assert.isFunction(Array.prototype.forEach); assert.arity(Array.prototype.forEach, 1); assert.name(Array.prototype.forEach, 'forEach'); assert.looksNative(Array.prototype.forEach); assert.nonEnumerable(Array.prototype, 'forEach'); (a = [1]).forEach(function(val, key, that){ assert.same(arguments.length, 3, 'correct number of callback arguments'); assert.same(val, 1, 'correct value in callback'); assert.same(key, 0, 'correct index in callback'); assert.same(that, a, 'correct link to array in callback'); assert.same(this, ctx, 'correct callback context'); }, ctx = {}); rez = ''; [1, 2, 3].forEach(function(it){ rez += it; }); assert.ok(rez === '123'); rez = ''; [1, 2, 3].forEach(function(){ rez += arguments[1]; }); assert.ok(rez === '012'); rez = ''; [1, 2, 3].forEach(function(){ rez += arguments[2]; }); assert.ok(rez === '1,2,31,2,31,2,3'); rez = ''; [1, 2, 3].forEach(function(){ rez += this; }, 1); assert.ok(rez === '111'); rez = ''; arr = []; arr[5] = ''; arr.forEach(function(arg$, k){ rez += k; }); assert.ok(rez === '5'); if (STRICT) { assert.throws(function(){ Array.prototype.forEach.call(null, function(){}); }, TypeError); assert.throws(function(){ Array.prototype.forEach.call(void 8, function(){}); }, TypeError); } if (NATIVE) { assert.ok((function(){ try { return void 8 === Array.prototype.forEach.call({ length: -1, 0: 1 }, function(){ throw 42; }); } catch (e$) {} }()), 'uses ToLength'); } }); }).call(this); // Generated by LiveScript 1.4.0 (function(){ var module, test; module = QUnit.module, test = QUnit.test; module('ES6'); test('Array.from', function(assert){ var from, isArray, defineProperty, iterator, type, ref$, col, ctx, i$, x$, len$, y$, done, iter, F, inst, a, array, called; from = Array.from, isArray = Array.isArray; defineProperty = Object.defineProperty; iterator = typeof Symbol != 'undefined' && Symbol !== null ? Symbol.iterator : void 8; assert.isFunction(from); assert.arity(from, 1); assert.name(from, 'from'); assert.looksNative(from); assert.nonEnumerable(Array, 'from'); for (type in ref$ = { 'array-like': { length: '3', 0: '1', 1: '2', 2: '3' }, arguments: fn$('1', '2', '3'), array: ['1', '2', '3'], iterable: createIterable(['1', '2', '3']), string: '123' }) { col = ref$[type]; assert.arrayEqual(from(col), ['1', '2', '3'], "Works with " + type); assert.arrayEqual(from(col, (fn1$)), [1, 4, 9], "Works with " + type + " + mapFn"); } for (type in ref$ = { 'array-like': { length: 1, 0: 1 }, arguments: fn2$(1), array: [1], iterable: createIterable([1]), string: '1' }) { col = ref$[type]; assert.arrayEqual(from(col, fn3$, ctx = {}), [42], "Works with " + type + ", correct result"); } for (i$ = 0, len$ = (ref$ = [false, true, 0]).length; i$ < len$; ++i$) { x$ = ref$[i$]; assert.arrayEqual(from(x$), [], "Works with " + x$); } for (i$ = 0, len$ = (ref$ = [null, void 8]).length; i$ < len$; ++i$) { y$ = ref$[i$]; assert.throws(fn4$, TypeError, "Throws on " + y$); } assert.arrayEqual(from('𠮷𠮷𠮷'), ['𠮷', '𠮷', '𠮷'], 'Uses correct string iterator'); done = true; iter = createIterable([1, 2, 3], { 'return': function(){ return done = false; } }); from(iter, function(){ return false; }); assert.ok(done, '.return #default'); done = false; iter = createIterable([1, 2, 3], { 'return': function(){ return done = true; } }); try { from(iter, function(){ throw 42; }); } catch (e$) {} assert.ok(done, '.return #throw'); F = function(){}; inst = from.call(F, createIterable([1, 2])); assert.ok(inst instanceof F, 'generic, iterable case, instanceof'); assert.arrayEqual(inst, [1, 2], 'generic, iterable case, elements'); inst = from.call(F, { 0: 1, 1: 2, length: 2 }); assert.ok(inst instanceof F, 'generic, array-like case, instanceof'); assert.arrayEqual(inst, [1, 2], 'generic, array-like case, elements'); a = [1, 2, 3]; done = false; a['@@iterator'] = void 8; a[iterator] = function(){ done = true; return [][iterator].call(this); }; assert.arrayEqual(from(a), [1, 2, 3], 'Array with custom iterator, elements'); assert.ok(done, 'call @@iterator in Array with custom iterator'); array = [1, 2, 3]; delete array[1]; assert.arrayEqual(from(array, String), ['1', 'undefined', '3'], 'Ignores holes'); assert.ok((function(){ try { return from({ length: -1, 0: 1 }, function(){ throw 42; }); } catch (e$) {} }()), 'Uses ToLength'); assert.arrayEqual(from([], undefined), [], "Works with undefined as second argument"); assert.throws(function(){ from([], null); }, TypeError, "Throws with null as second argument"); assert.throws(function(){ from([], 0); }, TypeError, "Throws with 0 as second argument"); assert.throws(function(){ from([], ''); }, TypeError, "Throws with '' as second argument"); assert.throws(function(){ from([], false); }, TypeError, "Throws with false as second argument"); assert.throws(function(){ from([], {}); }, TypeError, "Throws with {} as second argument"); if (DESCRIPTORS) { called = false; F = function(){}; defineProperty(F.prototype, 0, { set: function(){ var called; called = true; } }); from.call(F, [1, 2, 3]); assert.ok(!called, 'Should not call prototype accessors'); } function fn$(){ return arguments; } function fn1$(it){ return Math.pow(it, 2); } function fn2$(){ return arguments; } function fn3$(val, key){ assert.same(this, ctx, "Works with " + type + ", correct callback context"); assert.same(val, type === 'string' ? '1' : 1, "Works with " + type + ", correct callback key"); assert.same(key, 0, "Works with " + type + ", correct callback value"); assert.same(arguments.length, 2, "Works with " + type + ", correct callback arguments number"); return 42; } function fn4$(){ from(y$); } }); }).call(this); // Generated by LiveScript 1.4.0 (function(){ var module, test; module = QUnit.module, test = QUnit.test; module('ES6'); test('Array#indexOf', function(assert){ assert.isFunction(Array.prototype.indexOf); assert.arity(Array.prototype.indexOf, 1); assert.name(Array.prototype.indexOf, 'indexOf'); assert.looksNative(Array.prototype.indexOf); assert.nonEnumerable(Array.prototype, 'indexOf'); assert.same(0, [1, 1, 1].indexOf(1)); assert.same(-1, [1, 2, 3].indexOf(1, 1)); assert.same(1, [1, 2, 3].indexOf(2, 1)); assert.same(-1, [1, 2, 3].indexOf(2, -1)); assert.same(1, [1, 2, 3].indexOf(2, -2)); assert.same(-1, [NaN].indexOf(NaN)); assert.same(3, Array(2).concat([1, 2, 3]).indexOf(2)); assert.same(-1, Array(1).indexOf(void 8)); assert.same(0, [1].indexOf(1, -0), "shouldn't return negative zero"); if (STRICT) { assert.throws(function(){ Array.prototype.indexOf.call(null, 0); }, TypeError); assert.throws(function(){ Array.prototype.indexOf.call(void 8, 0); }, TypeError); } if (NATIVE && DESCRIPTORS) { assert.ok((function(){ try { return -1 === Array.prototype.indexOf.call(Object.defineProperty({ length: -1 }, 0, { get: function(){ throw Error(); } }), 1); } catch (e$) {} }()), 'uses ToLength'); } }); }).call(this); // Generated by LiveScript 1.4.0 (function(){ var module, test; module = QUnit.module, test = QUnit.test; module('ES6'); test('Array.isArray', function(assert){ var isArray; isArray = Array.isArray; assert.isFunction(isArray); assert.arity(isArray, 1); assert.name(isArray, 'isArray'); assert.looksNative(isArray); assert.nonEnumerable(Array, 'isArray'); assert.ok(!isArray({})); assert.ok(!isArray(function(){ return arguments; }())); assert.ok(isArray([])); }); }).call(this); // Generated by LiveScript 1.4.0 (function(){ var module, test; module = QUnit.module, test = QUnit.test; module('ES6'); test('Array#keys', function(assert){ var iter; assert.isFunction(Array.prototype.keys); assert.arity(Array.prototype.keys, 0); assert.name(Array.prototype.keys, 'keys'); assert.looksNative(Array.prototype.keys); assert.nonEnumerable(Array.prototype, 'keys'); iter = ['q', 'w', 'e'].keys(); assert.isIterator(iter); assert.isIterable(iter); assert.strictEqual(iter[typeof Symbol != 'undefined' && Symbol !== null ? Symbol.toStringTag : void 8], 'Array Iterator'); assert.deepEqual(iter.next(), { value: 0, done: false }); assert.deepEqual(iter.next(), { value: 1, done: false }); assert.deepEqual(iter.next(), { value: 2, done: false }); assert.deepEqual(iter.next(), { value: void 8, done: true }); if (NATIVE) { assert.deepEqual(Array.prototype.keys.call({ length: -1 }).next(), { value: void 8, done: true }, 'uses ToLength'); } assert.ok('keys' in Array.prototype[typeof Symbol != 'undefined' && Symbol !== null ? Symbol.unscopables : void 8], 'In Array#@@unscopables'); }); test('Array#values', function(assert){ var iter; assert.isFunction(Array.prototype.values); assert.arity(Array.prototype.values, 0); assert.name(Array.prototype.values, 'values'); assert.looksNative(Array.prototype.values); assert.nonEnumerable(Array.prototype, 'values'); iter = ['q', 'w', 'e'].values(); assert.isIterator(iter); assert.isIterable(iter); assert.strictEqual(iter[typeof Symbol != 'undefined' && Symbol !== null ? Symbol.toStringTag : void 8], 'Array Iterator'); assert.deepEqual(iter.next(), { value: 'q', done: false }); assert.deepEqual(iter.next(), { value: 'w', done: false }); assert.deepEqual(iter.next(), { value: 'e', done: false }); assert.deepEqual(iter.next(), { value: void 8, done: true }); if (NATIVE) { assert.deepEqual(Array.prototype.values.call({ length: -1 }).next(), { value: void 8, done: true }, 'uses ToLength'); } assert.ok('values' in Array.prototype[typeof Symbol != 'undefined' && Symbol !== null ? Symbol.unscopables : void 8], 'In Array#@@unscopables'); }); test('Array#entries', function(assert){ var iter; assert.isFunction(Array.prototype.entries); assert.arity(Array.prototype.entries, 0); assert.name(Array.prototype.entries, 'entries'); assert.looksNative(Array.prototype.entries); assert.nonEnumerable(Array.prototype, 'entries'); iter = ['q', 'w', 'e'].entries(); assert.isIterator(iter); assert.isIterable(iter); assert.strictEqual(iter[typeof Symbol != 'undefined' && Symbol !== null ? Symbol.toStringTag : void 8], 'Array Iterator'); assert.deepEqual(iter.next(), { value: [0, 'q'], done: false }); assert.deepEqual(iter.next(), { value: [1, 'w'], done: false }); assert.deepEqual(iter.next(), { value: [2, 'e'], done: false }); assert.deepEqual(iter.next(), { value: void 8, done: true }); if (NATIVE) { assert.deepEqual(Array.prototype.entries.call({ length: -1 }).next(), { value: void 8, done: true }, 'uses ToLength'); } assert.ok('entries' in Array.prototype[typeof Symbol != 'undefined' && Symbol !== null ? Symbol.unscopables : void 8], 'In Array#@@unscopables'); }); test('Array#@@iterator', function(assert){ var iter; assert.isIterable(Array.prototype); assert.arity(Array.prototype[typeof Symbol != 'undefined' && Symbol !== null ? Symbol.iterator : void 8], 0); assert.name(Array.prototype[typeof Symbol != 'undefined' && Symbol !== null ? Symbol.iterator : void 8], 'values'); assert.looksNative(Array.prototype[typeof Symbol != 'undefined' && Symbol !== null ? Symbol.iterator : void 8]); assert.nonEnumerable(Array.prototype, typeof Symbol != 'undefined' && Symbol !== null ? Symbol.iterator : void 8); assert.strictEqual(Array.prototype[typeof Symbol != 'undefined' && Symbol !== null ? Symbol.iterator : void 8], Array.prototype.values); iter = ['q', 'w', 'e'][typeof Symbol != 'undefined' && Symbol !== null ? Symbol.iterator : void 8](); assert.isIterator(iter); assert.isIterable(iter); assert.strictEqual(iter[typeof Symbol != 'undefined' && Symbol !== null ? Symbol.toStringTag : void 8], 'Array Iterator'); assert.deepEqual(iter.next(), { value: 'q', done: false }); assert.deepEqual(iter.next(), { value: 'w', done: false }); assert.deepEqual(iter.next(), { value: 'e', done: false }); assert.deepEqual(iter.next(), { value: void 8, done: true }); if (NATIVE) { assert.deepEqual(Array.prototype[typeof Symbol != 'undefined' && Symbol !== null ? Symbol.iterator : void 8].call({ length: -1 }).next(), { value: void 8, done: true }, 'uses ToLength'); } }); }).call(this); // Generated by LiveScript 1.4.0 (function(){ var module, test; module = QUnit.module, test = QUnit.test; module('ES6'); test('Array#join', function(assert){ assert.isFunction(Array.prototype.join); assert.arity(Array.prototype.join, 1); assert.name(Array.prototype.join, 'join'); assert.looksNative(Array.prototype.join); assert.nonEnumerable(Array.prototype, 'join'); assert.strictEqual(Array.prototype.join.call([1, 2, 3], void 8), '1,2,3'); assert.strictEqual(Array.prototype.join.call('123'), '1,2,3'); assert.strictEqual(Array.prototype.join.call('123', '|'), '1|2|3'); if (STRICT) { assert.throws(function(){ Array.prototype.join.call(null, 0); }, TypeError); assert.throws(function(){ Array.prototype.join.call(void 8, 0); }, TypeError); } }); }).call(this); // Generated by LiveScript 1.4.0 (function(){ var module, test; module = QUnit.module, test = QUnit.test; module('ES6'); test('Array#lastIndexOf', function(assert){ assert.isFunction(Array.prototype.lastIndexOf); assert.arity(Array.prototype.lastIndexOf, 1); assert.name(Array.prototype.lastIndexOf, 'lastIndexOf'); assert.looksNative(Array.prototype.lastIndexOf); assert.nonEnumerable(Array.prototype, 'lastIndexOf'); assert.same(2, [1, 1, 1].lastIndexOf(1)); assert.same(-1, [1, 2, 3].lastIndexOf(3, 1)); assert.same(1, [1, 2, 3].lastIndexOf(2, 1)); assert.same(-1, [1, 2, 3].lastIndexOf(2, -3)); assert.same(-1, [1, 2, 3].lastIndexOf(1, -4)); assert.same(1, [1, 2, 3].lastIndexOf(2, -2)); assert.same(-1, [NaN].lastIndexOf(NaN)); assert.same(1, [1, 2, 3].concat(Array(2)).lastIndexOf(2)); assert.same(0, [1].lastIndexOf(1, -0), "shouldn't return negative zero"); if (STRICT) { assert.throws(function(){ Array.prototype.lastIndexOf.call(null, 0); }, TypeError); assert.throws(function(){ Array.prototype.lastIndexOf.call(void 8, 0); }, TypeError); } if (NATIVE && DESCRIPTORS) { assert.ok((function(){ try { return -1 === Array.prototype.lastIndexOf.call(Object.defineProperties({ length: -1 }, { 2147483646: { get: function(){ throw Error(); } }, 4294967294: { get: function(){ throw Error(); } } }), 1); } catch (e$) {} }()), 'uses ToLength'); } }); }).call(this); // Generated by LiveScript 1.4.0 (function(){ var module, test; module = QUnit.module, test = QUnit.test; module('ES6'); test('Array#map', function(assert){ var a, ctx; assert.isFunction(Array.prototype.map); assert.arity(Array.prototype.map, 1); assert.name(Array.prototype.map, 'map'); assert.looksNative(Array.prototype.map); assert.nonEnumerable(Array.prototype, 'map'); (a = [1]).map(function(val, key, that){ assert.same(arguments.length, 3, 'correct number of callback arguments'); assert.same(val, 1, 'correct value in callback'); assert.same(key, 0, 'correct index in callback'); assert.same(that, a, 'correct link to array in callback'); assert.same(this, ctx, 'correct callback context'); }, ctx = {}); assert.deepEqual([2, 3, 4], [1, 2, 3].map((function(it){ return it + 1; }))); assert.deepEqual([1, 3, 5], [1, 2, 3].map(curry$(function(x$, y$){ return x$ + y$; }))); assert.deepEqual([2, 2, 2], [1, 2, 3].map(function(){ return +this; }, 2)); if (STRICT) { assert.throws(function(){ Array.prototype.map.call(null, function(){}); }, TypeError); assert.throws(function(){ Array.prototype.map.call(void 8, function(){}); }, TypeError); } if (NATIVE) { assert.ok((function(){ try { return Array.prototype.map.call({ length: -1, 0: 1 }, function(){ throw 42; }); } catch (e$) {} }()), 'uses ToLength'); } }); function curry$(f, bound){ var context, _curry = function(args) { return f.length > 1 ? function(){ var params = args ? args.concat() : []; context = bound ? context || this : this; return params.push.apply(params, arguments) < f.length && arguments.length ? _curry.call(context, params) : f.apply(context, params); } : f; }; return _curry(); } }).call(this); // Generated by LiveScript 1.4.0 (function(){ var module, test; module = QUnit.module, test = QUnit.test; module('ES6'); test('Array.of', function(assert){ var defineProperty, F, inst, called; defineProperty = Object.defineProperty; assert.isFunction(Array.of); assert.arity(Array.of, 0); assert.name(Array.of, 'of'); assert.looksNative(Array.of); assert.nonEnumerable(Array, 'of'); assert.deepEqual(Array.of(1), [1]); assert.deepEqual(Array.of(1, 2, 3), [1, 2, 3]); F = function(){}; inst = Array.of.call(F, 1, 2); assert.ok(inst instanceof F); assert.strictEqual(inst[0], 1); assert.strictEqual(inst[1], 2); assert.strictEqual(inst.length, 2); if (DESCRIPTORS) { called = false; F = function(){}; defineProperty(F.prototype, 0, { set: function(){ var called; called = true; } }); Array.of.call(F, 1, 2, 3); assert.ok(!called, 'Should not call prototype accessors'); } }); }).call(this); // Generated by LiveScript 1.4.0 (function(){ var module, test; module = QUnit.module, test = QUnit.test; module('ES6'); test('Array#reduceRight', function(assert){ var a, accumulator, v, k; assert.isFunction(Array.prototype.reduceRight); assert.arity(Array.prototype.reduceRight, 1); assert.name(Array.prototype.reduceRight, 'reduceRight'); assert.looksNative(Array.prototype.reduceRight); assert.nonEnumerable(Array.prototype, 'reduceRight'); (a = [1]).reduceRight(function(memo, val, key, that){ assert.same(arguments.length, 4, 'correct number of callback arguments'); assert.same(memo, accumulator, 'correct callback accumulator'); assert.same(val, 1, 'correct value in callback'); assert.same(key, 0, 'correct index in callback'); assert.same(that, a, 'correct link to array in callback'); }, accumulator = {}); assert.same([1, 2, 3].reduceRight(curry$(function(x$, y$){ return x$ + y$; }), 1), 7, 'works with initial accumulator'); (a = [1, 2]).reduceRight(function(memo, val, key, that){ assert.same(memo, 2, 'correct default accumulator'); assert.same(val, 1, 'correct start value without initial accumulator'); assert.same(key, 0, 'correct start index without initial accumulator'); }); assert.same([1, 2, 3].reduceRight(curry$(function(x$, y$){ return x$ + y$; })), 6, 'works without initial accumulator'); v = ''; k = ''; [1, 2, 3].reduceRight(function(memo, a, b){ v += a; k += b; }, 0); assert.same(v, '321', 'correct order #1'); assert.same(k, '210', 'correct order #2'); assert.same(Array.prototype.reduceRight.call({ 0: 1, 1: 2, length: 2 }, curry$(function(x$, y$){ return x$ + y$; })), 3, 'generic'); if (STRICT) { assert.throws(function(){ Array.prototype.reduceRight.call(null, function(){}, 1); }, TypeError); assert.throws(function(){ Array.prototype.reduceRight.call(void 8, function(){}, 1); }, TypeError); } if (NATIVE) { assert.ok((function(){ try { return Array.prototype.reduceRight.call({ length: -1, 2147483646: 0, 4294967294: 0 }, function(){ throw 42; }, 1); } catch (e$) {} }()), 'uses ToLength'); } }); function curry$(f, bound){ var context, _curry = function(args) { return f.length > 1 ? function(){ var params = args ? args.concat() : []; context = bound ? context || this : this; return params.push.apply(params, arguments) < f.length && arguments.length ? _curry.call(context, params) : f.apply(context, params); } : f; }; return _curry(); } }).call(this); // Generated by LiveScript 1.4.0 (function(){ var module, test; module = QUnit.module, test = QUnit.test; module('ES6'); test('Array#reduce', function(assert){ var a, accumulator, v, k; assert.isFunction(Array.prototype.reduce); assert.arity(Array.prototype.reduce, 1); assert.name(Array.prototype.reduce, 'reduce'); assert.looksNative(Array.prototype.reduce); assert.nonEnumerable(Array.prototype, 'reduce'); (a = [1]).reduce(function(memo, val, key, that){ assert.same(arguments.length, 4, 'correct number of callback arguments'); assert.same(memo, accumulator, 'correct callback accumulator'); assert.same(val, 1, 'correct value in callback'); assert.same(key, 0, 'correct index in callback'); assert.same(that, a, 'correct link to array in callback'); }, accumulator = {}); assert.same([1, 2, 3].reduce(curry$(function(x$, y$){ return x$ + y$; }), 1), 7, 'works with initial accumulator'); (a = [1, 2]).reduce(function(memo, val, key, that){ assert.same(memo, 1, 'correct default accumulator'); assert.same(val, 2, 'correct start value without initial accumulator'); assert.same(key, 1, 'correct start index without initial accumulator'); }); assert.same([1, 2, 3].reduce(curry$(function(x$, y$){ return x$ + y$; })), 6, 'works without initial accumulator'); v = ''; k = ''; [1, 2, 3].reduce(function(memo, a, b){ v += a; k += b; }, 0); assert.same(v, '123', 'correct order #1'); assert.same(k, '012', 'correct order #2'); assert.same(Array.prototype.reduce.call({ 0: 1, 1: 2, length: 2 }, curry$(function(x$, y$){ return x$ + y$; })), 3, 'generic'); if (STRICT) { assert.throws(function(){ Array.prototype.reduce.call(null, function(){}, 1); }, TypeError); assert.throws(function(){ Array.prototype.reduce.call(void 8, function(){}, 1); }, TypeError); } if (NATIVE) { assert.ok((function(){ try { return Array.prototype.reduce.call({ length: -1, 0: 1 }, function(){ throw 42; }, 1); } catch (e$) {} }()), 'uses ToLength'); } }); function curry$(f, bound){ var context, _curry = function(args) { return f.length > 1 ? function(){ var params = args ? args.concat() : []; context = bound ? context || this : this; return params.push.apply(params, arguments) < f.length && arguments.length ? _curry.call(context, params) : f.apply(context, params); } : f; }; return _curry(); } }).call(this); // Generated by LiveScript 1.4.0 (function(){ var module, test, toString$ = {}.toString; module = QUnit.module, test = QUnit.test; module('ES6'); test('Array#slice', function(assert){ var arr, str, list, ref$, e; assert.isFunction(Array.prototype.slice); assert.arity(Array.prototype.slice, 2); assert.name(Array.prototype.slice, 'slice'); assert.looksNative(Array.prototype.slice); assert.nonEnumerable(Array.prototype, 'slice'); arr = ['1', '2', '3', '4', '5']; assert.deepEqual(arr.slice(), arr); assert.deepEqual(arr.slice(1, 3), ['2', '3']); assert.deepEqual(arr.slice(1, void 8), ['2', '3', '4', '5']); assert.deepEqual(arr.slice(1, -1), ['2', '3', '4']); assert.deepEqual(arr.slice(-2, -1), ['4']); assert.deepEqual(arr.slice(-2, -3), []); str = '12345'; assert.deepEqual(Array.prototype.slice.call(str), arr); assert.deepEqual(Array.prototype.slice.call(str, 1, 3), ['2', '3']); assert.deepEqual(Array.prototype.slice.call(str, 1, void 8), ['2', '3', '4', '5']); assert.deepEqual(Array.prototype.slice.call(str, 1, -1), ['2', '3', '4']); assert.deepEqual(Array.prototype.slice.call(str, -2, -1), ['4']); assert.deepEqual(Array.prototype.slice.call(str, -2, -3), []); if (list = typeof document != 'undefined' && document !== null ? (ref$ = document.body) != null ? ref$.childNodes : void 8 : void 8) { try { assert.strictEqual(toString$.call(Array.prototype.slice.call(list)).slice(8, -1), 'Array'); } catch (e$) { e = e$; assert.ok(false); } } if (NATIVE) { if (STRICT) { assert.throws(function(){ Array.prototype.slice.call(null); }, TypeError); assert.throws(function(){ Array.prototype.slice.call(void 8); }, TypeError); } assert.deepEqual(Array.prototype.slice.call({ length: -1, 0: 1 }, 0, 1), [], 'uses ToLength'); } }); }).call(this); // Generated by LiveScript 1.4.0 (function(){ var module, test, toString$ = {}.toString; module = QUnit.module, test = QUnit.test; module('ES6'); test('Array#some', function(assert){ var a, ctx, rez, arr; assert.isFunction(Array.prototype.some); assert.arity(Array.prototype.some, 1); assert.name(Array.prototype.some, 'some'); assert.looksNative(Array.prototype.some); assert.nonEnumerable(Array.prototype, 'some'); (a = [1]).some(function(val, key, that){ assert.same(arguments.length, 3, 'correct number of callback arguments'); assert.same(val, 1, 'correct value in callback'); assert.same(key, 0, 'correct index in callback'); assert.same(that, a, 'correct link to array in callback'); assert.same(this, ctx, 'correct callback context'); }, ctx = {}); assert.ok([1, '2', 3].some(function(it){ return toString$.call(it).slice(8, -1) === 'Number'; })); assert.ok([1, 2, 3].some((function(it){ return it < 3; }))); assert.ok(![1, 2, 3].some((function(it){ return it < 0; }))); assert.ok(![1, 2, 3].some(function(it){ return toString$.call(it).slice(8, -1) === 'String'; })); assert.ok(![1, 2, 3].some(function(){ return +this !== 1; }, 1)); rez = ''; [1, 2, 3].some(function(){ rez += arguments[1]; return false; }); assert.ok(rez === '012'); assert.ok(!(arr = [1, 2, 3]).some(function(){ return arguments[2] !== arr; })); if (STRICT) { assert.throws(function(){ Array.prototype.some.call(null, function(){}); }, TypeError); assert.throws(function(){ Array.prototype.some.call(void 8, function(){}); }, TypeError); } if (NATIVE) { assert.ok((function(){ try { return false === Array.prototype.some.call({ length: -1, 0: 1 }, function(){ throw 42; }); } catch (e$) {} }()), 'uses ToLength'); } }); }).call(this); // Generated by LiveScript 1.4.0 (function(){ var module, test; module = QUnit.module, test = QUnit.test; module('ES6'); test('Array#sort', function(assert){ assert.isFunction(Array.prototype.sort); assert.arity(Array.prototype.sort, 1); assert.name(Array.prototype.sort, 'sort'); assert.looksNative(Array.prototype.sort); assert.nonEnumerable(Array.prototype, 'sort'); assert.ok(!!(function(){ try { return [1, 2, 3].sort(void 8); } catch (e$) {} }()), 'works with undefined'); assert.throws(function(){ [1, 2, 3].sort(null); }, 'throws on null'); assert.throws(function(){ [1, 2, 3].sort({}); }, 'throws on {}'); if (STRICT) { assert.throws(function(){ return Array.prototype.sort.call(null); }, TypeError, 'ToObject(this)'); assert.throws(function(){ return Array.prototype.sort.call(void 8); }, TypeError, 'ToObject(this)'); } }); }).call(this); // Generated by LiveScript 1.4.0 (function(){ var module, test; module = QUnit.module, test = QUnit.test; module('ES6'); test('Date.now', function(assert){ var now; now = Date.now; assert.isFunction(now); assert.arity(now, 0); assert.name(now, 'now'); assert.looksNative(now); assert.nonEnumerable(Date, 'now'); assert.ok(+new Date - now() < 10, 'Date.now() ~ +new Date'); }); }).call(this); // Generated by LiveScript 1.4.0 (function(){ var module, test; module = QUnit.module, test = QUnit.test; module('ES6'); test('Date#toISOString', function(assert){ var ft, bc; assert.isFunction(Date.prototype.toISOString); assert.arity(Date.prototype.toISOString, 0); assert.name(Date.prototype.toISOString, 'toISOString'); assert.looksNative(Date.prototype.toISOString); assert.nonEnumerable(Date.prototype, 'toISOString'); assert.strictEqual(new Date(0).toISOString(), '1970-01-01T00:00:00.000Z'); assert.strictEqual(new Date(1e12 + 1).toISOString(), '2001-09-09T01:46:40.001Z'); assert.strictEqual(new Date(-5e13 - 1).toISOString(), '0385-07-25T07:06:39.999Z'); ft = new Date(1e15 + 1).toISOString(); assert.ok(ft === '+033658-09-27T01:46:40.001Z' || ft === '33658-09-27T01:46:40.001Z'); bc = new Date(-1e15 + 1).toISOString(); assert.ok(bc === '-029719-04-05T22:13:20.001Z' || bc === '-29719-04-05T22:13:20.001Z'); assert.throws(function(){ new Date(NaN).toISOString(); }, RangeError); }); }).call(this); // Generated by LiveScript 1.4.0 (function(){ var module, test; module = QUnit.module, test = QUnit.test; module('ES6'); test('Date#toJSON', function(assert){ var d; assert.isFunction(Date.prototype.toJSON); assert.arity(Date.prototype.toJSON, 1); assert.name(Date.prototype.toJSON, 'toJSON'); assert.looksNative(Date.prototype.toJSON); assert.nonEnumerable(Date.prototype, 'toJSON'); d = new Date(); assert.same(d.toJSON(), d.toISOString(), 'base'); assert.same(new Date(NaN).toJSON(), null, 'not finite'); assert.same(Date.prototype.toJSON.call({ toISOString: function(){ return 42; } }), 42, 'generic'); }); }).call(this); // Generated by LiveScript 1.4.0 (function(){ var module, test; module = QUnit.module, test = QUnit.test; module('ES6'); test('Date#@@toPrimitive', function(assert){ var TO_PRIMITIVE, toPrimitive, date, i$, x$, ref$, len$, y$; TO_PRIMITIVE = Symbol.toPrimitive; toPrimitive = Date.prototype[TO_PRIMITIVE]; assert.isFunction(toPrimitive); assert.arity(toPrimitive, 1); assert.nonEnumerable(Object.prototype, TO_PRIMITIVE); date = new Date; assert.same(date[TO_PRIMITIVE]('string'), date.toString(), 'generic, hint "string"'); assert.same(date[TO_PRIMITIVE]('number'), +date, 'generic, hint "number"'); assert.same(date[TO_PRIMITIVE]('default'), date.toString(), 'generic, hint "default"'); assert.same(toPrimitive.call(Object(2), 'string'), '2', 'generic, hint "string"'); assert.same(toPrimitive.call(Object(2), 'number'), 2, 'generic, hint "number"'); assert.same(toPrimitive.call(Object(2), 'default'), '2', 'generic, hint "default"'); for (i$ = 0, len$ = (ref$ = [ void 8, '', 'foo', { toString: fn$ } ]).length; i$ < len$; ++i$) { x$ = ref$[i$]; assert.throws(fn1$, TypeError, "throws on " + x$ + " as a hint"); } if (STRICT) { for (i$ = 0, len$ = (ref$ = [1, false, 'string', null, void 8]).length; i$ < len$; ++i$) { y$ = ref$[i$]; assert.throws(fn2$, TypeError, "throws on " + y$ + " as `this`"); } } function fn$(){ return 'string'; } function fn1$(){ new Date()[TO_PRIMITIVE](x$); } function fn2$(){ toPrimitive.call(y$, 'string'); } }); }).call(this); // Generated by LiveScript 1.4.0 (function(){ var module, test; module = QUnit.module, test = QUnit.test; module('ES6'); test('Date#toString', function(assert){ assert.isFunction(Date.prototype.toString); assert.arity(Date.prototype.toString, 0); assert.name(Date.prototype.toString, 'toString'); assert.looksNative(Date.prototype.toString); assert.nonEnumerable(Date.prototype, 'toString'); assert.same(String(new Date(NaN)), 'Invalid Date'); }); }).call(this); // Generated by LiveScript 1.4.0 (function(){ var module, test; module = QUnit.module, test = QUnit.test; module('ES6'); test('Function#bind', function(assert){ var obj, fn, inst, F, date; assert.isFunction(Function.prototype.bind); assert.arity(Function.prototype.bind, 1); assert.name(Function.prototype.bind, 'bind'); assert.looksNative(Function.prototype.bind); assert.nonEnumerable(Function.prototype, 'bind'); obj = { a: 42 }; assert.ok(42 === function(){ return this.a; }.bind(obj)()); assert.ok(void 8 === new (function(){}.bind(obj))().a); fn = function(a, b){ this.a = a; this.b = b; }; inst = new (fn.bind(null, 1))(2); assert.ok(inst instanceof fn); assert.strictEqual(inst.a, 1); assert.strictEqual(inst.b, 2); assert.ok(42 === function(it){ return it; }.bind(null, 42)()); fn = RegExp.prototype.test.bind(/a/); assert.ok(fn('a')); F = Date.bind(null, 2015); date = new F(6); assert.ok(date instanceof Date); assert.strictEqual(date.getFullYear(), 2015); assert.strictEqual(date.getMonth(), 6); }); }).call(this); // Generated by LiveScript 1.4.0 (function(){ var module, test; module = QUnit.module, test = QUnit.test; module('ES6'); test('Function#@@hasInstance', function(assert){ assert.ok(Symbol.hasInstance in Function.prototype); assert.nonEnumerable(Function.prototype, Symbol.hasInstance); assert.ok(Function[Symbol.hasInstance](function(){})); assert.ok(!Function[Symbol.hasInstance]({})); }); }).call(this); // Generated by LiveScript 1.4.0 (function(){ var module, test; if (DESCRIPTORS) { module = QUnit.module, test = QUnit.test; module('ES6'); test('Function#name', function(assert){ var fn; assert.ok('name' in Function.prototype); assert.nonEnumerable(Function.prototype, 'name'); assert.same((function(){ function foo(it){ return it; } return foo; }()).name, 'foo'); assert.same(function(){}.name, ''); if (Object.freeze) { assert.same(Object.freeze(function(){}).name, ''); } fn = function(){}; fn.toString = function(){ throw 42; }; assert.ok((function(){ try { fn.name; return true; } catch (e$) {} }())); fn = Object(function(){}); fn.toString = function(){ return ''; }; assert.same(fn.name, ''); }); } }).call(this); // Generated by LiveScript 1.4.0 (function(){ var module, test, same, getOwnPropertyDescriptor, freeze; module = QUnit.module, test = QUnit.test; module('ES6'); same = function(a, b){ if (a === b) { return a !== 0 || 1 / a === 1 / b; } else { return a != a && b != b; } }; getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor, freeze = Object.freeze; test('Map', function(assert){ var x$, done, iter, a, o, key, C; assert.isFunction(Map); assert.arity(Map, 0); assert.name(Map, 'Map'); assert.looksNative(Map); assert.ok('clear' in Map.prototype, 'clear in Map.prototype'); assert.ok('delete' in Map.prototype, 'delete in Map.prototype'); assert.ok('get' in Map.prototype, 'get in Map.prototype'); assert.ok('has' in Map.prototype, 'has in Map.prototype'); assert.ok('set' in Map.prototype, 'set in Map.prototype'); assert.ok(new Map instanceof Map, 'new Map instanceof Map'); assert.strictEqual(new Map(createIterable([[1, 1], [2, 2], [3, 3]])).size, 3, 'Init from iterable'); assert.strictEqual((x$ = new Map(), x$.set(freeze({}), 1), x$.set(2, 3), x$).size, 2, 'Support frozen objects'); done = false; iter = createIterable([null, 1, 2], { 'return': function(){ return done = true; } }); try { new Map(iter); } catch (e$) {} assert.ok(done, '.return #throw'); a = []; done = false; a[typeof Symbol != 'undefined' && Symbol !== null ? Symbol.iterator : void 8] = function(){ done = true; return [][typeof Symbol != 'undefined' && Symbol !== null ? Symbol.iterator : void 8].call(this); }; new Map(a); assert.ok(done); o = {}; new Map().set(o, 1); if (DESCRIPTORS) { assert.arrayEqual((function(){ var results$ = []; for (key in o) { results$.push(key); } return results$; }()), []); assert.arrayEqual(Object.keys(o), []); } assert.arrayEqual(Object.getOwnPropertyNames(o), []); ((typeof Object != 'undefined' && Object !== null) && Object.getOwnPropertySymbols) && assert.arrayEqual(Object.getOwnPropertySymbols(o), []); ((typeof Reflect != 'undefined' && Reflect !== null) && Reflect.ownKeys) && assert.arrayEqual(Reflect.ownKeys(o), []); if (nativeSubclass) { C = nativeSubclass(Map); assert.ok(new C instanceof C, 'correct subclassing with native classes #1'); assert.ok(new C instanceof Map, 'correct subclassing with native classes #2'); assert.same(new C().set(1, 2).get(1), 2, 'correct subclassing with native classes #3'); } }); test('Map#clear', function(assert){ var M, x$, y$, f; assert.isFunction(Map.prototype.clear); assert.arity(Map.prototype.clear, 0); assert.name(Map.prototype.clear, 'clear'); assert.looksNative(Map.prototype.clear); assert.nonEnumerable(Map.prototype, 'clear'); M = new Map; M.clear(); assert.strictEqual(M.size, 0); x$ = M = new Map(); x$.set(1, 2); x$.set(2, 3); x$.set(1, 4); M.clear(); assert.strictEqual(M.size, 0); assert.ok(!M.has(1)); assert.ok(!M.has(2)); y$ = M = new Map(); y$.set(1, 2); y$.set(f = freeze({}), 3); M.clear(); assert.strictEqual(M.size, 0, 'Support frozen objects'); assert.ok(!M.has(1)); assert.ok(!M.has(f)); }); test('Map#delete', function(assert){ var a, x$, M, f; assert.isFunction(Map.prototype['delete']); assert.arity(Map.prototype['delete'], 1); NATIVE && assert.name(Map.prototype['delete'], 'delete'); assert.looksNative(Map.prototype['delete']); assert.nonEnumerable(Map.prototype, 'delete'); a = []; x$ = M = new Map(); x$.set(NaN, 1); x$.set(2, 1); x$.set(3, 1); x$.set(2, 5); x$.set(1, 4); x$.set(a, {}); assert.strictEqual(M.size, 5); assert.ok(M['delete'](NaN)); assert.strictEqual(M.size, 4); assert.ok(!M['delete'](4)); assert.strictEqual(M.size, 4); M['delete']([]); assert.strictEqual(M.size, 4); M['delete'](a); assert.strictEqual(M.size, 3); M.set(freeze(f = {}), 42); assert.strictEqual(M.size, 4); M['delete'](f); assert.strictEqual(M.size, 3); }); test('Map#forEach', function(assert){ var r, T, count, x$, M, a, y$, map, s, z$; assert.isFunction(Map.prototype.forEach); assert.arity(Map.prototype.forEach, 1); assert.name(Map.prototype.forEach, 'forEach'); assert.looksNative(Map.prototype.forEach); assert.nonEnumerable(Map.prototype, 'forEach'); r = {}; count = 0; x$ = M = new Map(); x$.set(NaN, 1); x$.set(2, 1); x$.set(3, 7); x$.set(2, 5); x$.set(1, 4); x$.set(a = {}, 9); M.forEach(function(value, key){ count++; r[value] = key; }); assert.strictEqual(count, 5); assert.deepEqual(r, { 1: NaN, 7: 3, 5: 2, 4: 1, 9: a }); y$ = map = new Map(); y$.set('0', 9); y$.set('1', 9); y$.set('2', 9); y$.set('3', 9); s = ""; map.forEach(function(value, key){ s += key; if (key === '2') { map['delete']('2'); map['delete']('3'); map['delete']('1'); return map.set('4', 9); } }); assert.strictEqual(s, '0124'); z$ = map = new Map(); z$.set('0', 1); s = ""; map.forEach(function(it){ map['delete']('0'); if (s !== '') { throw '!!!'; } return s += it; }); assert.strictEqual(s, '1'); assert.throws(function(){ Map.prototype.forEach.call(new Set, function(){}); }, 'non-generic'); }); test('Map#get', function(assert){ var o, f, x$, M; assert.isFunction(Map.prototype.get); assert.name(Map.prototype.get, 'get'); assert.arity(Map.prototype.get, 1); assert.looksNative(Map.prototype.get); assert.nonEnumerable(Map.prototype, 'get'); o = {}; f = freeze({}); x$ = M = new Map(); x$.set(NaN, 1); x$.set(2, 1); x$.set(3, 1); x$.set(2, 5); x$.set(1, 4); x$.set(f, 42); x$.set(o, o); assert.strictEqual(M.get(NaN), 1); assert.strictEqual(M.get(4), void 8); assert.strictEqual(M.get({}), void 8); assert.strictEqual(M.get(o), o); assert.strictEqual(M.get(f), 42); assert.strictEqual(M.get(2), 5); }); test('Map#has', function(assert){ var o, f, x$, M; assert.isFunction(Map.prototype.has); assert.name(Map.prototype.has, 'has'); assert.arity(Map.prototype.has, 1); assert.looksNative(Map.prototype.has); assert.nonEnumerable(Map.prototype, 'has'); o = {}; f = freeze({}); x$ = M = new Map(); x$.set(NaN, 1); x$.set(2, 1); x$.set(3, 1); x$.set(2, 5); x$.set(1, 4); x$.set(f, 42); x$.set(o, o); assert.ok(M.has(NaN)); assert.ok(M.has(o)); assert.ok(M.has(2)); assert.ok(M.has(f)); assert.ok(!M.has(4)); assert.ok(!M.has({})); }); test('Map#set', function(assert){ var o, x$, M, chain, y$, f; assert.isFunction(Map.prototype.set); assert.name(Map.prototype.set, 'set'); assert.arity(Map.prototype.set, 2); assert.looksNative(Map.prototype.set); assert.nonEnumerable(Map.prototype, 'set'); o = {}; x$ = M = new Map(); x$.set(NaN, 1); x$.set(2, 1); x$.set(3, 1); x$.set(2, 5); x$.set(1, 4); x$.set(o, o); assert.ok(M.size === 5); chain = M.set(7, 2); assert.strictEqual(chain, M); M.set(7, 2); assert.strictEqual(M.size, 6); assert.strictEqual(M.get(7), 2); assert.strictEqual(M.get(NaN), 1); M.set(NaN, 42); assert.strictEqual(M.size, 6); assert.strictEqual(M.get(NaN), 42); M.set({}, 11); assert.strictEqual(M.size, 7); assert.strictEqual(M.get(o), o); M.set(o, 27); assert.strictEqual(M.size, 7); assert.strictEqual(M.get(o), 27); assert.strictEqual((y$ = new Map(), y$.set(NaN, 2), y$.set(NaN, 3), y$.set(NaN, 4), y$).size, 1); M = new Map().set(freeze(f = {}), 42); assert.strictEqual(M.get(f), 42); }); test('Map#size', function(assert){ var size, x$, sizeDesc; assert.nonEnumerable(Map.prototype, 'size'); size = (x$ = new Map(), x$.set(2, 1), x$).size; assert.strictEqual(typeof size, 'number', 'size is number'); assert.strictEqual(size, 1, 'size is correct'); if (DESCRIPTORS) { sizeDesc = getOwnPropertyDescriptor(Map.prototype, 'size'); assert.ok(sizeDesc && sizeDesc.get, 'size is getter'); assert.ok(sizeDesc && !sizeDesc.set, 'size isnt setter'); assert.throws(function(){ return Map.prototype.size; }, TypeError); } }); test('Map & -0', function(assert){ var map, x$, y$; map = new Map; map.set(-0, 1); assert.strictEqual(map.size, 1); assert.ok(map.has(0)); assert.ok(map.has(-0)); assert.strictEqual(map.get(0), 1); assert.strictEqual(map.get(-0), 1); map.forEach(function(val, key){ return assert.ok(!same(key, -0)); }); map['delete'](-0); assert.strictEqual(map.size, 0); x$ = map = new Map(); x$.set(-0, 1); map.forEach(function(val, key){ return assert.ok(!same(key, -0)); }); y$ = map = new Map(); y$.set(4, 4); y$.set(3, 3); y$.set(2, 2); y$.set(1, 1); y$.set(0, 0); assert.ok(map.has(-0)); }); test('Map#@@toStringTag', function(assert){ assert.strictEqual(Map.prototype[typeof Symbol != 'undefined' && Symbol !== null ? Symbol.toStringTag : void 8], 'Map', 'Map::@@toStringTag is `Map`'); }); test('Map Iterator', function(assert){ var x$, map, keys, iterator; x$ = map = new Map(); x$.set('a', 1); x$.set('b', 2); x$.set('c', 3); x$.set('d', 4); keys = []; iterator = map.keys(); assert.isIterator(iterator); assert.isIterable(iterator); assert.nonEnumerable(iterator, 'next'); assert.nonEnumerable(iterator, typeof Symbol != 'undefined' && Symbol !== null ? Symbol.iterator : void 8); keys.push(iterator.next().value); assert.ok(map['delete']('a')); assert.ok(map['delete']('b')); assert.ok(map['delete']('c')); map.set('e'); keys.push(iterator.next().value); keys.push(iterator.next().value); assert.ok(iterator.next().done); map.set('f'); assert.ok(iterator.next().done); assert.deepEqual(keys, ['a', 'd', 'e']); }); test('Map#keys', function(assert){ var iter, x$; assert.isFunction(Map.prototype.keys); assert.name(Map.prototype.keys, 'keys'); assert.arity(Map.prototype.keys, 0); assert.looksNative(Map.prototype.keys); assert.nonEnumerable(Map.prototype, 'keys'); iter = (x$ = new Map(), x$.set('a', 'q'), x$.set('s', 'w'), x$.set('d', 'e'), x$).keys(); assert.isIterator(iter); assert.isIterable(iter); assert.strictEqual(iter[typeof Symbol != 'undefined' && Symbol !== null ? Symbol.toStringTag : void 8], 'Map Iterator'); assert.deepEqual(iter.next(), { value: 'a', done: false }); assert.deepEqual(iter.next(), { value: 's', done: false }); assert.deepEqual(iter.next(), { value: 'd', done: false }); assert.deepEqual(iter.next(), { value: void 8, done: true }); }); test('Map#values', function(assert){ var iter, x$; assert.isFunction(Map.prototype.values); assert.name(Map.prototype.values, 'values'); assert.arity(Map.prototype.values, 0); assert.looksNative(Map.prototype.values); assert.nonEnumerable(Map.prototype, 'values'); iter = (x$ = new Map(), x$.set('a', 'q'), x$.set('s', 'w'), x$.set('d', 'e'), x$).values(); assert.isIterator(iter); assert.isIterable(iter); assert.strictEqual(iter[typeof Symbol != 'undefined' && Symbol !== null ? Symbol.toStringTag : void 8], 'Map Iterator'); assert.deepEqual(iter.next(), { value: 'q', done: false }); assert.deepEqual(iter.next(), { value: 'w', done: false }); assert.deepEqual(iter.next(), { value: 'e', done: false }); assert.deepEqual(iter.next(), { value: void 8, done: true }); }); test('Map#entries', function(assert){ var iter, x$; assert.isFunction(Map.prototype.entries); assert.name(Map.prototype.entries, 'entries'); assert.arity(Map.prototype.entries, 0); assert.looksNative(Map.prototype.entries); assert.nonEnumerable(Map.prototype, 'entries'); iter = (x$ = new Map(), x$.set('a', 'q'), x$.set('s', 'w'), x$.set('d', 'e'), x$).entries(); assert.isIterator(iter); assert.isIterable(iter); assert.strictEqual(iter[typeof Symbol != 'undefined' && Symbol !== null ? Symbol.toStringTag : void 8], 'Map Iterator'); assert.deepEqual(iter.next(), { value: ['a', 'q'], done: false }); assert.deepEqual(iter.next(), { value: ['s', 'w'], done: false }); assert.deepEqual(iter.next(), { value: ['d', 'e'], done: false }); assert.deepEqual(iter.next(), { value: void 8, done: true }); }); test('Map#@@iterator', function(assert){ var iter, x$; assert.isIterable(Map.prototype); assert.name(Map.prototype.entries, 'entries'); assert.arity(Map.prototype.entries, 0); assert.looksNative(Map.prototype[typeof Symbol != 'undefined' && Symbol !== null ? Symbol.iterator : void 8]); assert.strictEqual(Map.prototype[typeof Symbol != 'undefined' && Symbol !== null ? Symbol.iterator : void 8], Map.prototype.entries); assert.nonEnumerable(Map.prototype, typeof Symbol != 'undefined' && Symbol !== null ? Symbol.iterator : void 8); iter = (x$ = new Map(), x$.set('a', 'q'), x$.set('s', 'w'), x$.set('d', 'e'), x$)[typeof Symbol != 'undefined' && Symbol !== null ? Symbol.iterator : void 8](); assert.isIterator(iter); assert.isIterable(iter); assert.strictEqual(iter[typeof Symbol != 'undefined' && Symbol !== null ? Symbol.toStringTag : void 8], 'Map Iterator'); assert.deepEqual(iter.next(), { value: ['a', 'q'], done: false }); assert.deepEqual(iter.next(), { value: ['s', 'w'], done: false }); assert.deepEqual(iter.next(), { value: ['d', 'e'], done: false }); assert.deepEqual(iter.next(), { value: void 8, done: true }); }); }).call(this); // Generated by LiveScript 1.4.0 (function(){ var module, test; module = QUnit.module, test = QUnit.test; module('ES6'); test('Math.acosh', function(assert){ var acosh; acosh = Math.acosh; assert.isFunction(acosh); assert.name(acosh, 'acosh'); assert.arity(acosh, 1); assert.looksNative(acosh); assert.nonEnumerable(Math, 'acosh'); assert.same(acosh(NaN), NaN); assert.same(acosh(0.5), NaN); assert.same(acosh(-1), NaN); assert.same(acosh(-1e300), NaN); assert.same(acosh(1), 0); assert.strictEqual(acosh(Infinity), Infinity); assert.epsilon(acosh(1234), 7.811163220849231); assert.epsilon(acosh(8.88), 2.8737631531629235); assert.epsilon(acosh(1e+160), 369.10676205960726); assert.epsilon(acosh(Number.MAX_VALUE), 710.475860073944); assert.epsilon(acosh(1 + Number.EPSILON), 2.1073424255447017e-8); }); }).call(this); // Generated by LiveScript 1.4.0 (function(){ var module, test; module = QUnit.module, test = QUnit.test; module('ES6'); test('Math.asinh', function(assert){ var asinh; asinh = Math.asinh; assert.isFunction(asinh); assert.name(asinh, 'asinh'); assert.arity(asinh, 1); assert.looksNative(asinh); assert.nonEnumerable(Math, 'asinh'); assert.same(asinh(NaN), NaN); assert.same(asinh(0), 0); assert.same(asinh(-0), -0); assert.strictEqual(asinh(Infinity), Infinity); assert.strictEqual(asinh(-Infinity), -Infinity); assert.epsilon(asinh(1234), 7.811163549201245); assert.epsilon(asinh(9.99), 2.997227420191335); assert.epsilon(asinh(1e150), 346.0809111296668); assert.epsilon(asinh(1e7), 16.811242831518268); assert.epsilon(asinh(-1e7), -16.811242831518268); }); }).call(this); // Generated by LiveScript 1.4.0 (function(){ var module, test; module = QUnit.module, test = QUnit.test; module('ES6'); test('Math.atanh', function(assert){ var atanh; atanh = Math.atanh; assert.isFunction(atanh); assert.name(atanh, 'atanh'); assert.arity(atanh, 1); assert.looksNative(atanh); assert.nonEnumerable(Math, 'atanh'); assert.same(atanh(NaN), NaN); assert.same(atanh(-2), NaN); assert.same(atanh(-1.5), NaN); assert.same(atanh(2), NaN); assert.same(atanh(1.5), NaN); assert.strictEqual(atanh(-1), -Infinity); assert.strictEqual(atanh(1), Infinity); assert.same(atanh(0), 0); assert.same(atanh(-0), -0); assert.same(atanh(-1e300), NaN); assert.same(atanh(1e300), NaN); assert.epsilon(atanh(0.5), 0.5493061443340549); assert.epsilon(atanh(-0.5), -0.5493061443340549); assert.epsilon(atanh(0.444), 0.47720201260109457); }); }).call(this); // Generated by LiveScript 1.4.0 (function(){ var module, test; module = QUnit.module, test = QUnit.test; module('ES6'); test('Math.cbrt', function(assert){ var cbrt; cbrt = Math.cbrt; assert.isFunction(cbrt); assert.name(cbrt, 'cbrt'); assert.arity(cbrt, 1); assert.looksNative(cbrt); assert.nonEnumerable(Math, 'cbrt'); assert.same(cbrt(NaN), NaN); assert.same(cbrt(0), 0); assert.same(cbrt(-0), -0); assert.strictEqual(cbrt(Infinity), Infinity); assert.strictEqual(cbrt(-Infinity), -Infinity); assert.strictEqual(cbrt(-8), -2); assert.strictEqual(cbrt(8), 2); assert.epsilon(cbrt(-1000), -10); assert.epsilon(cbrt(1000), 10); }); }).call(this); // Generated by LiveScript 1.4.0 (function(){ var module, test; module = QUnit.module, test = QUnit.test; module('ES6'); test('Math.clz32', function(assert){ var clz32; clz32 = Math.clz32; assert.isFunction(clz32); assert.name(clz32, 'clz32'); assert.arity(clz32, 1); assert.looksNative(clz32); assert.nonEnumerable(Math, 'clz32'); assert.strictEqual(clz32(0), 32); assert.strictEqual(clz32(1), 31); assert.same(clz32(-1), 0); assert.strictEqual(clz32(0.6), 32); assert.same(clz32(Math.pow(2, 32) - 1), 0); return assert.strictEqual(clz32(Math.pow(2, 32)), 32); }); }).call(this); // Generated by LiveScript 1.4.0 (function(){ var module, test; module = QUnit.module, test = QUnit.test; module('ES6'); test('Math.cosh', function(assert){ var cosh; cosh = Math.cosh; assert.isFunction(cosh); assert.name(cosh, 'cosh'); assert.arity(cosh, 1); assert.looksNative(cosh); assert.nonEnumerable(Math, 'cosh'); assert.same(cosh(NaN), NaN); assert.strictEqual(cosh(0), 1); assert.strictEqual(cosh(-0), 1); assert.strictEqual(cosh(Infinity), Infinity); assert.strictEqual(cosh(-Infinity), Infinity); assert.epsilon(cosh(12), 81377.39571257407, 3e-11); assert.epsilon(cosh(22), 1792456423.065795780980053377, 1e-5); assert.epsilon(cosh(-10), 11013.23292010332313972137); assert.epsilon(cosh(-23), 4872401723.1244513000, 1e-5); }); }).call(this); // Generated by LiveScript 1.4.0 (function(){ var module, test; module = QUnit.module, test = QUnit.test; module('ES6'); test('Math.expm1', function(assert){ var expm1; expm1 = Math.expm1; assert.isFunction(expm1); assert.name(expm1, 'expm1'); assert.arity(expm1, 1); assert.looksNative(expm1); assert.nonEnumerable(Math, 'expm1'); assert.same(expm1(NaN), NaN); assert.same(expm1(0), 0); assert.same(expm1(-0), -0); assert.strictEqual(expm1(Infinity), Infinity); assert.strictEqual(expm1(-Infinity), -1); assert.epsilon(expm1(10), 22025.465794806718, assert.epsilon(expm1(-10), -0.9999546000702375)); }); }).call(this); // Generated by LiveScript 1.4.0 (function(){ var module, test; module = QUnit.module, test = QUnit.test; module('ES6'); test('Math.fround', function(assert){ var fround, maxFloat32, minFloat32; fround = Math.fround; assert.isFunction(fround); assert.name(fround, 'fround'); assert.arity(fround, 1); assert.looksNative(fround); assert.nonEnumerable(Math, 'fround'); assert.same(fround(void 8), NaN); assert.same(fround(NaN), NaN); assert.same(fround(0), 0); assert.same(fround(-0), -0); assert.same(fround(Number.MIN_VALUE), 0); assert.same(fround(-Number.MIN_VALUE), -0); assert.strictEqual(fround(Infinity), Infinity); assert.strictEqual(fround(-Infinity), -Infinity); assert.strictEqual(fround(1.7976931348623157e+308), Infinity); assert.strictEqual(fround(-1.7976931348623157e+308), -Infinity); assert.strictEqual(fround(3.4028235677973366e+38), Infinity); assert.strictEqual(fround(3), 3); assert.strictEqual(fround(-3), -3); maxFloat32 = 3.4028234663852886e+38; minFloat32 = 1.401298464324817e-45; assert.strictEqual(fround(maxFloat32), maxFloat32); assert.strictEqual(fround(-maxFloat32), -maxFloat32); assert.strictEqual(fround(maxFloat32 + Math.pow(2, Math.pow(2, 8 - 1) - 1 - 23 - 2)), maxFloat32); assert.strictEqual(fround(minFloat32), minFloat32); assert.strictEqual(fround(-minFloat32), -minFloat32); assert.same(fround(minFloat32 / 2), 0); assert.same(fround(-minFloat32 / 2), -0); assert.strictEqual(fround(minFloat32 / 2 + Math.pow(2, -202)), minFloat32); assert.strictEqual(fround(-minFloat32 / 2 - Math.pow(2, -202)), -minFloat32); }); }).call(this); // Generated by LiveScript 1.4.0 (function(){ var module, test; module = QUnit.module, test = QUnit.test; module('ES6'); test('Math.hypot', function(assert){ var hypot, sqrt; hypot = Math.hypot, sqrt = Math.sqrt; assert.isFunction(hypot); assert.name(hypot, 'hypot'); assert.arity(hypot, 2); assert.looksNative(hypot); assert.nonEnumerable(Math, 'hypot'); assert.strictEqual(hypot(), 0); assert.strictEqual(hypot(1), 1); assert.same(hypot('', 0), 0); assert.same(hypot(0, ''), 0); assert.strictEqual(hypot(Infinity, 0), Infinity); assert.strictEqual(hypot(-Infinity, 0), Infinity); assert.strictEqual(hypot(0, Infinity), Infinity); assert.strictEqual(hypot(0, -Infinity), Infinity); assert.strictEqual(hypot(Infinity, NaN), Infinity); assert.strictEqual(hypot(NaN, -Infinity), Infinity); assert.same(hypot(NaN, 0), NaN); assert.same(hypot(0, NaN), NaN); assert.same(hypot(0, -0), 0); assert.same(hypot(0, 0), 0); assert.same(hypot(-0, -0), 0); assert.same(hypot(-0, 0), 0); assert.strictEqual(hypot(0, 1), 1); assert.strictEqual(hypot(0, -1), 1); assert.strictEqual(hypot(-0, 1), 1); assert.strictEqual(hypot(-0, -1), 1); assert.same(hypot(0), 0); assert.strictEqual(hypot(1), 1); assert.strictEqual(hypot(2), 2); assert.strictEqual(hypot(0, 0, 1), 1); assert.strictEqual(hypot(0, 1, 0), 1); assert.strictEqual(hypot(1, 0, 0), 1); assert.strictEqual(hypot(2, 3, 4), sqrt(2 * 2 + 3 * 3 + 4 * 4)); assert.strictEqual(hypot(2, 3, 4, 5), sqrt(2 * 2 + 3 * 3 + 4 * 4 + 5 * 5)); assert.epsilon(hypot(66, 66), 93.33809511662427); assert.epsilon(hypot(0.1, 100), 100.0000499999875); assert.strictEqual(hypot(1e+300, 1e+300), 1.4142135623730952e+300); assert.strictEqual(Math.floor(hypot(1e-300, 1e-300) * 1e308), 141421356); assert.strictEqual(hypot(1e+300, 1e+300, 2, 3), 1.4142135623730952e+300); assert.strictEqual(hypot(-3, 4), 5); assert.strictEqual(hypot(3, -4), 5); }); }).call(this); // Generated by LiveScript 1.4.0 (function(){ var module, test; module = QUnit.module, test = QUnit.test; module('ES6'); test('Math.imul', function(assert){ var imul; imul = Math.imul; assert.isFunction(imul); assert.name(imul, 'imul'); assert.arity(imul, 2); assert.looksNative(imul); assert.nonEnumerable(Math, 'imul'); assert.same(imul(0, 0), 0); assert.strictEqual(imul(123, 456), 56088); assert.strictEqual(imul(-123, 456), -56088); assert.strictEqual(imul(123, -456), -56088); assert.strictEqual(imul(19088743, 4275878552), 602016552); assert.same(imul(false, 7), 0); assert.same(imul(7, false), 0); assert.same(imul(false, false), 0); assert.strictEqual(imul(true, 7), 7); assert.strictEqual(imul(7, true), 7); assert.strictEqual(imul(true, true), 1); assert.same(imul(void 8, 7), 0); assert.same(imul(7, void 8), 0); assert.same(imul(void 8, void 8), 0); assert.same(imul('str', 7), 0); assert.same(imul(7, 'str'), 0); assert.same(imul({}, 7), 0); assert.same(imul(7, {}), 0); assert.same(imul([], 7), 0); assert.same(imul(7, []), 0); assert.strictEqual(imul(0xffffffff, 5), -5); assert.strictEqual(imul(0xfffffffe, 5), -10); assert.strictEqual(imul(2, 4), 8); assert.strictEqual(imul(-1, 8), -8); assert.strictEqual(imul(-2, -2), 4); assert.same(imul(-0, 7), 0); assert.same(imul(7, -0), 0); assert.same(imul(0.1, 7), 0); assert.same(imul(7, 0.1), 0); assert.same(imul(0.9, 7), 0); assert.same(imul(7, 0.9), 0); assert.strictEqual(imul(1.1, 7), 7); assert.strictEqual(imul(7, 1.1), 7); assert.strictEqual(imul(1.9, 7), 7); assert.strictEqual(imul(7, 1.9), 7); }); }).call(this); // Generated by LiveScript 1.4.0 (function(){ var module, test; module = QUnit.module, test = QUnit.test; module('ES6'); test('Math.log10', function(assert){ var log10; log10 = Math.log10; assert.isFunction(log10); assert.name(log10, 'log10'); assert.arity(log10, 1); assert.looksNative(log10); assert.nonEnumerable(Math, 'log10'); assert.same(log10(''), log10(0)); assert.same(log10(NaN), NaN); assert.same(log10(-1), NaN); assert.same(log10(0), -Infinity); assert.same(log10(-0), -Infinity); assert.same(log10(1), 0); assert.same(log10(Infinity), Infinity); assert.epsilon(log10(0.1), -1); assert.epsilon(log10(0.5), -0.3010299956639812); assert.epsilon(log10(1.5), 0.17609125905568124); assert.epsilon(log10(5), 0.6989700043360189); assert.epsilon(log10(50), 1.6989700043360187); }); }).call(this); // Generated by LiveScript 1.4.0 (function(){ var module, test; module = QUnit.module, test = QUnit.test; module('ES6'); test('Math.log1p', function(assert){ var log1p; log1p = Math.log1p; assert.isFunction(log1p); assert.name(log1p, 'log1p'); assert.arity(log1p, 1); assert.looksNative(log1p); assert.nonEnumerable(Math, 'log1p'); assert.same(log1p(''), log1p(0)); assert.same(log1p(NaN), NaN); assert.same(log1p(-2), NaN); assert.same(log1p(-1), -Infinity); assert.same(log1p(0), 0); assert.same(log1p(-0), -0); assert.same(log1p(Infinity), Infinity); assert.epsilon(log1p(5), 1.791759469228055); assert.epsilon(log1p(50), 3.9318256327243257); }); }).call(this); // Generated by LiveScript 1.4.0 (function(){ var module, test; module = QUnit.module, test = QUnit.test; module('ES6'); test('Math.log2', function(assert){ var log2; log2 = Math.log2; assert.isFunction(log2); assert.name(log2, 'log2'); assert.arity(log2, 1); assert.looksNative(log2); assert.nonEnumerable(Math, 'log2'); assert.same(log2(''), log2(0)); assert.same(log2(NaN), NaN); assert.same(log2(-1), NaN); assert.same(log2(0), -Infinity); assert.same(log2(-0), -Infinity); assert.same(log2(1), 0); assert.same(log2(Infinity), Infinity); assert.same(log2(0.5), -1); assert.same(log2(32), 5); assert.epsilon(log2(5), 2.321928094887362); }); }).call(this); // Generated by LiveScript 1.4.0 (function(){ var module, test; module = QUnit.module, test = QUnit.test; module('ES6'); test('Math.sign', function(assert){ var sign; sign = Math.sign; assert.isFunction(sign); assert.name(sign, 'sign'); assert.arity(sign, 1); assert.looksNative(sign); assert.nonEnumerable(Math, 'sign'); assert.same(sign(NaN), NaN); assert.same(sign(), NaN); assert.same(sign(-0), -0); assert.same(sign(0), 0); assert.strictEqual(sign(Infinity), 1); assert.strictEqual(sign(-Infinity), -1); assert.strictEqual(sign(13510798882111488), 1); assert.strictEqual(sign(-13510798882111488), -1); assert.strictEqual(sign(42.5), 1); assert.strictEqual(sign(-42.5), -1); }); }).call(this); // Generated by LiveScript 1.4.0 (function(){ var module, test; module = QUnit.module, test = QUnit.test; module('ES6'); test('Math.sinh', function(assert){ var sinh; sinh = Math.sinh; assert.isFunction(sinh); assert.name(sinh, 'sinh'); assert.arity(sinh, 1); assert.looksNative(sinh); assert.nonEnumerable(Math, 'sinh'); assert.same(sinh(NaN), NaN); assert.same(sinh(0), 0); assert.same(sinh(-0), -0); assert.strictEqual(sinh(Infinity), Infinity); assert.strictEqual(sinh(-Infinity), -Infinity); assert.epsilon(sinh(-5), -74.20321057778875); assert.epsilon(sinh(2), 3.6268604078470186); assert.strictEqual(sinh(-2e-17), -2e-17); }); }).call(this); // Generated by LiveScript 1.4.0 (function(){ var module, test; module = QUnit.module, test = QUnit.test; module('ES6'); test('Math.tanh', function(assert){ var tanh; tanh = Math.tanh; assert.isFunction(tanh); assert.name(tanh, 'tanh'); assert.arity(tanh, 1); assert.looksNative(tanh); assert.nonEnumerable(Math, 'tanh'); assert.same(tanh(NaN), NaN); assert.same(tanh(0), 0); assert.same(tanh(-0), -0); assert.strictEqual(tanh(Infinity), 1); assert.strictEqual(tanh(90), 1); assert.epsilon(tanh(10), 0.9999999958776927); NATIVE && assert.strictEqual(tanh(710), 1); }); }).call(this); // Generated by LiveScript 1.4.0 (function(){ var module, test; module = QUnit.module, test = QUnit.test; module('ES6'); test('Math.trunc', function(assert){ var trunc; trunc = Math.trunc; assert.isFunction(trunc); assert.name(trunc, 'trunc'); assert.arity(trunc, 1); assert.looksNative(trunc); assert.nonEnumerable(Math, 'trunc'); assert.same(trunc(NaN), NaN, 'NaN -> NaN'); assert.same(trunc(-0), -0, '-0 -> -0'); assert.same(trunc(0), 0, '0 -> 0'); assert.same(trunc(Infinity), Infinity, 'Infinity -> Infinity'); assert.same(trunc(-Infinity), -Infinity, '-Infinity -> -Infinity'); assert.same(trunc(null), 0, 'null -> 0'); assert.same(trunc({}), NaN, '{} -> NaN'); assert.strictEqual(trunc([]), 0, '[] -> 0'); assert.strictEqual(trunc(1.01), 1, '1.01 -> 0'); assert.strictEqual(trunc(1.99), 1, '1.99 -> 0'); assert.strictEqual(trunc(-1), -1, '-1 -> -1'); assert.strictEqual(trunc(-1.99), -1, '-1.99 -> -1'); assert.strictEqual(trunc(-555.555), -555, '-555.555 -> -555'); assert.strictEqual(trunc(0x20000000000001), 0x20000000000001, '0x20000000000001 -> 0x20000000000001'); assert.strictEqual(trunc(-0x20000000000001), -0x20000000000001, '-0x20000000000001 -> -0x20000000000001'); }); }).call(this); // Generated by LiveScript 1.4.0 (function(){ var module, test, ws, $check, toString$ = {}.toString; module = QUnit.module, test = QUnit.test; module('ES6'); ws = ' \t\x0b\f\xa0\ufeff\n\r\u2028\u2029\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000'; $check = function(assert){ return function(a, b){ var x; assert.same(Number(a), b, "Number " + typeof a + " " + a + " -> " + b); x = new Number(a); assert.ok(x === Object(x), "new Number " + typeof a + " " + a + " is object"); assert.strictEqual(toString$.call(x).slice(8, -1), 'Number', "classof new Number " + typeof a + " " + a + " is Number"); assert.same(x.valueOf(), b, "new Number(" + typeof a + " " + a + ").valueOf() -> " + b); }; }; test('Number constructor: regression', function(assert){ var check, i$, x$, ref$, len$, i, n, C; check = $check(assert); assert.isFunction(Number); assert.arity(Number, 1); assert.name(Number, 'Number'); assert.looksNative(Number); assert.same(Number.prototype.constructor, Number); assert.same(1 .constructor, Number); for (i$ = 0, len$ = (ref$ = ['MAX_VALUE', 'MIN_VALUE', 'NaN', 'NEGATIVE_INFINITY', 'POSITIVE_INFINITY']).length; i$ < len$; ++i$) { x$ = ref$[i$]; assert.ok(x$ in Number, "Number." + x$); assert.nonEnumerable(Number, x$); } assert.same(Number(), 0); assert.same(new Number().valueOf(), 0); check(42, 42); check(42.42, 42.42); check(new Number(42), 42); check(new Number(42.42), 42.42); check('42', 42); check('42.42', 42.42); check('0x42', 66); check('0X42', 66); check('0xzzz', NaN); check('0x1g', NaN); check('+0x1', NaN); check('-0x1', NaN); check('+0X1', NaN); check('-0X1', NaN); check(new String('42'), 42); check(new String('42.42'), 42.42); check(new String('0x42'), 66); check(null, 0); check(void 8, NaN); check(false, 0); check(true, 1); check(new Boolean(false), 0); check(new Boolean(true), 1); check({}, NaN); check({ valueOf: '1.1' }, NaN); check({ valueOf: '1.1', toString: function(){ return '2.2'; } }, 2.2); check({ valueOf: function(){ return '1.1'; } }, 1.1); check({ valueOf: function(){ return '1.1'; }, toString: function(){ return '2.2'; } }, 1.1); check({ valueOf: function(){ return '-0x1a2b3c'; } }, NaN); check({ toString: function(){ return '-0x1a2b3c'; } }, NaN); check({ valueOf: function(){ return 42; } }, 42); check({ valueOf: function(){ return '42'; } }, 42); check({ valueOf: function(){ return null; } }, 0); check({ toString: function(){ return 42; } }, 42); check({ toString: function(){ return '42'; } }, 42); check({ valueOf: function(){ return 1; }, toString: function(){ return 2; } }, 1); check({ valueOf: 1, toString: function(){ return 2; } }, 2); i = 1; assert.strictEqual(Number({ valueOf: function(){ return ++i; } }), 2, 'Number call valueOf only once #1'); assert.strictEqual(i, 2, 'Number call valueOf only once #2'); i = 1; assert.strictEqual(Number({ toString: function(){ return ++i; } }), 2, 'Number call toString only once #1'); assert.strictEqual(i, 2, 'Number call toString only once #2'); i = 1; assert.strictEqual(new Number({ valueOf: function(){ return ++i; } }).valueOf(), 2, 'new Number call valueOf only once #1'); assert.strictEqual(i, 2, 'new Number call valueOf only once #2'); i = 1; assert.strictEqual(new Number({ toString: function(){ return ++i; } }).valueOf(), 2, 'new Number call toString only once #1'); assert.strictEqual(i, 2, 'new Number call toString only once #2'); assert.throws(function(){ return Number(Object.create(null)); }, TypeError, 'Number assert.throws on object w/o valueOf and toString'); assert.throws(function(){ return Number({ valueOf: 1, toString: 2 }); }, TypeError, 'Number assert.throws on object then valueOf and toString are not functions'); assert.throws(function(){ return new Number(Object.create(null)); }, TypeError, 'new Number assert.throws on object w/o valueOf and toString'); assert.throws(function(){ return new Number({ valueOf: 1, toString: 2 }); }, TypeError, 'new Number assert.throws on object then valueOf and toString are not functions'); n = new Number(42); assert.strictEqual(typeof n.constructor(n), 'number'); check(ws + "42", 42); check("42" + ws, 42); check(ws + "42" + ws, 42); check(ws + "0x42", 66); check("0x42" + ws, 66); check(ws + "0x42" + ws, 66); check(ws + "0X42", 66); check("0X42" + ws, 66); check(ws + "0X42" + ws, 66); if (nativeSubclass) { C = nativeSubclass(Number); assert.ok(new C instanceof C, 'correct subclassing with native classes #1'); assert.ok(new C instanceof Number, 'correct subclassing with native classes #2'); assert.same(new C(1).toFixed(2), '1.00', 'correct subclassing with native classes #3'); } }); test('Number constructor: binary', function(assert){ var check; check = $check(assert); check('0b1', 1); check('0B1', 1); check('0b12', NaN); check('0b234', NaN); check('0b1!', NaN); check('+0b1', NaN); check('-0b1', NaN); check(' 0b1', 1); check('0b1\n', 1); check('\n 0b1\n ', 1); check(' 0B1', 1); check('0B1\n', 1); check('\n 0B1\n ', 1); check({ valueOf: function(){ return '0b11'; } }, 3); check({ toString: function(){ return '0b111'; } }, 7); check({ valueOf: function(){ return '0b101010'; } }, 42); check({ toString: function(){ return '0b101010'; } }, 42); check(ws + "0b11", 3); check("0b11" + ws, 3); check(ws + "0b11" + ws, 3); check(ws + "0B11", 3); check("0B11" + ws, 3); check(ws + "0B11" + ws, 3); }); test('Number constructor: octal', function(assert){ var check; check = $check(assert); check('0o7', 7); check('0O7', 7); check('0o18', NaN); check('0o89a', NaN); check('0o1!', NaN); check('+0o1', NaN); check('-0o1', NaN); check(' 0o1', 1); check('0o1\n', 1); check('\n 0o1\n ', 1); check(' 0O1', 1); check('0O1\n', 1); check('\n 0O1\n ', 1); check({ valueOf: function(){ return '0o77'; } }, 63); check({ toString: function(){ return '0o777'; } }, 511); check({ valueOf: function(){ return '0o12345'; } }, 5349); check({ toString: function(){ return '0o12345'; } }, 5349); check(ws + "0o11", 9); check("0o11" + ws, 9); check(ws + "0o11" + ws, 9); check(ws + "0O11", 9); check("0O11" + ws, 9); check(ws + "0O11" + ws, 9); }); }).call(this); // Generated by LiveScript 1.4.0 (function(){ var module, test; module = QUnit.module, test = QUnit.test; module('ES6'); test('Number.EPSILON', function(assert){ var EPSILON; EPSILON = Number.EPSILON; assert.ok('EPSILON' in Number, 'EPSILON in Number'); assert.nonEnumerable(Number, 'EPSILON'); assert.strictEqual(EPSILON, Math.pow(2, -52), 'Is 2^-52'); assert.ok(1 !== 1 + EPSILON, '1 isnt 1 + EPSILON'); assert.strictEqual(1, 1 + EPSILON / 2, '1 is 1 + EPSILON / 2'); }); }).call(this); // Generated by LiveScript 1.4.0 (function(){ var module, test; module = QUnit.module, test = QUnit.test; module('ES6'); test('Number.isFinite', function(assert){ var isFinite, create, i$, x$, ref$, len$, y$, e; isFinite = Number.isFinite; create = Object.create; assert.isFunction(isFinite); assert.name(isFinite, 'isFinite'); assert.arity(isFinite, 1); assert.looksNative(isFinite); assert.nonEnumerable(Number, 'isFinite'); for (i$ = 0, len$ = (ref$ = [1, 0.1, -1, Math.pow(2, 16), Math.pow(2, 16) - 1, Math.pow(2, 31), Math.pow(2, 31) - 1, Math.pow(2, 32), Math.pow(2, 32) - 1, -0]).length; i$ < len$; ++i$) { x$ = ref$[i$]; assert.ok(isFinite(x$), "isFinite " + typeof x$ + " " + x$); } for (i$ = 0, len$ = (ref$ = [NaN, Infinity, 'NaN', '5', false, new Number(NaN), new Number(Infinity), new Number(5), new Number(0.1), void 8, null, {}, fn$, create(null)]).length; i$ < len$; ++i$) { y$ = ref$[i$]; assert.ok(!isFinite(y$), "not isFinite " + typeof y$ + " " + (fn1$())); } function fn$(){} function fn1$(){ try { return String(y$); } catch (e$) { e = e$; return 'Object.create(null)'; } } }); }).call(this); // Generated by LiveScript 1.4.0 (function(){ var module, test; module = QUnit.module, test = QUnit.test; module('ES6'); test('Number.isInteger', function(assert){ var isInteger, create, i$, x$, ref$, len$, y$, e; isInteger = Number.isInteger; create = Object.create; assert.isFunction(isInteger); assert.name(isInteger, 'isInteger'); assert.arity(isInteger, 1); assert.looksNative(isInteger); assert.nonEnumerable(Number, 'isInteger'); for (i$ = 0, len$ = (ref$ = [1, -1, Math.pow(2, 16), Math.pow(2, 16) - 1, Math.pow(2, 31), Math.pow(2, 31) - 1, Math.pow(2, 32), Math.pow(2, 32) - 1, -0]).length; i$ < len$; ++i$) { x$ = ref$[i$]; assert.ok(isInteger(x$), "isInteger " + typeof x$ + " " + x$); } for (i$ = 0, len$ = (ref$ = [NaN, 0.1, Infinity, 'NaN', '5', false, new Number(NaN), new Number(Infinity), new Number(5), new Number(0.1), void 8, null, {}, fn$, create(null)]).length; i$ < len$; ++i$) { y$ = ref$[i$]; assert.ok(!isInteger(y$), "not isInteger " + typeof y$ + " " + (fn1$())); } function fn$(){} function fn1$(){ try { return String(y$); } catch (e$) { e = e$; return 'Object.create(null)'; } } }); }).call(this); // Generated by LiveScript 1.4.0 (function(){ var module, test; module = QUnit.module, test = QUnit.test; module('ES6'); test('Number.isNaN', function(assert){ var isNaN, create, i$, x$, ref$, len$, e; isNaN = Number.isNaN; create = Object.create; assert.isFunction(isNaN); assert.name(isNaN, 'isNaN'); assert.arity(isNaN, 1); assert.looksNative(isNaN); assert.nonEnumerable(Number, 'isNaN'); assert.ok(isNaN(NaN), 'Number.isNaN NaN'); for (i$ = 0, len$ = (ref$ = [1, 0.1, -1, Math.pow(2, 16), Math.pow(2, 16) - 1, Math.pow(2, 31), Math.pow(2, 31) - 1, Math.pow(2, 32), Math.pow(2, 32) - 1, -0, Infinity, 'NaN', '5', false, new Number(NaN), new Number(Infinity), new Number(5), new Number(0.1), void 8, null, {}, fn$, create(null)]).length; i$ < len$; ++i$) { x$ = ref$[i$]; assert.ok(!isNaN(x$), "not Number.isNaN " + typeof x$ + " " + (fn1$())); } function fn$(){} function fn1$(){ try { return String(x$); } catch (e$) { e = e$; return 'Object.create(null)'; } } }); }).call(this); // Generated by LiveScript 1.4.0 (function(){ var module, test; module = QUnit.module, test = QUnit.test; module('ES6'); test('Number.isSafeInteger', function(assert){ var isSafeInteger, create, i$, x$, ref$, len$, y$, e; isSafeInteger = Number.isSafeInteger; create = Object.create; assert.isFunction(isSafeInteger); assert.name(isSafeInteger, 'isSafeInteger'); assert.arity(isSafeInteger, 1); assert.looksNative(isSafeInteger); assert.nonEnumerable(Number, 'isSafeInteger'); for (i$ = 0, len$ = (ref$ = [1, -1, Math.pow(2, 16), Math.pow(2, 16) - 1, Math.pow(2, 31), Math.pow(2, 31) - 1, Math.pow(2, 32), Math.pow(2, 32) - 1, -0, 9007199254740991, -9007199254740991]).length; i$ < len$; ++i$) { x$ = ref$[i$]; assert.ok(isSafeInteger(x$), "isSafeInteger " + typeof x$ + " " + x$); } for (i$ = 0, len$ = (ref$ = [9007199254740992, -9007199254740992, NaN, 0.1, Infinity, 'NaN', '5', false, new Number(NaN), new Number(Infinity), new Number(5), new Number(0.1), void 8, null, {}, fn$, create(null)]).length; i$ < len$; ++i$) { y$ = ref$[i$]; assert.ok(!isSafeInteger(y$), "not isSafeInteger " + typeof y$ + " " + (fn1$())); } function fn$(){} function fn1$(){ try { return String(y$); } catch (e$) { e = e$; return 'Object.create(null)'; } } }); }).call(this); // Generated by LiveScript 1.4.0 (function(){ var module, test; module = QUnit.module, test = QUnit.test; module('ES6'); test('Number.MAX_SAFE_INTEGER', function(assert){ assert.ok('MAX_SAFE_INTEGER' in Number); assert.nonEnumerable(Number, 'MAX_SAFE_INTEGER'); assert.strictEqual(Number.MAX_SAFE_INTEGER, Math.pow(2, 53) - 1, 'Is 2^53 - 1'); }); }).call(this); // Generated by LiveScript 1.4.0 (function(){ var module, test; module = QUnit.module, test = QUnit.test; module('ES6'); test('Number.MIN_SAFE_INTEGER', function(assert){ assert.ok('MIN_SAFE_INTEGER' in Number); assert.nonEnumerable(Number, 'MIN_SAFE_INTEGER'); assert.strictEqual(Number.MIN_SAFE_INTEGER, -Math.pow(2, 53) + 1, 'Is -2^53 + 1'); }); }).call(this); // Generated by LiveScript 1.4.0 (function(){ var module, test; module = QUnit.module, test = QUnit.test; module('ES6'); test('Number.parseFloat', function(assert){ var parseFloat, ws; parseFloat = Number.parseFloat; assert.isFunction(parseFloat); assert.name(parseFloat, 'parseFloat'); assert.arity(parseFloat, 1); assert.looksNative(parseFloat); assert.nonEnumerable(Number, 'parseFloat'); assert.same(parseFloat, global.parseFloat); assert.same(parseFloat('0'), 0); assert.same(parseFloat(' 0'), 0); assert.same(parseFloat('+0'), 0); assert.same(parseFloat(' +0'), 0); assert.same(parseFloat('-0'), -0); assert.same(parseFloat(' -0'), -0); ws = '\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u180E\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF'; assert.same(parseFloat(ws + '+0'), 0); assert.same(parseFloat(ws + '-0'), -0); assert.same(parseFloat(null), NaN); assert.same(parseFloat(void 8), NaN); }); }).call(this); // Generated by LiveScript 1.4.0 (function(){ var module, test; module = QUnit.module, test = QUnit.test; module('ES6'); test('Number.parseInt', function(assert){ var parseInt, i$, r, x$, ref$, len$, ws, fakeZero; parseInt = Number.parseInt; assert.isFunction(parseInt); assert.name(parseInt, 'parseInt'); assert.arity(parseInt, 2); assert.looksNative(parseInt); assert.nonEnumerable(Number, 'parseInt'); assert.same(parseInt, global.parseInt); for (i$ = 2; i$ <= 36; ++i$) { r = i$; assert.same(parseInt('10', r), r, "radix " + r); } for (i$ = 0, len$ = (ref$ = ['01', '08', '10', '42']).length; i$ < len$; ++i$) { x$ = ref$[i$]; assert.same(parseInt(x$), parseInt(x$, 10), "default radix is 10: " + x$); } assert.same(parseInt('0x16'), parseInt('0x16', 16), "default radix is 16: 0x16"); ws = '\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u180E\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF'; assert.same(parseInt(' 0x16'), parseInt('0x16', 16), 'ignores leading whitespace #1'); assert.same(parseInt(' 42'), parseInt('42', 10), 'ignores leading whitespace #2'); assert.same(parseInt(' 08'), parseInt('08', 10), 'ignores leading whitespace #3'); assert.same(parseInt(ws + '08'), parseInt('08', 10), 'ignores leading whitespace #4'); assert.same(parseInt(ws + '0x16'), parseInt('0x16', 16), 'ignores leading whitespace #5'); fakeZero = { valueOf: function(){ return 0; } }; assert.same(parseInt('08', fakeZero), parseInt('08', 10), 'valueOf #1'); assert.same(parseInt('0x16', fakeZero), parseInt('0x16', 16), 'valueOf #2'); assert.same(parseInt('-0xF'), -15, 'signed hex #1'); assert.same(parseInt('-0xF', 16), -15, 'signed hex #2'); assert.same(parseInt('+0xF'), 15, 'signed hex #3'); assert.same(parseInt('+0xF', 16), 15, 'signed hex #4'); assert.same(parseInt('10', -4294967294), 2, 'radix uses ToUint32'); assert.same(parseInt(null), NaN); assert.same(parseInt(void 8), NaN); }); }).call(this); // Generated by LiveScript 1.4.0 (function(){ var module, test; module = QUnit.module, test = QUnit.test; module('ES6'); test('Number#toFixed', function(assert){ var toFixed; toFixed = Number.prototype.toFixed; assert.isFunction(toFixed); assert.name(toFixed, 'toFixed'); assert.arity(toFixed, 1); assert.looksNative(toFixed); assert.nonEnumerable(Number.prototype, 'toFixed'); assert.same(0.00008.toFixed(3), '0.000'); assert.same(0.9.toFixed(0), '1'); assert.same(1.255.toFixed(2), '1.25'); assert.same(1843654265.0774949.toFixed(5), '1843654265.07749'); assert.same(1000000000000000128 .toFixed(0), '1000000000000000128'); assert.same(toFixed.call(1), '1'); assert.same(toFixed.call(1, 0), '1'); assert.same(toFixed.call(1, 1), '1.0'); assert.same(toFixed.call(1, 1.1), '1.0'); assert.same(toFixed.call(1, 0.9), '1'); assert.same(toFixed.call(1, '0'), '1'); assert.same(toFixed.call(1, '1'), '1.0'); assert.same(toFixed.call(1, '1.1'), '1.0'); assert.same(toFixed.call(1, '0.9'), '1'); assert.same(toFixed.call(1, NaN), '1'); assert.same(toFixed.call(1, 'some string'), '1'); assert.same((function(){ try { return toFixed.call(1, -0.1); } catch (e$) {} }()), '1'); assert.same(new Number(1).toFixed(), '1'); assert.same(new Number(1).toFixed(0), '1'); assert.same(new Number(1).toFixed(1), '1.0'); assert.same(new Number(1).toFixed(1.1), '1.0'); assert.same(new Number(1).toFixed(0.9), '1'); assert.same(new Number(1).toFixed('0'), '1'); assert.same(new Number(1).toFixed('1'), '1.0'); assert.same(new Number(1).toFixed('1.1'), '1.0'); assert.same(new Number(1).toFixed('0.9'), '1'); assert.same(new Number(1).toFixed(NaN), '1'); assert.same(new Number(1).toFixed('some string'), '1'); assert.same((function(){ try { return new Number(1).toFixed(-0.1); } catch (e$) {} }()), '1'); assert.same(NaN.toFixed(), 'NaN'); assert.same(NaN.toFixed(0), 'NaN'); assert.same(NaN.toFixed(1), 'NaN'); assert.same(NaN.toFixed(1.1), 'NaN'); assert.same(NaN.toFixed(0.9), 'NaN'); assert.same(NaN.toFixed('0'), 'NaN'); assert.same(NaN.toFixed('1'), 'NaN'); assert.same(NaN.toFixed('1.1'), 'NaN'); assert.same(NaN.toFixed('0.9'), 'NaN'); assert.same(NaN.toFixed(NaN), 'NaN'); assert.same(NaN.toFixed('some string'), 'NaN'); assert.same((function(){ try { return NaN.toFixed(-0.1); } catch (e$) {} }()), 'NaN'); assert.same(new Number(1e21).toFixed(), String(1e21)); assert.same(new Number(1e21).toFixed(0), String(1e21)); assert.same(new Number(1e21).toFixed(1), String(1e21)); assert.same(new Number(1e21).toFixed(1.1), String(1e21)); assert.same(new Number(1e21).toFixed(0.9), String(1e21)); assert.same(new Number(1e21).toFixed('0'), String(1e21)); assert.same(new Number(1e21).toFixed('1'), String(1e21)); assert.same(new Number(1e21).toFixed('1.1'), String(1e21)); assert.same(new Number(1e21).toFixed('0.9'), String(1e21)); assert.same(new Number(1e21).toFixed(NaN), String(1e21)); assert.same(new Number(1e21).toFixed('some string'), String(1e21)); assert.same((function(){ try { return new Number(1e21).toFixed(-0.1); } catch (e$) {} }()), String(1e21)); assert.throws(function(){ 1.0.toFixed(-101); }, RangeError, 'If f < 0 or f > 20, throw a RangeError exception.'); assert.throws(function(){ 1.0.toFixed(101); }, RangeError, 'If f < 0 or f > 20, throw a RangeError exception.'); assert.throws(function(){ NaN.toFixed(Infinity); }, RangeError, 'If f < 0 or f > 20, throw a RangeError exception.'); assert.throws(function(){ toFixed.call({}, 1); }, TypeError, '? thisNumberValue(this value)'); assert.throws(function(){ toFixed.call('123', 1); }, TypeError, '? thisNumberValue(this value)'); assert.throws(function(){ toFixed.call(false, 1); }, TypeError, '? thisNumberValue(this value)'); assert.throws(function(){ toFixed.call(null, 1); }, TypeError, '? thisNumberValue(this value)'); assert.throws(function(){ toFixed.call(void 8, 1); }, TypeError, '? thisNumberValue(this value)'); }); }).call(this); // Generated by LiveScript 1.4.0 (function(){ var module, test; module = QUnit.module, test = QUnit.test; module('ES6'); test('Number#toPrecision', function(assert){ var toPrecision; toPrecision = Number.prototype.toPrecision; assert.isFunction(toPrecision); assert.name(toPrecision, 'toPrecision'); assert.arity(toPrecision, 1); assert.looksNative(toPrecision); assert.nonEnumerable(Number.prototype, 'toPrecision'); assert.same(0.00008.toPrecision(3), '0.0000800', '0.00008.toPrecision(3)'); assert.same(1.255.toPrecision(2), '1.3', '1.255.toPrecision(2)'); assert.same(1843654265.0774949.toPrecision(13), '1843654265.077', '1843654265.0774949.toPrecision(13)'); assert.same(NaN.toPrecision(1), 'NaN', 'If x is NaN, return the String "NaN".'); assert.same(123.456.toPrecision(), '123.456', 'If precision is undefined, return ! ToString(x).'); assert.same(123.456.toPrecision(void 8), '123.456', 'If precision is undefined, return ! ToString(x).'); assert.throws(function(){ 0.9.toPrecision(0); }, RangeError, 'If p < 1 or p > 21, throw a RangeError exception.'); assert.throws(function(){ 0.9.toPrecision(101); }, RangeError, 'If p < 1 or p > 21, throw a RangeError exception.'); assert.throws(function(){ toPrecision.call({}, 1); }, TypeError, '? thisNumberValue(this value)'); assert.throws(function(){ toPrecision.call('123', 1); }, TypeError, '? thisNumberValue(this value)'); assert.throws(function(){ toPrecision.call(false, 1); }, TypeError, '? thisNumberValue(this value)'); assert.throws(function(){ toPrecision.call(null, 1); }, TypeError, '? thisNumberValue(this value)'); assert.throws(function(){ toPrecision.call(void 8, 1); }, TypeError, '? thisNumberValue(this value)'); }); }).call(this); // Generated by LiveScript 1.4.0 (function(){ var module, test; module = QUnit.module, test = QUnit.test; module('ES6'); test('Object.assign', function(assert){ var assign, keys, defineProperty, foo, str, c, d, D, ref$, O, string, i$, x$, len$; assign = Object.assign, keys = Object.keys, defineProperty = Object.defineProperty; assert.isFunction(assign); assert.arity(assign, 2); assert.name(assign, 'assign'); assert.looksNative(assign); assert.nonEnumerable(Object, 'assign'); foo = { q: 1 }; assert.strictEqual(foo, assign(foo, { bar: 2 }), 'assign return target'); assert.strictEqual(foo.bar, 2, 'assign define properties'); assert.deepEqual(assign({}, { q: 1 }, { w: 2 }), { q: 1, w: 2 }); assert.deepEqual(assign({}, 'qwe'), { 0: 'q', 1: 'w', 2: 'e' }); assert.throws(function(){ return assign(null, { q: 1 }); }, TypeError); assert.throws(function(){ return assign(void 8, { q: 1 }); }, TypeError); str = assign('qwe', { q: 1 }); assert.strictEqual(typeof str, 'object'); assert.strictEqual(String(str), 'qwe'); assert.strictEqual(str.q, 1); if (DESCRIPTORS) { foo = { baz: 1 }; assign(foo, defineProperty({}, 'bar', { get: function(){ return this.baz + 1; } })); assert.ok(foo.bar === void 8, "assign don't copy descriptors"); c = Symbol('c'); d = Symbol('d'); D = (ref$ = { a: 'a' }, ref$[c] = 'c', ref$); defineProperty(D, 'b', { value: 'b' }); defineProperty(D, d, { value: 'd' }); O = assign({}, D); assert.strictEqual(O.a, 'a', 'a'); assert.strictEqual(O.b, void 8, 'b'); assert.strictEqual(O[c], 'c', 'c'); assert.strictEqual(O[d], void 8, 'd'); try { assert.strictEqual(Function('return Object.assign({b: 1}, {get a(){delete this.b;},b: 2})')().b, 1); } catch (e$) {} try { assert.strictEqual(Function('return Object.assign({b: 1}, {get a(){Object.defineProperty(this, "b", {value:4,enumerable:false});},b: 2})')().b, 1); } catch (e$) {} } string = 'abcdefghijklmnopqrst'; O = {}; for (i$ = 0, len$ = (ref$ = string.split('')).length; i$ < len$; ++i$) { x$ = ref$[i$]; O[x$] = x$; } assert.strictEqual(keys(assign({}, O)).join(''), string); }); }).call(this); // Generated by LiveScript 1.4.0 (function(){ var module, test; module = QUnit.module, test = QUnit.test; module('ES6'); test('Object.create', function(assert){ var create, getPrototypeOf, getOwnPropertyNames, isObject, isPrototype, getPropertyNames, obj, fn; create = Object.create, getPrototypeOf = Object.getPrototypeOf, getOwnPropertyNames = Object.getOwnPropertyNames; isObject = function(it){ return it === Object(it); }; isPrototype = function(a, b){ return {}.isPrototypeOf.call(a, b); }; getPropertyNames = function(object){ var result, i$, x$, ref$, len$; result = getOwnPropertyNames(object); while (object = getPrototypeOf(object)) { for (i$ = 0, len$ = (ref$ = getOwnPropertyNames(object)).length; i$ < len$; ++i$) { x$ = ref$[i$]; in$(x$, result) || result.push(x$); } } return result; }; assert.isFunction(create); assert.arity(create, 2); assert.name(create, 'create'); assert.looksNative(create); assert.nonEnumerable(Object, 'create'); assert.ok(isPrototype(obj = { q: 1 }, create(obj))); assert.ok(create(obj).q === 1); fn = function(){ return this.a = 1; }; assert.ok(create(new fn) instanceof fn); assert.ok(fn.prototype === getPrototypeOf(getPrototypeOf(create(new fn)))); assert.ok(create(new fn).a === 1); assert.ok(create({}, { a: { value: 42 } }).a === 42); assert.ok(isObject(obj = create(null, { w: { value: 2 } }))); assert.ok(!('toString' in obj)); assert.ok(obj.w === 2); assert.deepEqual(getPropertyNames(create(null)), []); }); function in$(x, xs){ var i = -1, l = xs.length >>> 0; while (++i < l) if (x === xs[i]) return true; return false; } }).call(this); // Generated by LiveScript 1.4.0 (function(){ var module, test; module = QUnit.module, test = QUnit.test; module('ES6'); test('Object.defineProperties', function(assert){ var defineProperties, rez, src; defineProperties = Object.defineProperties; assert.isFunction(defineProperties); assert.arity(defineProperties, 2); assert.name(defineProperties, 'defineProperties'); assert.looksNative(defineProperties); assert.nonEnumerable(Object, 'defineProperties'); assert.ok((rez = defineProperties(src = {}, { q: { value: 42 }, w: { value: 33 } })) === src); return assert.ok(rez.q === 42) && rez.w === 33; }); }).call(this); // Generated by LiveScript 1.4.0 (function(){ var module, test; module = QUnit.module, test = QUnit.test; module('ES6'); test('Object.defineProperty', function(assert){ var defineProperty, create, rez, src; defineProperty = Object.defineProperty, create = Object.create; assert.isFunction(defineProperty); assert.arity(defineProperty, 3); assert.name(defineProperty, 'defineProperty'); assert.looksNative(defineProperty); assert.nonEnumerable(Object, 'defineProperty'); assert.ok((rez = defineProperty(src = {}, 'q', { value: 42 })) === src); assert.ok(rez.q === 42); assert.throws(function(){ defineProperty(42, 1, {}); }); assert.throws(function(){ defineProperty({}, create(null), {}); }); return assert.throws(function(){ defineProperty({}, 1, 1); }); }); }).call(this); // Generated by LiveScript 1.4.0 (function(){ var module, test, toString$ = {}.toString; module = QUnit.module, test = QUnit.test; module('ES6'); test('Object.freeze', function(assert){ var freeze, isFrozen, keys, getOwnPropertyNames, i$, ref$, len$, value, key; freeze = Object.freeze, isFrozen = Object.isFrozen, keys = Object.keys, getOwnPropertyNames = Object.getOwnPropertyNames; assert.isFunction(freeze); assert.arity(freeze, 1); assert.name(freeze, 'freeze'); assert.looksNative(freeze); assert.nonEnumerable(Object, 'freeze'); for (i$ = 0, len$ = (ref$ = [42, 'foo', false, null, void 8, {}]).length; i$ < len$; ++i$) { value = ref$[i$]; assert.ok((fn$()), "accept " + toString$.call(value).slice(8, -1)); assert.same(freeze(value), value, "returns target on " + toString$.call(value).slice(8, -1)); } if (NATIVE) { assert.ok(isFrozen(freeze({}))); } assert.arrayEqual((function(){ var results$ = []; for (key in freeze({})) { results$.push(key); } return results$; }()), []); assert.arrayEqual(keys(freeze({})), []); assert.arrayEqual(getOwnPropertyNames(freeze({})), []); ((typeof Object != 'undefined' && Object !== null) && Object.getOwnPropertySymbols) && assert.arrayEqual(Object.getOwnPropertySymbols(freeze({})), []); ((typeof Reflect != 'undefined' && Reflect !== null) && Reflect.ownKeys) && assert.arrayEqual(Reflect.ownKeys(freeze({})), []); function fn$(){ try { freeze(value); return true; } catch (e$) {} } }); }).call(this); // Generated by LiveScript 1.4.0 (function(){ var module, test, toString$ = {}.toString; module = QUnit.module, test = QUnit.test; module('ES6'); test('Object.getOwnPropertyDescriptor', function(assert){ var getOwnPropertyDescriptor, i$, ref$, len$, value; getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor; assert.isFunction(getOwnPropertyDescriptor); assert.arity(getOwnPropertyDescriptor, 2); assert.name(getOwnPropertyDescriptor, 'getOwnPropertyDescriptor'); assert.looksNative(getOwnPropertyDescriptor); assert.nonEnumerable(Object, 'getOwnPropertyDescriptor'); assert.deepEqual(getOwnPropertyDescriptor({ q: 42 }, 'q'), { writable: true, enumerable: true, configurable: true, value: 42 }); assert.ok(getOwnPropertyDescriptor({}, 'toString') === void 8); for (i$ = 0, len$ = (ref$ = [42, 'foo', false]).length; i$ < len$; ++i$) { value = ref$[i$]; assert.ok((fn$()), "accept " + toString$.call(value).slice(8, -1)); } for (i$ = 0, len$ = (ref$ = [null, void 8]).length; i$ < len$; ++i$) { value = ref$[i$]; assert.throws(fn1$, TypeError, "throws on " + value); } function fn$(){ try { getOwnPropertyDescriptor(value); return true; } catch (e$) {} } function fn1$(){ getOwnPropertyDescriptor(value); } }); }).call(this); // Generated by LiveScript 1.4.0 (function(){ var module, test, toString$ = {}.toString; module = QUnit.module, test = QUnit.test; module('ES6'); test('Object.getOwnPropertyNames', function(assert){ var getOwnPropertyNames, fn1, fn2, names, i$, ref$, len$, value, iframe, w; getOwnPropertyNames = Object.getOwnPropertyNames, getOwnPropertyNames = Object.getOwnPropertyNames; assert.isFunction(getOwnPropertyNames); assert.arity(getOwnPropertyNames, 1); assert.name(getOwnPropertyNames, 'getOwnPropertyNames'); assert.looksNative(getOwnPropertyNames); assert.nonEnumerable(Object, 'getOwnPropertyNames'); fn1 = function(w){ this.w = w != null ? w : 2; }; fn2 = function(toString){ this.toString = toString != null ? toString : 2; }; fn1.prototype.q = fn2.prototype.q = 1; names = getOwnPropertyNames([1, 2, 3]); assert.strictEqual(names.length, 4); assert.ok(in$('0', names)); assert.ok(in$('1', names)); assert.ok(in$('2', names)); assert.ok(in$('length', names)); assert.deepEqual(getOwnPropertyNames(new fn1(1)), ['w']); assert.deepEqual(getOwnPropertyNames(new fn2(1)), ['toString']); assert.ok(in$('toString', getOwnPropertyNames(Array.prototype))); assert.ok(in$('toString', getOwnPropertyNames(Object.prototype))); assert.ok(in$('constructor', getOwnPropertyNames(Object.prototype))); for (i$ = 0, len$ = (ref$ = [42, 'foo', false]).length; i$ < len$; ++i$) { value = ref$[i$]; assert.ok((fn$()), "accept " + toString$.call(value).slice(8, -1)); } for (i$ = 0, len$ = (ref$ = [null, void 8]).length; i$ < len$; ++i$) { value = ref$[i$]; assert.throws(fn1$, TypeError, "throws on " + value); } if (typeof document != 'undefined' && document !== null) { assert.ok((function(){ try { iframe = document.createElement('iframe'); iframe.src = 'http://example.com'; document.documentElement.appendChild(iframe); w = iframe.contentWindow; document.documentElement.removeChild(iframe); return getOwnPropertyNames(w); } catch (e$) {} }()), 'IE11 bug with iframe and window'); } function fn$(){ try { getOwnPropertyNames(value); return true; } catch (e$) {} } function fn1$(){ getOwnPropertyNames(value); } }); function in$(x, xs){ var i = -1, l = xs.length >>> 0; while (++i < l) if (x === xs[i]) return true; return false; } }).call(this); // Generated by LiveScript 1.4.0 (function(){ var module, test, toString$ = {}.toString; module = QUnit.module, test = QUnit.test; module('ES6'); test('Object.getPrototypeOf', function(assert){ var create, getPrototypeOf, fn, obj, foo, bar, i$, ref$, len$, value; create = Object.create, getPrototypeOf = Object.getPrototypeOf; assert.isFunction(getPrototypeOf); assert.arity(getPrototypeOf, 1); assert.name(getPrototypeOf, 'getPrototypeOf'); assert.looksNative(getPrototypeOf); assert.nonEnumerable(Object, 'getPrototypeOf'); assert.ok(getPrototypeOf({}) === Object.prototype); assert.ok(getPrototypeOf([]) === Array.prototype); assert.ok(getPrototypeOf(new (fn = (function(){ fn.displayName = 'fn'; var prototype = fn.prototype, constructor = fn; function fn(){} return fn; }()))) === fn.prototype); assert.ok(getPrototypeOf(create(obj = { q: 1 })) === obj); assert.ok(getPrototypeOf(create(null)) === null); assert.ok(getPrototypeOf(getPrototypeOf({})) === null); foo = function(){}; foo.prototype.foo = 'foo'; bar = function(){}; bar.prototype = create(foo.prototype); bar.prototype.constructor = bar; assert.strictEqual(getPrototypeOf(bar.prototype).foo, 'foo'); for (i$ = 0, len$ = (ref$ = [42, 'foo', false]).length; i$ < len$; ++i$) { value = ref$[i$]; assert.ok((fn$()), "accept " + toString$.call(value).slice(8, -1)); } for (i$ = 0, len$ = (ref$ = [null, void 8]).length; i$ < len$; ++i$) { value = ref$[i$]; assert.throws(fn1$, TypeError, "throws on " + value); } assert.strictEqual(getPrototypeOf('foo'), String.prototype); function fn$(){ try { getPrototypeOf(value); return true; } catch (e$) {} } function fn1$(){ getPrototypeOf(value); } }); }).call(this); // Generated by LiveScript 1.4.0 (function(){ var module, test, toString$ = {}.toString; module = QUnit.module, test = QUnit.test; module('ES6'); test('Object.isExtensible', function(assert){ var preventExtensions, isExtensible, i$, ref$, len$, value; preventExtensions = Object.preventExtensions, isExtensible = Object.isExtensible; assert.isFunction(isExtensible); assert.arity(isExtensible, 1); assert.name(isExtensible, 'isExtensible'); assert.nonEnumerable(Object, 'isExtensible'); assert.looksNative(isExtensible); for (i$ = 0, len$ = (ref$ = [42, 'foo', false, null, void 8]).length; i$ < len$; ++i$) { value = ref$[i$]; assert.ok((fn$()), "accept " + toString$.call(value).slice(8, -1)); assert.same(isExtensible(value), false, "returns true on " + toString$.call(value).slice(8, -1)); } assert.same(isExtensible({}), true); if (NATIVE) { assert.ok(!isExtensible(preventExtensions({}))); } function fn$(){ try { isExtensible(value); return true; } catch (e$) {} } }); }).call(this); // Generated by LiveScript 1.4.0 (function(){ var module, test, toString$ = {}.toString; module = QUnit.module, test = QUnit.test; module('ES6'); test('Object.isFrozen', function(assert){ var freeze, isFrozen, i$, ref$, len$, value; freeze = Object.freeze, isFrozen = Object.isFrozen; assert.isFunction(isFrozen); assert.arity(isFrozen, 1); assert.name(isFrozen, 'isFrozen'); assert.looksNative(isFrozen); assert.nonEnumerable(Object, 'isFrozen'); for (i$ = 0, len$ = (ref$ = [42, 'foo', false, null, void 8]).length; i$ < len$; ++i$) { value = ref$[i$]; assert.ok((fn$()), "accept " + toString$.call(value).slice(8, -1)); assert.same(isFrozen(value), true, "returns true on " + toString$.call(value).slice(8, -1)); } assert.same(isFrozen({}), false); if (NATIVE) { assert.ok(isFrozen(freeze({}))); } function fn$(){ try { isFrozen(value); return true; } catch (e$) {} } }); }).call(this); // Generated by LiveScript 1.4.0 (function(){ var module, test, toString$ = {}.toString; module = QUnit.module, test = QUnit.test; module('ES6'); test('Object.isSealed', function(assert){ var seal, isSealed, i$, ref$, len$, value; seal = Object.seal, isSealed = Object.isSealed; assert.isFunction(isSealed); assert.arity(isSealed, 1); assert.name(isSealed, 'isSealed'); assert.looksNative(isSealed); assert.nonEnumerable(Object, 'isSealed'); for (i$ = 0, len$ = (ref$ = [42, 'foo', false, null, void 8]).length; i$ < len$; ++i$) { value = ref$[i$]; assert.ok((fn$()), "accept " + toString$.call(value).slice(8, -1)); assert.same(isSealed(value), true, "returns true on " + toString$.call(value).slice(8, -1)); } assert.same(isSealed({}), false); if (NATIVE) { assert.ok(isSealed(seal({}))); } function fn$(){ try { isSealed(value); return true; } catch (e$) {} } }); }).call(this); // Generated by LiveScript 1.4.0 (function(){ var module, test; module = QUnit.module, test = QUnit.test; module('ES6'); test('Object.is', function(assert){ var same; same = Object.is; assert.isFunction(same); assert.arity(same, 2); assert.name(same, 'is'); assert.looksNative(same); assert.nonEnumerable(Object, 'is'); assert.ok(same(1, 1), '1 is 1'); assert.ok(same(NaN, NaN), '1 is 1'); assert.ok(!same(0, -0), '0 isnt -0'); return assert.ok(!same({}, {}), '{} isnt {}'); }); }).call(this); // Generated by LiveScript 1.4.0 (function(){ var module, test, toString$ = {}.toString; module = QUnit.module, test = QUnit.test; module('ES6'); test('Object.keys', function(assert){ var keys, fn1, fn2, i$, ref$, len$, value; keys = Object.keys; assert.isFunction(keys); assert.arity(keys, 1); assert.name(keys, 'keys'); assert.looksNative(keys); assert.nonEnumerable(Object, 'keys'); fn1 = function(w){ this.w = w != null ? w : 2; }; fn2 = function(toString){ this.toString = toString != null ? toString : 2; }; fn1.prototype.q = fn2.prototype.q = 1; assert.deepEqual(keys([1, 2, 3]), ['0', '1', '2']); assert.deepEqual(keys(new fn1(1)), ['w']); assert.deepEqual(keys(new fn2(1)), ['toString']); assert.ok(!in$('push', keys(Array.prototype))); for (i$ = 0, len$ = (ref$ = [42, 'foo', false]).length; i$ < len$; ++i$) { value = ref$[i$]; assert.ok((fn$()), "accept " + toString$.call(value).slice(8, -1)); } for (i$ = 0, len$ = (ref$ = [null, void 8]).length; i$ < len$; ++i$) { value = ref$[i$]; assert.throws(fn1$, TypeError, "throws on " + value); } function fn$(){ try { keys(value); return true; } catch (e$) {} } function fn1$(){ keys(value); } }); function in$(x, xs){ var i = -1, l = xs.length >>> 0; while (++i < l) if (x === xs[i]) return true; return false; } }).call(this); // Generated by LiveScript 1.4.0 (function(){ var module, test, toString$ = {}.toString; module = QUnit.module, test = QUnit.test; module('ES6'); test('Object.preventExtensions', function(assert){ var preventExtensions, isExtensible, keys, getOwnPropertyNames, i$, ref$, len$, value, key; preventExtensions = Object.preventExtensions, isExtensible = Object.isExtensible, keys = Object.keys, getOwnPropertyNames = Object.getOwnPropertyNames; assert.isFunction(preventExtensions); assert.arity(preventExtensions, 1); assert.name(preventExtensions, 'preventExtensions'); assert.looksNative(preventExtensions); assert.nonEnumerable(Object, 'preventExtensions'); for (i$ = 0, len$ = (ref$ = [42, 'foo', false, null, void 8, {}]).length; i$ < len$; ++i$) { value = ref$[i$]; assert.ok((fn$()), "accept " + toString$.call(value).slice(8, -1)); assert.same(preventExtensions(value), value, "returns target on " + toString$.call(value).slice(8, -1)); } if (NATIVE) { assert.ok(isExtensible(preventExtensions({}))); } assert.arrayEqual((function(){ var results$ = []; for (key in preventExtensions({})) { results$.push(key); } return results$; }()), []); assert.arrayEqual(keys(preventExtensions({})), []); assert.arrayEqual(getOwnPropertyNames(preventExtensions({})), []); ((typeof Object != 'undefined' && Object !== null) && Object.getOwnPropertySymbols) && assert.arrayEqual(Object.getOwnPropertySymbols(preventExtensions({})), []); ((typeof Reflect != 'undefined' && Reflect !== null) && Reflect.ownKeys) && assert.arrayEqual(Reflect.ownKeys(preventExtensions({})), []); function fn$(){ try { preventExtensions(value); return true; } catch (e$) {} } }); }).call(this); // Generated by LiveScript 1.4.0 (function(){ var module, test, toString$ = {}.toString; module = QUnit.module, test = QUnit.test; module('ES6'); test('Object.seal', function(assert){ var seal, isSealed, keys, getOwnPropertyNames, i$, ref$, len$, value, key; seal = Object.seal, isSealed = Object.isSealed, keys = Object.keys, getOwnPropertyNames = Object.getOwnPropertyNames; assert.isFunction(seal); assert.arity(seal, 1); assert.name(seal, 'seal'); assert.looksNative(seal); assert.nonEnumerable(Object, 'seal'); for (i$ = 0, len$ = (ref$ = [42, 'foo', false, null, void 8, {}]).length; i$ < len$; ++i$) { value = ref$[i$]; assert.ok((fn$()), "accept " + toString$.call(value).slice(8, -1)); assert.same(seal(value), value, "returns target on " + toString$.call(value).slice(8, -1)); } if (NATIVE) { assert.ok(isSealed(seal({}))); } assert.arrayEqual((function(){ var results$ = []; for (key in seal({})) { results$.push(key); } return results$; }()), []); assert.arrayEqual(keys(seal({})), []); assert.arrayEqual(getOwnPropertyNames(seal({})), []); ((typeof Object != 'undefined' && Object !== null) && Object.getOwnPropertySymbols) && assert.arrayEqual(Object.getOwnPropertySymbols(seal({})), []); ((typeof Reflect != 'undefined' && Reflect !== null) && Reflect.ownKeys) && assert.arrayEqual(Reflect.ownKeys(seal({})), []); function fn$(){ try { seal(value); return true; } catch (e$) {} } }); }).call(this); // Generated by LiveScript 1.4.0 (function(){ var module, test; if (PROTO) { module = QUnit.module, test = QUnit.test; module('ES6'); test('Object.setPrototypeOf', function(assert){ var setPrototypeOf, tmp; setPrototypeOf = Object.setPrototypeOf; assert.isFunction(setPrototypeOf); assert.arity(setPrototypeOf, 2); assert.name(setPrototypeOf, 'setPrototypeOf'); assert.looksNative(setPrototypeOf); assert.nonEnumerable(Object, 'setPrototypeOf'); assert.ok('apply' in setPrototypeOf({}, Function.prototype), 'Parent properties in target'); assert.strictEqual(setPrototypeOf({ a: 2 }, { b: function(){ return Math.pow(this.a, 2); } }).b(), 4, 'Child and parent properties in target'); assert.strictEqual(setPrototypeOf(tmp = {}, { a: 1 }), tmp, 'setPrototypeOf return target'); return assert.ok(!('toString' in setPrototypeOf({}, null)), 'Can set null as prototype'); }); } }).call(this); // Generated by LiveScript 1.4.0 (function(){ var module, test; module = QUnit.module, test = QUnit.test; module('ES6'); test('Object#toString', function(assert){ var toString, i$, x$, ref$, len$, Constructor, Class; assert.arity(Object.prototype.toString, 0); assert.name(Object.prototype.toString, 'toString'); assert.looksNative(Object.prototype.toString); assert.nonEnumerable(Object.prototype, 'toString'); toString = Object.prototype.toString; if (STRICT) { assert.strictEqual(toString.call(null), '[object Null]', 'null -> `Null`'); assert.strictEqual(toString.call(void 8), '[object Undefined]', 'undefined -> `Undefined`'); } assert.strictEqual(toString.call(true), '[object Boolean]', 'bool -> `Boolean`'); assert.strictEqual(toString.call('string'), '[object String]', 'string -> `String`'); assert.strictEqual(toString.call(7), '[object Number]', 'number -> `Number`'); (typeof Symbol != 'undefined' && Symbol !== null) && assert.strictEqual(toString.call(Symbol()), '[object Symbol]', 'symbol -> `Symbol`'); assert.strictEqual(toString.call(new Boolean(false)), '[object Boolean]', 'new Boolean -> `Boolean`'); assert.strictEqual(toString.call(new String('')), '[object String]', 'new String -> `String`'); assert.strictEqual(toString.call(new Number(7)), '[object Number]', 'new Number -> `Number`'); assert.strictEqual('' + {}, '[object Object]', '{} -> `Object`'); assert.strictEqual(toString.call([]), '[object Array]', ' [] -> `Array`'); assert.strictEqual(toString.call(function(){}), '[object Function]', 'function -> `Function`'); assert.strictEqual(toString.call(/./), '[object RegExp]', 'regexp -> `RegExp`'); assert.strictEqual(toString.call(TypeError()), '[object Error]', 'new TypeError -> `Error`'); assert.strictEqual(toString.call(function(){ return arguments; }()), '[object Arguments]', 'arguments -> `Arguments`'); for (i$ = 0, len$ = (ref$ = ['Int8Array', 'Uint8Array', 'Uint8ClampedArray', 'Int16Array', 'Uint16Array', 'Int32Array', 'Uint32Array', 'Float32Array', 'Float64Array', 'ArrayBuffer']).length; i$ < len$; ++i$) { x$ = ref$[i$]; Constructor = global[x$]; if (Constructor) { assert.strictEqual(toString.call(new Constructor(1)), "[object " + x$ + "]", "new " + x$ + " -> `" + x$ + "`"); } } if (NATIVE && (typeof DataView != 'undefined' && DataView !== null)) { assert.strictEqual('' + new DataView(new ArrayBuffer(1)), '[object DataView]', 'new DataView -> `DataView`'); } if (typeof Set != 'undefined' && Set !== null) { assert.strictEqual('' + new Set, '[object Set]', 'set -> `Set`'); } if (typeof Map != 'undefined' && Map !== null) { assert.strictEqual('' + new Map, '[object Map]', 'map -> `Map`'); } if (typeof WeakSet != 'undefined' && WeakSet !== null) { assert.strictEqual('' + new WeakSet, '[object WeakSet]', 'weakset -> `WeakSet`'); } if (typeof WeakMap != 'undefined' && WeakMap !== null) { assert.strictEqual('' + new WeakMap, '[object WeakMap]', 'weakmap -> `WeakMap`'); } if (typeof Promise != 'undefined' && Promise !== null) { assert.strictEqual('' + new Promise(function(){}), '[object Promise]', 'promise -> `Promise`'); } if (''[typeof Symbol != 'undefined' && Symbol !== null ? Symbol.iterator : void 8]) { assert.strictEqual('' + ''[Symbol.iterator](), '[object String Iterator]', 'String Iterator -> `String Iterator`'); } if ([].entries) { assert.strictEqual('' + [].entries(), '[object Array Iterator]', 'Array Iterator -> `Array Iterator`'); } if ((typeof Set != 'undefined' && Set !== null) && Set.entries) { assert.strictEqual('' + new Set().entries(), '[object Set Iterator]', 'Set Iterator -> `Set Iterator`'); } if ((typeof Map != 'undefined' && Map !== null) && Map.entries) { assert.strictEqual('' + new Map().entries(), '[object Map Iterator]', 'Map Iterator -> `Map Iterator`'); } assert.strictEqual('' + Math, '[object Math]', 'Math -> `Math`'); if (typeof JSON != 'undefined' && JSON !== null) { assert.strictEqual(toString.call(JSON), '[object JSON]', 'JSON -> `JSON`'); } Class = (function(){ Class.displayName = 'Class'; var prototype = Class.prototype, constructor = Class; Class.prototype[typeof Symbol != 'undefined' && Symbol !== null ? Symbol.toStringTag : void 8] = 'Class'; function Class(){} return Class; }()); return assert.strictEqual('' + new Class, '[object Class]', 'user class instance -> [Symbol.toStringTag]'); }); }).call(this); // Generated by LiveScript 1.4.0 (function(){ var module, test; module = QUnit.module, test = QUnit.test; module('ES6'); test('parseFloat', function(assert){ var ws; assert.isFunction(parseFloat); assert.name(parseFloat, 'parseFloat'); assert.arity(parseFloat, 1); assert.looksNative(parseFloat); assert.same(parseFloat('0'), 0); assert.same(parseFloat(' 0'), 0); assert.same(parseFloat('+0'), 0); assert.same(parseFloat(' +0'), 0); assert.same(parseFloat('-0'), -0); assert.same(parseFloat(' -0'), -0); ws = '\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u180E\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF'; assert.same(parseFloat(ws + '+0'), 0); assert.same(parseFloat(ws + '-0'), -0); assert.same(parseFloat(null), NaN); assert.same(parseFloat(void 8), NaN); }); }).call(this); // Generated by LiveScript 1.4.0 (function(){ var module, test; module = QUnit.module, test = QUnit.test; module('ES6'); test('parseInt', function(assert){ var i$, r, x$, ref$, len$, ws, fakeZero; assert.isFunction(parseInt); assert.name(parseInt, 'parseInt'); assert.arity(parseInt, 2); assert.looksNative(parseInt); for (i$ = 2; i$ <= 36; ++i$) { r = i$; assert.same(parseInt('10', r), r, "radix " + r); } for (i$ = 0, len$ = (ref$ = ['01', '08', '10', '42']).length; i$ < len$; ++i$) { x$ = ref$[i$]; assert.same(parseInt(x$), parseInt(x$, 10), "default radix is 10: " + x$); } assert.same(parseInt('0x16'), parseInt('0x16', 16), "default radix is 16: 0x16"); ws = '\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u180E\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF'; assert.same(parseInt(' 0x16'), parseInt('0x16', 16), 'ignores leading whitespace #1'); assert.same(parseInt(' 42'), parseInt('42', 10), 'ignores leading whitespace #2'); assert.same(parseInt(' 08'), parseInt('08', 10), 'ignores leading whitespace #3'); assert.same(parseInt(ws + '08'), parseInt('08', 10), 'ignores leading whitespace #4'); assert.same(parseInt(ws + '0x16'), parseInt('0x16', 16), 'ignores leading whitespace #5'); fakeZero = { valueOf: function(){ return 0; } }; assert.same(parseInt('08', fakeZero), parseInt('08', 10), 'valueOf #1'); assert.same(parseInt('0x16', fakeZero), parseInt('0x16', 16), 'valueOf #2'); assert.same(parseInt('-0xF'), -15, 'signed hex #1'); assert.same(parseInt('-0xF', 16), -15, 'signed hex #2'); assert.same(parseInt('+0xF'), 15, 'signed hex #3'); assert.same(parseInt('+0xF', 16), 15, 'signed hex #4'); assert.same(parseInt('10', -4294967294), 2, 'radix uses ToUint32'); assert.same(parseInt(null), NaN); assert.same(parseInt(void 8), NaN); }); }).call(this); // Generated by LiveScript 1.4.0 (function(){ 'use strict'; var module, test; module = QUnit.module, test = QUnit.test; module('ES6'); test('Promise', function(assert){ assert.isFunction(Promise); assert.arity(Promise, 1); assert.name(Promise, 'Promise'); assert.looksNative(Promise); assert.throws(function(){ Promise(); }, 'throws w/o `new`'); new Promise(function(resolve, reject){ assert.isFunction(Promise, 'resolver is function'); assert.isFunction(Promise, 'rejector is function'); assert.same(this, function(){ return this; }(), 'correct executor context'); }); }); if (DESCRIPTORS) { test('Promise operations order', function(assert){ var expected, async, result, resolve, p, resolve2, p2; assert.expect(1); expected = 'DEHAFGBC'; async = assert.async(); result = ''; p = new Promise(function(r){ resolve = r; }); resolve({ then: function(){ result += 'A'; throw Error(); } }); p['catch'](function(){ result += 'B'; }); p['catch'](function(){ result += 'C'; assert.same(result, expected); async(); }); p2 = new Promise(function(r){ resolve2 = r; }); resolve2(Object.defineProperty({}, 'then', { get: function(){ result += 'D'; throw Error(); } })); result += 'E'; p2['catch'](function(){ result += 'F'; }); p2['catch'](function(){ result += 'G'; }); result += 'H'; setTimeout(function(){ if (~result.indexOf('C')) { assert.same(result, expected); } }, 1e3); }); } test('Promise#then', function(assert){ var promise, FakePromise1, FakePromise2; assert.isFunction(Promise.prototype.then); NATIVE && assert.arity(Promise.prototype.then, 2); assert.name(Promise.prototype.then, 'then'); assert.looksNative(Promise.prototype.then); assert.nonEnumerable(Promise.prototype, 'then'); promise = new Promise(function(it){ it(42); }); promise.constructor = FakePromise1 = function(it){ it(function(){}, function(){}); }; FakePromise1[typeof Symbol != 'undefined' && Symbol !== null ? Symbol.species : void 8] = FakePromise2 = function(it){ it(function(){}, function(){}); }; assert.ok(promise.then(function(){}) instanceof FakePromise2, 'subclassing, @@species pattern'); promise = new Promise(function(it){ it(42); }); promise.constructor = FakePromise1 = function(it){ it(function(){}, function(){}); }; assert.ok(promise.then(function(){}) instanceof Promise, 'subclassing, incorrect `this` pattern'); promise = new Promise(function(it){ it(42); }); promise.constructor = FakePromise1 = function(it){ it(function(){}, function(){}); }; FakePromise1[typeof Symbol != 'undefined' && Symbol !== null ? Symbol.species : void 8] = function(){}; assert.throws(function(){ promise.then(function(){}); }, 'NewPromiseCapability validations, #1'); FakePromise1[typeof Symbol != 'undefined' && Symbol !== null ? Symbol.species : void 8] = function(it){ it(null, function(){}); }; assert.throws(function(){ promise.then(function(){}); }, 'NewPromiseCapability validations, #2'); FakePromise1[typeof Symbol != 'undefined' && Symbol !== null ? Symbol.species : void 8] = function(it){ it(function(){}, null); }; assert.throws(function(){ promise.then(function(){}); }, 'NewPromiseCapability validations, #3'); }); test('Promise#catch', function(assert){ var promise, FakePromise1, FakePromise2; assert.isFunction(Promise.prototype['catch']); NATIVE && assert.arity(Promise.prototype['catch'], 1); NATIVE && assert.name(Promise.prototype['catch'], 'catch'); assert.looksNative(Promise.prototype['catch']); assert.nonEnumerable(Promise.prototype, 'catch'); promise = new Promise(function(it){ it(42); }); promise.constructor = FakePromise1 = function(it){ it(function(){}, function(){}); }; FakePromise1[typeof Symbol != 'undefined' && Symbol !== null ? Symbol.species : void 8] = FakePromise2 = function(it){ it(function(){}, function(){}); }; assert.ok(promise['catch'](function(){}) instanceof FakePromise2, 'subclassing, @@species pattern'); promise = new Promise(function(it){ it(42); }); promise.constructor = FakePromise1 = function(it){ it(function(){}, function(){}); }; assert.ok(promise['catch'](function(){}) instanceof Promise, 'subclassing, incorrect `this` pattern'); promise = new Promise(function(it){ it(42); }); promise.constructor = FakePromise1 = function(it){ it(function(){}, function(){}); }; FakePromise1[typeof Symbol != 'undefined' && Symbol !== null ? Symbol.species : void 8] = function(){}; assert.throws(function(){ promise['catch'](function(){}); }, 'NewPromiseCapability validations, #1'); FakePromise1[typeof Symbol != 'undefined' && Symbol !== null ? Symbol.species : void 8] = function(it){ it(null, function(){}); }; assert.throws(function(){ promise['catch'](function(){}); }, 'NewPromiseCapability validations, #2'); FakePromise1[typeof Symbol != 'undefined' && Symbol !== null ? Symbol.species : void 8] = function(it){ it(function(){}, null); }; assert.throws(function(){ promise['catch'](function(){}); }, 'NewPromiseCapability validations, #3'); assert.same(Promise.prototype['catch'].call({ then: function(x, y){ return y; } }, 42), 42, 'calling `.then`'); }); test('Promise#@@toStringTag', function(assert){ assert.ok(Promise.prototype[typeof Symbol != 'undefined' && Symbol !== null ? Symbol.toStringTag : void 8] === 'Promise', 'Promise::@@toStringTag is `Promise`'); }); test('Promise.all', function(assert){ var all, iter, a, done, resolve, FakePromise1, FakePromise2, FakePromise3; all = Promise.all; assert.isFunction(all); assert.arity(all, 1); assert.name(all, 'all'); assert.looksNative(all); assert.nonEnumerable(Promise, 'all'); iter = createIterable([1, 2, 3]); Promise.all(iter)['catch'](function(){}); assert.ok(iter.received, 'works with iterables: iterator received'); assert.ok(iter.called, 'works with iterables: next called'); a = []; done = false; a[typeof Symbol != 'undefined' && Symbol !== null ? Symbol.iterator : void 8] = function(){ done = true; return [][typeof Symbol != 'undefined' && Symbol !== null ? Symbol.iterator : void 8].call(this); }; Promise.all(a); assert.ok(done); assert.throws(function(){ all.call(null, [])['catch'](function(){}); }, TypeError, 'throws without context'); done = false; resolve = Promise.resolve; try { Promise.resolve = function(){ throw 42; }; Promise.all(createIterable([1, 2, 3], { 'return': function(){ done = true; } }))['catch'](function(){}); } catch (e$) {} Promise.resolve = resolve; assert.ok(done, 'iteration closing'); FakePromise1 = function(it){ it(function(){}, function(){}); }; FakePromise1[typeof Symbol != 'undefined' && Symbol !== null ? Symbol.species : void 8] = FakePromise2 = function(it){ it(function(){}, function(){}); }; FakePromise1.resolve = FakePromise2.resolve = bind$(Promise, 'resolve'); assert.ok(all.call(FakePromise1, [1, 2, 3]) instanceof FakePromise1, 'subclassing, `this` pattern'); FakePromise1 = function(){}; FakePromise2 = function(it){ it(null, function(){}); }; FakePromise3 = function(it){ it(function(){}, null); }; FakePromise1.resolve = FakePromise2.resolve = FakePromise3.resolve = bind$(Promise, 'resolve'); assert.throws(function(){ all.call(FakePromise1, [1, 2, 3]); }, 'NewPromiseCapability validations, #1'); assert.throws(function(){ all.call(FakePromise2, [1, 2, 3]); }, 'NewPromiseCapability validations, #2'); assert.throws(function(){ all.call(FakePromise3, [1, 2, 3]); }, 'NewPromiseCapability validations, #3'); }); test('Promise.race', function(assert){ var race, iter, a, done, resolve, FakePromise1, FakePromise2, FakePromise3; race = Promise.race; assert.isFunction(race); assert.arity(race, 1); assert.name(race, 'race'); assert.looksNative(race); assert.nonEnumerable(Promise, 'race'); iter = createIterable([1, 2, 3]); Promise.race(iter)['catch'](function(){}); assert.ok(iter.received, 'works with iterables: iterator received'); assert.ok(iter.called, 'works with iterables: next called'); a = []; done = false; a[typeof Symbol != 'undefined' && Symbol !== null ? Symbol.iterator : void 8] = function(){ done = true; return [][typeof Symbol != 'undefined' && Symbol !== null ? Symbol.iterator : void 8].call(this); }; Promise.race(a); assert.ok(done); assert.throws(function(){ race.call(null, [])['catch'](function(){}); }, TypeError, 'throws without context'); done = false; resolve = Promise.resolve; try { Promise.resolve = function(){ throw 42; }; Promise.race(createIterable([1, 2, 3], { 'return': function(){ done = true; } }))['catch'](function(){}); } catch (e$) {} Promise.resolve = resolve; assert.ok(done, 'iteration closing'); FakePromise1 = function(it){ it(function(){}, function(){}); }; FakePromise1[typeof Symbol != 'undefined' && Symbol !== null ? Symbol.species : void 8] = FakePromise2 = function(it){ it(function(){}, function(){}); }; FakePromise1.resolve = FakePromise2.resolve = bind$(Promise, 'resolve'); assert.ok(race.call(FakePromise1, [1, 2, 3]) instanceof FakePromise1, 'subclassing, `this` pattern'); FakePromise1 = function(){}; FakePromise2 = function(it){ it(null, function(){}); }; FakePromise3 = function(it){ it(function(){}, null); }; FakePromise1.resolve = FakePromise2.resolve = FakePromise3.resolve = bind$(Promise, 'resolve'); assert.throws(function(){ race.call(FakePromise1, [1, 2, 3]); }, 'NewPromiseCapability validations, #1'); assert.throws(function(){ race.call(FakePromise2, [1, 2, 3]); }, 'NewPromiseCapability validations, #2'); assert.throws(function(){ race.call(FakePromise3, [1, 2, 3]); }, 'NewPromiseCapability validations, #3'); }); test('Promise.resolve', function(assert){ var resolve, FakePromise1, FakePromise2; resolve = Promise.resolve; assert.isFunction(resolve); NATIVE && assert.arity(resolve, 1); assert.name(resolve, 'resolve'); assert.looksNative(resolve); assert.nonEnumerable(Promise, 'resolve'); assert.throws(function(){ resolve.call(null, 1)['catch'](function(){}); }, TypeError, 'throws without context'); FakePromise1 = function(it){ it(function(){}, function(){}); }; FakePromise1[typeof Symbol != 'undefined' && Symbol !== null ? Symbol.species : void 8] = FakePromise2 = function(it){ it(function(){}, function(){}); }; assert.ok(resolve.call(FakePromise1, 42) instanceof FakePromise1, 'subclassing, `this` pattern'); assert.throws(function(){ resolve.call(function(){}, 42); }, 'NewPromiseCapability validations, #1'); assert.throws(function(){ resolve.call(function(it){ it(null, function(){}); }, 42); }, 'NewPromiseCapability validations, #2'); assert.throws(function(){ resolve.call(function(it){ it(function(){}, null); }, 42); }, 'NewPromiseCapability validations, #3'); }); test('Promise.reject', function(assert){ var reject, FakePromise1, FakePromise2; reject = Promise.reject; assert.isFunction(reject); NATIVE && assert.arity(reject, 1); assert.name(reject, 'reject'); assert.looksNative(reject); assert.nonEnumerable(Promise, 'reject'); assert.throws(function(){ reject.call(null, 1)['catch'](function(){}); }, TypeError, 'throws without context'); FakePromise1 = function(it){ it(function(){}, function(){}); }; FakePromise1[typeof Symbol != 'undefined' && Symbol !== null ? Symbol.species : void 8] = FakePromise2 = function(it){ it(function(){}, function(){}); }; assert.ok(reject.call(FakePromise1, 42) instanceof FakePromise1, 'subclassing, `this` pattern'); assert.throws(function(){ reject.call(function(){}, 42); }, 'NewPromiseCapability validations, #1'); assert.throws(function(){ reject.call(function(it){ it(null, function(){}); }, 42); }, 'NewPromiseCapability validations, #2'); assert.throws(function(){ reject.call(function(it){ it(function(){}, null); }, 42); }, 'NewPromiseCapability validations, #3'); }); if (PROTO) { test('Promise subclassing', function(assert){ var SubPromise, p1, p2, p3; SubPromise = function(it){ var self; self = new Promise(it); Object.setPrototypeOf(self, SubPromise.prototype); self.mine = 'subclass'; return self; }; Object.setPrototypeOf(SubPromise, Promise); SubPromise.prototype = Object.create(Promise.prototype); SubPromise.prototype.constructor = SubPromise; p1 = SubPromise.resolve(5); assert.strictEqual(p1.mine, 'subclass'); p1 = p1.then(function(it){ return assert.strictEqual(it, 5); }); assert.strictEqual(p1.mine, 'subclass'); p2 = new SubPromise(function(it){ return it(6); }); assert.strictEqual(p2.mine, 'subclass'); p2 = p2.then(function(it){ return assert.strictEqual(it, 6); }); assert.strictEqual(p2.mine, 'subclass'); p3 = SubPromise.all([p1, p2]); assert.strictEqual(p3.mine, 'subclass'); assert.ok(p3 instanceof Promise); assert.ok(p3 instanceof SubPromise); p3.then(assert.async(), function(it){ return assert.ok(it, false); }); }); } test('Unhandled rejection tracking', function(assert){ var done, start, onunhandledrejection, onrejectionhandled, $promise; done = false; start = assert.async(); if (typeof process != 'undefined' && process !== null) { assert.expect(3); process.on('unhandledRejection', onunhandledrejection = function(reason, promise){ process.removeListener('unhandledRejection', onunhandledrejection); assert.same(promise, $promise, 'unhandledRejection, promise'); assert.same(reason, 42, 'unhandledRejection, reason'); $promise['catch'](function(){}); }); process.on('rejectionHandled', onrejectionhandled = function(promise){ process.removeListener('rejectionHandled', onrejectionhandled); assert.same(promise, $promise, 'rejectionHandled, promise'); done || start(); done = true; }); } else { assert.expect(4); global.onunhandledrejection = function(it){ assert.same(it.promise, $promise, 'onunhandledrejection, promise'); assert.same(it.reason, 42, 'onunhandledrejection, reason'); setTimeout(function(){ $promise['catch'](function(){}); }, 1); global.onunhandledrejection = null; }; global.onrejectionhandled = function(it){ assert.same(it.promise, $promise, 'onrejectionhandled, promise'); assert.same(it.reason, 42, 'onrejectionhandled, reason'); global.onrejectionhandled = null; done || start(); done = true; }; } Promise.reject(43)['catch'](function(){}); $promise = Promise.reject(42); setTimeout(function(){ done || start(); done = true; }, 3e3); }); function bind$(obj, key, target){ return function(){ return (target || obj)[key].apply(obj, arguments) }; } }).call(this); // Generated by LiveScript 1.4.0 (function(){ var module, test; module = QUnit.module, test = QUnit.test; module('ES6'); test('Reflect.apply', function(assert){ var apply, C; apply = Reflect.apply; assert.isFunction(apply); assert.arity(apply, 3); assert.name(apply, 'apply'); assert.looksNative(apply); assert.nonEnumerable(Reflect, 'apply'); assert.strictEqual(apply(Array.prototype.push, [1, 2], [3, 4, 5]), 5); C = function(a, b, c){ return a + b + c; }; C.apply = 42; assert.strictEqual(apply(C, null, ['foo', 'bar', 'baz']), 'foobarbaz', 'works with redefined apply'); assert.throws(function(){ apply(42, null, []); }, TypeError, 'throws on primitive as first argument'); assert.throws(function(){ apply(function(){}, null); }, TypeError, 'throws without third argument'); assert.throws(function(){ apply(function(){}, null, '123'); }, TypeError, 'throws on primitive as third argument'); }); }).call(this); // Generated by LiveScript 1.4.0 (function(){ var module, test, getPrototypeOf; module = QUnit.module, test = QUnit.test; module('ES6'); getPrototypeOf = Object.getPrototypeOf; test('Reflect.construct', function(assert){ var construct, C, inst, f, e; construct = Reflect.construct; assert.isFunction(construct); assert.arity(construct, 2); assert.name(construct, 'construct'); assert.looksNative(construct); assert.nonEnumerable(Reflect, 'construct'); C = function(a, b, c){ return this.qux = a + b + c; }; assert.strictEqual(construct(C, ['foo', 'bar', 'baz']).qux, 'foobarbaz', 'basic'); C.apply = 42; assert.strictEqual(construct(C, ['foo', 'bar', 'baz']).qux, 'foobarbaz', 'works with redefined apply'); inst = construct(function(){ this.x = 42; }, [], Array); assert.strictEqual(inst.x, 42, 'constructor with newTarget'); assert.ok(inst instanceof Array, 'prototype with newTarget'); assert.throws(function(){ construct(42, []); }, TypeError, 'throws on primitive'); f = function(){}; f.prototype = 42; assert.ok((function(){ try { return getPrototypeOf(construct(f, [])) === Object.prototype; } catch (e$) { e = e$; return false; } }())); assert.same(typeof (function(){ try { return construct(Date, []).getTime(); } catch (e$) {} }()), 'number', 'works with native constructors with 2 arguments'); assert.throws(function(){ construct(function(){}); }, 'throws when the second argument is not an object'); }); }).call(this); // Generated by LiveScript 1.4.0 (function(){ var module, test, defineProperty, getOwnPropertyDescriptor; module = QUnit.module, test = QUnit.test; module('ES6'); defineProperty = Object.defineProperty, getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor; test('Reflect.defineProperty', function(assert){ var defineProperty, create, O; defineProperty = Reflect.defineProperty; create = Reflect.create; assert.isFunction(defineProperty); assert.arity(defineProperty, 3); assert.name(defineProperty, 'defineProperty'); assert.looksNative(defineProperty); assert.nonEnumerable(Reflect, 'defineProperty'); O = {}; assert.strictEqual(defineProperty(O, 'foo', { value: 123 }), true); assert.strictEqual(O.foo, 123); if (DESCRIPTORS) { O = {}; defineProperty(O, 'foo', { value: 123, enumerable: true }); assert.deepEqual(getOwnPropertyDescriptor(O, 'foo'), { value: 123, enumerable: true, configurable: false, writable: false }); assert.strictEqual(defineProperty(O, 'foo', { value: 42 }), false); } assert.throws(function(){ defineProperty(42, 'foo', { value: 42 }); }, TypeError, 'throws on primitive'); assert.throws(function(){ defineProperty(42, 1, {}); }); assert.throws(function(){ defineProperty({}, create(null), {}); }); assert.throws(function(){ defineProperty({}, 1, 1); }); }); }).call(this); // Generated by LiveScript 1.4.0 (function(){ var module, test, defineProperty; module = QUnit.module, test = QUnit.test; module('ES6'); defineProperty = Object.defineProperty; test('Reflect.deleteProperty', function(assert){ var deleteProperty, O; deleteProperty = Reflect.deleteProperty; assert.isFunction(deleteProperty); assert.arity(deleteProperty, 2); assert.name(deleteProperty, 'deleteProperty'); assert.looksNative(deleteProperty); assert.nonEnumerable(Reflect, 'deleteProperty'); O = { bar: 456 }; assert.strictEqual(deleteProperty(O, 'bar'), true); assert.ok(!in$('bar', O)); if (DESCRIPTORS) { assert.strictEqual(deleteProperty(defineProperty({}, 'foo', { value: 42 }), 'foo'), false); } return assert.throws(function(){ return deleteProperty(42, 'foo'); }, TypeError, 'throws on primitive'); }); function in$(x, xs){ var i = -1, l = xs.length >>> 0; while (++i < l) if (x === xs[i]) return true; return false; } }).call(this); // Generated by LiveScript 1.4.0 (function(){ var module, test, defineProperty, from; module = QUnit.module, test = QUnit.test; module('ES6'); defineProperty = Object.defineProperty; from = Array.from; test('Reflect.enumerate', function(assert){ var enumerate, iterator, obj, i, ref$; enumerate = Reflect.enumerate; iterator = Symbol.iterator; assert.isFunction(enumerate); assert.arity(enumerate, 1); assert.name(enumerate, 'enumerate'); assert.looksNative(enumerate); assert.nonEnumerable(Reflect, 'enumerate'); obj = { foo: 1, bar: 2 }; i = enumerate(obj); assert.isIterable(i); assert.deepEqual(from(i), ['foo', 'bar'], 'bisic'); obj = { q: 1, w: 2, e: 3 }; i = enumerate(obj); delete obj.w; assert.deepEqual(from(i), ['q', 'e'], 'ignore holes'); obj = (ref$ = clone$({ q: 1, w: 2, e: 3 }), ref$.a = 4, ref$.s = 5, ref$.d = 6, ref$); assert.deepEqual(from(enumerate(obj)).sort(), ['a', 'd', 'e', 'q', 's', 'w'], 'works with prototype'); return assert.throws(function(){ return enumerate(42); }, TypeError, 'throws on primitive'); }); function clone$(it){ function fun(){} fun.prototype = it; return new fun; } }).call(this); // Generated by LiveScript 1.4.0 (function(){ var module, test; module = QUnit.module, test = QUnit.test; module('ES6'); test('Reflect.getOwnPropertyDescriptor', function(assert){ var getOwnPropertyDescriptor, obj, desc; getOwnPropertyDescriptor = Reflect.getOwnPropertyDescriptor; assert.isFunction(getOwnPropertyDescriptor); assert.arity(getOwnPropertyDescriptor, 2); assert.name(getOwnPropertyDescriptor, 'getOwnPropertyDescriptor'); assert.looksNative(getOwnPropertyDescriptor); assert.nonEnumerable(Reflect, 'getOwnPropertyDescriptor'); obj = { baz: 789 }; desc = getOwnPropertyDescriptor(obj, 'baz'); assert.strictEqual(desc.value, 789); return assert.throws(function(){ return getOwnPropertyDescriptor(42, 'constructor'); }, TypeError, 'throws on primitive'); }); }).call(this); // Generated by LiveScript 1.4.0 (function(){ var module, test; module = QUnit.module, test = QUnit.test; module('ES6'); test('Reflect.getPrototypeOf', function(assert){ var getPrototypeOf; getPrototypeOf = Reflect.getPrototypeOf; assert.isFunction(getPrototypeOf); assert.arity(getPrototypeOf, 1); assert.name(getPrototypeOf, 'getPrototypeOf'); assert.looksNative(getPrototypeOf); assert.nonEnumerable(Reflect, 'getPrototypeOf'); assert.strictEqual(getPrototypeOf([]), Array.prototype); return assert.throws(function(){ return getPrototypeOf(42); }, TypeError, 'throws on primitive'); }); }).call(this); // Generated by LiveScript 1.4.0 (function(){ var module, test, defineProperty, create; module = QUnit.module, test = QUnit.test; module('ES6'); defineProperty = Object.defineProperty, create = Object.create; test('Reflect.get', function(assert){ var get, target, receiver; get = Reflect.get; assert.isFunction(get); NATIVE && assert.arity(get, 2); assert.name(get, 'get'); assert.looksNative(get); assert.nonEnumerable(Reflect, 'get'); assert.strictEqual(get({ qux: 987 }, 'qux'), 987); if (DESCRIPTORS) { target = create(defineProperty({ z: 3 }, 'w', { get: function(){ return this; } }), { x: { value: 1 }, y: { get: function(){ return this; } } }); receiver = {}; assert.strictEqual(get(target, 'x', receiver), 1, 'get x'); assert.strictEqual(get(target, 'y', receiver), receiver, 'get y'); assert.strictEqual(get(target, 'z', receiver), 3, 'get z'); assert.strictEqual(get(target, 'w', receiver), receiver, 'get w'); assert.strictEqual(get(target, 'u', receiver), void 8, 'get u'); } return assert.throws(function(){ return get(42, 'constructor'); }, TypeError, 'throws on primitive'); }); }).call(this); // Generated by LiveScript 1.4.0 (function(){ var module, test; module = QUnit.module, test = QUnit.test; module('ES6'); test('Reflect.has', function(assert){ var has, O; has = Reflect.has; assert.isFunction(has); assert.arity(has, 2); assert.name(has, 'has'); assert.looksNative(has); assert.nonEnumerable(Reflect, 'has'); O = { qux: 987 }; assert.strictEqual(has(O, 'qux'), true); assert.strictEqual(has(O, 'qwe'), false); assert.strictEqual(has(O, 'toString'), true); return assert.throws(function(){ return has(42, 'constructor'); }, TypeError, 'throws on primitive'); }); }).call(this); // Generated by LiveScript 1.4.0 (function(){ var module, test, defineProperty, preventExtensions; module = QUnit.module, test = QUnit.test; module('ES6'); defineProperty = Object.defineProperty, preventExtensions = Object.preventExtensions; test('Reflect.isExtensible', function(assert){ var isExtensible; isExtensible = Reflect.isExtensible; assert.isFunction(isExtensible); assert.arity(isExtensible, 1); assert.name(isExtensible, 'isExtensible'); assert.looksNative(isExtensible); assert.nonEnumerable(Reflect, 'isExtensible'); assert.ok(isExtensible({})); if (DESCRIPTORS) { assert.ok(!isExtensible(preventExtensions({}))); } return assert.throws(function(){ return isExtensible(42); }, TypeError, 'throws on primitive'); }); }).call(this); // Generated by LiveScript 1.4.0 (function(){ var module, test, defineProperty; module = QUnit.module, test = QUnit.test; module('ES6'); defineProperty = Object.defineProperty; test('Reflect.ownKeys', function(assert){ var ownKeys, sym, O1, keys, O2; ownKeys = Reflect.ownKeys; sym = Symbol('c'); assert.isFunction(ownKeys); assert.arity(ownKeys, 1); assert.name(ownKeys, 'ownKeys'); assert.looksNative(ownKeys); assert.nonEnumerable(Reflect, 'ownKeys'); O1 = { a: 1 }; defineProperty(O1, 'b', { value: 2 }); O1[sym] = 3; keys = ownKeys(O1); assert.strictEqual(keys.length, 3, 'ownKeys return all own keys'); assert.ok(in$('a', keys), 'ownKeys return all own keys: simple'); assert.ok(in$('b', keys), 'ownKeys return all own keys: hidden'); assert.strictEqual(O1[keys[2]], 3, 'ownKeys return all own keys: symbol'); O2 = clone$(O1); keys = ownKeys(O2); assert.strictEqual(keys.length, 0, 'ownKeys return only own keys'); return assert.throws(function(){ return ownKeys(42); }, TypeError, 'throws on primitive'); }); function in$(x, xs){ var i = -1, l = xs.length >>> 0; while (++i < l) if (x === xs[i]) return true; return false; } function clone$(it){ function fun(){} fun.prototype = it; return new fun; } }).call(this); // Generated by LiveScript 1.4.0 (function(){ var module, test, defineProperty, isExtensible; module = QUnit.module, test = QUnit.test; module('ES6'); defineProperty = Object.defineProperty, isExtensible = Object.isExtensible; test('Reflect.preventExtensions', function(assert){ var preventExtensions, obj; preventExtensions = Reflect.preventExtensions; assert.isFunction(preventExtensions); assert.arity(preventExtensions, 1); assert.name(preventExtensions, 'preventExtensions'); assert.looksNative(preventExtensions); assert.nonEnumerable(Reflect, 'preventExtensions'); obj = {}; assert.ok(preventExtensions(obj), true); if (DESCRIPTORS) { assert.ok(!isExtensible(obj)); } return assert.throws(function(){ return preventExtensions(42); }, TypeError, 'throws on primitive'); }); }).call(this); // Generated by LiveScript 1.4.0 (function(){ var module, test; if (PROTO) { module = QUnit.module, test = QUnit.test; module('ES6'); test('Reflect.setPrototypeOf', function(assert){ var setPrototypeOf, obj, o; setPrototypeOf = Reflect.setPrototypeOf; assert.isFunction(setPrototypeOf); NATIVE && assert.arity(setPrototypeOf, 2); assert.name(setPrototypeOf, 'setPrototypeOf'); assert.looksNative(setPrototypeOf); assert.nonEnumerable(Reflect, 'setPrototypeOf'); obj = {}; assert.ok(setPrototypeOf(obj, Array.prototype), true); assert.ok(obj instanceof Array); assert.throws(function(){ return setPrototypeOf({}, 42); }, TypeError); assert.throws(function(){ return setPrototypeOf(42, {}); }, TypeError, 'throws on primitive'); return assert.ok(setPrototypeOf(o = {}, o) === false, 'false on recursive __proto__'); }); } }).call(this); // Generated by LiveScript 1.4.0 (function(){ var module, test, defineProperty, getOwnPropertyDescriptor, create; module = QUnit.module, test = QUnit.test; module('ES6'); defineProperty = Object.defineProperty, getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor, create = Object.create; test('Reflect.set', function(assert){ var set, obj, target, receiver, out; set = Reflect.set; assert.isFunction(set); NATIVE && assert.arity(set, 3); assert.name(set, 'set'); assert.looksNative(set); assert.nonEnumerable(Reflect, 'set'); obj = {}; assert.ok(set(obj, 'quux', 654), true); assert.strictEqual(obj.quux, 654); target = {}; receiver = {}; set(target, 'foo', 1, receiver); assert.strictEqual(target.foo, void 8, 'target.foo === undefined'); assert.strictEqual(receiver.foo, 1, 'receiver.foo === 1'); if (DESCRIPTORS) { defineProperty(receiver, 'bar', { value: 0, writable: true, enumerable: false, configurable: true }); set(target, 'bar', 1, receiver); assert.strictEqual(receiver.bar, 1, 'receiver.bar === 1'); assert.strictEqual(getOwnPropertyDescriptor(receiver, 'bar').enumerable, false, 'enumerability not overridden'); target = create(defineProperty({ z: 3 }, 'w', { set: function(){ out = this; } }), { x: { value: 1, writable: true, configurable: true }, y: { set: function(){ out = this; } }, c: { value: 1, writable: false, configurable: false } }); assert.strictEqual(set(target, 'x', 2, target), true, 'set x'); assert.strictEqual(target.x, 2, 'set x'); out = null; assert.strictEqual(set(target, 'y', 2, target), true, 'set y'); assert.strictEqual(out, target, 'set y'); assert.strictEqual(set(target, 'z', 4, target), true); assert.strictEqual(target.z, 4, 'set z'); out = null; assert.strictEqual(set(target, 'w', 1, target), true, 'set w'); assert.strictEqual(out, target, 'set w'); assert.strictEqual(set(target, 'u', 0, target), true, 'set u'); assert.strictEqual(target.u, 0, 'set u'); assert.strictEqual(set(target, 'c', 2, target), false, 'set c'); assert.strictEqual(target.c, 1, 'set c'); } return assert.throws(function(){ return set(42, 'q', 42); }, TypeError, 'throws on primitive'); }); }).call(this); // Generated by LiveScript 1.4.0 (function(){ var module, test, toString$ = {}.toString; module = QUnit.module, test = QUnit.test; module('ES6'); if (DESCRIPTORS) { test('RegExp constructor', function(assert){ var re, O, i$, len$, index, val, C; assert.isFunction(RegExp); assert.arity(RegExp, 2); assert.name(RegExp, 'RegExp'); assert.looksNative(RegExp); assert.strictEqual(toString$.call(RegExp()).slice(8, -1), 'RegExp'); assert.strictEqual(toString$.call(new RegExp()).slice(8, -1), 'RegExp'); re = /a/g; assert.notStrictEqual(re, new RegExp(re), 'new RegExp(re) isnt re'); assert.strictEqual(re, RegExp(re), 'RegExp(re) is re'); re[typeof Symbol != 'undefined' && Symbol !== null ? Symbol.match : void 8] = false; assert.notStrictEqual(re, RegExp(re), 'RegExp(re) isnt re, changed Symbol.match'); O = {}; assert.notStrictEqual(O, RegExp(O), 'RegExp(O) isnt O'); O[typeof Symbol != 'undefined' && Symbol !== null ? Symbol.match : void 8] = true; O.constructor = RegExp; assert.strictEqual(O, RegExp(O), 'RegExp(O) is O, changed Symbol.match'); assert.strictEqual(String(re), '/a/g', 'b is /a/g'); assert.strictEqual(String(new RegExp(/a/g, 'mi')), '/a/im', 'Allows a regex with flags'); assert.ok(new RegExp(/a/g, 'im') instanceof RegExp, 'Works with instanceof'); assert.strictEqual(new RegExp(/a/g, 'im').constructor, RegExp, 'Has the right constructor'); /(b)(c)(d)(e)(f)(g)(h)(i)(j)(k)(l)(m)(n)(o)(p)/.exec('abcdefghijklmnopq'); for (i$ = 0, len$ = 'bcdefghij'.length; i$ < len$; ++i$) { index = i$; val = 'bcdefghij'[i$]; assert.strictEqual(RegExp["$" + (index + 1)], val, "Updates RegExp globals $" + (index + 1)); } if (nativeSubclass) { C = nativeSubclass(RegExp); assert.ok(new C instanceof C, 'correct subclassing with native classes #1'); assert.ok(new C instanceof RegExp, 'correct subclassing with native classes #2'); assert.ok(new C('^abc$').test('abc'), 'correct subclassing with native classes #3'); } }); } }).call(this); // Generated by LiveScript 1.4.0 (function(){ var module, test; module = QUnit.module, test = QUnit.test; module('ES6'); if (DESCRIPTORS) { test('RegExp#flags', function(assert){ assert.nonEnumerable(RegExp.prototype, 'flags'); assert.strictEqual(/./g.flags, 'g', '/./g.flags is "g"'); assert.strictEqual(/./.flags, '', '/./.flags is ""'); assert.strictEqual(RegExp('.', 'gim').flags, 'gim', 'RegExp(".", "gim").flags is "gim"'); assert.strictEqual(RegExp('.').flags, '', 'RegExp(".").flags is ""'); assert.strictEqual(/./gim.flags, 'gim', '/./gim.flags is "gim"'); assert.strictEqual(/./gmi.flags, 'gim', '/./gmi.flags is "gim"'); assert.strictEqual(/./mig.flags, 'gim', '/./mig.flags is "gim"'); return assert.strictEqual(/./mgi.flags, 'gim', '/./mgi.flags is "gim"'); }); } }).call(this); // Generated by LiveScript 1.4.0 (function(){ var module, test; module = QUnit.module, test = QUnit.test; module('ES6'); test('String#match regression', function(assert){ var instance, matched, expected, obj, str, x, e, reg, string, matches, i$, len$, i, re, num; assert.isFunction(''.match); assert.arity(''.match, 1); assert.name(''.match, 'match'); assert.looksNative(''.match); assert.nonEnumerable(String.prototype, 'match'); instance = Object(true); instance.match = String.prototype.match; assert.strictEqual(instance.match(true)[0], 'true', 'S15.5.4.10_A1_T1'); instance = Object(false); instance.match = String.prototype.match; assert.strictEqual(instance.match(function(){ return false; }())[0], 'false', 'S15.5.4.10_A1_T2'); matched = ''.match(); expected = RegExp().exec(''); assert.strictEqual(matched.length, expected.length, 'S15.5.4.10_A1_T4 #1'); assert.strictEqual(matched.index, expected.index, 'S15.5.4.10_A1_T4 #2'); assert.strictEqual(matched.input, expected.input, 'S15.5.4.10_A1_T4 #3'); assert.strictEqual('gnulluna'.match(null)[0], 'null', 'S15.5.4.10_A1_T5'); matched = Object('undefined').match(x); expected = RegExp(x).exec('undefined'); assert.strictEqual(matched.length, expected.length, 'S15.5.4.10_A1_T6 #1'); assert.strictEqual(matched.index, expected.index, 'S15.5.4.10_A1_T6 #2'); assert.strictEqual(matched.input, expected.input, 'S15.5.4.10_A1_T6 #3'); matched = String('undefined').match(undefined); expected = RegExp(undefined).exec('undefined'); assert.strictEqual(matched.length, expected.length, 'S15.5.4.10_A1_T7 #1'); assert.strictEqual(matched.index, expected.index, 'S15.5.4.10_A1_T7 #2'); assert.strictEqual(matched.input, expected.input, 'S15.5.4.10_A1_T7 #3'); obj = { toString: function(){} }; matched = String(obj).match(void 8); expected = RegExp(void 8).exec('undefined'); assert.strictEqual(matched.length, expected.length, 'S15.5.4.10_A1_T8 #1'); assert.strictEqual(matched.index, expected.index, 'S15.5.4.10_A1_T8 #2'); assert.strictEqual(matched.input, expected.input, 'S15.5.4.10_A1_T8 #3'); obj = { toString: function(){ return '\u0041B'; } }; str = 'ABB\u0041BABAB'; assert.strictEqual(str.match(obj)[0], 'AB', 'S15.5.4.10_A1_T10'); obj = { toString: function(){ throw 'intostr'; } }; str = 'ABB\u0041BABAB'; try { x = str.match(obj); assert.ok(false, 'S15.5.4.10_A1_T11 #1 lead to throwing exception'); } catch (e$) { e = e$; assert.strictEqual(e, 'intostr', 'S15.5.4.10_A1_T11 #1.1: Exception === "intostr". Actual: ' + e); } obj = { toString: function(){ return {}; }, valueOf: function(){ throw 'intostr'; } }; str = 'ABB\u0041BABAB'; try { x = str.match(obj); assert.ok(false, 'S15.5.4.10_A1_T12 #1 lead to throwing exception'); } catch (e$) { e = e$; assert.strictEqual(e, 'intostr', 'S15.5.4.10_A1_T12 #1.1: Exception === "intostr". Actual: ' + e); } obj = { toString: function(){ return {}; }, valueOf: function(){ return 1; } }; assert.strictEqual('ABB\u0041B\u0031ABAB\u0031BBAA'.match(obj)[0], '1', 'S15.5.4.10_A1_T13 #1'); assert.strictEqual('ABB\u0041B\u0031ABAB\u0031BBAA'.match(obj).length, 1, 'S15.5.4.10_A1_T13 #2'); reg = RegExp('77'); assert.strictEqual('ABB\u0041BABAB\u0037\u0037BBAA'.match(reg)[0], '77', 'S15.5.4.10_A1_T14'); string = '1234567890'; assert.strictEqual(string.match(3)[0], '3', 'S15.5.4.10_A2_T1 #1'); assert.strictEqual(string.match(3).length, 1, 'S15.5.4.10_A2_T1 #2'); assert.strictEqual(string.match(3).index, 2, 'S15.5.4.10_A2_T1 #3'); assert.strictEqual(string.match(3).input, string, 'S15.5.4.10_A2_T1 #4'); matches = ['34', '34', '34']; string = '343443444'; assert.strictEqual(string.match(/34/g).length, 3, 'S15.5.4.10_A2_T2 #1'); for (i$ = 0, len$ = matches.length; i$ < len$; ++i$) { i = matches[i$]; assert.strictEqual(string.match(/34/g)[i], matches[i], "S15.5.4.10_A2_T2 #2"); } matches = ['1', '2', '3', '4', '5', '6', '7', '8', '9', '0']; string = '123456abcde7890'; assert.strictEqual(string.match(/\d{1}/g).length, 10, 'S15.5.4.10_A2_T3 #1'); for (i$ = 0, len$ = matches.length; i$ < len$; ++i$) { i = matches[i$]; assert.strictEqual(string.match(/\d{1}/g)[i], matches[i], "S15.5.4.10_A2_T3 #2"); } matches = ['12', '34', '56', '78', '90']; string = '123456abcde7890'; assert.strictEqual(string.match(/\d{2}/g).length, 5, 'S15.5.4.10_A2_T4 #1'); for (i$ = 0, len$ = matches.length; i$ < len$; ++i$) { i = matches[i$]; assert.strictEqual(string.match(/\d{2}/g)[i], matches[i], "S15.5.4.10_A2_T4 #2"); } matches = ['ab', 'cd']; string = '123456abcde7890'; assert.strictEqual(string.match(/\D{2}/g).length, 2, 'S15.5.4.10_A2_T5 #1'); for (i$ = 0, len$ = matches.length; i$ < len$; ++i$) { i = matches[i$]; assert.strictEqual(string.match(/\D{2}/g)[i], matches[i], "S15.5.4.10_A2_T5 #2"); } string = "Boston, Mass. 02134"; assert.strictEqual(string.match(/([\d]{5})([-\ ]?[\d]{4})?$/)[0], '02134', 'S15.5.4.10_A2_T6 #1'); assert.strictEqual(string.match(/([\d]{5})([-\ ]?[\d]{4})?$/)[1], '02134', 'S15.5.4.10_A2_T6 #2'); NATIVE && assert.strictEqual(string.match(/([\d]{5})([-\ ]?[\d]{4})?$/)[2], void 8, 'S15.5.4.10_A2_T6 #3'); assert.strictEqual(string.match(/([\d]{5})([-\ ]?[\d]{4})?$/).length, 3, 'S15.5.4.10_A2_T6 #4'); assert.strictEqual(string.match(/([\d]{5})([-\ ]?[\d]{4})?$/).index, 14, 'S15.5.4.10_A2_T6 #5'); assert.strictEqual(string.match(/([\d]{5})([-\ ]?[\d]{4})?$/).input, string, 'S15.5.4.10_A2_T6 #6'); string = "Boston, Mass. 02134"; assert.strictEqual(string.match(/([\d]{5})([-\ ]?[\d]{4})?$/g).length, 1, 'S15.5.4.10_A2_T7 #1'); assert.strictEqual(string.match(/([\d]{5})([-\ ]?[\d]{4})?$/g)[0], '02134', 'S15.5.4.10_A2_T7 #2'); matches = ['02134', '02134', 'undefined']; string = "Boston, MA 02134"; re = /([\d]{5})([-\ ]?[\d]{4})?$/; re.lastIndex = 0; assert.strictEqual(string.match(re).length, 3, 'S15.5.4.10_A2_T8 #1'); assert.strictEqual(string.match(re).index, string.lastIndexOf('0'), 'S15.5.4.10_A2_T8 #2'); for (i$ = 0, len$ = matches.length; i$ < len$; ++i$) { i = matches[i$]; assert.strictEqual(string.match(re)[i], matches[i], "S15.5.4.10_A2_T8 #3"); } string = "Boston, MA 02134"; matches = ['02134', '02134', void 8]; re = /([\d]{5})([-\ ]?[\d]{4})?$/; re.lastIndex = string.length; assert.strictEqual(string.match(re).length, 3, 'S15.5.4.10_A2_T9 #1'); assert.strictEqual(string.match(re).index, string.lastIndexOf('0'), 'S15.5.4.10_A2_T9 #2'); for (i$ = 0, len$ = matches.length; i$ < len$; ++i$) { i = matches[i$]; assert.strictEqual(string.match(re)[i], matches[i], "S15.5.4.10_A2_T9 #3"); } string = "Boston, MA 02134"; matches = ['02134', '02134', void 8]; re = /([\d]{5})([-\ ]?[\d]{4})?$/; re.lastIndex = string.lastIndexOf('0'); assert.strictEqual(string.match(re).length, 3, 'S15.5.4.10_A2_T10 #1'); assert.strictEqual(string.match(re).index, string.lastIndexOf('0'), 'S15.5.4.10_A2_T10 #2'); for (i$ = 0, len$ = matches.length; i$ < len$; ++i$) { i = matches[i$]; assert.strictEqual(string.match(re)[i], matches[i], "S15.5.4.10_A2_T10 #3"); } string = "Boston, MA 02134"; matches = ['02134', '02134', void 8]; re = /([\d]{5})([-\ ]?[\d]{4})?$/; re.lastIndex = string.lastIndexOf('0') + 1; assert.strictEqual(string.match(re).length, 3, 'S15.5.4.10_A2_T11 #1'); assert.strictEqual(string.match(re).index, string.lastIndexOf('0'), 'S15.5.4.10_A2_T11 #2'); for (i$ = 0, len$ = matches.length; i$ < len$; ++i$) { i = matches[i$]; assert.strictEqual(string.match(re)[i], matches[i], "S15.5.4.10_A2_T11 #3"); } string = "Boston, MA 02134"; re = /([\d]{5})([-\ ]?[\d]{4})?$/g; assert.strictEqual(string.match(re).length, 1, 'S15.5.4.10_A2_T12 #1'); assert.strictEqual(string.match(re)[0], '02134', 'S15.5.4.10_A2_T12 #2'); re = /([\d]{5})([-\ ]?[\d]{4})?$/g; re.lastIndex = 0; string = "Boston, MA 02134"; assert.strictEqual(string.match(re).length, 1, 'S15.5.4.10_A2_T13 #1'); assert.strictEqual(string.match(re)[0], '02134', 'S15.5.4.10_A2_T13 #2'); string = "Boston, MA 02134"; re = /([\d]{5})([-\ ]?[\d]{4})?$/g; re.lastIndex = string.length; assert.strictEqual(string.match(re).length, 1, 'S15.5.4.10_A2_T14 #1'); assert.strictEqual(string.match(re)[0], '02134', 'S15.5.4.10_A2_T14 #2'); string = "Boston, MA 02134"; re = /([\d]{5})([-\ ]?[\d]{4})?$/g; re.lastIndex = string.lastIndexOf('0'); assert.strictEqual(string.match(re).length, 1, 'S15.5.4.10_A2_T15 #1'); assert.strictEqual(string.match(re)[0], '02134', 'S15.5.4.10_A2_T15 #2'); string = "Boston, MA 02134"; re = /([\d]{5})([-\ ]?[\d]{4})?$/g; re.lastIndex = string.lastIndexOf('0') + 1; assert.strictEqual(string.match(re).length, 1, 'S15.5.4.10_A2_T16 #1'); assert.strictEqual(string.match(re)[0], '02134', 'S15.5.4.10_A2_T16 #2'); re = /0./; num = 10203040506070809000; assert.strictEqual(''.match.call(num, re)[0], '02', 'S15.5.4.10_A2_T17 #1'); assert.strictEqual(''.match.call(num, re).length, 1, 'S15.5.4.10_A2_T17 #2'); assert.strictEqual(''.match.call(num, re).index, 1, 'S15.5.4.10_A2_T17 #3'); assert.strictEqual(''.match.call(num, re).input, String(num), 'S15.5.4.10_A2_T17 #4'); re = /0./; re.lastIndex = 0; num = 10203040506070809000; assert.strictEqual(''.match.call(num, re)[0], '02', 'S15.5.4.10_A2_T18 #1'); assert.strictEqual(''.match.call(num, re).length, 1, 'S15.5.4.10_A2_T18 #2'); assert.strictEqual(''.match.call(num, re).index, 1, 'S15.5.4.10_A2_T18 #3'); return assert.strictEqual(''.match.call(num, re).input, String(num), 'S15.5.4.10_A2_T18 #4'); }); test('RegExp#@@match', function(assert){ var string, matches, i$, len$, i, results$ = []; assert.isFunction(/./[typeof Symbol != 'undefined' && Symbol !== null ? Symbol.match : void 8]); assert.arity(/./[typeof Symbol != 'undefined' && Symbol !== null ? Symbol.match : void 8], 1); string = "Boston, MA 02134"; matches = ['02134', '02134', void 8]; assert.strictEqual(/([\d]{5})([-\ ]?[\d]{4})?$/[typeof Symbol != 'undefined' && Symbol !== null ? Symbol.match : void 8](string).length, 3); assert.strictEqual(/([\d]{5})([-\ ]?[\d]{4})?$/[typeof Symbol != 'undefined' && Symbol !== null ? Symbol.match : void 8](string).index, string.lastIndexOf('0')); for (i$ = 0, len$ = matches.length; i$ < len$; ++i$) { i = matches[i$]; results$.push(assert.strictEqual(/([\d]{5})([-\ ]?[\d]{4})?$/[typeof Symbol != 'undefined' && Symbol !== null ? Symbol.match : void 8](string)[i], matches[i])); } return results$; }); test('@@match logic', function(assert){ 'use strict'; var str, num, O, ref$, re; str = STRICT ? 'qwe' : Object('qwe'); num = STRICT ? 123 : Object(123); O = (ref$ = {}, ref$[typeof Symbol != 'undefined' && Symbol !== null ? Symbol.match : void 8] = function(it){ return { value: it }; }, ref$); assert.strictEqual(str.match(O).value, str); assert.strictEqual(''.match.call(num, O).value, num); re = /./; re[typeof Symbol != 'undefined' && Symbol !== null ? Symbol.match : void 8] = function(it){ return { value: it }; }; assert.strictEqual(str.match(re).value, str); return assert.strictEqual(''.match.call(num, re).value, num); }); }).call(this); // Generated by LiveScript 1.4.0 (function(){ var module, test; module = QUnit.module, test = QUnit.test; module('ES6'); test('String#replace regression', function(assert){ var instance, e; assert.isFunction(''.replace); assert.arity(''.replace, 2); assert.name(''.replace, 'replace'); assert.looksNative(''.replace); assert.nonEnumerable(String.prototype, 'replace'); instance = Object(true); instance.replace = String.prototype.replace; assert.strictEqual(instance.replace(true, 1), '1', 'S15.5.4.11_A1_T1'); instance = Object(false); instance.replace = String.prototype.replace; assert.strictEqual(instance.replace(false, void 8), 'undefined', 'S15.5.4.11_A1_T2'); assert.strictEqual('gnulluna'.replace(null, function(a1, a2, a3){ return a2 + ''; }), 'g1una', 'S15.5.4.11_A1_T4'); assert.strictEqual('gnulluna'.replace(null, function(){}), 'gundefineduna', 'S15.5.4.11_A1_T5'); assert.strictEqual(Object('undefined').replace(void 8, function(){ return arguments[1] + 42; }), '42', 'S15.5.4.11_A1_T6'); assert.strictEqual('undefined'.replace('e', void 8), 'undundefinedfined', 'S15.5.4.11_A1_T7'); assert.strictEqual(String({ toString: function(){} }).replace(/e/g, void 8), 'undundefinedfinundefinedd', 'S15.5.4.11_A1_T8'); assert.strictEqual(new String({ valueOf: function(){}, toString: void 8 }).replace(function(){}(), function(a1, a2, a3){ return a1 + a2 + a3; }), 'undefined0undefined', 'S15.5.4.11_A1_T9'); assert.strictEqual('ABB\u0041BABAB'.replace({ toString: function(){ return '\u0041B'; } }, function(){}), 'undefinedBABABAB', 'S15.5.4.11_A1_T10'); if (NATIVE) { try { 'ABB\u0041BABAB'.replace({ toString: function(){ throw 'insearchValue'; } }, { toString: function(){ throw 'inreplaceValue'; } }); assert.ok(false, 'S15.5.4.11_A1_T11 #1 lead to throwing exception'); } catch (e$) { e = e$; assert.strictEqual(e, 'insearchValue', 'S15.5.4.11_A1_T11 #2'); } try { Object('ABB\u0041BABAB').replace({ toString: function(){ return {}; }, valueOf: function(){ throw 'insearchValue'; } }, { toString: function(){ throw 'inreplaceValue'; } }); assert.ok(false, 'S15.5.4.11_A1_T12 #1 lead to throwing exception'); } catch (e$) { e = e$; assert.strictEqual(e, 'insearchValue', 'S15.5.4.11_A1_T12 #2'); } } try { 'ABB\u0041BABAB\u0031BBAA'.replace({ toString: function(){ return {}; }, valueOf: function(){ throw 'insearchValue'; } }, { toString: function(){ return 1; } }); assert.ok(false, 'S15.5.4.11_A1_T13 #1 lead to throwing exception'); } catch (e$) { e = e$; assert.strictEqual(e, 'insearchValue', 'S15.5.4.11_A1_T13 #2'); } assert.strictEqual('ABB\u0041BABAB\u0037\u0037BBAA'.replace(new RegExp('77'), 1), 'ABBABABAB\u0031BBAA', 'S15.5.4.11_A1_T14'); instance = Object(1100.00777001); instance.replace = String.prototype.replace; try { instance.replace({ toString: function(){ return /77/; } }, 1); assert.ok(false, 'S15.5.4.11_A1_T15 #1 lead to throwing exception'); } catch (e$) { e = e$; assert.ok(e instanceof TypeError, 'S15.5.4.11_A1_T15 #2'); } instance = Object(1100.00777001); instance.replace = String.prototype.replace; try { instance.replace(/77/, { toString: function(){ return function(a1, a2, a3){ return a2 + 'z'; }; } }); assert.ok(false, 'S15.5.4.11_A1_T16 #1 lead to throwing exception'); } catch (e$) { e = e$; assert.ok(e instanceof TypeError, 'S15.5.4.11_A1_T16 #2'); } assert.strictEqual('asdf'.replace(RegExp('', 'g'), '1'), '1a1s1d1f1', 'S15.5.4.11_A1_T17'); assert.strictEqual('She sells seashells by the seashore.'.replace(/sh/g, 'sch'), 'She sells seaschells by the seaschore.', 'S15.5.4.11_A2_T1'); assert.strictEqual('She sells seashells by the seashore.'.replace(/sh/g, '$$sch'), 'She sells sea$schells by the sea$schore.', 'S15.5.4.11_A2_T2'); assert.strictEqual('She sells seashells by the seashore.'.replace(/sh/g, '$&sch'), 'She sells seashschells by the seashschore.', 'S15.5.4.11_A2_T3'); assert.strictEqual('She sells seashells by the seashore.'.replace(/sh/g, '$`sch'), 'She sells seaShe sells seaschells by the seaShe sells seashells by the seaschore.', 'S15.5.4.11_A2_T4'); assert.strictEqual('She sells seashells by the seashore.'.replace(/sh/g, "$'sch"), 'She sells seaells by the seashore.schells by the seaore.schore.', 'S15.5.4.11_A2_T5'); assert.strictEqual('She sells seashells by the seashore.'.replace(/sh/, 'sch'), 'She sells seaschells by the seashore.', 'S15.5.4.11_A2_T6'); assert.strictEqual('She sells seashells by the seashore.'.replace(/sh/, '$$sch'), 'She sells sea$schells by the seashore.', 'S15.5.4.11_A2_T7'); assert.strictEqual('She sells seashells by the seashore.'.replace(/sh/, '$&sch'), 'She sells seashschells by the seashore.', 'S15.5.4.11_A2_T8'); assert.strictEqual('She sells seashells by the seashore.'.replace(/sh/, '$`sch'), 'She sells seaShe sells seaschells by the seashore.', 'S15.5.4.11_A2_T9'); assert.strictEqual('She sells seashells by the seashore.'.replace(/sh/, "$'sch"), 'She sells seaells by the seashore.schells by the seashore.', 'S15.5.4.11_A2_T10'); assert.strictEqual('uid=31'.replace(/(uid=)(\d+)/, '$1115'), 'uid=115', 'S15.5.4.11_A3_T1'); assert.strictEqual('uid=31'.replace(/(uid=)(\d+)/, '$11A15'), 'uid=1A15', 'S15.5.4.11_A3_T3'); assert.strictEqual('abc12 def34'.replace(/([a-z]+)([0-9]+)/, function(){ return arguments[2] + arguments[1]; }), '12abc def34', 'S15.5.4.11_A4_T1'); return assert.strictEqual('aaaaaaaaaa,aaaaaaaaaaaaaaa'.replace(/^(a+)\1*,\1+$/, '$1'), 'aaaaa', 'S15.5.4.11_A5_T1'); }); test('RegExp#@@replace', function(assert){ assert.isFunction(/./[typeof Symbol != 'undefined' && Symbol !== null ? Symbol.replace : void 8]); assert.arity(/./[typeof Symbol != 'undefined' && Symbol !== null ? Symbol.replace : void 8], 2); return assert.strictEqual(/([a-z]+)([0-9]+)/[typeof Symbol != 'undefined' && Symbol !== null ? Symbol.replace : void 8]('abc12 def34', function(){ return arguments[2] + arguments[1]; }), '12abc def34'); }); test('@@replace logic', function(assert){ 'use strict'; var str, num, O, ref$, re; str = STRICT ? 'qwe' : Object('qwe'); num = STRICT ? 123 : Object(123); O = (ref$ = {}, ref$[typeof Symbol != 'undefined' && Symbol !== null ? Symbol.replace : void 8] = function(a, b){ return { a: a, b: b }; }, ref$); assert.strictEqual(str.replace(O, 42).a, str); assert.strictEqual(str.replace(O, 42).b, 42); assert.strictEqual(''.replace.call(num, O, 42).a, num); assert.strictEqual(''.replace.call(num, O, 42).b, 42); re = /./; re[typeof Symbol != 'undefined' && Symbol !== null ? Symbol.replace : void 8] = function(a, b){ return { a: a, b: b }; }; assert.strictEqual(str.replace(re, 42).a, str); assert.strictEqual(str.replace(re, 42).b, 42); assert.strictEqual(''.replace.call(num, re, 42).a, num); return assert.strictEqual(''.replace.call(num, re, 42).b, 42); }); }).call(this); // Generated by LiveScript 1.4.0 (function(){ var module, test; module = QUnit.module, test = QUnit.test; module('ES6'); test('String#search regression', function(assert){ var instance, e, aString; assert.isFunction(''.search); assert.arity(''.search, 1); assert.name(''.search, 'search'); assert.looksNative(''.search); assert.nonEnumerable(String.prototype, 'search'); instance = Object(true); instance.search = String.prototype.search; assert.strictEqual(instance.search(true), 0, 'S15.5.4.12_A1_T1'); instance = Object(false); instance.search = String.prototype.search; assert.strictEqual(instance.search(false), 0, 'S15.5.4.12_A1_T2'); assert.strictEqual(''.search(), 0, 'S15.5.4.12_A1_T4 #1'); assert.strictEqual('--undefined--'.search(), 0, 'S15.5.4.12_A1_T4 #2'); assert.strictEqual('gnulluna'.search(null), 1, 'S15.5.4.12_A1_T5'); assert.strictEqual(Object('undefined').search(void 8), 0, 'S15.5.4.12_A1_T6'); assert.strictEqual('undefined'.search(void 8), 0, 'S15.5.4.12_A1_T7'); assert.strictEqual(String({ toString: function(){} }).search(void 8), 0, 'S15.5.4.12_A1_T8'); assert.strictEqual('ssABB\u0041BABAB'.search({ toString: function(){ return '\u0041B'; } }), 2, 'S15.5.4.12_A1_T10'); try { 'ABB\u0041BABAB'.search({ toString: function(){ throw 'intostr'; } }); assert.ok(false, 'S15.5.4.12_A1_T11 #1 lead to throwing exception'); } catch (e$) { e = e$; assert.strictEqual(e, 'intostr', 'S15.5.4.12_A1_T11 #2'); } try { Object('ABB\u0041BABAB').search({ toString: function(){ return {}; }, valueOf: function(){ throw 'intostr'; } }); assert.ok(false, 'S15.5.4.12_A1_T12 #1 lead to throwing exception'); } catch (e$) { e = e$; assert.strictEqual(e, 'intostr', 'S15.5.4.12_A1_T12 #2'); } assert.strictEqual('ABB\u0041B\u0031ABAB\u0031BBAA'.search({ toString: function(){ return {}; }, valueOf: function(){ return 1; } }), 5, 'S15.5.4.12_A1_T13'); assert.strictEqual('ABB\u0041BABAB\u0037\u0037BBAA'.search(RegExp('77')), 9, 'S15.5.4.12_A1_T14'); assert.strictEqual(Object('test string').search('string'), 5, 'S15.5.4.12_A2_T1'); assert.strictEqual(Object('test string').search('String'), -1, 'S15.5.4.12_A2_T2'); assert.strictEqual(Object('test string').search(/String/i), 5, 'S15.5.4.12_A2_T3'); assert.strictEqual(Object('test string').search(/Four/), -1, 'S15.5.4.12_A2_T4'); assert.strictEqual(Object('one two three four five').search(/four/), 14, 'S15.5.4.12_A2_T5'); assert.strictEqual(Object('test string').search('notexist'), -1, 'S15.5.4.12_A2_T6'); assert.strictEqual(Object('test string probe').search('string pro'), 5, 'S15.5.4.12_A2_T7'); aString = Object('power of the power of the power of the power of the power of the power of the great sword'); assert.strictEqual(aString.search(/the/), aString.search(/the/g), 'S15.5.4.12_A3_T1'); aString = Object('power \u006F\u0066 the power of the power \u006F\u0066 the power of the power \u006F\u0066 the power of the great sword'); return assert.strictEqual(aString.search(/of/), aString.search(/of/g), 'S15.5.4.12_A3_T2'); }); test('RegExp#@@search', function(assert){ assert.isFunction(/./[typeof Symbol != 'undefined' && Symbol !== null ? Symbol.search : void 8]); assert.arity(/./[typeof Symbol != 'undefined' && Symbol !== null ? Symbol.search : void 8], 1); assert.strictEqual(/four/[typeof Symbol != 'undefined' && Symbol !== null ? Symbol.search : void 8]('one two three four five'), 14); return assert.strictEqual(/Four/[typeof Symbol != 'undefined' && Symbol !== null ? Symbol.search : void 8]('one two three four five'), -1); }); test('@@search logic', function(assert){ 'use strict'; var str, num, O, ref$, re; str = STRICT ? 'qwe' : Object('qwe'); num = STRICT ? 123 : Object(123); O = (ref$ = {}, ref$[typeof Symbol != 'undefined' && Symbol !== null ? Symbol.search : void 8] = function(it){ return { value: it }; }, ref$); assert.strictEqual(str.search(O).value, str); assert.strictEqual(''.search.call(num, O).value, num); re = /./; re[typeof Symbol != 'undefined' && Symbol !== null ? Symbol.search : void 8] = function(it){ return { value: it }; }; assert.strictEqual(str.search(re).value, str); return assert.strictEqual(''.search.call(num, re).value, num); }); }).call(this); // Generated by LiveScript 1.4.0 (function(){ var module, test; module = QUnit.module, test = QUnit.test; module('ES6'); test('String#split regression', function(assert){ var instance, split, e, F, string, i$, to$, i, expected, results$ = []; assert.isFunction(''.split); assert.arity(''.split, 2); assert.name(''.split, 'split'); assert.looksNative(''.split); assert.nonEnumerable(String.prototype, 'split'); assert.arrayEqual('ab'.split(), ['ab'], 'If "separator" is undefined must return Array with one String - "this" string'); assert.arrayEqual('ab'.split(void 8), ['ab'], 'If "separator" is undefined must return Array with one String - "this" string'); assert.arrayEqual('ab'.split(void 8, 0), [], 'If "separator" is undefined and "limit" set to 0 must return Array[]'); assert.arrayEqual(''.split(), [''], "''.split() results in ['']"); assert.arrayEqual(''.split(/./), [''], "''.split(/./) results in ['']"); assert.arrayEqual(''.split(/.?/), [], "''.split(/.?/) results in []"); assert.arrayEqual(''.split(/.??/), [], "''.split(/.??/) results in []"); assert.arrayEqual('ab'.split(/a*/), ['', 'b'], "'ab'.split(/a*/) results in ['', 'b']"); assert.arrayEqual('ab'.split(/a*?/), ['a', 'b'], "'ab'.split(/a*?/) results in ['a', 'b']"); assert.arrayEqual('ab'.split(/(?:ab)/), ['', ''], "'ab'.split(/(?:ab)/) results in ['', '']"); assert.arrayEqual('ab'.split(/(?:ab)*/), ['', ''], "'ab'.split(/(?:ab)*/) results in ['', '']"); assert.arrayEqual('ab'.split(/(?:ab)*?/), ['a', 'b'], "'ab'.split(/(?:ab)*?/) results in ['a', 'b']"); assert.arrayEqual('test'.split(''), ['t', 'e', 's', 't'], "'test'.split('') results in ['t', 'e', 's', 't']"); assert.arrayEqual('test'.split(), ['test'], "'test'.split() results in ['test']"); assert.arrayEqual('111'.split(1), ['', '', '', ''], "'111'.split(1) results in ['', '', '', '']"); assert.arrayEqual('test'.split(/(?:)/, 2), ['t', 'e'], "'test'.split(/(?:)/, 2) results in ['t', 'e']"); assert.arrayEqual('test'.split(/(?:)/, -1), ['t', 'e', 's', 't'], "'test'.split(/(?:)/, -1) results in ['t', 'e', 's', 't']"); assert.arrayEqual('test'.split(/(?:)/, void 8), ['t', 'e', 's', 't'], "'test'.split(/(?:)/, undefined) results in ['t', 'e', 's', 't']"); assert.arrayEqual('test'.split(/(?:)/, null), [], "'test'.split(/(?:)/, null) results in []"); assert.arrayEqual('test'.split(/(?:)/, NaN), [], "'test'.split(/(?:)/, NaN) results in []"); assert.arrayEqual('test'.split(/(?:)/, true), ['t'], "'test'.split(/(?:)/, true) results in ['t']"); assert.arrayEqual('test'.split(/(?:)/, '2'), ['t', 'e'], "'test'.split(/(?:)/, '2') results in ['t', 'e']"); assert.arrayEqual('test'.split(/(?:)/, 'two'), [], "'test'.split(/(?:)/, 'two') results in []"); assert.arrayEqual('a'.split(/-/), ['a'], "'a'.split(/-/) results in ['a']"); assert.arrayEqual('a'.split(/-?/), ['a'], "'a'.split(/-?/) results in ['a']"); assert.arrayEqual('a'.split(/-??/), ['a'], "'a'.split(/-??/) results in ['a']"); assert.arrayEqual('a'.split(/a/), ['', ''], "'a'.split(/a/) results in ['', '']"); assert.arrayEqual('a'.split(/a?/), ['', ''], "'a'.split(/a?/) results in ['', '']"); assert.arrayEqual('a'.split(/a??/), ['a'], "'a'.split(/a??/) results in ['a']"); assert.arrayEqual('ab'.split(/-/), ['ab'], "'ab'.split(/-/) results in ['ab']"); assert.arrayEqual('ab'.split(/-?/), ['a', 'b'], "'ab'.split(/-?/) results in ['a', 'b']"); assert.arrayEqual('ab'.split(/-??/), ['a', 'b'], "'ab'.split(/-??/) results in ['a', 'b']"); assert.arrayEqual('a-b'.split(/-/), ['a', 'b'], "'a-b'.split(/-/) results in ['a', 'b']"); assert.arrayEqual('a-b'.split(/-?/), ['a', 'b'], "'a-b'.split(/-?/) results in ['a', 'b']"); assert.arrayEqual('a-b'.split(/-??/), ['a', '-', 'b'], "'a-b'.split(/-??/) results in ['a', '-', 'b']"); assert.arrayEqual('a--b'.split(/-/), ['a', '', 'b'], "'a--b'.split(/-/) results in ['a', '', 'b']"); assert.arrayEqual('a--b'.split(/-?/), ['a', '', 'b'], "'a--b'.split(/-?/) results in ['a', '', 'b']"); assert.arrayEqual('a--b'.split(/-??/), ['a', '-', '-', 'b'], "'a--b'.split(/-??/) results in ['a', '-', '-', 'b']"); assert.arrayEqual(''.split(/()()/), [], "''.split(/()()/) results in []"); assert.arrayEqual('.'.split(/()()/), ['.'], "'.'.split(/()()/) results in ['.']"); assert.arrayEqual('.'.split(/(.?)(.?)/), ['', '.', '', ''], "'.'.split(/(.?)(.?)/) results in ['', '.', '', '']"); assert.arrayEqual('.'.split(/(.??)(.??)/), ['.'], "'.'.split(/(.??)(.??)/) results in ['.']"); assert.arrayEqual('.'.split(/(.)?(.)?/), ['', '.', void 8, ''], "'.'.split(/(.)?(.)?/) results in ['', '.', undefined, '']"); assert.arrayEqual('Aboldandcoded'.split(/<(\/)?([^<>]+)>/), ['A', void 8, 'B', 'bold', '/', 'B', 'and', void 8, 'CODE', 'coded', '/', 'CODE', ''], "'Aboldandcoded'.split(/<(\\/)?([^<>]+)>/) results in ['A', undefined, 'B', 'bold', '/', 'B', 'and', undefined, 'CODE', 'coded', '/', 'CODE', '']"); assert.arrayEqual('tesst'.split(/(s)*/), ['t', void 8, 'e', 's', 't'], "'tesst'.split(/(s)*/) results in ['t', undefined, 'e', 's', 't']"); assert.arrayEqual('tesst'.split(/(s)*?/), ['t', void 8, 'e', void 8, 's', void 8, 's', void 8, 't'], "'tesst'.split(/(s)*?/) results in ['t', undefined, 'e', undefined, 's', undefined, 's', undefined, 't']"); assert.arrayEqual('tesst'.split(/(s*)/), ['t', '', 'e', 'ss', 't'], "'tesst'.split(/(s*)/) results in ['t', '', 'e', 'ss', 't']"); assert.arrayEqual('tesst'.split(/(s*?)/), ['t', '', 'e', '', 's', '', 's', '', 't'], "'tesst'.split(/(s*?)/) results in ['t', '', 'e', '', 's', '', 's', '', 't']"); assert.arrayEqual('tesst'.split(/(?:s)*/), ['t', 'e', 't'], "'tesst'.split(/(?:s)*/) results in ['t', 'e', 't']"); assert.arrayEqual('tesst'.split(/(?=s+)/), ['te', 's', 'st'], "'tesst'.split(/(?=s+)/) results in ['te', 's', 'st']"); assert.arrayEqual('test'.split('t'), ['', 'es', ''], "'test'.split('t') results in ['', 'es', '']"); assert.arrayEqual('test'.split('es'), ['t', 't'], "'test'.split('es') results in ['t', 't']"); assert.arrayEqual('test'.split(/t/), ['', 'es', ''], "'test'.split(/t/) results in ['', 'es', '']"); assert.arrayEqual('test'.split(/es/), ['t', 't'], "'test'.split(/es/) results in ['t', 't']"); assert.arrayEqual('test'.split(/(t)/), ['', 't', 'es', 't', ''], "'test'.split(/(t)/) results in ['', 't', 'es', 't', '']"); assert.arrayEqual('test'.split(/(es)/), ['t', 'es', 't'], "'test'.split(/(es)/) results in ['t', 'es', 't']"); assert.arrayEqual('test'.split(/(t)(e)(s)(t)/), ['', 't', 'e', 's', 't', ''], "'test'.split(/(t)(e)(s)(t)/) results in ['', 't', 'e', 's', 't', '']"); assert.arrayEqual('.'.split(/(((.((.??)))))/), ['', '.', '.', '.', '', '', ''], "'.'.split(/(((.((.??)))))/) results in ['', '.', '.', '.', '', '', '']"); assert.arrayEqual('.'.split(/(((((.??)))))/), ['.'], "'.'.split(/(((((.??)))))/) results in ['.']"); assert.arrayEqual('a b c d'.split(/ /, -(Math.pow(2, 32) - 1)), ['a'], "'a b c d'.split(/ /, -(Math.pow(2, 32) - 1)) results in ['a']"); assert.arrayEqual('a b c d'.split(/ /, Math.pow(2, 32) + 1), ['a'], "'a b c d'.split(/ /, Math.pow(2, 32) + 1) results in ['a']"); assert.arrayEqual('a b c d'.split(/ /, Infinity), [], "'a b c d'.split(/ /, Infinity) results in []"); instance = Object(true); instance.split = String.prototype.split; split = instance.split(true, false); assert.strictEqual(typeof split, 'object', 'S15.5.4.14_A1_T1 #1'); assert.strictEqual(split.constructor, Array, 'S15.5.4.14_A1_T1 #2'); assert.strictEqual(split.length, 0, 'S15.5.4.14_A1_T1 #3'); instance = Object(false); instance.split = String.prototype.split; split = instance.split(false, 0, null); assert.strictEqual(typeof split, 'object', 'S15.5.4.14_A1_T2 #1'); assert.strictEqual(split.constructor, Array, 'S15.5.4.14_A1_T2 #2'); assert.strictEqual(split.length, 0, 'S15.5.4.14_A1_T2 #3'); split = ''.split(); assert.strictEqual(typeof split, 'object', 'S15.5.4.14_A1_T4 #1'); assert.strictEqual(split.constructor, Array, 'S15.5.4.14_A1_T4 #2'); assert.strictEqual(split.length, 1, 'S15.5.4.14_A1_T4 #3'); assert.strictEqual(split[0], '', 'S15.5.4.14_A1_T4 #4'); split = 'gnulluna'.split(null); assert.strictEqual(typeof split, 'object', 'S15.5.4.14_A1_T5 #1'); assert.strictEqual(split.constructor, Array, 'S15.5.4.14_A1_T5 #2'); assert.strictEqual(split.length, 2, 'S15.5.4.14_A1_T5 #3'); assert.strictEqual(split[0], 'g', 'S15.5.4.14_A1_T5 #4'); assert.strictEqual(split[1], 'una', 'S15.5.4.14_A1_T5 #5'); if (NATIVE) { split = Object('1undefined').split(void 8); assert.strictEqual(typeof split, 'object', 'S15.5.4.14_A1_T6 #1'); assert.strictEqual(split.constructor, Array, 'S15.5.4.14_A1_T6 #2'); assert.strictEqual(split.length, 1, 'S15.5.4.14_A1_T6 #3'); assert.strictEqual(split[0], '1undefined', 'S15.5.4.14_A1_T6 #4'); split = 'undefinedd'.split(void 8); assert.strictEqual(typeof split, 'object', 'S15.5.4.14_A1_T7 #1'); assert.strictEqual(split.constructor, Array, 'S15.5.4.14_A1_T7 #2'); assert.strictEqual(split.length, 1, 'S15.5.4.14_A1_T7 #3'); assert.strictEqual(split[0], 'undefinedd', 'S15.5.4.14_A1_T7 #4'); split = String({ toString: function(){} }).split(void 8); assert.strictEqual(typeof split, 'object', 'S15.5.4.14_A1_T8 #1'); assert.strictEqual(split.constructor, Array, 'S15.5.4.14_A1_T8 #2'); assert.strictEqual(split.length, 1, 'S15.5.4.14_A1_T8 #3'); assert.strictEqual(split[0], 'undefined', 'S15.5.4.14_A1_T8 #4'); } split = new String({ valueOf: function(){}, toString: void 8 }).split(function(){}); assert.strictEqual(typeof split, 'object', 'S15.5.4.14_A1_T9 #1'); assert.strictEqual(split.constructor, Array, 'S15.5.4.14_A1_T9 #2'); assert.strictEqual(split.length, 1, 'S15.5.4.14_A1_T9 #3'); assert.strictEqual(split[0], 'undefined', 'S15.5.4.14_A1_T9 #4'); split = 'ABB\u0041BABAB'.split({ toString: function(){ return '\u0042B'; } }, { valueOf: function(){ return true; } }); assert.strictEqual(typeof split, 'object', 'S15.5.4.14_A1_T10 #1'); assert.strictEqual(split.constructor, Array, 'S15.5.4.14_A1_T10 #2'); assert.strictEqual(split.length, 1, 'S15.5.4.14_A1_T10 #3'); assert.strictEqual(split[0], 'A', 'S15.5.4.14_A1_T10 #4'); try { 'ABB\u0041BABAB'.split({ toString: function(){ return '\u0041B'; } }, { valueOf: (function(){ throw 'intointeger'; }()) }); assert.ok(false, 'S15.5.4.14_A1_T11 #1 lead to throwing exception'); } catch (e$) { e = e$; assert.strictEqual(e, 'intointeger', 'S15.5.4.14_A1_T11 #2'); } if (NATIVE) { try { new String('ABB\u0041BABAB').split({ toString: function(){ return '\u0041B'; } }, { valueOf: function(){ return {}; }, toString: function(){ throw 'intointeger'; } }); assert.ok(false, 'S15.5.4.14_A1_T12 #1 lead to throwing exception'); } catch (e$) { e = e$; assert.strictEqual(e, 'intointeger', 'S15.5.4.14_A1_T12 #2'); } } split = 'ABB\u0041BABAB\u0042cc^^\u0042Bvv%%B\u0042xxx'.split({ toString: function(){ return '\u0042\u0042'; } }, { valueOf: function(){ return {}; }, toString: function(){ return '2'; } }); assert.strictEqual(typeof split, 'object', 'S15.5.4.14_A1_T13 #1'); assert.strictEqual(split.constructor, Array, 'S15.5.4.14_A1_T13 #2'); assert.strictEqual(split.length, 2, 'S15.5.4.14_A1_T13 #3'); assert.strictEqual(split[0], 'A', 'S15.5.4.14_A1_T13 #4'); assert.strictEqual(split[1], 'ABABA', 'S15.5.4.14_A1_T13 #5'); if (NATIVE) { try { instance = Object(10001.10001); instance.split = String.prototype.split; instance.split({ toString: function(){ throw 'intostr'; } }, { valueOf: function(){ throw 'intoint'; } }); assert.ok(false, 'S15.5.4.14_A1_T14 #1 lead to throwing exception'); } catch (e$) { e = e$; assert.strictEqual(e, 'intoint', 'S15.5.4.14_A1_T14 #2'); } try { F = (function(){ F.displayName = 'F'; var prototype = F.prototype, constructor = F; prototype.costructor = function(value){ this.value = value; }; prototype.valueOf = function(){ return '' + this.value; }; prototype.toString = function(){ return new Number; }; prototype.split = String.prototype.split; function F(){} return F; }()); new F().split({ toString: function(){ return {}; }, valueOf: function(){ throw 'intostr'; } }, { valueOf: function(){ throw 'intoint'; } }); assert.ok(false, 'S15.5.4.14_A1_T15 #1 lead to throwing exception'); } catch (e$) { e = e$; assert.strictEqual(e, 'intoint', 'S15.5.4.14_A1_T15 #2'); } } try { String.prototype.split.call(6776767677.006771122677555, { toString: function(){ return /\u0037\u0037/g; } }); assert.ok(false, 'S15.5.4.14_A1_T16 #1 lead to throwing exception'); } catch (e$) { e = e$; assert.ok(e instanceof TypeError, 'S15.5.4.14_A1_T16 #2'); } split = String.prototype.split.call(6776767677.006771122677555, /\u0037\u0037/g); assert.strictEqual(typeof split, 'object', 'S15.5.4.14_A1_T17 #1'); assert.strictEqual(split.constructor, Array, 'S15.5.4.14_A1_T17 #2'); assert.strictEqual(split.length, 4, 'S15.5.4.14_A1_T17 #3'); assert.strictEqual(split[0], '6', 'S15.5.4.14_A1_T17 #4'); assert.strictEqual(split[1], '67676', 'S15.5.4.14_A1_T17 #5'); assert.strictEqual(split[2], '.006', 'S15.5.4.14_A1_T17 #6'); assert.strictEqual(split[3], '1', 'S15.5.4.14_A1_T17 #7'); split = String.prototype.split.call(6776767677.006771122677555, /00/, 1); assert.strictEqual(typeof split, 'object', 'S15.5.4.14_A1_T18 #1'); assert.strictEqual(split.constructor, Array, 'S15.5.4.14_A1_T18 #2'); assert.strictEqual(split.length, 1, 'S15.5.4.14_A1_T18 #3'); assert.strictEqual(split[0], '6776767677.', 'S15.5.4.14_A1_T18 #4'); split = Object('one,two,three,four,five').split(','); assert.strictEqual(split.constructor, Array, 'S15.5.4.14_A2_T1 #1'); assert.strictEqual(split.length, 5, 'S15.5.4.14_A2_T1 #2'); assert.strictEqual(split[0], 'one', 'S15.5.4.14_A2_T1 #3'); assert.strictEqual(split[1], 'two', 'S15.5.4.14_A2_T1 #4'); assert.strictEqual(split[2], 'three', 'S15.5.4.14_A2_T1 #5'); assert.strictEqual(split[3], 'four', 'S15.5.4.14_A2_T1 #6'); assert.strictEqual(split[4], 'five', 'S15.5.4.14_A2_T1 #7'); split = Object('one two three four five').split(' '); assert.strictEqual(split.constructor, Array, 'S15.5.4.14_A2_T2 #1'); assert.strictEqual(split.length, 5, 'S15.5.4.14_A2_T2 #2'); assert.strictEqual(split[0], 'one', 'S15.5.4.14_A2_T2 #3'); assert.strictEqual(split[1], 'two', 'S15.5.4.14_A2_T2 #4'); assert.strictEqual(split[2], 'three', 'S15.5.4.14_A2_T2 #5'); assert.strictEqual(split[3], 'four', 'S15.5.4.14_A2_T2 #6'); assert.strictEqual(split[4], 'five', 'S15.5.4.14_A2_T2 #7'); split = Object('one two three four five').split(RegExp(' '), 2); assert.strictEqual(split.constructor, Array, 'S15.5.4.14_A2_T3 #1'); assert.strictEqual(split.length, 2, 'S15.5.4.14_A2_T3 #2'); assert.strictEqual(split[0], 'one', 'S15.5.4.14_A2_T3 #3'); assert.strictEqual(split[1], 'two', 'S15.5.4.14_A2_T3 #4'); split = Object('one two three').split(''); assert.strictEqual(split.constructor, Array, 'S15.5.4.14_A2_T4 #1'); assert.strictEqual(split.length, 'one two three'.length, 'S15.5.4.14_A2_T4 #2'); assert.strictEqual(split[0], 'o', 'S15.5.4.14_A2_T4 #3'); assert.strictEqual(split[1], 'n', 'S15.5.4.14_A2_T4 #4'); assert.strictEqual(split[11], 'e', 'S15.5.4.14_A2_T4 #5'); assert.strictEqual(split[12], 'e', 'S15.5.4.14_A2_T4 #6'); split = Object('one-1,two-2,four-4').split(/,/); assert.strictEqual(split.constructor, Array, 'S15.5.4.14_A2_T5 #1'); assert.strictEqual(split.length, 3, 'S15.5.4.14_A2_T5 #2'); assert.strictEqual(split[0], 'one-1', 'S15.5.4.14_A2_T5 #3'); assert.strictEqual(split[1], 'two-2', 'S15.5.4.14_A2_T5 #4'); assert.strictEqual(split[2], 'four-4', 'S15.5.4.14_A2_T5 #5'); string = Object('one-1 two-2 three-3'); split = string.split(''); assert.strictEqual(split.constructor, Array, 'S15.5.4.14_A2_T6 #1'); assert.strictEqual(split.length, string.length, 'S15.5.4.14_A2_T6 #2'); for (i$ = 0, to$ = split.length; i$ < to$; ++i$) { i = i$; assert.strictEqual(split[i], string.charAt(i), "S15.5.4.14_A2_T6 #" + (i + 3)); } if (NATIVE) { string = 'thisundefinedisundefinedaundefinedstringundefinedobject'; split = string.split(void 8); assert.strictEqual(split.constructor, Array, 'S15.5.4.14_A2_T7 #1'); assert.strictEqual(split.length, 1, 'S15.5.4.14_A2_T7 #2'); assert.strictEqual(split[0], string, 'S15.5.4.14_A2_T7 #3'); } string = 'thisnullisnullanullstringnullobject'; expected = ['this', 'is', 'a', 'string', 'object']; split = string.split(null); assert.strictEqual(split.constructor, Array, 'S15.5.4.14_A2_T8 #1'); assert.strictEqual(split.length, expected.length, 'S15.5.4.14_A2_T8 #2'); for (i$ = 0, to$ = expected.length; i$ < to$; ++i$) { i = i$; assert.strictEqual(expected[i], split[i], "S15.5.4.14_A2_T8 #" + (i + 3)); } string = 'thistrueistrueatruestringtrueobject'; expected = ['this', 'is', 'a', 'string', 'object']; split = string.split(true); assert.strictEqual(split.constructor, Array, 'S15.5.4.14_A2_T9 #1'); assert.strictEqual(split.length, expected.length, 'S15.5.4.14_A2_T9 #2'); for (i$ = 0, to$ = expected.length; i$ < to$; ++i$) { i = i$; assert.strictEqual(expected[i], split[i], "S15.5.4.14_A2_T9 #" + (i + 3)); } string = 'this123is123a123string123object'; expected = ['this', 'is', 'a', 'string', 'object']; split = string.split(123); assert.strictEqual(split.constructor, Array, 'S15.5.4.14_A2_T10 #1'); assert.strictEqual(split.length, expected.length, 'S15.5.4.14_A2_T10 #2'); for (i$ = 0, to$ = expected.length; i$ < to$; ++i$) { i = i$; assert.strictEqual(expected[i], split[i], "S15.5.4.14_A2_T10 #" + (i + 3)); } split = Object('one-1,two-2,four-4').split(':'); assert.strictEqual(split.constructor, Array, 'S15.5.4.14_A2_T11 #1'); assert.strictEqual(split.length, 1, 'S15.5.4.14_A2_T11 #2'); assert.strictEqual(split[0], 'one-1,two-2,four-4', 'S15.5.4.14_A2_T11 #3'); split = Object('one-1 two-2 four-4').split('r-42'); assert.strictEqual(split.constructor, Array, 'S15.5.4.14_A2_T12 #1'); assert.strictEqual(split.length, 1, 'S15.5.4.14_A2_T12 #2'); assert.strictEqual(split[0], 'one-1 two-2 four-4', 'S15.5.4.14_A2_T12 #3'); split = Object('one-1 two-2 four-4').split('-4'); assert.strictEqual(split.constructor, Array, 'S15.5.4.14_A2_T13 #1'); assert.strictEqual(split.length, 2, 'S15.5.4.14_A2_T13 #2'); assert.strictEqual(split[0], 'one-1 two-2 four', 'S15.5.4.14_A2_T13 #3'); assert.strictEqual(split[1], '', 'S15.5.4.14_A2_T13 #4'); split = Object('one-1 two-2 four-4').split('on'); assert.strictEqual(split.constructor, Array, 'S15.5.4.14_A2_T14 #1'); assert.strictEqual(split.length, 2, 'S15.5.4.14_A2_T14 #2'); assert.strictEqual(split[0], '', 'S15.5.4.14_A2_T14 #3'); assert.strictEqual(split[1], 'e-1 two-2 four-4', 'S15.5.4.14_A2_T14 #4'); split = new String().split(''); assert.strictEqual(split.constructor, Array, 'S15.5.4.14_A2_T15 #1'); assert.strictEqual(split.length, 0, 'S15.5.4.14_A2_T15 #2'); assert.strictEqual(split[0], void 8, 'S15.5.4.14_A2_T15 #3'); split = new String().split(' '); assert.strictEqual(split.constructor, Array, 'S15.5.4.14_A2_T16 #1'); assert.strictEqual(split.length, 1, 'S15.5.4.14_A2_T16 #2'); assert.strictEqual(split[0], '', 'S15.5.4.14_A2_T16 #3'); split = Object(' ').split(''); assert.strictEqual(split.constructor, Array, 'S15.5.4.14_A2_T18 #1'); assert.strictEqual(split.length, 1, 'S15.5.4.14_A2_T18 #2'); assert.strictEqual(split[0], ' ', 'S15.5.4.14_A2_T18 #3'); split = Object(' ').split(' '); assert.strictEqual(split.constructor, Array, 'S15.5.4.14_A2_T19 #1'); assert.strictEqual(split.length, 2, 'S15.5.4.14_A2_T19 #2'); assert.strictEqual(split[0], '', 'S15.5.4.14_A2_T19 #3'); assert.strictEqual(split[1], '', 'S15.5.4.14_A2_T19 #4'); split = ''.split('x'); assert.strictEqual(split.constructor, Array, 'S15.5.4.14_A2_T19 #1'); assert.strictEqual(split.length, 1, 'S15.5.4.14_A2_T19 #2'); assert.strictEqual(split[0], '', 'S15.5.4.14_A2_T19 #3'); string = Object('one-1 two-2 three-3'); split = string.split(new RegExp); assert.strictEqual(split.constructor, Array, 'S15.5.4.14_A2_T20 #1'); assert.strictEqual(split.length, string.length, 'S15.5.4.14_A2_T20 #2'); for (i$ = 0, to$ = split.length; i$ < to$; ++i$) { i = i$; assert.strictEqual(split[i], string.charAt(i), "S15.5.4.14_A2_T20 #" + (i + 3)); } split = Object('hello').split('ll'); assert.strictEqual(split.constructor, Array, 'S15.5.4.14_A2_T21 #1'); assert.strictEqual(split.length, 2, 'S15.5.4.14_A2_T21 #2'); assert.strictEqual(split[0], 'he', 'S15.5.4.14_A2_T21 #3'); assert.strictEqual(split[1], 'o', 'S15.5.4.14_A2_T21 #4'); split = Object('hello').split('l'); assert.strictEqual(split.constructor, Array, 'S15.5.4.14_A2_T22 #1'); assert.strictEqual(split.length, 3, 'S15.5.4.14_A2_T22 #2'); assert.strictEqual(split[0], 'he', 'S15.5.4.14_A2_T22 #3'); assert.strictEqual(split[1], '', 'S15.5.4.14_A2_T22 #4'); assert.strictEqual(split[2], 'o', 'S15.5.4.14_A2_T22 #5'); split = Object('hello').split('x'); assert.strictEqual(split.constructor, Array, 'S15.5.4.14_A2_T23 #1'); assert.strictEqual(split.length, 1, 'S15.5.4.14_A2_T23 #2'); assert.strictEqual(split[0], 'hello', 'S15.5.4.14_A2_T23 #3'); split = Object('hello').split('h'); assert.strictEqual(split.constructor, Array, 'S15.5.4.14_A2_T24 #1'); assert.strictEqual(split.length, 2, 'S15.5.4.14_A2_T24 #2'); assert.strictEqual(split[0], '', 'S15.5.4.14_A2_T24 #3'); assert.strictEqual(split[1], 'ello', 'S15.5.4.14_A2_T24 #4'); split = Object('hello').split('o'); assert.strictEqual(split.constructor, Array, 'S15.5.4.14_A2_T25 #1'); assert.strictEqual(split.length, 2, 'S15.5.4.14_A2_T25 #2'); assert.strictEqual(split[0], 'hell', 'S15.5.4.14_A2_T25 #3'); assert.strictEqual(split[1], '', 'S15.5.4.14_A2_T25 #4'); split = Object('hello').split('hello'); assert.strictEqual(split.constructor, Array, 'S15.5.4.14_A2_T26 #1'); assert.strictEqual(split.length, 2, 'S15.5.4.14_A2_T26 #2'); assert.strictEqual(split[0], '', 'S15.5.4.14_A2_T26 #3'); assert.strictEqual(split[1], '', 'S15.5.4.14_A2_T26 #4'); split = Object('hello').split(void 8); assert.strictEqual(split.constructor, Array, 'S15.5.4.14_A2_T27 #1'); assert.strictEqual(split.length, 1, 'S15.5.4.14_A2_T27 #2'); assert.strictEqual(split[0], 'hello', 'S15.5.4.14_A2_T27 #3'); split = Object('hello').split('hellothere'); assert.strictEqual(split.constructor, Array, 'S15.5.4.14_A2_T28 #1'); assert.strictEqual(split.length, 1, 'S15.5.4.14_A2_T28 #2'); assert.strictEqual(split[0], 'hello', 'S15.5.4.14_A2_T28 #3'); instance = Object(100111122133144155); instance.split = String.prototype.split; split = instance.split(1); expected = ['', '00', '', '', '', '22', '33', '44', '60']; assert.strictEqual(split.constructor, Array, 'S15.5.4.14_A2_T29 #1'); assert.strictEqual(split.length, expected.length, 'S15.5.4.14_A2_T29 #2'); for (i$ = 0, to$ = expected.length; i$ < to$; ++i$) { i = i$; assert.strictEqual(expected[i], split[i], "S15.5.4.14_A2_T29 #" + (i + 3)); } instance = Object(100111122133144155); instance.split = String.prototype.split; split = instance.split(1, 1); expected = ['']; assert.strictEqual(split.constructor, Array, 'S15.5.4.14_A2_T30 #1'); assert.strictEqual(split.length, expected.length, 'S15.5.4.14_A2_T30 #2'); for (i$ = 0, to$ = expected.length; i$ < to$; ++i$) { i = i$; assert.strictEqual(expected[i], split[i], "S15.5.4.14_A2_T30 #" + (i + 3)); } instance = Object(100111122133144155); instance.split = String.prototype.split; split = instance.split(1, 2); expected = ['', '00']; assert.strictEqual(split.constructor, Array, 'S15.5.4.14_A2_T31 #1'); assert.strictEqual(split.length, expected.length, 'S15.5.4.14_A2_T31 #2'); for (i$ = 0, to$ = expected.length; i$ < to$; ++i$) { i = i$; assert.strictEqual(expected[i], split[i], "S15.5.4.14_A2_T31 #" + (i + 3)); } instance = Object(100111122133144155); instance.split = String.prototype.split; split = instance.split(1, 0); assert.strictEqual(split.constructor, Array, 'S15.5.4.14_A2_T32 #1'); assert.strictEqual(split.length, 0, 'S15.5.4.14_A2_T32 #2'); instance = Object(100111122133144155); instance.split = String.prototype.split; split = instance.split(1, 100); expected = ['', '00', '', '', '', '22', '33', '44', '60']; assert.strictEqual(split.constructor, Array, 'S15.5.4.14_A2_T33 #1'); assert.strictEqual(split.length, expected.length, 'S15.5.4.14_A2_T33 #2'); for (i$ = 0, to$ = expected.length; i$ < to$; ++i$) { i = i$; assert.strictEqual(expected[i], split[i], "S15.5.4.14_A2_T33 #" + (i + 3)); } instance = Object(100111122133144155); instance.split = String.prototype.split; split = instance.split(1, void 8); expected = ['', '00', '', '', '', '22', '33', '44', '60']; assert.strictEqual(split.constructor, Array, 'S15.5.4.14_A2_T34 #1'); assert.strictEqual(split.length, expected.length, 'S15.5.4.14_A2_T34 #2'); for (i$ = 0, to$ = expected.length; i$ < to$; ++i$) { i = i$; assert.strictEqual(expected[i], split[i], "S15.5.4.14_A2_T34 #" + (i + 3)); } instance = Object(100111122133144155); instance.split = String.prototype.split; split = instance.split(1, Math.pow(2, 32) - 1); expected = ['', '00', '', '', '', '22', '33', '44', '60']; assert.strictEqual(split.constructor, Array, 'S15.5.4.14_A2_T35 #1'); assert.strictEqual(split.length, expected.length, 'S15.5.4.14_A2_T35 #2'); for (i$ = 0, to$ = expected.length; i$ < to$; ++i$) { i = i$; assert.strictEqual(expected[i], split[i], "S15.5.4.14_A2_T35 #" + (i + 3)); } instance = Object(100111122133144155); instance.split = String.prototype.split; split = instance.split(1, 'boo'); assert.strictEqual(split.constructor, Array, 'S15.5.4.14_A2_T36 #1'); assert.strictEqual(split.length, 0, 'S15.5.4.14_A2_T36 #2'); instance = Object(100111122133144155); instance.split = String.prototype.split; split = instance.split(1, -Math.pow(2, 32) + 1); assert.strictEqual(split.constructor, Array, 'S15.5.4.14_A2_T37 #1'); assert.arrayEqual(split, [''], 'S15.5.4.14_A2_T37 #2'); instance = Object(100111122133144155); instance.split = String.prototype.split; split = instance.split(1, NaN); assert.strictEqual(split.constructor, Array, 'S15.5.4.14_A2_T38 #1'); assert.strictEqual(split.length, 0, 'S15.5.4.14_A2_T38 #2'); instance = Object('hello').split('l', 0); assert.strictEqual(split.constructor, Array, 'S15.5.4.14_A2_T39 #1'); assert.strictEqual(split.length, 0, 'S15.5.4.14_A2_T39 #2'); split = Object('hello').split('l', 1); assert.strictEqual(split.constructor, Array, 'S15.5.4.14_A2_T40 #1'); assert.strictEqual(split.length, 1, 'S15.5.4.14_A2_T40 #2'); assert.strictEqual(split[0], 'he', 'S15.5.4.14_A2_T40 #3'); split = Object('hello').split('l', 2); expected = ['he', '']; assert.strictEqual(split.constructor, Array, 'S15.5.4.14_A2_T41 #1'); assert.strictEqual(split.length, expected.length, 'S15.5.4.14_A2_T41 #2'); for (i$ = 0, to$ = expected.length; i$ < to$; ++i$) { i = i$; assert.strictEqual(expected[i], split[i], "S15.5.4.14_A2_T41 #" + (i + 3)); } split = Object('hello').split('l', 3); expected = ['he', '', 'o']; assert.strictEqual(split.constructor, Array, 'S15.5.4.14_A2_T42 #1'); assert.strictEqual(split.length, expected.length, 'S15.5.4.14_A2_T42 #2'); for (i$ = 0, to$ = expected.length; i$ < to$; ++i$) { i = i$; assert.strictEqual(expected[i], split[i], "S15.5.4.14_A2_T42 #" + (i + 3)); } split = Object('hello').split('l', 4); expected = ['he', '', 'o']; assert.strictEqual(split.constructor, Array, 'S15.5.4.14_A2_T43 #1'); assert.strictEqual(split.length, expected.length, 'S15.5.4.14_A2_T43 #2'); for (i$ = 0, to$ = expected.length; i$ < to$; ++i$) { i = i$; assert.strictEqual(expected[i], split[i], "S15.5.4.14_A2_T43 #" + (i + 3)); } split = Object('one,two,three,four,five').split(); assert.strictEqual(split.constructor, Array, 'S15.5.4.14_A3_T1 #1'); assert.strictEqual(split.length, 1, 'S15.5.4.14_A3_T1 #2'); assert.strictEqual(split[0], 'one,two,three,four,five', 'S15.5.4.14_A3_T1 #3'); split = String.prototype.split.call({}); assert.strictEqual(split.constructor, Array, 'S15.5.4.14_A3_T2 #1'); assert.strictEqual(split.length, 1, 'S15.5.4.14_A3_T2 #2'); assert.strictEqual(split[0], '[object Object]', 'S15.5.4.14_A3_T2 #3'); split = String.prototype.split.call({ toString: function(){ return 'function(){}'; } }); assert.strictEqual(split.constructor, Array, 'S15.5.4.14_A3_T3 #1'); assert.strictEqual(split.length, 1, 'S15.5.4.14_A3_T3 #2'); assert.strictEqual(split[0], 'function(){}', 'S15.5.4.14_A3_T3 #3'); split = String.prototype.split.call(Object(NaN)); assert.strictEqual(split.constructor, Array, 'S15.5.4.14_A3_T4 #1'); assert.strictEqual(split.length, 1, 'S15.5.4.14_A3_T4 #2'); assert.strictEqual(split[0], 'NaN', 'S15.5.4.14_A3_T4 #3'); split = String.prototype.split.call(Object(-1234567890)); assert.strictEqual(split.constructor, Array, 'S15.5.4.14_A3_T5 #1'); assert.strictEqual(split.length, 1, 'S15.5.4.14_A3_T5 #2'); assert.strictEqual(split[0], '-1234567890', 'S15.5.4.14_A3_T5 #3'); instance = Object(-1e21); split = String.prototype.split.call(instance); assert.strictEqual(split.constructor, Array, 'S15.5.4.14_A3_T6 #1'); assert.strictEqual(split.length, 1, 'S15.5.4.14_A3_T6 #2'); assert.strictEqual(split[0], instance.toString(), 'S15.5.4.14_A3_T6 #3'); split = String.prototype.split.call(Math); assert.strictEqual(split.constructor, Array, 'S15.5.4.14_A3_T7 #1'); assert.strictEqual(split.length, 1, 'S15.5.4.14_A3_T7 #2'); assert.strictEqual(split[0], '[object Math]', 'S15.5.4.14_A3_T7 #3'); split = String.prototype.split.call([1, 2, 3, 4, 5]); assert.strictEqual(split.constructor, Array, 'S15.5.4.14_A3_T8 #1'); assert.strictEqual(split.length, 1, 'S15.5.4.14_A3_T8 #2'); assert.strictEqual(split[0], '1,2,3,4,5', 'S15.5.4.14_A3_T8 #3'); split = String.prototype.split.call(Object(false)); assert.strictEqual(split.constructor, Array, 'S15.5.4.14_A3_T9 #1'); assert.strictEqual(split.length, 1, 'S15.5.4.14_A3_T9 #2'); assert.strictEqual(split[0], 'false', 'S15.5.4.14_A3_T9 #3'); split = String.prototype.split.call(new String); assert.strictEqual(split.constructor, Array, 'S15.5.4.14_A3_T10 #1'); assert.strictEqual(split.length, 1, 'S15.5.4.14_A3_T10 #2'); assert.strictEqual(split[0], '', 'S15.5.4.14_A3_T10 #3'); split = String.prototype.split.call(Object(' ')); assert.strictEqual(split.constructor, Array, 'S15.5.4.14_A3_T11 #1'); assert.strictEqual(split.length, 1, 'S15.5.4.14_A3_T11 #2'); assert.strictEqual(split[0], ' ', 'S15.5.4.14_A3_T11 #3'); if (NATIVE) { split = Object('hello').split(/l/); assert.strictEqual(split.constructor, Array, 'S15.5.4.14_A4_T1 #1'); assert.strictEqual(split.length, 3, 'S15.5.4.14_A4_T1 #2'); assert.strictEqual(split[0], 'he', 'S15.5.4.14_A4_T1 #3'); assert.strictEqual(split[1], '', 'S15.5.4.14_A4_T1 #4'); assert.strictEqual(split[2], 'o', 'S15.5.4.14_A4_T1 #5'); } split = Object('hello').split(/l/, 0); assert.strictEqual(split.constructor, Array, 'S15.5.4.14_A4_T2 #1'); assert.strictEqual(split.length, 0, 'S15.5.4.14_A4_T2 #2'); split = Object('hello').split(/l/, 1); assert.strictEqual(split.constructor, Array, 'S15.5.4.14_A4_T3 #1'); assert.strictEqual(split.length, 1, 'S15.5.4.14_A4_T3 #2'); assert.strictEqual(split[0], 'he', 'S15.5.4.14_A4_T3 #3'); if (NATIVE) { split = Object('hello').split(/l/, 2); assert.strictEqual(split.constructor, Array, 'S15.5.4.14_A4_T4 #1'); assert.strictEqual(split.length, 2, 'S15.5.4.14_A4_T4 #2'); assert.strictEqual(split[0], 'he', 'S15.5.4.14_A4_T4 #3'); assert.strictEqual(split[1], '', 'S15.5.4.14_A4_T4 #4'); split = Object('hello').split(/l/, 3); assert.strictEqual(split.constructor, Array, 'S15.5.4.14_A4_T5 #1'); assert.strictEqual(split.length, 3, 'S15.5.4.14_A4_T5 #2'); assert.strictEqual(split[0], 'he', 'S15.5.4.14_A4_T5 #3'); assert.strictEqual(split[1], '', 'S15.5.4.14_A4_T5 #4'); assert.strictEqual(split[2], 'o', 'S15.5.4.14_A4_T5 #5'); split = Object('hello').split(/l/, 4); assert.strictEqual(split.constructor, Array, 'S15.5.4.14_A4_T6 #1'); assert.strictEqual(split.length, 3, 'S15.5.4.14_A4_T6 #2'); assert.strictEqual(split[0], 'he', 'S15.5.4.14_A4_T6 #3'); assert.strictEqual(split[1], '', 'S15.5.4.14_A4_T6 #4'); assert.strictEqual(split[2], 'o', 'S15.5.4.14_A4_T6 #5'); split = Object('hello').split(/l/, void 8); assert.strictEqual(split.constructor, Array, 'S15.5.4.14_A4_T7 #1'); assert.strictEqual(split.length, 3, 'S15.5.4.14_A4_T7 #2'); assert.strictEqual(split[0], 'he', 'S15.5.4.14_A4_T7 #3'); assert.strictEqual(split[1], '', 'S15.5.4.14_A4_T7 #4'); assert.strictEqual(split[2], 'o', 'S15.5.4.14_A4_T7 #5'); } split = Object('hello').split(/l/, 'hi'); assert.strictEqual(split.constructor, Array, 'S15.5.4.14_A4_T8 #1'); assert.strictEqual(split.length, 0, 'S15.5.4.14_A4_T8 #2'); split = Object('hello').split(new RegExp); expected = ['h', 'e', 'l', 'l', 'o']; assert.strictEqual(split.constructor, Array, 'S15.5.4.14_A4_T10 #1'); assert.strictEqual(split.length, expected.length, 'S15.5.4.14_A4_T10 #2'); for (i$ = 0, to$ = expected.length; i$ < to$; ++i$) { i = i$; assert.strictEqual(expected[i], split[i], "S15.5.4.14_A4_T10 #" + (i + 3)); } split = Object('hello').split(new RegExp(), 0); assert.strictEqual(split.constructor, Array, 'S15.5.4.14_A4_T11 #1'); assert.strictEqual(split.length, 0, 'S15.5.4.14_A4_T11 #2'); split = Object('hello').split(new RegExp(), 1); assert.strictEqual(split.constructor, Array, 'S15.5.4.14_A4_T12 #1'); assert.strictEqual(split.length, 1, 'S15.5.4.14_A4_T12 #2'); assert.strictEqual(split[0], 'h', 'S15.5.4.14_A4_T12 #3'); split = Object('hello').split(new RegExp(), 2); expected = ['h', 'e']; assert.strictEqual(split.constructor, Array, 'S15.5.4.14_A4_T13 #1'); assert.strictEqual(split.length, expected.length, 'S15.5.4.14_A4_T13 #2'); for (i$ = 0, to$ = expected.length; i$ < to$; ++i$) { i = i$; assert.strictEqual(expected[i], split[i], "S15.5.4.14_A4_T13 #" + (i + 3)); } split = Object('hello').split(new RegExp(), 3); expected = ['h', 'e', 'l']; assert.strictEqual(split.constructor, Array, 'S15.5.4.14_A4_T14 #1'); assert.strictEqual(split.length, expected.length, 'S15.5.4.14_A4_T14 #2'); for (i$ = 0, to$ = expected.length; i$ < to$; ++i$) { i = i$; assert.strictEqual(expected[i], split[i], "S15.5.4.14_A4_T14 #" + (i + 3)); } split = Object('hello').split(new RegExp(), 4); expected = ['h', 'e', 'l', 'l']; assert.strictEqual(split.constructor, Array, 'S15.5.4.14_A4_T15 #1'); assert.strictEqual(split.length, expected.length, 'S15.5.4.14_A4_T15 #2'); for (i$ = 0, to$ = expected.length; i$ < to$; ++i$) { i = i$; assert.strictEqual(expected[i], split[i], "S15.5.4.14_A4_T15 #" + (i + 3)); } split = Object('hello').split(new RegExp(), void 8); expected = ['h', 'e', 'l', 'l', 'o']; assert.strictEqual(split.constructor, Array, 'S15.5.4.14_A4_T16 #1'); assert.strictEqual(split.length, expected.length, 'S15.5.4.14_A4_T16 #2'); for (i$ = 0, to$ = expected.length; i$ < to$; ++i$) { i = i$; assert.strictEqual(expected[i], split[i], "S15.5.4.14_A4_T16 #" + (i + 3)); } split = Object('hello').split(new RegExp(), 'hi'); assert.strictEqual(split.constructor, Array, 'S15.5.4.14_A4_T18 #1'); assert.strictEqual(split.length, 0, 'S15.5.4.14_A4_T18 #2'); split = Object('a b c de f').split(/\s/); expected = ['a', 'b', 'c', 'de', 'f']; assert.strictEqual(split.constructor, Array, 'S15.5.4.14_A4_T19 #1'); assert.strictEqual(split.length, expected.length, 'S15.5.4.14_A4_T19 #2'); for (i$ = 0, to$ = expected.length; i$ < to$; ++i$) { i = i$; assert.strictEqual(expected[i], split[i], "S15.5.4.14_A4_T19 #" + (i + 3)); } split = Object('a b c de f').split(/\s/, 3); expected = ['a', 'b', 'c']; assert.strictEqual(split.constructor, Array, 'S15.5.4.14_A4_T20 #1'); assert.strictEqual(split.length, expected.length, 'S15.5.4.14_A4_T20 #2'); for (i$ = 0, to$ = expected.length; i$ < to$; ++i$) { i = i$; assert.strictEqual(expected[i], split[i], "S15.5.4.14_A4_T20 #" + (i + 3)); } split = Object('a b c de f').split(/X/); assert.strictEqual(split.constructor, Array, 'S15.5.4.14_A4_T21 #1'); assert.strictEqual(split.length, 1, 'S15.5.4.14_A4_T21 #2'); assert.strictEqual(split[0], 'a b c de f', "S15.5.4.14_A4_T21 #3"); split = Object('dfe23iu 34 =+65--').split(/\d+/); expected = ['dfe', 'iu ', ' =+', '--']; assert.strictEqual(split.constructor, Array, 'S15.5.4.14_A4_T22 #1'); assert.strictEqual(split.length, expected.length, 'S15.5.4.14_A4_T22 #2'); for (i$ = 0, to$ = expected.length; i$ < to$; ++i$) { i = i$; assert.strictEqual(expected[i], split[i], "S15.5.4.14_A4_T22 #" + (i + 3)); } if (NATIVE) { split = Object('abc').split(/[a-z]/); expected = ['', '', '', '']; assert.strictEqual(split.constructor, Array, 'S15.5.4.14_A4_T24 #1'); assert.strictEqual(split.length, expected.length, 'S15.5.4.14_A4_T24 #2'); for (i$ = 0, to$ = expected.length; i$ < to$; ++i$) { i = i$; results$.push(assert.strictEqual(expected[i], split[i], "S15.5.4.14_A4_T24 #" + (i + 3))); } return results$; } }); test('RegExp#@@split', function(assert){ assert.isFunction(/./[typeof Symbol != 'undefined' && Symbol !== null ? Symbol.split : void 8]); assert.arity(/./[typeof Symbol != 'undefined' && Symbol !== null ? Symbol.split : void 8], 2); assert.strictEqual(/\s/[typeof Symbol != 'undefined' && Symbol !== null ? Symbol.split : void 8]('a b c de f').length, 5); assert.strictEqual(/\s/[typeof Symbol != 'undefined' && Symbol !== null ? Symbol.split : void 8]('a b c de f', void 8).length, 5); assert.strictEqual(/\s/[typeof Symbol != 'undefined' && Symbol !== null ? Symbol.split : void 8]('a b c de f', 1).length, 1); return assert.strictEqual(/\s/[typeof Symbol != 'undefined' && Symbol !== null ? Symbol.split : void 8]('a b c de f', 10).length, 5); }); test('@@split logic', function(assert){ 'use strict'; var str, num, O, ref$, re; str = STRICT ? 'qwe' : Object('qwe'); num = STRICT ? 123 : Object(123); O = (ref$ = {}, ref$[typeof Symbol != 'undefined' && Symbol !== null ? Symbol.split : void 8] = function(a, b){ return { a: a, b: b }; }, ref$); assert.strictEqual(str.split(O, 42).a, str); assert.strictEqual(str.split(O, 42).b, 42); assert.strictEqual(''.split.call(num, O, 42).a, num); assert.strictEqual(''.split.call(num, O, 42).b, 42); re = /./; re[typeof Symbol != 'undefined' && Symbol !== null ? Symbol.split : void 8] = function(a, b){ return { a: a, b: b }; }; assert.strictEqual(str.split(re, 42).a, str); assert.strictEqual(str.split(re, 42).b, 42); assert.strictEqual(''.split.call(num, re, 42).a, num); return assert.strictEqual(''.split.call(num, re, 42).b, 42); }); }).call(this); // Generated by LiveScript 1.4.0 (function(){ var module, test; module = QUnit.module, test = QUnit.test; module('ES6'); test('RegExp#toString', function(assert){ var toString; toString = /./.toString; assert.isFunction(toString); assert.arity(toString, 0); assert.name(toString, 'toString'); assert.looksNative(toString); assert.nonEnumerable(RegExp.prototype, 'toString'); assert.same(String(/pattern/), '/pattern/'); assert.same(String(/pattern/i), '/pattern/i'); assert.same(String(/pattern/mi), '/pattern/im'); assert.same(String(/pattern/im), '/pattern/im'); assert.same(String(/pattern/mgi), '/pattern/gim'); assert.same(String(new RegExp('pattern')), '/pattern/'); assert.same(String(new RegExp('pattern', 'i')), '/pattern/i'); assert.same(String(new RegExp('pattern', 'mi')), '/pattern/im'); assert.same(String(new RegExp('pattern', 'im')), '/pattern/im'); assert.same(String(new RegExp('pattern', 'mgi')), '/pattern/gim'); assert.same(toString.call({ source: 'foo', flags: 'bar' }), '/foo/bar'); assert.same(toString.call({}), '/undefined/undefined'); if (STRICT) { assert.throws(function(){ toString.call(7); }); assert.throws(function(){ toString.call('a'); }); assert.throws(function(){ toString.call(false); }); assert.throws(function(){ toString.call(null); }); assert.throws(function(){ toString.call(void 8); }); } }); }).call(this); // Generated by LiveScript 1.4.0 (function(){ var module, test, same, getOwnPropertyDescriptor, freeze; module = QUnit.module, test = QUnit.test; module('ES6'); same = function(a, b){ if (a === b) { return a !== 0 || 1 / a === 1 / b; } else { return a != a && b != b; } }; getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor, freeze = Object.freeze; test('Set', function(assert){ var x$, y$, S, r, z$, z1$, done, iter, _add, a, o, key, C; assert.isFunction(Set); assert.name(Set, 'Set'); assert.arity(Set, 0); assert.looksNative(Set); assert.ok('add' in Set.prototype, 'add in Set.prototype'); assert.ok('clear' in Set.prototype, 'clear in Set.prototype'); assert.ok('delete' in Set.prototype, 'delete in Set.prototype'); assert.ok('has' in Set.prototype, 'has in Set.prototype'); assert.ok(new Set instanceof Set, 'new Set instanceof Set'); assert.strictEqual(new Set(createIterable([1, 2, 3])).size, 3, 'Init from iterable'); assert.strictEqual((x$ = new Set(), x$.add(freeze({})), x$.add(1), x$).size, 2, 'Support frozen objects'); y$ = S = new Set(); y$.add(1); y$.add(2); y$.add(3); y$.add(2); y$.add(1); assert.strictEqual(S.size, 3); r = []; S.forEach(function(v){ r.push(v); }); assert.deepEqual(r, [1, 2, 3]); assert.strictEqual((z$ = new Set(), z$.add(NaN), z$.add(NaN), z$.add(NaN), z$).size, 1); if (Array.from) { assert.deepEqual(Array.from((z1$ = new Set([3, 4]), z1$.add(2), z1$.add(1), z1$)), [3, 4, 2, 1]); } done = false; iter = createIterable([null, 1, 2], { 'return': function(){ return done = true; } }); _add = Set.prototype.add; Set.prototype.add = function(){ throw 42; }; try { new Set(iter); } catch (e$) {} Set.prototype.add = _add; assert.ok(done, '.return #throw'); a = []; done = false; a[typeof Symbol != 'undefined' && Symbol !== null ? Symbol.iterator : void 8] = function(){ done = true; return [][typeof Symbol != 'undefined' && Symbol !== null ? Symbol.iterator : void 8].call(this); }; new Set(a); assert.ok(done); o = {}; new Set().add(o); if (DESCRIPTORS) { assert.arrayEqual((function(){ var results$ = []; for (key in o) { results$.push(key); } return results$; }()), []); assert.arrayEqual(Object.keys(o), []); } assert.arrayEqual(Object.getOwnPropertyNames(o), []); ((typeof Object != 'undefined' && Object !== null) && Object.getOwnPropertySymbols) && assert.arrayEqual(Object.getOwnPropertySymbols(o), []); ((typeof Reflect != 'undefined' && Reflect !== null) && Reflect.ownKeys) && assert.arrayEqual(Reflect.ownKeys(o), []); if (nativeSubclass) { C = nativeSubclass(Set); assert.ok(new C instanceof C, 'correct subclassing with native classes #1'); assert.ok(new C instanceof Set, 'correct subclassing with native classes #2'); assert.ok(new C().add(2).has(2), 'correct subclassing with native classes #3'); } }); test('Set#add', function(assert){ var a, x$, S, chain, y$, f; assert.isFunction(Set.prototype.add); assert.name(Set.prototype.add, 'add'); assert.arity(Set.prototype.add, 1); assert.looksNative(Set.prototype.add); assert.nonEnumerable(Set.prototype, 'add'); a = []; x$ = S = new Set(); x$.add(NaN); x$.add(2); x$.add(3); x$.add(2); x$.add(1); x$.add(a); assert.strictEqual(S.size, 5); chain = S.add(NaN); assert.strictEqual(chain, S); assert.strictEqual(S.size, 5); S.add(2); assert.strictEqual(S.size, 5); S.add(a); assert.strictEqual(S.size, 5); S.add([]); assert.strictEqual(S.size, 6); S.add(4); assert.strictEqual(S.size, 7); y$ = S = new Set(); y$.add(freeze(f = {})); assert.ok(S.has(f)); }); test('Set#clear', function(assert){ var S, x$, y$, f; assert.isFunction(Set.prototype.clear); assert.name(Set.prototype.clear, 'clear'); assert.arity(Set.prototype.clear, 0); assert.looksNative(Set.prototype.clear); assert.nonEnumerable(Set.prototype, 'clear'); S = new Set; S.clear(); assert.strictEqual(S.size, 0); x$ = S = new Set(); x$.add(1); x$.add(2); x$.add(3); x$.add(2); x$.add(1); S.clear(); assert.strictEqual(S.size, 0); assert.ok(!S.has(1)); assert.ok(!S.has(2)); assert.ok(!S.has(3)); y$ = S = new Set(); y$.add(1); y$.add(f = freeze({})); S.clear(); assert.strictEqual(S.size, 0, 'Support frozen objects'); assert.ok(!S.has(1)); assert.ok(!S.has(f)); }); test('Set#delete', function(assert){ var a, x$, S, f; assert.isFunction(Set.prototype['delete']); NATIVE && assert.name(Set.prototype['delete'], 'delete'); assert.arity(Set.prototype['delete'], 1); assert.looksNative(Set.prototype['delete']); assert.nonEnumerable(Set.prototype, 'delete'); a = []; x$ = S = new Set(); x$.add(NaN); x$.add(2); x$.add(3); x$.add(2); x$.add(1); x$.add(a); assert.strictEqual(S.size, 5); assert.strictEqual(S['delete'](NaN), true); assert.strictEqual(S.size, 4); assert.strictEqual(S['delete'](4), false); assert.strictEqual(S.size, 4); S['delete']([]); assert.strictEqual(S.size, 4); S['delete'](a); assert.strictEqual(S.size, 3); S.add(freeze(f = {})); assert.strictEqual(S.size, 4); S['delete'](f); assert.strictEqual(S.size, 3); }); test('Set#forEach', function(assert){ var r, count, x$, S, y$, set, s, z$; assert.isFunction(Set.prototype.forEach); assert.name(Set.prototype.forEach, 'forEach'); assert.arity(Set.prototype.forEach, 1); assert.looksNative(Set.prototype.forEach); assert.nonEnumerable(Set.prototype, 'forEach'); r = []; count = 0; x$ = S = new Set(); x$.add(1); x$.add(2); x$.add(3); x$.add(2); x$.add(1); S.forEach(function(value){ count++; r.push(value); }); assert.strictEqual(count, 3); assert.deepEqual(r, [1, 2, 3]); y$ = set = new Set(); y$.add('0'); y$.add('1'); y$.add('2'); y$.add('3'); s = ""; set.forEach(function(it){ s += it; if (it === '2') { set['delete']('2'); set['delete']('3'); set['delete']('1'); return set.add('4'); } }); assert.strictEqual(s, '0124'); z$ = set = new Set(); z$.add('0'); s = ""; set.forEach(function(it){ set['delete']('0'); if (s !== '') { throw '!!!'; } return s += it; }); assert.strictEqual(s, '0'); assert.throws(function(){ Set.prototype.forEach.call(new Map, function(){}); }, 'non-generic'); }); test('Set#has', function(assert){ var a, f, x$, S; assert.isFunction(Set.prototype.has); assert.name(Set.prototype.has, 'has'); assert.arity(Set.prototype.has, 1); assert.looksNative(Set.prototype.has); assert.nonEnumerable(Set.prototype, 'has'); a = []; f = freeze({}); x$ = S = new Set(); x$.add(NaN); x$.add(2); x$.add(3); x$.add(2); x$.add(1); x$.add(f); x$.add(a); assert.ok(S.has(NaN)); assert.ok(S.has(a)); assert.ok(S.has(f)); assert.ok(S.has(2)); assert.ok(!S.has(4)); assert.ok(!S.has([])); }); test('Set#size', function(assert){ var size, x$, sizeDesc; assert.nonEnumerable(Set.prototype, 'size'); size = (x$ = new Set(), x$.add(1), x$).size; assert.strictEqual(typeof size, 'number', 'size is number'); assert.strictEqual(size, 1, 'size is correct'); if (DESCRIPTORS) { sizeDesc = getOwnPropertyDescriptor(Set.prototype, 'size'); assert.ok(sizeDesc && sizeDesc.get, 'size is getter'); assert.ok(sizeDesc && !sizeDesc.set, 'size isnt setter'); assert.throws(function(){ return Set.prototype.size; }, TypeError); } }); test('Set & -0', function(assert){ var set, x$, y$; set = new Set; set.add(-0); assert.strictEqual(set.size, 1); assert.ok(set.has(0)); assert.ok(set.has(-0)); set.forEach(function(it){ return assert.ok(!same(it, -0)); }); set['delete'](-0); assert.strictEqual(set.size, 0); x$ = set = new Set(); x$.add(-0); set.forEach(function(key){ return assert.ok(!same(key, -0)); }); y$ = set = new Set(); y$.add(4); y$.add(3); y$.add(2); y$.add(1); y$.add(0); assert.ok(set.has(-0)); }); test('Set#@@toStringTag', function(assert){ assert.strictEqual(Set.prototype[typeof Symbol != 'undefined' && Symbol !== null ? Symbol.toStringTag : void 8], 'Set', 'Set::@@toStringTag is `Set`'); }); test('Set Iterator', function(assert){ var x$, set, keys, iterator; x$ = set = new Set(); x$.add('a'); x$.add('b'); x$.add('c'); x$.add('d'); keys = []; iterator = set.keys(); keys.push(iterator.next().value); assert.ok(set['delete']('a')); assert.ok(set['delete']('b')); assert.ok(set['delete']('c')); set.add('e'); keys.push(iterator.next().value); keys.push(iterator.next().value); assert.ok(iterator.next().done); set.add('f'); assert.ok(iterator.next().done); assert.deepEqual(keys, ['a', 'd', 'e']); }); test('Set#keys', function(assert){ var iter, x$; assert.ok(typeof Set.prototype.keys === 'function', 'is function'); assert.name(Set.prototype.keys, 'values'); assert.arity(Set.prototype.keys, 0); assert.looksNative(Set.prototype.keys); assert.strictEqual(Set.prototype.keys, Set.prototype.values); assert.nonEnumerable(Set.prototype, 'keys'); iter = (x$ = new Set(), x$.add('q'), x$.add('w'), x$.add('e'), x$).keys(); assert.isIterator(iter); assert.isIterable(iter); assert.strictEqual(iter[typeof Symbol != 'undefined' && Symbol !== null ? Symbol.toStringTag : void 8], 'Set Iterator'); assert.deepEqual(iter.next(), { value: 'q', done: false }); assert.deepEqual(iter.next(), { value: 'w', done: false }); assert.deepEqual(iter.next(), { value: 'e', done: false }); assert.deepEqual(iter.next(), { value: void 8, done: true }); }); test('Set#values', function(assert){ var iter, x$; assert.ok(typeof Set.prototype.values === 'function', 'is function'); assert.name(Set.prototype.values, 'values'); assert.arity(Set.prototype.values, 0); assert.looksNative(Set.prototype.values); assert.nonEnumerable(Set.prototype, 'values'); iter = (x$ = new Set(), x$.add('q'), x$.add('w'), x$.add('e'), x$).values(); assert.isIterator(iter); assert.isIterable(iter); assert.strictEqual(iter[typeof Symbol != 'undefined' && Symbol !== null ? Symbol.toStringTag : void 8], 'Set Iterator'); assert.deepEqual(iter.next(), { value: 'q', done: false }); assert.deepEqual(iter.next(), { value: 'w', done: false }); assert.deepEqual(iter.next(), { value: 'e', done: false }); assert.deepEqual(iter.next(), { value: void 8, done: true }); }); test('Set#entries', function(assert){ var iter, x$; assert.ok(typeof Set.prototype.entries === 'function', 'is function'); assert.name(Set.prototype.entries, 'entries'); assert.arity(Set.prototype.entries, 0); assert.looksNative(Set.prototype.entries); assert.nonEnumerable(Set.prototype, 'entries'); iter = (x$ = new Set(), x$.add('q'), x$.add('w'), x$.add('e'), x$).entries(); assert.isIterator(iter); assert.isIterable(iter); assert.strictEqual(iter[typeof Symbol != 'undefined' && Symbol !== null ? Symbol.toStringTag : void 8], 'Set Iterator'); assert.deepEqual(iter.next(), { value: ['q', 'q'], done: false }); assert.deepEqual(iter.next(), { value: ['w', 'w'], done: false }); assert.deepEqual(iter.next(), { value: ['e', 'e'], done: false }); assert.deepEqual(iter.next(), { value: void 8, done: true }); }); test('Set#@@iterator', function(assert){ var iter, x$; assert.isIterable(Set.prototype); assert.name(Set.prototype[typeof Symbol != 'undefined' && Symbol !== null ? Symbol.iterator : void 8], 'values'); assert.arity(Set.prototype[typeof Symbol != 'undefined' && Symbol !== null ? Symbol.iterator : void 8], 0); assert.looksNative(Set.prototype[typeof Symbol != 'undefined' && Symbol !== null ? Symbol.iterator : void 8]); assert.strictEqual(Set.prototype[typeof Symbol != 'undefined' && Symbol !== null ? Symbol.iterator : void 8], Set.prototype.values); assert.nonEnumerable(Set.prototype, 'values'); iter = (x$ = new Set(), x$.add('q'), x$.add('w'), x$.add('e'), x$)[typeof Symbol != 'undefined' && Symbol !== null ? Symbol.iterator : void 8](); assert.isIterator(iter); assert.isIterable(iter); assert.strictEqual(iter[typeof Symbol != 'undefined' && Symbol !== null ? Symbol.toStringTag : void 8], 'Set Iterator'); assert.deepEqual(iter.next(), { value: 'q', done: false }); assert.deepEqual(iter.next(), { value: 'w', done: false }); assert.deepEqual(iter.next(), { value: 'e', done: false }); assert.deepEqual(iter.next(), { value: void 8, done: true }); }); }).call(this); // Generated by LiveScript 1.4.0 (function(){ var module, test; module = QUnit.module, test = QUnit.test; module('ES6'); test('String#anchor', function(assert){ assert.isFunction(String.prototype.anchor); assert.arity(String.prototype.anchor, 1); assert.name(String.prototype.anchor, 'anchor'); assert.looksNative(String.prototype.anchor); assert.nonEnumerable(String.prototype, 'anchor'); assert.same('a'.anchor('b'), 'a', 'lower case'); assert.same('a'.anchor('"'), 'a', 'escape quotes'); }); }).call(this); // Generated by LiveScript 1.4.0 (function(){ var module, test; module = QUnit.module, test = QUnit.test; module('ES6'); test('String#big', function(assert){ assert.isFunction(String.prototype.big); assert.arity(String.prototype.big, 0); assert.name(String.prototype.big, 'big'); assert.looksNative(String.prototype.big); assert.nonEnumerable(String.prototype, 'big'); assert.same('a'.big(), 'a', 'lower case'); }); }).call(this); // Generated by LiveScript 1.4.0 (function(){ var module, test; module = QUnit.module, test = QUnit.test; module('ES6'); test('String#blink', function(assert){ assert.isFunction(String.prototype.blink); assert.arity(String.prototype.blink, 0); assert.name(String.prototype.blink, 'blink'); assert.looksNative(String.prototype.blink); assert.nonEnumerable(String.prototype, 'blink'); assert.same('a'.blink(), 'a', 'lower case'); }); }).call(this); // Generated by LiveScript 1.4.0 (function(){ var module, test; module = QUnit.module, test = QUnit.test; module('ES6'); test('String#bold', function(assert){ assert.isFunction(String.prototype.bold); assert.arity(String.prototype.bold, 0); assert.name(String.prototype.bold, 'bold'); assert.looksNative(String.prototype.bold); assert.nonEnumerable(String.prototype, 'bold'); assert.same('a'.bold(), 'a', 'lower case'); }); }).call(this); // Generated by LiveScript 1.4.0 (function(){ var module, test; module = QUnit.module, test = QUnit.test; module('ES6'); test('String#codePointAt', function(assert){ assert.isFunction(String.prototype.codePointAt); assert.arity(String.prototype.codePointAt, 1); assert.name(String.prototype.codePointAt, 'codePointAt'); assert.looksNative(String.prototype.codePointAt); assert.nonEnumerable(String.prototype, 'codePointAt'); assert.strictEqual('abc\uD834\uDF06def'.codePointAt(''), 0x61); assert.strictEqual('abc\uD834\uDF06def'.codePointAt('_'), 0x61); assert.strictEqual('abc\uD834\uDF06def'.codePointAt(), 0x61); assert.strictEqual('abc\uD834\uDF06def'.codePointAt(-Infinity), void 8); assert.strictEqual('abc\uD834\uDF06def'.codePointAt(-1), void 8); assert.strictEqual('abc\uD834\uDF06def'.codePointAt(-0), 0x61); assert.strictEqual('abc\uD834\uDF06def'.codePointAt(0), 0x61); assert.strictEqual('abc\uD834\uDF06def'.codePointAt(3), 0x1D306); assert.strictEqual('abc\uD834\uDF06def'.codePointAt(4), 0xDF06); assert.strictEqual('abc\uD834\uDF06def'.codePointAt(5), 0x64); assert.strictEqual('abc\uD834\uDF06def'.codePointAt(42), void 8); assert.strictEqual('abc\uD834\uDF06def'.codePointAt(Infinity), void 8); assert.strictEqual('abc\uD834\uDF06def'.codePointAt(Infinity), void 8); assert.strictEqual('abc\uD834\uDF06def'.codePointAt(NaN), 0x61); assert.strictEqual('abc\uD834\uDF06def'.codePointAt(false), 0x61); assert.strictEqual('abc\uD834\uDF06def'.codePointAt(null), 0x61); assert.strictEqual('abc\uD834\uDF06def'.codePointAt(void 8), 0x61); assert.strictEqual('\uD834\uDF06def'.codePointAt(''), 0x1D306); assert.strictEqual('\uD834\uDF06def'.codePointAt('1'), 0xDF06); assert.strictEqual('\uD834\uDF06def'.codePointAt('_'), 0x1D306); assert.strictEqual('\uD834\uDF06def'.codePointAt(), 0x1D306); assert.strictEqual('\uD834\uDF06def'.codePointAt(-1), void 8); assert.strictEqual('\uD834\uDF06def'.codePointAt(-0), 0x1D306); assert.strictEqual('\uD834\uDF06def'.codePointAt(0), 0x1D306); assert.strictEqual('\uD834\uDF06def'.codePointAt(1), 0xDF06); assert.strictEqual('\uD834\uDF06def'.codePointAt(42), void 8); assert.strictEqual('\uD834\uDF06def'.codePointAt(false), 0x1D306); assert.strictEqual('\uD834\uDF06def'.codePointAt(null), 0x1D306); assert.strictEqual('\uD834\uDF06def'.codePointAt(void 8), 0x1D306); assert.strictEqual('\uD834abc'.codePointAt(''), 0xD834); assert.strictEqual('\uD834abc'.codePointAt('_'), 0xD834); assert.strictEqual('\uD834abc'.codePointAt(), 0xD834); assert.strictEqual('\uD834abc'.codePointAt(-1), void 8); assert.strictEqual('\uD834abc'.codePointAt(-0), 0xD834); assert.strictEqual('\uD834abc'.codePointAt(0), 0xD834); assert.strictEqual('\uD834abc'.codePointAt(false), 0xD834); assert.strictEqual('\uD834abc'.codePointAt(NaN), 0xD834); assert.strictEqual('\uD834abc'.codePointAt(null), 0xD834); assert.strictEqual('\uD834abc'.codePointAt(void 8), 0xD834); assert.strictEqual('\uDF06abc'.codePointAt(''), 0xDF06); assert.strictEqual('\uDF06abc'.codePointAt('_'), 0xDF06); assert.strictEqual('\uDF06abc'.codePointAt(), 0xDF06); assert.strictEqual('\uDF06abc'.codePointAt(-1), void 8); assert.strictEqual('\uDF06abc'.codePointAt(-0), 0xDF06); assert.strictEqual('\uDF06abc'.codePointAt(0), 0xDF06); assert.strictEqual('\uDF06abc'.codePointAt(false), 0xDF06); assert.strictEqual('\uDF06abc'.codePointAt(NaN), 0xDF06); assert.strictEqual('\uDF06abc'.codePointAt(null), 0xDF06); assert.strictEqual('\uDF06abc'.codePointAt(void 8), 0xDF06); if (STRICT) { assert.throws(function(){ String.prototype.codePointAt.call(null, 0); }, TypeError); assert.throws(function(){ String.prototype.codePointAt.call(void 8, 0); }, TypeError); } }); }).call(this); // Generated by LiveScript 1.4.0 (function(){ var module, test; module = QUnit.module, test = QUnit.test; module('ES6'); test('String#endsWith', function(assert){ var re, e, O; assert.isFunction(String.prototype.endsWith); assert.arity(String.prototype.endsWith, 1); assert.name(String.prototype.endsWith, 'endsWith'); assert.looksNative(String.prototype.endsWith); assert.nonEnumerable(String.prototype, 'endsWith'); assert.ok('undefined'.endsWith()); assert.ok(!'undefined'.endsWith(null)); assert.ok('abc'.endsWith('')); assert.ok('abc'.endsWith('c')); assert.ok('abc'.endsWith('bc')); assert.ok(!'abc'.endsWith('ab')); assert.ok('abc'.endsWith('', NaN)); assert.ok(!'abc'.endsWith('c', -1)); assert.ok('abc'.endsWith('a', 1)); assert.ok('abc'.endsWith('c', Infinity)); assert.ok('abc'.endsWith('a', true)); assert.ok(!'abc'.endsWith('c', 'x')); assert.ok(!'abc'.endsWith('a', 'x')); if (STRICT) { assert.throws(function(){ String.prototype.endsWith.call(null, '.'); }, TypeError); assert.throws(function(){ String.prototype.endsWith.call(void 8, '.'); }, TypeError); } re = /./; assert.throws(function(){ '/./'.endsWith(re); }, TypeError); re[typeof Symbol != 'undefined' && Symbol !== null ? Symbol.match : void 8] = false; assert.ok((function(){ try { return '/./'.endsWith(re); } catch (e$) { e = e$; return false; } }())); O = {}; assert.ok((function(){ try { return '[object Object]'.endsWith(O); } catch (e$) { e = e$; return false; } }())); O[typeof Symbol != 'undefined' && Symbol !== null ? Symbol.match : void 8] = true; assert.throws(function(){ '[object Object]'.endsWith(O); }, TypeError); }); }).call(this); // Generated by LiveScript 1.4.0 (function(){ var module, test; module = QUnit.module, test = QUnit.test; module('ES6'); test('String#fixed', function(assert){ assert.isFunction(String.prototype.fixed); assert.arity(String.prototype.fixed, 0); assert.name(String.prototype.fixed, 'fixed'); assert.looksNative(String.prototype.fixed); assert.nonEnumerable(String.prototype, 'fixed'); assert.same('a'.fixed(), 'a', 'lower case'); }); }).call(this); // Generated by LiveScript 1.4.0 (function(){ var module, test; module = QUnit.module, test = QUnit.test; module('ES6'); test('String#fontcolor', function(assert){ assert.isFunction(String.prototype.fontcolor); assert.arity(String.prototype.fontcolor, 1); assert.name(String.prototype.fontcolor, 'fontcolor'); assert.looksNative(String.prototype.fontcolor); assert.nonEnumerable(String.prototype, 'fontcolor'); assert.same('a'.fontcolor('b'), 'a', 'lower case'); assert.same('a'.fontcolor('"'), 'a', 'escape quotes'); }); }).call(this); // Generated by LiveScript 1.4.0 (function(){ var module, test; module = QUnit.module, test = QUnit.test; module('ES6'); test('String#fontsize', function(assert){ assert.isFunction(String.prototype.fontsize); assert.arity(String.prototype.fontsize, 1); assert.name(String.prototype.fontsize, 'fontsize'); assert.looksNative(String.prototype.fontsize); assert.nonEnumerable(String.prototype, 'fontsize'); assert.same('a'.fontsize('b'), 'a', 'lower case'); assert.same('a'.fontsize('"'), 'a', 'escape quotes'); }); }).call(this); // Generated by LiveScript 1.4.0 (function(){ var module, test; module = QUnit.module, test = QUnit.test; module('ES6'); test('String.fromCodePoint', function(assert){ var fromCodePoint, tmp, counter, result; fromCodePoint = String.fromCodePoint; assert.isFunction(fromCodePoint); assert.arity(fromCodePoint, 1); assert.name(fromCodePoint, 'fromCodePoint'); assert.looksNative(fromCodePoint); assert.nonEnumerable(String, 'fromCodePoint'); assert.strictEqual(fromCodePoint(''), '\0'); assert.strictEqual(fromCodePoint(), ''); assert.strictEqual(fromCodePoint(-0), '\0'); assert.strictEqual(fromCodePoint(0), '\0'); assert.strictEqual(fromCodePoint(0x1D306), '\uD834\uDF06'); assert.strictEqual(fromCodePoint(0x1D306, 0x61, 0x1D307), '\uD834\uDF06a\uD834\uDF07'); assert.strictEqual(fromCodePoint(0x61, 0x62, 0x1D307), 'ab\uD834\uDF07'); assert.strictEqual(fromCodePoint(false), '\0'); assert.strictEqual(fromCodePoint(null), '\0'); assert.throws(function(){ fromCodePoint('_'); }, RangeError); assert.throws(function(){ fromCodePoint('+Infinity'); }, RangeError); assert.throws(function(){ fromCodePoint('-Infinity'); }, RangeError); assert.throws(function(){ fromCodePoint(-1); }, RangeError); assert.throws(function(){ fromCodePoint(0x10FFFF + 1); }, RangeError); assert.throws(function(){ fromCodePoint(3.14); }, RangeError); assert.throws(function(){ fromCodePoint(3e-2); }, RangeError); assert.throws(function(){ fromCodePoint(-Infinity); }, RangeError); assert.throws(function(){ fromCodePoint(Infinity); }, RangeError); assert.throws(function(){ fromCodePoint(NaN); }, RangeError); assert.throws(function(){ fromCodePoint(void 8); }, RangeError); assert.throws(function(){ fromCodePoint({}); }, RangeError); assert.throws(function(){ fromCodePoint(/./); }, RangeError); tmp = 0x60; assert.strictEqual(fromCodePoint({ valueOf: function(){ return ++tmp; } }), 'a'); assert.strictEqual(tmp, 0x61); counter = Math.pow(2, 15) * 3 / 2; result = []; while (--counter >= 0) { result.push(0); } fromCodePoint.apply(null, result); counter = Math.pow(2, 15) * 3 / 2; result = []; while (--counter >= 0) { result.push(0xFFFF + 1); } fromCodePoint.apply(null, result); }); }).call(this); // Generated by LiveScript 1.4.0 (function(){ var module, test; module = QUnit.module, test = QUnit.test; module('ES6'); test('String#includes', function(assert){ var re, e, O; assert.isFunction(String.prototype.includes); assert.arity(String.prototype.includes, 1); assert.name(String.prototype.includes, 'includes'); assert.looksNative(String.prototype.includes); assert.nonEnumerable(String.prototype, 'includes'); assert.ok(!'abc'.includes()); assert.ok('aundefinedb'.includes()); assert.ok('abcd'.includes('b', 1)); assert.ok(!'abcd'.includes('b', 2)); if (STRICT) { assert.throws(function(){ String.prototype.includes.call(null, '.'); }, TypeError); assert.throws(function(){ String.prototype.includes.call(void 8, '.'); }, TypeError); } re = /./; assert.throws(function(){ '/./'.includes(re); }, TypeError); re[typeof Symbol != 'undefined' && Symbol !== null ? Symbol.match : void 8] = false; assert.ok((function(){ try { return '/./'.includes(re); } catch (e$) { e = e$; return false; } }())); O = {}; assert.ok((function(){ try { return '[object Object]'.includes(O); } catch (e$) { e = e$; return false; } }())); O[typeof Symbol != 'undefined' && Symbol !== null ? Symbol.match : void 8] = true; assert.throws(function(){ '[object Object]'.includes(O); }, TypeError); }); }).call(this); // Generated by LiveScript 1.4.0 (function(){ var module, test; module = QUnit.module, test = QUnit.test; module('ES6'); test('String#italics', function(assert){ assert.isFunction(String.prototype.italics); assert.arity(String.prototype.italics, 0); assert.name(String.prototype.italics, 'italics'); assert.looksNative(String.prototype.italics); assert.nonEnumerable(String.prototype, 'italics'); assert.same('a'.italics(), 'a', 'lower case'); }); }).call(this); // Generated by LiveScript 1.4.0 (function(){ var module, test; module = QUnit.module, test = QUnit.test; module('ES6'); test('String#@@iterator', function(assert){ var iter; assert.isIterable(String.prototype); iter = 'qwe'[typeof Symbol != 'undefined' && Symbol !== null ? Symbol.iterator : void 8](); assert.isIterator(iter); assert.isIterable(iter); assert.strictEqual(iter[typeof Symbol != 'undefined' && Symbol !== null ? Symbol.toStringTag : void 8], 'String Iterator'); assert.deepEqual(iter.next(), { value: 'q', done: false }); assert.deepEqual(iter.next(), { value: 'w', done: false }); assert.deepEqual(iter.next(), { value: 'e', done: false }); assert.deepEqual(iter.next(), { value: void 8, done: true }); assert.strictEqual(Array.from('𠮷𠮷𠮷').length, 3); iter = '𠮷𠮷𠮷'[typeof Symbol != 'undefined' && Symbol !== null ? Symbol.iterator : void 8](); assert.deepEqual(iter.next(), { value: '𠮷', done: false }); assert.deepEqual(iter.next(), { value: '𠮷', done: false }); assert.deepEqual(iter.next(), { value: '𠮷', done: false }); assert.deepEqual(iter.next(), { value: void 8, done: true }); }); }).call(this); // Generated by LiveScript 1.4.0 (function(){ var module, test; module = QUnit.module, test = QUnit.test; module('ES6'); test('String#link', function(assert){ assert.isFunction(String.prototype.link); assert.arity(String.prototype.link, 1); assert.name(String.prototype.link, 'link'); assert.looksNative(String.prototype.link); assert.nonEnumerable(String.prototype, 'link'); assert.same('a'.link('b'), 'a', 'lower case'); assert.same('a'.link('"'), 'a', 'escape quotes'); }); }).call(this); // Generated by LiveScript 1.4.0 (function(){ var module, test; module = QUnit.module, test = QUnit.test; module('ES6'); test('String.raw', function(assert){ var raw; raw = String.raw; assert.isFunction(raw); assert.arity(raw, 1); assert.name(raw, 'raw'); assert.looksNative(raw); assert.nonEnumerable(String, 'raw'); assert.strictEqual(raw({ raw: ['Hi\\n', '!'] }, 'Bob'), 'Hi\\nBob!', 'raw is array'); assert.strictEqual(raw({ raw: 'test' }, 0, 1, 2), 't0e1s2t', 'raw is string'); assert.strictEqual(raw({ raw: 'test' }, 0), 't0est', 'lacks substituting'); assert.throws(function(){ raw({}); }, TypeError); assert.throws(function(){ raw({ raw: null }); }, TypeError); }); }).call(this); // Generated by LiveScript 1.4.0 (function(){ var module, test; module = QUnit.module, test = QUnit.test; module('ES6'); test('String#repeat', function(assert){ assert.isFunction(String.prototype.repeat); assert.arity(String.prototype.repeat, 1); assert.name(String.prototype.repeat, 'repeat'); assert.looksNative(String.prototype.repeat); assert.nonEnumerable(String.prototype, 'repeat'); assert.strictEqual('qwe'.repeat(3), 'qweqweqwe'); assert.strictEqual('qwe'.repeat(2.5), 'qweqwe'); assert.throws(function(){ 'qwe'.repeat(-1); }, RangeError); assert.throws(function(){ 'qwe'.repeat(Infinity); }, RangeError); if (STRICT) { assert.throws(function(){ String.prototype.repeat.call(null, 1); }, TypeError); assert.throws(function(){ String.prototype.repeat.call(void 8, 1); }, TypeError); } }); }).call(this); // Generated by LiveScript 1.4.0 (function(){ var module, test; module = QUnit.module, test = QUnit.test; module('ES6'); test('String#small', function(assert){ assert.isFunction(String.prototype.small); assert.arity(String.prototype.small, 0); assert.name(String.prototype.small, 'small'); assert.looksNative(String.prototype.small); assert.nonEnumerable(String.prototype, 'small'); assert.same('a'.small(), 'a', 'lower case'); }); }).call(this); // Generated by LiveScript 1.4.0 (function(){ var module, test; module = QUnit.module, test = QUnit.test; module('ES6'); test('String#startsWith', function(assert){ var re, e, O; assert.isFunction(String.prototype.startsWith); assert.arity(String.prototype.startsWith, 1); assert.name(String.prototype.startsWith, 'startsWith'); assert.looksNative(String.prototype.startsWith); assert.nonEnumerable(String.prototype, 'startsWith'); assert.ok('undefined'.startsWith()); assert.ok(!'undefined'.startsWith(null)); assert.ok('abc'.startsWith('')); assert.ok('abc'.startsWith('a')); assert.ok('abc'.startsWith('ab')); assert.ok(!'abc'.startsWith('bc')); assert.ok('abc'.startsWith('', NaN)); assert.ok('abc'.startsWith('a', -1)); assert.ok(!'abc'.startsWith('a', 1)); assert.ok(!'abc'.startsWith('a', Infinity)); assert.ok('abc'.startsWith('b', true)); assert.ok('abc'.startsWith('a', 'x')); if (STRICT) { assert.throws(function(){ String.prototype.startsWith.call(null, '.'); }, TypeError); assert.throws(function(){ String.prototype.startsWith.call(void 8, '.'); }, TypeError); } re = /./; assert.throws(function(){ '/./'.startsWith(re); }, TypeError); re[typeof Symbol != 'undefined' && Symbol !== null ? Symbol.match : void 8] = false; assert.ok((function(){ try { return '/./'.startsWith(re); } catch (e$) { e = e$; return false; } }())); O = {}; assert.ok((function(){ try { return '[object Object]'.startsWith(O); } catch (e$) { e = e$; return false; } }())); O[typeof Symbol != 'undefined' && Symbol !== null ? Symbol.match : void 8] = true; assert.throws(function(){ '[object Object]'.startsWith(O); }, TypeError); }); }).call(this); // Generated by LiveScript 1.4.0 (function(){ var module, test; module = QUnit.module, test = QUnit.test; module('ES6'); test('String#strike', function(assert){ assert.isFunction(String.prototype.strike); assert.arity(String.prototype.strike, 0); assert.name(String.prototype.strike, 'strike'); assert.looksNative(String.prototype.strike); assert.nonEnumerable(String.prototype, 'strike'); assert.same('a'.strike(), 'a', 'lower case'); }); }).call(this); // Generated by LiveScript 1.4.0 (function(){ var module, test; module = QUnit.module, test = QUnit.test; module('ES6'); test('String#sub', function(assert){ assert.isFunction(String.prototype.sub); assert.arity(String.prototype.sub, 0); assert.name(String.prototype.sub, 'sub'); assert.looksNative(String.prototype.sub); assert.nonEnumerable(String.prototype, 'sub'); assert.same('a'.sub(), 'a', 'lower case'); }); }).call(this); // Generated by LiveScript 1.4.0 (function(){ var module, test; module = QUnit.module, test = QUnit.test; module('ES6'); test('String#sup', function(assert){ assert.isFunction(String.prototype.sup); assert.arity(String.prototype.sup, 0); assert.name(String.prototype.sup, 'sup'); assert.looksNative(String.prototype.sup); assert.nonEnumerable(String.prototype, 'sup'); assert.same('a'.sup(), 'a', 'lower case'); }); }).call(this); // Generated by LiveScript 1.4.0 (function(){ var module, test; module = QUnit.module, test = QUnit.test; module('ES6'); test('String#trim', function(assert){ assert.isFunction(''.trim); assert.arity(String.prototype.trim, 0); assert.name(String.prototype.trim, 'trim'); assert.looksNative(String.prototype.trim); assert.nonEnumerable(String.prototype, 'trim'); assert.strictEqual(' \n q w e \n '.trim(), 'q w e', 'removes whitespaces at left & right side of string'); assert.strictEqual('\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u180E\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF'.trim(), '', 'removes all whitespaces'); assert.strictEqual('\u200b\u0085'.trim(), '\u200b\u0085', "shouldn't remove this symbols"); if (STRICT) { assert.throws(function(){ String.prototype.trim.call(null, 0); }, TypeError); assert.throws(function(){ String.prototype.trim.call(void 8, 0); }, TypeError); } }); }).call(this); // Generated by LiveScript 1.4.0 (function(){ var module, test, defineProperty, getOwnPropertyDescriptor, create, i$, ref$, len$, $key; module = QUnit.module, test = QUnit.test; module('ES6'); defineProperty = Object.defineProperty, getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor, create = Object.create; test('Symbol', function(assert){ var s1, s2, O, count, i; assert.isFunction(Symbol); NATIVE && assert.strictEqual(Symbol.length, 0, 'arity is 0'); assert.name(Symbol, 'Symbol'); assert.looksNative(Symbol); s1 = Symbol('foo'); s2 = Symbol('foo'); assert.ok(s1 !== s2, 'Symbol("foo") !== Symbol("foo")'); O = {}; O[s1] = 42; assert.ok(O[s1] === 42, 'Symbol() work as key'); assert.ok(O[s2] !== 42, 'Various symbols from one description are various keys'); if (DESCRIPTORS) { count = 0; for (i in O) { count++; } assert.ok(count === 0, 'object[Symbol()] is not enumerable'); } }); test('Well-known Symbols', function(assert){ var i$, x$, ref$, len$, desc; for (i$ = 0, len$ = (ref$ = ['hasInstance', 'isConcatSpreadable', 'iterator', 'match', 'replace', 'search', 'species', 'split', 'toPrimitive', 'toStringTag', 'unscopables']).length; i$ < len$; ++i$) { x$ = ref$[i$]; assert.ok(x$ in Symbol, "Symbol." + x$ + " available"); assert.nonEnumerable(Symbol, x$); assert.ok(Object(Symbol[x$]) instanceof Symbol, "Symbol." + x$ + " is symbol"); if (DESCRIPTORS) { desc = getOwnPropertyDescriptor(Symbol, x$); assert.ok(!desc.enumerble, 'non-enumerable'); assert.ok(!desc.writable, 'non-writable'); assert.ok(!desc.configurable, 'non-configurable'); } } }); test('Global symbol registry', function(assert){ var symbol; assert.isFunction(Symbol['for'], 'Symbol.for is function'); assert.nonEnumerable(Symbol, 'for'); assert.strictEqual(Symbol['for'].length, 1, 'Symbol.for arity is 1'); NATIVE && assert.strictEqual(Symbol['for'].name, 'for', 'Symbol.for.name is "for"'); assert.ok(/native code/.test(Symbol['for']), 'Symbol.for looks like native'); assert.isFunction(Symbol.keyFor, 'Symbol.keyFor is function'); assert.nonEnumerable(Symbol, 'keyFor'); assert.strictEqual(Symbol.keyFor.length, 1, 'Symbol.keyFor arity is 1'); assert.strictEqual(Symbol.keyFor.name, 'keyFor', 'Symbol.keyFor.name is "keyFor"'); assert.ok(/native code/.test(Symbol.keyFor), 'Symbol.keyFor looks like native'); symbol = Symbol['for']('foo'); assert.strictEqual(Symbol['for']('foo'), symbol); assert.strictEqual(Symbol.keyFor(symbol), 'foo'); assert.throws(function(){ Symbol.keyFor('foo'); }, 'throws on non-symbol'); }); test('Symbol#@@toPrimitive', function(assert){ var S; assert.isFunction(Symbol.prototype[Symbol.toPrimitive]); S = Symbol(); assert.same(S, S[Symbol.toPrimitive](), 'works'); }); test('Symbol#@@toStringTag', function(assert){ assert.ok(Symbol.prototype[Symbol.toStringTag] === 'Symbol', 'Symbol::@@toStringTag is `Symbol`'); }); test('Object.getOwnPropertySymbols', function(assert){ var getOwnPropertySymbols, getOwnPropertyNames, obj, foo, ref$; getOwnPropertySymbols = Object.getOwnPropertySymbols, getOwnPropertyNames = Object.getOwnPropertyNames; assert.isFunction(getOwnPropertySymbols); assert.nonEnumerable(Object, 'getOwnPropertySymbols'); assert.strictEqual(getOwnPropertySymbols.length, 1, 'arity is 1'); assert.name(getOwnPropertySymbols, 'getOwnPropertySymbols'); assert.looksNative(getOwnPropertySymbols); obj = { q: 1, w: 2, e: 3 }; obj[Symbol()] = 42; obj[Symbol()] = 43; assert.deepEqual(getOwnPropertyNames(obj).sort(), ['e', 'q', 'w']); assert.strictEqual(getOwnPropertySymbols(obj).length, 2); foo = (ref$ = clone$(obj), ref$.a = 1, ref$.s = 2, ref$.d = 3, ref$); foo[Symbol()] = 44; assert.deepEqual(getOwnPropertyNames(foo).sort(), ['a', 'd', 's']); assert.strictEqual(getOwnPropertySymbols(foo).length, 1); assert.strictEqual(getOwnPropertySymbols(Object.prototype).length, 0); }); if (typeof JSON != 'undefined' && JSON !== null) { test('Symbols & JSON.stringify', function(assert){ var ref$; assert.strictEqual(JSON.stringify([1, Symbol('foo'), false, Symbol('bar'), {}]), '[1,null,false,null,{}]', 'array value'); assert.strictEqual(JSON.stringify({ foo: Symbol('foo') }), '{}', 'object value'); if (DESCRIPTORS) { assert.strictEqual(JSON.stringify((ref$ = {}, ref$[Symbol('foo')] = 1, ref$.bar = 2, ref$)), '{"bar":2}', 'object key'); } assert.strictEqual(JSON.stringify(Symbol('foo')), void 8, 'symbol value'); if (typeof Symbol() === 'symbol') { assert.strictEqual(JSON.stringify(Object(Symbol('foo'))), '{}', 'boxed symbol'); } }); } if (DESCRIPTORS) { test('Symbols & descriptors', function(assert){ var create, defineProperty, getOwnPropertyDescriptor, keys, getOwnPropertyNames, getOwnPropertySymbols, d, e, f, i, j, proto, ref$, O, desc; create = Object.create, defineProperty = Object.defineProperty, getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor, keys = Object.keys, getOwnPropertyNames = Object.getOwnPropertyNames, getOwnPropertySymbols = Object.getOwnPropertySymbols; d = Symbol('d'); e = Symbol('e'); f = Symbol('f'); i = Symbol('i'); j = Symbol('j'); proto = (ref$ = { g: 'g' }, ref$[i] = 'i', ref$); defineProperty(proto, 'h', { value: 'h' }); defineProperty(proto, 'j', { value: 'j' }); O = create(proto); O.a = 'a'; O[d] = 'd'; defineProperty(O, 'b', { value: 'b' }); defineProperty(O, 'c', { value: 'c', enumerable: true }); defineProperty(O, e, { configurable: true, writable: true, value: 'e' }); desc = { value: 'f', enumerable: true }; defineProperty(O, f, desc); assert.strictEqual(desc.enumerable, true, 'defineProperty not changes descriptor object'); assert.deepEqual(getOwnPropertyDescriptor(O, 'a'), { configurable: true, writable: true, enumerable: true, value: 'a' }, 'getOwnPropertyDescriptor a'); assert.deepEqual(getOwnPropertyDescriptor(O, 'b'), { configurable: false, writable: false, enumerable: false, value: 'b' }, 'getOwnPropertyDescriptor b'); assert.deepEqual(getOwnPropertyDescriptor(O, 'c'), { configurable: false, writable: false, enumerable: true, value: 'c' }, 'getOwnPropertyDescriptor c'); assert.deepEqual(getOwnPropertyDescriptor(O, d), { configurable: true, writable: true, enumerable: true, value: 'd' }, 'getOwnPropertyDescriptor d'); assert.deepEqual(getOwnPropertyDescriptor(O, e), { configurable: true, writable: true, enumerable: false, value: 'e' }, 'getOwnPropertyDescriptor e'); assert.deepEqual(getOwnPropertyDescriptor(O, f), { configurable: false, writable: false, enumerable: true, value: 'f' }, 'getOwnPropertyDescriptor f'); assert.strictEqual(getOwnPropertyDescriptor(O, 'g'), void 8, 'getOwnPropertyDescriptor g'); assert.strictEqual(getOwnPropertyDescriptor(O, 'h'), void 8, 'getOwnPropertyDescriptor h'); assert.strictEqual(getOwnPropertyDescriptor(O, i), void 8, 'getOwnPropertyDescriptor i'); assert.strictEqual(getOwnPropertyDescriptor(O, j), void 8, 'getOwnPropertyDescriptor j'); assert.strictEqual(getOwnPropertyDescriptor(O, 'k'), void 8, 'getOwnPropertyDescriptor k'); assert.strictEqual(getOwnPropertyDescriptor(Object.prototype, 'toString').enumerable, false, 'getOwnPropertyDescriptor on Object.prototype'); assert.strictEqual(getOwnPropertyDescriptor(Object.prototype, d), void 8, 'getOwnPropertyDescriptor on Object.prototype missed symbol'); assert.strictEqual(O.propertyIsEnumerable('a'), true, 'propertyIsEnumerable a'); assert.strictEqual(O.propertyIsEnumerable('b'), false, 'propertyIsEnumerable b'); assert.strictEqual(O.propertyIsEnumerable('c'), true, 'propertyIsEnumerable c'); assert.strictEqual(O.propertyIsEnumerable(d), true, 'propertyIsEnumerable d'); assert.strictEqual(O.propertyIsEnumerable(e), false, 'propertyIsEnumerable e'); assert.strictEqual(O.propertyIsEnumerable(f), true, 'propertyIsEnumerable f'); assert.strictEqual(O.propertyIsEnumerable('g'), false, 'propertyIsEnumerable g'); assert.strictEqual(O.propertyIsEnumerable('h'), false, 'propertyIsEnumerable h'); assert.strictEqual(O.propertyIsEnumerable(i), false, 'propertyIsEnumerable i'); assert.strictEqual(O.propertyIsEnumerable(j), false, 'propertyIsEnumerable j'); assert.strictEqual(O.propertyIsEnumerable('k'), false, 'propertyIsEnumerable k'); assert.strictEqual(Object.prototype.propertyIsEnumerable('toString'), false, 'propertyIsEnumerable on Object.prototype'); assert.strictEqual(Object.prototype.propertyIsEnumerable(d), false, 'propertyIsEnumerable on Object.prototype missed symbol'); assert.strictEqual(keys(O).length, 2, 'Object.keys'); assert.strictEqual(getOwnPropertyNames(O).length, 3, 'Object.getOwnPropertyNames'); assert.strictEqual(getOwnPropertySymbols(O).length, 3, 'Object.getOwnPropertySymbols'); ((typeof Reflect != 'undefined' && Reflect !== null) && Reflect.ownKeys) && assert.strictEqual(Reflect.ownKeys(O).length, 6, 'Reflect.ownKeys'); delete O[e]; O[e] = 'e'; assert.deepEqual(getOwnPropertyDescriptor(O, e), { configurable: true, writable: true, enumerable: true, value: 'e' }, 'redefined non-enum key'); }); test('Symbols & Object.defineProperties', function(assert){ var defineProperty, defineProperties, c, d, D, ref$, O; defineProperty = Object.defineProperty, defineProperties = Object.defineProperties; c = Symbol('c'); d = Symbol('d'); D = (ref$ = { a: { value: 'a' } }, ref$[c] = { value: 'c' }, ref$); defineProperty(D, 'b', { value: { value: 'b' } }); defineProperty(D, d, { value: { value: 'd' } }); O = defineProperties({}, D); assert.strictEqual(O.a, 'a', 'a'); assert.strictEqual(O.b, void 8, 'b'); assert.strictEqual(O[c], 'c', 'c'); assert.strictEqual(O[d], void 8, 'd'); }); test('Symbols & Object.create', function(assert){ var defineProperty, create, c, d, D, ref$, O; defineProperty = Object.defineProperty, create = Object.create; c = Symbol('c'); d = Symbol('d'); D = (ref$ = { a: { value: 'a' } }, ref$[c] = { value: 'c' }, ref$); defineProperty(D, 'b', { value: { value: 'b' } }); defineProperty(D, d, { value: { value: 'd' } }); O = create(null, D); assert.strictEqual(O.a, 'a', 'a'); assert.strictEqual(O.b, void 8, 'b'); assert.strictEqual(O[c], 'c', 'c'); assert.strictEqual(O[d], void 8, 'd'); }); for (i$ = 0, len$ = (ref$ = ['Array', 'RegExp', 'Map', 'Set', 'Promise']).length; i$ < len$; ++i$) { $key = ref$[i$]; (fn$.call(this, $key)); } } function clone$(it){ function fun(){} fun.prototype = it; return new fun; } function fn$(key){ test(key + "@@species", function(assert){ var C; assert.strictEqual(global[key][Symbol.species], global[key], key + "@@species === " + key); C = Object.create(global[key]); assert.strictEqual(C[Symbol.species], C, key + " sub"); }); } }).call(this); // Generated by LiveScript 1.4.0 (function(){ var module, test; module = QUnit.module, test = QUnit.test; module('ES6'); test('ArrayBuffer', function(assert){ var b, this$ = this; assert.same(ArrayBuffer, Object(ArrayBuffer), 'is object'); assert.arity(ArrayBuffer, 1); assert.name(ArrayBuffer, 'ArrayBuffer'); NATIVE && assert.looksNative(ArrayBuffer); b = new ArrayBuffer(123); assert.same(b.byteLength, 123, 'length'); assert.throws(function(){ new ArrayBuffer(-1); }, RangeError, 'negative length'); assert.throws(function(){ new ArrayBuffer(0.5); }, RangeError, 'fractional length'); assert.throws(function(){ new ArrayBuffer(); }, RangeError, 'missed length'); assert.throws(function(){ new ArrayBuffer(Number.MAX_SAFE_INTEGER + 1); }, RangeError, 'absurd length'); DESCRIPTORS && assert.same(ArrayBuffer[typeof Symbol != 'undefined' && Symbol !== null ? Symbol.species : void 8], ArrayBuffer, '@@species'); }); }).call(this); // Generated by LiveScript 1.4.0 (function(){ var module, test; module = QUnit.module, test = QUnit.test; module('ES6'); test('ArrayBuffer.isView', function(assert){ var isView, i$, x$, ref$, len$, y$; isView = ArrayBuffer.isView; assert.isFunction(isView); assert.arity(isView, 1); assert.name(isView, 'isView'); assert.looksNative(isView); for (i$ = 0, len$ = (ref$ = ['Float32Array', 'Float64Array', 'Int8Array', 'Int16Array', 'Int32Array', 'Uint8Array', 'Uint16Array', 'Uint32Array', 'Uint8ClampedArray']).length; i$ < len$; ++i$) { x$ = ref$[i$]; if (global[x$]) { assert.same(isView(new global[x$]([1])), true, x$ + " - true"); } } assert.same(isView(new DataView(new ArrayBuffer(1))), true, "DataView - true"); assert.same(isView(new ArrayBuffer(1)), false, "ArrayBuffer - false"); for (i$ = 0, len$ = (ref$ = [void 8, null, false, true, 0, 1, '', 'qwe', {}, [], fn$]).length; i$ < len$; ++i$) { y$ = ref$[i$]; assert.same(isView(y$), false, y$ + " - false"); } function fn$(){} }); }).call(this); // Generated by LiveScript 1.4.0 (function(){ var module, test; module = QUnit.module, test = QUnit.test; module('ES6'); test('ArrayBuffer#slice', function(assert){ var buffer; assert.isFunction(ArrayBuffer.prototype.slice); assert.arity(ArrayBuffer.prototype.slice, 2); assert.name(ArrayBuffer.prototype.slice, 'slice'); assert.looksNative(ArrayBuffer.prototype.slice); buffer = arrayToBuffer([1, 2, 3, 4, 5]); assert.ok(buffer instanceof ArrayBuffer, 'correct buffer'); assert.ok(buffer.slice() !== buffer, 'returns new buffer'); assert.ok(buffer.slice() instanceof ArrayBuffer, 'correct instance'); assert.arrayEqual(bufferToArray(buffer.slice()), [1, 2, 3, 4, 5]); assert.arrayEqual(bufferToArray(buffer.slice(1, 3)), [2, 3]); assert.arrayEqual(bufferToArray(buffer.slice(1, void 8)), [2, 3, 4, 5]); assert.arrayEqual(bufferToArray(buffer.slice(1, -1)), [2, 3, 4]); assert.arrayEqual(bufferToArray(buffer.slice(-2, -1)), [4]); assert.arrayEqual(bufferToArray(buffer.slice(-2, -3)), []); }); }).call(this); // Generated by LiveScript 1.4.0 (function(){ var module, test, keys, getOwnPropertyDescriptor, defineProperty, $name, ref$, $bytes; module = QUnit.module, test = QUnit.test; keys = Object.keys, getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor, defineProperty = Object.defineProperty; module('ES6'); if (DESCRIPTORS) { for ($name in ref$ = { Float32Array: 4, Float64Array: 8, Int8Array: 1, Int16Array: 2, Int32Array: 4, Uint8Array: 1, Uint16Array: 2, Uint32Array: 4, Uint8ClampedArray: 1 }) { $bytes = ref$[$name]; (fn$.call(this, $name, $bytes)); } } function import$(obj, src){ var own = {}.hasOwnProperty; for (var key in src) if (own.call(src, key)) obj[key] = src[key]; return obj; } function fn$(name, bytes){ var Typed, NATIVE_OR_ISNT_UINT8; Typed = global[name]; NATIVE_OR_ISNT_UINT8 = NATIVE || name !== 'Uint8Array'; test(name + " constructor", function(assert){ var a, e, b; assert.isFunction(Typed); assert.arity(Typed, 3); assert.name(Typed, name); NATIVE && assert.looksNative(Typed); assert.same(Typed.BYTES_PER_ELEMENT, bytes, name + ".BYTES_PER_ELEMENT"); a = new Typed(4); assert.same(a.BYTES_PER_ELEMENT, bytes, '#BYTES_PER_ELEMENT'); assert.same(a.byteOffset, 0, name + '#byteOffset, passed number'); assert.same(a.byteLength, 4 * bytes, '#byteLength, passed number'); assert.arrayEqual(a, [0, 0, 0, 0], 'correct values, passed number'); try { a = new Typed('0x4'); assert.same(a.byteOffset, 0, '#byteOffset, passed string'); assert.same(a.byteLength, 4 * bytes, '#byteLength, passed string'); assert.arrayEqual(a, [0, 0, 0, 0], 'correct values, passed string'); } catch (e$) { e = e$; assert.same(e, [0, 0, 0, 0], 'passed string'); } try { a = new Typed(true); assert.same(a.byteOffset, 0, '#byteOffset, passed boolean'); assert.same(a.byteLength, 1 * bytes, '#byteLength, passed boolean'); assert.arrayEqual(a, [0], 'correct values, passed boolean'); } catch (e$) { e = e$; assert.same(e, [0], 'passed boolean'); } assert.throws(function(){ new Typed; }, TypeError, 'throws without argument'); assert.throws(function(){ new Typed(void 8); }, TypeError, 'throws on undefined'); NATIVE_OR_ISNT_UINT8 && assert.throws(function(){ new Typed(1.5); }, RangeError, 'throws on 1.5'); NATIVE_OR_ISNT_UINT8 && assert.throws(function(){ new Typed(-1); }, RangeError, 'throws on -1'); NATIVE_OR_ISNT_UINT8 && assert.throws(function(){ new Typed(-0); }, RangeError, 'throws on -0'); NATIVE_OR_ISNT_UINT8 && assert.throws(function(){ new Typed(NaN); }, RangeError, 'throws on NaN'); try { a = new Typed(null); assert.same(a.byteOffset, 0, '#byteOffset, passed null'); assert.same(a.byteLength, 0, '#byteLength, passed null'); assert.arrayEqual(a, [], 'correct values, passed null'); } catch (e$) { e = e$; assert.same(e, [], 'passed null'); } a = new Typed([1, 2, 3, 4]); assert.same(a.byteOffset, 0, '#byteOffset, passed array'); assert.same(a.byteLength, 4 * bytes, '#byteLength, passed array'); assert.arrayEqual(a, [1, 2, 3, 4], 'correct values, passed array'); a = new Typed({ 0: 1, 1: 2, 2: 3, 3: 4, length: 4 }); assert.same(a.byteOffset, 0, '#byteOffset, passed array-like'); assert.same(a.byteLength, 4 * bytes, '#byteLength, passed array-like'); assert.arrayEqual(a, [1, 2, 3, 4], 'correct values, passed array-like'); try { a = new Typed({}); assert.same(a.byteOffset, 0, '#byteOffset, passed empty object (also array-like case)'); assert.same(a.byteLength, 0, '#byteLength, passed empty object (also array-like case)'); assert.arrayEqual(a, [], 'correct values, passed empty object (also array-like case)'); } catch (e$) { e = e$; assert.same(e, [], 'passed empty object (also array-like case)'); } try { a = new Typed(createIterable([1, 2, 3, 4])); assert.same(a.byteOffset, 0, '#byteOffset, passed iterable'); assert.same(a.byteLength, 4 * bytes, '#byteLength, passed iterable'); assert.arrayEqual(a, [1, 2, 3, 4], 'correct values, passed iterable'); } catch (e$) { e = e$; assert.same(e, [1, 2, 3, 4], 'passed iterable'); } a = new Typed(new Typed([1, 2, 3, 4])); assert.same(a.byteOffset, 0, '#byteOffset, passed typed array'); assert.same(a.byteLength, 4 * bytes, '#byteLength, passed typed array'); assert.arrayEqual(a, [1, 2, 3, 4], 'correct values, passed typed array'); b = new Typed([1, 2, 3, 4]); b[typeof Symbol != 'undefined' && Symbol !== null ? Symbol.iterator : void 8] = function(){ return createIterable([4, 3, 2, 1])[typeof Symbol != 'undefined' && Symbol !== null ? Symbol.iterator : void 8](); }; a = new Typed(b); assert.same(a.byteOffset, 0, '#byteOffset, passed typed array with custom iterator'); assert.same(a.byteLength, 4 * bytes, '#byteLength, passed typed array with custom iterator'); assert.arrayEqual(a, [1, 2, 3, 4], 'correct values, passed typed array with custom iterator'); a = new Typed(new ArrayBuffer(8)); assert.same(a.byteOffset, 0, '#byteOffset, passed buffer'); assert.same(a.byteLength, 8, '#byteLength, passed buffer'); assert.same(a.length, 8 / bytes, 'correct length, passed buffer'); a = new Typed(new ArrayBuffer(16), 8); assert.same(a.byteOffset, 8, '#byteOffset, passed buffer and byteOffset'); assert.same(a.byteLength, 8, '#byteLength, passed buffer and byteOffset'); assert.same(a.length, 8 / bytes, 'correct length, passed buffer and byteOffset'); a = new Typed(new ArrayBuffer(24), 8, 8 / bytes); assert.same(a.byteOffset, 8, '#byteOffset, passed buffer, byteOffset and length'); assert.same(a.byteLength, 8, '#byteLength, passed buffer, byteOffset and length'); assert.same(a.length, 8 / bytes, 'correct length, passed buffer, byteOffset and length'); a = new Typed(new ArrayBuffer(8), void 8); assert.same(a.byteOffset, 0, '#byteOffset, passed buffer and undefined'); assert.same(a.byteLength, 8, '#byteLength, passed buffer and undefined'); assert.same(a.length, 8 / bytes, 'correct length, passed buffer and undefined'); a = new Typed(new ArrayBuffer(16), 8, void 8); assert.same(a.byteOffset, 8, '#byteOffset, passed buffer, byteOffset and undefined'); assert.same(a.byteLength, 8, '#byteLength, passed buffer, byteOffset and undefined'); assert.same(a.length, 8 / bytes, 'correct length, passed buffer, byteOffset and undefined'); a = new Typed(new ArrayBuffer(8), 8); assert.same(a.byteOffset, 8, '#byteOffset, passed buffer and byteOffset with buffer length'); assert.same(a.byteLength, 0, '#byteLength, passed buffer and byteOffset with buffer length'); assert.arrayEqual(a, [], 'correct values, passed buffer and byteOffset with buffer length'); assert.throws(function(){ new Typed(new ArrayBuffer(8), -1); }, RangeError, 'If offset < 0, throw a RangeError exception'); if (bytes !== 1) { assert.throws(function(){ new Typed(new ArrayBuffer(8), 3); }, RangeError, 'If offset modulo elementSize ≠ 0, throw a RangeError exception'); } if (NATIVE) { if (bytes !== 1) { assert.throws(function(){ new Typed(new ArrayBuffer(9)); }, RangeError, 'If bufferByteLength modulo elementSize ≠ 0, throw a RangeError exception'); } assert.throws(function(){ new Typed(new ArrayBuffer(8), 16); }, RangeError, 'If newByteLength < 0, throw a RangeError exception'); assert.throws(function(){ new Typed(new ArrayBuffer(24), 8, 24); }, RangeError, 'If offset+newByteLength > bufferByteLength, throw a RangeError exception'); } else { assert.throws(function(){ new Typed(new ArrayBuffer(8), 16); }, 'If newByteLength < 0, throw a RangeError exception'); assert.throws(function(){ new Typed(new ArrayBuffer(24), 8, 24); }, 'If offset+newByteLength > bufferByteLength, throw a RangeError exception'); } assert.throws(function(){ Typed(1); }, TypeError, 'throws without `new`'); assert.same(Typed[typeof Symbol != 'undefined' && Symbol !== null ? Symbol.species : void 8], Typed, '@@species'); }); test(name + " descriptors", function(assert){ var typed, desc, base, key, e; typed = new Typed(2); desc = getOwnPropertyDescriptor(typed, 0); base = NATIVE ? { writable: true, enumerable: true, configurable: false } : { writable: desc.writable, enumerable: true, configurable: desc.configurable }; NATIVE && assert.arrayEqual((function(){ var results$ = []; for (key in typed) { results$.push(key); } return results$; }()), ['0', '1'], 'for-in'); NATIVE && assert.arrayEqual(keys(typed), ['0', '1'], 'Object.keys'); assert.deepEqual(getOwnPropertyDescriptor(typed, 0), import$({ value: 0 }, base), 'Object.getOwnPropertyDescriptor'); if (NATIVE) { defineProperty(typed, 0, { value: 1, writable: true, enumerable: true, configurable: false }); typed[0] = typed[1] = 2.5; assert.deepEqual(getOwnPropertyDescriptor(typed, 0), import$({ value: typed[1] }, base), 'Object.defineProperty, valid descriptor #1'); defineProperty(typed, 0, { value: 1 }); typed[0] = typed[1] = 3.5; assert.deepEqual(getOwnPropertyDescriptor(typed, 0), import$({ value: typed[1] }, base), 'Object.defineProperty, valid descriptor #2'); } NATIVE && (function(){ try { defineProperty(typed, 0, { value: 2, writable: false, enumerable: true, configurable: false }); return assert.ok(false, 'Object.defineProperty, invalid descriptor #1'); } catch (e$) { e = e$; return assert.ok(true, 'Object.defineProperty, invalid descriptor #1'); } }()); NATIVE && (function(){ try { defineProperty(typed, 0, { value: 2, writable: true, enumerable: false, configurable: false }); return assert.ok(false, 'Object.defineProperty, invalid descriptor #2'); } catch (e$) { e = e$; return assert.ok(true, 'Object.defineProperty, invalid descriptor #2'); } }()); NATIVE && (function(){ try { defineProperty(typed, 0, { get: function(){ return 2; } }); return assert.ok(false, 'Object.defineProperty, invalid descriptor #3'); } catch (e$) { e = e$; return assert.ok(true, 'Object.defineProperty, invalid descriptor #3'); } }()); try { defineProperty(typed, 0, { value: 2, get: function(){ return 2; } }); assert.ok(false, 'Object.defineProperty, invalid descriptor #4'); } catch (e$) { e = e$; assert.ok(true, 'Object.defineProperty, invalid descriptor #4'); } }); } }).call(this); // Generated by LiveScript 1.4.0 (function(){ var module, test; module = QUnit.module, test = QUnit.test; module('ES6'); DESCRIPTORS && test('Float32 conversions', function(assert){ var NAME, ARRAY, Typed, SET, GET, data, typed, uint8, view, viewFrom, z, i$, len$, ref$, value, conversion, little, big, rep; NAME = 'Float32'; ARRAY = NAME + 'Array'; Typed = global[ARRAY]; SET = 'set' + NAME; GET = 'get' + NAME; data = [[0, 0, [0, 0, 0, 0]], [-0, -0, [0, 0, 0, 128]], [1, 1, [0, 0, 128, 63]], [-1, -1, [0, 0, 128, 191]], [1.1, 1.100000023841858, [205, 204, 140, 63]], [-1.1, -1.100000023841858, [205, 204, 140, 191]], [1.9, 1.899999976158142, [51, 51, 243, 63]], [-1.9, -1.899999976158142, [51, 51, 243, 191]], [127, 127, [0, 0, 254, 66]], [-127, -127, [0, 0, 254, 194]], [128, 128, [0, 0, 0, 67]], [-128, -128, [0, 0, 0, 195]], [255, 255, [0, 0, 127, 67]], [-255, -255, [0, 0, 127, 195]], [255.1, 255.10000610351562, [154, 25, 127, 67]], [255.9, 255.89999389648438, [102, 230, 127, 67]], [256, 256, [0, 0, 128, 67]], [32767, 32767, [0, 254, 255, 70]], [-32767, -32767, [0, 254, 255, 198]], [32768, 32768, [0, 0, 0, 71]], [-32768, -32768, [0, 0, 0, 199]], [65535, 65535, [0, 255, 127, 71]], [65536, 65536, [0, 0, 128, 71]], [65537, 65537, [128, 0, 128, 71]], [65536.54321, 65536.546875, [70, 0, 128, 71]], [-65536.54321, -65536.546875, [70, 0, 128, 199]], [2147483647, 2147483648, [0, 0, 0, 79]], [-2147483647, -2147483648, [0, 0, 0, 207]], [2147483648, 2147483648, [0, 0, 0, 79]], [-2147483648, -2147483648, [0, 0, 0, 207]], [2147483649, 2147483648, [0, 0, 0, 79]], [-2147483649, -2147483648, [0, 0, 0, 207]], [4294967295, 4294967296, [0, 0, 128, 79]], [4294967296, 4294967296, [0, 0, 128, 79]], [4294967297, 4294967296, [0, 0, 128, 79]], [9007199254740991, 9007199254740992, [0, 0, 0, 90]], [-9007199254740991, -9007199254740992, [0, 0, 0, 218]], [9007199254740992, 9007199254740992, [0, 0, 0, 90]], [-9007199254740992, -9007199254740992, [0, 0, 0, 218]], [9007199254740994, 9007199254740992, [0, 0, 0, 90]], [-9007199254740994, -9007199254740992, [0, 0, 0, 218]], [Infinity, Infinity, [0, 0, 128, 127]], [-Infinity, -Infinity, [0, 0, 128, 255]], [1.7976931348623157e+308, Infinity, [0, 0, 128, 127]], [-1.7976931348623157e+308, -Infinity, [0, 0, 128, 255]], [5e-324, 0, [0, 0, 0, 0]], [-5e-324, -0, [0, 0, 0, 128]]]; typed = new Typed(1); uint8 = new Uint8Array(typed.buffer); view = new DataView(typed.buffer); viewFrom = function(it){ return new DataView(new Uint8Array(it).buffer); }; z = function(it){ if (it === 0 && 1 / it === -Infinity) { return '-0'; } else { return it; } }; for (i$ = 0, len$ = data.length; i$ < len$; ++i$) { ref$ = data[i$], value = ref$[0], conversion = ref$[1], little = ref$[2]; big = little.slice().reverse(); rep = LITTLE_ENDIAN ? little : big; typed[0] = value; assert.same(typed[0], conversion, ARRAY + " " + z(value) + " -> " + z(conversion)); assert.arrayEqual(uint8, rep, ARRAY + " " + z(value) + " -> [" + rep + "]"); view[SET](0, value); assert.arrayEqual(uint8, big, "view." + SET + "(0, " + z(value) + ") -> [" + big + "]"); assert.same(viewFrom(big)[GET](0), conversion, "view{" + big + "}." + GET + "(0) -> " + z(conversion)); view[SET](0, value, false); assert.arrayEqual(uint8, big, "view." + SET + "(0, " + z(value) + ", false) -> [" + big + "]"); assert.same(viewFrom(big)[GET](0, false), conversion, "view{" + big + "}." + GET + "(0, false) -> " + z(conversion)); view[SET](0, value, true); assert.arrayEqual(uint8, little, "view." + SET + "(0, " + z(value) + ", true) -> [" + little + "]"); assert.same(viewFrom(little)[GET](0, true), conversion, "view{" + little + "}." + GET + "(0, true) -> " + z(conversion)); } typed[0] = NaN; assert.same(typed[0], NaN, "NaN -> NaN"); }); }).call(this); // Generated by LiveScript 1.4.0 (function(){ var module, test; module = QUnit.module, test = QUnit.test; module('ES6'); DESCRIPTORS && test('Float64 conversions', function(assert){ var NAME, ARRAY, Typed, SET, GET, data, typed, uint8, view, viewFrom, z, i$, len$, ref$, value, conversion, little, big, rep; NAME = 'Float64'; ARRAY = NAME + 'Array'; Typed = global[ARRAY]; SET = 'set' + NAME; GET = 'get' + NAME; data = [[0, 0, [0, 0, 0, 0, 0, 0, 0, 0]], [-0, -0, [0, 0, 0, 0, 0, 0, 0, 128]], [1, 1, [0, 0, 0, 0, 0, 0, 240, 63]], [-1, -1, [0, 0, 0, 0, 0, 0, 240, 191]], [1.1, 1.1, [154, 153, 153, 153, 153, 153, 241, 63]], [-1.1, -1.1, [154, 153, 153, 153, 153, 153, 241, 191]], [1.9, 1.9, [102, 102, 102, 102, 102, 102, 254, 63]], [-1.9, -1.9, [102, 102, 102, 102, 102, 102, 254, 191]], [127, 127, [0, 0, 0, 0, 0, 192, 95, 64]], [-127, -127, [0, 0, 0, 0, 0, 192, 95, 192]], [128, 128, [0, 0, 0, 0, 0, 0, 96, 64]], [-128, -128, [0, 0, 0, 0, 0, 0, 96, 192]], [255, 255, [0, 0, 0, 0, 0, 224, 111, 64]], [-255, -255, [0, 0, 0, 0, 0, 224, 111, 192]], [255.1, 255.1, [51, 51, 51, 51, 51, 227, 111, 64]], [255.9, 255.9, [205, 204, 204, 204, 204, 252, 111, 64]], [256, 256, [0, 0, 0, 0, 0, 0, 112, 64]], [32767, 32767, [0, 0, 0, 0, 192, 255, 223, 64]], [-32767, -32767, [0, 0, 0, 0, 192, 255, 223, 192]], [32768, 32768, [0, 0, 0, 0, 0, 0, 224, 64]], [-32768, -32768, [0, 0, 0, 0, 0, 0, 224, 192]], [65535, 65535, [0, 0, 0, 0, 224, 255, 239, 64]], [65536, 65536, [0, 0, 0, 0, 0, 0, 240, 64]], [65537, 65537, [0, 0, 0, 0, 16, 0, 240, 64]], [65536.54321, 65536.54321, [14, 248, 252, 176, 8, 0, 240, 64]], [-65536.54321, -65536.54321, [14, 248, 252, 176, 8, 0, 240, 192]], [2147483647, 2147483647, [0, 0, 192, 255, 255, 255, 223, 65]], [-2147483647, -2147483647, [0, 0, 192, 255, 255, 255, 223, 193]], [2147483648, 2147483648, [0, 0, 0, 0, 0, 0, 224, 65]], [-2147483648, -2147483648, [0, 0, 0, 0, 0, 0, 224, 193]], [2147483649, 2147483649, [0, 0, 32, 0, 0, 0, 224, 65]], [-2147483649, -2147483649, [0, 0, 32, 0, 0, 0, 224, 193]], [4294967295, 4294967295, [0, 0, 224, 255, 255, 255, 239, 65]], [4294967296, 4294967296, [0, 0, 0, 0, 0, 0, 240, 65]], [4294967297, 4294967297, [0, 0, 16, 0, 0, 0, 240, 65]], [9007199254740991, 9007199254740991, [255, 255, 255, 255, 255, 255, 63, 67]], [-9007199254740991, -9007199254740991, [255, 255, 255, 255, 255, 255, 63, 195]], [9007199254740992, 9007199254740992, [0, 0, 0, 0, 0, 0, 64, 67]], [-9007199254740992, -9007199254740992, [0, 0, 0, 0, 0, 0, 64, 195]], [9007199254740994, 9007199254740994, [1, 0, 0, 0, 0, 0, 64, 67]], [-9007199254740994, -9007199254740994, [1, 0, 0, 0, 0, 0, 64, 195]], [Infinity, Infinity, [0, 0, 0, 0, 0, 0, 240, 127]], [-Infinity, -Infinity, [0, 0, 0, 0, 0, 0, 240, 255]], [-1.7976931348623157e+308, -1.7976931348623157e+308, [255, 255, 255, 255, 255, 255, 239, 255]], [1.7976931348623157e+308, 1.7976931348623157e+308, [255, 255, 255, 255, 255, 255, 239, 127]], [5e-324, 5e-324, [1, 0, 0, 0, 0, 0, 0, 0]], [-5e-324, -5e-324, [1, 0, 0, 0, 0, 0, 0, 128]]]; typed = new Typed(1); uint8 = new Uint8Array(typed.buffer); view = new DataView(typed.buffer); viewFrom = function(it){ return new DataView(new Uint8Array(it).buffer); }; z = function(it){ if (it === 0 && 1 / it === -Infinity) { return '-0'; } else { return it; } }; for (i$ = 0, len$ = data.length; i$ < len$; ++i$) { ref$ = data[i$], value = ref$[0], conversion = ref$[1], little = ref$[2]; big = little.slice().reverse(); rep = LITTLE_ENDIAN ? little : big; typed[0] = value; assert.same(typed[0], conversion, ARRAY + " " + z(value) + " -> " + z(conversion)); assert.arrayEqual(uint8, rep, ARRAY + " " + z(value) + " -> [" + rep + "]"); view[SET](0, value); assert.arrayEqual(uint8, big, "view." + SET + "(0, " + z(value) + ") -> [" + big + "]"); assert.same(viewFrom(big)[GET](0), conversion, "view{" + big + "}." + GET + "(0) -> " + z(conversion)); view[SET](0, value, false); assert.arrayEqual(uint8, big, "view." + SET + "(0, " + z(value) + ", false) -> [" + big + "]"); assert.same(viewFrom(big)[GET](0, false), conversion, "view{" + big + "}." + GET + "(0, false) -> " + z(conversion)); view[SET](0, value, true); assert.arrayEqual(uint8, little, "view." + SET + "(0, " + z(value) + ", true) -> [" + little + "]"); assert.same(viewFrom(little)[GET](0, true), conversion, "view{" + little + "}." + GET + "(0, true) -> " + z(conversion)); } typed[0] = NaN; assert.same(typed[0], NaN, "NaN -> NaN"); }); }).call(this); // Generated by LiveScript 1.4.0 (function(){ var module, test; module = QUnit.module, test = QUnit.test; module('ES6'); DESCRIPTORS && test('Int16 conversions', function(assert){ var NAME, ARRAY, Typed, SET, GET, data, typed, uint8, view, viewFrom, z, i$, len$, ref$, value, conversion, little, big, rep; NAME = 'Int16'; ARRAY = NAME + 'Array'; Typed = global[ARRAY]; SET = 'set' + NAME; GET = 'get' + NAME; data = [[0, 0, [0, 0]], [-0, 0, [0, 0]], [1, 1, [1, 0]], [-1, -1, [255, 255]], [1.1, 1, [1, 0]], [-1.1, -1, [255, 255]], [1.9, 1, [1, 0]], [-1.9, -1, [255, 255]], [127, 127, [127, 0]], [-127, -127, [129, 255]], [128, 128, [128, 0]], [-128, -128, [128, 255]], [255, 255, [255, 0]], [-255, -255, [1, 255]], [255.1, 255, [255, 0]], [255.9, 255, [255, 0]], [256, 256, [0, 1]], [32767, 32767, [255, 127]], [-32767, -32767, [1, 128]], [32768, -32768, [0, 128]], [-32768, -32768, [0, 128]], [65535, -1, [255, 255]], [65536, 0, [0, 0]], [65537, 1, [1, 0]], [65536.54321, 0, [0, 0]], [-65536.54321, 0, [0, 0]], [2147483647, -1, [255, 255]], [-2147483647, 1, [1, 0]], [2147483648, 0, [0, 0]], [-2147483648, 0, [0, 0]], [4294967296, 0, [0, 0]], [9007199254740992, 0, [0, 0]], [-9007199254740992, 0, [0, 0]], [Infinity, 0, [0, 0]], [-Infinity, 0, [0, 0]], [-1.7976931348623157e+308, 0, [0, 0]], [1.7976931348623157e+308, 0, [0, 0]], [5e-324, 0, [0, 0]], [-5e-324, 0, [0, 0]], [NaN, 0, [0, 0]]]; if (NATIVE || !/Android [2-4]/.test(typeof navigator != 'undefined' && navigator !== null ? navigator.userAgent : void 8)) { data = data.concat([[2147483649, 1, [1, 0]], [-2147483649, -1, [255, 255]], [4294967295, -1, [255, 255]], [4294967297, 1, [1, 0]], [9007199254740991, -1, [255, 255]], [-9007199254740991, 1, [1, 0]], [9007199254740994, 2, [2, 0]], [-9007199254740994, -2, [254, 255]]]); } typed = new Typed(1); uint8 = new Uint8Array(typed.buffer); view = new DataView(typed.buffer); viewFrom = function(it){ return new DataView(new Uint8Array(it).buffer); }; z = function(it){ if (it === 0 && 1 / it === -Infinity) { return '-0'; } else { return it; } }; for (i$ = 0, len$ = data.length; i$ < len$; ++i$) { ref$ = data[i$], value = ref$[0], conversion = ref$[1], little = ref$[2]; big = little.slice().reverse(); rep = LITTLE_ENDIAN ? little : big; typed[0] = value; assert.same(typed[0], conversion, ARRAY + " " + z(value) + " -> " + z(conversion)); assert.arrayEqual(uint8, rep, ARRAY + " " + z(value) + " -> [" + rep + "]"); view[SET](0, value); assert.arrayEqual(uint8, big, "view." + SET + "(0, " + z(value) + ") -> [" + big + "]"); assert.same(viewFrom(big)[GET](0), conversion, "view{" + big + "}." + GET + "(0) -> " + z(conversion)); view[SET](0, value, false); assert.arrayEqual(uint8, big, "view." + SET + "(0, " + z(value) + ", false) -> [" + big + "]"); assert.same(viewFrom(big)[GET](0, false), conversion, "view{" + big + "}." + GET + "(0, false) -> " + z(conversion)); view[SET](0, value, true); assert.arrayEqual(uint8, little, "view." + SET + "(0, " + z(value) + ", true) -> [" + little + "]"); assert.same(viewFrom(little)[GET](0, true), conversion, "view{" + little + "}." + GET + "(0, true) -> " + z(conversion)); } }); }).call(this); // Generated by LiveScript 1.4.0 (function(){ var module, test; module = QUnit.module, test = QUnit.test; module('ES6'); DESCRIPTORS && test('Int32 conversions', function(assert){ var NAME, ARRAY, Typed, SET, GET, data, typed, uint8, view, viewFrom, z, i$, len$, ref$, value, conversion, little, big, rep; NAME = 'Int32'; ARRAY = NAME + 'Array'; Typed = global[ARRAY]; SET = 'set' + NAME; GET = 'get' + NAME; data = [[0, 0, [0, 0, 0, 0]], [-0, 0, [0, 0, 0, 0]], [1, 1, [1, 0, 0, 0]], [-1, -1, [255, 255, 255, 255]], [1.1, 1, [1, 0, 0, 0]], [-1.1, -1, [255, 255, 255, 255]], [1.9, 1, [1, 0, 0, 0]], [-1.9, -1, [255, 255, 255, 255]], [127, 127, [127, 0, 0, 0]], [-127, -127, [129, 255, 255, 255]], [128, 128, [128, 0, 0, 0]], [-128, -128, [128, 255, 255, 255]], [255, 255, [255, 0, 0, 0]], [-255, -255, [1, 255, 255, 255]], [255.1, 255, [255, 0, 0, 0]], [255.9, 255, [255, 0, 0, 0]], [256, 256, [0, 1, 0, 0]], [32767, 32767, [255, 127, 0, 0]], [-32767, -32767, [1, 128, 255, 255]], [32768, 32768, [0, 128, 0, 0]], [-32768, -32768, [0, 128, 255, 255]], [65535, 65535, [255, 255, 0, 0]], [65536, 65536, [0, 0, 1, 0]], [65537, 65537, [1, 0, 1, 0]], [65536.54321, 65536, [0, 0, 1, 0]], [-65536.54321, -65536, [0, 0, 255, 255]], [2147483647, 2147483647, [255, 255, 255, 127]], [-2147483647, -2147483647, [1, 0, 0, 128]], [2147483648, -2147483648, [0, 0, 0, 128]], [-2147483648, -2147483648, [0, 0, 0, 128]], [2147483649, -2147483647, [1, 0, 0, 128]], [-2147483649, 2147483647, [255, 255, 255, 127]], [4294967295, -1, [255, 255, 255, 255]], [4294967296, 0, [0, 0, 0, 0]], [4294967297, 1, [1, 0, 0, 0]], [9007199254740991, -1, [255, 255, 255, 255]], [-9007199254740991, 1, [1, 0, 0, 0]], [9007199254740992, 0, [0, 0, 0, 0]], [-9007199254740992, 0, [0, 0, 0, 0]], [9007199254740994, 2, [2, 0, 0, 0]], [-9007199254740994, -2, [254, 255, 255, 255]], [Infinity, 0, [0, 0, 0, 0]], [-Infinity, 0, [0, 0, 0, 0]], [-1.7976931348623157e+308, 0, [0, 0, 0, 0]], [1.7976931348623157e+308, 0, [0, 0, 0, 0]], [5e-324, 0, [0, 0, 0, 0]], [-5e-324, 0, [0, 0, 0, 0]], [NaN, 0, [0, 0, 0, 0]]]; typed = new Typed(1); uint8 = new Uint8Array(typed.buffer); view = new DataView(typed.buffer); viewFrom = function(it){ return new DataView(new Uint8Array(it).buffer); }; z = function(it){ if (it === 0 && 1 / it === -Infinity) { return '-0'; } else { return it; } }; for (i$ = 0, len$ = data.length; i$ < len$; ++i$) { ref$ = data[i$], value = ref$[0], conversion = ref$[1], little = ref$[2]; big = little.slice().reverse(); rep = LITTLE_ENDIAN ? little : big; typed[0] = value; assert.same(typed[0], conversion, ARRAY + " " + z(value) + " -> " + z(conversion)); assert.arrayEqual(uint8, rep, ARRAY + " " + z(value) + " -> [" + rep + "]"); view[SET](0, value); assert.arrayEqual(uint8, big, "view." + SET + "(0, " + z(value) + ") -> [" + big + "]"); assert.same(viewFrom(big)[GET](0), conversion, "view{" + big + "}." + GET + "(0) -> " + z(conversion)); view[SET](0, value, false); assert.arrayEqual(uint8, big, "view." + SET + "(0, " + z(value) + ", false) -> [" + big + "]"); assert.same(viewFrom(big)[GET](0, false), conversion, "view{" + big + "}." + GET + "(0, false) -> " + z(conversion)); view[SET](0, value, true); assert.arrayEqual(uint8, little, "view." + SET + "(0, " + z(value) + ", true) -> [" + little + "]"); assert.same(viewFrom(little)[GET](0, true), conversion, "view{" + little + "}." + GET + "(0, true) -> " + z(conversion)); } }); }).call(this); // Generated by LiveScript 1.4.0 (function(){ var module, test; module = QUnit.module, test = QUnit.test; module('ES6'); DESCRIPTORS && test('Int8 conversions', function(assert){ var NAME, ARRAY, Typed, SET, GET, data, typed, uint8, view, viewFrom, z, i$, len$, ref$, value, conversion, little; NAME = 'Int8'; ARRAY = NAME + 'Array'; Typed = global[ARRAY]; SET = 'set' + NAME; GET = 'get' + NAME; data = [[0, 0, [0]], [-0, 0, [0]], [1, 1, [1]], [-1, -1, [255]], [1.1, 1, [1]], [-1.1, -1, [255]], [1.9, 1, [1]], [-1.9, -1, [255]], [127, 127, [127]], [-127, -127, [129]], [128, -128, [128]], [-128, -128, [128]], [255, -1, [255]], [-255, 1, [1]], [255.1, -1, [255]], [255.9, -1, [255]], [256, 0, [0]], [32767, -1, [255]], [-32767, 1, [1]], [32768, 0, [0]], [-32768, 0, [0]], [65535, -1, [255]], [65536, 0, [0]], [65537, 1, [1]], [65536.54321, 0, [0]], [-65536.54321, 0, [0]], [2147483647, -1, [255]], [-2147483647, 1, [1]], [2147483648, 0, [0]], [-2147483648, 0, [0]], [4294967296, 0, [0]], [9007199254740992, 0, [0]], [-9007199254740992, 0, [0]], [Infinity, 0, [0]], [-Infinity, 0, [0]], [-1.7976931348623157e+308, 0, [0]], [1.7976931348623157e+308, 0, [0]], [5e-324, 0, [0]], [-5e-324, 0, [0]], [NaN, 0, [0]]]; if (NATIVE || !/Android [2-4]/.test(typeof navigator != 'undefined' && navigator !== null ? navigator.userAgent : void 8)) { data = data.concat([[2147483649, 1, [1]], [-2147483649, -1, [255]], [4294967295, -1, [255]], [4294967297, 1, [1]], [9007199254740991, -1, [255]], [-9007199254740991, 1, [1]], [9007199254740994, 2, [2]], [-9007199254740994, -2, [254]]]); } typed = new Typed(1); uint8 = new Uint8Array(typed.buffer); view = new DataView(typed.buffer); viewFrom = function(it){ return new DataView(new Uint8Array(it).buffer); }; z = function(it){ if (it === 0 && 1 / it === -Infinity) { return '-0'; } else { return it; } }; for (i$ = 0, len$ = data.length; i$ < len$; ++i$) { ref$ = data[i$], value = ref$[0], conversion = ref$[1], little = ref$[2]; typed[0] = value; assert.same(typed[0], conversion, ARRAY + " " + z(value) + " -> " + z(conversion)); assert.arrayEqual(uint8, little, ARRAY + " " + z(value) + " -> [" + little + "]"); view[SET](0, value); assert.arrayEqual(uint8, little, "view." + SET + "(0, " + z(value) + ") -> [" + little + "]"); assert.same(viewFrom(little)[GET](0), conversion, "view{" + little + "}." + GET + "(0) -> " + z(conversion)); } }); }).call(this); // Generated by LiveScript 1.4.0 (function(){ var module, test; module = QUnit.module, test = QUnit.test; module('ES6'); DESCRIPTORS && test('Uint16 conversions', function(assert){ var NAME, ARRAY, Typed, SET, GET, data, typed, uint8, view, viewFrom, z, i$, len$, ref$, value, conversion, little, big, rep; NAME = 'Uint16'; ARRAY = NAME + 'Array'; Typed = global[ARRAY]; SET = 'set' + NAME; GET = 'get' + NAME; data = [[0, 0, [0, 0]], [-0, 0, [0, 0]], [1, 1, [1, 0]], [-1, 65535, [255, 255]], [1.1, 1, [1, 0]], [-1.1, 65535, [255, 255]], [1.9, 1, [1, 0]], [-1.9, 65535, [255, 255]], [127, 127, [127, 0]], [-127, 65409, [129, 255]], [128, 128, [128, 0]], [-128, 65408, [128, 255]], [255, 255, [255, 0]], [-255, 65281, [1, 255]], [255.1, 255, [255, 0]], [255.9, 255, [255, 0]], [256, 256, [0, 1]], [32767, 32767, [255, 127]], [-32767, 32769, [1, 128]], [32768, 32768, [0, 128]], [-32768, 32768, [0, 128]], [65535, 65535, [255, 255]], [65536, 0, [0, 0]], [65537, 1, [1, 0]], [65536.54321, 0, [0, 0]], [-65536.54321, 0, [0, 0]], [2147483647, 65535, [255, 255]], [-2147483647, 1, [1, 0]], [2147483648, 0, [0, 0]], [-2147483648, 0, [0, 0]], [4294967296, 0, [0, 0]], [9007199254740992, 0, [0, 0]], [-9007199254740992, 0, [0, 0]], [Infinity, 0, [0, 0]], [-Infinity, 0, [0, 0]], [-1.7976931348623157e+308, 0, [0, 0]], [1.7976931348623157e+308, 0, [0, 0]], [5e-324, 0, [0, 0]], [-5e-324, 0, [0, 0]], [NaN, 0, [0, 0]]]; if (NATIVE || !/Android [2-4]/.test(typeof navigator != 'undefined' && navigator !== null ? navigator.userAgent : void 8)) { data = data.concat([[2147483649, 1, [1, 0]], [-2147483649, 65535, [255, 255]], [4294967295, 65535, [255, 255]], [4294967297, 1, [1, 0]], [9007199254740991, 65535, [255, 255]], [-9007199254740991, 1, [1, 0]], [9007199254740994, 2, [2, 0]], [-9007199254740994, 65534, [254, 255]]]); } typed = new Typed(1); uint8 = new Uint8Array(typed.buffer); view = new DataView(typed.buffer); viewFrom = function(it){ return new DataView(new Uint8Array(it).buffer); }; z = function(it){ if (it === 0 && 1 / it === -Infinity) { return '-0'; } else { return it; } }; for (i$ = 0, len$ = data.length; i$ < len$; ++i$) { ref$ = data[i$], value = ref$[0], conversion = ref$[1], little = ref$[2]; big = little.slice().reverse(); rep = LITTLE_ENDIAN ? little : big; typed[0] = value; assert.same(typed[0], conversion, ARRAY + " " + z(value) + " -> " + z(conversion)); assert.arrayEqual(uint8, rep, ARRAY + " " + z(value) + " -> [" + rep + "]"); view[SET](0, value); assert.arrayEqual(uint8, big, "view." + SET + "(0, " + z(value) + ") -> [" + big + "]"); assert.same(viewFrom(big)[GET](0), conversion, "view{" + big + "}." + GET + "(0) -> " + z(conversion)); view[SET](0, value, false); assert.arrayEqual(uint8, big, "view." + SET + "(0, " + z(value) + ", false) -> [" + big + "]"); assert.same(viewFrom(big)[GET](0, false), conversion, "view{" + big + "}." + GET + "(0, false) -> " + z(conversion)); view[SET](0, value, true); assert.arrayEqual(uint8, little, "view." + SET + "(0, " + z(value) + ", true) -> [" + little + "]"); assert.same(viewFrom(little)[GET](0, true), conversion, "view{" + little + "}." + GET + "(0, true) -> " + z(conversion)); } }); }).call(this); // Generated by LiveScript 1.4.0 (function(){ var module, test; module = QUnit.module, test = QUnit.test; module('ES6'); DESCRIPTORS && test('Uint32 conversions', function(assert){ var NAME, ARRAY, Typed, SET, GET, data, typed, uint8, view, viewFrom, z, i$, len$, ref$, value, conversion, little, big, rep; NAME = 'Uint32'; ARRAY = NAME + 'Array'; Typed = global[ARRAY]; SET = 'set' + NAME; GET = 'get' + NAME; data = [[0, 0, [0, 0, 0, 0]], [-0, 0, [0, 0, 0, 0]], [1, 1, [1, 0, 0, 0]], [-1, 4294967295, [255, 255, 255, 255]], [1.1, 1, [1, 0, 0, 0]], [-1.1, 4294967295, [255, 255, 255, 255]], [1.9, 1, [1, 0, 0, 0]], [-1.9, 4294967295, [255, 255, 255, 255]], [127, 127, [127, 0, 0, 0]], [-127, 4294967169, [129, 255, 255, 255]], [128, 128, [128, 0, 0, 0]], [-128, 4294967168, [128, 255, 255, 255]], [255, 255, [255, 0, 0, 0]], [-255, 4294967041, [1, 255, 255, 255]], [255.1, 255, [255, 0, 0, 0]], [255.9, 255, [255, 0, 0, 0]], [256, 256, [0, 1, 0, 0]], [32767, 32767, [255, 127, 0, 0]], [-32767, 4294934529, [1, 128, 255, 255]], [32768, 32768, [0, 128, 0, 0]], [-32768, 4294934528, [0, 128, 255, 255]], [65535, 65535, [255, 255, 0, 0]], [65536, 65536, [0, 0, 1, 0]], [65537, 65537, [1, 0, 1, 0]], [65536.54321, 65536, [0, 0, 1, 0]], [-65536.54321, 4294901760, [0, 0, 255, 255]], [2147483647, 2147483647, [255, 255, 255, 127]], [-2147483647, 2147483649, [1, 0, 0, 128]], [2147483648, 2147483648, [0, 0, 0, 128]], [-2147483648, 2147483648, [0, 0, 0, 128]], [2147483649, 2147483649, [1, 0, 0, 128]], [-2147483649, 2147483647, [255, 255, 255, 127]], [4294967295, 4294967295, [255, 255, 255, 255]], [4294967296, 0, [0, 0, 0, 0]], [4294967297, 1, [1, 0, 0, 0]], [9007199254740991, 4294967295, [255, 255, 255, 255]], [-9007199254740991, 1, [1, 0, 0, 0]], [9007199254740992, 0, [0, 0, 0, 0]], [-9007199254740992, 0, [0, 0, 0, 0]], [9007199254740994, 2, [2, 0, 0, 0]], [-9007199254740994, 4294967294, [254, 255, 255, 255]], [Infinity, 0, [0, 0, 0, 0]], [-Infinity, 0, [0, 0, 0, 0]], [-1.7976931348623157e+308, 0, [0, 0, 0, 0]], [1.7976931348623157e+308, 0, [0, 0, 0, 0]], [5e-324, 0, [0, 0, 0, 0]], [-5e-324, 0, [0, 0, 0, 0]], [NaN, 0, [0, 0, 0, 0]]]; typed = new Typed(1); uint8 = new Uint8Array(typed.buffer); view = new DataView(typed.buffer); viewFrom = function(it){ return new DataView(new Uint8Array(it).buffer); }; z = function(it){ if (it === 0 && 1 / it === -Infinity) { return '-0'; } else { return it; } }; for (i$ = 0, len$ = data.length; i$ < len$; ++i$) { ref$ = data[i$], value = ref$[0], conversion = ref$[1], little = ref$[2]; big = little.slice().reverse(); rep = LITTLE_ENDIAN ? little : big; typed[0] = value; assert.same(typed[0], conversion, ARRAY + " " + z(value) + " -> " + z(conversion)); assert.arrayEqual(uint8, rep, ARRAY + " " + z(value) + " -> [" + rep + "]"); view[SET](0, value); assert.arrayEqual(uint8, big, "view." + SET + "(0, " + z(value) + ") -> [" + big + "]"); assert.same(viewFrom(big)[GET](0), conversion, "view{" + big + "}." + GET + "(0) -> " + z(conversion)); view[SET](0, value, false); assert.arrayEqual(uint8, big, "view." + SET + "(0, " + z(value) + ", false) -> [" + big + "]"); assert.same(viewFrom(big)[GET](0, false), conversion, "view{" + big + "}." + GET + "(0, false) -> " + z(conversion)); view[SET](0, value, true); assert.arrayEqual(uint8, little, "view." + SET + "(0, " + z(value) + ", true) -> [" + little + "]"); assert.same(viewFrom(little)[GET](0, true), conversion, "view{" + little + "}." + GET + "(0, true) -> " + z(conversion)); } }); }).call(this); // Generated by LiveScript 1.4.0 (function(){ var module, test; module = QUnit.module, test = QUnit.test; module('ES6'); DESCRIPTORS && test('Uint8Clamped conversions', function(assert){ var NAME, ARRAY, Typed, data, typed, uint8, z, i$, len$, ref$, value, conversion, little; NAME = 'Uint8Clamped'; ARRAY = NAME + 'Array'; Typed = global[ARRAY]; data = [[0, 0, [0]], [-0, 0, [0]], [1, 1, [1]], [-1, 0, [0]], [1.1, 1, [1]], [-1.1, 0, [0]], [1.9, 2, [2]], [-1.9, 0, [0]], [127, 127, [127]], [-127, 0, [0]], [128, 128, [128]], [-128, 0, [0]], [255, 255, [255]], [-255, 0, [0]], [255.1, 255, [255]], [255.9, 255, [255]], [256, 255, [255]], [32767, 255, [255]], [-32767, 0, [0]], [32768, 255, [255]], [-32768, 0, [0]], [65535, 255, [255]], [65536, 255, [255]], [65537, 255, [255]], [65536.54321, 255, [255]], [-65536.54321, 0, [0]], [2147483647, 255, [255]], [-2147483647, 0, [0]], [2147483648, 255, [255]], [-2147483648, 0, [0]], [2147483649, 255, [255]], [-2147483649, 0, [0]], [4294967295, 255, [255]], [4294967296, 255, [255]], [4294967297, 255, [255]], [9007199254740991, 255, [255]], [-9007199254740991, 0, [0]], [9007199254740992, 255, [255]], [-9007199254740992, 0, [0]], [9007199254740994, 255, [255]], [-9007199254740994, 0, [0]], [Infinity, 255, [255]], [-Infinity, 0, [0]], [-1.7976931348623157e+308, 0, [0]], [1.7976931348623157e+308, 255, [255]], [5e-324, 0, [0]], [-5e-324, 0, [0]], [NaN, 0, [0]]]; typed = new Typed(1); uint8 = new Uint8Array(typed.buffer); z = function(it){ if (it === 0 && 1 / it === -Infinity) { return '-0'; } else { return it; } }; for (i$ = 0, len$ = data.length; i$ < len$; ++i$) { ref$ = data[i$], value = ref$[0], conversion = ref$[1], little = ref$[2]; typed[0] = value; assert.same(typed[0], conversion, z(value) + " -> " + z(conversion)); assert.arrayEqual(uint8, little, z(value) + " -> [" + little + "]"); } }); }).call(this); // Generated by LiveScript 1.4.0 (function(){ var module, test; module = QUnit.module, test = QUnit.test; module('ES6'); DESCRIPTORS && test('Uint8 conversions', function(assert){ var NAME, ARRAY, Typed, SET, GET, data, typed, view, viewFrom, z, i$, len$, ref$, value, conversion, little; NAME = 'Uint8'; ARRAY = NAME + 'Array'; Typed = global[ARRAY]; SET = 'set' + NAME; GET = 'get' + NAME; data = [[0, 0, [0]], [-0, 0, [0]], [1, 1, [1]], [-1, 255, [255]], [1.1, 1, [1]], [-1.1, 255, [255]], [1.9, 1, [1]], [-1.9, 255, [255]], [127, 127, [127]], [-127, 129, [129]], [128, 128, [128]], [-128, 128, [128]], [255, 255, [255]], [-255, 1, [1]], [255.1, 255, [255]], [255.9, 255, [255]], [256, 0, [0]], [32767, 255, [255]], [-32767, 1, [1]], [32768, 0, [0]], [-32768, 0, [0]], [65535, 255, [255]], [65536, 0, [0]], [65537, 1, [1]], [65536.54321, 0, [0]], [-65536.54321, 0, [0]], [2147483647, 255, [255]], [-2147483647, 1, [1]], [2147483648, 0, [0]], [-2147483648, 0, [0]], [4294967296, 0, [0]], [9007199254740992, 0, [0]], [-9007199254740992, 0, [0]], [Infinity, 0, [0]], [-Infinity, 0, [0]], [-1.7976931348623157e+308, 0, [0]], [1.7976931348623157e+308, 0, [0]], [5e-324, 0, [0]], [-5e-324, 0, [0]], [NaN, 0, [0]]]; if (NATIVE || !/Android [2-4]/.test(typeof navigator != 'undefined' && navigator !== null ? navigator.userAgent : void 8)) { data = data.concat([[2147483649, 1, [1]], [-2147483649, 255, [255]], [4294967295, 255, [255]], [4294967297, 1, [1]], [9007199254740991, 255, [255]], [-9007199254740991, 1, [1]], [9007199254740994, 2, [2]], [-9007199254740994, 254, [254]]]); } typed = new Typed(1); view = new DataView(typed.buffer); viewFrom = function(it){ return new DataView(new Uint8Array(it).buffer); }; z = function(it){ if (it === 0 && 1 / it === -Infinity) { return '-0'; } else { return it; } }; for (i$ = 0, len$ = data.length; i$ < len$; ++i$) { ref$ = data[i$], value = ref$[0], conversion = ref$[1], little = ref$[2]; typed[0] = value; assert.same(typed[0], conversion, ARRAY + " " + z(value) + " -> " + z(conversion)); assert.arrayEqual(typed, little, ARRAY + " " + z(value) + " -> [" + little + "]"); view[SET](0, value); assert.arrayEqual(typed, little, "view." + SET + "(0, " + z(value) + ") -> [" + little + "]"); assert.same(viewFrom(little)[GET](0), conversion, "view{" + little + "}." + GET + "(0) -> " + z(conversion)); } }); }).call(this); // Generated by LiveScript 1.4.0 (function(){ var module, test, i$, x$, ref$, len$, y$; module = QUnit.module, test = QUnit.test; module('ES6'); test('DataView', function(assert){ var a, d; assert.same(DataView, Object(DataView), 'is object'); NATIVE && assert.arity(DataView, 3); NATIVE && assert.name(DataView, 'DataView'); NATIVE && assert.looksNative(DataView); a = new DataView(new ArrayBuffer(8)); assert.same(a.byteOffset, 0, '#byteOffset, passed buffer'); assert.same(a.byteLength, 8, '#byteLength, passed buffer'); a = new DataView(new ArrayBuffer(16), 8); assert.same(a.byteOffset, 8, '#byteOffset, passed buffer and byteOffset'); assert.same(a.byteLength, 8, '#byteLength, passed buffer and byteOffset'); a = new DataView(new ArrayBuffer(24), 8, 8); assert.same(a.byteOffset, 8, '#byteOffset, passed buffer, byteOffset and length'); assert.same(a.byteLength, 8, '#byteLength, passed buffer, byteOffset and length'); if (NATIVE) { a = new DataView(new ArrayBuffer(8), void 8); assert.same(a.byteOffset, 0, '#byteOffset, passed buffer and undefined'); assert.same(a.byteLength, 8, '#byteLength, passed buffer and undefined'); } if (NATIVE) { a = new DataView(new ArrayBuffer(16), 8, void 8); assert.same(a.byteOffset, 8, '#byteOffset, passed buffer, byteOffset and undefined'); assert.same(a.byteLength, 8, '#byteLength, passed buffer, byteOffset and undefined'); } if (NATIVE) { a = new DataView(new ArrayBuffer(8), 8); assert.same(a.byteOffset, 8, '#byteOffset, passed buffer and byteOffset with buffer length'); assert.same(a.byteLength, 0, '#byteLength, passed buffer and byteOffset with buffer length'); } if (NATIVE) { assert.throws(function(){ new DataView(new ArrayBuffer(8), -1); }, RangeError, 'If offset < 0, throw a RangeError exception'); assert.throws(function(){ new DataView(new ArrayBuffer(8), 16); }, RangeError, 'If newByteLength < 0, throw a RangeError exception'); assert.throws(function(){ new DataView(new ArrayBuffer(24), 8, 24); }, RangeError, 'If offset+newByteLength > bufferByteLength, throw a RangeError exception'); } else { assert.throws(function(){ new DataView(new ArrayBuffer(8), -1); }, 'If offset < 0, throw a RangeError exception'); assert.throws(function(){ new DataView(new ArrayBuffer(8), 16); }, 'If newByteLength < 0, throw a RangeError exception'); assert.throws(function(){ new DataView(new ArrayBuffer(24), 8, 24); }, 'If offset+newByteLength > bufferByteLength, throw a RangeError exception'); } if (NATIVE) { assert.throws(function(){ DataView(new ArrayBuffer(8)); }, TypeError, 'throws without `new`'); } else { assert.throws(function(){ DataView(new ArrayBuffer(8)); }, 'throws without `new`'); } d = new DataView(new ArrayBuffer(8)); d.setUint32(0, 0x12345678); assert.same(d.getUint32(0), 0x12345678, 'big endian/big endian'); d.setUint32(0, 0x12345678, true); assert.same(d.getUint32(0, true), 0x12345678, 'little endian/little endian'); d.setUint32(0, 0x12345678, true); assert.same(d.getUint32(0), 0x78563412, 'little endian/big endian'); d.setUint32(0, 0x12345678); assert.same(d.getUint32(0, true), 0x78563412, 'big endian/little endian'); assert.throws(function(){ return new DataView({}); }, 'non-ArrayBuffer argument'); assert.ok(function(){ var e; try { new DataView('foo'); } catch (e$) { e = e$; return e; } }, 'non-ArrayBuffer argument'); }); DESCRIPTORS && test('DataView accessors', function(assert){ var u, d, i$, ref$, len$, i, x; u = new Uint8Array(8); d = new DataView(u.buffer); assert.arrayEqual(u, [0, 0, 0, 0, 0, 0, 0, 0]); d.setUint8(0, 255); assert.arrayEqual(u, [0xff, 0, 0, 0, 0, 0, 0, 0]); d.setInt8(1, -1); assert.arrayEqual(u, [0xff, 0xff, 0, 0, 0, 0, 0, 0]); d.setUint16(2, 0x1234); assert.arrayEqual(u, [0xff, 0xff, 0x12, 0x34, 0, 0, 0, 0]); d.setInt16(4, -1); assert.arrayEqual(u, [0xff, 0xff, 0x12, 0x34, 0xff, 0xff, 0, 0]); d.setUint32(1, 0x12345678); assert.arrayEqual(u, [0xff, 0x12, 0x34, 0x56, 0x78, 0xff, 0, 0]); d.setInt32(4, -2023406815); assert.arrayEqual(u, [0xff, 0x12, 0x34, 0x56, 0x87, 0x65, 0x43, 0x21]); d.setFloat32(2, 1.2e+38); assert.arrayEqual(u, [0xff, 0x12, 0x7e, 0xb4, 0x8e, 0x52, 0x43, 0x21]); d.setFloat64(0, -1.2345678e+301); assert.arrayEqual(u, [0xfe, 0x72, 0x6f, 0x51, 0x5f, 0x61, 0x77, 0xe5]); for (i$ = 0, len$ = (ref$ = [0x80, 0x81, 0x82, 0x83, 0x84, 0x85, 0x86, 0x87]).length; i$ < len$; ++i$) { i = i$; x = ref$[i$]; u[i] = x; } assert.same(d.getUint8(0), 128); assert.same(d.getInt8(1), -127); assert.same(d.getUint16(2), 33411); assert.same(d.getInt16(3), -31868); assert.same(d.getUint32(4), 2223343239); assert.same(d.getInt32(2), -2105310075); assert.same(d.getFloat32(2), -1.932478247535851e-37); assert.same(d.getFloat64(0), -3.116851295377095e-306); }); DESCRIPTORS && test('DataView endian', function(assert){ var rawbuf, d; rawbuf = new Uint8Array([0, 1, 2, 3, 4, 5, 6, 7]).buffer; d = new DataView(rawbuf); assert.same(d.byteLength, 8, 'buffer'); assert.same(d.byteOffset, 0, 'buffer'); assert.throws(function(){ d.getUint8(-2); }); assert.throws(function(){ d.getUint8(8); }, 'bounds for buffer'); assert.throws(function(){ d.setUint8(-2, 0); }, 'bounds for buffer'); assert.throws(function(){ d.setUint8(8, 0); }, 'bounds for buffer'); d = new DataView(rawbuf, 2); assert.same(d.byteLength, 6, 'buffer, byteOffset'); assert.same(d.byteOffset, 2, 'buffer, byteOffset'); assert.same(d.getUint8(5), 7, 'buffer, byteOffset'); assert.throws(function(){ d.getUint8(-2); }, 'bounds for buffer, byteOffset'); assert.throws(function(){ d.getUint8(6); }, 'bounds for buffer, byteOffset'); assert.throws(function(){ d.setUint8(-2, 0); }, 'bounds for buffer, byteOffset'); assert.throws(function(){ d.setUint8(6, 0); }, 'bounds for buffer, byteOffset'); assert.throws(function(){ new DataView(rawbuf, -1); }, 'invalid byteOffset'); assert.throws(function(){ new DataView(rawbuf, 9); }, 'invalid byteOffset'); d = new DataView(rawbuf, 2, 4); assert.same(d.byteLength, 4, 'buffer, byteOffset, length'); assert.same(d.byteOffset, 2, 'buffer, byteOffset, length'); assert.same(d.getUint8(3), 5, 'buffer, byteOffset, length'); assert.throws(function(){ d.getUint8(-2); }, 'bounds for buffer, byteOffset, length'); assert.throws(function(){ d.getUint8(4); }, 'bounds for buffer, byteOffset, length'); assert.throws(function(){ d.setUint8(-2, 0); }, 'bounds for buffer, byteOffset, length'); assert.throws(function(){ d.setUint8(4, 0); }, 'bounds for buffer, byteOffset, length'); assert.throws(function(){ new DataView(rawbuf, 0, 9); }, 'invalid byteOffset+length'); assert.throws(function(){ new DataView(rawbuf, 8, 1); }, 'invalid byteOffset+length'); assert.throws(function(){ new DataView(rawbuf, 9, -1); }, 'invalid byteOffset+length'); }); for (i$ = 0, len$ = (ref$ = ['getUint8', 'getInt8', 'getUint16', 'getInt16', 'getUint32', 'getInt32', 'getFloat32', 'getFloat64']).length; i$ < len$; ++i$) { x$ = ref$[i$]; (fn$.call(this, x$)); } for (i$ = 0, len$ = (ref$ = ['setUint8', 'setInt8', 'setUint16', 'setInt16', 'setUint32', 'setInt32', 'setFloat32', 'setFloat64']).length; i$ < len$; ++i$) { y$ = ref$[i$]; (fn1$.call(this, y$)); } function fn$(name){ test('DataView#' + name, function(assert){ assert.isFunction(DataView.prototype[name]); NATIVE && assert.arity(DataView.prototype[name], 1); assert.name(DataView.prototype[name], name); assert.looksNative(DataView.prototype[name]); assert.same(new DataView(new ArrayBuffer(8))[name](0), 0, 'returns element'); }); } function fn1$(name){ test('DataView#' + name, function(assert){ assert.isFunction(DataView.prototype[name]); NATIVE && assert.arity(DataView.prototype[name], 2); assert.name(DataView.prototype[name], name); assert.looksNative(DataView.prototype[name]); assert.same(new DataView(new ArrayBuffer(8))[name](0, 0), void 8, 'void'); }); } }).call(this); // Generated by LiveScript 1.4.0 (function(){ var module, test; module = QUnit.module, test = QUnit.test; module('ES6'); DESCRIPTORS && test('%TypedArrayPrototype%.copyWithin', function(assert){ var global, i$, x$, ref$, len$, Typed, a; global = Function('return this')(); for (i$ = 0, len$ = (ref$ = ['Float32Array', 'Float64Array', 'Int8Array', 'Int16Array', 'Int32Array', 'Uint8Array', 'Uint16Array', 'Uint32Array', 'Uint8ClampedArray']).length; i$ < len$; ++i$) { x$ = ref$[i$]; Typed = global[x$]; assert.isFunction(Typed.prototype.copyWithin, x$ + "::copyWithin is function"); assert.arity(Typed.prototype.copyWithin, 2, x$ + "::copyWithin arity is 2"); assert.name(Typed.prototype.copyWithin, 'copyWithin', x$ + "::copyWithin name is 'copyWithin'"); assert.looksNative(Typed.prototype.copyWithin, x$ + "::copyWithin looks native"); assert.strictEqual(a = new Typed(5).copyWithin(0), a, 'return this'); assert.arrayEqual(new Typed([1, 2, 3, 4, 5]).copyWithin(0, 3), [4, 5, 3, 4, 5]); assert.arrayEqual(new Typed([1, 2, 3, 4, 5]).copyWithin(1, 3), [1, 4, 5, 4, 5]); assert.arrayEqual(new Typed([1, 2, 3, 4, 5]).copyWithin(1, 2), [1, 3, 4, 5, 5]); assert.arrayEqual(new Typed([1, 2, 3, 4, 5]).copyWithin(2, 2), [1, 2, 3, 4, 5]); assert.arrayEqual(new Typed([1, 2, 3, 4, 5]).copyWithin(0, 3, 4), [4, 2, 3, 4, 5]); assert.arrayEqual(new Typed([1, 2, 3, 4, 5]).copyWithin(1, 3, 4), [1, 4, 3, 4, 5]); assert.arrayEqual(new Typed([1, 2, 3, 4, 5]).copyWithin(1, 2, 4), [1, 3, 4, 4, 5]); assert.arrayEqual(new Typed([1, 2, 3, 4, 5]).copyWithin(0, -2), [4, 5, 3, 4, 5]); assert.arrayEqual(new Typed([1, 2, 3, 4, 5]).copyWithin(0, -2, -1), [4, 2, 3, 4, 5]); assert.arrayEqual(new Typed([1, 2, 3, 4, 5]).copyWithin(-4, -3, -2), [1, 3, 3, 4, 5]); assert.arrayEqual(new Typed([1, 2, 3, 4, 5]).copyWithin(-4, -3, -1), [1, 3, 4, 4, 5]); assert.arrayEqual(new Typed([1, 2, 3, 4, 5]).copyWithin(-4, -3), [1, 3, 4, 5, 5]); assert.throws(fn$, "isn't generic"); } function fn$(){ Typed.prototype.fill.call([0], 1); } }); }).call(this); // Generated by LiveScript 1.4.0 (function(){ var module, test; module = QUnit.module, test = QUnit.test; module('ES6'); DESCRIPTORS && test('%TypedArrayPrototype%.every', function(assert){ var i$, x$, ref$, len$, Typed, a, ctx, v, k, arr; for (i$ = 0, len$ = (ref$ = ['Float32Array', 'Float64Array', 'Int8Array', 'Int16Array', 'Int32Array', 'Uint8Array', 'Uint16Array', 'Uint32Array', 'Uint8ClampedArray']).length; i$ < len$; ++i$) { x$ = ref$[i$]; Typed = global[x$]; assert.isFunction(Typed.prototype.every, x$ + "::every is function"); assert.arity(Typed.prototype.every, 1, x$ + "::every arity is 1"); assert.name(Typed.prototype.every, 'every', x$ + "::every name is 'every'"); assert.looksNative(Typed.prototype.every, x$ + "::every looks native"); (a = new Typed([1])).every(fn$, ctx = {}); assert.ok(new Typed([1, 2, 3]).every(fn1$)); assert.ok(new Typed([1, 2, 3]).every((fn2$))); assert.ok(!new Typed([1, 2, 3]).every((fn3$))); assert.ok(!new Typed([1, 2, 3]).every(fn4$)); assert.ok(new Typed([1, 2, 3]).every(fn5$, 1)); v = ''; k = ''; new Typed([1, 2, 3]).every(fn6$); assert.same(v, '123'); assert.same(k, '012'); assert.ok((arr = new Typed([1, 2, 3])).every(fn7$)); assert.throws(fn8$, "isn't generic"); } function fn$(val, key, that){ assert.same(arguments.length, 3, 'correct number of callback arguments'); assert.same(val, 1, 'correct value in callback'); assert.same(key, 0, 'correct index in callback'); assert.same(that, a, 'correct link to array in callback'); assert.same(this, ctx, 'correct callback context'); } function fn1$(it){ return typeof it === 'number'; } function fn2$(it){ return it < 4; } function fn3$(it){ return it < 3; } function fn4$(it){ return typeof it === 'string'; } function fn5$(){ return +this === 1; } function fn6$(a, b){ v += a; k += b; return true; } function fn7$(){ return arguments[2] === arr; } function fn8$(){ Typed.prototype.every.call([0], function(){ return true; }); } }); }).call(this); // Generated by LiveScript 1.4.0 (function(){ var module, test; module = QUnit.module, test = QUnit.test; module('ES6'); DESCRIPTORS && test('%TypedArrayPrototype%.fill', function(assert){ var i$, x$, ref$, len$, Typed, a; for (i$ = 0, len$ = (ref$ = ['Float32Array', 'Float64Array', 'Int8Array', 'Int16Array', 'Int32Array', 'Uint8Array', 'Uint16Array', 'Uint32Array', 'Uint8ClampedArray']).length; i$ < len$; ++i$) { x$ = ref$[i$]; Typed = global[x$]; assert.isFunction(Typed.prototype.fill, x$ + "::fill is function"); assert.arity(Typed.prototype.fill, 1, x$ + "::fill arity is 1"); assert.name(Typed.prototype.fill, 'fill', x$ + "::fill name is 'fill'"); assert.looksNative(Typed.prototype.fill, x$ + "::fill looks native"); assert.strictEqual(a = new Typed(5).fill(5), a, 'return this'); assert.arrayEqual(new Typed(5).fill(5), [5, 5, 5, 5, 5], 'basic'); assert.arrayEqual(new Typed(5).fill(5, 1), [0, 5, 5, 5, 5], 'start index'); assert.arrayEqual(new Typed(5).fill(5, 1, 4), [0, 5, 5, 5, 0], 'end index'); assert.arrayEqual(new Typed(5).fill(5, 6, 1), [0, 0, 0, 0, 0], 'start > end'); assert.arrayEqual(new Typed(5).fill(5, -3, 4), [0, 0, 5, 5, 0], 'negative start index'); assert.throws(fn$, "isn't generic"); } function fn$(){ Typed.prototype.fill.call([0], 1); } }); }).call(this); // Generated by LiveScript 1.4.0 (function(){ var module, test; module = QUnit.module, test = QUnit.test; module('ES6'); DESCRIPTORS && test('%TypedArrayPrototype%.filter', function(assert){ var i$, x$, ref$, len$, Typed, a, ctx, instance, v, k; for (i$ = 0, len$ = (ref$ = ['Float32Array', 'Float64Array', 'Int8Array', 'Int16Array', 'Int32Array', 'Uint8Array', 'Uint16Array', 'Uint32Array', 'Uint8ClampedArray']).length; i$ < len$; ++i$) { x$ = ref$[i$]; Typed = global[x$]; assert.isFunction(Typed.prototype.filter, x$ + "::filter is function"); assert.arity(Typed.prototype.filter, 1, x$ + "::filter arity is 1"); assert.name(Typed.prototype.filter, 'filter', x$ + "::filter name is 'filter'"); assert.looksNative(Typed.prototype.filter, x$ + "::filter looks native"); (a = new Typed([1])).filter(fn$, ctx = {}); instance = new Typed([1, 2, 3, 4, 5, 6, 7, 8, 9]).filter((fn1$)); assert.ok(instance instanceof Typed, 'correct instance'); assert.arrayEqual(instance, [1, 3, 5, 7, 9], 'works'); v = ''; k = ''; new Typed([1, 2, 3]).filter(fn2$); assert.same(v, '123'); assert.same(k, '012'); assert.throws(fn3$, "isn't generic"); } function fn$(val, key, that){ assert.same(arguments.length, 3, 'correct number of callback arguments'); assert.same(val, 1, 'correct value in callback'); assert.same(key, 0, 'correct index in callback'); assert.same(that, a, 'correct link to array in callback'); assert.same(this, ctx, 'correct callback context'); } function fn1$(it){ return it % 2; } function fn2$(a, b){ v += a; k += b; } function fn3$(){ Typed.prototype.filter.call([0], function(){ return true; }); } }); }).call(this); // Generated by LiveScript 1.4.0 (function(){ var module, test; module = QUnit.module, test = QUnit.test; module('ES6'); DESCRIPTORS && test('%TypedArrayPrototype%.findIndex', function(assert){ var i$, x$, ref$, len$, Typed, a, ctx, v, k, results$ = []; for (i$ = 0, len$ = (ref$ = ['Float32Array', 'Float64Array', 'Int8Array', 'Int16Array', 'Int32Array', 'Uint8Array', 'Uint16Array', 'Uint32Array', 'Uint8ClampedArray']).length; i$ < len$; ++i$) { x$ = ref$[i$]; Typed = global[x$]; assert.isFunction(Typed.prototype.findIndex, x$ + "::findIndex is function"); assert.arity(Typed.prototype.findIndex, 1, x$ + "::findIndex arity is 1"); assert.name(Typed.prototype.findIndex, 'findIndex', x$ + "::findIndex name is 'findIndex'"); assert.looksNative(Typed.prototype.findIndex, x$ + "::findIndex looks native"); (a = new Typed([1])).findIndex(fn$, ctx = {}); assert.same(new Typed([1, 2, 3]).findIndex(fn1$), 1); assert.same(new Typed([1, 2, 3]).findIndex((fn2$)), -1); v = ''; k = ''; new Typed([1, 2, 3]).findIndex(fn3$); assert.same(v, '123'); assert.same(k, '012'); results$.push(assert.throws(fn4$, "isn't generic")); } return results$; function fn$(val, key, that){ assert.same(arguments.length, 3, 'correct number of callback arguments'); assert.same(val, 1, 'correct value in callback'); assert.same(key, 0, 'correct index in callback'); assert.same(that, a, 'correct link to array in callback'); assert.same(this, ctx, 'correct callback context'); } function fn1$(it){ return !(it % 2); } function fn2$(it){ return it === 4; } function fn3$(a, b){ v += a; k += b; } function fn4$(){ Typed.prototype.findIndex.call([0], function(){ return true; }); } }); }).call(this); // Generated by LiveScript 1.4.0 (function(){ var module, test; module = QUnit.module, test = QUnit.test; module('ES6'); DESCRIPTORS && test('%TypedArrayPrototype%.find', function(assert){ var i$, x$, ref$, len$, Typed, a, ctx, v, k; for (i$ = 0, len$ = (ref$ = ['Float32Array', 'Float64Array', 'Int8Array', 'Int16Array', 'Int32Array', 'Uint8Array', 'Uint16Array', 'Uint32Array', 'Uint8ClampedArray']).length; i$ < len$; ++i$) { x$ = ref$[i$]; Typed = global[x$]; assert.isFunction(Typed.prototype.find, x$ + "::find is function"); assert.arity(Typed.prototype.find, 1, x$ + "::find arity is 1"); assert.name(Typed.prototype.find, 'find', x$ + "::find name is 'find'"); assert.looksNative(Typed.prototype.find, x$ + "::find looks native"); (a = new Typed([1])).find(fn$, ctx = {}); assert.same(new Typed([1, 2, 3]).find(fn1$), 2); assert.same(new Typed([1, 2, 3]).find((fn2$)), void 8); v = ''; k = ''; new Typed([1, 2, 3]).find(fn3$); assert.same(v, '123'); assert.same(k, '012'); assert.throws(fn4$, "isn't generic"); } function fn$(val, key, that){ assert.same(arguments.length, 3, 'correct number of callback arguments'); assert.same(val, 1, 'correct value in callback'); assert.same(key, 0, 'correct index in callback'); assert.same(that, a, 'correct link to array in callback'); assert.same(this, ctx, 'correct callback context'); } function fn1$(it){ return !(it % 2); } function fn2$(it){ return it === 4; } function fn3$(a, b){ v += a; k += b; } function fn4$(){ Typed.prototype.find.call([0], function(){ return true; }); } }); }).call(this); // Generated by LiveScript 1.4.0 (function(){ var module, test; module = QUnit.module, test = QUnit.test; module('ES6'); DESCRIPTORS && test('%TypedArrayPrototype%.forEach', function(assert){ var i$, x$, ref$, len$, Typed, a, ctx, v, k; for (i$ = 0, len$ = (ref$ = ['Float32Array', 'Float64Array', 'Int8Array', 'Int16Array', 'Int32Array', 'Uint8Array', 'Uint16Array', 'Uint32Array', 'Uint8ClampedArray']).length; i$ < len$; ++i$) { x$ = ref$[i$]; Typed = global[x$]; assert.isFunction(Typed.prototype.forEach, x$ + "::forEach is function"); assert.arity(Typed.prototype.forEach, 1, x$ + "::forEach arity is 1"); assert.name(Typed.prototype.forEach, 'forEach', x$ + "::forEach name is 'forEach'"); assert.looksNative(Typed.prototype.forEach, x$ + "::forEach looks native"); assert.same(new Typed([1]).forEach(fn$), void 8, 'void'); (a = new Typed([1])).forEach(fn1$, ctx = {}); v = ''; k = ''; new Typed([1, 2, 3]).forEach(fn2$); assert.same(v, '123'); assert.same(k, '012'); assert.throws(fn3$, "isn't generic"); } function fn$(){} function fn1$(val, key, that){ assert.same(arguments.length, 3, 'correct number of callback arguments'); assert.same(val, 1, 'correct value in callback'); assert.same(key, 0, 'correct index in callback'); assert.same(that, a, 'correct link to array in callback'); assert.same(this, ctx, 'correct callback context'); } function fn2$(a, b){ v += a; k += b; } function fn3$(){ Typed.prototype.forEach.call([0], function(){ return true; }); } }); }).call(this); // Generated by LiveScript 1.4.0 (function(){ var module, test; module = QUnit.module, test = QUnit.test; module('ES6'); DESCRIPTORS && test('%TypedArray%.from', function(assert){ var i$, x$, ref$, len$, Typed, inst, O; for (i$ = 0, len$ = (ref$ = ['Float32Array', 'Float64Array', 'Int8Array', 'Int16Array', 'Int32Array', 'Uint8Array', 'Uint16Array', 'Uint32Array', 'Uint8ClampedArray']).length; i$ < len$; ++i$) { x$ = ref$[i$]; Typed = global[x$]; assert.isFunction(Typed.from, x$ + ".from is function"); assert.arity(Typed.from, 1, x$ + ".from arity is 1"); assert.name(Typed.from, 'from', x$ + ".from name is 'from'"); assert.looksNative(Typed.from, x$ + ".from looks native"); inst = Typed.from([1, 2, 3]); assert.ok(inst instanceof Typed, 'correct instance with array'); assert.arrayEqual(inst, [1, 2, 3], 'correct elements with array'); inst = Typed.from({ 0: 1, 1: 2, 2: 3, length: 3 }); assert.ok(inst instanceof Typed, 'correct instance with array-like'); assert.arrayEqual(inst, [1, 2, 3], 'correct elements with array-like'); inst = Typed.from(createIterable([1, 2, 3])); assert.ok(inst instanceof Typed, 'correct instance with iterable'); assert.arrayEqual(inst, [1, 2, 3], 'correct elements with iterable'); assert.arrayEqual(Typed.from([1, 2, 3], fn$), [1, 4, 9], 'accept callback'); Typed.from([1], fn1$, O = {}); assert.throws(fn2$, "isn't generic #1"); if (NATIVE) { assert.throws(fn3$, "isn't generic #2"); assert.ok((fn4$()), 'uses ToLength'); } } function fn$(it){ return it * it; } function fn1$(a, b){ assert.same(arguments.length, 2, 'correct number of callback arguments'); assert.same(a, 1, 'correct value in callback'); assert.same(b, 0, 'correct index in callback'); return assert.same(this, O, 'correct callback context'); } function fn2$(){ Typed.from.call(void 8, []); } function fn3$(){ Typed.from.call(Array, []); } function fn4$(){ try { return Typed.from({ length: -1, 0: 1 }, function(){ throw 42; }); } catch (e$) {} } }); }).call(this); // Generated by LiveScript 1.4.0 (function(){ var module, test; module = QUnit.module, test = QUnit.test; module('ES6'); DESCRIPTORS && test('%TypedArrayPrototype%.indexOf', function(assert){ var i$, x$, ref$, len$, Typed; for (i$ = 0, len$ = (ref$ = ['Float32Array', 'Float64Array', 'Int8Array', 'Int16Array', 'Int32Array', 'Uint8Array', 'Uint16Array', 'Uint32Array', 'Uint8ClampedArray']).length; i$ < len$; ++i$) { x$ = ref$[i$]; Typed = global[x$]; assert.isFunction(Typed.prototype.indexOf, x$ + "::indexOf is function"); assert.arity(Typed.prototype.indexOf, 1, x$ + "::indexOf arity is 1"); assert.name(Typed.prototype.indexOf, 'indexOf', x$ + "::indexOf name is 'indexOf'"); assert.looksNative(Typed.prototype.indexOf, x$ + "::indexOf looks native"); assert.same(new Typed([1, 1, 1]).indexOf(1), 0); assert.same(new Typed([1, 2, 3]).indexOf(1, 1), -1); assert.same(new Typed([1, 2, 3]).indexOf(2, 1), 1); assert.same(new Typed([1, 2, 3]).indexOf(2, -1), -1); assert.same(new Typed([1, 2, 3]).indexOf(2, -2), 1); assert.throws(fn$, "isn't generic"); } function fn$(){ Typed.prototype.indexOf.call([1, 2], 1); } }); }).call(this); // Generated by LiveScript 1.4.0 (function(){ var module, test, arrays; module = QUnit.module, test = QUnit.test; module('ES6'); arrays = ['Float32Array', 'Float64Array', 'Int8Array', 'Int16Array', 'Int32Array', 'Uint8Array', 'Uint16Array', 'Uint32Array', 'Uint8ClampedArray']; DESCRIPTORS && test('%TypedArrayPrototype%.keys', function(assert){ var i$, x$, ref$, len$, Typed, iter; for (i$ = 0, len$ = (ref$ = arrays).length; i$ < len$; ++i$) { x$ = ref$[i$]; Typed = global[x$]; assert.isFunction(Typed.prototype.keys, x$ + "::keys is function"); assert.arity(Typed.prototype.keys, 0, x$ + "::keys arity is 0"); assert.name(Typed.prototype.keys, 'keys', x$ + "::keys name is 'keys'"); assert.looksNative(Typed.prototype.keys, x$ + "::keys looks native"); iter = new Typed([1, 2, 3]).keys(); assert.isIterator(iter); assert.isIterable(iter); assert.strictEqual(iter[typeof Symbol != 'undefined' && Symbol !== null ? Symbol.toStringTag : void 8], 'Array Iterator'); assert.deepEqual(iter.next(), { value: 0, done: false }, 'step 1'); assert.deepEqual(iter.next(), { value: 1, done: false }, 'step 2'); assert.deepEqual(iter.next(), { value: 2, done: false }, 'step 3'); assert.deepEqual(iter.next(), { value: void 8, done: true }, 'done'); NATIVE && assert.throws(fn$, "isn't generic"); } function fn$(){ Typed.prototype.keys.call([1, 2]); } }); DESCRIPTORS && test('%TypedArrayPrototype%.values', function(assert){ var i$, x$, ref$, len$, Typed, iter; for (i$ = 0, len$ = (ref$ = arrays).length; i$ < len$; ++i$) { x$ = ref$[i$]; Typed = global[x$]; assert.isFunction(Typed.prototype.values, x$ + "::values is function"); assert.arity(Typed.prototype.values, 0, x$ + "::values arity is 0"); assert.name(Typed.prototype.values, 'values', x$ + "::values name is 'values'"); assert.looksNative(Typed.prototype.values, x$ + "::values looks native"); iter = new Typed([1, 2, 3]).values(); assert.isIterator(iter); assert.isIterable(iter); assert.strictEqual(iter[typeof Symbol != 'undefined' && Symbol !== null ? Symbol.toStringTag : void 8], 'Array Iterator'); assert.deepEqual(iter.next(), { value: 1, done: false }, 'step 1'); assert.deepEqual(iter.next(), { value: 2, done: false }, 'step 2'); assert.deepEqual(iter.next(), { value: 3, done: false }, 'step 3'); assert.deepEqual(iter.next(), { value: void 8, done: true }, 'done'); NATIVE && assert.throws(fn$, "isn't generic"); } function fn$(){ Typed.prototype.values.call([1, 2]); } }); DESCRIPTORS && test('%TypedArrayPrototype%.entries', function(assert){ var i$, x$, ref$, len$, Typed, iter; for (i$ = 0, len$ = (ref$ = arrays).length; i$ < len$; ++i$) { x$ = ref$[i$]; Typed = global[x$]; assert.isFunction(Typed.prototype.entries, x$ + "::entries is function"); assert.arity(Typed.prototype.entries, 0, x$ + "::entries arity is 0"); assert.name(Typed.prototype.entries, 'entries', x$ + "::entries name is 'entries'"); assert.looksNative(Typed.prototype.entries, x$ + "::entries looks native"); iter = new Typed([1, 2, 3]).entries(); assert.isIterator(iter); assert.isIterable(iter); assert.strictEqual(iter[typeof Symbol != 'undefined' && Symbol !== null ? Symbol.toStringTag : void 8], 'Array Iterator'); assert.deepEqual(iter.next(), { value: [0, 1], done: false }, 'step 1'); assert.deepEqual(iter.next(), { value: [1, 2], done: false }, 'step 2'); assert.deepEqual(iter.next(), { value: [2, 3], done: false }, 'step 3'); assert.deepEqual(iter.next(), { value: void 8, done: true }, 'done'); NATIVE && assert.throws(fn$, "isn't generic"); } function fn$(){ Typed.prototype.entries.call([1, 2]); } }); DESCRIPTORS && test('%TypedArrayPrototype%.@@iterator', function(assert){ var i$, x$, ref$, len$, Typed, iter; for (i$ = 0, len$ = (ref$ = arrays).length; i$ < len$; ++i$) { x$ = ref$[i$]; Typed = global[x$]; assert.isIterable(Typed.prototype, x$ + " is itrable"); assert.arity(Typed.prototype[typeof Symbol != 'undefined' && Symbol !== null ? Symbol.iterator : void 8], 0, x$ + "::@@iterator arity is 0"); assert.name(Typed.prototype[typeof Symbol != 'undefined' && Symbol !== null ? Symbol.iterator : void 8], 'values', x$ + "::@@iterator name is 'values'"); assert.looksNative(Typed.prototype[typeof Symbol != 'undefined' && Symbol !== null ? Symbol.iterator : void 8], x$ + "::@@iterator looks native"); assert.strictEqual(Typed.prototype[typeof Symbol != 'undefined' && Symbol !== null ? Symbol.iterator : void 8], Typed.prototype.values); iter = new Typed([1, 2, 3])[typeof Symbol != 'undefined' && Symbol !== null ? Symbol.iterator : void 8](); assert.isIterator(iter); assert.isIterable(iter); assert.strictEqual(iter[typeof Symbol != 'undefined' && Symbol !== null ? Symbol.toStringTag : void 8], 'Array Iterator'); assert.deepEqual(iter.next(), { value: 1, done: false }, 'step 1'); assert.deepEqual(iter.next(), { value: 2, done: false }, 'step 2'); assert.deepEqual(iter.next(), { value: 3, done: false }, 'step 3'); assert.deepEqual(iter.next(), { value: void 8, done: true }, 'done'); NATIVE && assert.throws(fn$, "isn't generic"); } function fn$(){ Typed.prototype[typeof Symbol != 'undefined' && Symbol !== null ? Symbol.iterator : void 8].call([1, 2]); } }); }).call(this); // Generated by LiveScript 1.4.0 (function(){ var module, test; module = QUnit.module, test = QUnit.test; module('ES6'); DESCRIPTORS && test('%TypedArrayPrototype%.join', function(assert){ var i$, x$, ref$, len$, Typed; for (i$ = 0, len$ = (ref$ = ['Float32Array', 'Float64Array', 'Int8Array', 'Int16Array', 'Int32Array', 'Uint8Array', 'Uint16Array', 'Uint32Array', 'Uint8ClampedArray']).length; i$ < len$; ++i$) { x$ = ref$[i$]; Typed = global[x$]; assert.isFunction(Typed.prototype.join, x$ + "::join is function"); assert.arity(Typed.prototype.join, 1, x$ + "::join arity is 1"); assert.name(Typed.prototype.join, 'join', x$ + "::join name is 'join'"); assert.looksNative(Typed.prototype.join, x$ + "::join looks native"); assert.same(new Typed([1, 2, 3]).join('|'), '1|2|3', 'works #1'); assert.same(new Typed([1, 2, 3]).join(), '1,2,3', 'works #2'); assert.throws(fn$, "isn't generic"); } function fn$(){ Typed.prototype.join.call([1, 2, 3]); } }); }).call(this); // Generated by LiveScript 1.4.0 (function(){ var module, test; module = QUnit.module, test = QUnit.test; module('ES6'); DESCRIPTORS && test('%TypedArrayPrototype%.lastIndexOf', function(assert){ var i$, x$, ref$, len$, Typed; for (i$ = 0, len$ = (ref$ = ['Float32Array', 'Float64Array', 'Int8Array', 'Int16Array', 'Int32Array', 'Uint8Array', 'Uint16Array', 'Uint32Array', 'Uint8ClampedArray']).length; i$ < len$; ++i$) { x$ = ref$[i$]; Typed = global[x$]; assert.isFunction(Typed.prototype.lastIndexOf, x$ + "::lastIndexOf is function"); assert.arity(Typed.prototype.lastIndexOf, 1, x$ + "::lastIndexOf arity is 1"); assert.name(Typed.prototype.lastIndexOf, 'lastIndexOf', x$ + "::lastIndexOf name is 'lastIndexOf'"); assert.looksNative(Typed.prototype.lastIndexOf, x$ + "::lastIndexOf looks native"); assert.same(new Typed([1, 1, 1]).lastIndexOf(1), 2); assert.same(new Typed([1, 2, 3]).lastIndexOf(3, 1), -1); assert.same(new Typed([1, 2, 3]).lastIndexOf(2, 1), 1); assert.same(new Typed([1, 2, 3]).lastIndexOf(2, -3), -1); assert.same(new Typed([1, 2, 3]).lastIndexOf(2, -2), 1); assert.throws(fn$, "isn't generic"); } function fn$(){ Typed.prototype.lastIndexOf.call([1, 2], 1); } }); }).call(this); // Generated by LiveScript 1.4.0 (function(){ var module, test; module = QUnit.module, test = QUnit.test; module('ES6'); DESCRIPTORS && test('%TypedArrayPrototype%.map', function(assert){ var i$, x$, ref$, len$, Typed, a, ctx, instance, v, k; for (i$ = 0, len$ = (ref$ = ['Float32Array', 'Float64Array', 'Int8Array', 'Int16Array', 'Int32Array', 'Uint8Array', 'Uint16Array', 'Uint32Array', 'Uint8ClampedArray']).length; i$ < len$; ++i$) { x$ = ref$[i$]; Typed = global[x$]; assert.isFunction(Typed.prototype.map, x$ + "::map is function"); assert.arity(Typed.prototype.map, 1, x$ + "::map arity is 1"); assert.name(Typed.prototype.map, 'map', x$ + "::map name is 'map'"); assert.looksNative(Typed.prototype.map, x$ + "::map looks native"); (a = new Typed([1])).map(fn$, ctx = {}); instance = new Typed([1, 2, 3, 4, 5]).map((fn1$)); assert.ok(instance instanceof Typed, 'correct instance'); assert.arrayEqual(instance, [2, 4, 6, 8, 10], 'works'); v = ''; k = ''; new Typed([1, 2, 3]).map(fn2$); assert.same(v, '123'); assert.same(k, '012'); assert.throws(fn3$, "isn't generic"); } function fn$(val, key, that){ assert.same(arguments.length, 3, 'correct number of callback arguments'); assert.same(val, 1, 'correct value in callback'); assert.same(key, 0, 'correct index in callback'); assert.same(that, a, 'correct link to array in callback'); return assert.same(this, ctx, 'correct callback context'); } function fn1$(it){ return it * 2; } function fn2$(a, b){ v += a; k += b; } function fn3$(){ Typed.prototype.map.call([0], function(){ return true; }); } }); }).call(this); // Generated by LiveScript 1.4.0 (function(){ var module, test; module = QUnit.module, test = QUnit.test; module('ES6'); DESCRIPTORS && test('%TypedArray%.of', function(assert){ var i$, x$, ref$, len$, Typed, inst; for (i$ = 0, len$ = (ref$ = ['Float32Array', 'Float64Array', 'Int8Array', 'Int16Array', 'Int32Array', 'Uint8Array', 'Uint16Array', 'Uint32Array', 'Uint8ClampedArray']).length; i$ < len$; ++i$) { x$ = ref$[i$]; Typed = global[x$]; assert.isFunction(Typed.of, x$ + ".of is function"); assert.arity(Typed.of, 0, x$ + ".of arity is 0"); assert.name(Typed.of, 'of', x$ + ".of name is 'of'"); assert.looksNative(Typed.of, x$ + ".of looks native"); inst = Typed.of(); assert.ok(inst instanceof Typed, 'correct instance with 0 arguments'); assert.arrayEqual(inst, [], 'correct elements with 0 arguments'); inst = Typed.of(1); assert.ok(inst instanceof Typed, 'correct instance with 1 argument'); assert.arrayEqual(inst, [1], 'correct elements with 1 argument'); inst = Typed.of(1, 2, 3); assert.ok(inst instanceof Typed, 'correct instance with several arguments'); assert.arrayEqual(inst, [1, 2, 3], 'correct elements with several arguments'); assert.throws(fn$, "isn't generic #1"); NATIVE && assert.throws(fn1$, "isn't generic #2"); } function fn$(){ Typed.of.call(void 8, 1); } function fn1$(){ Typed.of.call(Array, 1); } }); }).call(this); // Generated by LiveScript 1.4.0 (function(){ var module, test; module = QUnit.module, test = QUnit.test; module('ES6'); DESCRIPTORS && test('%TypedArrayPrototype%.reduceRight', function(assert){ var i$, x$, ref$, len$, Typed, a, accumulator, v, k, fn1$ = curry$(function(x$, y$){ return x$ + y$; }), fn3$ = curry$(function(x$, y$){ return x$ + y$; }); for (i$ = 0, len$ = (ref$ = ['Float32Array', 'Float64Array', 'Int8Array', 'Int16Array', 'Int32Array', 'Uint8Array', 'Uint16Array', 'Uint32Array', 'Uint8ClampedArray']).length; i$ < len$; ++i$) { x$ = ref$[i$]; Typed = global[x$]; assert.isFunction(Typed.prototype.reduceRight, x$ + "::reduceRight is function"); assert.arity(Typed.prototype.reduceRight, 1, x$ + "::reduceRight arity is 1"); assert.name(Typed.prototype.reduceRight, 'reduceRight', x$ + "::reduceRight name is 'reduceRight'"); assert.looksNative(Typed.prototype.reduceRight, x$ + "::reduceRight looks native"); (a = new Typed([1])).reduceRight(fn$, accumulator = {}); assert.same(new Typed([1, 2, 3]).reduceRight(fn1$, 1), 7, 'works with initial accumulator'); (a = new Typed([1, 2])).reduceRight(fn2$); assert.same(new Typed([1, 2, 3]).reduceRight(fn3$), 6, 'works without initial accumulator'); v = ''; k = ''; new Typed([1, 2, 3]).reduceRight(fn4$, 0); assert.same(v, '321', 'correct order #1'); assert.same(k, '210', 'correct order #2'); assert.throws(fn5$, "isn't generic"); } function fn$(memo, val, key, that){ assert.same(arguments.length, 4, 'correct number of callback arguments'); assert.same(memo, accumulator, 'correct callback accumulator'); assert.same(val, 1, 'correct value in callback'); assert.same(key, 0, 'correct index in callback'); return assert.same(that, a, 'correct link to array in callback'); } function fn2$(memo, val, key, that){ assert.same(memo, 2, 'correct default accumulator'); assert.same(val, 1, 'correct start value without initial accumulator'); return assert.same(key, 0, 'correct start index without initial accumulator'); } function fn4$(memo, a, b){ v += a; k += b; } function fn5$(){ Typed.prototype.reduceRight.call([0], function(){ return true; }); } }); function curry$(f, bound){ var context, _curry = function(args) { return f.length > 1 ? function(){ var params = args ? args.concat() : []; context = bound ? context || this : this; return params.push.apply(params, arguments) < f.length && arguments.length ? _curry.call(context, params) : f.apply(context, params); } : f; }; return _curry(); } }).call(this); // Generated by LiveScript 1.4.0 (function(){ var module, test; module = QUnit.module, test = QUnit.test; module('ES6'); DESCRIPTORS && test('%TypedArrayPrototype%.reduce', function(assert){ var i$, x$, ref$, len$, Typed, a, accumulator, v, k, fn1$ = curry$(function(x$, y$){ return x$ + y$; }), fn3$ = curry$(function(x$, y$){ return x$ + y$; }); for (i$ = 0, len$ = (ref$ = ['Float32Array', 'Float64Array', 'Int8Array', 'Int16Array', 'Int32Array', 'Uint8Array', 'Uint16Array', 'Uint32Array', 'Uint8ClampedArray']).length; i$ < len$; ++i$) { x$ = ref$[i$]; Typed = global[x$]; assert.isFunction(Typed.prototype.reduce, x$ + "::reduce is function"); assert.arity(Typed.prototype.reduce, 1, x$ + "::reduce arity is 1"); assert.name(Typed.prototype.reduce, 'reduce', x$ + "::reduce name is 'reduce'"); assert.looksNative(Typed.prototype.reduce, x$ + "::reduce looks native"); (a = new Typed([1])).reduce(fn$, accumulator = {}); assert.same(new Typed([1, 2, 3]).reduce(fn1$, 1), 7, 'works with initial accumulator'); (a = new Typed([1, 2])).reduce(fn2$); assert.same(new Typed([1, 2, 3]).reduce(fn3$), 6, 'works without initial accumulator'); v = ''; k = ''; new Typed([1, 2, 3]).reduce(fn4$, 0); assert.same(v, '123', 'correct order #1'); assert.same(k, '012', 'correct order #2'); assert.throws(fn5$, "isn't generic"); } function fn$(memo, val, key, that){ assert.same(arguments.length, 4, 'correct number of callback arguments'); assert.same(memo, accumulator, 'correct callback accumulator'); assert.same(val, 1, 'correct value in callback'); assert.same(key, 0, 'correct index in callback'); return assert.same(that, a, 'correct link to array in callback'); } function fn2$(memo, val, key, that){ assert.same(memo, 1, 'correct default accumulator'); assert.same(val, 2, 'correct start value without initial accumulator'); return assert.same(key, 1, 'correct start index without initial accumulator'); } function fn4$(memo, a, b){ v += a; k += b; } function fn5$(){ Typed.prototype.reduce.call([0], function(){ return true; }); } }); function curry$(f, bound){ var context, _curry = function(args) { return f.length > 1 ? function(){ var params = args ? args.concat() : []; context = bound ? context || this : this; return params.push.apply(params, arguments) < f.length && arguments.length ? _curry.call(context, params) : f.apply(context, params); } : f; }; return _curry(); } }).call(this); // Generated by LiveScript 1.4.0 (function(){ var module, test; module = QUnit.module, test = QUnit.test; module('ES6'); DESCRIPTORS && test('%TypedArrayPrototype%.reverse', function(assert){ var i$, x$, ref$, len$, Typed, a; for (i$ = 0, len$ = (ref$ = ['Float32Array', 'Float64Array', 'Int8Array', 'Int16Array', 'Int32Array', 'Uint8Array', 'Uint16Array', 'Uint32Array', 'Uint8ClampedArray']).length; i$ < len$; ++i$) { x$ = ref$[i$]; Typed = global[x$]; assert.isFunction(Typed.prototype.reverse, x$ + "::reverse is function"); assert.arity(Typed.prototype.reverse, 0, x$ + "::reverse arity is 0"); assert.name(Typed.prototype.reverse, 'reverse', x$ + "::reverse name is 'reverse'"); assert.looksNative(Typed.prototype.reverse, x$ + "::reverse looks native"); assert.same((a = new Typed([1, 2])).reverse(), a, 'return this'); assert.arrayEqual(new Typed([1, 2, 3, 4]).reverse(), [4, 3, 2, 1], 'works #1'); assert.arrayEqual(new Typed([1, 2, 3]).reverse(), [3, 2, 1], 'works #2'); assert.throws(fn$, "isn't generic"); } function fn$(){ Typed.prototype.reverse.call([1, 2]); } }); }).call(this); // Generated by LiveScript 1.4.0 (function(){ var module, test; module = QUnit.module, test = QUnit.test; module('ES6'); DESCRIPTORS && test('%TypedArrayPrototype%.set', function(assert){ var i$, x$, ref$, len$, Typed, a, b, y$; for (i$ = 0, len$ = (ref$ = ['Float32Array', 'Float64Array', 'Int8Array', 'Int16Array', 'Int32Array', 'Uint8Array', 'Uint16Array', 'Uint32Array', 'Uint8ClampedArray']).length; i$ < len$; ++i$) { x$ = ref$[i$]; Typed = global[x$]; assert.isFunction(Typed.prototype.set, x$ + "::set is function"); NATIVE && assert.arity(Typed.prototype.set, 1, x$ + "::set arity is 1"); assert.name(Typed.prototype.set, 'set', x$ + "::set name is 'subarray'"); assert.looksNative(Typed.prototype.set, x$ + "::set looks native"); assert.same(new Typed(1).set([1]), void 8, 'void'); a = new Typed([1, 2, 3, 4, 5]); b = new Typed(5); b.set(a); assert.arrayEqual(b, [1, 2, 3, 4, 5]); assert.throws(fn$); assert.throws(fn1$); b.set(new Typed([99, 98]), 2); assert.arrayEqual(b, [1, 2, 99, 98, 5]); b.set(new Typed([99, 98, 97]), 2); assert.arrayEqual(b, [1, 2, 99, 98, 97]); assert.throws(fn2$); assert.throws(fn3$); assert.arrayEqual((y$ = new Typed(2), y$.set({ length: 2, 0: 1, 1: 2 }), y$), [1, 2]); assert.throws(fn4$, "isn't generic"); } function fn$(){ b.set(a, 1); } function fn1$(){ b.set(a, -1); } function fn2$(){ b.set(new Typed([99, 98, 97, 96]), 2); } function fn3$(){ b.set([101, 102, 103, 104], 4); } function fn4$(){ Typed.prototype.set.call([1, 2, 3], [1]); } }); }).call(this); // Generated by LiveScript 1.4.0 (function(){ var module, test; module = QUnit.module, test = QUnit.test; module('ES6'); DESCRIPTORS && test('%TypedArrayPrototype%.slice', function(assert){ var i$, x$, ref$, len$, Typed, arr; for (i$ = 0, len$ = (ref$ = ['Float32Array', 'Float64Array', 'Int8Array', 'Int16Array', 'Int32Array', 'Uint8Array', 'Uint16Array', 'Uint32Array', 'Uint8ClampedArray']).length; i$ < len$; ++i$) { x$ = ref$[i$]; Typed = global[x$]; assert.isFunction(Typed.prototype.slice, x$ + "::slice is function"); NATIVE && assert.arity(Typed.prototype.slice, 2, x$ + "::slice arity is 2"); assert.name(Typed.prototype.slice, 'slice', x$ + "::slice name is 'subarray'"); assert.looksNative(Typed.prototype.slice, x$ + "::slice looks native"); arr = new Typed([1, 2, 3, 4, 5]); assert.ok(arr.slice() !== arr, 'returns new array'); assert.ok(arr.slice() instanceof Typed, 'correct instance'); assert.ok(arr.slice().buffer !== arr.buffer, 'with new buffer'); assert.arrayEqual(arr.slice(), arr); assert.arrayEqual(arr.slice(1, 3), [2, 3]); assert.arrayEqual(arr.slice(1, void 8), [2, 3, 4, 5]); assert.arrayEqual(arr.slice(1, -1), [2, 3, 4]); assert.arrayEqual(arr.slice(-2, -1), [4]); assert.arrayEqual(arr.slice(-2, -3), []); assert.throws(fn$, "isn't generic"); } function fn$(){ Typed.prototype.slice.call([1, 2, 3], 1); } }); }).call(this); // Generated by LiveScript 1.4.0 (function(){ var module, test; module = QUnit.module, test = QUnit.test; module('ES6'); DESCRIPTORS && test('%TypedArrayPrototype%.some', function(assert){ var i$, x$, ref$, len$, Typed, a, ctx, v, k, arr; for (i$ = 0, len$ = (ref$ = ['Float32Array', 'Float64Array', 'Int8Array', 'Int16Array', 'Int32Array', 'Uint8Array', 'Uint16Array', 'Uint32Array', 'Uint8ClampedArray']).length; i$ < len$; ++i$) { x$ = ref$[i$]; Typed = global[x$]; assert.isFunction(Typed.prototype.some, x$ + "::some is function"); assert.arity(Typed.prototype.some, 1, x$ + "::some arity is 1"); assert.name(Typed.prototype.some, 'some', x$ + "::some name is 'some'"); assert.looksNative(Typed.prototype.some, x$ + "::some looks native"); (a = new Typed([1])).some(fn$, ctx = {}); assert.ok(new Typed([1, 2, 3]).some(fn1$)); assert.ok(new Typed([1, 2, 3]).some((fn2$))); assert.ok(!new Typed([1, 2, 3]).some((fn3$))); assert.ok(!new Typed([1, 2, 3]).some(fn4$)); v = ''; k = ''; new Typed([1, 2, 3]).some(fn5$); assert.same(v, '123'); assert.same(k, '012'); assert.ok((arr = new Typed([1, 2, 3])).some(fn6$)); assert.throws(fn7$, "isn't generic"); } function fn$(val, key, that){ assert.same(arguments.length, 3, 'correct number of callback arguments'); assert.same(val, 1, 'correct value in callback'); assert.same(key, 0, 'correct index in callback'); assert.same(that, a, 'correct link to array in callback'); return assert.same(this, ctx, 'correct callback context'); } function fn1$(it){ return typeof it === 'number'; } function fn2$(it){ return it < 3; } function fn3$(it){ return it < 0; } function fn4$(it){ return typeof it === 'string'; } function fn5$(a, b){ v += a; k += b; } function fn6$(){ return arguments[2] === arr; } function fn7$(){ Typed.prototype.some.call([0], function(){ return true; }); } }); }).call(this); // Generated by LiveScript 1.4.0 (function(){ var module, test; module = QUnit.module, test = QUnit.test; module('ES6'); DESCRIPTORS && test('%TypedArrayPrototype%.subarray', function(assert){ var i$, x$, ref$, len$, Typed, a, b; for (i$ = 0, len$ = (ref$ = ['Float32Array', 'Float64Array', 'Int8Array', 'Int16Array', 'Int32Array', 'Uint8Array', 'Uint16Array', 'Uint32Array', 'Uint8ClampedArray']).length; i$ < len$; ++i$) { x$ = ref$[i$]; Typed = global[x$]; assert.isFunction(Typed.prototype.subarray, x$ + "::subarray is function"); NATIVE && assert.arity(Typed.prototype.subarray, 2, x$ + "::subarray arity is 2"); assert.name(Typed.prototype.subarray, 'subarray', x$ + "::subarray name is 'subarray'"); assert.looksNative(Typed.prototype.subarray, x$ + "::subarray looks native"); a = new Typed([1, 2, 3, 4, 5]); b = a.subarray(3); assert.ok(a !== b, 'creates new array'); assert.ok(b instanceof Typed, "instance " + x$); assert.same(a.buffer, b.buffer, 'with the same buffer'); assert.arrayEqual(b, [4, 5]); assert.arrayEqual(a.subarray(1, 3), [2, 3]); assert.arrayEqual(a.subarray(-3), [3, 4, 5]); assert.arrayEqual(a.subarray(-3, -1), [3, 4]); assert.arrayEqual(a.subarray(3, 2), []); assert.arrayEqual(a.subarray(-2, -3), []); assert.arrayEqual(a.subarray(4, 1), []); assert.arrayEqual(a.subarray(-1, -4), []); assert.arrayEqual(a.subarray(1).subarray(1), [3, 4, 5]); assert.arrayEqual(a.subarray(1, 4).subarray(1, 2), [3]); assert.throws(fn$, "isn't generic"); } function fn$(){ Typed.prototype.subarray.call([1, 2, 3], 1); } }); }).call(this); // Generated by LiveScript 1.4.0 (function(){ var module, test; module = QUnit.module, test = QUnit.test; module('ES6'); DESCRIPTORS && test('%TypedArrayPrototype%.toLocaleString', function(assert){ var i$, x$, ref$, len$, Typed; for (i$ = 0, len$ = (ref$ = ['Float32Array', 'Float64Array', 'Int8Array', 'Int16Array', 'Int32Array', 'Uint8Array', 'Uint16Array', 'Uint32Array', 'Uint8ClampedArray']).length; i$ < len$; ++i$) { x$ = ref$[i$]; Typed = global[x$]; assert.isFunction(Typed.prototype.toLocaleString, x$ + "::toLocaleString is function"); assert.arity(Typed.prototype.toLocaleString, 0, x$ + "::toLocaleString arity is 0"); assert.name(Typed.prototype.toLocaleString, 'toLocaleString', x$ + "::toLocaleString name is 'toLocaleString'"); assert.looksNative(Typed.prototype.toLocaleString, x$ + "::toLocaleString looks native"); assert.same(new Typed([1, 2, 3]).toLocaleString(), [1, 2, 3].toLocaleString(), 'works'); assert.throws(fn$, "isn't generic"); } function fn$(){ Typed.prototype.toLocaleString.call([1, 2, 3]); } }); }).call(this); // Generated by LiveScript 1.4.0 (function(){ var module, test; module = QUnit.module, test = QUnit.test; module('ES6'); DESCRIPTORS && test('%TypedArrayPrototype%.toString', function(assert){ var i$, x$, ref$, len$, Typed; for (i$ = 0, len$ = (ref$ = ['Float32Array', 'Float64Array', 'Int8Array', 'Int16Array', 'Int32Array', 'Uint8Array', 'Uint16Array', 'Uint32Array', 'Uint8ClampedArray']).length; i$ < len$; ++i$) { x$ = ref$[i$]; Typed = global[x$]; assert.isFunction(Typed.prototype.toString, x$ + "::toString is function"); assert.arity(Typed.prototype.toString, 0, x$ + "::toString arity is 0"); assert.name(Typed.prototype.toString, 'toString', x$ + "::toString name is 'toString'"); assert.looksNative(Typed.prototype.toString, x$ + "::toString looks native"); assert.same(new Typed([1, 2, 3]).toString(), '1,2,3', 'works'); assert.same(Typed.prototype.toString.call([1, 2, 3]), '1,2,3', "generic"); } }); }).call(this); // Generated by LiveScript 1.4.0 (function(){ var module, test, freeze; module = QUnit.module, test = QUnit.test; module('ES6'); freeze = Object.freeze; test('WeakMap', function(assert){ var a, x$, f, M, done, iter, o, key, C, O; assert.isFunction(WeakMap); assert.name(WeakMap, 'WeakMap'); assert.arity(WeakMap, 0); assert.looksNative(WeakMap); assert.ok('delete' in WeakMap.prototype, 'delete in WeakMap.prototype'); assert.ok('get' in WeakMap.prototype, 'get in WeakMap.prototype'); assert.ok('has' in WeakMap.prototype, 'has in WeakMap.prototype'); assert.ok('set' in WeakMap.prototype, 'set in WeakMap.prototype'); assert.ok(new WeakMap instanceof WeakMap, 'new WeakMap instanceof WeakMap'); assert.strictEqual(new WeakMap(createIterable([[a = {}, 42]])).get(a), 42, 'Init from iterable'); assert.strictEqual((x$ = new WeakMap(), x$.set(f = freeze({}), 42), x$).get(f), 42, 'Support frozen objects'); M = new WeakMap; M.set(freeze(f = {}), 42); assert.strictEqual(M.has(f), true); assert.strictEqual(M.get(f), 42); M['delete'](f); assert.strictEqual(M.has(f), false); assert.strictEqual(M.get(f), void 8); done = false; iter = createIterable([null, 1, 2], { 'return': function(){ return done = true; } }); try { new WeakMap(iter); } catch (e$) {} assert.ok(done, '.return #throw'); assert.ok(!('clear' in WeakMap.prototype), 'should not contains `.clear` method'); a = []; done = false; a[typeof Symbol != 'undefined' && Symbol !== null ? Symbol.iterator : void 8] = function(){ done = true; return [][typeof Symbol != 'undefined' && Symbol !== null ? Symbol.iterator : void 8].call(this); }; new WeakMap(a); assert.ok(done); o = {}; new WeakMap().set(o, 1); if (DESCRIPTORS) { assert.arrayEqual((function(){ var results$ = []; for (key in o) { results$.push(key); } return results$; }()), []); assert.arrayEqual(Object.keys(o), []); } assert.arrayEqual(Object.getOwnPropertyNames(o), []); ((typeof Object != 'undefined' && Object !== null) && Object.getOwnPropertySymbols) && assert.arrayEqual(Object.getOwnPropertySymbols(o), []); ((typeof Reflect != 'undefined' && Reflect !== null) && Reflect.ownKeys) && assert.arrayEqual(Reflect.ownKeys(o), []); if (nativeSubclass) { C = nativeSubclass(WeakMap); assert.ok(new C instanceof C, 'correct subclassing with native classes #1'); assert.ok(new C instanceof WeakMap, 'correct subclassing with native classes #2'); assert.same(new C().set(O = {}, 2).get(O), 2, 'correct subclassing with native classes #3'); } }); test('WeakMap#delete', function(assert){ var x$, M, a, b; assert.isFunction(WeakMap.prototype['delete']); NATIVE && assert.name(WeakMap.prototype['delete'], 'delete'); NATIVE && assert.arity(WeakMap.prototype['delete'], 1); assert.looksNative(WeakMap.prototype['delete']); assert.nonEnumerable(WeakMap.prototype, 'delete'); x$ = M = new WeakMap(); x$.set(a = {}, 42); x$.set(b = {}, 21); assert.ok(M.has(a) && M.has(b), 'WeakMap has values before .delete()'); M['delete'](a); assert.ok(!M.has(a) && M.has(b), 'WeakMap hasn`t value after .delete()'); assert.ok((function(){ try { return !M['delete'](1); } catch (e$) {} }()), 'return false on primitive'); }); test('WeakMap#get', function(assert){ var M, a; assert.isFunction(WeakMap.prototype.get); assert.name(WeakMap.prototype.get, 'get'); NATIVE && assert.arity(WeakMap.prototype.get, 1); assert.looksNative(WeakMap.prototype.get); assert.nonEnumerable(WeakMap.prototype, 'get'); M = new WeakMap(); assert.strictEqual(M.get({}), void 8, 'WeakMap .get() before .set() return undefined'); M.set(a = {}, 42); assert.strictEqual(M.get(a), 42, 'WeakMap .get() return value'); M['delete'](a); assert.strictEqual(M.get(a), void 8, 'WeakMap .get() after .delete() return undefined'); assert.ok((function(){ try { return void 8 === M.get(1); } catch (e$) {} }()), 'return undefined on primitive'); }); test('WeakMap#has', function(assert){ var M, a; assert.isFunction(WeakMap.prototype.has); assert.name(WeakMap.prototype.has, 'has'); NATIVE && assert.arity(WeakMap.prototype.has, 1); assert.looksNative(WeakMap.prototype.has); assert.nonEnumerable(WeakMap.prototype, 'has'); M = new WeakMap(); assert.ok(!M.has({}), 'WeakMap .has() before .set() return false'); M.set(a = {}, 42); assert.ok(M.has(a), 'WeakMap .has() return true'); M['delete'](a); assert.ok(!M.has(a), 'WeakMap .has() after .delete() return false'); assert.ok((function(){ try { return !M.has(1); } catch (e$) {} }()), 'return false on primitive'); }); test('WeakMap#set', function(assert){ var x$, a, e, wmap; assert.isFunction(WeakMap.prototype.set); assert.name(WeakMap.prototype.set, 'set'); assert.arity(WeakMap.prototype.set, 2); assert.looksNative(WeakMap.prototype.set); assert.nonEnumerable(WeakMap.prototype, 'set'); assert.same((x$ = new WeakMap(), x$.set(a = {}, 42), x$).get(a), 42, 'works with object as keys'); assert.ok((function(){ try { new WeakMap().set(42, 42); return false; } catch (e$) { e = e$; return true; } }()), 'throws with primitive keys'); wmap = new WeakMap(); assert.same(wmap.set({}, 1), wmap, 'return this'); }); test('WeakMap#@@toStringTag', function(assert){ assert.strictEqual(WeakMap.prototype[typeof Symbol != 'undefined' && Symbol !== null ? Symbol.toStringTag : void 8], 'WeakMap', 'WeakMap::@@toStringTag is `WeakMap`'); }); }).call(this); // Generated by LiveScript 1.4.0 (function(){ var module, test, freeze; module = QUnit.module, test = QUnit.test; module('ES6'); freeze = Object.freeze; test('WeakSet', function(assert){ var a, x$, f, S, done, iter, o, key, C, O; assert.isFunction(WeakSet); assert.name(WeakSet, 'WeakSet'); assert.arity(WeakSet, 0); assert.looksNative(WeakSet); assert.ok('add' in WeakSet.prototype, 'add in WeakSet.prototype'); assert.ok('delete' in WeakSet.prototype, 'delete in WeakSet.prototype'); assert.ok('has' in WeakSet.prototype, 'has in WeakSet.prototype'); assert.ok(new WeakSet instanceof WeakSet, 'new WeakSet instanceof WeakSet'); assert.ok(new WeakSet(createIterable([a = {}])).has(a), 'Init from iterable'); assert.ok((x$ = new WeakSet(), x$.add(freeze(f = {})), x$).has(f), 'Support frozen objects'); S = new WeakSet; S.add(freeze(f = {})); assert.strictEqual(S.has(f), true); S['delete'](f); assert.strictEqual(S.has(f), false); done = false; iter = createIterable([null, 1, 2], { 'return': function(){ return done = true; } }); try { new WeakSet(iter); } catch (e$) {} assert.ok(done, '.return #throw'); assert.ok(!('clear' in WeakSet.prototype), 'should not contains `.clear` method'); a = []; done = false; a[typeof Symbol != 'undefined' && Symbol !== null ? Symbol.iterator : void 8] = function(){ done = true; return [][typeof Symbol != 'undefined' && Symbol !== null ? Symbol.iterator : void 8].call(this); }; new WeakSet(a); assert.ok(done); o = {}; new WeakSet().add(o); if (DESCRIPTORS) { assert.arrayEqual((function(){ var results$ = []; for (key in o) { results$.push(key); } return results$; }()), []); assert.arrayEqual(Object.keys(o), []); } assert.arrayEqual(Object.getOwnPropertyNames(o), []); ((typeof Object != 'undefined' && Object !== null) && Object.getOwnPropertySymbols) && assert.arrayEqual(Object.getOwnPropertySymbols(o), []); ((typeof Reflect != 'undefined' && Reflect !== null) && Reflect.ownKeys) && assert.arrayEqual(Reflect.ownKeys(o), []); if (nativeSubclass) { C = nativeSubclass(WeakSet); assert.ok(new C instanceof C, 'correct subclassing with native classes #1'); assert.ok(new C instanceof WeakSet, 'correct subclassing with native classes #2'); assert.ok(new C().add(O = {}).has(O), 'correct subclassing with native classes #3'); } }); test('WeakSet#add', function(assert){ var a, e, wset; assert.isFunction(WeakSet.prototype.add); assert.name(WeakSet.prototype.add, 'add'); assert.arity(WeakSet.prototype.add, 1); assert.looksNative(WeakSet.prototype.add); assert.nonEnumerable(WeakSet.prototype, 'add'); assert.ok(new WeakSet().add(a = {}), 'works with object as keys'); assert.ok((function(){ try { new WeakSet().add(42); return false; } catch (e$) { e = e$; return true; } }()), 'throws with primitive keys'); wset = new WeakSet(); assert.same(wset.add({}), wset, 'return this'); }); test('WeakSet#delete', function(assert){ var x$, S, a, b; assert.isFunction(WeakSet.prototype['delete']); NATIVE && assert.arity(WeakSet.prototype['delete'], 1); assert.looksNative(WeakSet.prototype['delete']); assert.nonEnumerable(WeakSet.prototype, 'delete'); x$ = S = new WeakSet(); x$.add(a = {}); x$.add(b = {}); assert.ok(S.has(a) && S.has(b), 'WeakSet has values before .delete()'); S['delete'](a); assert.ok(!S.has(a) && S.has(b), 'WeakSet hasn`t value after .delete()'); assert.ok((function(){ try { return !S['delete'](1); } catch (e$) {} }()), 'return false on primitive'); }); test('WeakSet#has', function(assert){ var M, a; assert.isFunction(WeakSet.prototype.has); assert.name(WeakSet.prototype.has, 'has'); assert.arity(WeakSet.prototype.has, 1); assert.looksNative(WeakSet.prototype.has); assert.nonEnumerable(WeakSet.prototype, 'has'); M = new WeakSet(); assert.ok(!M.has({}), 'WeakSet has`nt value'); M.add(a = {}); assert.ok(M.has(a), 'WeakSet has value after .add()'); M['delete'](a); assert.ok(!M.has(a), 'WeakSet has`nt value after .delete()'); assert.ok((function(){ try { return !M.has(1); } catch (e$) {} }()), 'return false on primitive'); }); test('WeakSet::@@toStringTag', function(assert){ assert.strictEqual(WeakSet.prototype[typeof Symbol != 'undefined' && Symbol !== null ? Symbol.toStringTag : void 8], 'WeakSet', 'WeakSet::@@toStringTag is `WeakSet`'); }); }).call(this); // Generated by LiveScript 1.4.0 (function(){ var module, test; module = QUnit.module, test = QUnit.test; module('ES7'); test('Array#includes', function(assert){ var arr, o; assert.isFunction(Array.prototype.includes); assert.name(Array.prototype.includes, 'includes'); assert.arity(Array.prototype.includes, 1); assert.looksNative(Array.prototype.includes); assert.nonEnumerable(Array.prototype, 'includes'); arr = [1, 2, 3, -0, o = {}]; assert.ok(arr.includes(1)); assert.ok(arr.includes(-0)); assert.ok(arr.includes(0)); assert.ok(arr.includes(o)); assert.ok(!arr.includes(4)); assert.ok(!arr.includes(-0.5)); assert.ok(!arr.includes({})); assert.ok(Array(1).includes(void 8)); assert.ok([NaN].includes(NaN)); if (STRICT) { assert.throws(function(){ Array.prototype.includes.call(null, 0); }, TypeError); assert.throws(function(){ Array.prototype.includes.call(void 8, 0); }, TypeError); } if (NATIVE && DESCRIPTORS) { assert.ok((function(){ try { return false === Array.prototype.includes.call(Object.defineProperty({ length: -1 }, 0, { get: function(){ throw Error(); } }), 1); } catch (e$) {} }()), 'uses ToLength'); } assert.ok('includes' in Array.prototype[Symbol.unscopables], 'In Array#@@unscopables'); }); }).call(this); // Generated by LiveScript 1.4.0 (function(){ var module, test; module = QUnit.module, test = QUnit.test; module('ES6'); test('asap', function(assert){ var async, done, after; assert.expect(5); assert.isFunction(asap); assert.arity(asap, 1); assert.name(asap, 'asap'); assert.looksNative(asap); async = assert.async(); done = false; asap(function(){ if (!done) { done = true; assert.ok(after, 'works'); async(); } }); setTimeout(function(){ if (!done) { done = true; assert.ok(false, 'fails'); async(); } }, 3e3); return after = true; }); }).call(this); // Generated by LiveScript 1.4.0 (function(){ var module, test; module = QUnit.module, test = QUnit.test; module('ES7'); test('Error.isError', function(assert){ var isError; isError = Error.isError; assert.isFunction(isError); assert.arity(isError, 1); assert.name(isError, 'isError'); assert.looksNative(isError); assert.nonEnumerable(Error, 'isError'); assert.same(isError(new TypeError), true); assert.same(isError({}), false); assert.same(isError(null), false); }); }).call(this); // Generated by LiveScript 1.4.0 (function(){ var module, test; module = QUnit.module, test = QUnit.test; module('ES7'); test('Map#toJSON', function(assert){ assert.isFunction(Map.prototype.toJSON); assert.name(Map.prototype.toJSON, 'toJSON'); assert.arity(Map.prototype.toJSON, 0); assert.looksNative(Map.prototype.toJSON); assert.nonEnumerable(Map.prototype, 'toJSON'); if (typeof JSON != 'undefined' && JSON !== null) { assert.strictEqual(JSON.stringify(new Map([['a', 'b'], ['c', 'd']])), '[["a","b"],["c","d"]]', 'Works'); } }); }).call(this); // Generated by LiveScript 1.4.0 (function(){ var module, test; module = QUnit.module, test = QUnit.test; module('ES7'); test('Math.iaddh', function(assert){ var iaddh; iaddh = Math.iaddh; assert.isFunction(iaddh); assert.name(iaddh, 'iaddh'); assert.arity(iaddh, 4); assert.looksNative(iaddh); assert.nonEnumerable(Math, 'iaddh'); assert.same(iaddh(0, 2, 1, 0), 2); assert.same(iaddh(0, 4, 1, 1), 5); assert.same(iaddh(2, 4, 1, 1), 5); assert.same(iaddh(0xffffffff, 4, 1, 1), 6); assert.same(iaddh(1, 4, 0xffffffff, 1), 6); }); }).call(this); // Generated by LiveScript 1.4.0 (function(){ var module, test; module = QUnit.module, test = QUnit.test; module('ES7'); test('Math.imulh', function(assert){ var imulh; imulh = Math.imulh; assert.isFunction(imulh); assert.name(imulh, 'imulh'); assert.arity(imulh, 2); assert.looksNative(imulh); assert.nonEnumerable(Math, 'imulh'); assert.same(imulh(0xffffffff, 7), -1); assert.same(imulh(0xfffffff, 77), 4); assert.same(imulh(1, 7), 0); assert.same(imulh(-1, 7), -1); }); }).call(this); // Generated by LiveScript 1.4.0 (function(){ var module, test; module = QUnit.module, test = QUnit.test; module('ES7'); test('Math.isubh', function(assert){ var isubh; isubh = Math.isubh; assert.isFunction(isubh); assert.name(isubh, 'isubh'); assert.arity(isubh, 4); assert.looksNative(isubh); assert.nonEnumerable(Math, 'isubh'); assert.same(isubh(0, 2, 1, 0), 1); assert.same(isubh(0, 4, 1, 1), 2); assert.same(isubh(2, 4, 1, 1), 3); assert.same(isubh(0xffffffff, 4, 1, 1), 3); assert.same(isubh(1, 4, 0xffffffff, 1), 2); }); }).call(this); // Generated by LiveScript 1.4.0 (function(){ var module, test; module = QUnit.module, test = QUnit.test; module('ES7'); test('Math.umulh', function(assert){ var umulh; umulh = Math.umulh; assert.isFunction(umulh); assert.name(umulh, 'umulh'); assert.arity(umulh, 2); assert.looksNative(umulh); assert.nonEnumerable(Math, 'umulh'); assert.same(umulh(0xffffffff, 7), 6); assert.same(umulh(0xfffffff, 77), 4); assert.same(umulh(1, 7), 0); assert.same(umulh(-1, 7), 6); }); }).call(this); // Generated by LiveScript 1.4.0 (function(){ var module, test; module = QUnit.module, test = QUnit.test; module('ES7'); if (DESCRIPTORS) { test('Object#__defineGetter__', function(assert){ var __defineGetter__, O, i$, x$, ref$, len$; __defineGetter__ = Object.prototype.__defineGetter__; assert.isFunction(__defineGetter__); assert.arity(__defineGetter__, 2); assert.name(__defineGetter__, '__defineGetter__'); assert.looksNative(__defineGetter__); assert.nonEnumerable(Object.prototype, '__defineGetter__'); O = {}; assert.same(O.__defineGetter__('key', function(){ return 42; }), void 8, 'void'); assert.same(O.key, 42, 'works'); O.__defineSetter__('key', function(){ this.foo = 43; }); O.key = 44; assert.ok(O.key === 42 && O.foo === 43, 'works with setter'); if (STRICT) { for (i$ = 0, len$ = (ref$ = [null, void 8]).length; i$ < len$; ++i$) { x$ = ref$[i$]; assert.throws(fn$, TypeError, "Throws on " + x$ + " as `this`"); } } function fn$(){ __defineGetter__.call(x$, 1, function(){}); } }); } }).call(this); // Generated by LiveScript 1.4.0 (function(){ var module, test; module = QUnit.module, test = QUnit.test; module('ES7'); if (DESCRIPTORS) { test('Object#__defineSetter__', function(assert){ var __defineSetter__, O, i$, x$, ref$, len$; __defineSetter__ = Object.prototype.__defineSetter__; assert.isFunction(__defineSetter__); assert.arity(__defineSetter__, 2); assert.name(__defineSetter__, '__defineSetter__'); assert.looksNative(__defineSetter__); assert.nonEnumerable(Object.prototype, '__defineSetter__'); O = {}; assert.same(O.__defineSetter__('key', function(){ this.foo = 43; }), void 8, 'void'); O.key = 44; assert.same(O.foo, 43, 'works'); O = {}; O.__defineSetter__('key', function(){ this.foo = 43; }); O.__defineGetter__('key', function(){ return 42; }); O.key = 44; assert.ok(O.key === 42 && O.foo === 43, 'works with getter'); if (STRICT) { for (i$ = 0, len$ = (ref$ = [null, void 8]).length; i$ < len$; ++i$) { x$ = ref$[i$]; assert.throws(fn$, TypeError, "Throws on " + x$ + " as `this`"); } } function fn$(){ __defineSetter__.call(x$, 1, function(){}); } }); } }).call(this); // Generated by LiveScript 1.4.0 (function(){ var module, test; module = QUnit.module, test = QUnit.test; module('ES7'); test('Object.entries', function(assert){ var entries, create, assign; entries = Object.entries, create = Object.create, assign = Object.assign; assert.isFunction(entries); assert.arity(entries, 1); assert.name(entries, 'entries'); assert.looksNative(entries); assert.nonEnumerable(Object, 'entries'); assert.deepEqual(entries({ q: 1, w: 2, e: 3 }), [['q', 1], ['w', 2], ['e', 3]]); assert.deepEqual(entries(new String('qwe')), [['0', 'q'], ['1', 'w'], ['2', 'e']]); assert.deepEqual(entries(assign(create({ q: 1, w: 2, e: 3 }), { a: 4, s: 5, d: 6 })), [['a', 4], ['s', 5], ['d', 6]]); try { assert.deepEqual(Function('return Object.entries({a: 1, get b(){delete this.c;return 2},c: 3})')(), [['a', 1], ['b', 2]]); } catch (e$) {} try { assert.deepEqual(Function('return Object.entries({a: 1, get b(){Object.defineProperty(this, "c", {value:4,enumerable:false});return 2},c: 3})')(), [['a', 1], ['b', 2]]); } catch (e$) {} }); }).call(this); // Generated by LiveScript 1.4.0 (function(){ var module, test, create; module = QUnit.module, test = QUnit.test; module('ES7'); create = Object.create; test('Object.getOwnPropertyDescriptors', function(assert){ var getOwnPropertyDescriptors, O, s, descs; getOwnPropertyDescriptors = Object.getOwnPropertyDescriptors; assert.isFunction(getOwnPropertyDescriptors); assert.arity(getOwnPropertyDescriptors, 1); assert.name(getOwnPropertyDescriptors, 'getOwnPropertyDescriptors'); assert.looksNative(getOwnPropertyDescriptors); assert.nonEnumerable(Object, 'getOwnPropertyDescriptors'); O = create({ q: 1 }, { e: { value: 3 } }); O.w = 2; s = Symbol('s'); O[s] = 4; descs = getOwnPropertyDescriptors(O); assert.strictEqual(descs.q, void 8); assert.deepEqual(descs.w, { enumerable: true, configurable: true, writable: true, value: 2 }); if (DESCRIPTORS) { assert.deepEqual(descs.e, { enumerable: false, configurable: false, writable: false, value: 3 }); } else { assert.deepEqual(descs.e, { enumerable: true, configurable: true, writable: true, value: 3 }); } assert.strictEqual(descs[s].value, 4); }); }).call(this); // Generated by LiveScript 1.4.0 (function(){ var module, test; module = QUnit.module, test = QUnit.test; module('ES7'); if (DESCRIPTORS) { test('Object#__lookupGetter__', function(assert){ var __lookupGetter__, create, O, F, i$, x$, ref$, len$; __lookupGetter__ = Object.prototype.__lookupGetter__; create = Object.create; assert.isFunction(__lookupGetter__); assert.arity(__lookupGetter__, 1); assert.name(__lookupGetter__, '__lookupGetter__'); assert.looksNative(__lookupGetter__); assert.nonEnumerable(Object.prototype, '__lookupGetter__'); assert.same({}.__lookupGetter__('key'), void 8, 'empty object'); assert.same({ key: 42 }.__lookupGetter__('key'), void 8, 'data descriptor'); O = {}; F = function(){}; O.__defineGetter__('key', F); assert.same(O.__lookupGetter__('key'), F, 'own getter'); assert.same(create(O).__lookupGetter__('key'), F, 'proto getter'); assert.same(create(O).__lookupGetter__('foo'), void 8, 'empty proto'); if (STRICT) { for (i$ = 0, len$ = (ref$ = [null, void 8]).length; i$ < len$; ++i$) { x$ = ref$[i$]; assert.throws(fn$, TypeError, "Throws on " + x$ + " as `this`"); } } function fn$(){ __lookupGetter__.call(x$, 1); } }); } }).call(this); // Generated by LiveScript 1.4.0 (function(){ var module, test; module = QUnit.module, test = QUnit.test; module('ES7'); if (DESCRIPTORS) { test('Object#__lookupSetter__', function(assert){ var __lookupSetter__, create, O, F, i$, x$, ref$, len$; __lookupSetter__ = Object.prototype.__lookupSetter__; create = Object.create; assert.isFunction(__lookupSetter__); assert.arity(__lookupSetter__, 1); assert.name(__lookupSetter__, '__lookupSetter__'); assert.looksNative(__lookupSetter__); assert.nonEnumerable(Object.prototype, '__lookupSetter__'); assert.same({}.__lookupSetter__('key'), void 8, 'empty object'); assert.same({ key: 42 }.__lookupSetter__('key'), void 8, 'data descriptor'); O = {}; F = function(){}; O.__defineSetter__('key', F); assert.same(O.__lookupSetter__('key'), F, 'own setter'); assert.same(create(O).__lookupSetter__('key'), F, 'proto setter'); assert.same(create(O).__lookupSetter__('foo'), void 8, 'empty proto'); if (STRICT) { for (i$ = 0, len$ = (ref$ = [null, void 8]).length; i$ < len$; ++i$) { x$ = ref$[i$]; assert.throws(fn$, TypeError, "Throws on " + x$ + " as `this`"); } } function fn$(){ __lookupSetter__.call(x$, 1); } }); } }).call(this); // Generated by LiveScript 1.4.0 (function(){ var module, test; module = QUnit.module, test = QUnit.test; module('ES7'); test('Object.values', function(assert){ var values, create, assign; values = Object.values, create = Object.create, assign = Object.assign; assert.isFunction(values); assert.arity(values, 1); assert.name(values, 'values'); assert.looksNative(values); assert.nonEnumerable(Object, 'values'); assert.deepEqual(values({ q: 1, w: 2, e: 3 }), [1, 2, 3]); assert.deepEqual(values(new String('qwe')), ['q', 'w', 'e']); assert.deepEqual(values(assign(create({ q: 1, w: 2, e: 3 }), { a: 4, s: 5, d: 6 })), [4, 5, 6]); try { assert.deepEqual(Function('return Object.values({a: 1, get b(){delete this.c;return 2},c: 3})')(), [1, 2]); } catch (e$) {} try { assert.deepEqual(Function('return Object.values({a: 1, get b(){Object.defineProperty(this, "c", {value:4,enumerable:false});return 2},c: 3})')(), [1, 2]); } catch (e$) {} }); }).call(this); // Generated by LiveScript 1.4.0 (function(){ 'use strict'; var module, test; module = QUnit.module, test = QUnit.test; module('ES7'); test('Observable', function(assert){ var obsevable; assert.isFunction(Observable); assert.arity(Observable, 1); assert.name(Observable, 'Observable'); assert.looksNative(Observable); assert.throws(function(){ Observable(function(){}); }, 'throws w/o `new`'); obsevable = new Observable(function(subscriptionObserver){ var next, error, complete; assert.same(typeof subscriptionObserver, 'object', 'Subscription observer is object'); assert.same(subscriptionObserver.constructor, Object); next = subscriptionObserver.next, error = subscriptionObserver.error, complete = subscriptionObserver.complete; assert.isFunction(next); assert.isFunction(error); assert.isFunction(complete); assert.name(next, 'next'); assert.name(error, 'error'); assert.name(complete, 'complete'); assert.arity(next, 1); assert.arity(error, 1); assert.arity(complete, 1); assert.looksNative(next); assert.looksNative(error); assert.looksNative(complete); if (STRICT) { assert.same(this, function(){ return this; }(), 'correct executor context'); } }); obsevable.subscribe({}); assert.ok(obsevable instanceof Observable); }); test('Observable#subscribe', function(assert){ var subscription; assert.isFunction(Observable.prototype.subscribe); assert.arity(Observable.prototype.subscribe, 1); assert.name(Observable.prototype.subscribe, 'subscribe'); assert.looksNative(Observable.prototype.subscribe); subscription = new Observable(function(){}).subscribe({}); assert.same(typeof subscription, 'object', 'Subscription is object'); assert.same(subscription.constructor, Object); assert.isFunction(subscription.unsubscribe); assert.arity(subscription.unsubscribe, 0); assert.name(subscription.unsubscribe, 'unsubscribe'); assert.looksNative(subscription.unsubscribe); }); test('Observable#forEach', function(assert){ assert.isFunction(Observable.prototype.forEach); assert.arity(Observable.prototype.forEach, 1); assert.name(Observable.prototype.forEach, 'forEach'); assert.looksNative(Observable.prototype.forEach); assert.ok(new Observable(function(){}).forEach(function(){}) instanceof Promise, 'returns Promise'); }); test('Observable#constructor', function(assert){ assert.same(Observable.prototype.constructor, Observable); }); test('Observable#@@observable', function(assert){ var observable; assert.isFunction(Observable.prototype[Symbol.observable]); observable = new Observable(function(){}); assert.same(observable[Symbol.observable](), observable); }); test('Observable.of', function(assert){ assert.isFunction(Observable.of); assert.arity(Observable.of, 0); assert.name(Observable.of, 'of'); assert.looksNative(Observable.of); }); test('Observable.from', function(assert){ assert.isFunction(Observable.from); assert.arity(Observable.from, 1); assert.name(Observable.from, 'from'); assert.looksNative(Observable.from); }); }).call(this); // Generated by LiveScript 1.4.0 (function(){ var module, test; module = QUnit.module, test = QUnit.test; module('ES7'); test('Reflect.defineMetadata', function(assert){ var defineMetadata; defineMetadata = Reflect.defineMetadata; assert.isFunction(defineMetadata); assert.arity(defineMetadata, 4); assert.name(defineMetadata, 'defineMetadata'); assert.looksNative(defineMetadata); assert.nonEnumerable(Reflect, 'defineMetadata'); assert.throws(function(){ defineMetadata('key', 'value', void 8, void 8); }, TypeError); assert.same(defineMetadata('key', 'value', {}, void 8), void 8); assert.same(defineMetadata('key', 'value', {}, 'name'), void 8); }); }).call(this); // Generated by LiveScript 1.4.0 (function(){ var module, test; module = QUnit.module, test = QUnit.test; module('ES7'); test('Reflect.deleteMetadata', function(assert){ var defineMetadata, hasOwnMetadata, deleteMetadata, create, obj, prototype; defineMetadata = Reflect.defineMetadata, hasOwnMetadata = Reflect.hasOwnMetadata, deleteMetadata = Reflect.deleteMetadata; create = Object.create; assert.isFunction(deleteMetadata); assert.arity(deleteMetadata, 2); assert.name(deleteMetadata, 'deleteMetadata'); assert.looksNative(deleteMetadata); assert.nonEnumerable(Reflect, 'deleteMetadata'); assert.throws(function(){ deleteMetadata('key', void 8, void 8); }, TypeError); assert.same(deleteMetadata('key', {}, void 8), false); obj = {}; defineMetadata('key', 'value', obj, void 8); assert.same(deleteMetadata('key', obj, void 8), true); prototype = {}; defineMetadata('key', 'value', prototype, void 8); assert.same(deleteMetadata('key', create(prototype), void 8), false); obj = {}; defineMetadata('key', 'value', obj, void 8); deleteMetadata('key', obj, void 8); assert.same(hasOwnMetadata("key", obj, undefined), false); }); }).call(this); // Generated by LiveScript 1.4.0 (function(){ var module, test; module = QUnit.module, test = QUnit.test; module('ES7'); test('Reflect.getMetadataKeys', function(assert){ var defineMetadata, getMetadataKeys, create, obj, prototype; defineMetadata = Reflect.defineMetadata, getMetadataKeys = Reflect.getMetadataKeys; create = Object.create; assert.isFunction(getMetadataKeys); assert.arity(getMetadataKeys, 1); assert.name(getMetadataKeys, 'getMetadataKeys'); assert.looksNative(getMetadataKeys); assert.nonEnumerable(Reflect, 'getMetadataKeys'); assert.throws(function(){ getMetadataKeys(void 8, void 8); }, TypeError); assert.deepEqual(getMetadataKeys({}, void 8), []); obj = {}; defineMetadata('key', 'value', obj, void 8); assert.deepEqual(getMetadataKeys(obj, void 8), ['key']); prototype = {}; obj = create(prototype); defineMetadata('key', 'value', prototype, void 8); assert.deepEqual(getMetadataKeys(obj, void 8), ['key']); obj = {}; defineMetadata('key0', 'value', obj, void 8); defineMetadata('key1', 'value', obj, void 8); assert.deepEqual(getMetadataKeys(obj, void 8), ['key0', 'key1']); obj = {}; defineMetadata('key0', 'value', obj, void 8); defineMetadata('key1', 'value', obj, void 8); defineMetadata('key0', 'value', obj, void 8); assert.deepEqual(getMetadataKeys(obj, void 8), ['key0', 'key1']); prototype = {}; defineMetadata('key2', 'value', prototype, void 8); obj = create(prototype); defineMetadata('key0', 'value', obj, void 8); defineMetadata('key1', 'value', obj, void 8); assert.deepEqual(getMetadataKeys(obj, void 8), ['key0', 'key1', 'key2']); obj = {}; assert.deepEqual(getMetadataKeys({}, 'name'), []); obj = {}; defineMetadata('key', 'value', obj, 'name'); assert.deepEqual(getMetadataKeys(obj, 'name'), ['key']); prototype = {}; obj = create(prototype); defineMetadata('key', 'value', prototype, 'name'); assert.deepEqual(getMetadataKeys(obj, 'name'), ['key']); obj = {}; defineMetadata('key0', 'value', obj, 'name'); defineMetadata('key1', 'value', obj, 'name'); defineMetadata('key0', 'value', obj, 'name'); assert.deepEqual(getMetadataKeys(obj, 'name'), ['key0', 'key1']); prototype = {}; defineMetadata('key2', 'value', prototype, 'name'); obj = create(prototype); defineMetadata('key0', 'value', obj, 'name'); defineMetadata('key1', 'value', obj, 'name'); assert.deepEqual(getMetadataKeys(obj, 'name'), ['key0', 'key1', 'key2']); }); }).call(this); // Generated by LiveScript 1.4.0 (function(){ var module, test; module = QUnit.module, test = QUnit.test; module('ES7'); test('Reflect.getMetadata', function(assert){ var defineMetadata, getMetadata, create, obj, prototype; defineMetadata = Reflect.defineMetadata, getMetadata = Reflect.getMetadata; create = Object.create; assert.isFunction(getMetadata); assert.arity(getMetadata, 2); assert.name(getMetadata, 'getMetadata'); assert.looksNative(getMetadata); assert.nonEnumerable(Reflect, 'getMetadata'); assert.throws(function(){ getMetadata('key', void 8, void 8); }, TypeError); assert.same(getMetadata('key', {}, void 8), void 8); obj = {}; defineMetadata('key', 'value', obj, void 8); assert.same(getMetadata('key', obj, void 8), 'value'); prototype = {}; obj = create(prototype); defineMetadata('key', 'value', prototype, void 8); assert.same(getMetadata('key', obj, void 8), 'value'); assert.same(getMetadata('key', {}, 'name'), void 8); obj = {}; defineMetadata('key', 'value', obj, 'name'); assert.same(getMetadata('key', obj, 'name'), 'value'); prototype = {}; obj = create(prototype); defineMetadata('key', 'value', prototype, 'name'); assert.same(getMetadata('key', obj, 'name'), 'value'); }); }).call(this); // Generated by LiveScript 1.4.0 (function(){ var module, test; module = QUnit.module, test = QUnit.test; module('ES7'); test('Reflect.getOwnMetadata', function(assert){ var defineMetadata, getOwnMetadata, create, obj, prototype; defineMetadata = Reflect.defineMetadata, getOwnMetadata = Reflect.getOwnMetadata; create = Object.create; assert.isFunction(getOwnMetadata); assert.arity(getOwnMetadata, 2); assert.name(getOwnMetadata, 'getOwnMetadata'); assert.looksNative(getOwnMetadata); assert.nonEnumerable(Reflect, 'getOwnMetadata'); assert.throws(function(){ getOwnMetadata('key', void 8, void 8); }, TypeError); assert.same(getOwnMetadata('key', {}, void 8), void 8); obj = {}; defineMetadata('key', 'value', obj, void 8); assert.same(getOwnMetadata('key', obj, void 8), 'value'); prototype = {}; obj = create(prototype); defineMetadata('key', 'value', prototype, void 8); assert.same(getOwnMetadata('key', obj, void 8), void 8); assert.same(getOwnMetadata('key', {}, 'name'), void 8); obj = {}; defineMetadata('key', 'value', obj, 'name'); assert.same(getOwnMetadata('key', obj, 'name'), 'value'); prototype = {}; obj = create(prototype); defineMetadata('key', 'value', prototype, 'name'); assert.same(getOwnMetadata('key', obj, 'name'), void 8); }); }).call(this); // Generated by LiveScript 1.4.0 (function(){ var module, test; module = QUnit.module, test = QUnit.test; module('ES7'); test('Reflect.getOwnMetadataKeys', function(assert){ var defineMetadata, getOwnMetadataKeys, create, obj, prototype; defineMetadata = Reflect.defineMetadata, getOwnMetadataKeys = Reflect.getOwnMetadataKeys; create = Object.create; assert.isFunction(getOwnMetadataKeys); assert.arity(getOwnMetadataKeys, 1); assert.name(getOwnMetadataKeys, 'getOwnMetadataKeys'); assert.looksNative(getOwnMetadataKeys); assert.nonEnumerable(Reflect, 'getOwnMetadataKeys'); assert.throws(function(){ getOwnMetadataKeys(void 8, void 8); }, TypeError); assert.deepEqual(getOwnMetadataKeys({}, void 8), []); obj = {}; defineMetadata('key', 'value', obj, void 8); assert.deepEqual(getOwnMetadataKeys(obj, void 8), ['key']); prototype = {}; obj = create(prototype); defineMetadata('key', 'value', prototype, void 8); assert.deepEqual(getOwnMetadataKeys(obj, void 8), []); obj = {}; defineMetadata('key0', 'value', obj, void 8); defineMetadata('key1', 'value', obj, void 8); assert.deepEqual(getOwnMetadataKeys(obj, void 8), ['key0', 'key1']); obj = {}; defineMetadata('key0', 'value', obj, void 8); defineMetadata('key1', 'value', obj, void 8); defineMetadata('key0', 'value', obj, void 8); assert.deepEqual(getOwnMetadataKeys(obj, void 8), ['key0', 'key1']); prototype = {}; defineMetadata('key2', 'value', prototype, void 8); obj = create(prototype); defineMetadata('key0', 'value', obj, void 8); defineMetadata('key1', 'value', obj, void 8); assert.deepEqual(getOwnMetadataKeys(obj, void 8), ['key0', 'key1']); obj = {}; assert.deepEqual(getOwnMetadataKeys({}, 'name'), []); obj = {}; defineMetadata('key', 'value', obj, 'name'); assert.deepEqual(getOwnMetadataKeys(obj, 'name'), ['key']); prototype = {}; obj = create(prototype); defineMetadata('key', 'value', prototype, 'name'); assert.deepEqual(getOwnMetadataKeys(obj, 'name'), []); obj = {}; defineMetadata('key0', 'value', obj, 'name'); defineMetadata('key1', 'value', obj, 'name'); defineMetadata('key0', 'value', obj, 'name'); assert.deepEqual(getOwnMetadataKeys(obj, 'name'), ['key0', 'key1']); prototype = {}; defineMetadata('key2', 'value', prototype, 'name'); obj = create(prototype); defineMetadata('key0', 'value', obj, 'name'); defineMetadata('key1', 'value', obj, 'name'); assert.deepEqual(getOwnMetadataKeys(obj, 'name'), ['key0', 'key1']); }); }).call(this); // Generated by LiveScript 1.4.0 (function(){ var module, test; module = QUnit.module, test = QUnit.test; module('ES7'); test('Reflect.hasMetadata', function(assert){ var defineMetadata, hasMetadata, create, obj, prototype; defineMetadata = Reflect.defineMetadata, hasMetadata = Reflect.hasMetadata; create = Object.create; assert.isFunction(hasMetadata); assert.arity(hasMetadata, 2); assert.name(hasMetadata, 'hasMetadata'); assert.looksNative(hasMetadata); assert.nonEnumerable(Reflect, 'hasMetadata'); assert.throws(function(){ hasMetadata('key', void 8, void 8); }, TypeError); assert.same(hasMetadata('key', {}, void 8), false); obj = {}; defineMetadata('key', 'value', obj, void 8); assert.same(hasMetadata('key', obj, void 8), true); prototype = {}; obj = create(prototype); defineMetadata('key', 'value', prototype, void 8); assert.same(hasMetadata('key', obj, void 8), true); assert.same(hasMetadata('key', {}, 'name'), false); obj = {}; defineMetadata('key', 'value', obj, 'name'); assert.same(hasMetadata('key', obj, 'name'), true); prototype = {}; obj = create(prototype); defineMetadata('key', 'value', prototype, 'name'); assert.same(hasMetadata('key', obj, 'name'), true); }); }).call(this); // Generated by LiveScript 1.4.0 (function(){ var module, test; module = QUnit.module, test = QUnit.test; module('ES7'); test('Reflect.hasOwnMetadata', function(assert){ var defineMetadata, hasOwnMetadata, create, obj, prototype; defineMetadata = Reflect.defineMetadata, hasOwnMetadata = Reflect.hasOwnMetadata; create = Object.create; assert.isFunction(hasOwnMetadata); assert.arity(hasOwnMetadata, 2); assert.name(hasOwnMetadata, 'hasOwnMetadata'); assert.looksNative(hasOwnMetadata); assert.nonEnumerable(Reflect, 'hasOwnMetadata'); assert.throws(function(){ hasOwnMetadata('key', void 8, void 8); }, TypeError); assert.same(hasOwnMetadata('key', {}, void 8), false); obj = {}; defineMetadata('key', 'value', obj, void 8); assert.same(hasOwnMetadata('key', obj, void 8), true); prototype = {}; obj = create(prototype); defineMetadata('key', 'value', prototype, void 8); assert.same(hasOwnMetadata('key', obj, void 8), false); assert.same(hasOwnMetadata('key', {}, 'name'), false); obj = {}; defineMetadata('key', 'value', obj, 'name'); assert.same(hasOwnMetadata('key', obj, 'name'), true); prototype = {}; obj = create(prototype); defineMetadata('key', 'value', prototype, 'name'); assert.same(hasOwnMetadata('key', obj, 'name'), false); }); }).call(this); // Generated by LiveScript 1.4.0 (function(){ var module, test; module = QUnit.module, test = QUnit.test; module('ES7'); test('Reflect.metadata', function(assert){ var metadata, hasOwnMetadata, decorator, target; metadata = Reflect.metadata, hasOwnMetadata = Reflect.hasOwnMetadata; assert.isFunction(metadata); assert.arity(metadata, 2); assert.name(metadata, 'metadata'); assert.looksNative(metadata); assert.nonEnumerable(Reflect, 'metadata'); assert.isFunction(metadata('key', 'value')); decorator = metadata('key', 'value'); assert.throws(function(){ decorator(void 8, 'name'); }, TypeError); assert.throws(function(){ decorator({}, void 8); }, TypeError); target = function(){}; decorator(target); assert.same(hasOwnMetadata('key', target, void 8), true); target = {}; decorator(target, 'name'); assert.same(hasOwnMetadata('key', target, 'name'), true); }); }).call(this); // Generated by LiveScript 1.4.0 (function(){ var module, test; module = QUnit.module, test = QUnit.test; module('ES7'); test('Set#toJSON', function(assert){ assert.isFunction(Set.prototype.toJSON); assert.name(Set.prototype.toJSON, 'toJSON'); assert.arity(Set.prototype.toJSON, 0); assert.looksNative(Set.prototype.toJSON); assert.nonEnumerable(Set.prototype, 'toJSON'); if (typeof JSON != 'undefined' && JSON !== null) { assert.strictEqual(JSON.stringify(new Set([1, 2, 3, 2, 1])), '[1,2,3]', 'Works'); } }); }).call(this); // Generated by LiveScript 1.4.0 (function(){ var module, test; module = QUnit.module, test = QUnit.test; module('ES7'); test('String#at', function(assert){ var at; assert.isFunction(String.prototype.at); assert.arity(String.prototype.at, 1); assert.name(String.prototype.at, 'at'); assert.looksNative(String.prototype.at); assert.nonEnumerable(String.prototype, 'at'); assert.strictEqual('abc\uD834\uDF06def'.at(-Infinity), ''); assert.strictEqual('abc\uD834\uDF06def'.at(-1), ''); assert.strictEqual('abc\uD834\uDF06def'.at(-0), 'a'); assert.strictEqual('abc\uD834\uDF06def'.at(+0), 'a'); assert.strictEqual('abc\uD834\uDF06def'.at(1), 'b'); assert.strictEqual('abc\uD834\uDF06def'.at(3), '\uD834\uDF06'); assert.strictEqual('abc\uD834\uDF06def'.at(4), '\uDF06'); assert.strictEqual('abc\uD834\uDF06def'.at(5), 'd'); assert.strictEqual('abc\uD834\uDF06def'.at(42), ''); assert.strictEqual('abc\uD834\uDF06def'.at(Infinity), ''); assert.strictEqual('abc\uD834\uDF06def'.at(null), 'a'); assert.strictEqual('abc\uD834\uDF06def'.at(void 8), 'a'); assert.strictEqual('abc\uD834\uDF06def'.at(), 'a'); assert.strictEqual('abc\uD834\uDF06def'.at(false), 'a'); assert.strictEqual('abc\uD834\uDF06def'.at(NaN), 'a'); assert.strictEqual('abc\uD834\uDF06def'.at(''), 'a'); assert.strictEqual('abc\uD834\uDF06def'.at('_'), 'a'); assert.strictEqual('abc\uD834\uDF06def'.at('1'), 'b'); assert.strictEqual('abc\uD834\uDF06def'.at([]), 'a'); assert.strictEqual('abc\uD834\uDF06def'.at({}), 'a'); assert.strictEqual('abc\uD834\uDF06def'.at(-0.9), 'a'); assert.strictEqual('abc\uD834\uDF06def'.at(1.9), 'b'); assert.strictEqual('abc\uD834\uDF06def'.at(7.9), 'f'); assert.strictEqual('abc\uD834\uDF06def'.at(Math.pow(2, 32)), ''); assert.strictEqual('\uD834\uDF06def'.at(-Infinity), ''); assert.strictEqual('\uD834\uDF06def'.at(-1), ''); assert.strictEqual('\uD834\uDF06def'.at(-0), '\uD834\uDF06'); assert.strictEqual('\uD834\uDF06def'.at(0), '\uD834\uDF06'); assert.strictEqual('\uD834\uDF06def'.at(1), '\uDF06'); assert.strictEqual('\uD834\uDF06def'.at(2), 'd'); assert.strictEqual('\uD834\uDF06def'.at(3), 'e'); assert.strictEqual('\uD834\uDF06def'.at(4), 'f'); assert.strictEqual('\uD834\uDF06def'.at(42), ''); assert.strictEqual('\uD834\uDF06def'.at(Infinity), ''); assert.strictEqual('\uD834\uDF06def'.at(null), '\uD834\uDF06'); assert.strictEqual('\uD834\uDF06def'.at(void 8), '\uD834\uDF06'); assert.strictEqual('\uD834\uDF06def'.at(), '\uD834\uDF06'); assert.strictEqual('\uD834\uDF06def'.at(false), '\uD834\uDF06'); assert.strictEqual('\uD834\uDF06def'.at(NaN), '\uD834\uDF06'); assert.strictEqual('\uD834\uDF06def'.at(''), '\uD834\uDF06'); assert.strictEqual('\uD834\uDF06def'.at('_'), '\uD834\uDF06'); assert.strictEqual('\uD834\uDF06def'.at('1'), '\uDF06'); assert.strictEqual('\uD834abc'.at(-Infinity), ''); assert.strictEqual('\uD834abc'.at(-1), ''); assert.strictEqual('\uD834abc'.at(-0), '\uD834'); assert.strictEqual('\uD834abc'.at(0), '\uD834'); assert.strictEqual('\uD834abc'.at(1), 'a'); assert.strictEqual('\uD834abc'.at(42), ''); assert.strictEqual('\uD834abc'.at(Infinity), ''); assert.strictEqual('\uD834abc'.at(null), '\uD834'); assert.strictEqual('\uD834abc'.at(void 8), '\uD834'); assert.strictEqual('\uD834abc'.at(), '\uD834'); assert.strictEqual('\uD834abc'.at(false), '\uD834'); assert.strictEqual('\uD834abc'.at(NaN), '\uD834'); assert.strictEqual('\uD834abc'.at(''), '\uD834'); assert.strictEqual('\uD834abc'.at('_'), '\uD834'); assert.strictEqual('\uD834abc'.at('1'), 'a'); assert.strictEqual('\uDF06abc'.at(-Infinity), ''); assert.strictEqual('\uDF06abc'.at(-1), ''); assert.strictEqual('\uDF06abc'.at(-0), '\uDF06'); assert.strictEqual('\uDF06abc'.at(0), '\uDF06'); assert.strictEqual('\uDF06abc'.at(1), 'a'); assert.strictEqual('\uDF06abc'.at(42), ''); assert.strictEqual('\uDF06abc'.at(Infinity), ''); assert.strictEqual('\uDF06abc'.at(null), '\uDF06'); assert.strictEqual('\uDF06abc'.at(void 8), '\uDF06'); assert.strictEqual('\uDF06abc'.at(), '\uDF06'); assert.strictEqual('\uDF06abc'.at(false), '\uDF06'); assert.strictEqual('\uDF06abc'.at(NaN), '\uDF06'); assert.strictEqual('\uDF06abc'.at(''), '\uDF06'); assert.strictEqual('\uDF06abc'.at('_'), '\uDF06'); assert.strictEqual('\uDF06abc'.at('1'), 'a'); at = String.prototype.at; assert.strictEqual(at.call(42, 0), '4'); assert.strictEqual(at.call(42, 1), '2'); assert.strictEqual(at.call({ toString: function(){ return 'abc'; } }, 2), 'c'); if (STRICT) { assert.throws(function(){ String.prototype.at.call(null, 0); }, TypeError); assert.throws(function(){ String.prototype.at.call(void 8, 0); }, TypeError); } }); }).call(this); // Generated by LiveScript 1.4.0 (function(){ var module, test; module = QUnit.module, test = QUnit.test; module('ES7'); test('String#matchAll', function(assert){ var matchAll, assign, i$, x$, ref$, len$, iter, y$, z$; matchAll = String.prototype.matchAll; assign = Object.assign; assert.isFunction(matchAll); assert.arity(matchAll, 1); assert.name(matchAll, 'matchAll'); assert.looksNative(matchAll); assert.nonEnumerable(String.prototype, 'matchAll'); for (i$ = 0, len$ = (ref$ = [ 'aabc', { toString: fn$ } ]).length; i$ < len$; ++i$) { x$ = ref$[i$]; iter = matchAll.call(x$, /[ac]/); assert.isIterator(iter); assert.isIterable(iter); assert.deepEqual(iter.next(), { value: assign(['a'], { input: 'aabc', index: 0 }), done: false }); assert.deepEqual(iter.next(), { value: assign(['a'], { input: 'aabc', index: 1 }), done: false }); assert.deepEqual(iter.next(), { value: assign(['c'], { input: 'aabc', index: 3 }), done: false }); assert.deepEqual(iter.next(), { value: null, done: true }); } iter = '1111a2b3cccc'.matchAll(/(\d)(\D)/); assert.isIterator(iter); assert.isIterable(iter); assert.deepEqual(iter.next(), { value: assign(['1a', '1', 'a'], { input: '1111a2b3cccc', index: 3 }), done: false }); assert.deepEqual(iter.next(), { value: assign(['2b', '2', 'b'], { input: '1111a2b3cccc', index: 5 }), done: false }); assert.deepEqual(iter.next(), { value: assign(['3c', '3', 'c'], { input: '1111a2b3cccc', index: 7 }), done: false }); assert.deepEqual(iter.next(), { value: null, done: true }); for (i$ = 0, len$ = (ref$ = [null, void 8, 'qwe', NaN, 42, new Date(), {}, []]).length; i$ < len$; ++i$) { y$ = ref$[i$]; assert.throws(fn1$, TypeError, "Throws on " + y$ + " as first arguments"); } if (STRICT) { for (i$ = 0, len$ = (ref$ = [null, void 8]).length; i$ < len$; ++i$) { z$ = ref$[i$]; assert.throws(fn2$, TypeError, "Throws on " + z$ + " as `this`"); } } function fn$(){ return 'aabc'; } function fn1$(){ ''.matchAll(y$); } function fn2$(){ matchAll.call(z$, /./); } }); }).call(this); // Generated by LiveScript 1.4.0 (function(){ var module, test; module = QUnit.module, test = QUnit.test; module('ES7'); test('String#padEnd', function(assert){ assert.isFunction(String.prototype.padEnd); assert.arity(String.prototype.padEnd, 1); assert.name(String.prototype.padEnd, 'padEnd'); assert.looksNative(String.prototype.padEnd); assert.nonEnumerable(String.prototype, 'padEnd'); assert.strictEqual('abc'.padEnd(5), 'abc '); assert.strictEqual('abc'.padEnd(4, 'de'), 'abcd'); assert.strictEqual('abc'.padEnd(), 'abc'); assert.strictEqual('abc'.padEnd(5, '_'), 'abc__'); assert.strictEqual(''.padEnd(0), ''); assert.strictEqual('foo'.padEnd(1), 'foo'); assert.strictEqual('foo'.padEnd(5, ''), 'foo'); if (STRICT) { assert.throws(function(){ String.prototype.padEnd.call(null, 0); }, TypeError); assert.throws(function(){ String.prototype.padEnd.call(void 8, 0); }, TypeError); } }); }).call(this); // Generated by LiveScript 1.4.0 (function(){ var module, test; module = QUnit.module, test = QUnit.test; module('ES7'); test('String#padStart', function(assert){ assert.isFunction(String.prototype.padStart); assert.arity(String.prototype.padStart, 1); assert.name(String.prototype.padStart, 'padStart'); assert.looksNative(String.prototype.padStart); assert.nonEnumerable(String.prototype, 'padStart'); assert.strictEqual('abc'.padStart(5), ' abc'); assert.strictEqual('abc'.padStart(4, 'de'), 'dabc'); assert.strictEqual('abc'.padStart(), 'abc'); assert.strictEqual('abc'.padStart(5, '_'), '__abc'); assert.strictEqual(''.padStart(0), ''); assert.strictEqual('foo'.padStart(1), 'foo'); assert.strictEqual('foo'.padStart(5, ''), 'foo'); if (STRICT) { assert.throws(function(){ String.prototype.padStart.call(null, 0); }, TypeError); assert.throws(function(){ String.prototype.padStart.call(void 8, 0); }, TypeError); } }); }).call(this); // Generated by LiveScript 1.4.0 (function(){ var module, test; module = QUnit.module, test = QUnit.test; module('ES7'); test('String#trimLeft', function(assert){ assert.isFunction(''.trimLeft); assert.arity(String.prototype.trimLeft, 0); assert.name(String.prototype.trimLeft, 'trimLeft'); assert.looksNative(String.prototype.trimLeft); assert.nonEnumerable(String.prototype, 'trimLeft'); assert.strictEqual(' \n q w e \n '.trimLeft(), 'q w e \n ', 'removes whitespaces at left side of string'); assert.strictEqual('\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u180E\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF'.trimLeft(), '', 'removes all whitespaces'); assert.strictEqual('\u200b\u0085'.trimLeft(), '\u200b\u0085', "shouldn't remove this symbols"); if (STRICT) { assert.throws(function(){ String.prototype.trimLeft.call(null, 0); }, TypeError); assert.throws(function(){ String.prototype.trimLeft.call(void 8, 0); }, TypeError); } }); test('String#trimStart', function(assert){ assert.isFunction(''.trimStart); assert.arity(String.prototype.trimStart, 0); assert.name(String.prototype.trimStart, 'trimLeft'); assert.looksNative(String.prototype.trimStart); assert.nonEnumerable(String.prototype, 'trimStart'); assert.same(String.prototype.trimStart, String.prototype.trimLeft, 'same #trimLeft'); assert.strictEqual(' \n q w e \n '.trimStart(), 'q w e \n ', 'removes whitespaces at left side of string'); assert.strictEqual('\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u180E\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF'.trimStart(), '', 'removes all whitespaces'); assert.strictEqual('\u200b\u0085'.trimStart(), '\u200b\u0085', "shouldn't remove this symbols"); if (STRICT) { assert.throws(function(){ String.prototype.trimStart.call(null, 0); }, TypeError); assert.throws(function(){ String.prototype.trimStart.call(void 8, 0); }, TypeError); } }); }).call(this); // Generated by LiveScript 1.4.0 (function(){ var module, test; module = QUnit.module, test = QUnit.test; module('ES7'); test('String#trimRight', function(assert){ assert.isFunction(''.trimRight); assert.arity(String.prototype.trimRight, 0); assert.name(String.prototype.trimRight, 'trimRight'); assert.looksNative(String.prototype.trimRight); assert.nonEnumerable(String.prototype, 'trimRight'); assert.strictEqual(' \n q w e \n '.trimRight(), ' \n q w e', 'removes whitespaces at right side of string'); assert.strictEqual('\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u180E\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF'.trimRight(), '', 'removes all whitespaces'); assert.strictEqual('\u200b\u0085'.trimRight(), '\u200b\u0085', "shouldn't remove this symbols"); if (STRICT) { assert.throws(function(){ String.prototype.trimRight.call(null, 0); }, TypeError); assert.throws(function(){ String.prototype.trimRight.call(void 8, 0); }, TypeError); } }); test('String#trimEnd', function(assert){ assert.isFunction(''.trimEnd); assert.arity(String.prototype.trimEnd, 0); assert.name(String.prototype.trimEnd, 'trimRight'); assert.looksNative(String.prototype.trimEnd); assert.nonEnumerable(String.prototype, 'trimEnd'); assert.same(String.prototype.trimEnd, String.prototype.trimRight, 'same #trimRight'); assert.strictEqual(' \n q w e \n '.trimEnd(), ' \n q w e', 'removes whitespaces at right side of string'); assert.strictEqual('\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u180E\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF'.trimEnd(), '', 'removes all whitespaces'); assert.strictEqual('\u200b\u0085'.trimEnd(), '\u200b\u0085', "shouldn't remove this symbols"); if (STRICT) { assert.throws(function(){ String.prototype.trimEnd.call(null, 0); }, TypeError); assert.throws(function(){ String.prototype.trimEnd.call(void 8, 0); }, TypeError); } }); }).call(this); // Generated by LiveScript 1.4.0 (function(){ var module, test; module = QUnit.module, test = QUnit.test; module('ES7'); test('Symbol.asyncIterator', function(assert){ var desc; assert.ok('asyncIterator' in Symbol, "Symbol.asyncIterator available"); assert.nonEnumerable(Symbol, 'asyncIterator'); assert.ok(Object(Symbol.asyncIterator) instanceof Symbol, "Symbol.asyncIterator is symbol"); if (DESCRIPTORS) { desc = Object.getOwnPropertyDescriptor(Symbol, 'asyncIterator'); assert.ok(!desc.enumerble, 'non-enumerable'); assert.ok(!desc.writable, 'non-writable'); assert.ok(!desc.configurable, 'non-configurable'); } }); }).call(this); // Generated by LiveScript 1.4.0 (function(){ var module, test; module = QUnit.module, test = QUnit.test; module('ES7'); test('Symbol.observable', function(assert){ var desc; assert.ok('observable' in Symbol, "Symbol.observable available"); assert.nonEnumerable(Symbol, 'observable'); assert.ok(Object(Symbol.observable) instanceof Symbol, "Symbol.observable is symbol"); if (DESCRIPTORS) { desc = Object.getOwnPropertyDescriptor(Symbol, 'observable'); assert.ok(!desc.enumerble, 'non-enumerable'); assert.ok(!desc.writable, 'non-writable'); assert.ok(!desc.configurable, 'non-configurable'); } }); }).call(this); // Generated by LiveScript 1.4.0 (function(){ var module, test; module = QUnit.module, test = QUnit.test; module('ES7'); test('System.global', function(assert){ var global; global = typeof System != 'undefined' && System !== null ? System.global : void 8; assert.nonEnumerable(System, 'global'); assert.same(global, Object(global), 'is object'); assert.same(global.Math, Math, 'contains globals'); }); }).call(this); // Generated by LiveScript 1.4.0 (function(){ var module, test, this$ = this; module = QUnit.module, test = QUnit.test; module('ES7'); DESCRIPTORS && test('%TypedArrayPrototype%.includes', function(assert){ var i$, x$, ref$, len$, Typed; for (i$ = 0, len$ = (ref$ = ['Float32Array', 'Float64Array', 'Int8Array', 'Int16Array', 'Int32Array', 'Uint8Array', 'Uint16Array', 'Uint32Array', 'Uint8ClampedArray']).length; i$ < len$; ++i$) { x$ = ref$[i$]; Typed = global[x$]; assert.isFunction(Typed.prototype.includes, x$ + "::includes is function"); assert.arity(Typed.prototype.includes, 1, x$ + "::includes arity is 1"); assert.name(Typed.prototype.includes, 'includes', x$ + "::includes name is 'includes'"); assert.looksNative(Typed.prototype.includes, x$ + "::includes looks native"); assert.same(new Typed([1, 1, 1]).includes(1), true); assert.same(new Typed([1, 1, 1]).includes(2), false); assert.same(new Typed([1, 2, 3]).includes(1, 1), false); assert.same(new Typed([1, 2, 3]).includes(2, 1), true); assert.same(new Typed([1, 2, 3]).includes(2, -1), false); assert.same(new Typed([1, 2, 3]).includes(2, -2), true); assert.throws(fn$, "isn't generic"); } function fn$(){ Typed.prototype.includes.call([1, 2], 1); } }); }).call(this); // Generated by LiveScript 1.4.0 (function(){ var module, test; module = QUnit.module, test = QUnit.test; module('Web'); test('Iterable DOM collections', function(assert){ var absent, i$, x$, ref$, len$, Collection; absent = true; for (i$ = 0, len$ = (ref$ = ['NodeList', 'DOMTokenList', 'MediaList', 'StyleSheetList', 'CSSRuleList']).length; i$ < len$; ++i$) { x$ = ref$[i$]; Collection = global[x$]; if (Collection) { assert.same(Collection.prototype[typeof Symbol != 'undefined' && Symbol !== null ? Symbol.toStringTag : void 8], x$, x$ + "::@@toStringTag is '" + x$ + "'"); assert.isFunction(Collection.prototype[typeof Symbol != 'undefined' && Symbol !== null ? Symbol.iterator : void 8], x$ + "::@@iterator is function"); assert.isFunction(Collection.prototype.values, x$ + "::@@values is function"); assert.isFunction(Collection.prototype.keys, x$ + "::@@keys is function"); assert.isFunction(Collection.prototype.entries, x$ + "::@@entries is function"); absent = false; } } if ((typeof NodeList != 'undefined' && NodeList !== null) && ((typeof document != 'undefined' && document !== null) && document.querySelectorAll) && document.querySelectorAll('div') instanceof NodeList) { assert.isFunction(document.querySelectorAll('div')[Symbol.iterator], 'works with document.querySelectorAll'); } if (absent) { return assert.ok(true, 'DOM collections are absent'); } }); }).call(this); // Generated by LiveScript 1.4.0 (function(){ var module, test, isFunction, timeLimitedPromise, toString$ = {}.toString; module = QUnit.module, test = QUnit.test; module('Web'); isFunction = function(it){ return toString$.call(it).slice(8, -1) === 'Function'; }; timeLimitedPromise = function(time, fn){ return Promise.race([ new Promise(fn), new Promise(function(res, rej){ setTimeout(rej, time); }) ]); }; test('setImmediate / clearImmediate', function(assert){ var def; assert.expect(10); assert.ok(isFunction(setImmediate), 'setImmediate is function'); assert.ok(isFunction(clearImmediate), 'clearImmediate is function'); assert.ok(/native code/.test(setImmediate), 'setImmediate looks like native'); assert.ok(/native code/.test(clearImmediate), 'clearImmediate looks like native'); assert.strictEqual(setImmediate.name, 'setImmediate', 'setImmediate.name is "setImmediate"'); assert.strictEqual(clearImmediate.name, 'clearImmediate', 'clearImmediate.name is "clearImmediate"'); timeLimitedPromise(1e3, function(res){ setImmediate(function(){ def = 'a'; res(); }); }).then(function(){ assert.ok(true, 'setImmediate works'); })['catch'](function(){ assert.ok(false, 'setImmediate works'); }).then(assert.async()); assert.strictEqual(def, void 8, 'setImmediate is async'); timeLimitedPromise(1e3, function(res){ return setImmediate(function(a, b){ return res(a + b); }, 'a', 'b'); }).then(function(it){ assert.strictEqual(it, 'ab', 'setImmediate works with additional args'); })['catch'](function(){ assert.ok(false, 'setImmediate works with additional args'); }).then(assert.async()); return timeLimitedPromise(50, function(res){ return clearImmediate(setImmediate(res)); }).then(function(){ assert.ok(false, 'clearImmediate works'); })['catch'](function(){ assert.ok(true, 'clearImmediate works'); }).then(assert.async()); }); (function(it){ if (typeof window != 'undefined' && window !== null) { window.onload = it; } else { it(); } })(function(){ setTimeout(function(){ var x, now, inc; x = 0; now = Date.now(); (inc = function(){ setImmediate(function(){ x = x + 1; if (Date.now() - now < 5e3) { inc(); } else { if (typeof console != 'undefined' && console !== null) { console.log("setImmediate: " + x / 5 + " per second"); } } }); })(); }, 5e3); }); }).call(this); // Generated by LiveScript 1.4.0 (function(){ var module, test, timeLimitedPromise, global; module = QUnit.module, test = QUnit.test; module('Web'); timeLimitedPromise = function(time, fn){ return Promise.race([ new Promise(fn), new Promise(function(res, rej){ setTimeout(rej, time); }) ]); }; global = Function('return this')(); test('setTimeout / clearTimeout', function(assert){ assert.expect(2); timeLimitedPromise(1e3, function(res){ global.setTimeout(function(a, b){ res(a + b); }, 10, 'a', 'b'); }).then(function(it){ assert.strictEqual(it, 'ab', 'setTimeout works with additional args'); })['catch'](function(){ assert.ok(false, 'setTimeout works with additional args'); }).then(assert.async()); timeLimitedPromise(50, function(res){ clearTimeout(setTimeout(res, 10)); }).then(function(){ assert.ok(false, 'clearImmediate works with wraped setTimeout'); })['catch'](function(){ assert.ok(true, 'clearImmediate works with wraped setTimeout'); }).then(assert.async()); }); test('setInterval / clearInterval', function(assert){ var i; assert.expect(1); i = 0; timeLimitedPromise(1e4, function(res, rej){ var interval; interval = global.setInterval(function(a, b){ if (a + b !== 'ab' || i > 2) { rej({ a: a, b: b, i: i }); } if (i++ === 2) { global.clearInterval(interval); return global.setTimeout(res, 30); } }, 5, 'a', 'b'); }).then(function(){ assert.ok(true, 'setInterval & clearInterval works with additional args'); })['catch'](function(arg$){ var ref$, a, b, i; ref$ = arg$ != null ? arg$ : {}, a = ref$.a, b = ref$.b, i = ref$.i; assert.ok(false, "setInterval & clearInterval works with additional args: " + a + ", " + b + ", times: " + i); }).then(assert.async()); }); }).call(this); core-js-2.4.1/tests/tests/000077500000000000000000000000001274277553300154035ustar00rootroot00000000000000core-js-2.4.1/tests/tests/core.delay.ls000066400000000000000000000010371274277553300177710ustar00rootroot00000000000000{module, test} = QUnit module \core-js timeLimitedPromise = (time, fn)-> Promise.race [new Promise(fn), new Promise (res, rej)-> setTimeout rej, time] test 'delay' (assert)!-> assert.expect 6 assert.isFunction delay assert.arity delay, 1 assert.name delay, \delay assert.looksNative delay assert.ok delay(42) instanceof Promise, 'returns promises' timeLimitedPromise(1e3, !(res)-> delay(10).then !-> res it) .then -> assert.ok it is on, 'resolves as `true`' .catch -> assert.ok no 'rejected' .then assert.async!core-js-2.4.1/tests/tests/core.dict.ls000066400000000000000000000144051274277553300176210ustar00rootroot00000000000000{module, test} = QUnit module \core-js {keys, create, assign} = Object {from} = Array test 'Dict' (assert)!-> assert.isFunction Dict assert.arity Dict, 1 assert.name Dict, \Dict assert.looksNative Dict dict1 = Dict! assert.ok dict1 not instanceof Object assert.deepEqual keys(dict1), [] dict2 = Dict q:1 w:2 assert.ok dict2 not instanceof Object assert.deepEqual keys(dict2), <[q w]> assert.ok dict2.q is 1 assert.ok dict2.w is 2 dict3 = Dict createIterable [[1 1], [2 2]] assert.ok dict3 not instanceof Object assert.deepEqual keys(dict3), <[1 2]> assert.ok dict3.1 is 1 assert.ok dict3.2 is 2 # return #throw done = no iter = createIterable [null, 1, 2], return: -> done := on try => Dict iter assert.ok done, '.return #throw' test 'Dict.every' (assert)!-> {every} = Dict assert.isFunction every every obj = {q: 1} (val, key, that)!-> assert.ok val is 1 assert.ok key is \q assert.ok that is obj assert.ok @ is ctx , ctx = {} assert.ok every {q:1 w:2 e:3} -> typeof! it is \Number assert.ok not every {q:1 w:\2 e:3} -> typeof! it is \Number test 'Dict.filter' (assert)!-> {filter} = Dict assert.isFunction filter filter obj = {q: 1}, (val, key, that)!-> assert.ok val is 1 assert.ok key is \q assert.ok that is obj assert.ok @ is ctx , ctx = {} assert.deepEqual filter({q:1 w:2 e:3} -> it % 2), Dict q: 1 e: 3 test 'Dict.find' (assert)!-> {find} = Dict assert.isFunction find find obj = {q: 1}, (val, key, that)!-> assert.ok val is 1 assert.ok key is \q assert.ok that is obj assert.ok @ is ctx , ctx = {} assert.ok find({q:1 w:2 e:3} -> !(it % 2)) is 2 test 'Dict.findKey' (assert)!-> {findKey} = Dict assert.isFunction findKey findKey obj = {q: 1}, (val, key, that)-> assert.ok val is 1 assert.ok key is \q assert.ok that is obj assert.ok @ is ctx , ctx = {} assert.ok findKey({q:1 w:2 e:3} -> it is 2) is \w test 'Dict.forEach' (assert)!-> {forEach} = Dict assert.isFunction forEach forEach obj = {q: 1}, (val, key, that)!-> assert.ok val is 1 assert.ok key is \q assert.ok that is obj assert.ok @ is ctx , ctx = {} rez = {} forEach {q: 1 w: 2} (!-> rez[&1] = &0 + @), \_ assert.deepEqual rez, q: \1_ w: \2_ rez = on forEach obj = {q: 1 w: 2} !-> rez &&= (obj is &2) assert.ok rez rez = {} forEach Object.make({e: 3} {q: 1 w: 2}), !-> rez[&1] = &0 assert.ok !(\e of rez) rez = {} forEach [1 2] !-> rez[&1] = &0 assert.ok !(\length of rez) rez = {} forEach \123 !-> rez[&1] = &0 assert.ok \2 of rez test 'Dict.keyOf' (assert)!-> {keyOf} = Dict assert.isFunction keyOf assert.ok keyOf({q:1 w:2 e:3} 2) is \w assert.ok keyOf({q:1 w:2 e:3} 4) is void assert.ok keyOf({q:1 w:2 e:NaN} NaN) is void test 'Dict.map' (assert)!-> {map} = Dict assert.isFunction map map obj = {q: 1}, (val, key, that)!-> assert.ok val is 1 assert.ok key is \q assert.ok that is obj assert.ok @ is ctx , ctx = {} assert.deepEqual map({q:1 w:2 e:3} (^2)), Dict q:1 w:4 e:9 test 'Dict.mapPairs' (assert)!-> {mapPairs} = Dict assert.isFunction mapPairs mapPairs obj = {q: 1}, (val, key, that)!-> assert.ok val is 1 assert.ok key is \q assert.ok that is obj assert.ok @ is ctx , ctx = {} assert.deepEqual mapPairs({q:1 w:2 e:3}, (v, k)-> v != 2 && [k + k, v * v]), Dict qq:1 ee:9 test 'Dict.reduce' (assert)!-> {reduce} = Dict assert.isFunction reduce reduce (obj = a:1), (memo, val, key, that)!-> assert.ok memo is foo assert.ok val is 1 assert.ok key is \a assert.ok that is obj , foo = {} reduce {a:1 b:2}, (memo, val, key)-> assert.ok memo is 1 assert.ok val is 2 assert.ok key is \b reduce {q:1 w:2 e:3} (that, it)-> that[it] = it that , memo = {} assert.deepEqual memo, 1:1 2:2 3:3 test 'Dict.some' (assert)!-> {some} = Dict assert.isFunction some some obj = {q: 1}, (val, key, that)!-> assert.ok val is 1 assert.ok key is \q assert.ok that is obj assert.ok @ is ctx , ctx = {} assert.ok not some {q:1 w:2 e:3} -> typeof! it is \String assert.ok some {q:1 w:\2 e:3} -> typeof! it is \String test 'Dict.includes' (assert)!-> {includes} = Dict assert.isFunction includes dict = {q:1, w: NaN, e: -0, r: o = {}} assert.ok includes dict, 1 assert.ok includes dict, -0 assert.ok includes dict, 0 assert.ok includes dict, NaN assert.ok includes dict, o assert.ok !includes dict, 4 assert.ok !includes dict, -0.5 assert.ok !includes dict, {} test 'Dict.has' (assert)!-> {has} = Dict assert.isFunction has assert.ok has q:1, \q assert.ok not has q:1, \w assert.ok has [1] 0 assert.ok not has [] 0 assert.ok not has ^^{q:1} \q assert.ok not has {} \toString test 'Dict.get' (assert)!-> {get} = Dict assert.isFunction get assert.ok get(q:1, \q) is 1 assert.ok get(q:1, \w) is void assert.ok get([1] 0) is 1 assert.ok get([] 0) is void assert.ok get(^^{q:1} \q) is void assert.ok get({} \toString) is void test 'Dict.values' (assert)!-> {values} = Dict assert.isFunction values iter = values {} assert.ok iter[Symbol?toStringTag] is 'Dict Iterator' assert.isIterator iter assert.isIterable iter assert.deepEqual from(values({q:1, w:2, e:3})), [1 2 3] assert.deepEqual from(values(new String \qwe)), <[q w e]> assert.deepEqual from(values(assign create({q:1, w:2, e:3}), {a:4, s:5, d:6})), [4 5 6] test 'Dict.keys' (assert)!-> {keys} = Dict assert.isFunction keys iter = keys {} assert.ok iter[Symbol?toStringTag] is 'Dict Iterator' assert.isIterator iter assert.isIterable iter assert.deepEqual from(keys({q:1, w:2, e:3})), <[q w e]> assert.deepEqual from(keys(new String \qwe)), <[0 1 2]> assert.deepEqual from(keys(assign create({q:1, w:2, e:3}), {a:4, s:5, d:6})), <[a s d]> test 'Dict.entries' (assert)!-> {entries} = Dict assert.isFunction entries iter = entries {} assert.ok iter[Symbol?toStringTag] is 'Dict Iterator' assert.isIterator iter assert.isIterable iter assert.deepEqual from(entries({q:1, w:2, e:3})),[[\q 1] [\w 2] [\e 3]] assert.deepEqual from(entries(new String \qwe)), [[\0 \q] [\1 \w] [\2 \e]] assert.deepEqual from(entries(assign create({q:1, w:2, e:3}), {a:4, s:5, d:6})), [[\a 4] [\s 5] [\d 6]]core-js-2.4.1/tests/tests/core.function.part.ls000066400000000000000000000015241274277553300214660ustar00rootroot00000000000000{module, test} = QUnit module \core-js test 'Function#part' (assert)!-> assert.isFunction Function::part assert.ok (-> typeof! it is \String)part(\qwe)! obj = a: 42 obj.fn = (-> @a + it)part 21 assert.ok obj.fn! is 63 $ = _ fn = -> Array::map.call(&, String).join ' ' part = fn.part $, \Саша, $, \шоссе, $, \сосала assert.isFunction part, '.part with placeholders return function' assert.ok part(\Шла \по) is 'Шла Саша по шоссе undefined сосала', '.part with placeholders: args < placeholders' assert.ok part(\Шла \по \и) is 'Шла Саша по шоссе и сосала', '.part with placeholders: args == placeholders' assert.ok part(\Шла \по \и \сушку) is 'Шла Саша по шоссе и сосала сушку', '.part with placeholders: args > placeholders'core-js-2.4.1/tests/tests/core.get-iterator-method.ls000066400000000000000000000010211274277553300225500ustar00rootroot00000000000000{module, test} = QUnit module \core-js {from} = Array test 'core.getIteratorMethod' (assert)!-> {getIteratorMethod} = core assert.isFunction getIteratorMethod iterable = createIterable [] iterFn = getIteratorMethod iterable assert.isFunction iterFn assert.isIterator iterFn.call iterable assert.isFunction getIteratorMethod [] assert.isFunction getIteratorMethod (->&)! assert.isFunction getIteratorMethod Array:: assert.isFunction getIteratorMethod String:: assert.strictEqual getIteratorMethod({}), voidcore-js-2.4.1/tests/tests/core.get-iterator.ls000066400000000000000000000004761274277553300213070ustar00rootroot00000000000000{module, test} = QUnit module \core-js {from} = Array test 'core.getIterator' (assert)!-> {getIterator} = core assert.isFunction getIterator assert.isIterator getIterator [] assert.isIterator getIterator (->&)! assert.isIterator getIterator createIterable [] assert.throws (!-> getIterator {}), TypeErrorcore-js-2.4.1/tests/tests/core.is-iterable.ls000066400000000000000000000004721274277553300210750ustar00rootroot00000000000000{module, test} = QUnit module \core-js test 'core.isIterable' (assert)!-> {isIterable} = core assert.isFunction isIterable assert.ok isIterable createIterable [] assert.ok isIterable [] assert.ok isIterable (->&)! assert.ok isIterable Array:: assert.ok isIterable String:: assert.ok !isIterable {}core-js-2.4.1/tests/tests/core.number.iterator.ls000066400000000000000000000022571274277553300220200ustar00rootroot00000000000000{module, test} = QUnit module \core-js test 'Number#@@iterator' (assert)!-> {iterator, toStringTag} = Symbol assert.isIterable Number:: iter1 = 2[iterator]! assert.isIterator iter1 assert.isIterable iter1 assert.ok iter1[toStringTag] is 'Number Iterator', '@@toStringTag' assert.deepEqual iter1.next!, {done: no, value: 0}, '2 #1' assert.deepEqual iter1.next!, {done: no, value: 1}, '2 #2' assert.deepEqual iter1.next!, {done: on, value: void}, '2 #3' iter2 = 1.5[iterator]! assert.deepEqual iter2.next!, {done: no, value: 0}, '1.5 #1' assert.deepEqual iter2.next!, {done: no, value: 1}, '1.5 #2' assert.deepEqual iter2.next!, {done: on, value: void}, '1.5 #3' iter3 = (-1)[iterator]! assert.deepEqual iter3.next!, {done: on, value: void}, '-1' iter4 = NaN[iterator]! assert.deepEqual iter4.next!, {done: on, value: void}, 'NaN' iter5 = Infinity[iterator]! assert.deepEqual iter5.next!, {done: no, value: 0}, 'Infinity #1' assert.deepEqual iter5.next!, {done: no, value: 1}, 'Infinity #1' assert.deepEqual iter5.next!, {done: no, value: 2}, 'Infinity #1' iter6 = (-Infinity)[iterator]! assert.deepEqual iter6.next!, {done: on, value: void}, '-Infinity'core-js-2.4.1/tests/tests/core.object.classof.ls000066400000000000000000000043051274277553300215730ustar00rootroot00000000000000{module, test} = QUnit module \core-js test 'Object.classof' (assert)!-> {classof} = Object assert.isFunction classof assert.ok classof(void) is \Undefined, 'classof undefined is `Undefined`' assert.ok classof(null) is \Null, 'classof null is `Null`' assert.ok classof(true) is \Boolean, 'classof bool is `Boolean`' assert.ok classof('string') is \String, 'classof string is `String`' assert.ok classof(7) is \Number, 'classof number is `Number`' assert.ok classof(Symbol!) is \Symbol, 'classof symbol is `Symbol`' assert.ok classof(new Boolean no) is \Boolean, 'classof new Boolean is `Boolean`' assert.ok classof(new String '') is \String, 'classof new String is `String`' assert.ok classof(new Number 7) is \Number, 'classof new Number is `Number`' assert.ok classof({}) is \Object, 'classof {} is `Object`' assert.ok classof([]) is \Array, 'classof array is `Array`' assert.ok classof(->) is \Function, 'classof function is `Function`' assert.ok classof(/./) is \RegExp, 'classof regexp is `Undefined`' assert.ok classof(TypeError!) is \Error, 'classof new TypeError is `RegExp`' assert.ok classof((->&)!) is \Arguments, 'classof arguments list is `Arguments`' assert.ok classof(new Set) is \Set, 'classof undefined is `Map`' assert.ok classof(new Map) is \Map, 'classof map is `Undefined`' assert.ok classof(new WeakSet) is \WeakSet, 'classof weakset is `WeakSet`' assert.ok classof(new WeakMap) is \WeakMap, 'classof weakmap is `WeakMap`' assert.ok classof(new Promise ->) is \Promise, 'classof promise is `Promise`' assert.ok classof(''[Symbol.iterator]!) is 'String Iterator', 'classof String Iterator is `String Iterator`' assert.ok classof([]entries!) is 'Array Iterator', 'classof Array Iterator is `Array Iterator`' assert.ok classof(new Set!entries!) is 'Set Iterator', 'classof Set Iterator is `Set Iterator`' assert.ok classof(new Map!entries!) is 'Map Iterator', 'classof Map Iterator is `Map Iterator`' assert.ok classof(Math) is \Math, 'classof Math is `Math`' if JSON? assert.ok classof(JSON) is \JSON, 'classof JSON is `JSON`' class Class @::[Symbol?toStringTag] = \Class assert.ok classof(new Class) is \Class, 'classof user class is [Symbol.toStringTag]'core-js-2.4.1/tests/tests/core.object.define.ls000066400000000000000000000005131274277553300213700ustar00rootroot00000000000000{module, test} = QUnit module \core-js test 'Object.define' (assert)!-> {define, defineProperty} = Object assert.isFunction define foo = q:1 assert.ok foo is define foo, w:2 assert.ok foo.w is 2 if DESCRIPTORS foo = q:1 foo2 = defineProperty {}, \w, get: -> @q + 1 define foo, foo2 assert.ok foo.w is 2core-js-2.4.1/tests/tests/core.object.is-object.ls000066400000000000000000000016711274277553300220230ustar00rootroot00000000000000{module, test} = QUnit module \core-js test 'Object.isObject' (assert)!-> {isObject} = Object assert.isFunction isObject assert.ok not isObject(void), 'isObject undefined return false' assert.ok not isObject(null), 'isObject null return false' assert.ok not isObject(1), 'isObject number return false' assert.ok not isObject(true), 'isObject bool return false' assert.ok not isObject('string'), 'isObject string return false' assert.ok isObject(new Number 1), 'isObject new Number return true' assert.ok isObject(new Boolean no), 'isObject new Boolean return true' assert.ok isObject(new String 1), 'isObject new String return true' assert.ok isObject({}), 'isObject object return true' assert.ok isObject([]), 'isObject array return true' assert.ok isObject(/./), 'isObject regexp return true' assert.ok isObject(->), 'isObject function return true' assert.ok isObject(new ->), 'isObject constructor instance return true'core-js-2.4.1/tests/tests/core.object.make.ls000066400000000000000000000003371274277553300210570ustar00rootroot00000000000000{module, test} = QUnit module \core-js test 'Object.make' (assert)!-> {make} = Object assert.isFunction make object = make foo = {q:1}, {w:2} assert.ok Object.getPrototypeOf(object) is foo assert.ok object.w is 2core-js-2.4.1/tests/tests/core.regexp.escape.ls000066400000000000000000000006331274277553300214250ustar00rootroot00000000000000{module, test} = QUnit module \core-js test 'RegExp.escape' (assert)!-> {escape} = RegExp assert.isFunction escape assert.arity escape, 1 assert.name escape, \escape assert.looksNative escape assert.strictEqual escape('qwe asd'), 'qwe asd', "Don't change simple string" assert.strictEqual escape('\\[]{}()*+?.^$|'), '\\\\\\[\\]\\{\\}\\(\\)\\*\\+\\?\\.\\^\\$\\|', 'Escape all RegExp special chars'core-js-2.4.1/tests/tests/core.string.escape-html.ls000066400000000000000000000006731274277553300224070ustar00rootroot00000000000000{module, test} = QUnit module \core-js test 'String#escapeHTML' (assert)!-> assert.isFunction String::escapeHTML assert.arity String::escapeHTML, 0 assert.name String::escapeHTML, \escapeHTML assert.looksNative String::escapeHTML assert.strictEqual 'qwe, asd'escapeHTML!, 'qwe, asd' assert.strictEqual '
qwe
'escapeHTML!, '<div>qwe</div>' assert.strictEqual "&<>\"'".escapeHTML!, '&<>"''core-js-2.4.1/tests/tests/core.string.unescape-html.ls000066400000000000000000000007171274277553300227510ustar00rootroot00000000000000{module, test} = QUnit module \core-js test 'String#unescapeHTML' (assert)!-> assert.isFunction String::unescapeHTML assert.arity String::unescapeHTML, 0 assert.name String::unescapeHTML, \unescapeHTML assert.looksNative String::unescapeHTML assert.strictEqual 'qwe, asd'.unescapeHTML!, 'qwe, asd' assert.strictEqual '<div>qwe</div>'.unescapeHTML!, '
qwe
' assert.strictEqual '&<>"''.unescapeHTML!, "&<>\"'"core-js-2.4.1/tests/tests/es6.array.copy-within.ls000066400000000000000000000026101274277553300220250ustar00rootroot00000000000000{module, test} = QUnit module \ES6 test 'Array#copyWithin' (assert)!-> assert.isFunction Array::copyWithin assert.arity Array::copyWithin, 2 assert.name Array::copyWithin, \copyWithin assert.looksNative Array::copyWithin assert.strictEqual (a = [1]copyWithin(0)), a assert.nonEnumerable Array::, \copyWithin assert.deepEqual [1 2 3 4 5]copyWithin(0 3), [4 5 3 4 5] assert.deepEqual [1 2 3 4 5]copyWithin(1 3), [1 4 5 4 5] assert.deepEqual [1 2 3 4 5]copyWithin(1 2), [1 3 4 5 5] assert.deepEqual [1 2 3 4 5]copyWithin(2 2), [1 2 3 4 5] assert.deepEqual [1 2 3 4 5]copyWithin(0 3 4), [4 2 3 4 5] assert.deepEqual [1 2 3 4 5]copyWithin(1 3 4), [1 4 3 4 5] assert.deepEqual [1 2 3 4 5]copyWithin(1 2 4), [1 3 4 4 5] assert.deepEqual [1 2 3 4 5]copyWithin(0 -2), [4 5 3 4 5] assert.deepEqual [1 2 3 4 5]copyWithin(0 -2 -1), [4 2 3 4 5] assert.deepEqual [1 2 3 4 5]copyWithin(-4 -3 -2), [1 3 3 4 5] assert.deepEqual [1 2 3 4 5]copyWithin(-4 -3 -1), [1 3 4 4 5] assert.deepEqual [1 2 3 4 5]copyWithin(-4 -3), [1 3 4 5 5] if STRICT assert.throws (-> Array::copyWithin.call null, 0), TypeError assert.throws (-> Array::copyWithin.call void, 0), TypeError if NATIVE assert.deepEqual Array::copyWithin.call({0:1, 1: 2, 2: 3, length: -1}, 1, 2), {0: 1, 1: 2, 2: 3, length: -1}, 'uses ToLength' assert.ok \copyWithin of Array::[Symbol.unscopables], 'In Array#@@unscopables'core-js-2.4.1/tests/tests/es6.array.every.ls000066400000000000000000000021561274277553300207120ustar00rootroot00000000000000{module, test} = QUnit module \ES6 test 'Array#every' (assert)!-> assert.isFunction Array::every assert.arity Array::every, 1 assert.name Array::every, \every assert.looksNative Array::every assert.nonEnumerable Array::, \every (a = [1])every (val, key, that)!-> assert.same &length, 3, 'correct number of callback arguments' assert.same val, 1, 'correct value in callback' assert.same key, 0, 'correct index in callback' assert.same that, a, 'correct link to array in callback' assert.same @, ctx, 'correct callback context' , ctx = {} assert.ok [1 2 3]every -> typeof! it is \Number assert.ok [1 2 3]every (<4) assert.ok not [1 2 3]every (<3) assert.ok not [1 2 3]every -> typeof! it is \String assert.ok [1 2 3]every (-> +@ is 1 ), 1 rez = '' [1 2 3]every -> rez += &1 assert.ok rez is \012 assert.ok (arr = [1 2 3])every -> &2 is arr if STRICT assert.throws (!-> Array::every.call null, !->), TypeError assert.throws (!-> Array::every.call void, !->), TypeError if NATIVE assert.ok (try on is Array::every.call {length: -1, 0: 1}, !-> throw 42), 'uses ToLength'core-js-2.4.1/tests/tests/es6.array.fill.ls000066400000000000000000000016201274277553300205010ustar00rootroot00000000000000{module, test} = QUnit module \ES6 test 'Array#fill' (assert)!-> assert.isFunction Array::fill assert.arity Array::fill, 1 assert.name Array::fill, \fill assert.looksNative Array::fill assert.nonEnumerable Array::, \fill assert.strictEqual (a = Array(5)fill(5)), a assert.deepEqual Array(5)fill(5), [5 5 5 5 5] assert.deepEqual Array(5)fill(5 1), [void 5 5 5 5] assert.deepEqual Array(5)fill(5 1 4), [void 5 5 5 void] assert.deepEqual Array(5)fill(5 6 1), [void void void void void] assert.deepEqual Array(5)fill(5 -3 4), [void void 5 5 void] if STRICT assert.throws (-> Array::fill.call null, 0), TypeError assert.throws (-> Array::fill.call void, 0), TypeError if NATIVE and DESCRIPTORS assert.ok (try Array::fill.call Object.defineProperty {length: -1}, 0, set: -> throw Error!), 'uses ToLength' assert.ok \fill of Array::[Symbol.unscopables], 'In Array#@@unscopables'core-js-2.4.1/tests/tests/es6.array.filter.ls000066400000000000000000000016061274277553300210440ustar00rootroot00000000000000{module, test} = QUnit module \ES6 test 'Array#filter' (assert)!-> assert.isFunction Array::filter assert.arity Array::filter, 1 assert.name Array::filter, \filter assert.looksNative Array::filter assert.nonEnumerable Array::, \filter (a = [1])filter (val, key, that)!-> assert.same &length, 3, 'correct number of callback arguments' assert.same val, 1, 'correct value in callback' assert.same key, 0, 'correct index in callback' assert.same that, a, 'correct link to array in callback' assert.same @, ctx, 'correct callback context' , ctx = {} assert.deepEqual [1 2 3 4 5] [1 2 3 \q {} 4 on 5]filter -> typeof it is \number if STRICT assert.throws (!-> Array::filter.call null, !->), TypeError assert.throws (!-> Array::filter.call void, !->), TypeError if NATIVE assert.ok (try Array::filter.call {length: -1, 0: 1}, !-> throw 42), 'uses ToLength'core-js-2.4.1/tests/tests/es6.array.find-index.ls000066400000000000000000000020361274277553300216020ustar00rootroot00000000000000{module, test} = QUnit module \ES6 test 'Array#findIndex' (assert)!-> assert.isFunction Array::findIndex assert.arity Array::findIndex, 1 assert.name Array::findIndex, \findIndex assert.looksNative Array::findIndex assert.nonEnumerable Array::, \findIndex (a = [1])findIndex (val, key, that)!-> assert.same &length, 3, 'correct number of callback arguments' assert.same val, 1, 'correct value in callback' assert.same key, 0, 'correct index in callback' assert.same that, a, 'correct link to array in callback' assert.same @, ctx, 'correct callback context' , ctx = {} assert.same [1 3 NaN, 42 {}]findIndex((is 42)), 3 assert.same [1 3 NaN, 42 {}]findIndex((is 43)), -1 if STRICT assert.throws (-> Array::findIndex.call null, 0), TypeError assert.throws (-> Array::findIndex.call void, 0), TypeError if NATIVE and DESCRIPTORS assert.ok (try -1 is Array::findIndex.call {length: -1, 0: 1}, !-> throw 42), 'uses ToLength' assert.ok \findIndex of Array::[Symbol.unscopables], 'In Array#@@unscopables'core-js-2.4.1/tests/tests/es6.array.find.ls000066400000000000000000000017351274277553300205020ustar00rootroot00000000000000{module, test} = QUnit module \ES6 test 'Array#find' (assert)!-> assert.isFunction Array::find assert.arity Array::find, 1 assert.name Array::find, \find assert.looksNative Array::find assert.nonEnumerable Array::, \find (a = [1])find (val, key, that)!-> assert.same &length, 3, 'correct number of callback arguments' assert.same val, 1, 'correct value in callback' assert.same key, 0, 'correct index in callback' assert.same that, a, 'correct link to array in callback' assert.same @, ctx, 'correct callback context' , ctx = {} assert.same [1 3 NaN, 42 {}]find((is 42)), 42 assert.same [1 3 NaN, 42 {}]find((is 43)), void if STRICT assert.throws (-> Array::find.call null, 0), TypeError assert.throws (-> Array::find.call void, 0), TypeError if NATIVE and DESCRIPTORS assert.ok (try void is Array::find.call {length: -1, 0: 1}, !-> throw 42), 'uses ToLength' assert.ok \find of Array::[Symbol.unscopables], 'In Array#@@unscopables'core-js-2.4.1/tests/tests/es6.array.for-each.ls000066400000000000000000000022641274277553300212440ustar00rootroot00000000000000{module, test} = QUnit module \ES6 test 'Array#forEach' (assert)!-> assert.isFunction Array::forEach assert.arity Array::forEach, 1 assert.name Array::forEach, \forEach assert.looksNative Array::forEach assert.nonEnumerable Array::, \forEach (a = [1])forEach (val, key, that)!-> assert.same &length, 3, 'correct number of callback arguments' assert.same val, 1, 'correct value in callback' assert.same key, 0, 'correct index in callback' assert.same that, a, 'correct link to array in callback' assert.same @, ctx, 'correct callback context' , ctx = {} rez = '' [1 2 3]forEach !-> rez += it assert.ok rez is \123 rez = '' [1 2 3]forEach !-> rez += &1 assert.ok rez is \012 rez = '' [1 2 3]forEach !-> rez += &2 assert.ok rez is '1,2,31,2,31,2,3' rez='' [1 2 3]forEach (!->rez+=@), 1 assert.ok rez is \111 rez = '' arr = [] arr.5 = '' arr.forEach (, k)!-> rez += k assert.ok rez is \5 if STRICT assert.throws (!-> Array::forEach.call null, !->), TypeError assert.throws (!-> Array::forEach.call void, !->), TypeError if NATIVE assert.ok (try void is Array::forEach.call {length: -1, 0: 1}, !-> throw 42), 'uses ToLength'core-js-2.4.1/tests/tests/es6.array.from.ls000066400000000000000000000063411274277553300205230ustar00rootroot00000000000000{module, test} = QUnit module \ES6 test 'Array.from' (assert)!-> {from, isArray} = Array {defineProperty} = Object iterator = Symbol?iterator assert.isFunction from assert.arity from, 1 assert.name from, \from assert.looksNative from assert.nonEnumerable Array, \from for type, col of {'array-like': {length: \3, 0: \1, 1: \2, 2: \3}, arguments: (-> &)(\1 \2 \3), array: <[1 2 3]>, iterable: createIterable(<[1 2 3]>), string: \123} assert.arrayEqual from(col), <[1 2 3]>, "Works with #type" assert.arrayEqual from(col, (^2)), [1 4 9], "Works with #type + mapFn" for type, col of {'array-like': {length: 1, 0: 1}, arguments: (-> &)(1), array: [1], iterable: createIterable([1]), string: \1} assert.arrayEqual (from col, (val, key)-> assert.same @, ctx, "Works with #type, correct callback context" assert.same val, if type is \string => \1 else 1, "Works with #type, correct callback key" assert.same key, 0, "Works with #type, correct callback value" assert.same &length, 2, "Works with #type, correct callback arguments number" 42 , ctx = {}), [42], "Works with #type, correct result" for [no on 0] assert.arrayEqual from(..), [], "Works with #{..}" for [null void] assert.throws (!-> from ..), TypeError, "Throws on #{..}" assert.arrayEqual from('𠮷𠮷𠮷'), <[𠮷 𠮷 𠮷]>, 'Uses correct string iterator' # return #default done = on iter = createIterable [1 2 3], return: -> done := no from iter, -> return no assert.ok done, '.return #default' # return #throw done = no iter = createIterable [1 2 3], return: -> done := on try => from iter, -> throw 42 assert.ok done, '.return #throw' # generic, iterable case F = !-> inst = from.call F, createIterable [1 2] assert.ok inst instanceof F, 'generic, iterable case, instanceof' assert.arrayEqual inst, [1 2], 'generic, iterable case, elements' # generic, array-like case inst = from.call F, {0: 1, 1: 2, length: 2} assert.ok inst instanceof F, 'generic, array-like case, instanceof' assert.arrayEqual inst, [1 2], 'generic, array-like case, elements' # call @@iterator in Array with custom iterator a = [1 2 3] done = no a['@@iterator'] = void a[iterator] = -> done := on [][iterator]call @ assert.arrayEqual from(a), [1 2 3], 'Array with custom iterator, elements' assert.ok done, 'call @@iterator in Array with custom iterator' array = [1 2 3] delete array.1 assert.arrayEqual from(array, String), <[1 undefined 3]>, 'Ignores holes' assert.ok (try from {length: -1, 0: 1}, !-> throw 42), 'Uses ToLength' assert.arrayEqual from([], undefined), [], "Works with undefined as second argument" assert.throws (!-> from [], null), TypeError, "Throws with null as second argument" assert.throws (!-> from [], 0), TypeError, "Throws with 0 as second argument" assert.throws (!-> from [], ''), TypeError, "Throws with '' as second argument" assert.throws (!-> from [], no), TypeError, "Throws with false as second argument" assert.throws (!-> from [], {}), TypeError, "Throws with {} as second argument" if DESCRIPTORS called = no F = !-> defineProperty F::, 0, set: !-> called = on from.call F, [1 2 3] assert.ok !called, 'Should not call prototype accessors'core-js-2.4.1/tests/tests/es6.array.index-of.ls000066400000000000000000000016361274277553300212730ustar00rootroot00000000000000{module, test} = QUnit module \ES6 test 'Array#indexOf' (assert)!-> assert.isFunction Array::indexOf assert.arity Array::indexOf, 1 assert.name Array::indexOf, \indexOf assert.looksNative Array::indexOf assert.nonEnumerable Array::, \indexOf assert.same 0, [1 1 1]indexOf 1 assert.same -1, [1 2 3]indexOf 1 1 assert.same 1, [1 2 3]indexOf 2 1 assert.same -1, [1 2 3]indexOf 2 -1 assert.same 1, [1 2 3]indexOf 2 -2 assert.same -1, [NaN]indexOf NaN assert.same 3, Array(2)concat([1 2 3])indexOf 2 assert.same -1, Array(1)indexOf void assert.same 0, [1].indexOf(1, -0), "shouldn't return negative zero" if STRICT assert.throws (!-> Array::indexOf.call null, 0), TypeError assert.throws (!-> Array::indexOf.call void, 0), TypeError if NATIVE and DESCRIPTORS assert.ok (try -1 is Array::indexOf.call Object.defineProperty({length: -1}, 0, get: -> throw Error!), 1), 'uses ToLength'core-js-2.4.1/tests/tests/es6.array.is-array.ls000066400000000000000000000005041274277553300213020ustar00rootroot00000000000000{module, test} = QUnit module \ES6 test 'Array.isArray' (assert)!-> {isArray} = Array assert.isFunction isArray assert.arity isArray, 1 assert.name isArray, \isArray assert.looksNative isArray assert.nonEnumerable Array, \isArray assert.ok not isArray {} assert.ok not isArray do -> & assert.ok isArray []core-js-2.4.1/tests/tests/es6.array.iterator.ls000066400000000000000000000061101274277553300214030ustar00rootroot00000000000000{module, test} = QUnit module \ES6 test 'Array#keys' (assert)!-> assert.isFunction Array::keys assert.arity Array::keys, 0 assert.name Array::keys, \keys assert.looksNative Array::keys assert.nonEnumerable Array::, \keys iter = <[q w e]>keys! assert.isIterator iter assert.isIterable iter assert.strictEqual iter[Symbol?toStringTag], 'Array Iterator' assert.deepEqual iter.next!, {value: 0, done: no} assert.deepEqual iter.next!, {value: 1, done: no} assert.deepEqual iter.next!, {value: 2, done: no} assert.deepEqual iter.next!, {value: void, done: on} if NATIVE assert.deepEqual Array::keys.call({length: -1}).next!, {value: void, done: on}, 'uses ToLength' assert.ok \keys of Array::[Symbol?unscopables], 'In Array#@@unscopables' test 'Array#values' (assert)!-> assert.isFunction Array::values assert.arity Array::values, 0 assert.name Array::values, \values # fails in V8 and FF assert.looksNative Array::values assert.nonEnumerable Array::, \values iter = <[q w e]>values! assert.isIterator iter assert.isIterable iter assert.strictEqual iter[Symbol?toStringTag], 'Array Iterator' assert.deepEqual iter.next!, {value: \q, done: no} assert.deepEqual iter.next!, {value: \w, done: no} assert.deepEqual iter.next!, {value: \e, done: no} assert.deepEqual iter.next!, {value: void, done: on} if NATIVE assert.deepEqual Array::values.call({length: -1}).next!, {value: void, done: on}, 'uses ToLength' assert.ok \values of Array::[Symbol?unscopables], 'In Array#@@unscopables' test 'Array#entries' (assert)!-> assert.isFunction Array::entries assert.arity Array::entries, 0 assert.name Array::entries, \entries assert.looksNative Array::entries assert.nonEnumerable Array::, \entries iter = <[q w e]>entries! assert.isIterator iter assert.isIterable iter assert.strictEqual iter[Symbol?toStringTag], 'Array Iterator' assert.deepEqual iter.next!, {value: [0 \q], done: no} assert.deepEqual iter.next!, {value: [1 \w], done: no} assert.deepEqual iter.next!, {value: [2 \e], done: no} assert.deepEqual iter.next!, {value: void, done: on} if NATIVE assert.deepEqual Array::entries.call({length: -1}).next!, {value: void, done: on}, 'uses ToLength' assert.ok \entries of Array::[Symbol?unscopables], 'In Array#@@unscopables' test 'Array#@@iterator' (assert)!-> assert.isIterable Array:: assert.arity Array::[Symbol?iterator], 0 assert.name Array::[Symbol?iterator], \values # fails in V8 and FF assert.looksNative Array::[Symbol?iterator] assert.nonEnumerable Array::, Symbol?iterator assert.strictEqual Array::[Symbol?iterator], Array::values iter = <[q w e]>[Symbol?iterator]! assert.isIterator iter assert.isIterable iter assert.strictEqual iter[Symbol?toStringTag], 'Array Iterator' assert.deepEqual iter.next!, {value: \q, done: no} assert.deepEqual iter.next!, {value: \w, done: no} assert.deepEqual iter.next!, {value: \e, done: no} assert.deepEqual iter.next!, {value: void, done: on} if NATIVE assert.deepEqual Array::[Symbol?iterator].call({length: -1}).next!, {value: void, done: on}, 'uses ToLength'core-js-2.4.1/tests/tests/es6.array.join.ls000066400000000000000000000010251274277553300205110ustar00rootroot00000000000000{module, test} = QUnit module \ES6 test 'Array#join' (assert)!-> assert.isFunction Array::join assert.arity Array::join, 1 assert.name Array::join, \join assert.looksNative Array::join assert.nonEnumerable Array::, \join assert.strictEqual Array::join.call([1 2 3] void), '1,2,3' assert.strictEqual Array::join.call(\123), '1,2,3' assert.strictEqual Array::join.call(\123 \|), '1|2|3' if STRICT assert.throws (!-> Array::join.call null, 0), TypeError assert.throws (!-> Array::join.call void, 0), TypeErrorcore-js-2.4.1/tests/tests/es6.array.last-index-of.ls000066400000000000000000000020331274277553300222240ustar00rootroot00000000000000{module, test} = QUnit module \ES6 test 'Array#lastIndexOf' (assert)!-> assert.isFunction Array::lastIndexOf assert.arity Array::lastIndexOf, 1 assert.name Array::lastIndexOf, \lastIndexOf assert.looksNative Array::lastIndexOf assert.nonEnumerable Array::, \lastIndexOf assert.same 2, [1 1 1]lastIndexOf 1 assert.same -1, [1 2 3]lastIndexOf 3 1 assert.same 1, [1 2 3]lastIndexOf 2 1 assert.same -1, [1 2 3]lastIndexOf 2 -3 assert.same -1, [1 2 3]lastIndexOf 1 -4 assert.same 1, [1 2 3]lastIndexOf 2 -2 assert.same -1, [NaN]lastIndexOf NaN assert.same 1, [1 2 3]concat(Array 2)lastIndexOf 2 assert.same 0, [1].lastIndexOf(1, -0), "shouldn't return negative zero" if STRICT assert.throws (!-> Array::lastIndexOf.call null, 0), TypeError assert.throws (!-> Array::lastIndexOf.call void, 0), TypeError if NATIVE and DESCRIPTORS assert.ok (try -1 is Array::lastIndexOf.call Object.defineProperties({length: -1}, {2147483646: {get: -> throw Error!}, 4294967294: {get: -> throw Error!}}), 1), 'uses ToLength'core-js-2.4.1/tests/tests/es6.array.map.ls000066400000000000000000000016341274277553300203350ustar00rootroot00000000000000{module, test} = QUnit module \ES6 test 'Array#map' (assert)!-> assert.isFunction Array::map assert.arity Array::map, 1 assert.name Array::map, \map assert.looksNative Array::map assert.nonEnumerable Array::, \map (a = [1])map (val, key, that)!-> assert.same &length, 3, 'correct number of callback arguments' assert.same val, 1, 'correct value in callback' assert.same key, 0, 'correct index in callback' assert.same that, a, 'correct link to array in callback' assert.same @, ctx, 'correct callback context' , ctx = {} assert.deepEqual [2 3 4] [1 2 3]map (+ 1) assert.deepEqual [1 3 5] [1 2 3]map ( + ) assert.deepEqual [2 2 2] [1 2 3]map (-> +@), 2 if STRICT assert.throws (!-> Array::map.call null, !->), TypeError assert.throws (!-> Array::map.call void, !->), TypeError if NATIVE assert.ok (try Array::map.call {length: -1, 0: 1}, !-> throw 42), 'uses ToLength'core-js-2.4.1/tests/tests/es6.array.of.ls000066400000000000000000000012531274277553300201610ustar00rootroot00000000000000{module, test} = QUnit module \ES6 test 'Array.of' (assert)!-> {defineProperty} = Object assert.isFunction Array.of assert.arity Array.of, 0 assert.name Array.of, \of assert.looksNative Array.of assert.nonEnumerable Array, \of assert.deepEqual Array.of(1), [1] assert.deepEqual Array.of(1 2 3), [1 2 3] # generic F = !-> inst = Array.of.call F, 1, 2 assert.ok inst instanceof F assert.strictEqual inst.0, 1 assert.strictEqual inst.1, 2 assert.strictEqual inst.length, 2 if DESCRIPTORS called = no F = !-> defineProperty F::, 0, set: !-> called = on Array.of.call F, 1, 2, 3 assert.ok !called, 'Should not call prototype accessors'core-js-2.4.1/tests/tests/es6.array.reduce-right.ls000066400000000000000000000031001274277553300221300ustar00rootroot00000000000000{module, test} = QUnit module \ES6 test 'Array#reduceRight' (assert)!-> assert.isFunction Array::reduceRight assert.arity Array::reduceRight, 1 assert.name Array::reduceRight, \reduceRight assert.looksNative Array::reduceRight assert.nonEnumerable Array::, \reduceRight (a = [1])reduceRight (memo, val, key, that)!-> assert.same &length, 4, 'correct number of callback arguments' assert.same memo, accumulator, 'correct callback accumulator' assert.same val, 1, 'correct value in callback' assert.same key, 0, 'correct index in callback' assert.same that, a, 'correct link to array in callback' , accumulator = {} assert.same [1 2 3]reduceRight((+), 1), 7, 'works with initial accumulator' (a = [1 2])reduceRight (memo, val, key, that)!-> assert.same memo, 2, 'correct default accumulator' assert.same val, 1, 'correct start value without initial accumulator' assert.same key, 0, 'correct start index without initial accumulator' assert.same [1 2 3]reduceRight((+)), 6, 'works without initial accumulator' v = '' k = '' [1 2 3]reduceRight (memo, a, b)!-> v += a k += b , 0 assert.same v, \321,'correct order #1' assert.same k, \210,'correct order #2' assert.same Array::reduceRight.call({0: 1, 1: 2, length: 2}, (+)), 3, 'generic' if STRICT assert.throws (!-> Array::reduceRight.call null, (!->), 1), TypeError assert.throws (!-> Array::reduceRight.call void, (!->), 1), TypeError if NATIVE assert.ok (try Array::reduceRight.call {length: -1, 2147483646: 0, 4294967294: 0}, (!-> throw 42), 1), 'uses ToLength'core-js-2.4.1/tests/tests/es6.array.reduce.ls000066400000000000000000000027301274277553300210250ustar00rootroot00000000000000{module, test} = QUnit module \ES6 test 'Array#reduce' (assert)!-> assert.isFunction Array::reduce assert.arity Array::reduce, 1 assert.name Array::reduce, \reduce assert.looksNative Array::reduce assert.nonEnumerable Array::, \reduce (a = [1])reduce (memo, val, key, that)!-> assert.same &length, 4, 'correct number of callback arguments' assert.same memo, accumulator, 'correct callback accumulator' assert.same val, 1, 'correct value in callback' assert.same key, 0, 'correct index in callback' assert.same that, a, 'correct link to array in callback' , accumulator = {} assert.same [1 2 3]reduce((+), 1), 7, 'works with initial accumulator' (a = [1 2])reduce (memo, val, key, that)!-> assert.same memo, 1, 'correct default accumulator' assert.same val, 2, 'correct start value without initial accumulator' assert.same key, 1, 'correct start index without initial accumulator' assert.same [1 2 3]reduce((+)), 6, 'works without initial accumulator' v = '' k = '' [1 2 3]reduce (memo, a, b)!-> v += a k += b , 0 assert.same v, \123,'correct order #1' assert.same k, \012,'correct order #2' assert.same Array::reduce.call({0: 1, 1: 2, length: 2}, (+)), 3, 'generic' if STRICT assert.throws (!-> Array::reduce.call null, (!->), 1), TypeError assert.throws (!-> Array::reduce.call void, (!->), 1), TypeError if NATIVE assert.ok (try Array::reduce.call {length: -1, 0: 1}, (!-> throw 42), 1), 'uses ToLength'core-js-2.4.1/tests/tests/es6.array.slice.ls000066400000000000000000000023141274277553300206530ustar00rootroot00000000000000{module, test} = QUnit module \ES6 test 'Array#slice' (assert)!-> assert.isFunction Array::slice assert.arity Array::slice, 2 assert.name Array::slice, \slice assert.looksNative Array::slice assert.nonEnumerable Array::, \slice arr = <[1 2 3 4 5]> assert.deepEqual arr.slice!, arr assert.deepEqual arr.slice(1 3), <[2 3]> assert.deepEqual arr.slice(1 void), <[2 3 4 5]> assert.deepEqual arr.slice(1 -1), <[2 3 4]> assert.deepEqual arr.slice(-2 -1), <[4]> assert.deepEqual arr.slice(-2 -3), [] str = \12345 assert.deepEqual Array::slice.call(str), arr assert.deepEqual Array::slice.call(str, 1 3), <[2 3]> assert.deepEqual Array::slice.call(str, 1 void), <[2 3 4 5]> assert.deepEqual Array::slice.call(str, 1 -1), <[2 3 4]> assert.deepEqual Array::slice.call(str, -2 -1), <[4]> assert.deepEqual Array::slice.call(str, -2 -3), [] if list = document?body?childNodes try assert.strictEqual typeof! Array::slice.call(list), \Array catch => assert.ok no if NATIVE if STRICT assert.throws (!-> Array::slice.call null), TypeError assert.throws (!-> Array::slice.call void), TypeError assert.deepEqual Array::slice.call({length: -1, 0: 1}, 0, 1), [], 'uses ToLength'core-js-2.4.1/tests/tests/es6.array.some.ls000066400000000000000000000021541274277553300205210ustar00rootroot00000000000000{module, test} = QUnit module \ES6 test 'Array#some' (assert)!-> assert.isFunction Array::some assert.arity Array::some, 1 assert.name Array::some, \some assert.looksNative Array::some assert.nonEnumerable Array::, \some (a = [1])some (val, key, that)!-> assert.same &length, 3, 'correct number of callback arguments' assert.same val, 1, 'correct value in callback' assert.same key, 0, 'correct index in callback' assert.same that, a, 'correct link to array in callback' assert.same @, ctx, 'correct callback context' , ctx = {} assert.ok [1 \2 3]some -> typeof! it is \Number assert.ok [1 2 3]some (<3) assert.ok not [1 2 3]some (<0) assert.ok not [1 2 3]some -> typeof! it is \String assert.ok not [1 2 3]some (-> +@ isnt 1), 1 rez = '' [1 2 3]some -> rez += &1; no assert.ok rez is \012 assert.ok not (arr = [1 2 3])some -> &2 isnt arr if STRICT assert.throws (!-> Array::some.call null, !->), TypeError assert.throws (!-> Array::some.call void, !->), TypeError if NATIVE assert.ok (try no is Array::some.call {length: -1, 0: 1}, !-> throw 42), 'uses ToLength'core-js-2.4.1/tests/tests/es6.array.sort.ls000066400000000000000000000012631274277553300205450ustar00rootroot00000000000000{module, test} = QUnit module \ES6 test 'Array#sort' (assert)!-> assert.isFunction Array::sort assert.arity Array::sort, 1 assert.name Array::sort, \sort assert.looksNative Array::sort assert.nonEnumerable Array::, \sort assert.ok !!(try [1 2 3]sort void), 'works with undefined' assert.throws (!-> [1 2 3]sort null), 'throws on null' assert.throws (!-> [1 2 3]sort {}), 'throws on {}' if STRICT assert.throws (-> Array::sort.call null), TypeError, 'ToObject(this)' assert.throws (-> Array::sort.call void), TypeError, 'ToObject(this)' #if NATIVE => assert.ok !!(try Array::sort.call {0: 1, 1: 3, 2: 2, length: -1}, -> throw 42), 'ToLength(? Get(obj, "length"))'core-js-2.4.1/tests/tests/es6.date.now.ls000066400000000000000000000004131274277553300201540ustar00rootroot00000000000000{module, test} = QUnit module \ES6 test 'Date.now' (assert)!-> {now} = Date assert.isFunction now assert.arity now, 0 assert.name now, \now assert.looksNative now assert.nonEnumerable Date, \now assert.ok +new Date - now! < 10, 'Date.now() ~ +new Date'core-js-2.4.1/tests/tests/es6.date.to-iso-string.ls000066400000000000000000000014601274277553300220720ustar00rootroot00000000000000{module, test} = QUnit module \ES6 test 'Date#toISOString' (assert)!-> assert.isFunction Date::toISOString assert.arity Date::toISOString, 0 assert.name Date::toISOString, \toISOString assert.looksNative Date::toISOString assert.nonEnumerable Date::, \toISOString assert.strictEqual new Date(0).toISOString!, '1970-01-01T00:00:00.000Z' assert.strictEqual new Date(1e12+1).toISOString!, '2001-09-09T01:46:40.001Z' assert.strictEqual new Date(-5e13-1).toISOString!, '0385-07-25T07:06:39.999Z' ft = new Date(1e15+1).toISOString! assert.ok(ft is '+033658-09-27T01:46:40.001Z' or ft is '33658-09-27T01:46:40.001Z') bc = new Date(-1e15+1).toISOString! assert.ok(bc is '-029719-04-05T22:13:20.001Z' or bc is '-29719-04-05T22:13:20.001Z') assert.throws (!-> new Date(NaN).toISOString!), RangeErrorcore-js-2.4.1/tests/tests/es6.date.to-json.ls000066400000000000000000000006521274277553300207470ustar00rootroot00000000000000{module, test} = QUnit module \ES6 test 'Date#toJSON' (assert)!-> assert.isFunction Date::toJSON assert.arity Date::toJSON, 1 assert.name Date::toJSON, \toJSON assert.looksNative Date::toJSON assert.nonEnumerable Date::, \toJSON d = new Date! assert.same d.toJSON!, d.toISOString!, 'base' assert.same new Date(NaN)toJSON!, null, 'not finite' assert.same Date::toJSON.call(toISOString: -> 42), 42, 'generic' core-js-2.4.1/tests/tests/es6.date.to-primitive.ls000066400000000000000000000020111274277553300217750ustar00rootroot00000000000000{module, test} = QUnit module \ES6 test 'Date#@@toPrimitive' (assert)!-> TO_PRIMITIVE = Symbol.toPrimitive toPrimitive = Date::[TO_PRIMITIVE] assert.isFunction toPrimitive assert.arity toPrimitive, 1 assert.nonEnumerable Object::, TO_PRIMITIVE date = new Date assert.same date[TO_PRIMITIVE](\string), date.toString!, 'generic, hint "string"' assert.same date[TO_PRIMITIVE](\number), +date, 'generic, hint "number"' assert.same date[TO_PRIMITIVE](\default), date.toString!, 'generic, hint "default"' assert.same toPrimitive.call(Object(2), \string), \2, 'generic, hint "string"' assert.same toPrimitive.call(Object(2), \number), 2, 'generic, hint "number"' assert.same toPrimitive.call(Object(2), \default), \2, 'generic, hint "default"' for [void '' \foo {toString: -> \string}] assert.throws (!-> new Date![TO_PRIMITIVE] ..), TypeError, "throws on #{..} as a hint" if STRICT => for [1 no \string null void] assert.throws (!-> toPrimitive.call .., \string), TypeError, "throws on #{..} as `this`"core-js-2.4.1/tests/tests/es6.date.to-string.ls000066400000000000000000000004601274277553300213010ustar00rootroot00000000000000{module, test} = QUnit module \ES6 test 'Date#toString' (assert)!-> assert.isFunction Date::toString assert.arity Date::toString, 0 assert.name Date::toString, \toString assert.looksNative Date::toString assert.nonEnumerable Date::, \toString assert.same String(new Date NaN), 'Invalid Date'core-js-2.4.1/tests/tests/es6.function.bind.ls000066400000000000000000000013331274277553300211770ustar00rootroot00000000000000{module, test} = QUnit module \ES6 test 'Function#bind' (assert)!-> assert.isFunction Function::bind assert.arity Function::bind, 1 assert.name Function::bind, \bind assert.looksNative Function::bind assert.nonEnumerable Function::, \bind obj = a: 42 assert.ok 42 is (-> @a)bind(obj)! assert.ok void is new ((->)bind obj)!a fn = (@a, @b)-> inst = new (fn.bind null, 1) 2 assert.ok inst instanceof fn assert.strictEqual inst.a, 1 assert.strictEqual inst.b, 2 assert.ok 42 is (-> it)bind(null 42)! fn = RegExp::test.bind /a/ assert.ok fn \a F = Date.bind null 2015 date = new F 6 assert.ok date instanceof Date assert.strictEqual date.getFullYear!, 2015 assert.strictEqual date.getMonth!, 6core-js-2.4.1/tests/tests/es6.function.has-instance.ls000066400000000000000000000004111274277553300226340ustar00rootroot00000000000000{module, test} = QUnit module \ES6 test 'Function#@@hasInstance' (assert)!-> assert.ok Symbol.hasInstance of Function:: assert.nonEnumerable Function::, Symbol.hasInstance assert.ok Function[Symbol.hasInstance] -> assert.ok !Function[Symbol.hasInstance] {}core-js-2.4.1/tests/tests/es6.function.name.ls000066400000000000000000000007201274277553300212020ustar00rootroot00000000000000if DESCRIPTORS {module, test} = QUnit module \ES6 test 'Function#name' (assert)!-> assert.ok \name of Function:: assert.nonEnumerable Function::, \name assert.same (function foo => it).name, \foo assert.same (->).name, '' if Object.freeze assert.same Object.freeze(->).name, '' fn = -> fn.toString = -> throw 42 assert.ok try fn.name on fn = Object -> fn.toString = -> '' assert.same fn.name, ''core-js-2.4.1/tests/tests/es6.map.ls000066400000000000000000000235461274277553300172260ustar00rootroot00000000000000{module, test} = QUnit module \ES6 same = (a, b)-> if a is b => a isnt 0 or 1 / a is 1 / b else a !~= a and b !~= b {getOwnPropertyDescriptor, freeze} = Object test 'Map' (assert)!-> assert.isFunction Map assert.arity Map, 0 assert.name Map, \Map assert.looksNative Map assert.ok \clear of Map::, 'clear in Map.prototype' assert.ok \delete of Map::, 'delete in Map.prototype' assert.ok \get of Map::, 'get in Map.prototype' assert.ok \has of Map::, 'has in Map.prototype' assert.ok \set of Map::, 'set in Map.prototype' assert.ok new Map instanceof Map, 'new Map instanceof Map' assert.strictEqual new Map(createIterable [[1 1], [2 2], [3 3]]).size, 3, 'Init from iterable' assert.strictEqual (new Map! ..set freeze({}), 1 ..set 2 3 ).size, 2, 'Support frozen objects' # return #throw done = no iter = createIterable [null 1 2], return: -> done := on try => new Map iter assert.ok done, '.return #throw' # call @@iterator in Array with custom iterator a = [] done = no a[Symbol?iterator] = -> done := on [][Symbol?iterator]call @ new Map a assert.ok done o = {} new Map!set o, 1 if DESCRIPTORS assert.arrayEqual [key for key of o], [] assert.arrayEqual Object.keys(o), [] assert.arrayEqual Object.getOwnPropertyNames(o), [] Object?getOwnPropertySymbols and assert.arrayEqual Object.getOwnPropertySymbols(o), [] Reflect?ownKeys and assert.arrayEqual Reflect.ownKeys(o), [] if nativeSubclass C = nativeSubclass Map assert.ok new C instanceof C, 'correct subclassing with native classes #1' assert.ok new C instanceof Map, 'correct subclassing with native classes #2' assert.same new C!set(1 2).get(1), 2, 'correct subclassing with native classes #3' test 'Map#clear' (assert)!-> assert.isFunction Map::clear assert.arity Map::clear, 0 assert.name Map::clear, \clear assert.looksNative Map::clear assert.nonEnumerable Map::, \clear M = new Map M.clear! assert.strictEqual M.size, 0 M = new Map! ..set 1 2 ..set 2 3 ..set 1 4 M.clear! assert.strictEqual M.size, 0 assert.ok !M.has 1 assert.ok !M.has 2 M = new Map! ..set 1 2 ..set f = freeze({}), 3 M.clear! assert.strictEqual M.size, 0, 'Support frozen objects' assert.ok !M.has 1 assert.ok !M.has f test 'Map#delete' (assert)!-> assert.isFunction Map::delete assert.arity Map::delete, 1 NATIVE and assert.name Map::delete, \delete # can't be polyfilled in some environments assert.looksNative Map::delete assert.nonEnumerable Map::, \delete a = [] M = new Map! ..set NaN, 1 ..set 2 1 ..set 3 1 ..set 2 5 ..set 1 4 ..set a, {} assert.strictEqual M.size, 5 assert.ok M.delete(NaN) assert.strictEqual M.size, 4 assert.ok !M.delete(4) assert.strictEqual M.size, 4 M.delete [] assert.strictEqual M.size, 4 M.delete a assert.strictEqual M.size, 3 M.set freeze(f = {}), 42 assert.strictEqual M.size, 4 M.delete f assert.strictEqual M.size, 3 test 'Map#forEach' (assert)!-> assert.isFunction Map::forEach assert.arity Map::forEach, 1 assert.name Map::forEach, \forEach assert.looksNative Map::forEach assert.nonEnumerable Map::, \forEach r = {} var T count = 0 M = new Map! ..set NaN, 1 ..set 2 1 ..set 3 7 ..set 2 5 ..set 1 4 ..set a = {}, 9 M.forEach (value, key)!-> count++ r[value] = key assert.strictEqual count, 5 assert.deepEqual r, {1: NaN, 7: 3, 5: 2, 4: 1, 9: a} map = new Map! ..set \0 9 ..set \1 9 ..set \2 9 ..set \3 9 s = ""; map.forEach (value, key)-> s += key; if key is \2 map.delete \2 map.delete \3 map.delete \1 map.set \4 9 assert.strictEqual s, \0124 map = new Map! ..set \0 1 s = ""; map.forEach -> map.delete \0 if s isnt '' => throw '!!!' s += it assert.strictEqual s, \1 assert.throws (!-> Map::forEach.call new Set, !->), 'non-generic' test 'Map#get' (assert)!-> assert.isFunction Map::get assert.name Map::get, \get assert.arity Map::get, 1 assert.looksNative Map::get assert.nonEnumerable Map::, \get o = {} f = freeze {} M = new Map! ..set NaN, 1 ..set 2 1 ..set 3 1 ..set 2 5 ..set 1 4 ..set f, 42 ..set o, o assert.strictEqual M.get(NaN), 1 assert.strictEqual M.get(4), void assert.strictEqual M.get({}), void assert.strictEqual M.get(o), o assert.strictEqual M.get(f), 42 assert.strictEqual M.get(2), 5 test 'Map#has' (assert)!-> assert.isFunction Map::has assert.name Map::has, \has assert.arity Map::has, 1 assert.looksNative Map::has assert.nonEnumerable Map::, \has o = {} f = freeze {} M = new Map! ..set NaN, 1 ..set 2 1 ..set 3 1 ..set 2 5 ..set 1 4 ..set f, 42 ..set o, o assert.ok M.has NaN assert.ok M.has o assert.ok M.has 2 assert.ok M.has f assert.ok not M.has 4 assert.ok not M.has {} test 'Map#set' (assert)!-> assert.isFunction Map::set assert.name Map::set, \set assert.arity Map::set, 2 assert.looksNative Map::set assert.nonEnumerable Map::, \set o = {} M = new Map! ..set NaN, 1 ..set 2 1 ..set 3 1 ..set 2 5 ..set 1 4 ..set o, o assert.ok M.size is 5 chain = M.set(7 2) assert.strictEqual chain, M M.set 7 2 assert.strictEqual M.size, 6 assert.strictEqual M.get(7), 2 assert.strictEqual M.get(NaN), 1 M.set NaN, 42 assert.strictEqual M.size, 6 assert.strictEqual M.get(NaN), 42 M.set {}, 11 assert.strictEqual M.size, 7 assert.strictEqual M.get(o), o M.set o, 27 assert.strictEqual M.size, 7 assert.strictEqual M.get(o), 27 assert.strictEqual (new Map! ..set NaN, 2 ..set NaN, 3 ..set NaN, 4 )size, 1 M = new Map!set freeze(f = {}), 42 assert.strictEqual M.get(f), 42 test 'Map#size' (assert)!-> assert.nonEnumerable Map::, \size size = (new Map! ..set 2 1)size assert.strictEqual typeof size, \number, 'size is number' assert.strictEqual size, 1, 'size is correct' if DESCRIPTORS sizeDesc = getOwnPropertyDescriptor Map::, \size assert.ok sizeDesc && sizeDesc.get, 'size is getter' assert.ok sizeDesc && !sizeDesc.set, 'size isnt setter' assert.throws (-> Map::size), TypeError test 'Map & -0' (assert)!-> map = new Map map.set -0, 1 assert.strictEqual map.size, 1 assert.ok map.has 0 assert.ok map.has -0 assert.strictEqual map.get(0), 1 assert.strictEqual map.get(-0), 1 map.forEach (val, key)-> assert.ok !same key, -0 map.delete -0 assert.strictEqual map.size, 0 map = new Map! ..set -0 1 map.forEach (val, key)-> assert.ok !same key, -0 map = new Map! ..set 4, 4 ..set 3, 3 ..set 2, 2 ..set 1, 1 ..set 0, 0 assert.ok map.has -0 test 'Map#@@toStringTag' (assert)!-> #assert.nonEnumerable Map::, Symbol?toStringTag assert.strictEqual Map::[Symbol?toStringTag], \Map, 'Map::@@toStringTag is `Map`' test 'Map Iterator' (assert)!-> map = new Map! ..set \a 1 ..set \b 2 ..set \c 3 ..set \d 4 keys = [] iterator = map.keys! assert.isIterator iterator assert.isIterable iterator assert.nonEnumerable iterator, \next assert.nonEnumerable iterator, Symbol?iterator keys.push iterator.next!value assert.ok map.delete \a assert.ok map.delete \b assert.ok map.delete \c map.set \e keys.push iterator.next!value keys.push iterator.next!value assert.ok iterator.next!done map.set \f assert.ok iterator.next!done assert.deepEqual keys, <[a d e]> test 'Map#keys' (assert)!-> assert.isFunction Map::keys assert.name Map::keys, \keys assert.arity Map::keys, 0 assert.looksNative Map::keys assert.nonEnumerable Map::, \keys iter = (new Map! ..set \a \q ..set \s \w ..set \d \e )keys! assert.isIterator iter assert.isIterable iter assert.strictEqual iter[Symbol?toStringTag], 'Map Iterator' assert.deepEqual iter.next!, {value: \a, done: no} assert.deepEqual iter.next!, {value: \s, done: no} assert.deepEqual iter.next!, {value: \d, done: no} assert.deepEqual iter.next!, {value: void, done: on} test 'Map#values' (assert)!-> assert.isFunction Map::values assert.name Map::values, \values assert.arity Map::values, 0 assert.looksNative Map::values assert.nonEnumerable Map::, \values iter = (new Map! ..set \a \q ..set \s \w ..set \d \e )values! assert.isIterator iter assert.isIterable iter assert.strictEqual iter[Symbol?toStringTag], 'Map Iterator' assert.deepEqual iter.next!, {value: \q, done: no} assert.deepEqual iter.next!, {value: \w, done: no} assert.deepEqual iter.next!, {value: \e, done: no} assert.deepEqual iter.next!, {value: void, done: on} test 'Map#entries' (assert)!-> assert.isFunction Map::entries assert.name Map::entries, \entries assert.arity Map::entries, 0 assert.looksNative Map::entries assert.nonEnumerable Map::, \entries iter = (new Map! ..set \a \q ..set \s \w ..set \d \e )entries! assert.isIterator iter assert.isIterable iter assert.strictEqual iter[Symbol?toStringTag], 'Map Iterator' assert.deepEqual iter.next!, {value: [\a \q], done: no} assert.deepEqual iter.next!, {value: [\s \w], done: no} assert.deepEqual iter.next!, {value: [\d \e], done: no} assert.deepEqual iter.next!, {value: void, done: on} test 'Map#@@iterator' (assert)!-> assert.isIterable Map:: assert.name Map::entries, \entries assert.arity Map::entries, 0 assert.looksNative Map::[Symbol?iterator] assert.strictEqual Map::[Symbol?iterator], Map::entries assert.nonEnumerable Map::, Symbol?iterator iter = (new Map! ..set \a \q ..set \s \w ..set \d \e )[Symbol?iterator]! assert.isIterator iter assert.isIterable iter assert.strictEqual iter[Symbol?toStringTag], 'Map Iterator' assert.deepEqual iter.next!, {value: [\a \q], done: no} assert.deepEqual iter.next!, {value: [\s \w], done: no} assert.deepEqual iter.next!, {value: [\d \e], done: no} assert.deepEqual iter.next!, {value: void, done: on}core-js-2.4.1/tests/tests/es6.math.acosh.ls000066400000000000000000000014461274277553300204710ustar00rootroot00000000000000{module, test} = QUnit module \ES6 # Returns an implementation-dependent approximation to the inverse hyperbolic cosine of x. test 'Math.acosh' (assert)!-> {acosh} = Math assert.isFunction acosh assert.name acosh, \acosh assert.arity acosh, 1 assert.looksNative acosh assert.nonEnumerable Math, \acosh assert.same acosh(NaN), NaN assert.same acosh(0.5), NaN assert.same acosh(-1), NaN assert.same acosh(-1e300), NaN assert.same acosh(1), 0 assert.strictEqual acosh(Infinity), Infinity assert.epsilon acosh(1234), 7.811163220849231 assert.epsilon acosh(8.88), 2.8737631531629235 assert.epsilon acosh(1e+160), 369.10676205960726 assert.epsilon acosh(Number.MAX_VALUE), 710.475860073944 #buggy v8 implementation assert.epsilon acosh(1 + Number.EPSILON), 2.1073424255447017e-8core-js-2.4.1/tests/tests/es6.math.asinh.ls000066400000000000000000000013361274277553300204740ustar00rootroot00000000000000{module, test} = QUnit module \ES6 # Returns an implementation-dependent approximation to the inverse hyperbolic sine of x. test 'Math.asinh' (assert)!-> {asinh} = Math assert.isFunction asinh assert.name asinh, \asinh assert.arity asinh, 1 assert.looksNative asinh assert.nonEnumerable Math, \asinh assert.same asinh(NaN), NaN assert.same asinh(0), 0 assert.same asinh(-0), -0 assert.strictEqual asinh(Infinity), Infinity assert.strictEqual asinh(-Infinity), -Infinity assert.epsilon asinh(1234), 7.811163549201245 assert.epsilon asinh(9.99), 2.997227420191335 assert.epsilon asinh(1e150), 346.0809111296668 assert.epsilon asinh(1e7), 16.811242831518268 assert.epsilon asinh(-1e7), -16.811242831518268core-js-2.4.1/tests/tests/es6.math.atanh.ls000066400000000000000000000014541274277553300204660ustar00rootroot00000000000000{module, test} = QUnit module \ES6 # Returns an implementation-dependent approximation to the inverse hyperbolic tangent of x. test 'Math.atanh' (assert)!-> {atanh} = Math assert.isFunction atanh assert.name atanh, \atanh assert.arity atanh, 1 assert.looksNative atanh assert.nonEnumerable Math, \atanh assert.same atanh(NaN), NaN assert.same atanh(-2), NaN assert.same atanh(-1.5), NaN assert.same atanh(2), NaN assert.same atanh(1.5), NaN assert.strictEqual atanh(-1), -Infinity assert.strictEqual atanh(1), Infinity assert.same atanh(0), 0 assert.same atanh(-0), -0 assert.same atanh(-1e300), NaN assert.same atanh(1e300), NaN assert.epsilon atanh(0.5), 0.5493061443340549 assert.epsilon atanh(-0.5), -0.5493061443340549 assert.epsilon atanh(0.444), 0.47720201260109457core-js-2.4.1/tests/tests/es6.math.cbrt.ls000066400000000000000000000011421274277553300203170ustar00rootroot00000000000000{module, test} = QUnit module \ES6 # Returns an implementation-dependent approximation to the cube root of x. test 'Math.cbrt' (assert)!-> {cbrt} = Math assert.isFunction cbrt assert.name cbrt, \cbrt assert.arity cbrt, 1 assert.looksNative cbrt assert.nonEnumerable Math, \cbrt assert.same cbrt(NaN), NaN assert.same cbrt(0), 0 assert.same cbrt(-0), -0 assert.strictEqual cbrt(Infinity), Infinity assert.strictEqual cbrt(-Infinity), -Infinity assert.strictEqual cbrt(-8), -2 assert.strictEqual cbrt(8), 2 assert.epsilon cbrt(-1000), -10 # O_o assert.epsilon cbrt(1000), 10 # O_ocore-js-2.4.1/tests/tests/es6.math.clz32.ls000066400000000000000000000006471274277553300203330ustar00rootroot00000000000000{module, test} = QUnit module \ES6 test 'Math.clz32' (assert)-> {clz32} = Math assert.isFunction clz32 assert.name clz32, \clz32 assert.arity clz32, 1 assert.looksNative clz32 assert.nonEnumerable Math, \clz32 assert.strictEqual clz32(0), 32 assert.strictEqual clz32(1), 31 assert.same clz32(-1), 0 assert.strictEqual clz32(0.6), 32 assert.same clz32(2^32 - 1), 0 assert.strictEqual clz32(2^32), 32core-js-2.4.1/tests/tests/es6.math.cosh.ls000066400000000000000000000013201274277553300203170ustar00rootroot00000000000000{module, test} = QUnit module \ES6 # Returns an implementation-dependent approximation to the hyperbolic cosine of x. test 'Math.cosh' (assert)!-> {cosh} = Math assert.isFunction cosh assert.name cosh, \cosh assert.arity cosh, 1 assert.looksNative cosh assert.nonEnumerable Math, \cosh assert.same cosh(NaN), NaN assert.strictEqual cosh(0), 1 assert.strictEqual cosh(-0), 1 assert.strictEqual cosh(Infinity), Infinity assert.strictEqual cosh(-Infinity), Infinity # v8 bug! assert.epsilon cosh(12), 81377.39571257407, 3e-11 assert.epsilon cosh(22), 1792456423.065795780980053377, 1e-5 assert.epsilon cosh(-10), 11013.23292010332313972137 assert.epsilon cosh(-23), 4872401723.1244513000, 1e-5core-js-2.4.1/tests/tests/es6.math.expm1.ls000066400000000000000000000011251274277553300204200ustar00rootroot00000000000000{module, test} = QUnit module \ES6 # Returns an implementation-dependent approximation to subtracting 1 from the exponential function of x test 'Math.expm1' (assert)!-> {expm1} = Math assert.isFunction expm1 assert.name expm1, \expm1 assert.arity expm1, 1 assert.looksNative expm1 assert.nonEnumerable Math, \expm1 assert.same expm1(NaN), NaN assert.same expm1(0), 0 assert.same expm1(-0), -0 assert.strictEqual expm1(Infinity), Infinity assert.strictEqual expm1(-Infinity), -1 assert.epsilon expm1(10), 22025.465794806718, assert.epsilon expm1(-10), -0.9999546000702375core-js-2.4.1/tests/tests/es6.math.fround.ls000066400000000000000000000026571274277553300206760ustar00rootroot00000000000000{module, test} = QUnit module \ES6 test 'Math.fround' (assert)!-> # https://github.com/paulmillr/es6-shim/blob/master/test/math.js {fround} = Math assert.isFunction fround assert.name fround, \fround assert.arity fround, 1 assert.looksNative fround assert.nonEnumerable Math, \fround assert.same fround(void), NaN assert.same fround(NaN), NaN assert.same fround(0), 0 assert.same fround(-0), -0 assert.same fround(Number.MIN_VALUE), 0 assert.same fround(-Number.MIN_VALUE), -0 assert.strictEqual fround(Infinity), Infinity assert.strictEqual fround(-Infinity), -Infinity assert.strictEqual fround(1.7976931348623157e+308), Infinity assert.strictEqual fround(-1.7976931348623157e+308), -Infinity assert.strictEqual fround(3.4028235677973366e+38), Infinity assert.strictEqual fround(3), 3 assert.strictEqual fround(-3), -3 maxFloat32 = 3.4028234663852886e+38 minFloat32 = 1.401298464324817e-45 assert.strictEqual fround(maxFloat32), maxFloat32 assert.strictEqual fround(-maxFloat32), -maxFloat32 assert.strictEqual fround(maxFloat32 + 2 ** (2 ** (8 - 1) - 1 - 23 - 2)), maxFloat32 assert.strictEqual fround(minFloat32), minFloat32 assert.strictEqual fround(-minFloat32), -minFloat32 assert.same fround(minFloat32 / 2), 0 assert.same fround(-minFloat32 / 2), -0 assert.strictEqual fround(minFloat32 / 2 + 2 ** -202), minFloat32 assert.strictEqual fround(-minFloat32 / 2 - 2 ** -202), -minFloat32core-js-2.4.1/tests/tests/es6.math.hypot.ls000066400000000000000000000034641274277553300205410ustar00rootroot00000000000000{module, test} = QUnit module \ES6 # Math.hypot returns an implementation-dependent approximation of the square root of the sum of squares of its arguments. test 'Math.hypot' (assert)!-> {hypot, sqrt} = Math assert.isFunction hypot assert.name hypot, \hypot assert.arity hypot, 2 assert.looksNative hypot assert.nonEnumerable Math, \hypot assert.strictEqual hypot!, 0 assert.strictEqual hypot(1), 1 assert.same hypot('', 0), 0 assert.same hypot(0, ''), 0 assert.strictEqual hypot(Infinity, 0), Infinity assert.strictEqual hypot(-Infinity, 0), Infinity assert.strictEqual hypot(0, Infinity), Infinity assert.strictEqual hypot(0, -Infinity), Infinity assert.strictEqual hypot(Infinity, NaN), Infinity assert.strictEqual hypot(NaN, -Infinity), Infinity assert.same hypot(NaN, 0), NaN assert.same hypot(0, NaN), NaN assert.same hypot(0, -0), 0 assert.same hypot(0, 0), 0 assert.same hypot(-0, -0), 0 assert.same hypot(-0, 0), 0 assert.strictEqual hypot(0, 1), 1 assert.strictEqual hypot(0, -1), 1 assert.strictEqual hypot(-0, 1), 1 assert.strictEqual hypot(-0, -1), 1 assert.same hypot(0), 0 assert.strictEqual hypot(1), 1 assert.strictEqual hypot(2), 2 assert.strictEqual hypot(0 0 1), 1 assert.strictEqual hypot(0 1 0), 1 assert.strictEqual hypot(1 0 0), 1 assert.strictEqual hypot(2 3 4), sqrt(2 * 2 + 3 * 3 + 4 * 4) assert.strictEqual hypot(2 3 4 5), sqrt(2 * 2 + 3 * 3 + 4 * 4 + 5 * 5) assert.epsilon hypot(66 66), 93.33809511662427 assert.epsilon hypot(0.1 100), 100.0000499999875 assert.strictEqual hypot(1e+300, 1e+300), 1.4142135623730952e+300 assert.strictEqual Math.floor(hypot(1e-300, 1e-300) * 1e308), 141421356 assert.strictEqual hypot(1e+300, 1e+300, 2, 3), 1.4142135623730952e+300 assert.strictEqual hypot(-3, 4), 5 assert.strictEqual hypot(3, -4), 5core-js-2.4.1/tests/tests/es6.math.imul.ls000066400000000000000000000026001274277553300203330ustar00rootroot00000000000000{module, test} = QUnit module \ES6 test 'Math.imul' (assert)!-> {imul} = Math assert.isFunction imul assert.name imul, \imul assert.arity imul, 2 assert.looksNative imul assert.nonEnumerable Math, \imul assert.same imul(0, 0), 0 assert.strictEqual imul(123, 456), 56088 assert.strictEqual imul(-123, 456), -56088 assert.strictEqual imul(123, -456), -56088 assert.strictEqual imul(16~01234567, 16~fedcba98), 602016552 assert.same imul(no 7), 0 assert.same imul(7 no), 0 assert.same imul(no no), 0 assert.strictEqual imul(on 7), 7 assert.strictEqual imul(7 on), 7 assert.strictEqual imul(on on), 1 assert.same imul(void 7), 0 assert.same imul(7 void), 0 assert.same imul(void void), 0 assert.same imul(\str 7), 0 assert.same imul(7 \str), 0 assert.same imul({} 7), 0 assert.same imul(7 {}), 0 assert.same imul([] 7), 0 assert.same imul(7 []), 0 assert.strictEqual imul(0xffffffff, 5), -5 assert.strictEqual imul(0xfffffffe, 5), -10 assert.strictEqual imul(2 4), 8 assert.strictEqual imul(-1 8), -8 assert.strictEqual imul(-2 -2), 4 assert.same imul(-0 7), 0 assert.same imul(7 -0), 0 assert.same imul(0.1 7), 0 assert.same imul(7 0.1), 0 assert.same imul(0.9 7), 0 assert.same imul(7 0.9), 0 assert.strictEqual imul(1.1 7), 7 assert.strictEqual imul(7 1.1), 7 assert.strictEqual imul(1.9 7), 7 assert.strictEqual imul(7 1.9), 7core-js-2.4.1/tests/tests/es6.math.log10.ls000066400000000000000000000013711274277553300203130ustar00rootroot00000000000000{module, test} = QUnit module \ES6 # Returns an implementation-dependent approximation to the base 10 logarithm of x. test 'Math.log10' (assert)!-> {log10} = Math assert.isFunction log10 assert.name log10, \log10 assert.arity log10, 1 assert.looksNative log10 assert.nonEnumerable Math, \log10 assert.same log10(''), log10 0 assert.same log10(NaN), NaN assert.same log10(-1), NaN assert.same log10(0), -Infinity assert.same log10(-0), -Infinity assert.same log10(1), 0 assert.same log10(Infinity), Infinity assert.epsilon log10(0.1), -1 # O_o assert.epsilon log10(0.5), -0.3010299956639812 assert.epsilon log10(1.5), 0.17609125905568124 assert.epsilon log10(5), 0.6989700043360189 assert.epsilon log10(50), 1.6989700043360187core-js-2.4.1/tests/tests/es6.math.log1p.ls000066400000000000000000000013141274277553300204100ustar00rootroot00000000000000{module, test} = QUnit module \ES6 # Returns an implementation-dependent approximation to the natural logarithm of 1 + x. # The result is computed in a way that is accurate even when the value of x is close to zero. test 'Math.log1p' (assert)!-> {log1p} = Math assert.isFunction log1p assert.name log1p, \log1p assert.arity log1p, 1 assert.looksNative log1p assert.nonEnumerable Math, \log1p assert.same log1p(''), log1p 0 assert.same log1p(NaN), NaN assert.same log1p(-2), NaN assert.same log1p(-1), -Infinity assert.same log1p(0), 0 assert.same log1p(-0), -0 assert.same log1p(Infinity), Infinity assert.epsilon log1p(5), 1.791759469228055 assert.epsilon log1p(50), 3.9318256327243257core-js-2.4.1/tests/tests/es6.math.log2.ls000066400000000000000000000011451274277553300202330ustar00rootroot00000000000000{module, test} = QUnit module \ES6 # Returns an implementation-dependent approximation to the base 2 logarithm of x. test 'Math.log2' (assert)!-> {log2} = Math assert.isFunction log2 assert.name log2, \log2 assert.arity log2, 1 assert.looksNative log2 assert.nonEnumerable Math, \log2 assert.same log2(''), log2 0 assert.same log2(NaN), NaN assert.same log2(-1), NaN assert.same log2(0), -Infinity assert.same log2(-0), -Infinity assert.same log2(1), 0 assert.same log2(Infinity), Infinity assert.same log2(0.5), -1 assert.same log2(32), 5 assert.epsilon log2(5), 2.321928094887362core-js-2.4.1/tests/tests/es6.math.sign.ls000066400000000000000000000012131274277553300203240ustar00rootroot00000000000000{module, test} = QUnit module \ES6 # Returns the sign of the x, indicating whether x is positive, negative or zero. test 'Math.sign' (assert)!-> {sign} = Math assert.isFunction sign assert.name sign, \sign assert.arity sign, 1 assert.looksNative sign assert.nonEnumerable Math, \sign assert.same sign(NaN), NaN assert.same sign!, NaN assert.same sign(-0), -0 assert.same sign(0), 0 assert.strictEqual sign(Infinity), 1 assert.strictEqual sign(-Infinity), -1 assert.strictEqual sign(16~2fffffffffffff), 1 assert.strictEqual sign(-16~2fffffffffffff), -1 assert.strictEqual sign(42.5), 1 assert.strictEqual sign(-42.5), -1core-js-2.4.1/tests/tests/es6.math.sinh.ls000066400000000000000000000011341274277553300203270ustar00rootroot00000000000000{module, test} = QUnit module \ES6 # Returns an implementation-dependent approximation to the hyperbolic sine of x. test 'Math.sinh' (assert)!-> {sinh} = Math assert.isFunction sinh assert.name sinh, \sinh assert.arity sinh, 1 assert.looksNative sinh assert.nonEnumerable Math, \sinh assert.same sinh(NaN), NaN assert.same sinh(0), 0 assert.same sinh(-0), -0 assert.strictEqual sinh(Infinity), Infinity assert.strictEqual sinh(-Infinity), -Infinity assert.epsilon sinh(-5), -74.20321057778875 assert.epsilon sinh(2), 3.6268604078470186 assert.strictEqual sinh(-2e-17), -2e-17core-js-2.4.1/tests/tests/es6.math.tanh.ls000066400000000000000000000010671274277553300203250ustar00rootroot00000000000000{module, test} = QUnit module \ES6 # Returns an implementation-dependent approximation to the hyperbolic tangent of x. test 'Math.tanh' (assert)!-> {tanh} = Math assert.isFunction tanh assert.name tanh, \tanh assert.arity tanh, 1 assert.looksNative tanh assert.nonEnumerable Math, \tanh assert.same tanh(NaN), NaN assert.same tanh(0), 0 assert.same tanh(-0), -0 assert.strictEqual tanh(Infinity), 1 assert.strictEqual tanh(90), 1 assert.epsilon tanh(10), 0.9999999958776927 NATIVE and assert.strictEqual tanh(710), 1 #buggy v8 implementationcore-js-2.4.1/tests/tests/es6.math.trunc.ls000066400000000000000000000022541274277553300205250ustar00rootroot00000000000000{module, test} = QUnit module \ES6 # Returns the integral part of the number x, removing any fractional digits. If x is already an integer, the result is x. test 'Math.trunc' (assert)!-> {trunc} = Math assert.isFunction trunc assert.name trunc, \trunc assert.arity trunc, 1 assert.looksNative trunc assert.nonEnumerable Math, \trunc assert.same trunc(NaN), NaN, 'NaN -> NaN' assert.same trunc(-0), -0, '-0 -> -0' assert.same trunc(0), 0, '0 -> 0' assert.same trunc(Infinity), Infinity, 'Infinity -> Infinity' assert.same trunc(-Infinity), -Infinity, '-Infinity -> -Infinity' assert.same trunc(null), 0, 'null -> 0' assert.same trunc({}), NaN, '{} -> NaN' assert.strictEqual trunc([]), 0, '[] -> 0' assert.strictEqual trunc(1.01), 1, '1.01 -> 0' assert.strictEqual trunc(1.99), 1, '1.99 -> 0' assert.strictEqual trunc(-1), -1, '-1 -> -1' assert.strictEqual trunc(-1.99), -1, '-1.99 -> -1' assert.strictEqual trunc(-555.555), -555, '-555.555 -> -555' assert.strictEqual trunc(0x20000000000001), 0x20000000000001, '0x20000000000001 -> 0x20000000000001' assert.strictEqual trunc(-0x20000000000001), -0x20000000000001, '-0x20000000000001 -> -0x20000000000001'core-js-2.4.1/tests/tests/es6.number.constructor.ls000066400000000000000000000115701274277553300223170ustar00rootroot00000000000000{module, test} = QUnit module \ES6 ws = ' \t\x0b\f\xa0\ufeff\n\r\u2028\u2029\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000' $check = (assert)-> (a, b)!-> assert.same Number(a), b, "Number #{typeof a} #a -> #b" x = new Number a assert.ok x is Object(x), "new Number #{typeof a} #a is object" assert.strictEqual typeof! x, \Number, "classof new Number #{typeof a} #a is Number" assert.same x.valueOf!, b, "new Number(#{typeof a} #a).valueOf() -> #b" test 'Number constructor: regression' (assert)!-> check = $check assert assert.isFunction Number assert.arity Number, 1 assert.name Number, \Number assert.looksNative Number assert.same Number::constructor, Number assert.same 1.constructor, Number for <[MAX_VALUE MIN_VALUE NaN NEGATIVE_INFINITY POSITIVE_INFINITY]> assert.ok .. of Number, "Number.#{..}" assert.nonEnumerable Number, .. assert.same Number!, 0 assert.same new Number!valueOf!, 0 check 42, 42 check 42.42, 42.42 check new Number(42), 42 check new Number(42.42), 42.42 check \42, 42 check '42.42', 42.42 check \0x42, 66 check \0X42, 66 check \0xzzz, NaN check \0x1g, NaN check \+0x1, NaN check \-0x1, NaN check \+0X1, NaN check \-0X1, NaN check new String(\42), 42 check new String('42.42'), 42.42 check new String(\0x42), 66 check null, 0 check void, NaN check false, 0 check true, 1 check new Boolean(false), 0 check new Boolean(true), 1 check {}, NaN check {valueOf: '1.1'}, NaN check {valueOf: '1.1', toString: -> '2.2'}, 2.2 check {valueOf: -> '1.1'}, 1.1 check {valueOf: -> '1.1', toString: -> '2.2'}, 1.1 check {valueOf: -> '-0x1a2b3c'}, NaN check {toString: -> '-0x1a2b3c'}, NaN check {valueOf: -> 42}, 42 check {valueOf: -> \42}, 42 check {valueOf: -> null}, 0 check {toString: -> 42}, 42 check {toString: -> \42}, 42 check {valueOf: -> 1, toString: -> 2}, 1 check {valueOf: 1, toString: -> 2}, 2 i = 1 assert.strictEqual Number(valueOf: -> ++i), 2, 'Number call valueOf only once #1' assert.strictEqual i, 2, 'Number call valueOf only once #2' i = 1 assert.strictEqual Number(toString: -> ++i), 2, 'Number call toString only once #1' assert.strictEqual i, 2, 'Number call toString only once #2' i = 1 assert.strictEqual new Number(valueOf: -> ++i).valueOf!, 2, 'new Number call valueOf only once #1' assert.strictEqual i, 2, 'new Number call valueOf only once #2' i = 1 assert.strictEqual new Number(toString: -> ++i).valueOf!, 2, 'new Number call toString only once #1' assert.strictEqual i, 2, 'new Number call toString only once #2' assert.throws (-> Number Object.create null), TypeError, 'Number assert.throws on object w/o valueOf and toString' assert.throws (-> Number valueOf: 1, toString: 2), TypeError, 'Number assert.throws on object then valueOf and toString are not functions' assert.throws (-> new Number Object.create null), TypeError, 'new Number assert.throws on object w/o valueOf and toString' assert.throws (-> new Number valueOf: 1, toString: 2), TypeError, 'new Number assert.throws on object then valueOf and toString are not functions' n = new Number 42 assert.strictEqual typeof n@@(n), \number check "#{ws}42", 42 check "42#{ws}", 42 check "#{ws}42#{ws}", 42 check "#{ws}0x42", 66 check "0x42#{ws}", 66 check "#{ws}0x42#{ws}", 66 check "#{ws}0X42", 66 check "0X42#{ws}", 66 check "#{ws}0X42#{ws}", 66 if nativeSubclass C = nativeSubclass Number assert.ok new C instanceof C, 'correct subclassing with native classes #1' assert.ok new C instanceof Number, 'correct subclassing with native classes #2' assert.same new C(1).toFixed(2), '1.00', 'correct subclassing with native classes #3' test 'Number constructor: binary' (assert)!-> check = $check assert check \0b1, 1 check \0B1, 1 check \0b12, NaN check \0b234, NaN check '0b1!', NaN check \+0b1, NaN check \-0b1, NaN check ' 0b1', 1 check '0b1\n', 1 check '\n 0b1\n ', 1 check ' 0B1', 1 check '0B1\n', 1 check '\n 0B1\n ', 1 check {valueOf: -> \0b11}, 3 check {toString: -> \0b111}, 7 check {valueOf: -> \0b101010}, 42 check {toString: -> \0b101010}, 42 check "#{ws}0b11", 3 check "0b11#{ws}", 3 check "#{ws}0b11#{ws}", 3 check "#{ws}0B11", 3 check "0B11#{ws}", 3 check "#{ws}0B11#{ws}", 3 test 'Number constructor: octal' (assert)!-> check = $check assert check \0o7, 7 check \0O7, 7 check \0o18, NaN check \0o89a, NaN check '0o1!', NaN check \+0o1, NaN check \-0o1, NaN check ' 0o1', 1 check '0o1\n', 1 check '\n 0o1\n ', 1 check ' 0O1', 1 check '0O1\n', 1 check '\n 0O1\n ', 1 check {valueOf: -> \0o77}, 63 check {toString: -> \0o777}, 511 check {valueOf: -> \0o12345}, 5349 check {toString: -> \0o12345}, 5349 check "#{ws}0o11", 9 check "0o11#{ws}", 9 check "#{ws}0o11#{ws}", 9 check "#{ws}0O11", 9 check "0O11#{ws}", 9 check "#{ws}0O11#{ws}", 9core-js-2.4.1/tests/tests/es6.number.epsilon.ls000066400000000000000000000005321274277553300213770ustar00rootroot00000000000000{module, test} = QUnit module \ES6 test 'Number.EPSILON' (assert)!-> {EPSILON} = Number assert.ok \EPSILON of Number, 'EPSILON in Number' assert.nonEnumerable Number, \EPSILON assert.strictEqual EPSILON, 2^-52, 'Is 2^-52' assert.ok 1 isnt 1 + EPSILON, '1 isnt 1 + EPSILON' assert.strictEqual 1, 1 + EPSILON / 2, '1 is 1 + EPSILON / 2'core-js-2.4.1/tests/tests/es6.number.is-finite.ls000066400000000000000000000012051274277553300216130ustar00rootroot00000000000000{module, test} = QUnit module \ES6 test 'Number.isFinite' (assert)!-> {isFinite} = Number {create} = Object assert.isFunction isFinite assert.name isFinite, \isFinite assert.arity isFinite, 1 assert.looksNative isFinite assert.nonEnumerable Number, \isFinite for [1 0.1 -1 2^16 2^16 - 1 2^31 2^31 - 1 2^32 2^32 - 1 -0] assert.ok isFinite(..), "isFinite #{typeof ..} #{..}" for [NaN, Infinity, \NaN, \5, no, new Number(NaN), new Number(Infinity), new Number(5), new Number(0.1), void, null, {}, ->, create(null)] assert.ok not isFinite(..), "not isFinite #{typeof ..} #{try String(..) catch e => 'Object.create(null)'}"core-js-2.4.1/tests/tests/es6.number.is-integer.ls000066400000000000000000000012221274277553300217710ustar00rootroot00000000000000{module, test} = QUnit module \ES6 test 'Number.isInteger' (assert)!-> {isInteger} = Number {create} = Object assert.isFunction isInteger assert.name isInteger, \isInteger assert.arity isInteger, 1 assert.looksNative isInteger assert.nonEnumerable Number, \isInteger for [1 -1 2^16 2^16 - 1 2^31 2^31 - 1 2^32 2^32 - 1 -0] assert.ok isInteger(..), "isInteger #{typeof ..} #{..}" for [NaN, 0.1, Infinity, \NaN, \5, no, new Number(NaN), new Number(Infinity), new Number(5), new Number(0.1), void, null, {}, ->, create(null)] assert.ok not isInteger(..), "not isInteger #{typeof ..} #{try String(..) catch e => 'Object.create(null)'}"core-js-2.4.1/tests/tests/es6.number.is-nan.ls000066400000000000000000000011221274277553300211070ustar00rootroot00000000000000{module, test} = QUnit module \ES6 test 'Number.isNaN' (assert)!-> {isNaN} = Number {create} = Object assert.isFunction isNaN assert.name isNaN, \isNaN assert.arity isNaN, 1 assert.looksNative isNaN assert.nonEnumerable Number, \isNaN assert.ok isNaN(NaN), 'Number.isNaN NaN' for [1 0.1 -1 2^16 2^16 - 1 2^31 2^31 - 1 2^32 2^32 - 1 -0 Infinity, \NaN, \5, no, new Number(NaN), new Number(Infinity), new Number(5), new Number(0.1), void, null, {}, ->, create(null)] assert.ok not isNaN(..), "not Number.isNaN #{typeof ..} #{try String(..) catch e => 'Object.create(null)'}"core-js-2.4.1/tests/tests/es6.number.is-safe-integer.ls000066400000000000000000000014141274277553300227100ustar00rootroot00000000000000{module, test} = QUnit module \ES6 test 'Number.isSafeInteger' (assert)!-> {isSafeInteger} = Number {create} = Object assert.isFunction isSafeInteger assert.name isSafeInteger, \isSafeInteger assert.arity isSafeInteger, 1 assert.looksNative isSafeInteger assert.nonEnumerable Number, \isSafeInteger for [1 -1 2^16 2^16 - 1 2^31 2^31 - 1 2^32 2^32 - 1 -0 16~1fffffffffffff -16~1fffffffffffff] assert.ok isSafeInteger(..), "isSafeInteger #{typeof ..} #{..}" for [16~20000000000000 -16~20000000000000 NaN, 0.1, Infinity, \NaN, \5, no, new Number(NaN), new Number(Infinity), new Number(5), new Number(0.1), void, null, {}, ->, create(null)] assert.ok not isSafeInteger(..), "not isSafeInteger #{typeof ..} #{try String(..) catch e => 'Object.create(null)'}"core-js-2.4.1/tests/tests/es6.number.max-safe-integer.ls000066400000000000000000000003551274277553300230650ustar00rootroot00000000000000{module, test} = QUnit module \ES6 test 'Number.MAX_SAFE_INTEGER' (assert)!-> assert.ok \MAX_SAFE_INTEGER of Number assert.nonEnumerable Number, \MAX_SAFE_INTEGER assert.strictEqual Number.MAX_SAFE_INTEGER, 2^53 - 1, 'Is 2^53 - 1'core-js-2.4.1/tests/tests/es6.number.min-safe-integer.ls000066400000000000000000000003571274277553300230650ustar00rootroot00000000000000{module, test} = QUnit module \ES6 test 'Number.MIN_SAFE_INTEGER' (assert)!-> assert.ok \MIN_SAFE_INTEGER of Number assert.nonEnumerable Number, \MIN_SAFE_INTEGER assert.strictEqual Number.MIN_SAFE_INTEGER, -2^53 + 1, 'Is -2^53 + 1'core-js-2.4.1/tests/tests/es6.number.parse-float.ls000066400000000000000000000014671274277553300221530ustar00rootroot00000000000000{module, test} = QUnit module \ES6 test 'Number.parseFloat' (assert)!-> {parseFloat} = Number assert.isFunction parseFloat assert.name parseFloat, \parseFloat assert.arity parseFloat, 1 assert.looksNative parseFloat assert.nonEnumerable Number, \parseFloat assert.same parseFloat, global.parseFloat assert.same parseFloat('0'), 0 assert.same parseFloat(' 0'), 0 assert.same parseFloat('+0'), 0 assert.same parseFloat(' +0'), 0 assert.same parseFloat('-0'), -0 assert.same parseFloat(' -0'), -0 ws = '\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u180E\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF' assert.same parseFloat(ws + '+0'), 0 assert.same parseFloat(ws + '-0'), -0 assert.same parseFloat(null), NaN assert.same parseFloat(void), NaNcore-js-2.4.1/tests/tests/es6.number.parse-int.ls000066400000000000000000000031451274277553300216330ustar00rootroot00000000000000{module, test} = QUnit module \ES6 test 'Number.parseInt' (assert)!-> {parseInt} = Number assert.isFunction parseInt assert.name parseInt, \parseInt assert.arity parseInt, 2 assert.looksNative parseInt assert.nonEnumerable Number, \parseInt assert.same parseInt, global.parseInt for r from 2 to 36 assert.same parseInt(\10 r), r, "radix #r" for <[01 08 10 42]> assert.same parseInt(..), parseInt(.., 10), "default radix is 10: #{..}" assert.same parseInt(\0x16), parseInt(\0x16 16), "default radix is 16: 0x16" ws = '\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u180E\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF' assert.same parseInt(' 0x16'), parseInt(\0x16 16), 'ignores leading whitespace #1' assert.same parseInt(' 42'), parseInt(\42 10), 'ignores leading whitespace #2' assert.same parseInt(' 08'), parseInt(\08 10), 'ignores leading whitespace #3' assert.same parseInt(ws + '08'), parseInt(\08 10), 'ignores leading whitespace #4' assert.same parseInt(ws + '0x16'), parseInt(\0x16 16), 'ignores leading whitespace #5' fakeZero = valueOf: -> 0 assert.same parseInt(\08 fakeZero), parseInt(\08 10), 'valueOf #1' assert.same parseInt(\0x16 fakeZero), parseInt(\0x16 16), 'valueOf #2' assert.same parseInt('-0xF'), -15, 'signed hex #1' assert.same parseInt('-0xF', 16), -15, 'signed hex #2' assert.same parseInt('+0xF'), 15, 'signed hex #3' assert.same parseInt('+0xF' 16), 15, 'signed hex #4' assert.same parseInt('10', -4294967294), 2, 'radix uses ToUint32' assert.same parseInt(null), NaN assert.same parseInt(void), NaNcore-js-2.4.1/tests/tests/es6.number.to-fixed.ls000066400000000000000000000066121274277553300214520ustar00rootroot00000000000000{module, test} = QUnit module \ES6 test 'Number#toFixed' (assert)!-> {toFixed} = Number:: assert.isFunction toFixed assert.name toFixed, \toFixed assert.arity toFixed, 1 assert.looksNative toFixed assert.nonEnumerable Number::, \toFixed assert.same 0.00008.toFixed(3), '0.000' assert.same 0.9.toFixed(0), '1' assert.same 1.255.toFixed(2), '1.25' assert.same 1843654265.0774949.toFixed(5), '1843654265.07749' assert.same 1000000000000000128.toFixed(0), '1000000000000000128' assert.same toFixed.call(1), '1' assert.same toFixed.call(1 0), '1' assert.same toFixed.call(1 1), '1.0' assert.same toFixed.call(1 1.1), '1.0' assert.same toFixed.call(1 0.9), '1' assert.same toFixed.call(1 '0'), '1' assert.same toFixed.call(1 '1'), '1.0' assert.same toFixed.call(1 '1.1'), '1.0' assert.same toFixed.call(1 '0.9'), '1' assert.same toFixed.call(1 NaN), '1' assert.same toFixed.call(1 'some string'), '1' assert.same (try toFixed.call 1 -0.1), '1' assert.same new Number(1).toFixed!, '1' assert.same new Number(1).toFixed(0), '1' assert.same new Number(1).toFixed(1), '1.0' assert.same new Number(1).toFixed(1.1), '1.0' assert.same new Number(1).toFixed(0.9), '1' assert.same new Number(1).toFixed('0'), '1' assert.same new Number(1).toFixed('1'), '1.0' assert.same new Number(1).toFixed('1.1'), '1.0' assert.same new Number(1).toFixed('0.9'), '1' assert.same new Number(1).toFixed(NaN), '1' assert.same new Number(1).toFixed('some string'), '1' assert.same (try new Number(1).toFixed -0.1), '1' assert.same NaN.toFixed!, 'NaN' assert.same NaN.toFixed(0), 'NaN' assert.same NaN.toFixed(1), 'NaN' assert.same NaN.toFixed(1.1), 'NaN' assert.same NaN.toFixed(0.9), 'NaN' assert.same NaN.toFixed('0'), 'NaN' assert.same NaN.toFixed('1'), 'NaN' assert.same NaN.toFixed('1.1'), 'NaN' assert.same NaN.toFixed('0.9'), 'NaN' assert.same NaN.toFixed(NaN), 'NaN' assert.same NaN.toFixed('some string'), 'NaN' assert.same (try NaN.toFixed -0.1), 'NaN' assert.same new Number(1e21).toFixed!, String 1e21 assert.same new Number(1e21).toFixed(0), String 1e21 assert.same new Number(1e21).toFixed(1), String 1e21 assert.same new Number(1e21).toFixed(1.1), String 1e21 assert.same new Number(1e21).toFixed(0.9), String 1e21 assert.same new Number(1e21).toFixed('0'), String 1e21 assert.same new Number(1e21).toFixed('1'), String 1e21 assert.same new Number(1e21).toFixed('1.1'), String 1e21 assert.same new Number(1e21).toFixed('0.9'), String 1e21 assert.same new Number(1e21).toFixed(NaN), String 1e21 assert.same new Number(1e21).toFixed('some string'), String 1e21 assert.same (try new Number(1e21).toFixed -0.1), String 1e21 assert.throws (!-> 1.0.toFixed -101), RangeError, 'If f < 0 or f > 20, throw a RangeError exception.' assert.throws (!-> 1.0.toFixed 101), RangeError, 'If f < 0 or f > 20, throw a RangeError exception.' assert.throws (!-> NaN.toFixed Infinity), RangeError, 'If f < 0 or f > 20, throw a RangeError exception.' assert.throws (!-> toFixed.call {}, 1), TypeError, '? thisNumberValue(this value)' assert.throws (!-> toFixed.call \123, 1), TypeError, '? thisNumberValue(this value)' assert.throws (!-> toFixed.call no, 1), TypeError, '? thisNumberValue(this value)' assert.throws (!-> toFixed.call null, 1), TypeError, '? thisNumberValue(this value)' assert.throws (!-> toFixed.call void, 1), TypeError, '? thisNumberValue(this value)'core-js-2.4.1/tests/tests/es6.number.to-precision.ls000066400000000000000000000027011274277553300223410ustar00rootroot00000000000000{module, test} = QUnit module \ES6 test 'Number#toPrecision' (assert)!-> {toPrecision} = Number:: assert.isFunction toPrecision assert.name toPrecision, \toPrecision assert.arity toPrecision, 1 assert.looksNative toPrecision assert.nonEnumerable Number::, \toPrecision assert.same 0.00008.toPrecision(3), '0.0000800', '0.00008.toPrecision(3)' assert.same 1.255.toPrecision(2), '1.3', '1.255.toPrecision(2)' assert.same 1843654265.0774949.toPrecision(13), '1843654265.077', '1843654265.0774949.toPrecision(13)' assert.same NaN.toPrecision(1), 'NaN', 'If x is NaN, return the String "NaN".' assert.same 123.456.toPrecision!, '123.456', 'If precision is undefined, return ! ToString(x).' assert.same 123.456.toPrecision(void), '123.456', 'If precision is undefined, return ! ToString(x).' assert.throws (!-> 0.9.toPrecision 0), RangeError, 'If p < 1 or p > 21, throw a RangeError exception.' assert.throws (!-> 0.9.toPrecision 101), RangeError, 'If p < 1 or p > 21, throw a RangeError exception.' assert.throws (!-> toPrecision.call {}, 1), TypeError, '? thisNumberValue(this value)' assert.throws (!-> toPrecision.call \123, 1), TypeError, '? thisNumberValue(this value)' assert.throws (!-> toPrecision.call no, 1), TypeError, '? thisNumberValue(this value)' assert.throws (!-> toPrecision.call null, 1), TypeError, '? thisNumberValue(this value)' assert.throws (!-> toPrecision.call void, 1), TypeError, '? thisNumberValue(this value)'core-js-2.4.1/tests/tests/es6.object.assign.ls000066400000000000000000000032751274277553300211770ustar00rootroot00000000000000{module, test} = QUnit module \ES6 test 'Object.assign' (assert)!-> {assign, keys, defineProperty} = Object assert.isFunction assign assert.arity assign, 2 assert.name assign, \assign assert.looksNative assign assert.nonEnumerable Object, \assign foo = q: 1 assert.strictEqual foo, assign(foo, bar: 2), 'assign return target' assert.strictEqual foo.bar, 2, 'assign define properties' assert.deepEqual assign({}, {q: 1}, {w: 2}), {q: 1, w: 2} assert.deepEqual assign({}, \qwe), {0: \q, 1: \w, 2: \e} assert.throws (-> assign null {q: 1}), TypeError assert.throws (-> assign void, {q: 1}), TypeError str = assign(\qwe, {q: 1}) assert.strictEqual typeof str, \object assert.strictEqual String(str), \qwe assert.strictEqual str.q, 1 if DESCRIPTORS foo = baz: 1 assign foo, defineProperty {}, \bar, get: -> @baz + 1 assert.ok foo.bar is void, "assign don't copy descriptors" c = Symbol \c d = Symbol \d D = { a: \a (c): \c } defineProperty D, \b, value: \b defineProperty D, d, value: \d O = assign {}, D assert.strictEqual O.a, \a, \a assert.strictEqual O.b, void, \b assert.strictEqual O[c], \c, \c assert.strictEqual O[d], void, \d try assert.strictEqual Function('return Object.assign({b: 1}, {get a(){delete this.b;},b: 2})')!b, 1 try assert.strictEqual Function('return Object.assign({b: 1}, {get a(){Object.defineProperty(this, "b", {value:4,enumerable:false});},b: 2})')!b, 1 # test deterministic property order, theoretical can fail with deterministic, but wrong, order string = 'abcdefghijklmnopqrst'; O = {} for string.split('') => O[..] = .. assert.strictEqual keys(assign {}, O)join(''), stringcore-js-2.4.1/tests/tests/es6.object.create.ls000066400000000000000000000017451274277553300211560ustar00rootroot00000000000000{module, test} = QUnit module \ES6 test 'Object.create' (assert)!-> {create, getPrototypeOf, getOwnPropertyNames} = Object isObject = -> it is Object it isPrototype = (a, b)-> ({}).isPrototypeOf.call a, b getPropertyNames = (object)-> result = getOwnPropertyNames object while object = getPrototypeOf(object) for getOwnPropertyNames(object) .. in result or result.push .. result assert.isFunction create assert.arity create, 2 assert.name create, \create assert.looksNative create assert.nonEnumerable Object, \create assert.ok isPrototype obj = q:1, create(obj) assert.ok create(obj)q is 1 fn = -> @a = 1 assert.ok create(new fn) instanceof fn assert.ok fn:: is getPrototypeOf getPrototypeOf create new fn assert.ok create(new fn)a is 1 assert.ok create({}, {a:value:42})a is 42 assert.ok isObject obj = create null w: value:2 assert.ok \toString not of obj assert.ok obj.w is 2 assert.deepEqual getPropertyNames(create null), []core-js-2.4.1/tests/tests/es6.object.define-properties.ls000066400000000000000000000006671274277553300233410ustar00rootroot00000000000000{module, test} = QUnit module \ES6 test 'Object.defineProperties' (assert)-> {defineProperties} = Object assert.isFunction defineProperties assert.arity defineProperties, 2 assert.name defineProperties, \defineProperties assert.looksNative defineProperties assert.nonEnumerable Object, \defineProperties assert.ok (rez = defineProperties src = {}, q: {value: 42}, w: value: 33) is src assert.ok rez.q is 42 and rez.w is 33core-js-2.4.1/tests/tests/es6.object.define-property.ls000066400000000000000000000010401274277553300230130ustar00rootroot00000000000000{module, test} = QUnit module \ES6 test 'Object.defineProperty' (assert)-> {defineProperty, create} = Object assert.isFunction defineProperty assert.arity defineProperty, 3 assert.name defineProperty, \defineProperty assert.looksNative defineProperty assert.nonEnumerable Object, \defineProperty assert.ok (rez = defineProperty src = {}, \q, value: 42) is src assert.ok rez.q is 42 assert.throws (!-> defineProperty 42 1 {}) assert.throws (!-> defineProperty {} create(null), {}) assert.throws (!-> defineProperty {} 1 1)core-js-2.4.1/tests/tests/es6.object.freeze.ls000066400000000000000000000014611274277553300211660ustar00rootroot00000000000000{module, test} = QUnit module \ES6 test 'Object.freeze' (assert)!-> {freeze, isFrozen, keys, getOwnPropertyNames} = Object assert.isFunction freeze assert.arity freeze, 1 assert.name freeze, \freeze assert.looksNative freeze assert.nonEnumerable Object, \freeze for value in [42 \foo no null void, {}] assert.ok (try => freeze value; on), "accept #{typeof! value}" assert.same freeze(value), value, "returns target on #{typeof! value}" if NATIVE assert.ok isFrozen freeze {} assert.arrayEqual [key for key of freeze {}], [] assert.arrayEqual keys(freeze {}), [] assert.arrayEqual getOwnPropertyNames(freeze {}), [] Object?getOwnPropertySymbols and assert.arrayEqual Object.getOwnPropertySymbols(freeze {}), [] Reflect?ownKeys and assert.arrayEqual Reflect.ownKeys(freeze {}), []core-js-2.4.1/tests/tests/es6.object.get-own-property-descriptor.ls000066400000000000000000000014051274277553300253220ustar00rootroot00000000000000{module, test} = QUnit module \ES6 test 'Object.getOwnPropertyDescriptor' (assert)!-> {getOwnPropertyDescriptor} = Object assert.isFunction getOwnPropertyDescriptor assert.arity getOwnPropertyDescriptor, 2 assert.name getOwnPropertyDescriptor, \getOwnPropertyDescriptor assert.looksNative getOwnPropertyDescriptor assert.nonEnumerable Object, \getOwnPropertyDescriptor assert.deepEqual getOwnPropertyDescriptor(q:42, \q), {+writable, +enumerable, +configurable, value: 42} assert.ok getOwnPropertyDescriptor({}, \toString) is void for value in [42 \foo no] assert.ok (try => getOwnPropertyDescriptor value; on), "accept #{typeof! value}" for value in [null void] assert.throws (!-> getOwnPropertyDescriptor value), TypeError, "throws on #value"core-js-2.4.1/tests/tests/es6.object.get-own-property-names.ls000066400000000000000000000026231274277553300242520ustar00rootroot00000000000000{module, test} = QUnit module \ES6 test 'Object.getOwnPropertyNames' (assert)!-> {getOwnPropertyNames, getOwnPropertyNames} = Object assert.isFunction getOwnPropertyNames assert.arity getOwnPropertyNames, 1 assert.name getOwnPropertyNames, \getOwnPropertyNames assert.looksNative getOwnPropertyNames assert.nonEnumerable Object, \getOwnPropertyNames fn1 = (@w = 2)-> fn2 = (@toString = 2)-> fn1::q = fn2::q = 1 names = getOwnPropertyNames [1 2 3] assert.strictEqual names.length, 4 assert.ok \0 in names assert.ok \1 in names assert.ok \2 in names assert.ok \length in names assert.deepEqual getOwnPropertyNames(new fn1 1), <[w]> assert.deepEqual getOwnPropertyNames(new fn2 1), <[toString]> assert.ok \toString in getOwnPropertyNames Array:: assert.ok \toString in getOwnPropertyNames Object:: assert.ok \constructor in getOwnPropertyNames Object:: for value in [42 \foo no] assert.ok (try => getOwnPropertyNames value; on), "accept #{typeof! value}" for value in [null void] assert.throws (!-> getOwnPropertyNames value), TypeError, "throws on #value" if document? assert.ok (try iframe = document.createElement \iframe iframe.src = 'http://example.com' document.documentElement.appendChild iframe w = iframe.contentWindow document.documentElement.removeChild iframe getOwnPropertyNames w ), 'IE11 bug with iframe and window'core-js-2.4.1/tests/tests/es6.object.get-prototype-of.ls000066400000000000000000000017441274277553300231360ustar00rootroot00000000000000{module, test} = QUnit module \ES6 test 'Object.getPrototypeOf' (assert)!-> {create, getPrototypeOf} = Object assert.isFunction getPrototypeOf assert.arity getPrototypeOf, 1 assert.name getPrototypeOf, \getPrototypeOf assert.looksNative getPrototypeOf assert.nonEnumerable Object, \getPrototypeOf assert.ok getPrototypeOf({}) is Object:: assert.ok getPrototypeOf([]) is Array:: assert.ok getPrototypeOf(new class fn) is fn:: assert.ok getPrototypeOf(create obj = q:1) is obj assert.ok getPrototypeOf(create null) is null assert.ok getPrototypeOf(getPrototypeOf {}) is null foo = -> foo::foo = \foo bar = -> bar:: = create foo:: bar::constructor = bar assert.strictEqual getPrototypeOf(bar::).foo, \foo for value in [42 \foo no] assert.ok (try => getPrototypeOf value; on), "accept #{typeof! value}" for value in [null void] assert.throws (!-> getPrototypeOf value), TypeError, "throws on #value" assert.strictEqual getPrototypeOf(\foo), String::core-js-2.4.1/tests/tests/es6.object.is-extensible.ls000066400000000000000000000011131274277553300224530ustar00rootroot00000000000000{module, test} = QUnit module \ES6 test 'Object.isExtensible' (assert)!-> {preventExtensions, isExtensible} = Object assert.isFunction isExtensible assert.arity isExtensible, 1 assert.name isExtensible, \isExtensible assert.nonEnumerable Object, \isExtensible assert.looksNative isExtensible for value in [42 \foo no null void] assert.ok (try => isExtensible value; on), "accept #{typeof! value}" assert.same isExtensible(value), no, "returns true on #{typeof! value}" assert.same isExtensible({}), on if NATIVE assert.ok !isExtensible preventExtensions {}core-js-2.4.1/tests/tests/es6.object.is-frozen.ls000066400000000000000000000010041274277553300216130ustar00rootroot00000000000000{module, test} = QUnit module \ES6 test 'Object.isFrozen' (assert)!-> {freeze, isFrozen} = Object assert.isFunction isFrozen assert.arity isFrozen, 1 assert.name isFrozen, \isFrozen assert.looksNative isFrozen assert.nonEnumerable Object, \isFrozen for value in [42 \foo no null void] assert.ok (try => isFrozen value; on), "accept #{typeof! value}" assert.same isFrozen(value), on, "returns true on #{typeof! value}" assert.same isFrozen({}), no if NATIVE assert.ok isFrozen freeze {}core-js-2.4.1/tests/tests/es6.object.is-sealed.ls000066400000000000000000000010001274277553300215410ustar00rootroot00000000000000{module, test} = QUnit module \ES6 test 'Object.isSealed' (assert)!-> {seal, isSealed} = Object assert.isFunction isSealed assert.arity isSealed, 1 assert.name isSealed, \isSealed assert.looksNative isSealed assert.nonEnumerable Object, \isSealed for value in [42 \foo no null void] assert.ok (try => isSealed value; on), "accept #{typeof! value}" assert.same isSealed(value), on, "returns true on #{typeof! value}" assert.same isSealed({}), no if NATIVE assert.ok isSealed seal {}core-js-2.4.1/tests/tests/es6.object.is.ls000066400000000000000000000005561274277553300203250ustar00rootroot00000000000000{module, test} = QUnit module \ES6 test 'Object.is' (assert)-> same = Object.is assert.isFunction same assert.arity same, 2 assert.name same, \is assert.looksNative same assert.nonEnumerable Object, \is assert.ok same(1 1), '1 is 1' assert.ok same(NaN, NaN), '1 is 1' assert.ok not same(0 -0), '0 isnt -0' assert.ok not same({} {}), '{} isnt {}'core-js-2.4.1/tests/tests/es6.object.keys.ls000066400000000000000000000012071274277553300206570ustar00rootroot00000000000000{module, test} = QUnit module \ES6 test 'Object.keys' (assert)!-> {keys} = Object assert.isFunction keys assert.arity keys, 1 assert.name keys, \keys assert.looksNative keys assert.nonEnumerable Object, \keys fn1 = (@w = 2)-> fn2 = (@toString = 2)-> fn1::q = fn2::q = 1 assert.deepEqual keys([1,2,3]), <[0 1 2]> assert.deepEqual keys(new fn1 1), <[w]> assert.deepEqual keys(new fn2 1), <[toString]> assert.ok \push not in keys Array:: for value in [42 \foo no] assert.ok (try => keys value; on), "accept #{typeof! value}" for value in [null void] assert.throws (!-> keys value), TypeError, "throws on #value"core-js-2.4.1/tests/tests/es6.object.prevent-extensions.ls000066400000000000000000000017511274277553300235700ustar00rootroot00000000000000{module, test} = QUnit module \ES6 test 'Object.preventExtensions' (assert)!-> {preventExtensions, isExtensible, keys, getOwnPropertyNames} = Object assert.isFunction preventExtensions assert.arity preventExtensions, 1 assert.name preventExtensions, \preventExtensions assert.looksNative preventExtensions assert.nonEnumerable Object, \preventExtensions for value in [42 \foo no null void, {}] assert.ok (try => preventExtensions value; on), "accept #{typeof! value}" assert.same preventExtensions(value), value, "returns target on #{typeof! value}" if NATIVE assert.ok isExtensible preventExtensions {} assert.arrayEqual [key for key of preventExtensions {}], [] assert.arrayEqual keys(preventExtensions {}), [] assert.arrayEqual getOwnPropertyNames(preventExtensions {}), [] Object?getOwnPropertySymbols and assert.arrayEqual Object.getOwnPropertySymbols(preventExtensions {}), [] Reflect?ownKeys and assert.arrayEqual Reflect.ownKeys(preventExtensions {}), []core-js-2.4.1/tests/tests/es6.object.seal.ls000066400000000000000000000014211274277553300206260ustar00rootroot00000000000000{module, test} = QUnit module \ES6 test 'Object.seal' (assert)!-> {seal, isSealed, keys, getOwnPropertyNames} = Object assert.isFunction seal assert.arity seal, 1 assert.name seal, \seal assert.looksNative seal assert.nonEnumerable Object, \seal for value in [42 \foo no null void, {}] assert.ok (try => seal value; on), "accept #{typeof! value}" assert.same seal(value), value, "returns target on #{typeof! value}" if NATIVE assert.ok isSealed seal {} assert.arrayEqual [key for key of seal {}], [] assert.arrayEqual keys(seal {}), [] assert.arrayEqual getOwnPropertyNames(seal {}), [] Object?getOwnPropertySymbols and assert.arrayEqual Object.getOwnPropertySymbols(seal {}), [] Reflect?ownKeys and assert.arrayEqual Reflect.ownKeys(seal {}), []core-js-2.4.1/tests/tests/es6.object.set-prototype-of.ls000066400000000000000000000012641274277553300231470ustar00rootroot00000000000000if PROTO {module, test} = QUnit module \ES6 test 'Object.setPrototypeOf' (assert)-> {setPrototypeOf} = Object assert.isFunction setPrototypeOf assert.arity setPrototypeOf, 2 assert.name setPrototypeOf, \setPrototypeOf assert.looksNative setPrototypeOf assert.nonEnumerable Object, \setPrototypeOf assert.ok \apply of setPrototypeOf({} Function::), 'Parent properties in target' assert.strictEqual setPrototypeOf(a:2, {b: -> @a^2})b!, 4, 'Child and parent properties in target' assert.strictEqual setPrototypeOf(tmp = {}, {a: 1}), tmp, 'setPrototypeOf return target' assert.ok !(\toString of setPrototypeOf {} null), 'Can set null as prototype'core-js-2.4.1/tests/tests/es6.object.to-string.ls000066400000000000000000000063301274277553300216340ustar00rootroot00000000000000{module, test} = QUnit module \ES6 test 'Object#toString' (assert)-> assert.arity Object::toString, 0 assert.name Object::toString, \toString assert.looksNative Object::toString assert.nonEnumerable Object::, \toString {toString} = Object:: if STRICT assert.strictEqual toString.call(null), '[object Null]', 'null -> `Null`' assert.strictEqual toString.call(void), '[object Undefined]', 'undefined -> `Undefined`' assert.strictEqual toString.call(true), '[object Boolean]', 'bool -> `Boolean`' assert.strictEqual toString.call('string'), '[object String]', 'string -> `String`' assert.strictEqual toString.call(7), '[object Number]', 'number -> `Number`' Symbol? and assert.strictEqual toString.call(Symbol!), '[object Symbol]', 'symbol -> `Symbol`' assert.strictEqual toString.call(new Boolean no), '[object Boolean]', 'new Boolean -> `Boolean`' assert.strictEqual toString.call(new String ''), '[object String]', 'new String -> `String`' assert.strictEqual toString.call(new Number 7), '[object Number]', 'new Number -> `Number`' assert.strictEqual '' + {}, '[object Object]', '{} -> `Object`' assert.strictEqual toString.call([]), '[object Array]', ' [] -> `Array`' assert.strictEqual toString.call(->), '[object Function]', 'function -> `Function`' assert.strictEqual toString.call(/./), '[object RegExp]', 'regexp -> `RegExp`' assert.strictEqual toString.call(TypeError!), '[object Error]', 'new TypeError -> `Error`' assert.strictEqual toString.call((->&)!), '[object Arguments]', 'arguments -> `Arguments`' for <[Int8Array Uint8Array Uint8ClampedArray Int16Array Uint16Array Int32Array Uint32Array Float32Array Float64Array ArrayBuffer]> Constructor = global[..] if Constructor assert.strictEqual toString.call(new Constructor 1), "[object #{..}]", "new #{..} -> `#{..}`" if NATIVE and DataView? # fails in IE / Edge, enable with TA polyfill assert.strictEqual '' + new DataView(new ArrayBuffer 1), '[object DataView]', 'new DataView -> `DataView`' if Set? assert.strictEqual '' + new Set, '[object Set]', 'set -> `Set`' if Map? assert.strictEqual '' + new Map, '[object Map]', 'map -> `Map`' if WeakSet? assert.strictEqual '' + new WeakSet, '[object WeakSet]', 'weakset -> `WeakSet`' if WeakMap? assert.strictEqual '' + new WeakMap, '[object WeakMap]', 'weakmap -> `WeakMap`' if Promise? assert.strictEqual '' + new Promise(->), '[object Promise]', 'promise -> `Promise`' if ''[Symbol?iterator] assert.strictEqual '' + ''[Symbol.iterator]!, '[object String Iterator]', 'String Iterator -> `String Iterator`' if []entries assert.strictEqual '' + []entries!, '[object Array Iterator]', 'Array Iterator -> `Array Iterator`' if Set?entries assert.strictEqual '' + new Set!entries!, '[object Set Iterator]', 'Set Iterator -> `Set Iterator`' if Map?entries assert.strictEqual '' + new Map!entries!, '[object Map Iterator]', 'Map Iterator -> `Map Iterator`' assert.strictEqual '' + Math, '[object Math]', 'Math -> `Math`' if JSON? assert.strictEqual toString.call(JSON), '[object JSON]', 'JSON -> `JSON`' class Class @::[Symbol?toStringTag] = \Class assert.strictEqual '' + new Class, '[object Class]', 'user class instance -> [Symbol.toStringTag]'core-js-2.4.1/tests/tests/es6.parse-float.ls000066400000000000000000000013011274277553300206470ustar00rootroot00000000000000{module, test} = QUnit module \ES6 test 'parseFloat' (assert)!-> assert.isFunction parseFloat assert.name parseFloat, \parseFloat assert.arity parseFloat, 1 assert.looksNative parseFloat assert.same parseFloat('0'), 0 assert.same parseFloat(' 0'), 0 assert.same parseFloat('+0'), 0 assert.same parseFloat(' +0'), 0 assert.same parseFloat('-0'), -0 assert.same parseFloat(' -0'), -0 ws = '\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u180E\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF' assert.same parseFloat(ws + '+0'), 0 assert.same parseFloat(ws + '-0'), -0 assert.same parseFloat(null), NaN assert.same parseFloat(void), NaNcore-js-2.4.1/tests/tests/es6.parse-int.ls000066400000000000000000000027671274277553300203550ustar00rootroot00000000000000{module, test} = QUnit module \ES6 test 'parseInt' (assert)!-> assert.isFunction parseInt assert.name parseInt, \parseInt assert.arity parseInt, 2 assert.looksNative parseInt for r from 2 to 36 assert.same parseInt(\10 r), r, "radix #r" for <[01 08 10 42]> assert.same parseInt(..), parseInt(.., 10), "default radix is 10: #{..}" assert.same parseInt(\0x16), parseInt(\0x16 16), "default radix is 16: 0x16" ws = '\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u180E\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF' assert.same parseInt(' 0x16'), parseInt(\0x16 16), 'ignores leading whitespace #1' assert.same parseInt(' 42'), parseInt(\42 10), 'ignores leading whitespace #2' assert.same parseInt(' 08'), parseInt(\08 10), 'ignores leading whitespace #3' assert.same parseInt(ws + '08'), parseInt(\08 10), 'ignores leading whitespace #4' assert.same parseInt(ws + '0x16'), parseInt(\0x16 16), 'ignores leading whitespace #5' fakeZero = valueOf: -> 0 assert.same parseInt(\08 fakeZero), parseInt(\08 10), 'valueOf #1' assert.same parseInt(\0x16 fakeZero), parseInt(\0x16 16), 'valueOf #2' assert.same parseInt('-0xF'), -15, 'signed hex #1' assert.same parseInt('-0xF', 16), -15, 'signed hex #2' assert.same parseInt('+0xF'), 15, 'signed hex #3' assert.same parseInt('+0xF' 16), 15, 'signed hex #4' assert.same parseInt('10', -4294967294), 2, 'radix uses ToUint32' assert.same parseInt(null), NaN assert.same parseInt(void), NaNcore-js-2.4.1/tests/tests/es6.promise.ls000066400000000000000000000260351274277553300201230ustar00rootroot00000000000000'use strict' {module, test} = QUnit module \ES6 test 'Promise' (assert)!-> assert.isFunction Promise assert.arity Promise, 1 assert.name Promise, \Promise assert.looksNative Promise assert.throws (!-> Promise!), 'throws w/o `new`' new Promise (resolve, reject)!-> assert.isFunction Promise, 'resolver is function' assert.isFunction Promise, 'rejector is function' assert.same @, (-> @)!, 'correct executor context' # related https://github.com/zloirock/core-js/issues/78 if DESCRIPTORS => test 'Promise operations order' (assert)!-> assert.expect 1 expected = \DEHAFGBC async = assert.async! result = '' var resolve p = new Promise (r)!-> resolve := r resolve then: !-> result += \A throw Error! p.catch !-> result += \B p.catch !-> result += \C assert.same result, expected async! var resolve2 p2 = new Promise (r)!-> resolve2 := r resolve2 Object.defineProperty {}, \then, get: !-> result += \D throw Error! result += \E p2.catch !-> result += \F p2.catch !-> result += \G result += \H setTimeout (!-> if ~result.indexOf(\C) => assert.same result, expected), 1e3 test 'Promise#then' (assert)!-> assert.isFunction Promise::then NATIVE and assert.arity Promise::then, 2 # FF - 0 assert.name Promise::then, \then assert.looksNative Promise::then assert.nonEnumerable Promise::, \then # subclassing, @@species pattern promise = new Promise !-> it 42 promise@@ = FakePromise1 = !-> it ->, -> FakePromise1[Symbol?species] = FakePromise2 = !-> it ->, -> assert.ok promise.then(->) instanceof FakePromise2, 'subclassing, @@species pattern' # subclassing, incorrect `this.constructor` pattern promise = new Promise !-> it 42 promise@@ = FakePromise1 = !-> it ->, -> assert.ok promise.then(->) instanceof Promise, 'subclassing, incorrect `this` pattern' # NewPromiseCapability validations promise = new Promise !-> it 42 promise@@ = FakePromise1 = !-> it ->, -> FakePromise1[Symbol?species] = !-> assert.throws (!-> promise.then(->)), 'NewPromiseCapability validations, #1' FakePromise1[Symbol?species] = !-> it null, -> assert.throws (!-> promise.then(->)), 'NewPromiseCapability validations, #2' FakePromise1[Symbol?species] = !-> it ->, null assert.throws (!-> promise.then(->)), 'NewPromiseCapability validations, #3' test 'Promise#catch' (assert)!-> assert.isFunction Promise::catch NATIVE and assert.arity Promise::catch, 1 # FF - 0 NATIVE and assert.name Promise::catch, \catch # can't be polyfilled in some environments assert.looksNative Promise::catch assert.nonEnumerable Promise::, \catch # subclassing, @@species pattern promise = new Promise !-> it 42 promise@@ = FakePromise1 = !-> it ->, -> FakePromise1[Symbol?species] = FakePromise2 = !-> it ->, -> assert.ok promise.catch(->) instanceof FakePromise2, 'subclassing, @@species pattern' # subclassing, incorrect `this.constructor` pattern promise = new Promise !-> it 42 promise@@ = FakePromise1 = !-> it ->, -> assert.ok promise.catch(->) instanceof Promise, 'subclassing, incorrect `this` pattern' # NewPromiseCapability validations promise = new Promise !-> it 42 promise@@ = FakePromise1 = !-> it ->, -> FakePromise1[Symbol?species] = !-> assert.throws (!-> promise.catch(->)), 'NewPromiseCapability validations, #1' FakePromise1[Symbol?species] = !-> it null, -> assert.throws (!-> promise.catch(->)), 'NewPromiseCapability validations, #2' FakePromise1[Symbol?species] = !-> it ->, null assert.throws (!-> promise.catch(->)), 'NewPromiseCapability validations, #3' # calling `.then` assert.same Promise::catch.call({then: (x, y)-> y }, 42), 42, 'calling `.then`' test 'Promise#@@toStringTag' !(assert)-> #assert.nonEnumerable Promise::, Symbol?toStringTag assert.ok Promise::[Symbol?toStringTag] is \Promise, 'Promise::@@toStringTag is `Promise`' test 'Promise.all' (assert)!-> {all} = Promise assert.isFunction all assert.arity all, 1 assert.name all, \all assert.looksNative all assert.nonEnumerable Promise, \all # works with iterables iter = createIterable [1 2 3] Promise.all iter .catch -> assert.ok iter.received, 'works with iterables: iterator received' assert.ok iter.called, 'works with iterables: next called' # call @@iterator in Array with custom iterator a = [] done = no a[Symbol?iterator] = -> done := on [][Symbol?iterator]call @ Promise.all a assert.ok done assert.throws (!-> all.call(null, []).catch !->), TypeError, 'throws without context' # iteration closing done = no {resolve} = Promise try Promise.resolve = !-> throw 42 Promise.all(createIterable [1 2 3], return: !-> done := on)catch !-> Promise.resolve = resolve assert.ok done, 'iteration closing' # subclassing, `this` pattern FakePromise1 = !-> it ->, -> FakePromise1[Symbol?species] = FakePromise2 = !-> it ->, -> FakePromise1.resolve = FakePromise2.resolve = Promise~resolve assert.ok all.call(FakePromise1, [1 2 3]) instanceof FakePromise1, 'subclassing, `this` pattern' # NewPromiseCapability validations FakePromise1 = !-> FakePromise2 = !-> it null, -> FakePromise3 = !-> it ->, null FakePromise1.resolve = FakePromise2.resolve = FakePromise3.resolve = Promise~resolve assert.throws (!-> all.call(FakePromise1, [1 2 3])), 'NewPromiseCapability validations, #1' assert.throws (!-> all.call(FakePromise2, [1 2 3])), 'NewPromiseCapability validations, #2' assert.throws (!-> all.call(FakePromise3, [1 2 3])), 'NewPromiseCapability validations, #3' test 'Promise.race' (assert)!-> {race} = Promise assert.isFunction race assert.arity race, 1 assert.name race, \race assert.looksNative race assert.nonEnumerable Promise, \race # works with iterables iter = createIterable [1 2 3] Promise.race iter .catch -> assert.ok iter.received, 'works with iterables: iterator received' assert.ok iter.called, 'works with iterables: next called' # call @@iterator in Array with custom iterator a = [] done = no a[Symbol?iterator] = -> done := on [][Symbol?iterator]call @ Promise.race a assert.ok done assert.throws (!-> race.call(null, []).catch !->), TypeError, 'throws without context' # iteration closing done = no {resolve} = Promise try Promise.resolve = !-> throw 42 Promise.race(createIterable [1 2 3], return: !-> done := on)catch !-> Promise.resolve = resolve assert.ok done, 'iteration closing' # subclassing, `this` pattern FakePromise1 = !-> it ->, -> FakePromise1[Symbol?species] = FakePromise2 = !-> it ->, -> FakePromise1.resolve = FakePromise2.resolve = Promise~resolve assert.ok race.call(FakePromise1, [1 2 3]) instanceof FakePromise1, 'subclassing, `this` pattern' # NewPromiseCapability validations FakePromise1 = !-> FakePromise2 = !-> it null, -> FakePromise3 = !-> it ->, null FakePromise1.resolve = FakePromise2.resolve = FakePromise3.resolve = Promise~resolve assert.throws (!-> race.call(FakePromise1, [1 2 3])), 'NewPromiseCapability validations, #1' assert.throws (!-> race.call(FakePromise2, [1 2 3])), 'NewPromiseCapability validations, #2' assert.throws (!-> race.call(FakePromise3, [1 2 3])), 'NewPromiseCapability validations, #3' test 'Promise.resolve' (assert)!-> {resolve} = Promise assert.isFunction resolve NATIVE and assert.arity resolve, 1 # FF - 0 assert.name resolve, \resolve assert.looksNative resolve assert.nonEnumerable Promise, \resolve assert.throws (!-> resolve.call(null, 1).catch !->), TypeError, 'throws without context' # subclassing, `this` pattern FakePromise1 = !-> it ->, -> FakePromise1[Symbol?species] = FakePromise2 = !-> it ->, -> assert.ok resolve.call(FakePromise1, 42) instanceof FakePromise1, 'subclassing, `this` pattern' # NewPromiseCapability validations assert.throws (!-> resolve.call(!->, 42)), 'NewPromiseCapability validations, #1' assert.throws (!-> resolve.call((!-> it null, ->), 42)), 'NewPromiseCapability validations, #2' assert.throws (!-> resolve.call((!-> it ->, null), 42)), 'NewPromiseCapability validations, #3' test 'Promise.reject' (assert)!-> {reject} = Promise assert.isFunction reject NATIVE and assert.arity reject, 1 # FF - 0 assert.name reject, \reject assert.looksNative reject assert.nonEnumerable Promise, \reject assert.throws (!-> reject.call(null, 1).catch !->), TypeError, 'throws without context' # subclassing, `this` pattern FakePromise1 = !-> it ->, -> FakePromise1[Symbol?species] = FakePromise2 = !-> it ->, -> assert.ok reject.call(FakePromise1, 42) instanceof FakePromise1, 'subclassing, `this` pattern' # NewPromiseCapability validations assert.throws (!-> reject.call(!->, 42)), 'NewPromiseCapability validations, #1' assert.throws (!-> reject.call((!-> it null, ->), 42)), 'NewPromiseCapability validations, #2' assert.throws (!-> reject.call((!-> it ->, null), 42)), 'NewPromiseCapability validations, #3' if PROTO test 'Promise subclassing' (assert)!-> # this is ES5 syntax to create a valid ES6 subclass SubPromise = -> self = new Promise it Object.setPrototypeOf self, SubPromise:: self.mine = 'subclass' self Object.setPrototypeOf SubPromise, Promise SubPromise:: = Object.create Promise:: SubPromise::@@ = SubPromise # now let's see if this works like a proper subclass. p1 = SubPromise.resolve 5 assert.strictEqual p1.mine, 'subclass' p1 = p1.then -> assert.strictEqual it, 5 assert.strictEqual p1.mine, 'subclass' p2 = new SubPromise -> it 6 assert.strictEqual p2.mine, 'subclass' p2 = p2.then -> assert.strictEqual it, 6 assert.strictEqual p2.mine, 'subclass' p3 = SubPromise.all [p1, p2] assert.strictEqual p3.mine, 'subclass' # double check assert.ok p3 instanceof Promise assert.ok p3 instanceof SubPromise # check the async values p3.then assert.async!, -> assert.ok it, no test 'Unhandled rejection tracking' (assert)!-> done = no start = assert.async! if process? assert.expect 3 process.on \unhandledRejection, onunhandledrejection = (reason, promise)!-> process.removeListener \unhandledRejection, onunhandledrejection assert.same promise, $promise, 'unhandledRejection, promise' assert.same reason, 42, 'unhandledRejection, reason' $promise.catch -> process.on \rejectionHandled, onrejectionhandled = (promise)!-> process.removeListener \rejectionHandled, onrejectionhandled assert.same promise, $promise, 'rejectionHandled, promise' done or start! done := on else assert.expect 4 global.onunhandledrejection = !-> assert.same it.promise, $promise, 'onunhandledrejection, promise' assert.same it.reason, 42, 'onunhandledrejection, reason' setTimeout (!-> $promise.catch ->), 1 global.onunhandledrejection = null global.onrejectionhandled = !-> assert.same it.promise, $promise, 'onrejectionhandled, promise' assert.same it.reason, 42, 'onrejectionhandled, reason' global.onrejectionhandled = null done or start! done := on Promise.reject(43).catch -> $promise = Promise.reject 42 setTimeout (!-> done or start! done := on ), 3e3core-js-2.4.1/tests/tests/es6.reflect.apply.ls000066400000000000000000000013001274277553300212010ustar00rootroot00000000000000{module, test} = QUnit module \ES6 test 'Reflect.apply' (assert)!-> {apply} = Reflect assert.isFunction apply assert.arity apply, 3 assert.name apply, \apply assert.looksNative apply assert.nonEnumerable Reflect, \apply assert.strictEqual apply(Array::push, [1 2], [3 4 5]), 5 C = (a, b, c)-> a + b + c C.apply = 42 assert.strictEqual apply(C, null, <[foo bar baz]>), \foobarbaz, 'works with redefined apply' assert.throws (!-> apply 42, null, []), TypeError, 'throws on primitive as first argument' assert.throws (!-> apply (!->), null), TypeError, 'throws without third argument' assert.throws (!-> apply (!->), null, \123), TypeError, 'throws on primitive as third argument'core-js-2.4.1/tests/tests/es6.reflect.construct.ls000066400000000000000000000021261274277553300221070ustar00rootroot00000000000000{module, test} = QUnit module \ES6 {getPrototypeOf} = Object test 'Reflect.construct' (assert)!-> {construct} = Reflect assert.isFunction construct assert.arity construct, 2 assert.name construct, \construct assert.looksNative construct assert.nonEnumerable Reflect, \construct C = (a, b, c)-> @qux = a + b + c assert.strictEqual construct(C, <[foo bar baz]>).qux, \foobarbaz, \basic C.apply = 42 assert.strictEqual construct(C, <[foo bar baz]>).qux, \foobarbaz, 'works with redefined apply' inst = construct((!-> @x = 42), [], Array) assert.strictEqual inst.x, 42, 'constructor with newTarget' assert.ok inst instanceof Array, 'prototype with newTarget' # not works in native Edge 12 and FF43- implementations assert.throws (!-> construct 42, []), TypeError, 'throws on primitive' f = (->) f:: = 42 assert.ok try getPrototypeOf(construct f, []) is Object:: catch => no assert.same typeof (try construct(Date, [])getTime!), \number, 'works with native constructors with 2 arguments' assert.throws (!-> construct !->), 'throws when the second argument is not an object'core-js-2.4.1/tests/tests/es6.reflect.define-property.ls000066400000000000000000000017331274277553300232020ustar00rootroot00000000000000{module, test} = QUnit module \ES6 {defineProperty, getOwnPropertyDescriptor} = Object test 'Reflect.defineProperty' (assert)!-> {defineProperty} = Reflect {create} = Reflect assert.isFunction defineProperty assert.arity defineProperty, 3 assert.name defineProperty, \defineProperty assert.looksNative defineProperty assert.nonEnumerable Reflect, \defineProperty O = {} assert.strictEqual defineProperty(O, \foo, {value: 123}), on assert.strictEqual O.foo, 123 if DESCRIPTORS O = {} defineProperty O, \foo, {value: 123, enumerable: on} assert.deepEqual getOwnPropertyDescriptor(O, \foo), {value: 123, enumerable: on, configurable: no, writable: no} assert.strictEqual defineProperty(O, \foo, {value: 42}), no assert.throws (!-> defineProperty 42, \foo, {value: 42}), TypeError, 'throws on primitive' assert.throws (!-> defineProperty 42 1 {}) assert.throws (!-> defineProperty {} create(null), {}) assert.throws (!-> defineProperty {} 1 1)core-js-2.4.1/tests/tests/es6.reflect.delete-property.ls000066400000000000000000000011351274277553300232060ustar00rootroot00000000000000{module, test} = QUnit module \ES6 {defineProperty} = Object test 'Reflect.deleteProperty' (assert)-> {deleteProperty} = Reflect assert.isFunction deleteProperty assert.arity deleteProperty, 2 assert.name deleteProperty, \deleteProperty assert.looksNative deleteProperty assert.nonEnumerable Reflect, \deleteProperty O = {bar: 456} assert.strictEqual deleteProperty(O, \bar), on assert.ok \bar not in O if DESCRIPTORS assert.strictEqual deleteProperty(defineProperty({}, \foo, {value: 42}), \foo), no assert.throws (-> deleteProperty 42, \foo), TypeError, 'throws on primitive'core-js-2.4.1/tests/tests/es6.reflect.enumerate.ls000066400000000000000000000013721274277553300220520ustar00rootroot00000000000000{module, test} = QUnit module \ES6 {defineProperty} = Object {from} = Array test 'Reflect.enumerate' (assert)-> {enumerate} = Reflect {iterator} = Symbol assert.isFunction enumerate assert.arity enumerate, 1 assert.name enumerate, \enumerate assert.looksNative enumerate assert.nonEnumerable Reflect, \enumerate obj = {foo: 1, bar: 2} i = enumerate obj assert.isIterable i assert.deepEqual from(i), <[foo bar]>, 'bisic' obj = {q: 1, w: 2, e: 3} i = enumerate obj delete obj.w assert.deepEqual from(i), <[q e]>, 'ignore holes' obj = {q: 1, w: 2, e: 3} with {a: 4, s: 5, d: 6} assert.deepEqual from(enumerate obj).sort!, <[a d e q s w]>, 'works with prototype' assert.throws (-> enumerate 42), TypeError, 'throws on primitive'core-js-2.4.1/tests/tests/es6.reflect.get-own-property-descriptor.ls000066400000000000000000000011031274277553300254730ustar00rootroot00000000000000{module, test} = QUnit module \ES6 test 'Reflect.getOwnPropertyDescriptor' (assert)-> {getOwnPropertyDescriptor} = Reflect assert.isFunction getOwnPropertyDescriptor assert.arity getOwnPropertyDescriptor, 2 assert.name getOwnPropertyDescriptor, \getOwnPropertyDescriptor assert.looksNative getOwnPropertyDescriptor assert.nonEnumerable Reflect, \getOwnPropertyDescriptor obj = {baz: 789} desc = getOwnPropertyDescriptor obj, \baz assert.strictEqual desc.value, 789 assert.throws (-> getOwnPropertyDescriptor 42 \constructor), TypeError, 'throws on primitive'core-js-2.4.1/tests/tests/es6.reflect.get-prototype-of.ls000066400000000000000000000006511274277553300233100ustar00rootroot00000000000000{module, test} = QUnit module \ES6 test 'Reflect.getPrototypeOf' (assert)-> {getPrototypeOf} = Reflect assert.isFunction getPrototypeOf assert.arity getPrototypeOf, 1 assert.name getPrototypeOf, \getPrototypeOf assert.looksNative getPrototypeOf assert.nonEnumerable Reflect, \getPrototypeOf assert.strictEqual getPrototypeOf([]), Array:: assert.throws (-> getPrototypeOf 42), TypeError, 'throws on primitive'core-js-2.4.1/tests/tests/es6.reflect.get.ls000066400000000000000000000015561274277553300206500ustar00rootroot00000000000000{module, test} = QUnit module \ES6 {defineProperty, create} = Object test 'Reflect.get' (assert)-> {get} = Reflect assert.isFunction get NATIVE and assert.arity get, 2 # fails in MS Edge assert.name get, \get assert.looksNative get assert.nonEnumerable Reflect, \get assert.strictEqual get({qux: 987}, \qux), 987 if DESCRIPTORS target = create defineProperty({z:3}, \w, {get: -> @}), do x: value: 1 y: get: -> @ receiver = {} assert.strictEqual get(target, \x, receiver), 1, 'get x' assert.strictEqual get(target, \y, receiver), receiver, 'get y' assert.strictEqual get(target, \z, receiver), 3, 'get z' assert.strictEqual get(target, \w, receiver), receiver, 'get w' assert.strictEqual get(target, \u, receiver), void, 'get u' assert.throws (-> get 42 \constructor), TypeError, 'throws on primitive'core-js-2.4.1/tests/tests/es6.reflect.has.ls000066400000000000000000000006531274277553300206410ustar00rootroot00000000000000{module, test} = QUnit module \ES6 test 'Reflect.has' (assert)-> {has} = Reflect assert.isFunction has assert.arity has, 2 assert.name has, \has assert.looksNative has assert.nonEnumerable Reflect, \has O = {qux: 987} assert.strictEqual has(O, \qux), on assert.strictEqual has(O, \qwe), no assert.strictEqual has(O, \toString), on assert.throws (-> has 42, \constructor), TypeError, 'throws on primitive'core-js-2.4.1/tests/tests/es6.reflect.is-extensible.ls000066400000000000000000000007621274277553300226420ustar00rootroot00000000000000{module, test} = QUnit module \ES6 {defineProperty, preventExtensions} = Object test 'Reflect.isExtensible' (assert)-> {isExtensible} = Reflect assert.isFunction isExtensible assert.arity isExtensible, 1 assert.name isExtensible, \isExtensible assert.looksNative isExtensible assert.nonEnumerable Reflect, \isExtensible assert.ok isExtensible {} if DESCRIPTORS assert.ok !isExtensible preventExtensions {} assert.throws (-> isExtensible 42), TypeError, 'throws on primitive'core-js-2.4.1/tests/tests/es6.reflect.own-keys.ls000066400000000000000000000014451274277553300216420ustar00rootroot00000000000000{module, test} = QUnit module \ES6 {defineProperty} = Object test 'Reflect.ownKeys' (assert)-> {ownKeys} = Reflect sym = Symbol \c assert.isFunction ownKeys assert.arity ownKeys, 1 assert.name ownKeys, \ownKeys assert.looksNative ownKeys assert.nonEnumerable Reflect, \ownKeys O1 = {a: 1} defineProperty O1, \b, value: 2 O1[sym] = 3 keys = ownKeys O1 assert.strictEqual keys.length, 3, 'ownKeys return all own keys' assert.ok \a in keys, 'ownKeys return all own keys: simple' assert.ok \b in keys, 'ownKeys return all own keys: hidden' assert.strictEqual O1[keys.2], 3, 'ownKeys return all own keys: symbol' O2 = ^^O1 keys = ownKeys O2 assert.strictEqual keys.length, 0, 'ownKeys return only own keys' assert.throws (-> ownKeys 42), TypeError, 'throws on primitive'core-js-2.4.1/tests/tests/es6.reflect.prevent-extensions.ls000066400000000000000000000010371274277553300237430ustar00rootroot00000000000000{module, test} = QUnit module \ES6 {defineProperty, isExtensible} = Object test 'Reflect.preventExtensions' (assert)-> {preventExtensions} = Reflect assert.isFunction preventExtensions assert.arity preventExtensions, 1 assert.name preventExtensions, \preventExtensions assert.looksNative preventExtensions assert.nonEnumerable Reflect, \preventExtensions obj = {} assert.ok preventExtensions(obj), on if DESCRIPTORS assert.ok !isExtensible obj assert.throws (-> preventExtensions 42), TypeError, 'throws on primitive'core-js-2.4.1/tests/tests/es6.reflect.set-prototype-of.ls000066400000000000000000000012341274277553300233220ustar00rootroot00000000000000if PROTO {module, test} = QUnit module \ES6 test 'Reflect.setPrototypeOf' (assert)-> {setPrototypeOf} = Reflect assert.isFunction setPrototypeOf NATIVE and assert.arity setPrototypeOf, 2 # fails in MS Edge assert.name setPrototypeOf, \setPrototypeOf assert.looksNative setPrototypeOf assert.nonEnumerable Reflect, \setPrototypeOf obj = {} assert.ok setPrototypeOf(obj, Array::), on assert.ok obj instanceof Array assert.throws (-> setPrototypeOf {}, 42), TypeError assert.throws (-> setPrototypeOf 42, {}), TypeError, 'throws on primitive' assert.ok setPrototypeOf(o = {}, o) is no, 'false on recursive __proto__'core-js-2.4.1/tests/tests/es6.reflect.set.ls000066400000000000000000000034531274277553300206620ustar00rootroot00000000000000{module, test} = QUnit module \ES6 {defineProperty, getOwnPropertyDescriptor, create} = Object test 'Reflect.set' (assert)-> {set} = Reflect assert.isFunction set NATIVE and assert.arity set, 3 # fails in MS Edge assert.name set, \set assert.looksNative set assert.nonEnumerable Reflect, \set obj = {} assert.ok set(obj, \quux, 654), on assert.strictEqual obj.quux, 654 target = {} receiver = {} set target, \foo, 1, receiver assert.strictEqual target.foo, void, 'target.foo === undefined' assert.strictEqual receiver.foo, 1, 'receiver.foo === 1' if DESCRIPTORS defineProperty receiver, \bar, {value: 0, writable: on, enumerable: no, configurable: on} set target, \bar, 1, receiver assert.strictEqual receiver.bar, 1, 'receiver.bar === 1' assert.strictEqual getOwnPropertyDescriptor(receiver, \bar).enumerable, no, 'enumerability not overridden' var out target = create defineProperty({z:3}, \w, {set: !-> out := @}), do x: value: 1, writable: on, configurable: on y: set: !-> out := @ c: value: 1, writable: no, configurable: no assert.strictEqual set(target, \x, 2, target), on, 'set x' assert.strictEqual target.x, 2, 'set x' out = null assert.strictEqual set(target, \y, 2, target), on, 'set y' assert.strictEqual out, target, 'set y' assert.strictEqual set(target, \z, 4, target), on assert.strictEqual target.z, 4, 'set z' out = null assert.strictEqual set(target, \w, 1, target), on 'set w' assert.strictEqual out, target, 'set w' assert.strictEqual set(target, \u, 0, target), on, 'set u' assert.strictEqual target.u, 0, 'set u' assert.strictEqual set(target, \c, 2, target), no, 'set c' assert.strictEqual target.c, 1, 'set c' assert.throws (-> set 42, \q, 42), TypeError, 'throws on primitive'core-js-2.4.1/tests/tests/es6.regexp.constructor.ls000066400000000000000000000031471274277553300223220ustar00rootroot00000000000000{module, test} = QUnit module \ES6 if DESCRIPTORS test 'RegExp constructor' (assert)!-> assert.isFunction RegExp assert.arity RegExp, 2 assert.name RegExp, \RegExp assert.looksNative RegExp assert.strictEqual typeof! RegExp!, \RegExp assert.strictEqual typeof! new RegExp!, \RegExp re = /a/g assert.notStrictEqual re, new RegExp(re), 'new RegExp(re) isnt re' assert.strictEqual re, RegExp(re), 'RegExp(re) is re' re[Symbol?match] = no assert.notStrictEqual re, RegExp(re), 'RegExp(re) isnt re, changed Symbol.match' O = {} assert.notStrictEqual O, RegExp(O), 'RegExp(O) isnt O' O[Symbol?match] = on O.constructor = RegExp assert.strictEqual O, RegExp(O), 'RegExp(O) is O, changed Symbol.match' assert.strictEqual String(re), '/a/g', 'b is /a/g' # allows a regex with flags as the pattern assert.strictEqual String(new RegExp(/a/g, 'mi')), '/a/im', 'Allows a regex with flags' assert.ok new RegExp(/a/g, 'im') instanceof RegExp, 'Works with instanceof' assert.strictEqual new RegExp(/a/g, 'im').constructor, RegExp, 'Has the right constructor' /(b)(c)(d)(e)(f)(g)(h)(i)(j)(k)(l)(m)(n)(o)(p)/.exec \abcdefghijklmnopq for val, index in \bcdefghij assert.strictEqual RegExp"$#{index + 1}", val, "Updates RegExp globals $#{index + 1}" if nativeSubclass C = nativeSubclass RegExp assert.ok new C instanceof C, 'correct subclassing with native classes #1' assert.ok new C instanceof RegExp, 'correct subclassing with native classes #2' assert.ok new C('^abc$').test(\abc), 'correct subclassing with native classes #3'core-js-2.4.1/tests/tests/es6.regexp.flags.ls000066400000000000000000000012361274277553300210260ustar00rootroot00000000000000{module, test} = QUnit module \ES6 if DESCRIPTORS test 'RegExp#flags' (assert)-> assert.nonEnumerable RegExp::, \flags assert.strictEqual /./g.flags, \g, '/./g.flags is "g"' assert.strictEqual /./.flags, '', '/./.flags is ""' assert.strictEqual RegExp('.', \gim).flags, \gim, 'RegExp(".", "gim").flags is "gim"' assert.strictEqual RegExp('.').flags, '', 'RegExp(".").flags is ""' assert.strictEqual /./gim.flags, \gim, '/./gim.flags is "gim"' assert.strictEqual /./gmi.flags, \gim, '/./gmi.flags is "gim"' assert.strictEqual /./mig.flags, \gim, '/./mig.flags is "gim"' assert.strictEqual /./mgi.flags, \gim, '/./mgi.flags is "gim"'core-js-2.4.1/tests/tests/es6.regexp.match.ls000066400000000000000000000222171274277553300210300ustar00rootroot00000000000000{module, test} = QUnit module \ES6 test 'String#match regression' (assert)-> assert.isFunction ''match assert.arity ''match, 1 assert.name ''match, \match assert.looksNative ''match assert.nonEnumerable String::, \match # based on https://github.com/tc39/test262/tree/master/test/built-ins/String/prototype/match instance = Object on instance.match = String::match assert.strictEqual instance.match(on).0, \true, 'S15.5.4.10_A1_T1' instance = Object no; instance.match = String::match assert.strictEqual instance.match((-> no)!).0, \false, 'S15.5.4.10_A1_T2' matched = ''match! expected = RegExp!exec '' assert.strictEqual matched.length, expected.length, 'S15.5.4.10_A1_T4 #1' assert.strictEqual matched.index, expected.index, 'S15.5.4.10_A1_T4 #2' assert.strictEqual matched.input, expected.input, 'S15.5.4.10_A1_T4 #3' assert.strictEqual 'gnulluna'match(null).0, \null, 'S15.5.4.10_A1_T5' matched = Object(\undefined).match x expected = RegExp(x)exec \undefined assert.strictEqual matched.length, expected.length, 'S15.5.4.10_A1_T6 #1' assert.strictEqual matched.index, expected.index, 'S15.5.4.10_A1_T6 #2' assert.strictEqual matched.input, expected.input, 'S15.5.4.10_A1_T6 #3' matched = String(\undefined)match undefined expected = RegExp(undefined)exec \undefined assert.strictEqual matched.length, expected.length, 'S15.5.4.10_A1_T7 #1' assert.strictEqual matched.index, expected.index, 'S15.5.4.10_A1_T7 #2' assert.strictEqual matched.input, expected.input, 'S15.5.4.10_A1_T7 #3' obj = {toString: ->} matched = String(obj)match void expected = RegExp(void)exec \undefined assert.strictEqual matched.length, expected.length, 'S15.5.4.10_A1_T8 #1' assert.strictEqual matched.index, expected.index, 'S15.5.4.10_A1_T8 #2' assert.strictEqual matched.input, expected.input, 'S15.5.4.10_A1_T8 #3' obj = {toString: -> '\u0041B'} str = 'ABB\u0041BABAB' assert.strictEqual str.match(obj).0, \AB, 'S15.5.4.10_A1_T10' obj = {toString: -> throw \intostr} str = 'ABB\u0041BABAB' try x = str.match obj assert.ok no, 'S15.5.4.10_A1_T11 #1 lead to throwing exception' catch e assert.strictEqual e, \intostr, 'S15.5.4.10_A1_T11 #1.1: Exception === "intostr". Actual: ' + e obj = {toString: (-> {}),valueOf: -> throw \intostr} str = 'ABB\u0041BABAB' try x = str.match obj assert.ok no, 'S15.5.4.10_A1_T12 #1 lead to throwing exception' catch e assert.strictEqual e, \intostr, 'S15.5.4.10_A1_T12 #1.1: Exception === "intostr". Actual: ' + e obj = {toString: (-> {}),valueOf: -> 1} assert.strictEqual 'ABB\u0041B\u0031ABAB\u0031BBAA'match(obj).0, \1, 'S15.5.4.10_A1_T13 #1' assert.strictEqual 'ABB\u0041B\u0031ABAB\u0031BBAA'match(obj).length, 1, 'S15.5.4.10_A1_T13 #2' reg = RegExp \77 assert.strictEqual 'ABB\u0041BABAB\u0037\u0037BBAA'match(reg).0, \77, 'S15.5.4.10_A1_T14' string = \1234567890 assert.strictEqual string.match(3).0, \3, 'S15.5.4.10_A2_T1 #1' assert.strictEqual string.match(3)length, 1, 'S15.5.4.10_A2_T1 #2' assert.strictEqual string.match(3)index, 2, 'S15.5.4.10_A2_T1 #3' assert.strictEqual string.match(3)input, string, 'S15.5.4.10_A2_T1 #4' matches = <[34 34 34]> string = \343443444 assert.strictEqual string.match(/34/g)length, 3, 'S15.5.4.10_A2_T2 #1' for i in matches assert.strictEqual string.match(/34/g)[i], matches[i], "S15.5.4.10_A2_T2 #2" matches = <[1 2 3 4 5 6 7 8 9 0]> string = \123456abcde7890 assert.strictEqual string.match(/\d{1}/g).length, 10, 'S15.5.4.10_A2_T3 #1' for i in matches assert.strictEqual string.match(/\d{1}/g)[i], matches[i], "S15.5.4.10_A2_T3 #2" matches = <[12 34 56 78 90]> string = \123456abcde7890 assert.strictEqual string.match(/\d{2}/g).length, 5, 'S15.5.4.10_A2_T4 #1' for i in matches assert.strictEqual string.match(/\d{2}/g)[i], matches[i], "S15.5.4.10_A2_T4 #2" matches = <[ab cd]> string = \123456abcde7890 assert.strictEqual string.match(/\D{2}/g).length, 2, 'S15.5.4.10_A2_T5 #1' for i in matches assert.strictEqual string.match(/\D{2}/g)[i], matches[i], "S15.5.4.10_A2_T5 #2" string = "Boston, Mass. 02134" assert.strictEqual string.match(/([\d]{5})([-\ ]?[\d]{4})?$/).0, \02134, 'S15.5.4.10_A2_T6 #1' assert.strictEqual string.match(/([\d]{5})([-\ ]?[\d]{4})?$/).1, \02134, 'S15.5.4.10_A2_T6 #2' NATIVE and assert.strictEqual string.match(/([\d]{5})([-\ ]?[\d]{4})?$/).2, void, 'S15.5.4.10_A2_T6 #3' #fails in old IE assert.strictEqual string.match(/([\d]{5})([-\ ]?[\d]{4})?$/)length, 3, 'S15.5.4.10_A2_T6 #4' assert.strictEqual string.match(/([\d]{5})([-\ ]?[\d]{4})?$/)index, 14, 'S15.5.4.10_A2_T6 #5' assert.strictEqual string.match(/([\d]{5})([-\ ]?[\d]{4})?$/)input, string, 'S15.5.4.10_A2_T6 #6' string = "Boston, Mass. 02134" assert.strictEqual string.match(/([\d]{5})([-\ ]?[\d]{4})?$/g).length, 1, 'S15.5.4.10_A2_T7 #1' assert.strictEqual string.match(/([\d]{5})([-\ ]?[\d]{4})?$/g).0, \02134, 'S15.5.4.10_A2_T7 #2' matches = <[02134 02134 undefined]> string = "Boston, MA 02134" re = /([\d]{5})([-\ ]?[\d]{4})?$/ re.lastIndex = 0 assert.strictEqual string.match(re).length, 3, 'S15.5.4.10_A2_T8 #1' assert.strictEqual string.match(re).index, string.lastIndexOf(\0), 'S15.5.4.10_A2_T8 #2' for i in matches assert.strictEqual string.match(re)[i], matches[i], "S15.5.4.10_A2_T8 #3" string = "Boston, MA 02134" matches = [\02134 \02134 void] re = /([\d]{5})([-\ ]?[\d]{4})?$/ re.lastIndex = string.length assert.strictEqual string.match(re).length, 3, 'S15.5.4.10_A2_T9 #1' assert.strictEqual string.match(re).index, string.lastIndexOf(\0), 'S15.5.4.10_A2_T9 #2' for i in matches assert.strictEqual string.match(re)[i], matches[i], "S15.5.4.10_A2_T9 #3" string = "Boston, MA 02134" matches = [\02134 \02134 void] re = /([\d]{5})([-\ ]?[\d]{4})?$/ re.lastIndex = string.lastIndexOf \0 assert.strictEqual string.match(re).length, 3, 'S15.5.4.10_A2_T10 #1' assert.strictEqual string.match(re).index, string.lastIndexOf(\0), 'S15.5.4.10_A2_T10 #2' for i in matches assert.strictEqual string.match(re)[i], matches[i], "S15.5.4.10_A2_T10 #3" string = "Boston, MA 02134"; matches = [\02134 \02134 void] re = /([\d]{5})([-\ ]?[\d]{4})?$/ re.lastIndex = string.lastIndexOf(\0) + 1 assert.strictEqual string.match(re).length, 3, 'S15.5.4.10_A2_T11 #1' assert.strictEqual string.match(re).index, string.lastIndexOf(\0), 'S15.5.4.10_A2_T11 #2' for i in matches assert.strictEqual string.match(re)[i], matches[i], "S15.5.4.10_A2_T11 #3" string = "Boston, MA 02134" re = /([\d]{5})([-\ ]?[\d]{4})?$/g assert.strictEqual string.match(re).length, 1, 'S15.5.4.10_A2_T12 #1' assert.strictEqual string.match(re).0, \02134, 'S15.5.4.10_A2_T12 #2' re = /([\d]{5})([-\ ]?[\d]{4})?$/g re.lastIndex = 0; string = "Boston, MA 02134" assert.strictEqual string.match(re).length, 1, 'S15.5.4.10_A2_T13 #1' assert.strictEqual string.match(re).0, \02134, 'S15.5.4.10_A2_T13 #2' string = "Boston, MA 02134" re = /([\d]{5})([-\ ]?[\d]{4})?$/g re.lastIndex = string.length assert.strictEqual string.match(re).length, 1, 'S15.5.4.10_A2_T14 #1' assert.strictEqual string.match(re).0, \02134, 'S15.5.4.10_A2_T14 #2' string = "Boston, MA 02134" re = /([\d]{5})([-\ ]?[\d]{4})?$/g re.lastIndex = string.lastIndexOf \0 assert.strictEqual string.match(re).length, 1, 'S15.5.4.10_A2_T15 #1' assert.strictEqual string.match(re).0, \02134, 'S15.5.4.10_A2_T15 #2' string = "Boston, MA 02134" re = /([\d]{5})([-\ ]?[\d]{4})?$/g re.lastIndex = string.lastIndexOf(\0) + 1 assert.strictEqual string.match(re).length, 1, 'S15.5.4.10_A2_T16 #1' assert.strictEqual string.match(re).0, \02134, 'S15.5.4.10_A2_T16 #2' re = /0./ num = 10203040506070809000 assert.strictEqual ''match.call(num, re)[0], \02, 'S15.5.4.10_A2_T17 #1' assert.strictEqual ''match.call(num, re)length, 1, 'S15.5.4.10_A2_T17 #2' assert.strictEqual ''match.call(num, re)index, 1, 'S15.5.4.10_A2_T17 #3' assert.strictEqual ''match.call(num, re)input, String(num), 'S15.5.4.10_A2_T17 #4' re = /0./ re.lastIndex = 0 num = 10203040506070809000 assert.strictEqual ''match.call(num, re)[0], \02, 'S15.5.4.10_A2_T18 #1' assert.strictEqual ''match.call(num, re)length, 1, 'S15.5.4.10_A2_T18 #2' assert.strictEqual ''match.call(num, re)index, 1, 'S15.5.4.10_A2_T18 #3' assert.strictEqual ''match.call(num, re)input, String(num), 'S15.5.4.10_A2_T18 #4' test 'RegExp#@@match' (assert)-> assert.isFunction /./[Symbol?match] assert.arity /./[Symbol?match], 1 string = "Boston, MA 02134" matches = [\02134 \02134 void] assert.strictEqual /([\d]{5})([-\ ]?[\d]{4})?$/[Symbol?match](string).length, 3 assert.strictEqual /([\d]{5})([-\ ]?[\d]{4})?$/[Symbol?match](string).index, string.lastIndexOf \0 for i in matches assert.strictEqual /([\d]{5})([-\ ]?[\d]{4})?$/[Symbol?match](string)[i], matches[i] test '@@match logic' (assert)-> 'use strict' str = if STRICT => \qwe else Object \qwe num = if STRICT => 123 else Object 123 O = {(Symbol?match): -> {value: it}} assert.strictEqual str.match(O)value, str assert.strictEqual ''match.call(num, O)value, num re = /./ re[Symbol?match] = -> {value: it} assert.strictEqual str.match(re)value, str assert.strictEqual ''match.call(num, re)value, num core-js-2.4.1/tests/tests/es6.regexp.replace.ls000066400000000000000000000131661274277553300213520ustar00rootroot00000000000000{module, test} = QUnit module \ES6 test 'String#replace regression' (assert)-> assert.isFunction ''replace assert.arity ''replace, 2 assert.name ''replace, \replace assert.looksNative ''replace assert.nonEnumerable String::, \replace # based on https://github.com/tc39/test262/tree/master/test/built-ins/String/prototype/replace instance = Object true instance.replace = String::replace assert.strictEqual instance.replace(on, 1), \1, 'S15.5.4.11_A1_T1' instance = Object no instance.replace = String::replace assert.strictEqual instance.replace(no, void), \undefined, 'S15.5.4.11_A1_T2' assert.strictEqual 'gnulluna'replace(null, (a1, a2, a3)-> a2 + ''), \g1una, 'S15.5.4.11_A1_T4' assert.strictEqual 'gnulluna'replace(null, ->), \gundefineduna, 'S15.5.4.11_A1_T5' assert.strictEqual Object(\undefined)replace(void, -> &[1] + 42), \42, 'S15.5.4.11_A1_T6' assert.strictEqual 'undefined'replace(\e, void), \undundefinedfined, 'S15.5.4.11_A1_T7' assert.strictEqual String({toString: ->})replace(/e/g, void), \undundefinedfinundefinedd, 'S15.5.4.11_A1_T8' assert.strictEqual new String({valueOf: (->), toString: void})replace((->)!, (a1, a2, a3)-> a1 + a2 + a3), \undefined0undefined, 'S15.5.4.11_A1_T9' assert.strictEqual 'ABB\u0041BABAB'replace({toString: -> '\u0041B'}, ->), \undefinedBABABAB, 'S15.5.4.11_A1_T10' if NATIVE # wrong order in some old environments try 'ABB\u0041BABAB'replace {toString: -> throw \insearchValue}, {toString: -> throw \inreplaceValue} assert.ok no, 'S15.5.4.11_A1_T11 #1 lead to throwing exception' catch e assert.strictEqual e, \insearchValue, 'S15.5.4.11_A1_T11 #2' try Object('ABB\u0041BABAB')replace {toString: (->{}), valueOf: -> throw \insearchValue}, {toString: -> throw \inreplaceValue} assert.ok no, 'S15.5.4.11_A1_T12 #1 lead to throwing exception' catch e assert.strictEqual e, \insearchValue, 'S15.5.4.11_A1_T12 #2' try 'ABB\u0041BABAB\u0031BBAA'replace {toString: (->{}), valueOf: -> throw \insearchValue}, {toString: -> 1} assert.ok no, 'S15.5.4.11_A1_T13 #1 lead to throwing exception' catch e assert.strictEqual e, \insearchValue, 'S15.5.4.11_A1_T13 #2' assert.strictEqual 'ABB\u0041BABAB\u0037\u0037BBAA'replace(new RegExp(\77), 1), 'ABBABABAB\u0031BBAA', 'S15.5.4.11_A1_T14' instance = Object 1100.00777001 instance.replace = String::replace try instance.replace {toString: -> /77/}, 1 assert.ok no, 'S15.5.4.11_A1_T15 #1 lead to throwing exception' catch e assert.ok e instanceof TypeError, 'S15.5.4.11_A1_T15 #2' instance = Object 1100.00777001 instance.replace = String::replace try instance.replace /77/, {toString: -> (a1, a2, a3)-> a2 + \z} assert.ok no, 'S15.5.4.11_A1_T16 #1 lead to throwing exception' catch e assert.ok e instanceof TypeError, 'S15.5.4.11_A1_T16 #2' assert.strictEqual 'asdf'replace(RegExp('' \g), \1), \1a1s1d1f1, 'S15.5.4.11_A1_T17' assert.strictEqual 'She sells seashells by the seashore.'replace(/sh/g, \sch), 'She sells seaschells by the seaschore.', 'S15.5.4.11_A2_T1' assert.strictEqual 'She sells seashells by the seashore.'replace(/sh/g, \$$sch), 'She sells sea$schells by the sea$schore.', 'S15.5.4.11_A2_T2' assert.strictEqual 'She sells seashells by the seashore.'replace(/sh/g, '$&sch'), 'She sells seashschells by the seashschore.', 'S15.5.4.11_A2_T3' assert.strictEqual 'She sells seashells by the seashore.'replace(/sh/g, '$`sch'), 'She sells seaShe sells seaschells by the seaShe sells seashells by the seaschore.', 'S15.5.4.11_A2_T4' assert.strictEqual 'She sells seashells by the seashore.'replace(/sh/g, "$'sch"), 'She sells seaells by the seashore.schells by the seaore.schore.', 'S15.5.4.11_A2_T5' assert.strictEqual 'She sells seashells by the seashore.'replace(/sh/, \sch), 'She sells seaschells by the seashore.', 'S15.5.4.11_A2_T6' assert.strictEqual 'She sells seashells by the seashore.'replace(/sh/, \$$sch), 'She sells sea$schells by the seashore.', 'S15.5.4.11_A2_T7' assert.strictEqual 'She sells seashells by the seashore.'replace(/sh/, '$&sch'), 'She sells seashschells by the seashore.', 'S15.5.4.11_A2_T8' assert.strictEqual 'She sells seashells by the seashore.'replace(/sh/, '$`sch'), 'She sells seaShe sells seaschells by the seashore.', 'S15.5.4.11_A2_T9' assert.strictEqual 'She sells seashells by the seashore.'replace(/sh/, "$'sch"), 'She sells seaells by the seashore.schells by the seashore.', 'S15.5.4.11_A2_T10' assert.strictEqual 'uid=31'replace(/(uid=)(\d+)/, '$1115'), 'uid=115', 'S15.5.4.11_A3_T1' assert.strictEqual 'uid=31'replace(/(uid=)(\d+)/, '$11A15'), 'uid=1A15', 'S15.5.4.11_A3_T3' assert.strictEqual 'abc12 def34'replace(/([a-z]+)([0-9]+)/, -> &.2 + &.1), '12abc def34', 'S15.5.4.11_A4_T1' assert.strictEqual 'aaaaaaaaaa,aaaaaaaaaaaaaaa'replace(/^(a+)\1*,\1+$/, '$1'), \aaaaa, 'S15.5.4.11_A5_T1' test 'RegExp#@@replace' (assert)-> assert.isFunction /./[Symbol?replace] assert.arity /./[Symbol?replace], 2 assert.strictEqual /([a-z]+)([0-9]+)/[Symbol?replace]('abc12 def34', -> &.2 + &.1), '12abc def34' test '@@replace logic' (assert)-> 'use strict' str = if STRICT => \qwe else Object \qwe num = if STRICT => 123 else Object 123 O = {(Symbol?replace): (a, b)-> {a, b}} assert.strictEqual str.replace(O, 42)a, str assert.strictEqual str.replace(O, 42)b, 42 assert.strictEqual ''replace.call(num, O, 42)a, num assert.strictEqual ''replace.call(num, O, 42)b, 42 re = /./ re[Symbol?replace] = (a, b)-> {a, b} assert.strictEqual str.replace(re, 42)a, str assert.strictEqual str.replace(re, 42)b, 42 assert.strictEqual ''replace.call(num, re, 42)a, num assert.strictEqual ''replace.call(num, re, 42)b, 42core-js-2.4.1/tests/tests/es6.regexp.search.ls000066400000000000000000000065511274277553300212040ustar00rootroot00000000000000{module, test} = QUnit module \ES6 test 'String#search regression' (assert)-> assert.isFunction ''search assert.arity ''search, 1 assert.name ''search, \search assert.looksNative ''search assert.nonEnumerable String::, \search # based on https://github.com/tc39/test262/tree/master/test/built-ins/String/prototype/search instance = Object on instance.search = String::search assert.strictEqual instance.search(on), 0, 'S15.5.4.12_A1_T1' instance = Object no instance.search = String::search assert.strictEqual instance.search(no), 0, 'S15.5.4.12_A1_T2' assert.strictEqual ''search!, 0, 'S15.5.4.12_A1_T4 #1' assert.strictEqual '--undefined--'search!, 0, 'S15.5.4.12_A1_T4 #2' assert.strictEqual 'gnulluna'search(null), 1, 'S15.5.4.12_A1_T5' assert.strictEqual Object(\undefined)search(void), 0, 'S15.5.4.12_A1_T6' assert.strictEqual 'undefined'search(void), 0, 'S15.5.4.12_A1_T7' assert.strictEqual String({toString: ->})search(void), 0, 'S15.5.4.12_A1_T8' assert.strictEqual 'ssABB\u0041BABAB'search({toString: -> '\u0041B'}), 2, 'S15.5.4.12_A1_T10' try 'ABB\u0041BABAB'search {toString: -> throw \intostr} assert.ok no, 'S15.5.4.12_A1_T11 #1 lead to throwing exception' catch e assert.strictEqual e, \intostr, 'S15.5.4.12_A1_T11 #2' try Object('ABB\u0041BABAB')search {toString: (-> {}), valueOf: -> throw \intostr} assert.ok no, 'S15.5.4.12_A1_T12 #1 lead to throwing exception' catch e assert.strictEqual e, \intostr, 'S15.5.4.12_A1_T12 #2' assert.strictEqual 'ABB\u0041B\u0031ABAB\u0031BBAA'search({toString: (-> {}), valueOf: -> 1}), 5, 'S15.5.4.12_A1_T13' assert.strictEqual 'ABB\u0041BABAB\u0037\u0037BBAA'search(RegExp \77), 9, 'S15.5.4.12_A1_T14' assert.strictEqual Object('test string')search(\string), 5, 'S15.5.4.12_A2_T1' assert.strictEqual Object('test string')search(\String), -1, 'S15.5.4.12_A2_T2' assert.strictEqual Object('test string')search(/String/i), 5, 'S15.5.4.12_A2_T3' assert.strictEqual Object('test string')search(/Four/), -1, 'S15.5.4.12_A2_T4' assert.strictEqual Object('one two three four five')search(/four/), 14, 'S15.5.4.12_A2_T5' assert.strictEqual Object('test string')search(\notexist), -1, 'S15.5.4.12_A2_T6' assert.strictEqual Object('test string probe')search('string pro'), 5, 'S15.5.4.12_A2_T7' aString = Object 'power of the power of the power of the power of the power of the power of the great sword' assert.strictEqual aString.search(/the/), aString.search(/the/g), 'S15.5.4.12_A3_T1' aString = Object 'power \u006F\u0066 the power of the power \u006F\u0066 the power of the power \u006F\u0066 the power of the great sword' assert.strictEqual aString.search(/of/), aString.search(/of/g), 'S15.5.4.12_A3_T2' test 'RegExp#@@search' (assert)-> assert.isFunction /./[Symbol?search] assert.arity /./[Symbol?search], 1 assert.strictEqual /four/[Symbol?search]('one two three four five'), 14 assert.strictEqual /Four/[Symbol?search]('one two three four five'), -1 test '@@search logic' (assert)-> 'use strict' str = if STRICT => \qwe else Object \qwe num = if STRICT => 123 else Object 123 O = {(Symbol?search): -> {value: it}} assert.strictEqual str.search(O)value, str assert.strictEqual ''search.call(num, O)value, num re = /./ re[Symbol?search] = -> {value: it} assert.strictEqual str.search(re)value, str assert.strictEqual ''search.call(num, re)value, num core-js-2.4.1/tests/tests/es6.regexp.split.ls000066400000000000000000001032521274277553300210660ustar00rootroot00000000000000{module, test} = QUnit module \ES6 test 'String#split regression' (assert)-> assert.isFunction ''split assert.arity ''split, 2 assert.name ''split, \split assert.looksNative ''split assert.nonEnumerable String::, \split # based on https://github.com/es-shims/es5-shim/blob/master/tests/spec/s-string.js assert.arrayEqual 'ab'split!, <[ab]>, 'If "separator" is undefined must return Array with one String - "this" string' assert.arrayEqual 'ab'split(void), <[ab]>, 'If "separator" is undefined must return Array with one String - "this" string' assert.arrayEqual 'ab'split(void, 0), [], 'If "separator" is undefined and "limit" set to 0 must return Array[]' assert.arrayEqual ''split!, [''], "''.split() results in ['']" assert.arrayEqual ''split(/./), [''], "''.split(/./) results in ['']" assert.arrayEqual ''split(/.?/), [], "''.split(/.?/) results in []" assert.arrayEqual ''split(/.??/), [], "''.split(/.??/) results in []" assert.arrayEqual 'ab'split(/a*/), ['' \b], "'ab'.split(/a*/) results in ['', 'b']" assert.arrayEqual 'ab'split(/a*?/), <[a b]>, "'ab'.split(/a*?/) results in ['a', 'b']" assert.arrayEqual 'ab'split(/(?:ab)/), ['' ''], "'ab'.split(/(?:ab)/) results in ['', '']" assert.arrayEqual 'ab'split(/(?:ab)*/), ['' ''], "'ab'.split(/(?:ab)*/) results in ['', '']" assert.arrayEqual 'ab'split(/(?:ab)*?/), <[a b]>, "'ab'.split(/(?:ab)*?/) results in ['a', 'b']" assert.arrayEqual 'test'split(''), <[t e s t]>, "'test'.split('') results in ['t', 'e', 's', 't']" assert.arrayEqual 'test'split!, <[test]>, "'test'.split() results in ['test']" assert.arrayEqual '111'split(1), ['' '' '' ''], "'111'.split(1) results in ['', '', '', '']" assert.arrayEqual 'test'split(/(?:)/, 2), <[t e]>, "'test'.split(/(?:)/, 2) results in ['t', 'e']" assert.arrayEqual 'test'split(/(?:)/, -1), <[t e s t]>, "'test'.split(/(?:)/, -1) results in ['t', 'e', 's', 't']" assert.arrayEqual 'test'split(/(?:)/, void), <[t e s t]>, "'test'.split(/(?:)/, undefined) results in ['t', 'e', 's', 't']" assert.arrayEqual 'test'split(/(?:)/, null), [], "'test'.split(/(?:)/, null) results in []" assert.arrayEqual 'test'split(/(?:)/, NaN), [], "'test'.split(/(?:)/, NaN) results in []" assert.arrayEqual 'test'split(/(?:)/, on), <[t]>, "'test'.split(/(?:)/, true) results in ['t']" assert.arrayEqual 'test'split(/(?:)/, '2'), <[t e]>, "'test'.split(/(?:)/, '2') results in ['t', 'e']" assert.arrayEqual 'test'split(/(?:)/, \two), [], "'test'.split(/(?:)/, 'two') results in []" assert.arrayEqual 'a'split(/-/), <[a]>, "'a'.split(/-/) results in ['a']" assert.arrayEqual 'a'split(/-?/), <[a]>, "'a'.split(/-?/) results in ['a']" assert.arrayEqual 'a'split(/-??/), <[a]>, "'a'.split(/-??/) results in ['a']" assert.arrayEqual 'a'split(/a/), ['' ''], "'a'.split(/a/) results in ['', '']" assert.arrayEqual 'a'split(/a?/), ['' ''], "'a'.split(/a?/) results in ['', '']" assert.arrayEqual 'a'split(/a??/), <[a]>, "'a'.split(/a??/) results in ['a']" assert.arrayEqual 'ab'split(/-/), <[ab]>, "'ab'.split(/-/) results in ['ab']" assert.arrayEqual 'ab'split(/-?/), <[a b]>, "'ab'.split(/-?/) results in ['a', 'b']" assert.arrayEqual 'ab'split(/-??/), <[a b]>, "'ab'.split(/-??/) results in ['a', 'b']" assert.arrayEqual 'a-b'split(/-/), <[a b]>, "'a-b'.split(/-/) results in ['a', 'b']" assert.arrayEqual 'a-b'split(/-?/), <[a b]>, "'a-b'.split(/-?/) results in ['a', 'b']" assert.arrayEqual 'a-b'split(/-??/), <[a - b]>, "'a-b'.split(/-??/) results in ['a', '-', 'b']" assert.arrayEqual 'a--b'split(/-/), [\a '' \b], "'a--b'.split(/-/) results in ['a', '', 'b']" assert.arrayEqual 'a--b'split(/-?/), [\a '' \b], "'a--b'.split(/-?/) results in ['a', '', 'b']" assert.arrayEqual 'a--b'split(/-??/), <[a - - b]>, "'a--b'.split(/-??/) results in ['a', '-', '-', 'b']" assert.arrayEqual ''split(/()()/), [], "''.split(/()()/) results in []" assert.arrayEqual '.'split(/()()/), <[.]>, "'.'.split(/()()/) results in ['.']" assert.arrayEqual '.'split(/(.?)(.?)/), ['' '.' '' ''], "'.'.split(/(.?)(.?)/) results in ['', '.', '', '']" assert.arrayEqual '.'split(/(.??)(.??)/), <[.]>, "'.'.split(/(.??)(.??)/) results in ['.']" assert.arrayEqual '.'split(/(.)?(.)?/), ['' '.' void, ''], "'.'.split(/(.)?(.)?/) results in ['', '.', undefined, '']" assert.arrayEqual 'Aboldandcoded'split(/<(\/)?([^<>]+)>/), [\A void, \B \bold '/' \B \and void, \CODE \coded '/' \CODE ''], "'Aboldandcoded'.split(/<(\\/)?([^<>]+)>/) results in ['A', undefined, 'B', 'bold', '/', 'B', 'and', undefined, 'CODE', 'coded', '/', 'CODE', '']" assert.arrayEqual 'tesst'split(/(s)*/), [\t void, \e \s \t], "'tesst'.split(/(s)*/) results in ['t', undefined, 'e', 's', 't']" assert.arrayEqual 'tesst'split(/(s)*?/), [\t void, \e void, \s void, \s void, \t], "'tesst'.split(/(s)*?/) results in ['t', undefined, 'e', undefined, 's', undefined, 's', undefined, 't']" assert.arrayEqual 'tesst'split(/(s*)/), [\t '' \e \ss \t], "'tesst'.split(/(s*)/) results in ['t', '', 'e', 'ss', 't']" assert.arrayEqual 'tesst'split(/(s*?)/), [\t '' \e '' \s '' \s '' \t], "'tesst'.split(/(s*?)/) results in ['t', '', 'e', '', 's', '', 's', '', 't']" assert.arrayEqual 'tesst'split(/(?:s)*/), <[t e t]>, "'tesst'.split(/(?:s)*/) results in ['t', 'e', 't']" assert.arrayEqual 'tesst'split(/(?=s+)/), <[te s st]>, "'tesst'.split(/(?=s+)/) results in ['te', 's', 'st']" assert.arrayEqual 'test'split(\t), ['' \es ''], "'test'.split('t') results in ['', 'es', '']" assert.arrayEqual 'test'split(\es), <[t t]>, "'test'.split('es') results in ['t', 't']" assert.arrayEqual 'test'split(/t/), ['' \es ''], "'test'.split(/t/) results in ['', 'es', '']" assert.arrayEqual 'test'split(/es/), <[t t]>, "'test'.split(/es/) results in ['t', 't']" assert.arrayEqual 'test'split(/(t)/), ['' \t \es \t ''], "'test'.split(/(t)/) results in ['', 't', 'es', 't', '']" assert.arrayEqual 'test'split(/(es)/), <[t es t]>, "'test'.split(/(es)/) results in ['t', 'es', 't']" assert.arrayEqual 'test'split(/(t)(e)(s)(t)/), ['' \t \e \s \t ''], "'test'.split(/(t)(e)(s)(t)/) results in ['', 't', 'e', 's', 't', '']" assert.arrayEqual '.'split(/(((.((.??)))))/), ['' '.' '.' '.' '' '' ''], "'.'.split(/(((.((.??)))))/) results in ['', '.', '.', '.', '', '', '']" assert.arrayEqual '.'split(/(((((.??)))))/), <[.]>, "'.'.split(/(((((.??)))))/) results in ['.']" assert.arrayEqual 'a b c d'split(/ /, -(Math.pow(2 32) - 1)), <[a]>, "'a b c d'.split(\/ \/, -(Math.pow(2, 32) - 1)) results in ['a']" assert.arrayEqual 'a b c d'split(/ /, Math.pow(2, 32) + 1), <[a]>, "'a b c d'.split(\/ \/, Math.pow(2, 32) + 1) results in ['a']" assert.arrayEqual 'a b c d'split(/ /, Infinity), [], "'a b c d'.split(\/ \/, Infinity) results in []" # based on https://github.com/tc39/test262/tree/master/test/built-ins/String/prototype/split instance = Object on instance.split = String::split split = instance.split on, no assert.strictEqual typeof split, \object, 'S15.5.4.14_A1_T1 #1' assert.strictEqual split@@, Array, 'S15.5.4.14_A1_T1 #2' assert.strictEqual split.length, 0, 'S15.5.4.14_A1_T1 #3' instance = Object no instance.split = String::split split = instance.split no, 0, null assert.strictEqual typeof split, \object, 'S15.5.4.14_A1_T2 #1' assert.strictEqual split@@, Array, 'S15.5.4.14_A1_T2 #2' assert.strictEqual split.length, 0, 'S15.5.4.14_A1_T2 #3' split = ''split! assert.strictEqual typeof split, \object, 'S15.5.4.14_A1_T4 #1' assert.strictEqual split@@, Array, 'S15.5.4.14_A1_T4 #2' assert.strictEqual split.length, 1, 'S15.5.4.14_A1_T4 #3' assert.strictEqual split.0, '', 'S15.5.4.14_A1_T4 #4' split = 'gnulluna'split null assert.strictEqual typeof split, \object, 'S15.5.4.14_A1_T5 #1' assert.strictEqual split@@, Array, 'S15.5.4.14_A1_T5 #2' assert.strictEqual split.length, 2, 'S15.5.4.14_A1_T5 #3' assert.strictEqual split.0, \g, 'S15.5.4.14_A1_T5 #4' assert.strictEqual split.1, \una, 'S15.5.4.14_A1_T5 #5' if NATIVE # wrong behavior in some old browsers split = Object(\1undefined)split void assert.strictEqual typeof split, \object, 'S15.5.4.14_A1_T6 #1' assert.strictEqual split@@, Array, 'S15.5.4.14_A1_T6 #2' assert.strictEqual split.length, 1, 'S15.5.4.14_A1_T6 #3' assert.strictEqual split.0, \1undefined, 'S15.5.4.14_A1_T6 #4' split = 'undefinedd'split void assert.strictEqual typeof split, \object, 'S15.5.4.14_A1_T7 #1' assert.strictEqual split@@, Array, 'S15.5.4.14_A1_T7 #2' assert.strictEqual split.length, 1, 'S15.5.4.14_A1_T7 #3' assert.strictEqual split.0, \undefinedd, 'S15.5.4.14_A1_T7 #4' split = String({toString: ->})split void assert.strictEqual typeof split, \object, 'S15.5.4.14_A1_T8 #1' assert.strictEqual split@@, Array, 'S15.5.4.14_A1_T8 #2' assert.strictEqual split.length, 1, 'S15.5.4.14_A1_T8 #3' assert.strictEqual split.0, \undefined, 'S15.5.4.14_A1_T8 #4' split = new String({valueOf: (->), toString: void})split -> assert.strictEqual typeof split, \object, 'S15.5.4.14_A1_T9 #1' assert.strictEqual split@@, Array, 'S15.5.4.14_A1_T9 #2' assert.strictEqual split.length, 1, 'S15.5.4.14_A1_T9 #3' assert.strictEqual split.0, \undefined, 'S15.5.4.14_A1_T9 #4' split = 'ABB\u0041BABAB'split {toString: -> '\u0042B'}, {valueOf: -> on} assert.strictEqual typeof split, \object, 'S15.5.4.14_A1_T10 #1' assert.strictEqual split@@, Array, 'S15.5.4.14_A1_T10 #2' assert.strictEqual split.length, 1, 'S15.5.4.14_A1_T10 #3' assert.strictEqual split.0, \A, 'S15.5.4.14_A1_T10 #4' try 'ABB\u0041BABAB'split {toString: -> '\u0041B'}, {valueOf: throw \intointeger} assert.ok no, 'S15.5.4.14_A1_T11 #1 lead to throwing exception' catch e assert.strictEqual e, \intointeger, 'S15.5.4.14_A1_T11 #2' if NATIVE # wrong behavior in old IE try new String('ABB\u0041BABAB')split {toString: -> '\u0041B'}, {valueOf: (-> {}), toString: -> throw \intointeger} assert.ok no, 'S15.5.4.14_A1_T12 #1 lead to throwing exception' catch e assert.strictEqual e, \intointeger, 'S15.5.4.14_A1_T12 #2' split = 'ABB\u0041BABAB\u0042cc^^\u0042Bvv%%B\u0042xxx'split {toString: -> '\u0042\u0042'}, {valueOf: (-> {}), toString: -> \2} assert.strictEqual typeof split, \object, 'S15.5.4.14_A1_T13 #1' assert.strictEqual split@@, Array, 'S15.5.4.14_A1_T13 #2' assert.strictEqual split.length, 2, 'S15.5.4.14_A1_T13 #3' assert.strictEqual split.0, \A, 'S15.5.4.14_A1_T13 #4' assert.strictEqual split.1, \ABABA, 'S15.5.4.14_A1_T13 #5' if NATIVE # wrong behavior in old IE try instance = Object 10001.10001 instance.split = String::split instance.split {toString: -> throw \intostr}, {valueOf: -> throw \intoint} assert.ok no, 'S15.5.4.14_A1_T14 #1 lead to throwing exception' catch e assert.strictEqual e, \intoint, 'S15.5.4.14_A1_T14 #2' try class F costructor: (@value)-> valueOf: -> ''+@value toString: -> new Number split: String::split new F!split {toString: (-> {}), valueOf: -> throw \intostr}, {valueOf: -> throw \intoint} assert.ok no, 'S15.5.4.14_A1_T15 #1 lead to throwing exception' catch e assert.strictEqual e, \intoint, 'S15.5.4.14_A1_T15 #2' try String::split.call 6776767677.006771122677555, {toString: -> /\u0037\u0037/g} assert.ok no, 'S15.5.4.14_A1_T16 #1 lead to throwing exception' catch e assert.ok e instanceof TypeError, 'S15.5.4.14_A1_T16 #2' split = String::split.call 6776767677.006771122677555, /\u0037\u0037/g assert.strictEqual typeof split, \object, 'S15.5.4.14_A1_T17 #1' assert.strictEqual split@@, Array, 'S15.5.4.14_A1_T17 #2' assert.strictEqual split.length, 4, 'S15.5.4.14_A1_T17 #3' assert.strictEqual split.0, \6, 'S15.5.4.14_A1_T17 #4' assert.strictEqual split.1, \67676, 'S15.5.4.14_A1_T17 #5' assert.strictEqual split.2, '.006', 'S15.5.4.14_A1_T17 #6' assert.strictEqual split.3, \1, 'S15.5.4.14_A1_T17 #7' split = String::split.call 6776767677.006771122677555, /00/, 1 assert.strictEqual typeof split, \object, 'S15.5.4.14_A1_T18 #1' assert.strictEqual split@@, Array, 'S15.5.4.14_A1_T18 #2' assert.strictEqual split.length, 1, 'S15.5.4.14_A1_T18 #3' assert.strictEqual split.0, '6776767677.', 'S15.5.4.14_A1_T18 #4' split = Object('one,two,three,four,five')split \, assert.strictEqual split@@, Array, 'S15.5.4.14_A2_T1 #1' assert.strictEqual split.length, 5, 'S15.5.4.14_A2_T1 #2' assert.strictEqual split.0, \one, 'S15.5.4.14_A2_T1 #3' assert.strictEqual split.1, \two, 'S15.5.4.14_A2_T1 #4' assert.strictEqual split.2, \three, 'S15.5.4.14_A2_T1 #5' assert.strictEqual split.3, \four, 'S15.5.4.14_A2_T1 #6' assert.strictEqual split.4, \five, 'S15.5.4.14_A2_T1 #7' split = Object('one two three four five')split ' ' assert.strictEqual split@@, Array, 'S15.5.4.14_A2_T2 #1' assert.strictEqual split.length, 5, 'S15.5.4.14_A2_T2 #2' assert.strictEqual split.0, \one, 'S15.5.4.14_A2_T2 #3' assert.strictEqual split.1, \two, 'S15.5.4.14_A2_T2 #4' assert.strictEqual split.2, \three, 'S15.5.4.14_A2_T2 #5' assert.strictEqual split.3, \four, 'S15.5.4.14_A2_T2 #6' assert.strictEqual split.4, \five, 'S15.5.4.14_A2_T2 #7' split = Object('one two three four five')split RegExp(' '), 2 assert.strictEqual split@@, Array, 'S15.5.4.14_A2_T3 #1' assert.strictEqual split.length, 2, 'S15.5.4.14_A2_T3 #2' assert.strictEqual split.0, \one, 'S15.5.4.14_A2_T3 #3' assert.strictEqual split.1, \two, 'S15.5.4.14_A2_T3 #4' split = Object('one two three')split '' assert.strictEqual split@@, Array, 'S15.5.4.14_A2_T4 #1' assert.strictEqual split.length, 'one two three'length, 'S15.5.4.14_A2_T4 #2' assert.strictEqual split.0, \o, 'S15.5.4.14_A2_T4 #3' assert.strictEqual split.1, \n, 'S15.5.4.14_A2_T4 #4' assert.strictEqual split.11, \e, 'S15.5.4.14_A2_T4 #5' assert.strictEqual split.12, \e, 'S15.5.4.14_A2_T4 #6' split = Object('one-1,two-2,four-4')split /,/ assert.strictEqual split@@, Array, 'S15.5.4.14_A2_T5 #1' assert.strictEqual split.length, 3, 'S15.5.4.14_A2_T5 #2' assert.strictEqual split.0, 'one-1', 'S15.5.4.14_A2_T5 #3' assert.strictEqual split.1, 'two-2', 'S15.5.4.14_A2_T5 #4' assert.strictEqual split.2, 'four-4', 'S15.5.4.14_A2_T5 #5' string = Object 'one-1 two-2 three-3' split = string.split '' assert.strictEqual split@@, Array, 'S15.5.4.14_A2_T6 #1' assert.strictEqual split.length, string.length, 'S15.5.4.14_A2_T6 #2' for i til split.length assert.strictEqual split[i], string.charAt(i), "S15.5.4.14_A2_T6 #" + (i + 3) if NATIVE # wrong behavior in some old browsers string = 'thisundefinedisundefinedaundefinedstringundefinedobject' split = string.split void assert.strictEqual split@@, Array, 'S15.5.4.14_A2_T7 #1' assert.strictEqual split.length, 1, 'S15.5.4.14_A2_T7 #2' assert.strictEqual split.0, string, 'S15.5.4.14_A2_T7 #3' string = \thisnullisnullanullstringnullobject expected = <[this is a string object]> split = string.split null assert.strictEqual split@@, Array, 'S15.5.4.14_A2_T8 #1' assert.strictEqual split.length, expected.length, 'S15.5.4.14_A2_T8 #2' for i til expected.length assert.strictEqual expected[i], split[i], "S15.5.4.14_A2_T8 #" + (i + 3) string = \thistrueistrueatruestringtrueobject expected = <[this is a string object]> split = string.split true assert.strictEqual split@@, Array, 'S15.5.4.14_A2_T9 #1' assert.strictEqual split.length, expected.length, 'S15.5.4.14_A2_T9 #2' for i til expected.length assert.strictEqual expected[i], split[i], "S15.5.4.14_A2_T9 #" + (i + 3) string = \this123is123a123string123object expected = <[this is a string object]> split = string.split 123 assert.strictEqual split@@, Array, 'S15.5.4.14_A2_T10 #1' assert.strictEqual split.length, expected.length, 'S15.5.4.14_A2_T10 #2' for i til expected.length assert.strictEqual expected[i], split[i], "S15.5.4.14_A2_T10 #" + (i + 3) split = Object('one-1,two-2,four-4')split ':' assert.strictEqual split@@, Array, 'S15.5.4.14_A2_T11 #1' assert.strictEqual split.length, 1, 'S15.5.4.14_A2_T11 #2' assert.strictEqual split.0, 'one-1,two-2,four-4', 'S15.5.4.14_A2_T11 #3' split = Object('one-1 two-2 four-4')split 'r-42' assert.strictEqual split@@, Array, 'S15.5.4.14_A2_T12 #1' assert.strictEqual split.length, 1, 'S15.5.4.14_A2_T12 #2' assert.strictEqual split.0, 'one-1 two-2 four-4', 'S15.5.4.14_A2_T12 #3' split = Object('one-1 two-2 four-4')split '-4' assert.strictEqual split@@, Array, 'S15.5.4.14_A2_T13 #1' assert.strictEqual split.length, 2, 'S15.5.4.14_A2_T13 #2' assert.strictEqual split.0, 'one-1 two-2 four', 'S15.5.4.14_A2_T13 #3' assert.strictEqual split.1, '', 'S15.5.4.14_A2_T13 #4' split = Object('one-1 two-2 four-4')split \on assert.strictEqual split@@, Array, 'S15.5.4.14_A2_T14 #1' assert.strictEqual split.length, 2, 'S15.5.4.14_A2_T14 #2' assert.strictEqual split.0, '', 'S15.5.4.14_A2_T14 #3' assert.strictEqual split.1, 'e-1 two-2 four-4', 'S15.5.4.14_A2_T14 #4' split = new String!split '' assert.strictEqual split@@, Array, 'S15.5.4.14_A2_T15 #1' assert.strictEqual split.length, 0, 'S15.5.4.14_A2_T15 #2' assert.strictEqual split.0, void, 'S15.5.4.14_A2_T15 #3' split = new String!split ' ' assert.strictEqual split@@, Array, 'S15.5.4.14_A2_T16 #1' assert.strictEqual split.length, 1, 'S15.5.4.14_A2_T16 #2' assert.strictEqual split.0, '', 'S15.5.4.14_A2_T16 #3' split = Object(' ')split '' assert.strictEqual split@@, Array, 'S15.5.4.14_A2_T18 #1' assert.strictEqual split.length, 1, 'S15.5.4.14_A2_T18 #2' assert.strictEqual split.0, ' ', 'S15.5.4.14_A2_T18 #3' split = Object(' ')split ' ' assert.strictEqual split@@, Array, 'S15.5.4.14_A2_T19 #1' assert.strictEqual split.length, 2, 'S15.5.4.14_A2_T19 #2' assert.strictEqual split.0, '', 'S15.5.4.14_A2_T19 #3' assert.strictEqual split.1, '', 'S15.5.4.14_A2_T19 #4' split = ''split \x assert.strictEqual split@@, Array, 'S15.5.4.14_A2_T19 #1' assert.strictEqual split.length, 1, 'S15.5.4.14_A2_T19 #2' assert.strictEqual split.0, '', 'S15.5.4.14_A2_T19 #3' string = Object 'one-1 two-2 three-3' split = string.split new RegExp assert.strictEqual split@@, Array, 'S15.5.4.14_A2_T20 #1' assert.strictEqual split.length, string.length, 'S15.5.4.14_A2_T20 #2' for i til split.length assert.strictEqual split[i], string.charAt(i), "S15.5.4.14_A2_T20 #" + (i + 3) split = Object(\hello)split \ll assert.strictEqual split@@, Array, 'S15.5.4.14_A2_T21 #1' assert.strictEqual split.length, 2, 'S15.5.4.14_A2_T21 #2' assert.strictEqual split.0, \he, 'S15.5.4.14_A2_T21 #3' assert.strictEqual split.1, \o, 'S15.5.4.14_A2_T21 #4' split = Object(\hello)split \l assert.strictEqual split@@, Array, 'S15.5.4.14_A2_T22 #1' assert.strictEqual split.length, 3, 'S15.5.4.14_A2_T22 #2' assert.strictEqual split.0, \he, 'S15.5.4.14_A2_T22 #3' assert.strictEqual split.1, '', 'S15.5.4.14_A2_T22 #4' assert.strictEqual split.2, \o, 'S15.5.4.14_A2_T22 #5' split = Object(\hello)split \x assert.strictEqual split@@, Array, 'S15.5.4.14_A2_T23 #1' assert.strictEqual split.length, 1, 'S15.5.4.14_A2_T23 #2' assert.strictEqual split.0, \hello, 'S15.5.4.14_A2_T23 #3' split = Object(\hello)split \h assert.strictEqual split@@, Array, 'S15.5.4.14_A2_T24 #1' assert.strictEqual split.length, 2, 'S15.5.4.14_A2_T24 #2' assert.strictEqual split.0, '', 'S15.5.4.14_A2_T24 #3' assert.strictEqual split.1, \ello, 'S15.5.4.14_A2_T24 #4' split = Object(\hello)split \o assert.strictEqual split@@, Array, 'S15.5.4.14_A2_T25 #1' assert.strictEqual split.length, 2, 'S15.5.4.14_A2_T25 #2' assert.strictEqual split.0, \hell, 'S15.5.4.14_A2_T25 #3' assert.strictEqual split.1, '', 'S15.5.4.14_A2_T25 #4' split = Object(\hello)split \hello assert.strictEqual split@@, Array, 'S15.5.4.14_A2_T26 #1' assert.strictEqual split.length, 2, 'S15.5.4.14_A2_T26 #2' assert.strictEqual split.0, '', 'S15.5.4.14_A2_T26 #3' assert.strictEqual split.1, '', 'S15.5.4.14_A2_T26 #4' split = Object(\hello)split void assert.strictEqual split@@, Array, 'S15.5.4.14_A2_T27 #1' assert.strictEqual split.length, 1, 'S15.5.4.14_A2_T27 #2' assert.strictEqual split.0, \hello, 'S15.5.4.14_A2_T27 #3' split = Object(\hello)split \hellothere assert.strictEqual split@@, Array, 'S15.5.4.14_A2_T28 #1' assert.strictEqual split.length, 1, 'S15.5.4.14_A2_T28 #2' assert.strictEqual split.0, \hello, 'S15.5.4.14_A2_T28 #3' instance = Object 100111122133144155 instance.split = String::split split = instance.split 1 expected = ['' \00 '' '' '' \22 \33 \44 \60] assert.strictEqual split@@, Array, 'S15.5.4.14_A2_T29 #1' assert.strictEqual split.length, expected.length, 'S15.5.4.14_A2_T29 #2' for i til expected.length assert.strictEqual expected[i], split[i], "S15.5.4.14_A2_T29 #" + (i + 3) instance = Object 100111122133144155 instance.split = String::split split = instance.split 1 1 expected = [''] assert.strictEqual split@@, Array, 'S15.5.4.14_A2_T30 #1' assert.strictEqual split.length, expected.length, 'S15.5.4.14_A2_T30 #2' for i til expected.length assert.strictEqual expected[i], split[i], "S15.5.4.14_A2_T30 #" + (i + 3) instance = Object 100111122133144155 instance.split = String::split split = instance.split 1 2 expected = ['' \00] assert.strictEqual split@@, Array, 'S15.5.4.14_A2_T31 #1' assert.strictEqual split.length, expected.length, 'S15.5.4.14_A2_T31 #2' for i til expected.length assert.strictEqual expected[i], split[i], "S15.5.4.14_A2_T31 #" + (i + 3) instance = Object 100111122133144155 instance.split = String::split split = instance.split 1 0 assert.strictEqual split@@, Array, 'S15.5.4.14_A2_T32 #1' assert.strictEqual split.length, 0, 'S15.5.4.14_A2_T32 #2' instance = Object 100111122133144155 instance.split = String::split split = instance.split 1 100 expected = ['' \00 '' '' '' \22 \33 \44 \60] assert.strictEqual split@@, Array, 'S15.5.4.14_A2_T33 #1' assert.strictEqual split.length, expected.length, 'S15.5.4.14_A2_T33 #2' for i til expected.length assert.strictEqual expected[i], split[i], "S15.5.4.14_A2_T33 #" + (i + 3) instance = Object 100111122133144155 instance.split = String::split split = instance.split 1 void expected = ['' \00 '' '' '' \22 \33 \44 \60] assert.strictEqual split@@, Array, 'S15.5.4.14_A2_T34 #1' assert.strictEqual split.length, expected.length, 'S15.5.4.14_A2_T34 #2' for i til expected.length assert.strictEqual expected[i], split[i], "S15.5.4.14_A2_T34 #" + (i + 3) instance = Object 100111122133144155 instance.split = String::split split = instance.split 1 Math.pow(2 32) - 1 expected = ['' \00 '' '' '' \22 \33 \44 \60] assert.strictEqual split@@, Array, 'S15.5.4.14_A2_T35 #1' assert.strictEqual split.length, expected.length, 'S15.5.4.14_A2_T35 #2' for i til expected.length assert.strictEqual expected[i], split[i], "S15.5.4.14_A2_T35 #" + (i + 3) instance = Object 100111122133144155 instance.split = String::split split = instance.split 1 \boo assert.strictEqual split@@, Array, 'S15.5.4.14_A2_T36 #1' assert.strictEqual split.length, 0, 'S15.5.4.14_A2_T36 #2' instance = Object 100111122133144155 instance.split = String::split split = instance.split 1, -Math.pow(2 32) + 1 assert.strictEqual split@@, Array, 'S15.5.4.14_A2_T37 #1' assert.arrayEqual split, [''], 'S15.5.4.14_A2_T37 #2' instance = Object 100111122133144155 instance.split = String::split split = instance.split 1 NaN assert.strictEqual split@@, Array, 'S15.5.4.14_A2_T38 #1' assert.strictEqual split.length, 0, 'S15.5.4.14_A2_T38 #2' instance = Object(\hello)split \l 0 assert.strictEqual split@@, Array, 'S15.5.4.14_A2_T39 #1' assert.strictEqual split.length, 0, 'S15.5.4.14_A2_T39 #2' split = Object(\hello)split \l 1 assert.strictEqual split@@, Array, 'S15.5.4.14_A2_T40 #1' assert.strictEqual split.length, 1, 'S15.5.4.14_A2_T40 #2' assert.strictEqual split.0, \he, 'S15.5.4.14_A2_T40 #3' split = Object(\hello)split \l 2 expected = [\he ''] assert.strictEqual split@@, Array, 'S15.5.4.14_A2_T41 #1' assert.strictEqual split.length, expected.length, 'S15.5.4.14_A2_T41 #2' for i til expected.length assert.strictEqual expected[i], split[i], "S15.5.4.14_A2_T41 #" + (i + 3) split = Object(\hello)split \l 3 expected = [\he '' \o] assert.strictEqual split@@, Array, 'S15.5.4.14_A2_T42 #1' assert.strictEqual split.length, expected.length, 'S15.5.4.14_A2_T42 #2' for i til expected.length assert.strictEqual expected[i], split[i], "S15.5.4.14_A2_T42 #" + (i + 3) split = Object(\hello)split \l 4 expected = [\he '' \o] assert.strictEqual split@@, Array, 'S15.5.4.14_A2_T43 #1' assert.strictEqual split.length, expected.length, 'S15.5.4.14_A2_T43 #2' for i til expected.length assert.strictEqual expected[i], split[i], "S15.5.4.14_A2_T43 #" + (i + 3) split = Object('one,two,three,four,five')split! assert.strictEqual split@@, Array, 'S15.5.4.14_A3_T1 #1' assert.strictEqual split.length, 1, 'S15.5.4.14_A3_T1 #2' assert.strictEqual split.0, 'one,two,three,four,five', 'S15.5.4.14_A3_T1 #3' split = String::split.call {} assert.strictEqual split@@, Array, 'S15.5.4.14_A3_T2 #1' assert.strictEqual split.length, 1, 'S15.5.4.14_A3_T2 #2' assert.strictEqual split.0, '[object Object]', 'S15.5.4.14_A3_T2 #3' split = String::split.call {toString: -> 'function(){}'} assert.strictEqual split@@, Array, 'S15.5.4.14_A3_T3 #1' assert.strictEqual split.length, 1, 'S15.5.4.14_A3_T3 #2' assert.strictEqual split.0, 'function(){}', 'S15.5.4.14_A3_T3 #3' split = String::split.call Object NaN assert.strictEqual split@@, Array, 'S15.5.4.14_A3_T4 #1' assert.strictEqual split.length, 1, 'S15.5.4.14_A3_T4 #2' assert.strictEqual split.0, \NaN, 'S15.5.4.14_A3_T4 #3' split = String::split.call Object -1234567890 assert.strictEqual split@@, Array, 'S15.5.4.14_A3_T5 #1' assert.strictEqual split.length, 1, 'S15.5.4.14_A3_T5 #2' assert.strictEqual split.0, '-1234567890', 'S15.5.4.14_A3_T5 #3' instance = Object -1e21 split = String::split.call instance assert.strictEqual split@@, Array, 'S15.5.4.14_A3_T6 #1' assert.strictEqual split.length, 1, 'S15.5.4.14_A3_T6 #2' assert.strictEqual split.0, instance.toString!, 'S15.5.4.14_A3_T6 #3' split = String::split.call Math assert.strictEqual split@@, Array, 'S15.5.4.14_A3_T7 #1' assert.strictEqual split.length, 1, 'S15.5.4.14_A3_T7 #2' assert.strictEqual split.0, '[object Math]', 'S15.5.4.14_A3_T7 #3' split = String::split.call [1 2 3 4 5] assert.strictEqual split@@, Array, 'S15.5.4.14_A3_T8 #1' assert.strictEqual split.length, 1, 'S15.5.4.14_A3_T8 #2' assert.strictEqual split.0, '1,2,3,4,5', 'S15.5.4.14_A3_T8 #3' split = String::split.call Object no assert.strictEqual split@@, Array, 'S15.5.4.14_A3_T9 #1' assert.strictEqual split.length, 1, 'S15.5.4.14_A3_T9 #2' assert.strictEqual split.0, \false, 'S15.5.4.14_A3_T9 #3' split = String::split.call new String assert.strictEqual split@@, Array, 'S15.5.4.14_A3_T10 #1' assert.strictEqual split.length, 1, 'S15.5.4.14_A3_T10 #2' assert.strictEqual split.0, '', 'S15.5.4.14_A3_T10 #3' split = String::split.call Object ' ' assert.strictEqual split@@, Array, 'S15.5.4.14_A3_T11 #1' assert.strictEqual split.length, 1, 'S15.5.4.14_A3_T11 #2' assert.strictEqual split.0, ' ', 'S15.5.4.14_A3_T11 #3' if NATIVE # wrong behavior in old IE split = Object(\hello)split /l/ assert.strictEqual split@@, Array, 'S15.5.4.14_A4_T1 #1' assert.strictEqual split.length, 3, 'S15.5.4.14_A4_T1 #2' assert.strictEqual split.0, 'he', 'S15.5.4.14_A4_T1 #3' assert.strictEqual split.1, '', 'S15.5.4.14_A4_T1 #4' assert.strictEqual split.2, 'o', 'S15.5.4.14_A4_T1 #5' split = Object(\hello)split /l/, 0 assert.strictEqual split@@, Array, 'S15.5.4.14_A4_T2 #1' assert.strictEqual split.length, 0, 'S15.5.4.14_A4_T2 #2' split = Object(\hello)split /l/, 1 assert.strictEqual split@@, Array, 'S15.5.4.14_A4_T3 #1' assert.strictEqual split.length, 1, 'S15.5.4.14_A4_T3 #2' assert.strictEqual split.0, 'he', 'S15.5.4.14_A4_T3 #3' if NATIVE # wrong behavior in old IE split = Object(\hello)split /l/, 2 assert.strictEqual split@@, Array, 'S15.5.4.14_A4_T4 #1' assert.strictEqual split.length, 2, 'S15.5.4.14_A4_T4 #2' assert.strictEqual split.0, 'he', 'S15.5.4.14_A4_T4 #3' assert.strictEqual split.1, '', 'S15.5.4.14_A4_T4 #4' split = Object(\hello)split /l/, 3 assert.strictEqual split@@, Array, 'S15.5.4.14_A4_T5 #1' assert.strictEqual split.length, 3, 'S15.5.4.14_A4_T5 #2' assert.strictEqual split.0, 'he', 'S15.5.4.14_A4_T5 #3' assert.strictEqual split.1, '', 'S15.5.4.14_A4_T5 #4' assert.strictEqual split.2, 'o', 'S15.5.4.14_A4_T5 #5' split = Object(\hello)split /l/, 4 assert.strictEqual split@@, Array, 'S15.5.4.14_A4_T6 #1' assert.strictEqual split.length, 3, 'S15.5.4.14_A4_T6 #2' assert.strictEqual split.0, 'he', 'S15.5.4.14_A4_T6 #3' assert.strictEqual split.1, '', 'S15.5.4.14_A4_T6 #4' assert.strictEqual split.2, 'o', 'S15.5.4.14_A4_T6 #5' split = Object(\hello)split /l/, void assert.strictEqual split@@, Array, 'S15.5.4.14_A4_T7 #1' assert.strictEqual split.length, 3, 'S15.5.4.14_A4_T7 #2' assert.strictEqual split.0, 'he', 'S15.5.4.14_A4_T7 #3' assert.strictEqual split.1, '', 'S15.5.4.14_A4_T7 #4' assert.strictEqual split.2, 'o', 'S15.5.4.14_A4_T7 #5' split = Object(\hello)split /l/, \hi assert.strictEqual split@@, Array, 'S15.5.4.14_A4_T8 #1' assert.strictEqual split.length, 0, 'S15.5.4.14_A4_T8 #2' split = Object(\hello)split new RegExp expected = <[h e l l o]> assert.strictEqual split@@, Array, 'S15.5.4.14_A4_T10 #1' assert.strictEqual split.length, expected.length, 'S15.5.4.14_A4_T10 #2' for i til expected.length assert.strictEqual expected[i], split[i], "S15.5.4.14_A4_T10 #" + (i + 3) split = Object(\hello)split new RegExp!, 0 assert.strictEqual split@@, Array, 'S15.5.4.14_A4_T11 #1' assert.strictEqual split.length, 0, 'S15.5.4.14_A4_T11 #2' split = Object(\hello)split new RegExp!, 1 assert.strictEqual split@@, Array, 'S15.5.4.14_A4_T12 #1' assert.strictEqual split.length, 1, 'S15.5.4.14_A4_T12 #2' assert.strictEqual split.0, \h, 'S15.5.4.14_A4_T12 #3' split = Object(\hello)split new RegExp!, 2 expected = <[h e]> assert.strictEqual split@@, Array, 'S15.5.4.14_A4_T13 #1' assert.strictEqual split.length, expected.length, 'S15.5.4.14_A4_T13 #2' for i til expected.length assert.strictEqual expected[i], split[i], "S15.5.4.14_A4_T13 #" + (i + 3) split = Object(\hello)split new RegExp!, 3 expected = <[h e l]> assert.strictEqual split@@, Array, 'S15.5.4.14_A4_T14 #1' assert.strictEqual split.length, expected.length, 'S15.5.4.14_A4_T14 #2' for i til expected.length assert.strictEqual expected[i], split[i], "S15.5.4.14_A4_T14 #" + (i + 3) split = Object(\hello)split new RegExp!, 4 expected = <[h e l l]> assert.strictEqual split@@, Array, 'S15.5.4.14_A4_T15 #1' assert.strictEqual split.length, expected.length, 'S15.5.4.14_A4_T15 #2' for i til expected.length assert.strictEqual expected[i], split[i], "S15.5.4.14_A4_T15 #" + (i + 3) split = Object(\hello)split new RegExp!, void expected = <[h e l l o]> assert.strictEqual split@@, Array, 'S15.5.4.14_A4_T16 #1' assert.strictEqual split.length, expected.length, 'S15.5.4.14_A4_T16 #2' for i til expected.length assert.strictEqual expected[i], split[i], "S15.5.4.14_A4_T16 #" + (i + 3) split = Object(\hello)split new RegExp!, \hi assert.strictEqual split@@, Array, 'S15.5.4.14_A4_T18 #1' assert.strictEqual split.length, 0, 'S15.5.4.14_A4_T18 #2' split = Object('a b c de f')split /\s/ expected = <[a b c de f]> assert.strictEqual split@@, Array, 'S15.5.4.14_A4_T19 #1' assert.strictEqual split.length, expected.length, 'S15.5.4.14_A4_T19 #2' for i til expected.length assert.strictEqual expected[i], split[i], "S15.5.4.14_A4_T19 #" + (i + 3) split = Object('a b c de f')split /\s/, 3 expected = <[a b c]> assert.strictEqual split@@, Array, 'S15.5.4.14_A4_T20 #1' assert.strictEqual split.length, expected.length, 'S15.5.4.14_A4_T20 #2' for i til expected.length assert.strictEqual expected[i], split[i], "S15.5.4.14_A4_T20 #" + (i + 3) split = Object('a b c de f')split /X/ assert.strictEqual split@@, Array, 'S15.5.4.14_A4_T21 #1' assert.strictEqual split.length, 1, 'S15.5.4.14_A4_T21 #2' assert.strictEqual split.0, 'a b c de f', "S15.5.4.14_A4_T21 #3" split = Object('dfe23iu 34 =+65--')split /\d+/ expected = ['dfe' 'iu ' ' =+' '--'] assert.strictEqual split@@, Array, 'S15.5.4.14_A4_T22 #1' assert.strictEqual split.length, expected.length, 'S15.5.4.14_A4_T22 #2' for i til expected.length assert.strictEqual expected[i], split[i], "S15.5.4.14_A4_T22 #" + (i + 3) if NATIVE # wrong behavior in old IE split = Object(\abc)split /[a-z]/ expected = ['' '' '' ''] assert.strictEqual split@@, Array, 'S15.5.4.14_A4_T24 #1' assert.strictEqual split.length, expected.length, 'S15.5.4.14_A4_T24 #2' for i til expected.length assert.strictEqual expected[i], split[i], "S15.5.4.14_A4_T24 #" + (i + 3) test 'RegExp#@@split' (assert)-> assert.isFunction /./[Symbol?split] assert.arity /./[Symbol?split], 2 assert.strictEqual /\s/[Symbol?split]('a b c de f').length, 5 assert.strictEqual /\s/[Symbol?split]('a b c de f' void).length, 5 assert.strictEqual /\s/[Symbol?split]('a b c de f' 1).length, 1 assert.strictEqual /\s/[Symbol?split]('a b c de f' 10).length, 5 test '@@split logic' (assert)-> 'use strict' str = if STRICT => \qwe else Object \qwe num = if STRICT => 123 else Object 123 O = {(Symbol?split): (a, b)-> {a, b}} assert.strictEqual str.split(O, 42)a, str assert.strictEqual str.split(O, 42)b, 42 assert.strictEqual ''split.call(num, O, 42)a, num assert.strictEqual ''split.call(num, O, 42)b, 42 re = /./ re[Symbol?split] = (a, b)-> {a, b} assert.strictEqual str.split(re, 42)a, str assert.strictEqual str.split(re, 42)b, 42 assert.strictEqual ''split.call(num, re, 42)a, num assert.strictEqual ''split.call(num, re, 42)b, 42core-js-2.4.1/tests/tests/es6.regexp.to-string.ls000066400000000000000000000021451274277553300216600ustar00rootroot00000000000000{module, test} = QUnit module \ES6 test 'RegExp#toString' (assert)!-> {toString} = /./ assert.isFunction toString assert.arity toString, 0 assert.name toString, \toString assert.looksNative toString assert.nonEnumerable RegExp::, \toString assert.same String(/pattern/), '/pattern/' assert.same String(/pattern/i), '/pattern/i' assert.same String(/pattern/mi), '/pattern/im' assert.same String(/pattern/im), '/pattern/im' assert.same String(/pattern/mgi), '/pattern/gim' assert.same String(new RegExp \pattern), '/pattern/' assert.same String(new RegExp \pattern \i), '/pattern/i' assert.same String(new RegExp \pattern \mi), '/pattern/im' assert.same String(new RegExp \pattern \im), '/pattern/im' assert.same String(new RegExp \pattern \mgi), '/pattern/gim' assert.same toString.call(source: \foo, flags: \bar), '/foo/bar' assert.same toString.call({}), '/undefined/undefined' if STRICT assert.throws !-> toString.call 7 assert.throws !-> toString.call \a assert.throws !-> toString.call no assert.throws !-> toString.call null assert.throws !-> toString.call voidcore-js-2.4.1/tests/tests/es6.set.ls000066400000000000000000000221611274277553300172340ustar00rootroot00000000000000{module, test} = QUnit module \ES6 same = (a, b)-> if a is b => a isnt 0 or 1 / a is 1 / b else a !~= a and b !~= b {getOwnPropertyDescriptor, freeze} = Object test 'Set' (assert)!-> assert.isFunction Set assert.name Set, \Set assert.arity Set, 0 assert.looksNative Set assert.ok \add of Set::, 'add in Set.prototype' assert.ok \clear of Set::, 'clear in Set.prototype' assert.ok \delete of Set::, 'delete in Set.prototype' assert.ok \has of Set::, 'has in Set.prototype' assert.ok new Set instanceof Set, 'new Set instanceof Set' assert.strictEqual new Set(createIterable [1 2 3]).size, 3, 'Init from iterable' assert.strictEqual (new Set! ..add freeze({}) ..add 1 ).size, 2, 'Support frozen objects' S = new Set! ..add 1 ..add 2 ..add 3 ..add 2 ..add 1 assert.strictEqual S.size, 3 r = [] S.forEach (v)!-> r.push v assert.deepEqual r, [1 2 3] assert.strictEqual (new Set! ..add NaN ..add NaN ..add NaN )size, 1 if Array.from => assert.deepEqual Array.from((new Set([3 4]) ..add 2 ..add 1 )), [3 4 2 1] # return #throw done = no iter = createIterable [null, 1, 2], return: -> done := on _add = Set::add Set::add = -> throw 42 try => new Set iter Set::add = _add assert.ok done, '.return #throw' # call @@iterator in Array with custom iterator a = [] done = no a[Symbol?iterator] = -> done := on [][Symbol?iterator]call @ new Set a assert.ok done o = {} new Set!add o if DESCRIPTORS assert.arrayEqual [key for key of o], [] assert.arrayEqual Object.keys(o), [] assert.arrayEqual Object.getOwnPropertyNames(o), [] Object?getOwnPropertySymbols and assert.arrayEqual Object.getOwnPropertySymbols(o), [] Reflect?ownKeys and assert.arrayEqual Reflect.ownKeys(o), [] if nativeSubclass C = nativeSubclass Set assert.ok new C instanceof C, 'correct subclassing with native classes #1' assert.ok new C instanceof Set, 'correct subclassing with native classes #2' assert.ok new C!add(2).has(2), 'correct subclassing with native classes #3' test 'Set#add' (assert)!-> assert.isFunction Set::add assert.name Set::add, \add assert.arity Set::add, 1 assert.looksNative Set::add assert.nonEnumerable Set::, \add a = [] S = new Set! ..add NaN ..add 2 ..add 3 ..add 2 ..add 1 ..add a assert.strictEqual S.size, 5 chain = S.add NaN assert.strictEqual chain, S assert.strictEqual S.size, 5 S.add 2 assert.strictEqual S.size, 5 S.add a assert.strictEqual S.size, 5 S.add [] assert.strictEqual S.size, 6 S.add 4 assert.strictEqual S.size, 7 S = new Set! ..add freeze f = {} assert.ok S.has f test 'Set#clear' (assert)!-> assert.isFunction Set::clear assert.name Set::clear, \clear assert.arity Set::clear, 0 assert.looksNative Set::clear assert.nonEnumerable Set::, \clear S = new Set S.clear! assert.strictEqual S.size, 0 S = new Set! ..add 1 ..add 2 ..add 3 ..add 2 ..add 1 S.clear! assert.strictEqual S.size, 0 assert.ok !S.has 1 assert.ok !S.has 2 assert.ok !S.has 3 S = new Set! ..add 1 ..add f = freeze {} S.clear! assert.strictEqual S.size, 0, 'Support frozen objects' assert.ok !S.has 1 assert.ok !S.has f test 'Set#delete' (assert)!-> assert.isFunction Set::delete NATIVE and assert.name Set::delete, \delete # can't be polyfilled in some environments assert.arity Set::delete, 1 assert.looksNative Set::delete assert.nonEnumerable Set::, \delete a = [] S = new Set! ..add NaN ..add 2 ..add 3 ..add 2 ..add 1 ..add a assert.strictEqual S.size, 5 assert.strictEqual S.delete(NaN), on assert.strictEqual S.size, 4 assert.strictEqual S.delete(4), no assert.strictEqual S.size, 4 S.delete [] assert.strictEqual S.size, 4 S.delete a assert.strictEqual S.size, 3 S.add freeze f = {} assert.strictEqual S.size, 4 S.delete f assert.strictEqual S.size, 3 test 'Set#forEach' (assert)!-> assert.isFunction Set::forEach assert.name Set::forEach, \forEach assert.arity Set::forEach, 1 assert.looksNative Set::forEach assert.nonEnumerable Set::, \forEach r = [] count = 0 S = new Set! ..add 1 ..add 2 ..add 3 ..add 2 ..add 1 S.forEach (value)!-> count++ r.push value assert.strictEqual count, 3 assert.deepEqual r, [1 2 3] set = new Set! ..add \0 ..add \1 ..add \2 ..add \3 s = ""; set.forEach -> s += it; if it is \2 set.delete \2 set.delete \3 set.delete \1 set.add \4 assert.strictEqual s, \0124 set = new Set! ..add \0 s = ""; set.forEach -> set.delete \0 if s isnt '' => throw '!!!' s += it assert.strictEqual s, \0 assert.throws (!-> Set::forEach.call new Map, !->), 'non-generic' test 'Set#has' (assert)!-> assert.isFunction Set::has assert.name Set::has, \has assert.arity Set::has, 1 assert.looksNative Set::has assert.nonEnumerable Set::, \has a = [] f = freeze {} S = new Set! ..add NaN ..add 2 ..add 3 ..add 2 ..add 1 ..add f ..add a assert.ok S.has NaN assert.ok S.has a assert.ok S.has f assert.ok S.has 2 assert.ok not S.has 4 assert.ok not S.has [] test 'Set#size' (assert)!-> assert.nonEnumerable Set::, \size size = (new Set! ..add 1 )size assert.strictEqual typeof size, \number, 'size is number' assert.strictEqual size, 1, 'size is correct' if DESCRIPTORS sizeDesc = getOwnPropertyDescriptor Set::, \size assert.ok sizeDesc && sizeDesc.get, 'size is getter' assert.ok sizeDesc && !sizeDesc.set, 'size isnt setter' assert.throws (-> Set::size), TypeError test 'Set & -0' (assert)!-> set = new Set set.add -0 assert.strictEqual set.size, 1 assert.ok set.has 0 assert.ok set.has -0 set.forEach (it)-> assert.ok !same it, -0 set.delete -0 assert.strictEqual set.size, 0 set = new Set! ..add -0 set.forEach (key)-> assert.ok !same key, -0 set = new Set! ..add 4 ..add 3 ..add 2 ..add 1 ..add 0 assert.ok set.has -0 test 'Set#@@toStringTag' (assert)!-> assert.strictEqual Set::[Symbol?toStringTag], \Set, 'Set::@@toStringTag is `Set`' test 'Set Iterator' (assert)!-> set = new Set! ..add \a ..add \b ..add \c ..add \d keys = [] iterator = set.keys! keys.push iterator.next!value assert.ok set.delete \a assert.ok set.delete \b assert.ok set.delete \c set.add \e keys.push iterator.next!value keys.push iterator.next!value assert.ok iterator.next!done set.add \f assert.ok iterator.next!done assert.deepEqual keys, <[a d e]> test 'Set#keys' (assert)!-> assert.ok typeof Set::keys is \function, 'is function' assert.name Set::keys, \values assert.arity Set::keys, 0 assert.looksNative Set::keys assert.strictEqual Set::keys, Set::values assert.nonEnumerable Set::, \keys iter = (new Set! ..add \q ..add \w ..add \e )keys! assert.isIterator iter assert.isIterable iter assert.strictEqual iter[Symbol?toStringTag], 'Set Iterator' assert.deepEqual iter.next!, {value: \q, done: no} assert.deepEqual iter.next!, {value: \w, done: no} assert.deepEqual iter.next!, {value: \e, done: no} assert.deepEqual iter.next!, {value: void, done: on} test 'Set#values' (assert)!-> assert.ok typeof Set::values is \function, 'is function' assert.name Set::values, \values assert.arity Set::values, 0 assert.looksNative Set::values assert.nonEnumerable Set::, \values iter = (new Set! ..add \q ..add \w ..add \e )values! assert.isIterator iter assert.isIterable iter assert.strictEqual iter[Symbol?toStringTag], 'Set Iterator' assert.deepEqual iter.next!, {value: \q, done: no} assert.deepEqual iter.next!, {value: \w, done: no} assert.deepEqual iter.next!, {value: \e, done: no} assert.deepEqual iter.next!, {value: void, done: on} test 'Set#entries' (assert)!-> assert.ok typeof Set::entries is \function, 'is function' assert.name Set::entries, \entries assert.arity Set::entries, 0 assert.looksNative Set::entries assert.nonEnumerable Set::, \entries iter = (new Set! ..add \q ..add \w ..add \e )entries! assert.isIterator iter assert.isIterable iter assert.strictEqual iter[Symbol?toStringTag], 'Set Iterator' assert.deepEqual iter.next!, {value: [\q \q], done: no} assert.deepEqual iter.next!, {value: [\w \w], done: no} assert.deepEqual iter.next!, {value: [\e \e], done: no} assert.deepEqual iter.next!, {value: void, done: on} test 'Set#@@iterator' (assert)!-> assert.isIterable Set:: assert.name Set::[Symbol?iterator], \values assert.arity Set::[Symbol?iterator], 0 assert.looksNative Set::[Symbol?iterator] assert.strictEqual Set::[Symbol?iterator], Set::values assert.nonEnumerable Set::, \values iter = (new Set! ..add \q ..add \w ..add \e )[Symbol?iterator]! assert.isIterator iter assert.isIterable iter assert.strictEqual iter[Symbol?toStringTag], 'Set Iterator' assert.deepEqual iter.next!, {value: \q, done: no} assert.deepEqual iter.next!, {value: \w, done: no} assert.deepEqual iter.next!, {value: \e, done: no} assert.deepEqual iter.next!, {value: void, done: on}core-js-2.4.1/tests/tests/es6.string.anchor.ls000066400000000000000000000006011274277553300212130ustar00rootroot00000000000000{module, test} = QUnit module \ES6 test 'String#anchor' (assert)!-> assert.isFunction String::anchor assert.arity String::anchor, 1 assert.name String::anchor, \anchor assert.looksNative String::anchor assert.nonEnumerable String::, \anchor assert.same 'a'anchor(\b), 'a', 'lower case' assert.same 'a'anchor(\"), 'a', 'escape quotes'core-js-2.4.1/tests/tests/es6.string.big.ls000066400000000000000000000004321274277553300205040ustar00rootroot00000000000000{module, test} = QUnit module \ES6 test 'String#big' (assert)!-> assert.isFunction String::big assert.arity String::big, 0 assert.name String::big, \big assert.looksNative String::big assert.nonEnumerable String::, \big assert.same 'a'big!, 'a', 'lower case'core-js-2.4.1/tests/tests/es6.string.blink.ls000066400000000000000000000004561274277553300210500ustar00rootroot00000000000000{module, test} = QUnit module \ES6 test 'String#blink' (assert)!-> assert.isFunction String::blink assert.arity String::blink, 0 assert.name String::blink, \blink assert.looksNative String::blink assert.nonEnumerable String::, \blink assert.same 'a'blink!, 'a', 'lower case'core-js-2.4.1/tests/tests/es6.string.bold.ls000066400000000000000000000004361274277553300206670ustar00rootroot00000000000000{module, test} = QUnit module \ES6 test 'String#bold' (assert)!-> assert.isFunction String::bold assert.arity String::bold, 0 assert.name String::bold, \bold assert.looksNative String::bold assert.nonEnumerable String::, \bold assert.same 'a'bold!, 'a', 'lower case'core-js-2.4.1/tests/tests/es6.string.code-point-at.ls000066400000000000000000000066501274277553300224160ustar00rootroot00000000000000{module, test} = QUnit module \ES6 test 'String#codePointAt' (assert)!-> assert.isFunction String::codePointAt assert.arity String::codePointAt, 1 assert.name String::codePointAt, \codePointAt assert.looksNative String::codePointAt assert.nonEnumerable String::, \codePointAt # tests from https://github.com/mathiasbynens/String.prototype.codePointAt/blob/master/tests/tests.js assert.strictEqual 'abc\uD834\uDF06def'codePointAt(''), 0x61 assert.strictEqual 'abc\uD834\uDF06def'codePointAt(\_), 0x61 assert.strictEqual 'abc\uD834\uDF06def'codePointAt!, 0x61 assert.strictEqual 'abc\uD834\uDF06def'codePointAt(-Infinity), void assert.strictEqual 'abc\uD834\uDF06def'codePointAt(-1), void assert.strictEqual 'abc\uD834\uDF06def'codePointAt(-0), 0x61 assert.strictEqual 'abc\uD834\uDF06def'codePointAt(0), 0x61 assert.strictEqual 'abc\uD834\uDF06def'codePointAt(3), 0x1D306 assert.strictEqual 'abc\uD834\uDF06def'codePointAt(4), 0xDF06 assert.strictEqual 'abc\uD834\uDF06def'codePointAt(5), 0x64 assert.strictEqual 'abc\uD834\uDF06def'codePointAt(42), void assert.strictEqual 'abc\uD834\uDF06def'codePointAt(Infinity), void assert.strictEqual 'abc\uD834\uDF06def'codePointAt(Infinity), void assert.strictEqual 'abc\uD834\uDF06def'codePointAt(NaN), 0x61 assert.strictEqual 'abc\uD834\uDF06def'codePointAt(no), 0x61 assert.strictEqual 'abc\uD834\uDF06def'codePointAt(null), 0x61 assert.strictEqual 'abc\uD834\uDF06def'codePointAt(void), 0x61 assert.strictEqual '\uD834\uDF06def'codePointAt(''), 0x1D306 assert.strictEqual '\uD834\uDF06def'codePointAt(\1), 0xDF06 assert.strictEqual '\uD834\uDF06def'codePointAt(\_), 0x1D306 assert.strictEqual '\uD834\uDF06def'codePointAt!, 0x1D306 assert.strictEqual '\uD834\uDF06def'codePointAt(-1), void assert.strictEqual '\uD834\uDF06def'codePointAt(-0), 0x1D306 assert.strictEqual '\uD834\uDF06def'codePointAt(0), 0x1D306 assert.strictEqual '\uD834\uDF06def'codePointAt(1), 0xDF06 assert.strictEqual '\uD834\uDF06def'codePointAt(42), void assert.strictEqual '\uD834\uDF06def'codePointAt(no), 0x1D306 assert.strictEqual '\uD834\uDF06def'codePointAt(null), 0x1D306 assert.strictEqual '\uD834\uDF06def'codePointAt(void), 0x1D306 assert.strictEqual '\uD834abc'codePointAt(''), 0xD834 assert.strictEqual '\uD834abc'codePointAt(\_), 0xD834 assert.strictEqual '\uD834abc'codePointAt!, 0xD834 assert.strictEqual '\uD834abc'codePointAt(-1), void assert.strictEqual '\uD834abc'codePointAt(-0), 0xD834 assert.strictEqual '\uD834abc'codePointAt(0), 0xD834 assert.strictEqual '\uD834abc'codePointAt(no), 0xD834 assert.strictEqual '\uD834abc'codePointAt(NaN), 0xD834 assert.strictEqual '\uD834abc'codePointAt(null), 0xD834 assert.strictEqual '\uD834abc'codePointAt(void), 0xD834 assert.strictEqual '\uDF06abc'codePointAt(''), 0xDF06 assert.strictEqual '\uDF06abc'codePointAt(\_), 0xDF06 assert.strictEqual '\uDF06abc'codePointAt!, 0xDF06 assert.strictEqual '\uDF06abc'codePointAt(-1), void assert.strictEqual '\uDF06abc'codePointAt(-0), 0xDF06 assert.strictEqual '\uDF06abc'codePointAt(0), 0xDF06 assert.strictEqual '\uDF06abc'codePointAt(no), 0xDF06 assert.strictEqual '\uDF06abc'codePointAt(NaN), 0xDF06 assert.strictEqual '\uDF06abc'codePointAt(null), 0xDF06 assert.strictEqual '\uDF06abc'codePointAt(void), 0xDF06 if STRICT assert.throws (!-> String::codePointAt.call null, 0), TypeError assert.throws (!-> String::codePointAt.call void, 0), TypeErrorcore-js-2.4.1/tests/tests/es6.string.ends-with.ls000066400000000000000000000021631274277553300216500ustar00rootroot00000000000000{module, test} = QUnit module \ES6 test 'String#endsWith' (assert)!-> assert.isFunction String::endsWith assert.arity String::endsWith, 1 assert.name String::endsWith, \endsWith assert.looksNative String::endsWith assert.nonEnumerable String::, \endsWith assert.ok 'undefined'endsWith! assert.ok not 'undefined'endsWith null assert.ok 'abc'endsWith '' assert.ok 'abc'endsWith 'c' assert.ok 'abc'endsWith 'bc' assert.ok not 'abc'endsWith 'ab' assert.ok 'abc'endsWith '' NaN assert.ok not 'abc'endsWith \c -1 assert.ok 'abc'endsWith \a 1 assert.ok 'abc'endsWith \c Infinity assert.ok 'abc'endsWith \a on assert.ok not 'abc'endsWith \c \x assert.ok not 'abc'endsWith \a \x if STRICT assert.throws (!-> String::endsWith.call null, '.'), TypeError assert.throws (!-> String::endsWith.call void, '.'), TypeError re = /./ assert.throws (!-> '/./'endsWith re), TypeError re[Symbol?match] = no assert.ok try '/./'endsWith re catch e => no O = {} assert.ok try '[object Object]'endsWith O catch e => no O[Symbol?match] = on assert.throws (!-> '[object Object]'endsWith O), TypeErrorcore-js-2.4.1/tests/tests/es6.string.fixed.ls000066400000000000000000000004501274277553300210420ustar00rootroot00000000000000{module, test} = QUnit module \ES6 test 'String#fixed' (assert)!-> assert.isFunction String::fixed assert.arity String::fixed, 0 assert.name String::fixed, \fixed assert.looksNative String::fixed assert.nonEnumerable String::, \fixed assert.same 'a'fixed!, 'a', 'lower case'core-js-2.4.1/tests/tests/es6.string.fontcolor.ls000066400000000000000000000006521274277553300217540ustar00rootroot00000000000000{module, test} = QUnit module \ES6 test 'String#fontcolor' (assert)!-> assert.isFunction String::fontcolor assert.arity String::fontcolor, 1 assert.name String::fontcolor, \fontcolor assert.looksNative String::fontcolor assert.nonEnumerable String::, \fontcolor assert.same 'a'fontcolor(\b), 'a', 'lower case' assert.same 'a'fontcolor(\"), 'a', 'escape quotes'core-js-2.4.1/tests/tests/es6.string.fontsize.ls000066400000000000000000000006371274277553300216130ustar00rootroot00000000000000{module, test} = QUnit module \ES6 test 'String#fontsize' (assert)!-> assert.isFunction String::fontsize assert.arity String::fontsize, 1 assert.name String::fontsize, \fontsize assert.looksNative String::fontsize assert.nonEnumerable String::, \fontsize assert.same 'a'fontsize(\b), 'a', 'lower case' assert.same 'a'fontsize(\"), 'a', 'escape quotes'core-js-2.4.1/tests/tests/es6.string.from-code-point.ls000066400000000000000000000037571274277553300227620ustar00rootroot00000000000000{module, test} = QUnit module \ES6 test 'String.fromCodePoint' (assert)!-> {fromCodePoint} = String assert.isFunction fromCodePoint assert.arity fromCodePoint, 1 assert.name fromCodePoint, \fromCodePoint assert.looksNative fromCodePoint assert.nonEnumerable String, \fromCodePoint # tests from https://github.com/mathiasbynens/String.fromCodePoint/blob/master/tests/tests.js assert.strictEqual fromCodePoint(''), '\0' assert.strictEqual fromCodePoint!, '' assert.strictEqual fromCodePoint(-0), '\0' assert.strictEqual fromCodePoint(0), '\0' assert.strictEqual fromCodePoint(0x1D306), '\uD834\uDF06' assert.strictEqual fromCodePoint(0x1D306, 0x61, 0x1D307), '\uD834\uDF06a\uD834\uDF07' assert.strictEqual fromCodePoint(0x61, 0x62, 0x1D307), 'ab\uD834\uDF07' assert.strictEqual fromCodePoint(false), '\0' assert.strictEqual fromCodePoint(null), '\0' assert.throws (!-> fromCodePoint \_), RangeError assert.throws (!-> fromCodePoint '+Infinity'), RangeError assert.throws (!-> fromCodePoint '-Infinity'), RangeError assert.throws (!-> fromCodePoint -1), RangeError assert.throws (!-> fromCodePoint 0x10FFFF + 1), RangeError assert.throws (!-> fromCodePoint 3.14), RangeError assert.throws (!-> fromCodePoint 3e-2), RangeError assert.throws (!-> fromCodePoint -Infinity), RangeError assert.throws (!-> fromCodePoint Infinity), RangeError assert.throws (!-> fromCodePoint NaN), RangeError assert.throws (!-> fromCodePoint void), RangeError assert.throws (!-> fromCodePoint {}), RangeError assert.throws (!-> fromCodePoint /./), RangeError tmp = 0x60; assert.strictEqual fromCodePoint({valueOf: -> ++tmp}), \a assert.strictEqual tmp, 0x61 counter = (2 ** 15) * 3 / 2 result = [] while --counter >= 0 => result.push 0 # one code unit per symbol fromCodePoint.apply null result # must not throw counter = (2 ** 15) * 3 / 2 result = [] while --counter >= 0 => result.push 0xFFFF + 1 # two code units per symbol fromCodePoint.apply null result # must not throwcore-js-2.4.1/tests/tests/es6.string.includes.ls000066400000000000000000000015001274277553300215460ustar00rootroot00000000000000{module, test} = QUnit module \ES6 test 'String#includes' (assert)!-> assert.isFunction String::includes assert.arity String::includes, 1 assert.name String::includes, \includes assert.looksNative String::includes assert.nonEnumerable String::, \includes assert.ok not 'abc'includes! assert.ok 'aundefinedb'includes! assert.ok 'abcd'includes \b 1 assert.ok not 'abcd'includes \b 2 if STRICT assert.throws (!-> String::includes.call null, '.'), TypeError assert.throws (!-> String::includes.call void, '.'), TypeError re = /./ assert.throws (!-> '/./'includes re), TypeError re[Symbol?match] = no assert.ok try '/./'includes re catch e => no O = {} assert.ok try '[object Object]'includes O catch e => no O[Symbol?match] = on assert.throws (!-> '[object Object]'includes O), TypeErrorcore-js-2.4.1/tests/tests/es6.string.italics.ls000066400000000000000000000004661274277553300214020ustar00rootroot00000000000000{module, test} = QUnit module \ES6 test 'String#italics' (assert)!-> assert.isFunction String::italics assert.arity String::italics, 0 assert.name String::italics, \italics assert.looksNative String::italics assert.nonEnumerable String::, \italics assert.same 'a'italics!, 'a', 'lower case'core-js-2.4.1/tests/tests/es6.string.iterator.ls000066400000000000000000000014211274277553300215730ustar00rootroot00000000000000{module, test} = QUnit module \ES6 test 'String#@@iterator' (assert)!-> assert.isIterable String:: iter = 'qwe'[Symbol?iterator]! assert.isIterator iter assert.isIterable iter assert.strictEqual iter[Symbol?toStringTag], 'String Iterator' assert.deepEqual iter.next!, {value: \q, done: no} assert.deepEqual iter.next!, {value: \w, done: no} assert.deepEqual iter.next!, {value: \e, done: no} assert.deepEqual iter.next!, {value: void, done: on} assert.strictEqual Array.from(\𠮷𠮷𠮷).length, 3 iter = '𠮷𠮷𠮷'[Symbol?iterator]! assert.deepEqual iter.next!, {value: \𠮷, done: no} assert.deepEqual iter.next!, {value: \𠮷, done: no} assert.deepEqual iter.next!, {value: \𠮷, done: no} assert.deepEqual iter.next!, {value: void, done: on}core-js-2.4.1/tests/tests/es6.string.link.ls000066400000000000000000000005571274277553300207100ustar00rootroot00000000000000{module, test} = QUnit module \ES6 test 'String#link' (assert)!-> assert.isFunction String::link assert.arity String::link, 1 assert.name String::link, \link assert.looksNative String::link assert.nonEnumerable String::, \link assert.same 'a'link(\b), 'a', 'lower case' assert.same 'a'link(\"), 'a', 'escape quotes'core-js-2.4.1/tests/tests/es6.string.raw.ls000066400000000000000000000010271274277553300205350ustar00rootroot00000000000000{module, test} = QUnit module \ES6 test 'String.raw' (assert)!-> {raw} = String assert.isFunction raw assert.arity raw, 1 assert.name raw, \raw assert.looksNative raw assert.nonEnumerable String, \raw assert.strictEqual raw({raw: ['Hi\\n', '!']} , \Bob), 'Hi\\nBob!', 'raw is array' assert.strictEqual raw({raw: \test}, 0, 1, 2), 't0e1s2t', 'raw is string' assert.strictEqual raw({raw: \test}, 0), 't0est', 'lacks substituting' assert.throws (!-> raw {}), TypeError assert.throws (!-> raw {raw: null}), TypeErrorcore-js-2.4.1/tests/tests/es6.string.repeat.ls000066400000000000000000000011141274277553300212210ustar00rootroot00000000000000{module, test} = QUnit module \ES6 test 'String#repeat' (assert)!-> assert.isFunction String::repeat assert.arity String::repeat, 1 assert.name String::repeat, \repeat assert.looksNative String::repeat assert.nonEnumerable String::, \repeat assert.strictEqual 'qwe'repeat(3), \qweqweqwe assert.strictEqual 'qwe'repeat(2.5), \qweqwe assert.throws (!-> 'qwe'repeat -1), RangeError assert.throws (!-> 'qwe'repeat Infinity), RangeError if STRICT assert.throws (!-> String::repeat.call null, 1), TypeError assert.throws (!-> String::repeat.call void, 1), TypeErrorcore-js-2.4.1/tests/tests/es6.string.small.ls000066400000000000000000000004561274277553300210610ustar00rootroot00000000000000{module, test} = QUnit module \ES6 test 'String#small' (assert)!-> assert.isFunction String::small assert.arity String::small, 0 assert.name String::small, \small assert.looksNative String::small assert.nonEnumerable String::, \small assert.same 'a'small!, 'a', 'lower case'core-js-2.4.1/tests/tests/es6.string.starts-with.ls000066400000000000000000000022011274277553300222300ustar00rootroot00000000000000{module, test} = QUnit module \ES6 test 'String#startsWith' (assert)!-> assert.isFunction String::startsWith assert.arity String::startsWith, 1 assert.name String::startsWith, \startsWith assert.looksNative String::startsWith assert.nonEnumerable String::, \startsWith assert.ok 'undefined'startsWith! assert.ok not 'undefined'startsWith null assert.ok 'abc'startsWith '' assert.ok 'abc'startsWith 'a' assert.ok 'abc'startsWith 'ab' assert.ok not 'abc'startsWith 'bc' assert.ok 'abc'startsWith '' NaN assert.ok 'abc'startsWith \a -1 assert.ok not 'abc'startsWith \a 1 assert.ok not 'abc'startsWith \a Infinity assert.ok 'abc'startsWith \b on assert.ok 'abc'startsWith \a \x if STRICT assert.throws (!-> String::startsWith.call null, '.'), TypeError assert.throws (!-> String::startsWith.call void, '.'), TypeError re = /./ assert.throws (!-> '/./'startsWith re), TypeError re[Symbol?match] = no assert.ok try '/./'startsWith re catch e => no O = {} assert.ok try '[object Object]'startsWith O catch e => no O[Symbol?match] = on assert.throws (!-> '[object Object]'startsWith O), TypeErrorcore-js-2.4.1/tests/tests/es6.string.strike.ls000066400000000000000000000004701274277553300212460ustar00rootroot00000000000000{module, test} = QUnit module \ES6 test 'String#strike' (assert)!-> assert.isFunction String::strike assert.arity String::strike, 0 assert.name String::strike, \strike assert.looksNative String::strike assert.nonEnumerable String::, \strike assert.same 'a'strike!, 'a', 'lower case'core-js-2.4.1/tests/tests/es6.string.sub.ls000066400000000000000000000004321274277553300205340ustar00rootroot00000000000000{module, test} = QUnit module \ES6 test 'String#sub' (assert)!-> assert.isFunction String::sub assert.arity String::sub, 0 assert.name String::sub, \sub assert.looksNative String::sub assert.nonEnumerable String::, \sub assert.same 'a'sub!, 'a', 'lower case'core-js-2.4.1/tests/tests/es6.string.sup.ls000066400000000000000000000004321274277553300205520ustar00rootroot00000000000000{module, test} = QUnit module \ES6 test 'String#sup' (assert)!-> assert.isFunction String::sup assert.arity String::sup, 0 assert.name String::sup, \sup assert.looksNative String::sup assert.nonEnumerable String::, \sup assert.same 'a'sup!, 'a', 'lower case'core-js-2.4.1/tests/tests/es6.string.trim.ls000066400000000000000000000013741274277553300207240ustar00rootroot00000000000000{module, test} = QUnit module \ES6 test 'String#trim' (assert)!-> assert.isFunction ''trim assert.arity String::trim, 0 assert.name String::trim, \trim assert.looksNative String::trim assert.nonEnumerable String::, \trim assert.strictEqual ' \n q w e \n 'trim!, 'q w e', 'removes whitespaces at left & right side of string' assert.strictEqual '\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u180E\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF'trim!, '', 'removes all whitespaces' assert.strictEqual '\u200b\u0085'trim!, '\u200b\u0085', "shouldn't remove this symbols" if STRICT assert.throws (!-> String::trim.call null, 0), TypeError assert.throws (!-> String::trim.call void, 0), TypeErrorcore-js-2.4.1/tests/tests/es6.symbol.ls000066400000000000000000000212131274277553300177430ustar00rootroot00000000000000{module, test} = QUnit module \ES6 {defineProperty, getOwnPropertyDescriptor, create} = Object test 'Symbol' (assert)!-> assert.isFunction Symbol NATIVE and assert.strictEqual Symbol.length, 0 'arity is 0' # fails in most engines assert.name Symbol, \Symbol assert.looksNative Symbol s1 = Symbol 'foo' s2 = Symbol 'foo' assert.ok s1 isnt s2, 'Symbol("foo") !== Symbol("foo")' O = {} O[s1] = 42 assert.ok O[s1] is 42, 'Symbol() work as key' assert.ok O[s2] isnt 42, 'Various symbols from one description are various keys' if DESCRIPTORS count = 0 for i of O => count++ assert.ok count is 0, 'object[Symbol()] is not enumerable' test 'Well-known Symbols' (assert)!-> for <[hasInstance isConcatSpreadable iterator match replace search species split toPrimitive toStringTag unscopables]> assert.ok .. of Symbol, "Symbol.#{..} available" assert.nonEnumerable Symbol, .. assert.ok Object(Symbol[..]) instanceof Symbol, "Symbol.#{..} is symbol" if DESCRIPTORS desc = getOwnPropertyDescriptor Symbol, .. assert.ok !desc.enumerble, 'non-enumerable' assert.ok !desc.writable, 'non-writable' assert.ok !desc.configurable, 'non-configurable' test 'Global symbol registry' (assert)!-> assert.isFunction Symbol.for, 'Symbol.for is function' assert.nonEnumerable Symbol, \for assert.strictEqual Symbol.for.length, 1 'Symbol.for arity is 1' NATIVE and assert.strictEqual Symbol.for.name, \for, 'Symbol.for.name is "for"' # can't be polyfilled in some environments assert.ok /native code/.test(Symbol.for), 'Symbol.for looks like native' assert.isFunction Symbol.keyFor, 'Symbol.keyFor is function' assert.nonEnumerable Symbol, \keyFor assert.strictEqual Symbol.keyFor.length, 1 'Symbol.keyFor arity is 1' assert.strictEqual Symbol.keyFor.name, \keyFor, 'Symbol.keyFor.name is "keyFor"' assert.ok /native code/.test(Symbol.keyFor), 'Symbol.keyFor looks like native' symbol = Symbol.for \foo assert.strictEqual Symbol.for(\foo), symbol assert.strictEqual Symbol.keyFor(symbol), \foo assert.throws (!-> Symbol.keyFor \foo), 'throws on non-symbol' test 'Symbol#@@toPrimitive' (assert)!-> assert.isFunction Symbol::[Symbol.toPrimitive] S = Symbol! assert.same S, S[Symbol.toPrimitive]!, \works test 'Symbol#@@toStringTag' (assert)!-> assert.ok Symbol::[Symbol.toStringTag] is \Symbol, 'Symbol::@@toStringTag is `Symbol`' test 'Object.getOwnPropertySymbols' (assert)!-> {getOwnPropertySymbols, getOwnPropertyNames} = Object assert.isFunction getOwnPropertySymbols assert.nonEnumerable Object, \getOwnPropertySymbols assert.strictEqual getOwnPropertySymbols.length, 1 'arity is 1' assert.name getOwnPropertySymbols, \getOwnPropertySymbols assert.looksNative getOwnPropertySymbols obj = {q: 1, w: 2, e: 3} obj[Symbol()] = 42 obj[Symbol()] = 43 assert.deepEqual getOwnPropertyNames(obj)sort!, <[e q w]> assert.strictEqual getOwnPropertySymbols(obj).length, 2 foo = obj with {a: 1, s: 2, d: 3} foo[Symbol()] = 44 assert.deepEqual getOwnPropertyNames(foo)sort!, <[a d s]> assert.strictEqual getOwnPropertySymbols(foo).length, 1 assert.strictEqual getOwnPropertySymbols(Object::).length, 0 if JSON? test 'Symbols & JSON.stringify' (assert)!-> assert.strictEqual JSON.stringify([1, Symbol(\foo), no, Symbol(\bar), {}]), '[1,null,false,null,{}]', 'array value' assert.strictEqual JSON.stringify({foo: Symbol \foo}), '{}', 'object value' if DESCRIPTORS => assert.strictEqual JSON.stringify({(Symbol(\foo)): 1, bar: 2}), '{"bar":2}', 'object key' assert.strictEqual JSON.stringify(Symbol \foo), void, 'symbol value' if typeof Symbol! is \symbol => assert.strictEqual JSON.stringify(Object Symbol \foo), '{}', 'boxed symbol' if DESCRIPTORS test 'Symbols & descriptors' (assert)!-> {create, defineProperty, getOwnPropertyDescriptor, keys, getOwnPropertyNames, getOwnPropertySymbols} = Object d = Symbol \d e = Symbol \e f = Symbol \f i = Symbol \i j = Symbol \j proto = {g: \g, (i): \i} defineProperty proto, \h, value: \h defineProperty proto, \j, value: \j O = create proto O.a = \a O[d] = \d defineProperty O, \b, value: \b defineProperty O, \c, value: \c, enumerable: on defineProperty O, e, configurable: on, writable:on, value: \e desc = value: \f, enumerable: on defineProperty O, f, desc assert.strictEqual desc.enumerable, on, 'defineProperty not changes descriptor object' assert.deepEqual getOwnPropertyDescriptor(O, \a), {configurable: on, writable:on, enumerable: on, value: \a}, 'getOwnPropertyDescriptor a' assert.deepEqual getOwnPropertyDescriptor(O, \b), {configurable: no, writable:no, enumerable: no, value: \b}, 'getOwnPropertyDescriptor b' assert.deepEqual getOwnPropertyDescriptor(O, \c), {configurable: no, writable:no, enumerable: on, value: \c}, 'getOwnPropertyDescriptor c' assert.deepEqual getOwnPropertyDescriptor(O, d), {configurable: on, writable:on, enumerable: on, value: \d}, 'getOwnPropertyDescriptor d' assert.deepEqual getOwnPropertyDescriptor(O, e), {configurable: on, writable:on, enumerable: no, value: \e}, 'getOwnPropertyDescriptor e' assert.deepEqual getOwnPropertyDescriptor(O, f), {configurable: no, writable:no, enumerable: on, value: \f}, 'getOwnPropertyDescriptor f' assert.strictEqual getOwnPropertyDescriptor(O, \g), void, 'getOwnPropertyDescriptor g' assert.strictEqual getOwnPropertyDescriptor(O, \h), void, 'getOwnPropertyDescriptor h' assert.strictEqual getOwnPropertyDescriptor(O, i), void, 'getOwnPropertyDescriptor i' assert.strictEqual getOwnPropertyDescriptor(O, j), void, 'getOwnPropertyDescriptor j' assert.strictEqual getOwnPropertyDescriptor(O, \k), void, 'getOwnPropertyDescriptor k' assert.strictEqual getOwnPropertyDescriptor(Object::, \toString).enumerable, no, 'getOwnPropertyDescriptor on Object.prototype' assert.strictEqual getOwnPropertyDescriptor(Object::, d), void, 'getOwnPropertyDescriptor on Object.prototype missed symbol' assert.strictEqual O.propertyIsEnumerable(\a), on, 'propertyIsEnumerable a' assert.strictEqual O.propertyIsEnumerable(\b), no, 'propertyIsEnumerable b' assert.strictEqual O.propertyIsEnumerable(\c), on, 'propertyIsEnumerable c' assert.strictEqual O.propertyIsEnumerable(d), on, 'propertyIsEnumerable d' assert.strictEqual O.propertyIsEnumerable(e), no, 'propertyIsEnumerable e' assert.strictEqual O.propertyIsEnumerable(f), on, 'propertyIsEnumerable f' assert.strictEqual O.propertyIsEnumerable(\g), no, 'propertyIsEnumerable g' assert.strictEqual O.propertyIsEnumerable(\h), no, 'propertyIsEnumerable h' assert.strictEqual O.propertyIsEnumerable(i), no, 'propertyIsEnumerable i' assert.strictEqual O.propertyIsEnumerable(j), no, 'propertyIsEnumerable j' assert.strictEqual O.propertyIsEnumerable(\k), no, 'propertyIsEnumerable k' assert.strictEqual Object::propertyIsEnumerable(\toString), no, 'propertyIsEnumerable on Object.prototype' assert.strictEqual Object::propertyIsEnumerable(d), no, 'propertyIsEnumerable on Object.prototype missed symbol' assert.strictEqual keys(O).length, 2, 'Object.keys' assert.strictEqual getOwnPropertyNames(O).length, 3, 'Object.getOwnPropertyNames' assert.strictEqual getOwnPropertySymbols(O).length, 3, 'Object.getOwnPropertySymbols' Reflect?ownKeys and assert.strictEqual Reflect.ownKeys(O).length, 6, 'Reflect.ownKeys' delete O[e] O[e] = \e assert.deepEqual getOwnPropertyDescriptor(O, e), {configurable: on, writable:on, enumerable: on, value: \e}, 'redefined non-enum key' test 'Symbols & Object.defineProperties' (assert)!-> {defineProperty, defineProperties} = Object c = Symbol \c d = Symbol \d D = { a: value: \a (c): value: \c } defineProperty D, \b, value: value: \b defineProperty D, d, value: value: \d O = defineProperties {}, D assert.strictEqual O.a, \a, \a assert.strictEqual O.b, void, \b assert.strictEqual O[c], \c, \c assert.strictEqual O[d], void, \d test 'Symbols & Object.create' (assert)!-> {defineProperty, create} = Object c = Symbol \c d = Symbol \d D = { a: value: \a (c): value: \c } defineProperty D, \b, value: value: \b defineProperty D, d, value: value: \d O = create null, D assert.strictEqual O.a, \a, \a assert.strictEqual O.b, void, \b assert.strictEqual O[c], \c, \c assert.strictEqual O[d], void, \d for $key in <[Array RegExp Map Set Promise]> let key = $key => test "#key@@species" (assert)!-> assert.strictEqual global[key][Symbol.species], global[key], "#key@@species === #key" C = Object.create global[key] assert.strictEqual C[Symbol.species], C, "#key sub"core-js-2.4.1/tests/tests/es6.typed.array-buffer.constructor.ls000066400000000000000000000016611274277553300245400ustar00rootroot00000000000000{module, test} = QUnit module \ES6 test \ArrayBuffer (assert)!-> assert.same ArrayBuffer, Object(ArrayBuffer), 'is object' # in Safari 5 typeof ArrayBuffer is 'object' assert.arity ArrayBuffer, 1 # 0 in V8 ~ Chromium 27- assert.name ArrayBuffer, \ArrayBuffer # Safari 5 bug NATIVE and assert.looksNative ArrayBuffer # Safari 5 bug b = new ArrayBuffer 123 assert.same b.byteLength, 123, \length assert.throws (!~> new ArrayBuffer -1), RangeError, 'negative length' # fails in Safari assert.throws (!~> new ArrayBuffer 0.5), RangeError, 'fractional length' # fails in most engines assert.throws (!~> new ArrayBuffer!), RangeError, 'missed length' # fails in all engines, maybe bug in the spec related https://bugs.ecmascript.org/show_bug.cgi?id=4516 assert.throws (!~> new ArrayBuffer(Number.MAX_SAFE_INTEGER + 1)), RangeError, 'absurd length' DESCRIPTORS and assert.same ArrayBuffer[Symbol?species], ArrayBuffer, '@@species'core-js-2.4.1/tests/tests/es6.typed.array-buffer.is-view.ls000066400000000000000000000012101274277553300235240ustar00rootroot00000000000000{module, test} = QUnit module \ES6 test 'ArrayBuffer.isView' (assert)!-> {isView} = ArrayBuffer assert.isFunction isView assert.arity isView, 1 assert.name isView, \isView assert.looksNative isView for <[Float32Array Float64Array Int8Array Int16Array Int32Array Uint8Array Uint16Array Uint32Array Uint8ClampedArray]> if global[..] => assert.same isView(new global[..]([1])), on, "#{..} - true" assert.same isView(new DataView new ArrayBuffer 1), on, "DataView - true" assert.same isView(new ArrayBuffer 1), no, "ArrayBuffer - false" for [void null no on 0 1 '' 'qwe' {}, [], ->] assert.same isView(..), no, "#{..} - false"core-js-2.4.1/tests/tests/es6.typed.array-buffer.slice.ls000066400000000000000000000015041274277553300232460ustar00rootroot00000000000000{module, test} = QUnit module \ES6 test 'ArrayBuffer#slice' (assert)!-> assert.isFunction ArrayBuffer::slice assert.arity ArrayBuffer::slice, 2 assert.name ArrayBuffer::slice, \slice assert.looksNative ArrayBuffer::slice buffer = arrayToBuffer [1 2 3 4 5] assert.ok buffer instanceof ArrayBuffer, 'correct buffer' assert.ok buffer.slice! isnt buffer, 'returns new buffer' assert.ok buffer.slice! instanceof ArrayBuffer, 'correct instance' assert.arrayEqual bufferToArray(buffer.slice!), [1 2 3 4 5] assert.arrayEqual bufferToArray(buffer.slice 1 3), [2 3] assert.arrayEqual bufferToArray(buffer.slice 1 void), [2 3 4 5] # FF buggy here assert.arrayEqual bufferToArray(buffer.slice 1 -1), [2 3 4] assert.arrayEqual bufferToArray(buffer.slice -2 -1), [4] assert.arrayEqual bufferToArray(buffer.slice -2 -3), []core-js-2.4.1/tests/tests/es6.typed.constructors.ls000066400000000000000000000240371274277553300223410ustar00rootroot00000000000000{module, test} = QUnit {keys, getOwnPropertyDescriptor, defineProperty} = Object module \ES6 if DESCRIPTORS for $name, $bytes of {Float32Array: 4, Float64Array: 8, Int8Array: 1, Int16Array: 2, Int32Array: 4, Uint8Array: 1, Uint16Array: 2, Uint32Array: 4, Uint8ClampedArray: 1} let name = $name, bytes = $bytes Typed = global[name] NATIVE_OR_ISNT_UINT8 = NATIVE or name isnt \Uint8Array test "#{name} constructor" (assert)!-> assert.isFunction Typed assert.arity Typed, 3 assert.name Typed, name NATIVE and assert.looksNative Typed # Safari 5 bug assert.same Typed.BYTES_PER_ELEMENT, bytes, "#{name}.BYTES_PER_ELEMENT" a = new Typed 4 assert.same a.BYTES_PER_ELEMENT, bytes, '#BYTES_PER_ELEMENT' assert.same a.byteOffset, 0, name + '#byteOffset, passed number' assert.same a.byteLength, 4 * bytes, '#byteLength, passed number' assert.arrayEqual a, [0 0 0 0], 'correct values, passed number' try a = new Typed '0x4' # throws in IE / Edge / FF assert.same a.byteOffset, 0, '#byteOffset, passed string' assert.same a.byteLength, 4 * bytes, '#byteLength, passed string' assert.arrayEqual a, [0 0 0 0], 'correct values, passed string' catch e => assert.same e, [0 0 0 0], 'passed string' try a = new Typed on # throws in IE / Edge / FF assert.same a.byteOffset, 0, '#byteOffset, passed boolean' assert.same a.byteLength, 1 * bytes, '#byteLength, passed boolean' assert.arrayEqual a, [0], 'correct values, passed boolean' catch e => assert.same e, [0], 'passed boolean' assert.throws (!-> new Typed), TypeError, 'throws without argument' assert.throws (!-> new Typed void), TypeError, 'throws on undefined' NATIVE_OR_ISNT_UINT8 and assert.throws (!-> new Typed 1.5), RangeError, 'throws on 1.5' NATIVE_OR_ISNT_UINT8 and assert.throws (!-> new Typed -1), RangeError, 'throws on -1' NATIVE_OR_ISNT_UINT8 and assert.throws (!-> new Typed -0), RangeError, 'throws on -0' NATIVE_OR_ISNT_UINT8 and assert.throws (!-> new Typed NaN), RangeError, 'throws on NaN' try a = new Typed null # throws in most engines assert.same a.byteOffset, 0, '#byteOffset, passed null' assert.same a.byteLength, 0, '#byteLength, passed null' assert.arrayEqual a, [], 'correct values, passed null' catch e => assert.same e, [], 'passed null' a = new Typed [1 2 3 4] assert.same a.byteOffset, 0, '#byteOffset, passed array' assert.same a.byteLength, 4 * bytes, '#byteLength, passed array' assert.arrayEqual a, [1 2 3 4], 'correct values, passed array' a = new Typed {0: 1, 1: 2, 2: 3, 3: 4, length: 4} assert.same a.byteOffset, 0, '#byteOffset, passed array-like' assert.same a.byteLength, 4 * bytes, '#byteLength, passed array-like' assert.arrayEqual a, [1 2 3 4], 'correct values, passed array-like' try a = new Typed {} # throws in IE / Edge assert.same a.byteOffset, 0, '#byteOffset, passed empty object (also array-like case)' assert.same a.byteLength, 0, '#byteLength, passed empty object (also array-like case)' assert.arrayEqual a, [], 'correct values, passed empty object (also array-like case)' catch e => assert.same e, [], 'passed empty object (also array-like case)' try a = new Typed createIterable [1 2 3 4] assert.same a.byteOffset, 0, '#byteOffset, passed iterable' assert.same a.byteLength, 4 * bytes, '#byteLength, passed iterable' assert.arrayEqual a, [1 2 3 4], 'correct values, passed iterable' catch e => assert.same e, [1 2 3 4], 'passed iterable' a = new Typed new Typed [1 2 3 4] assert.same a.byteOffset, 0, '#byteOffset, passed typed array' assert.same a.byteLength, 4 * bytes, '#byteLength, passed typed array' assert.arrayEqual a, [1 2 3 4], 'correct values, passed typed array' b = new Typed [1 2 3 4] b[Symbol?iterator] = -> createIterable([4 3 2 1])[Symbol?iterator]! a = new Typed b assert.same a.byteOffset, 0, '#byteOffset, passed typed array with custom iterator' assert.same a.byteLength, 4 * bytes, '#byteLength, passed typed array with custom iterator' # V8 bug, https://code.google.com/p/v8/issues/detail?id=4552 assert.arrayEqual a, [1 2 3 4], 'correct values, passed typed array with custom iterator' a = new Typed new ArrayBuffer(8) assert.same a.byteOffset, 0, '#byteOffset, passed buffer' assert.same a.byteLength, 8, '#byteLength, passed buffer' assert.same a.length, 8 / bytes, 'correct length, passed buffer' a = new Typed new ArrayBuffer(16), 8 assert.same a.byteOffset, 8, '#byteOffset, passed buffer and byteOffset' assert.same a.byteLength, 8, '#byteLength, passed buffer and byteOffset' assert.same a.length, 8 / bytes, 'correct length, passed buffer and byteOffset' a = new Typed new ArrayBuffer(24), 8, 8 / bytes assert.same a.byteOffset, 8, '#byteOffset, passed buffer, byteOffset and length' assert.same a.byteLength, 8, '#byteLength, passed buffer, byteOffset and length' assert.same a.length, 8 / bytes, 'correct length, passed buffer, byteOffset and length' a = new Typed new ArrayBuffer(8), void assert.same a.byteOffset, 0, '#byteOffset, passed buffer and undefined' assert.same a.byteLength, 8, '#byteLength, passed buffer and undefined' assert.same a.length, 8 / bytes, 'correct length, passed buffer and undefined' a = new Typed new ArrayBuffer(16), 8, void assert.same a.byteOffset, 8, '#byteOffset, passed buffer, byteOffset and undefined' assert.same a.byteLength, 8, '#byteLength, passed buffer, byteOffset and undefined' assert.same a.length, 8 / bytes, 'correct length, passed buffer, byteOffset and undefined' a = new Typed new ArrayBuffer(8), 8 assert.same a.byteOffset, 8, '#byteOffset, passed buffer and byteOffset with buffer length' assert.same a.byteLength, 0, '#byteLength, passed buffer and byteOffset with buffer length' assert.arrayEqual a, [], 'correct values, passed buffer and byteOffset with buffer length' assert.throws (!-> new Typed new ArrayBuffer(8), -1), RangeError, 'If offset < 0, throw a RangeError exception' # FF bug - TypeError instead of RangeError if bytes isnt 1 assert.throws (!-> new Typed new ArrayBuffer(8), 3), RangeError, 'If offset modulo elementSize ≠ 0, throw a RangeError exception' # FF bug - TypeError instead of RangeError if NATIVE if bytes isnt 1 assert.throws (!-> new Typed new ArrayBuffer 9), RangeError, 'If bufferByteLength modulo elementSize ≠ 0, throw a RangeError exception' assert.throws (!-> new Typed new ArrayBuffer(8), 16), RangeError, 'If newByteLength < 0, throw a RangeError exception' assert.throws (!-> new Typed new ArrayBuffer(24), 8, 24), RangeError, 'If offset+newByteLength > bufferByteLength, throw a RangeError exception' else # FF bug - TypeError instead of RangeError # if bytes isnt 1 # assert.throws (!-> new Typed new ArrayBuffer 9), 'If bufferByteLength modulo elementSize ≠ 0, throw a RangeError exception' # fails in Opera 12 assert.throws (!-> new Typed new ArrayBuffer(8), 16), 'If newByteLength < 0, throw a RangeError exception' assert.throws (!-> new Typed new ArrayBuffer(24), 8, 24), 'If offset+newByteLength > bufferByteLength, throw a RangeError exception' assert.throws (!-> Typed 1), TypeError, 'throws without `new`' assert.same Typed[Symbol?species], Typed, '@@species' test "#{name} descriptors" (assert)!-> typed = new Typed 2 # V8 ~ Chrome 44- bug - descriptor marked as configurable # WebKit bug - marked as non-writable desc = getOwnPropertyDescriptor typed, 0 base = if NATIVE => {writable: on, enumerable: on, configurable: no} else {writable: desc.writable, enumerable: on, configurable: desc.configurable} NATIVE and assert.arrayEqual [key for key of typed], <[0 1]>, 'for-in' # fails in old WebKit NATIVE and assert.arrayEqual keys(typed), <[0 1]>, 'Object.keys' # fails in old WebKit assert.deepEqual getOwnPropertyDescriptor(typed, 0), {value: 0} <<< base, 'Object.getOwnPropertyDescriptor' if NATIVE # V8 ~ Chrome 44- / WebKit bug defineProperty typed, 0, {value: 1, writable: on, enumerable: on, configurable: no} typed[0] = typed[1] = 2.5 assert.deepEqual getOwnPropertyDescriptor(typed, 0), {value: typed[1]} <<< base, 'Object.defineProperty, valid descriptor #1' defineProperty typed, 0, {value: 1} typed[0] = typed[1] = 3.5 assert.deepEqual getOwnPropertyDescriptor(typed, 0), {value: typed[1]} <<< base, 'Object.defineProperty, valid descriptor #2' NATIVE and try # fails in old WebKit ~ PhantomJS defineProperty typed, 0, {value: 2, writable: no, enumerable: on, configurable: no} assert.ok no, 'Object.defineProperty, invalid descriptor #1' catch assert.ok on, 'Object.defineProperty, invalid descriptor #1' NATIVE and try # fails in old WebKit ~ Android 4.0 defineProperty typed, 0, {value: 2, writable: on, enumerable: no, configurable: no} assert.ok no, 'Object.defineProperty, invalid descriptor #2' catch assert.ok on, 'Object.defineProperty, invalid descriptor #2' NATIVE and try # fails in V8 ~ Chrome 44- defineProperty typed, 0, {get: -> 2} assert.ok no, 'Object.defineProperty, invalid descriptor #3' catch assert.ok on, 'Object.defineProperty, invalid descriptor #3' try defineProperty typed, 0, {value: 2, get: -> 2} assert.ok no, 'Object.defineProperty, invalid descriptor #4' catch assert.ok on, 'Object.defineProperty, invalid descriptor #4'core-js-2.4.1/tests/tests/es6.typed.conversions.float32.ls000066400000000000000000000062031274277553300234050ustar00rootroot00000000000000{module, test} = QUnit module \ES6 DESCRIPTORS and test 'Float32 conversions' (assert)!-> NAME = \Float32 ARRAY = NAME + \Array Typed = global[ARRAY] SET = \set + NAME GET = \get + NAME data = [ [0 0 [0 0 0 0]] [-0 -0 [0 0 0 128]] [1 1 [0 0 128 63]] [-1 -1 [0 0 128 191]] [1.1 1.100000023841858 [205 204 140 63]] [-1.1 -1.100000023841858 [205 204 140 191]] [1.9 1.899999976158142 [51 51 243 63]] [-1.9 -1.899999976158142 [51 51 243 191]] [127 127 [0 0 254 66]] [-127 -127 [0 0 254 194]] [128 128 [0 0 0 67]] [-128 -128 [0 0 0 195]] [255 255 [0 0 127 67]] [-255 -255 [0 0 127 195]] [255.1 255.10000610351562 [154 25 127 67]] [255.9 255.89999389648438 [102 230 127 67]] [256 256 [0 0 128 67]] [32767 32767 [0 254 255 70]] [-32767 -32767 [0 254 255 198]] [32768 32768 [0 0 0 71]] [-32768 -32768 [0 0 0 199]] [65535 65535 [0 255 127 71]] [65536 65536 [0 0 128 71]] [65537 65537 [128 0 128 71]] [65536.54321 65536.546875 [70 0 128 71]] [-65536.54321 -65536.546875 [70 0 128 199]] [2147483647 2147483648 [0 0 0 79]] [-2147483647 -2147483648 [0 0 0 207]] [2147483648 2147483648 [0 0 0 79]] [-2147483648 -2147483648 [0 0 0 207]] [2147483649 2147483648 [0 0 0 79]] [-2147483649 -2147483648 [0 0 0 207]] [4294967295 4294967296 [0 0 128 79]] [4294967296 4294967296 [0 0 128 79]] [4294967297 4294967296 [0 0 128 79]] [9007199254740991,9007199254740992,[0,0,0,90]] [-9007199254740991,-9007199254740992,[0,0,0,218]] [9007199254740992,9007199254740992,[0,0,0,90]] [-9007199254740992,-9007199254740992,[0,0,0,218]] [9007199254740994,9007199254740992,[0,0,0,90]] [-9007199254740994,-9007199254740992,[0,0,0,218]] [Infinity, Infinity, [0 0 128 127]] [-Infinity, -Infinity, [0 0 128 255]] [1.7976931348623157e+308, Infinity, [0 0 128 127]] [-1.7976931348623157e+308, -Infinity, [0 0 128 255]] [5e-324 0 [0 0 0 0]] [-5e-324 -0 [0 0 0 128]] ] typed = new Typed 1 uint8 = new Uint8Array typed.buffer view = new DataView typed.buffer viewFrom = -> new DataView new Uint8Array(it).buffer z = -> if it is 0 and 1 / it is -Infinity => '-0' else it for [value, conversion, little] in data big = little.slice!reverse! rep = if LITTLE_ENDIAN => little else big typed[0] = value assert.same typed[0], conversion, "#ARRAY #{z value} -> #{z conversion}" assert.arrayEqual uint8, rep, "#ARRAY #{z value} -> [#rep]" view[SET] 0, value assert.arrayEqual uint8, big, "view.#SET(0, #{z value}) -> [#big]" assert.same viewFrom(big)[GET](0), conversion, "view{#big}.#GET(0) -> #{z conversion}" view[SET] 0, value, no assert.arrayEqual uint8, big, "view.#SET(0, #{z value}, false) -> [#big]" assert.same viewFrom(big)[GET](0, no), conversion, "view{#big}.#GET(0, false) -> #{z conversion}" view[SET] 0, value, on assert.arrayEqual uint8, little, "view.#SET(0, #{z value}, true) -> [#little]" assert.same viewFrom(little)[GET](0, on), conversion, "view{#little}.#GET(0, true) -> #{z conversion}" typed[0] = NaN assert.same typed[0], NaN, "NaN -> NaN" core-js-2.4.1/tests/tests/es6.typed.conversions.float64.ls000066400000000000000000000071601274277553300234150ustar00rootroot00000000000000{module, test} = QUnit module \ES6 DESCRIPTORS and test 'Float64 conversions' (assert)!-> NAME = \Float64 ARRAY = NAME + \Array Typed = global[ARRAY] SET = \set + NAME GET = \get + NAME data = [ [0,0,[0,0,0,0,0,0,0,0]] [-0,-0,[0,0,0,0,0,0,0,128]] [1,1,[0,0,0,0,0,0,240,63]] [-1,-1,[0,0,0,0,0,0,240,191]] [1.1,1.1,[154,153,153,153,153,153,241,63]] [-1.1,-1.1,[154,153,153,153,153,153,241,191]] [1.9,1.9,[102,102,102,102,102,102,254,63]] [-1.9,-1.9,[102,102,102,102,102,102,254,191]] [127,127,[0,0,0,0,0,192,95,64]] [-127,-127,[0,0,0,0,0,192,95,192]] [128,128,[0,0,0,0,0,0,96,64]] [-128,-128,[0,0,0,0,0,0,96,192]] [255,255,[0,0,0,0,0,224,111,64]] [-255,-255,[0,0,0,0,0,224,111,192]] [255.1,255.1,[51,51,51,51,51,227,111,64]] [255.9,255.9,[205,204,204,204,204,252,111,64]] [256,256,[0,0,0,0,0,0,112,64]] [32767,32767,[0,0,0,0,192,255,223,64]] [-32767,-32767,[0,0,0,0,192,255,223,192]] [32768,32768,[0,0,0,0,0,0,224,64]] [-32768,-32768,[0,0,0,0,0,0,224,192]] [65535,65535,[0,0,0,0,224,255,239,64]] [65536,65536,[0,0,0,0,0,0,240,64]] [65537,65537,[0,0,0,0,16,0,240,64]] [65536.54321,65536.54321,[14,248,252,176,8,0,240,64]] [-65536.54321,-65536.54321,[14,248,252,176,8,0,240,192]] [2147483647,2147483647,[0,0,192,255,255,255,223,65]] [-2147483647,-2147483647,[0,0,192,255,255,255,223,193]] [2147483648,2147483648,[0,0,0,0,0,0,224,65]] [-2147483648,-2147483648,[0,0,0,0,0,0,224,193]] [2147483649,2147483649,[0,0,32,0,0,0,224,65]] [-2147483649,-2147483649,[0,0,32,0,0,0,224,193]] [4294967295,4294967295,[0,0,224,255,255,255,239,65]] [4294967296,4294967296,[0,0,0,0,0,0,240,65]] [4294967297,4294967297,[0,0,16,0,0,0,240,65]] [9007199254740991,9007199254740991,[255,255,255,255,255,255,63,67]] [-9007199254740991,-9007199254740991,[255,255,255,255,255,255,63,195]] [9007199254740992,9007199254740992,[0,0,0,0,0,0,64,67]] [-9007199254740992,-9007199254740992,[0,0,0,0,0,0,64,195]] [9007199254740994,9007199254740994,[1,0,0,0,0,0,64,67]] [-9007199254740994,-9007199254740994,[1,0,0,0,0,0,64,195]] [Infinity,Infinity,[0,0,0,0,0,0,240,127]] [-Infinity,-Infinity,[0,0,0,0,0,0,240,255]] [-1.7976931348623157e+308,-1.7976931348623157e+308,[255,255,255,255,255,255,239,255]] [1.7976931348623157e+308,1.7976931348623157e+308,[255,255,255,255,255,255,239,127]] [5e-324,5e-324,[1,0,0,0,0,0,0,0]] [-5e-324,-5e-324,[1,0,0,0,0,0,0,128]] ] typed = new Typed 1 uint8 = new Uint8Array typed.buffer view = new DataView typed.buffer viewFrom = -> new DataView new Uint8Array(it).buffer z = -> if it is 0 and 1 / it is -Infinity => '-0' else it for [value, conversion, little] in data big = little.slice!reverse! rep = if LITTLE_ENDIAN => little else big typed[0] = value assert.same typed[0], conversion, "#ARRAY #{z value} -> #{z conversion}" assert.arrayEqual uint8, rep, "#ARRAY #{z value} -> [#rep]" view[SET] 0, value assert.arrayEqual uint8, big, "view.#SET(0, #{z value}) -> [#big]" assert.same viewFrom(big)[GET](0), conversion, "view{#big}.#GET(0) -> #{z conversion}" view[SET] 0, value, no assert.arrayEqual uint8, big, "view.#SET(0, #{z value}, false) -> [#big]" assert.same viewFrom(big)[GET](0, no), conversion, "view{#big}.#GET(0, false) -> #{z conversion}" view[SET] 0, value, on assert.arrayEqual uint8, little, "view.#SET(0, #{z value}, true) -> [#little]" assert.same viewFrom(little)[GET](0, on), conversion, "view{#little}.#GET(0, true) -> #{z conversion}" typed[0] = NaN assert.same typed[0], NaN, "NaN -> NaN"core-js-2.4.1/tests/tests/es6.typed.conversions.int16.ls000066400000000000000000000051601274277553300230750ustar00rootroot00000000000000{module, test} = QUnit module \ES6 DESCRIPTORS and test 'Int16 conversions' (assert)!-> NAME = \Int16 ARRAY = NAME + \Array Typed = global[ARRAY] SET = \set + NAME GET = \get + NAME data = [ [0,0,[0,0]] [-0,0,[0,0]] [1,1,[1,0]] [-1,-1,[255,255]] [1.1,1,[1,0]] [-1.1,-1,[255,255]] [1.9,1,[1,0]] [-1.9,-1,[255,255]] [127,127,[127,0]] [-127,-127,[129,255]] [128,128,[128,0]] [-128,-128,[128,255]] [255,255,[255,0]] [-255,-255,[1,255]] [255.1,255,[255,0]] [255.9,255,[255,0]] [256,256,[0,1]] [32767,32767,[255,127]] [-32767,-32767,[1,128]] [32768,-32768,[0,128]] [-32768,-32768,[0,128]] [65535,-1,[255,255]] [65536,0,[0,0]] [65537,1,[1,0]] [65536.54321,0,[0,0]] [-65536.54321,0,[0,0]] [2147483647,-1,[255,255]] [-2147483647,1,[1,0]] [2147483648,0,[0,0]] [-2147483648,0,[0,0]] [4294967296,0,[0,0]] [9007199254740992,0,[0,0]] [-9007199254740992,0,[0,0]] [Infinity,0,[0,0]] [-Infinity,0,[0,0]] [-1.7976931348623157e+308,0,[0,0]] [1.7976931348623157e+308,0,[0,0]] [5e-324,0,[0,0]] [-5e-324,0,[0,0]] [NaN,0,[0,0]] ] # Android 4.3- bug if NATIVE or !/Android [2-4]/.test navigator?userAgent data = data.concat [ [2147483649,1,[1,0]] [-2147483649,-1,[255,255]] [4294967295,-1,[255,255]] [4294967297,1,[1,0]] [9007199254740991,-1,[255,255]] [-9007199254740991,1,[1,0]] [9007199254740994,2,[2,0]] [-9007199254740994,-2,[254,255]] ] typed = new Typed 1 uint8 = new Uint8Array typed.buffer view = new DataView typed.buffer viewFrom = -> new DataView new Uint8Array(it).buffer z = -> if it is 0 and 1 / it is -Infinity => '-0' else it for [value, conversion, little] in data big = little.slice!reverse! rep = if LITTLE_ENDIAN => little else big typed[0] = value assert.same typed[0], conversion, "#ARRAY #{z value} -> #{z conversion}" assert.arrayEqual uint8, rep, "#ARRAY #{z value} -> [#rep]" view[SET] 0, value assert.arrayEqual uint8, big, "view.#SET(0, #{z value}) -> [#big]" assert.same viewFrom(big)[GET](0), conversion, "view{#big}.#GET(0) -> #{z conversion}" view[SET] 0, value, no assert.arrayEqual uint8, big, "view.#SET(0, #{z value}, false) -> [#big]" assert.same viewFrom(big)[GET](0, no), conversion, "view{#big}.#GET(0, false) -> #{z conversion}" view[SET] 0, value, on assert.arrayEqual uint8, little, "view.#SET(0, #{z value}, true) -> [#little]" assert.same viewFrom(little)[GET](0, on), conversion, "view{#little}.#GET(0, true) -> #{z conversion}"core-js-2.4.1/tests/tests/es6.typed.conversions.int32.ls000066400000000000000000000054751274277553300231040ustar00rootroot00000000000000{module, test} = QUnit module \ES6 DESCRIPTORS and test 'Int32 conversions' (assert)!-> NAME = \Int32 ARRAY = NAME + \Array Typed = global[ARRAY] SET = \set + NAME GET = \get + NAME data = [ [0,0,[0,0,0,0]] [-0,0,[0,0,0,0]] [1,1,[1,0,0,0]] [-1,-1,[255,255,255,255]] [1.1,1,[1,0,0,0]] [-1.1,-1,[255,255,255,255]] [1.9,1,[1,0,0,0]] [-1.9,-1,[255,255,255,255]] [127,127,[127,0,0,0]] [-127,-127,[129,255,255,255]] [128,128,[128,0,0,0]] [-128,-128,[128,255,255,255]] [255,255,[255,0,0,0]] [-255,-255,[1,255,255,255]] [255.1,255,[255,0,0,0]] [255.9,255,[255,0,0,0]] [256,256,[0,1,0,0]] [32767,32767,[255,127,0,0]] [-32767,-32767,[1,128,255,255]] [32768,32768,[0,128,0,0]] [-32768,-32768,[0,128,255,255]] [65535,65535,[255,255,0,0]] [65536,65536,[0,0,1,0]] [65537,65537,[1,0,1,0]] [65536.54321,65536,[0,0,1,0]] [-65536.54321,-65536,[0,0,255,255]] [2147483647,2147483647,[255,255,255,127]] [-2147483647,-2147483647,[1,0,0,128]] [2147483648,-2147483648,[0,0,0,128]] [-2147483648,-2147483648,[0,0,0,128]] [2147483649,-2147483647,[1,0,0,128]] [-2147483649,2147483647,[255,255,255,127]] [4294967295,-1,[255,255,255,255]] [4294967296,0,[0,0,0,0]] [4294967297,1,[1,0,0,0]] [9007199254740991,-1,[255,255,255,255]] [-9007199254740991,1,[1,0,0,0]] [9007199254740992,0,[0,0,0,0]] [-9007199254740992,0,[0,0,0,0]] [9007199254740994,2,[2,0,0,0]] [-9007199254740994,-2,[254,255,255,255]] [Infinity,0,[0,0,0,0]] [-Infinity,0,[0,0,0,0]] [-1.7976931348623157e+308,0,[0,0,0,0]] [1.7976931348623157e+308,0,[0,0,0,0]] [5e-324,0,[0,0,0,0]] [-5e-324,0,[0,0,0,0]] [NaN,0,[0,0,0,0]] ] typed = new Typed 1 uint8 = new Uint8Array typed.buffer view = new DataView typed.buffer viewFrom = -> new DataView new Uint8Array(it).buffer z = -> if it is 0 and 1 / it is -Infinity => '-0' else it for [value, conversion, little] in data big = little.slice!reverse! rep = if LITTLE_ENDIAN => little else big typed[0] = value assert.same typed[0], conversion, "#ARRAY #{z value} -> #{z conversion}" assert.arrayEqual uint8, rep, "#ARRAY #{z value} -> [#rep]" view[SET] 0, value assert.arrayEqual uint8, big, "view.#SET(0, #{z value}) -> [#big]" assert.same viewFrom(big)[GET](0), conversion, "view{#big}.#GET(0) -> #{z conversion}" view[SET] 0, value, no assert.arrayEqual uint8, big, "view.#SET(0, #{z value}, false) -> [#big]" assert.same viewFrom(big)[GET](0, no), conversion, "view{#big}.#GET(0, false) -> #{z conversion}" view[SET] 0, value, on assert.arrayEqual uint8, little, "view.#SET(0, #{z value}, true) -> [#little]" assert.same viewFrom(little)[GET](0, on), conversion, "view{#little}.#GET(0, true) -> #{z conversion}"core-js-2.4.1/tests/tests/es6.typed.conversions.int8.ls000066400000000000000000000037531274277553300230240ustar00rootroot00000000000000{module, test} = QUnit module \ES6 DESCRIPTORS and test 'Int8 conversions' (assert)!-> NAME = \Int8 ARRAY = NAME + \Array Typed = global[ARRAY] SET = \set + NAME GET = \get + NAME data = [ [0,0,[0]] [-0,0,[0]] [1,1,[1]] [-1,-1,[255]] [1.1,1,[1]] [-1.1,-1,[255]] [1.9,1,[1]] [-1.9,-1,[255]] [127,127,[127]] [-127,-127,[129]] [128,-128,[128]] [-128,-128,[128]] [255,-1,[255]] [-255,1,[1]] [255.1,-1,[255]] [255.9,-1,[255]] [256,0,[0]] [32767,-1,[255]] [-32767,1,[1]] [32768,0,[0]] [-32768,0,[0]] [65535,-1,[255]] [65536,0,[0]] [65537,1,[1]] [65536.54321,0,[0]] [-65536.54321,0,[0]] [2147483647,-1,[255]] [-2147483647,1,[1]] [2147483648,0,[0]] [-2147483648,0,[0]] [4294967296,0,[0]] [9007199254740992,0,[0]] [-9007199254740992,0,[0]] [Infinity,0,[0]] [-Infinity,0,[0]] [-1.7976931348623157e+308,0,[0]] [1.7976931348623157e+308,0,[0]] [5e-324,0,[0]] [-5e-324,0,[0]] [NaN,0,[0]] ] # Android 4.3- bug if NATIVE or !/Android [2-4]/.test navigator?userAgent data = data.concat [ [2147483649,1,[1]] [-2147483649,-1,[255]] [4294967295,-1,[255]] [4294967297,1,[1]] [9007199254740991,-1,[255]] [-9007199254740991,1,[1]] [9007199254740994,2,[2]] [-9007199254740994,-2,[254]] ] typed = new Typed 1 uint8 = new Uint8Array typed.buffer view = new DataView typed.buffer viewFrom = -> new DataView new Uint8Array(it).buffer z = -> if it is 0 and 1 / it is -Infinity => '-0' else it for [value, conversion, little] in data typed[0] = value assert.same typed[0], conversion, "#ARRAY #{z value} -> #{z conversion}" assert.arrayEqual uint8, little, "#ARRAY #{z value} -> [#little]" view[SET] 0, value assert.arrayEqual uint8, little, "view.#SET(0, #{z value}) -> [#little]" assert.same viewFrom(little)[GET](0), conversion, "view{#little}.#GET(0) -> #{z conversion}"core-js-2.4.1/tests/tests/es6.typed.conversions.uint16.ls000066400000000000000000000052151274277553300232630ustar00rootroot00000000000000{module, test} = QUnit module \ES6 DESCRIPTORS and test 'Uint16 conversions' (assert)!-> NAME = \Uint16 ARRAY = NAME + \Array Typed = global[ARRAY] SET = \set + NAME GET = \get + NAME data = [ [0,0,[0,0]] [-0,0,[0,0]] [1,1,[1,0]] [-1,65535,[255,255]] [1.1,1,[1,0]] [-1.1,65535,[255,255]] [1.9,1,[1,0]] [-1.9,65535,[255,255]] [127,127,[127,0]] [-127,65409,[129,255]] [128,128,[128,0]] [-128,65408,[128,255]] [255,255,[255,0]] [-255,65281,[1,255]] [255.1,255,[255,0]] [255.9,255,[255,0]] [256,256,[0,1]] [32767,32767,[255,127]] [-32767,32769,[1,128]] [32768,32768,[0,128]] [-32768,32768,[0,128]] [65535,65535,[255,255]] [65536,0,[0,0]] [65537,1,[1,0]] [65536.54321,0,[0,0]] [-65536.54321,0,[0,0]] [2147483647,65535,[255,255]] [-2147483647,1,[1,0]] [2147483648,0,[0,0]] [-2147483648,0,[0,0]] [4294967296,0,[0,0]] [9007199254740992,0,[0,0]] [-9007199254740992,0,[0,0]] [Infinity,0,[0,0]] [-Infinity,0,[0,0]] [-1.7976931348623157e+308,0,[0,0]] [1.7976931348623157e+308,0,[0,0]] [5e-324,0,[0,0]] [-5e-324,0,[0,0]] [NaN,0,[0,0]] ] # Android 4.3- bug if NATIVE or !/Android [2-4]/.test navigator?userAgent data = data.concat [ [2147483649,1,[1,0]] [-2147483649,65535,[255,255]] [4294967295,65535,[255,255]] [4294967297,1,[1,0]] [9007199254740991,65535,[255,255]] [-9007199254740991,1,[1,0]] [9007199254740994,2,[2,0]] [-9007199254740994,65534,[254,255]] ] typed = new Typed 1 uint8 = new Uint8Array typed.buffer view = new DataView typed.buffer viewFrom = -> new DataView new Uint8Array(it).buffer z = -> if it is 0 and 1 / it is -Infinity => '-0' else it for [value, conversion, little] in data big = little.slice!reverse! rep = if LITTLE_ENDIAN => little else big typed[0] = value assert.same typed[0], conversion, "#ARRAY #{z value} -> #{z conversion}" assert.arrayEqual uint8, rep, "#ARRAY #{z value} -> [#rep]" view[SET] 0, value assert.arrayEqual uint8, big, "view.#SET(0, #{z value}) -> [#big]" assert.same viewFrom(big)[GET](0), conversion, "view{#big}.#GET(0) -> #{z conversion}" view[SET] 0, value, no assert.arrayEqual uint8, big, "view.#SET(0, #{z value}, false) -> [#big]" assert.same viewFrom(big)[GET](0, no), conversion, "view{#big}.#GET(0, false) -> #{z conversion}" view[SET] 0, value, on assert.arrayEqual uint8, little, "view.#SET(0, #{z value}, true) -> [#little]" assert.same viewFrom(little)[GET](0, on), conversion, "view{#little}.#GET(0, true) -> #{z conversion}"core-js-2.4.1/tests/tests/es6.typed.conversions.uint32.ls000066400000000000000000000056111274277553300232610ustar00rootroot00000000000000{module, test} = QUnit module \ES6 DESCRIPTORS and test 'Uint32 conversions' (assert)!-> NAME = \Uint32 ARRAY = NAME + \Array Typed = global[ARRAY] SET = \set + NAME GET = \get + NAME data = [ [0,0,[0,0,0,0]] [-0,0,[0,0,0,0]] [1,1,[1,0,0,0]] [-1,4294967295,[255,255,255,255]] [1.1,1,[1,0,0,0]] [-1.1,4294967295,[255,255,255,255]] [1.9,1,[1,0,0,0]] [-1.9,4294967295,[255,255,255,255]] [127,127,[127,0,0,0]] [-127,4294967169,[129,255,255,255]] [128,128,[128,0,0,0]] [-128,4294967168,[128,255,255,255]] [255,255,[255,0,0,0]] [-255,4294967041,[1,255,255,255]] [255.1,255,[255,0,0,0]] [255.9,255,[255,0,0,0]] [256,256,[0,1,0,0]] [32767,32767,[255,127,0,0]] [-32767,4294934529,[1,128,255,255]] [32768,32768,[0,128,0,0]] [-32768,4294934528,[0,128,255,255]] [65535,65535,[255,255,0,0]] [65536,65536,[0,0,1,0]] [65537,65537,[1,0,1,0]] [65536.54321,65536,[0,0,1,0]] [-65536.54321,4294901760,[0,0,255,255]] [2147483647,2147483647,[255,255,255,127]] [-2147483647,2147483649,[1,0,0,128]] [2147483648,2147483648,[0,0,0,128]] [-2147483648,2147483648,[0,0,0,128]] [2147483649,2147483649,[1,0,0,128]] [-2147483649,2147483647,[255,255,255,127]] [4294967295,4294967295,[255,255,255,255]] [4294967296,0,[0,0,0,0]] [4294967297,1,[1,0,0,0]] [9007199254740991,4294967295,[255,255,255,255]] [-9007199254740991,1,[1,0,0,0]] [9007199254740992,0,[0,0,0,0]] [-9007199254740992,0,[0,0,0,0]] [9007199254740994,2,[2,0,0,0]] [-9007199254740994,4294967294,[254,255,255,255]] [Infinity,0,[0,0,0,0]] [-Infinity,0,[0,0,0,0]] [-1.7976931348623157e+308,0,[0,0,0,0]] [1.7976931348623157e+308,0,[0,0,0,0]] [5e-324,0,[0,0,0,0]] [-5e-324,0,[0,0,0,0]] [NaN,0,[0,0,0,0]] ] typed = new Typed 1 uint8 = new Uint8Array typed.buffer view = new DataView typed.buffer viewFrom = -> new DataView new Uint8Array(it).buffer z = -> if it is 0 and 1 / it is -Infinity => '-0' else it for [value, conversion, little] in data big = little.slice!reverse! rep = if LITTLE_ENDIAN => little else big typed[0] = value assert.same typed[0], conversion, "#ARRAY #{z value} -> #{z conversion}" assert.arrayEqual uint8, rep, "#ARRAY #{z value} -> [#rep]" view[SET] 0, value assert.arrayEqual uint8, big, "view.#SET(0, #{z value}) -> [#big]" assert.same viewFrom(big)[GET](0), conversion, "view{#big}.#GET(0) -> #{z conversion}" view[SET] 0, value, no assert.arrayEqual uint8, big, "view.#SET(0, #{z value}, false) -> [#big]" assert.same viewFrom(big)[GET](0, no), conversion, "view{#big}.#GET(0, false) -> #{z conversion}" view[SET] 0, value, on assert.arrayEqual uint8, little, "view.#SET(0, #{z value}, true) -> [#little]" assert.same viewFrom(little)[GET](0, on), conversion, "view{#little}.#GET(0, true) -> #{z conversion}"core-js-2.4.1/tests/tests/es6.typed.conversions.uint8-clamped.ls000066400000000000000000000031001274277553300245760ustar00rootroot00000000000000{module, test} = QUnit module \ES6 DESCRIPTORS and test 'Uint8Clamped conversions' (assert)!-> NAME = \Uint8Clamped ARRAY = NAME + \Array Typed = global[ARRAY] data = [ [0,0,[0]] [-0,0,[0]] [1,1,[1]] [-1,0,[0]] [1.1,1,[1]] [-1.1,0,[0]] [1.9,2,[2]] [-1.9,0,[0]] [127,127,[127]] [-127,0,[0]] [128,128,[128]] [-128,0,[0]] [255,255,[255]] [-255,0,[0]] [255.1,255,[255]] [255.9,255,[255]] [256,255,[255]] [32767,255,[255]] [-32767,0,[0]] [32768,255,[255]] [-32768,0,[0]] [65535,255,[255]] [65536,255,[255]] [65537,255,[255]] [65536.54321,255,[255]] [-65536.54321,0,[0]] [2147483647,255,[255]] [-2147483647,0,[0]] [2147483648,255,[255]] [-2147483648,0,[0]] [2147483649,255,[255]] [-2147483649,0,[0]] [4294967295,255,[255]] [4294967296,255,[255]] [4294967297,255,[255]] [9007199254740991,255,[255]] [-9007199254740991,0,[0]] [9007199254740992,255,[255]] [-9007199254740992,0,[0]] [9007199254740994,255,[255]] [-9007199254740994,0,[0]] [Infinity,255,[255]] [-Infinity,0,[0]] [-1.7976931348623157e+308,0,[0]] [1.7976931348623157e+308,255,[255]] [5e-324,0,[0]] [-5e-324,0,[0]] [NaN,0,[0]] ] typed = new Typed 1 uint8 = new Uint8Array typed.buffer z = -> if it is 0 and 1 / it is -Infinity => '-0' else it for [value, conversion, little] in data typed[0] = value assert.same typed[0], conversion, "#{z value} -> #{z conversion}" assert.arrayEqual uint8, little, "#{z value} -> [#little]"core-js-2.4.1/tests/tests/es6.typed.conversions.uint8.ls000066400000000000000000000037211274277553300232040ustar00rootroot00000000000000{module, test} = QUnit module \ES6 DESCRIPTORS and test 'Uint8 conversions' (assert)!-> NAME = \Uint8 ARRAY = NAME + \Array Typed = global[ARRAY] SET = \set + NAME GET = \get + NAME data = [ [0,0,[0]] [-0,0,[0]] [1,1,[1]] [-1,255,[255]] [1.1,1,[1]] [-1.1,255,[255]] [1.9,1,[1]] [-1.9,255,[255]] [127,127,[127]] [-127,129,[129]] [128,128,[128]] [-128,128,[128]] [255,255,[255]] [-255,1,[1]] [255.1,255,[255]] [255.9,255,[255]] [256,0,[0]] [32767,255,[255]] [-32767,1,[1]] [32768,0,[0]] [-32768,0,[0]] [65535,255,[255]] [65536,0,[0]] [65537,1,[1]] [65536.54321,0,[0]] [-65536.54321,0,[0]] [2147483647,255,[255]] [-2147483647,1,[1]] [2147483648,0,[0]] [-2147483648,0,[0]] [4294967296,0,[0]] [9007199254740992,0,[0]] [-9007199254740992,0,[0]] [Infinity,0,[0]] [-Infinity,0,[0]] [-1.7976931348623157e+308,0,[0]] [1.7976931348623157e+308,0,[0]] [5e-324,0,[0]] [-5e-324,0,[0]] [NaN,0,[0]] ] # Android 4.3- bug if NATIVE or !/Android [2-4]/.test navigator?userAgent data = data.concat [ [2147483649,1,[1]] [-2147483649,255,[255]] [4294967295,255,[255]] [4294967297,1,[1]] [9007199254740991,255,[255]] [-9007199254740991,1,[1]] [9007199254740994,2,[2]] [-9007199254740994,254,[254]] ] typed = new Typed 1 view = new DataView typed.buffer viewFrom = -> new DataView new Uint8Array(it).buffer z = -> if it is 0 and 1 / it is -Infinity => '-0' else it for [value, conversion, little] in data typed[0] = value assert.same typed[0], conversion, "#ARRAY #{z value} -> #{z conversion}" assert.arrayEqual typed, little, "#ARRAY #{z value} -> [#little]" view[SET] 0, value assert.arrayEqual typed, little, "view.#SET(0, #{z value}) -> [#little]" assert.same viewFrom(little)[GET](0), conversion, "view{#little}.#GET(0) -> #{z conversion}"core-js-2.4.1/tests/tests/es6.typed.data-view.ls000066400000000000000000000167331274277553300214560ustar00rootroot00000000000000{module, test} = QUnit module \ES6 test \DataView (assert)!-> assert.same DataView, Object(DataView), 'is object' # in Safari 5 typeof DataView is 'object' NATIVE and assert.arity DataView, 3 # 1 in IE11 NATIVE and assert.name DataView, \DataView # Safari 5 bug NATIVE and assert.looksNative DataView # Safari 5 bug a = new DataView new ArrayBuffer(8) assert.same a.byteOffset, 0, '#byteOffset, passed buffer' assert.same a.byteLength, 8, '#byteLength, passed buffer' a = new DataView new ArrayBuffer(16), 8 assert.same a.byteOffset, 8, '#byteOffset, passed buffer and byteOffset' assert.same a.byteLength, 8, '#byteLength, passed buffer and byteOffset' a = new DataView new ArrayBuffer(24), 8, 8 assert.same a.byteOffset, 8, '#byteOffset, passed buffer, byteOffset and length' assert.same a.byteLength, 8, '#byteLength, passed buffer, byteOffset and length' if NATIVE # fails in IE / MS Edge a = new DataView new ArrayBuffer(8), void assert.same a.byteOffset, 0, '#byteOffset, passed buffer and undefined' assert.same a.byteLength, 8, '#byteLength, passed buffer and undefined' if NATIVE # fails in IE / MS Edge a = new DataView new ArrayBuffer(16), 8, void assert.same a.byteOffset, 8, '#byteOffset, passed buffer, byteOffset and undefined' assert.same a.byteLength, 8, '#byteLength, passed buffer, byteOffset and undefined' if NATIVE # fails in IE10 a = new DataView new ArrayBuffer(8), 8 assert.same a.byteOffset, 8, '#byteOffset, passed buffer and byteOffset with buffer length' assert.same a.byteLength, 0, '#byteLength, passed buffer and byteOffset with buffer length' if NATIVE # TypeError in IE assert.throws (!-> new DataView new ArrayBuffer(8), -1), RangeError, 'If offset < 0, throw a RangeError exception' # FF bug - TypeError instead of RangeError assert.throws (!-> new DataView new ArrayBuffer(8), 16), RangeError, 'If newByteLength < 0, throw a RangeError exception' assert.throws (!-> new DataView new ArrayBuffer(24), 8, 24), RangeError, 'If offset+newByteLength > bufferByteLength, throw a RangeError exception' else assert.throws (!-> new DataView new ArrayBuffer(8), -1), 'If offset < 0, throw a RangeError exception' # FF bug - TypeError instead of RangeError assert.throws (!-> new DataView new ArrayBuffer(8), 16), 'If newByteLength < 0, throw a RangeError exception' assert.throws (!-> new DataView new ArrayBuffer(24), 8, 24), 'If offset+newByteLength > bufferByteLength, throw a RangeError exception' if NATIVE # Android ~ 4.0 assert.throws (!-> DataView new ArrayBuffer 8), TypeError, 'throws without `new`' else assert.throws (!-> DataView new ArrayBuffer 8), 'throws without `new`' d = new DataView new ArrayBuffer 8 d.setUint32 0, 0x12345678 assert.same d.getUint32(0), 0x12345678, 'big endian/big endian' d.setUint32 0, 0x12345678, true assert.same d.getUint32(0, true), 0x12345678, 'little endian/little endian' d.setUint32 0, 0x12345678, true assert.same d.getUint32(0), 0x78563412, 'little endian/big endian' d.setUint32 0, 0x12345678 assert.same d.getUint32(0, true), 0x78563412, 'big endian/little endian' # Chrome allows no arguments, throws if non-ArrayBuffer #assert.same(new DataView().buffer.byteLength, 0, 'no arguments'); # Safari (iOS 5) does not #assert.throws(function () { return new DataView(); }, TypeError, 'no arguments'); # Chrome throws TypeError, Safari iOS5 throws isDOMException(INDEX_SIZE_ERR) assert.throws (-> new DataView {}), 'non-ArrayBuffer argument'; # Opera 12 throws `true` assert.ok (-> try new DataView \foo void catch => e ), 'non-ArrayBuffer argument' DESCRIPTORS and test 'DataView accessors' (assert)!-> u = new Uint8Array 8 d = new DataView u.buffer assert.arrayEqual u, [0, 0, 0, 0, 0, 0, 0, 0] d.setUint8 0, 255 assert.arrayEqual u, [0xff, 0, 0, 0, 0, 0, 0, 0] d.setInt8 1, -1 assert.arrayEqual u, [0xff, 0xff, 0, 0, 0, 0, 0, 0] d.setUint16 2, 0x1234 assert.arrayEqual u, [0xff, 0xff, 0x12, 0x34, 0, 0, 0, 0] d.setInt16 4, -1 assert.arrayEqual u, [0xff, 0xff, 0x12, 0x34, 0xff, 0xff, 0, 0] d.setUint32 1, 0x12345678 assert.arrayEqual u, [0xff, 0x12, 0x34, 0x56, 0x78, 0xff, 0, 0] d.setInt32 4, -2023406815 assert.arrayEqual u, [0xff, 0x12, 0x34, 0x56, 0x87, 0x65, 0x43, 0x21] d.setFloat32 2, 1.2e+38 assert.arrayEqual u, [0xff, 0x12, 0x7e, 0xb4, 0x8e, 0x52, 0x43, 0x21] d.setFloat64 0, -1.2345678e+301 assert.arrayEqual u, [0xfe, 0x72, 0x6f, 0x51, 0x5f, 0x61, 0x77, 0xe5] for x, i in [0x80, 0x81, 0x82, 0x83, 0x84, 0x85, 0x86, 0x87] u[i] = x assert.same d.getUint8(0), 128 assert.same d.getInt8(1), -127 assert.same d.getUint16(2), 33411 assert.same d.getInt16(3), -31868 assert.same d.getUint32(4), 2223343239 assert.same d.getInt32(2), -2105310075 assert.same d.getFloat32(2), -1.932478247535851e-37 assert.same d.getFloat64(0), -3.116851295377095e-306 DESCRIPTORS and test 'DataView endian' (assert)!-> rawbuf = new Uint8Array([0 1 2 3 4 5 6 7]).buffer d = new DataView rawbuf assert.same d.byteLength, 8, \buffer assert.same d.byteOffset, 0, \buffer assert.throws !-> d.getUint8 -2 # Chrome bug for index -, DOMException, 'bounds for buffer'? assert.throws (!-> d.getUint8 8), 'bounds for buffer' assert.throws (!-> d.setUint8 -2, 0), 'bounds for buffer' assert.throws (!-> d.setUint8 8, 0), 'bounds for buffer' d = new DataView rawbuf, 2 assert.same d.byteLength, 6, 'buffer, byteOffset' assert.same d.byteOffset, 2, 'buffer, byteOffset' assert.same d.getUint8(5), 7, 'buffer, byteOffset' assert.throws (!-> d.getUint8 -2), 'bounds for buffer, byteOffset' assert.throws (!-> d.getUint8 6), 'bounds for buffer, byteOffset' assert.throws (!-> d.setUint8 -2, 0), 'bounds for buffer, byteOffset' assert.throws (!-> d.setUint8 6, 0), 'bounds for buffer, byteOffset' assert.throws (!-> new DataView rawbuf, -1), 'invalid byteOffset' assert.throws (!-> new DataView rawbuf, 9), 'invalid byteOffset' d = new DataView rawbuf, 2, 4 assert.same d.byteLength, 4, 'buffer, byteOffset, length' assert.same d.byteOffset, 2, 'buffer, byteOffset, length' assert.same d.getUint8(3), 5, 'buffer, byteOffset, length' assert.throws (!-> d.getUint8 -2), 'bounds for buffer, byteOffset, length' assert.throws (!-> d.getUint8 4), 'bounds for buffer, byteOffset, length' assert.throws (!-> d.setUint8 -2, 0), 'bounds for buffer, byteOffset, length' assert.throws (!-> d.setUint8 4, 0), 'bounds for buffer, byteOffset, length' assert.throws (!-> new DataView rawbuf, 0, 9), 'invalid byteOffset+length' assert.throws (!-> new DataView rawbuf, 8, 1), 'invalid byteOffset+length' assert.throws (!-> new DataView rawbuf, 9, -1), 'invalid byteOffset+length' for <[getUint8 getInt8 getUint16 getInt16 getUint32 getInt32 getFloat32 getFloat64]> let name = .. => test 'DataView#' + name, (assert)!-> assert.isFunction DataView::[name] NATIVE and assert.arity DataView::[name], 1 # wrong in most engines assert.name DataView::[name], name assert.looksNative DataView::[name] assert.same new DataView(new ArrayBuffer 8)[name](0), 0, 'returns element' for <[setUint8 setInt8 setUint16 setInt16 setUint32 setInt32 setFloat32 setFloat64]> let name = .. => test 'DataView#' + name, (assert)!-> assert.isFunction DataView::[name] NATIVE and assert.arity DataView::[name], 2 # wrong in most engines assert.name DataView::[name], name assert.looksNative DataView::[name] assert.same new DataView(new ArrayBuffer 8)[name](0 0), void, 'void'core-js-2.4.1/tests/tests/es6.typed.methods.copy-within.ls000066400000000000000000000033111274277553300234750ustar00rootroot00000000000000{module, test} = QUnit module \ES6 DESCRIPTORS and test '%TypedArrayPrototype%.copyWithin' (assert)!-> global = Function('return this')! # we can't implement %TypedArrayPrototype% in all engines, so run all tests for each typed array constructor for <[Float32Array Float64Array Int8Array Int16Array Int32Array Uint8Array Uint16Array Uint32Array Uint8ClampedArray]> Typed = global[..] assert.isFunction Typed::copyWithin, "#{..}::copyWithin is function" assert.arity Typed::copyWithin, 2, "#{..}::copyWithin arity is 2" assert.name Typed::copyWithin, \copyWithin, "#{..}::copyWithin name is 'copyWithin'" assert.looksNative Typed::copyWithin, "#{..}::copyWithin looks native" assert.strictEqual (a = new Typed(5)copyWithin(0)), a, 'return this' assert.arrayEqual new Typed([1 2 3 4 5])copyWithin(0 3), [4 5 3 4 5] assert.arrayEqual new Typed([1 2 3 4 5])copyWithin(1 3), [1 4 5 4 5] assert.arrayEqual new Typed([1 2 3 4 5])copyWithin(1 2), [1 3 4 5 5] assert.arrayEqual new Typed([1 2 3 4 5])copyWithin(2 2), [1 2 3 4 5] assert.arrayEqual new Typed([1 2 3 4 5])copyWithin(0 3 4), [4 2 3 4 5] assert.arrayEqual new Typed([1 2 3 4 5])copyWithin(1 3 4), [1 4 3 4 5] assert.arrayEqual new Typed([1 2 3 4 5])copyWithin(1 2 4), [1 3 4 4 5] assert.arrayEqual new Typed([1 2 3 4 5])copyWithin(0 -2), [4 5 3 4 5] assert.arrayEqual new Typed([1 2 3 4 5])copyWithin(0 -2 -1), [4 2 3 4 5] assert.arrayEqual new Typed([1 2 3 4 5])copyWithin(-4 -3 -2), [1 3 3 4 5] assert.arrayEqual new Typed([1 2 3 4 5])copyWithin(-4 -3 -1), [1 3 4 4 5] assert.arrayEqual new Typed([1 2 3 4 5])copyWithin(-4 -3), [1 3 4 5 5] assert.throws (!-> Typed::fill.call [0], 1), "isn't generic"core-js-2.4.1/tests/tests/es6.typed.methods.every.ls000066400000000000000000000027451274277553300223670ustar00rootroot00000000000000{module, test} = QUnit module \ES6 DESCRIPTORS and test '%TypedArrayPrototype%.every' (assert)!-> # we can't implement %TypedArrayPrototype% in all engines, so run all tests for each typed array constructor for <[Float32Array Float64Array Int8Array Int16Array Int32Array Uint8Array Uint16Array Uint32Array Uint8ClampedArray]> Typed = global[..] assert.isFunction Typed::every, "#{..}::every is function" assert.arity Typed::every, 1, "#{..}::every arity is 1" assert.name Typed::every, \every, "#{..}::every name is 'every'" assert.looksNative Typed::every, "#{..}::every looks native" (a = new Typed [1])every (val, key, that)!-> assert.same &length, 3, 'correct number of callback arguments' assert.same val, 1, 'correct value in callback' assert.same key, 0, 'correct index in callback' assert.same that, a, 'correct link to array in callback' assert.same @, ctx, 'correct callback context' , ctx = {} assert.ok new Typed([1 2 3])every -> typeof it is \number assert.ok new Typed([1 2 3])every (<4) assert.ok not new Typed([1 2 3])every (<3) assert.ok not new Typed([1 2 3])every -> typeof it is \string assert.ok new Typed([1 2 3])every (-> +@ is 1 ), 1 v = '' k = '' new Typed([1 2 3])every (a, b)-> v += a k += b on assert.same v, \123 assert.same k, \012 assert.ok (arr = new Typed [1 2 3])every -> &2 is arr assert.throws (!-> Typed::every.call [0], -> on), "isn't generic"core-js-2.4.1/tests/tests/es6.typed.methods.fill.ls000066400000000000000000000021101274277553300221450ustar00rootroot00000000000000{module, test} = QUnit module \ES6 DESCRIPTORS and test '%TypedArrayPrototype%.fill' (assert)!-> # we can't implement %TypedArrayPrototype% in all engines, so run all tests for each typed array constructor for <[Float32Array Float64Array Int8Array Int16Array Int32Array Uint8Array Uint16Array Uint32Array Uint8ClampedArray]> Typed = global[..] assert.isFunction Typed::fill, "#{..}::fill is function" assert.arity Typed::fill, 1, "#{..}::fill arity is 1" assert.name Typed::fill, \fill, "#{..}::fill name is 'fill'" assert.looksNative Typed::fill, "#{..}::fill looks native" assert.strictEqual (a = new Typed(5)fill(5)), a, 'return this' assert.arrayEqual new Typed(5)fill(5), [5 5 5 5 5], 'basic' assert.arrayEqual new Typed(5)fill(5 1), [0 5 5 5 5], 'start index' assert.arrayEqual new Typed(5)fill(5 1 4), [0 5 5 5 0], 'end index' assert.arrayEqual new Typed(5)fill(5 6 1), [0 0 0 0 0], 'start > end' assert.arrayEqual new Typed(5)fill(5 -3 4), [0 0 5 5 0], 'negative start index' assert.throws (!-> Typed::fill.call [0], 1), "isn't generic"core-js-2.4.1/tests/tests/es6.typed.methods.filter.ls000066400000000000000000000025141274277553300225140ustar00rootroot00000000000000{module, test} = QUnit module \ES6 DESCRIPTORS and test '%TypedArrayPrototype%.filter' (assert)!-> # we can't implement %TypedArrayPrototype% in all engines, so run all tests for each typed array constructor for <[Float32Array Float64Array Int8Array Int16Array Int32Array Uint8Array Uint16Array Uint32Array Uint8ClampedArray]> Typed = global[..] assert.isFunction Typed::filter, "#{..}::filter is function" assert.arity Typed::filter, 1, "#{..}::filter arity is 1" assert.name Typed::filter, \filter, "#{..}::filter name is 'filter'" assert.looksNative Typed::filter, "#{..}::filter looks native" (a = new Typed [1])filter (val, key, that)!-> assert.same &length, 3, 'correct number of callback arguments' assert.same val, 1, 'correct value in callback' assert.same key, 0, 'correct index in callback' assert.same that, a, 'correct link to array in callback' assert.same @, ctx, 'correct callback context' , ctx = {} instance = new Typed([1 2 3 4 5 6 7 8 9])filter((% 2)) assert.ok instance instanceof Typed, 'correct instance' assert.arrayEqual instance, [1 3 5 7 9], 'works' v = '' k = '' new Typed([1 2 3])filter (a, b)!-> v += a k += b assert.same v, \123 assert.same k, \012 assert.throws (!-> Typed::filter.call [0], -> on), "isn't generic"core-js-2.4.1/tests/tests/es6.typed.methods.find-index.ls000066400000000000000000000024761274277553300232630ustar00rootroot00000000000000{module, test} = QUnit module \ES6 DESCRIPTORS and test '%TypedArrayPrototype%.findIndex' (assert)-> # we can't implement %TypedArrayPrototype% in all engines, so run all tests for each typed array constructor for <[Float32Array Float64Array Int8Array Int16Array Int32Array Uint8Array Uint16Array Uint32Array Uint8ClampedArray]> Typed = global[..] assert.isFunction Typed::findIndex, "#{..}::findIndex is function" assert.arity Typed::findIndex, 1, "#{..}::findIndex arity is 1" assert.name Typed::findIndex, \findIndex, "#{..}::findIndex name is 'findIndex'" assert.looksNative Typed::findIndex, "#{..}::findIndex looks native" (a = new Typed [1])findIndex (val, key, that)!-> assert.same &length, 3, 'correct number of callback arguments' assert.same val, 1, 'correct value in callback' assert.same key, 0, 'correct index in callback' assert.same that, a, 'correct link to array in callback' assert.same @, ctx, 'correct callback context' , ctx = {} assert.same new Typed([1 2 3])findIndex(-> !(it % 2)), 1 assert.same new Typed([1 2 3])findIndex((is 4)), -1 v = '' k = '' new Typed([1 2 3])findIndex (a, b)!-> v += a k += b assert.same v, \123 assert.same k, \012 assert.throws (!-> Typed::findIndex.call [0], -> on), "isn't generic"core-js-2.4.1/tests/tests/es6.typed.methods.find.ls000066400000000000000000000023611274277553300221470ustar00rootroot00000000000000{module, test} = QUnit module \ES6 DESCRIPTORS and test '%TypedArrayPrototype%.find' (assert)!-> # we can't implement %TypedArrayPrototype% in all engines, so run all tests for each typed array constructor for <[Float32Array Float64Array Int8Array Int16Array Int32Array Uint8Array Uint16Array Uint32Array Uint8ClampedArray]> Typed = global[..] assert.isFunction Typed::find, "#{..}::find is function" assert.arity Typed::find, 1, "#{..}::find arity is 1" assert.name Typed::find, \find, "#{..}::find name is 'find'" assert.looksNative Typed::find, "#{..}::find looks native" (a = new Typed [1])find (val, key, that)!-> assert.same &length, 3, 'correct number of callback arguments' assert.same val, 1, 'correct value in callback' assert.same key, 0, 'correct index in callback' assert.same that, a, 'correct link to array in callback' assert.same @, ctx, 'correct callback context' , ctx = {} assert.same new Typed([1 2 3])find(-> !(it % 2)), 2 assert.same new Typed([1 2 3])find((is 4)), void v = '' k = '' new Typed([1 2 3])find (a, b)!-> v += a k += b assert.same v, \123 assert.same k, \012 assert.throws (!-> Typed::find.call [0], -> on), "isn't generic"core-js-2.4.1/tests/tests/es6.typed.methods.for-each.ls000066400000000000000000000023471274277553300227170ustar00rootroot00000000000000{module, test} = QUnit module \ES6 DESCRIPTORS and test '%TypedArrayPrototype%.forEach' (assert)!-> # we can't implement %TypedArrayPrototype% in all engines, so run all tests for each typed array constructor for <[Float32Array Float64Array Int8Array Int16Array Int32Array Uint8Array Uint16Array Uint32Array Uint8ClampedArray]> Typed = global[..] assert.isFunction Typed::forEach, "#{..}::forEach is function" assert.arity Typed::forEach, 1, "#{..}::forEach arity is 1" assert.name Typed::forEach, \forEach, "#{..}::forEach name is 'forEach'" assert.looksNative Typed::forEach, "#{..}::forEach looks native" assert.same new Typed([1])forEach(!->), void, 'void' (a = new Typed [1])forEach (val, key, that)!-> assert.same &length, 3, 'correct number of callback arguments' assert.same val, 1, 'correct value in callback' assert.same key, 0, 'correct index in callback' assert.same that, a, 'correct link to array in callback' assert.same @, ctx, 'correct callback context' , ctx = {} v = '' k = '' new Typed([1 2 3])forEach (a, b)!-> v += a k += b assert.same v, \123 assert.same k, \012 assert.throws (!-> Typed::forEach.call [0], -> on), "isn't generic"core-js-2.4.1/tests/tests/es6.typed.methods.from.ls000066400000000000000000000032641274277553300221750ustar00rootroot00000000000000{module, test} = QUnit module \ES6 DESCRIPTORS and test '%TypedArray%.from' (assert)!-> # we can't implement %TypedArray% in all engines, so run all tests for each typed array constructor for <[Float32Array Float64Array Int8Array Int16Array Int32Array Uint8Array Uint16Array Uint32Array Uint8ClampedArray]> Typed = global[..] assert.isFunction Typed.from, "#{..}.from is function" assert.arity Typed.from, 1, "#{..}.from arity is 1" assert.name Typed.from, \from, "#{..}.from name is 'from'" assert.looksNative Typed.from, "#{..}.from looks native" inst = Typed.from [1 2 3] assert.ok inst instanceof Typed, 'correct instance with array' assert.arrayEqual inst, [1 2 3], 'correct elements with array' inst = Typed.from {0:1, 1:2, 2:3, length:3} assert.ok inst instanceof Typed, 'correct instance with array-like' assert.arrayEqual inst, [1 2 3], 'correct elements with array-like' inst = Typed.from createIterable [1 2 3] assert.ok inst instanceof Typed, 'correct instance with iterable' assert.arrayEqual inst, [1 2 3], 'correct elements with iterable' assert.arrayEqual Typed.from([1 2 3], -> it * it), [1 4 9], 'accept callback' Typed.from [1], (a, b)-> assert.same &length, 2, 'correct number of callback arguments' assert.same a, 1, 'correct value in callback' assert.same b, 0, 'correct index in callback' assert.same @, O, 'correct callback context' , O = {} assert.throws (!-> Typed.from.call void, []), "isn't generic #1" if NATIVE assert.throws (!-> Typed.from.call Array, []), "isn't generic #2" # fails in FF assert.ok (try Typed.from {length: -1, 0: 1}, !-> throw 42), 'uses ToLength'core-js-2.4.1/tests/tests/es6.typed.methods.index-of.ls000066400000000000000000000016711274277553300227430ustar00rootroot00000000000000{module, test} = QUnit module \ES6 DESCRIPTORS and test '%TypedArrayPrototype%.indexOf' (assert)!-> # we can't implement %TypedArrayPrototype% in all engines, so run all tests for each typed array constructor for <[Float32Array Float64Array Int8Array Int16Array Int32Array Uint8Array Uint16Array Uint32Array Uint8ClampedArray]> Typed = global[..] assert.isFunction Typed::indexOf, "#{..}::indexOf is function" assert.arity Typed::indexOf, 1, "#{..}::indexOf arity is 1" assert.name Typed::indexOf, \indexOf, "#{..}::indexOf name is 'indexOf'" assert.looksNative Typed::indexOf, "#{..}::indexOf looks native" assert.same new Typed([1 1 1])indexOf(1), 0 assert.same new Typed([1 2 3])indexOf(1 1), -1 assert.same new Typed([1 2 3])indexOf(2 1), 1 assert.same new Typed([1 2 3])indexOf(2 -1), -1 assert.same new Typed([1 2 3])indexOf(2 -2), 1 assert.throws (!-> Typed::indexOf.call [1 2], 1), "isn't generic"core-js-2.4.1/tests/tests/es6.typed.methods.iterator.ls000066400000000000000000000102301274277553300230520ustar00rootroot00000000000000{module, test} = QUnit module \ES6 arrays = <[Float32Array Float64Array Int8Array Int16Array Int32Array Uint8Array Uint16Array Uint32Array Uint8ClampedArray]> DESCRIPTORS and test '%TypedArrayPrototype%.keys' (assert)!-> # we can't implement %TypedArrayPrototype% in all engines, so run all tests for each typed array constructor for arrays Typed = global[..] assert.isFunction Typed::keys, "#{..}::keys is function" assert.arity Typed::keys, 0, "#{..}::keys arity is 0" assert.name Typed::keys, \keys, "#{..}::keys name is 'keys'" assert.looksNative Typed::keys, "#{..}::keys looks native" iter = new Typed([1 2 3])keys! assert.isIterator iter assert.isIterable iter assert.strictEqual iter[Symbol?toStringTag], 'Array Iterator' assert.deepEqual iter.next!, {value: 0, done: no}, 'step 1' assert.deepEqual iter.next!, {value: 1, done: no}, 'step 2' assert.deepEqual iter.next!, {value: 2, done: no}, 'step 3' assert.deepEqual iter.next!, {value: void, done: on}, 'done' NATIVE and assert.throws (!-> Typed::keys.call [1 2]), "isn't generic" # fails in V8 and edge DESCRIPTORS and test '%TypedArrayPrototype%.values' (assert)!-> # we can't implement %TypedArrayPrototype% in all engines, so run all tests for each typed array constructor for arrays Typed = global[..] assert.isFunction Typed::values, "#{..}::values is function" assert.arity Typed::values, 0, "#{..}::values arity is 0" assert.name Typed::values, \values, "#{..}::values name is 'values'" assert.looksNative Typed::values, "#{..}::values looks native" iter = new Typed([1 2 3])values! assert.isIterator iter assert.isIterable iter assert.strictEqual iter[Symbol?toStringTag], 'Array Iterator' assert.deepEqual iter.next!, {value: 1, done: no}, 'step 1' assert.deepEqual iter.next!, {value: 2, done: no}, 'step 2' assert.deepEqual iter.next!, {value: 3, done: no}, 'step 3' assert.deepEqual iter.next!, {value: void, done: on}, 'done' NATIVE and assert.throws (!-> Typed::values.call [1 2]), "isn't generic" # fails in V8 and edge DESCRIPTORS and test '%TypedArrayPrototype%.entries' (assert)!-> # we can't implement %TypedArrayPrototype% in all engines, so run all tests for each typed array constructor for arrays Typed = global[..] assert.isFunction Typed::entries, "#{..}::entries is function" assert.arity Typed::entries, 0, "#{..}::entries arity is 0" assert.name Typed::entries, \entries, "#{..}::entries name is 'entries'" assert.looksNative Typed::entries, "#{..}::entries looks native" iter = new Typed([1 2 3])entries! assert.isIterator iter assert.isIterable iter assert.strictEqual iter[Symbol?toStringTag], 'Array Iterator' assert.deepEqual iter.next!, {value: [0 1], done: no}, 'step 1' assert.deepEqual iter.next!, {value: [1 2], done: no}, 'step 2' assert.deepEqual iter.next!, {value: [2 3], done: no}, 'step 3' assert.deepEqual iter.next!, {value: void, done: on}, 'done' NATIVE and assert.throws (!-> Typed::entries.call [1 2]), "isn't generic" # fails in V8 and edge DESCRIPTORS and test '%TypedArrayPrototype%.@@iterator' (assert)!-> # we can't implement %TypedArrayPrototype% in all engines, so run all tests for each typed array constructor for arrays Typed = global[..] assert.isIterable Typed::, "#{..} is itrable" assert.arity Typed::[Symbol?iterator], 0, "#{..}::@@iterator arity is 0" assert.name Typed::[Symbol?iterator], \values, "#{..}::@@iterator name is 'values'" assert.looksNative Typed::[Symbol?iterator], "#{..}::@@iterator looks native" assert.strictEqual Typed::[Symbol?iterator], Typed::values iter = new Typed([1 2 3])[Symbol?iterator]! assert.isIterator iter assert.isIterable iter assert.strictEqual iter[Symbol?toStringTag], 'Array Iterator' assert.deepEqual iter.next!, {value: 1, done: no}, 'step 1' assert.deepEqual iter.next!, {value: 2, done: no}, 'step 2' assert.deepEqual iter.next!, {value: 3, done: no}, 'step 3' assert.deepEqual iter.next!, {value: void, done: on}, 'done' NATIVE and assert.throws (!-> Typed::[Symbol?iterator]call [1 2]), "isn't generic" # fails in V8 and edgecore-js-2.4.1/tests/tests/es6.typed.methods.join.ls000066400000000000000000000014261274277553300221670ustar00rootroot00000000000000{module, test} = QUnit module \ES6 DESCRIPTORS and test '%TypedArrayPrototype%.join' (assert)!-> # we can't implement %TypedArrayPrototype% in all engines, so run all tests for each typed array constructor for <[Float32Array Float64Array Int8Array Int16Array Int32Array Uint8Array Uint16Array Uint32Array Uint8ClampedArray]> Typed = global[..] assert.isFunction Typed::join, "#{..}::join is function" assert.arity Typed::join, 1, "#{..}::join arity is 1" assert.name Typed::join, \join, "#{..}::join name is 'join'" assert.looksNative Typed::join, "#{..}::join looks native" assert.same new Typed([1 2 3])join('|'), '1|2|3', 'works #1' assert.same new Typed([1 2 3])join!, '1,2,3', 'works #2' assert.throws (!-> Typed::join.call [1 2 3]), "isn't generic"core-js-2.4.1/tests/tests/es6.typed.methods.last-index-of.ls000066400000000000000000000017751274277553300237110ustar00rootroot00000000000000{module, test} = QUnit module \ES6 DESCRIPTORS and test '%TypedArrayPrototype%.lastIndexOf' (assert)!-> # we can't implement %TypedArrayPrototype% in all engines, so run all tests for each typed array constructor for <[Float32Array Float64Array Int8Array Int16Array Int32Array Uint8Array Uint16Array Uint32Array Uint8ClampedArray]> Typed = global[..] assert.isFunction Typed::lastIndexOf, "#{..}::lastIndexOf is function" assert.arity Typed::lastIndexOf, 1, "#{..}::lastIndexOf arity is 1" assert.name Typed::lastIndexOf, \lastIndexOf, "#{..}::lastIndexOf name is 'lastIndexOf'" assert.looksNative Typed::lastIndexOf, "#{..}::lastIndexOf looks native" assert.same new Typed([1 1 1])lastIndexOf(1), 2 assert.same new Typed([1 2 3])lastIndexOf(3 1), -1 assert.same new Typed([1 2 3])lastIndexOf(2 1), 1 assert.same new Typed([1 2 3])lastIndexOf(2 -3), -1 assert.same new Typed([1 2 3])lastIndexOf(2 -2), 1 assert.throws (!-> Typed::lastIndexOf.call [1 2], 1), "isn't generic"core-js-2.4.1/tests/tests/es6.typed.methods.map.ls000066400000000000000000000024261274277553300220060ustar00rootroot00000000000000{module, test} = QUnit module \ES6 DESCRIPTORS and test '%TypedArrayPrototype%.map' (assert)!-> # we can't implement %TypedArrayPrototype% in all engines, so run all tests for each typed array constructor for <[Float32Array Float64Array Int8Array Int16Array Int32Array Uint8Array Uint16Array Uint32Array Uint8ClampedArray]> Typed = global[..] assert.isFunction Typed::map, "#{..}::map is function" assert.arity Typed::map, 1, "#{..}::map arity is 1" assert.name Typed::map, \map, "#{..}::map name is 'map'" assert.looksNative Typed::map, "#{..}::map looks native" (a = new Typed [1])map (val, key, that)-> assert.same &length, 3, 'correct number of callback arguments' assert.same val, 1, 'correct value in callback' assert.same key, 0, 'correct index in callback' assert.same that, a, 'correct link to array in callback' assert.same @, ctx, 'correct callback context' , ctx = {} instance = new Typed([1 2 3 4 5])map (* 2) assert.ok instance instanceof Typed, 'correct instance' assert.arrayEqual instance, [2 4 6 8 10], 'works' v = '' k = '' new Typed([1 2 3])map (a, b)!-> v += a k += b assert.same v, \123 assert.same k, \012 assert.throws (!-> Typed::map.call [0], -> on), "isn't generic"core-js-2.4.1/tests/tests/es6.typed.methods.of.ls000066400000000000000000000023121274277553300216270ustar00rootroot00000000000000{module, test} = QUnit module \ES6 DESCRIPTORS and test '%TypedArray%.of' (assert)!-> # we can't implement %TypedArray% in all engines, so run all tests for each typed array constructor for <[Float32Array Float64Array Int8Array Int16Array Int32Array Uint8Array Uint16Array Uint32Array Uint8ClampedArray]> Typed = global[..] assert.isFunction Typed.of, "#{..}.of is function" assert.arity Typed.of, 0, "#{..}.of arity is 0" assert.name Typed.of, \of, "#{..}.of name is 'of'" assert.looksNative Typed.of, "#{..}.of looks native" inst = Typed.of! assert.ok inst instanceof Typed, 'correct instance with 0 arguments' assert.arrayEqual inst, [], 'correct elements with 0 arguments' inst = Typed.of 1 assert.ok inst instanceof Typed, 'correct instance with 1 argument' assert.arrayEqual inst, [1], 'correct elements with 1 argument' inst = Typed.of 1 2 3 assert.ok inst instanceof Typed, 'correct instance with several arguments' assert.arrayEqual inst, [1 2 3], 'correct elements with several arguments' assert.throws (!-> Typed.of.call void, 1), "isn't generic #1" NATIVE and assert.throws (!-> Typed.of.call Array, 1), "isn't generic #2" # fails in V8 and FFcore-js-2.4.1/tests/tests/es6.typed.methods.reduce-right.ls000066400000000000000000000033731274277553300236150ustar00rootroot00000000000000{module, test} = QUnit module \ES6 DESCRIPTORS and test '%TypedArrayPrototype%.reduceRight' (assert)!-> # we can't implement %TypedArrayPrototype% in all engines, so run all tests for each typed array constructor for <[Float32Array Float64Array Int8Array Int16Array Int32Array Uint8Array Uint16Array Uint32Array Uint8ClampedArray]> Typed = global[..] assert.isFunction Typed::reduceRight, "#{..}::reduceRight is function" assert.arity Typed::reduceRight, 1, "#{..}::reduceRight arity is 1" assert.name Typed::reduceRight, \reduceRight, "#{..}::reduceRight name is 'reduceRight'" assert.looksNative Typed::reduceRight, "#{..}::reduceRight looks native" (a = new Typed [1])reduceRight (memo, val, key, that)-> assert.same &length, 4, 'correct number of callback arguments' assert.same memo, accumulator, 'correct callback accumulator' assert.same val, 1, 'correct value in callback' assert.same key, 0, 'correct index in callback' assert.same that, a, 'correct link to array in callback' , accumulator = {} assert.same new Typed([1 2 3])reduceRight((+), 1), 7, 'works with initial accumulator' (a = new Typed [1 2])reduceRight (memo, val, key, that)-> assert.same memo, 2, 'correct default accumulator' assert.same val, 1, 'correct start value without initial accumulator' assert.same key, 0, 'correct start index without initial accumulator' assert.same new Typed([1 2 3])reduceRight((+)), 6, 'works without initial accumulator' v = '' k = '' new Typed([1 2 3])reduceRight (memo, a, b)!-> v += a k += b , 0 assert.same v, \321,'correct order #1' assert.same k, \210,'correct order #2' assert.throws (!-> Typed::reduceRight.call [0], -> on), "isn't generic"core-js-2.4.1/tests/tests/es6.typed.methods.reduce.ls000066400000000000000000000032471274277553300225020ustar00rootroot00000000000000{module, test} = QUnit module \ES6 DESCRIPTORS and test '%TypedArrayPrototype%.reduce', (assert)!-> # we can't implement %TypedArrayPrototype% in all engines, so run all tests for each typed array constructor for <[Float32Array Float64Array Int8Array Int16Array Int32Array Uint8Array Uint16Array Uint32Array Uint8ClampedArray]> Typed = global[..] assert.isFunction Typed::reduce, "#{..}::reduce is function" assert.arity Typed::reduce, 1, "#{..}::reduce arity is 1" assert.name Typed::reduce, \reduce, "#{..}::reduce name is 'reduce'" assert.looksNative Typed::reduce, "#{..}::reduce looks native" (a = new Typed [1])reduce (memo, val, key, that)-> assert.same &length, 4, 'correct number of callback arguments' assert.same memo, accumulator, 'correct callback accumulator' assert.same val, 1, 'correct value in callback' assert.same key, 0, 'correct index in callback' assert.same that, a, 'correct link to array in callback' , accumulator = {} assert.same new Typed([1 2 3])reduce((+), 1), 7, 'works with initial accumulator' (a = new Typed [1 2])reduce (memo, val, key, that)-> assert.same memo, 1, 'correct default accumulator' assert.same val, 2, 'correct start value without initial accumulator' assert.same key, 1, 'correct start index without initial accumulator' assert.same new Typed([1 2 3])reduce((+)), 6, 'works without initial accumulator' v = '' k = '' new Typed([1 2 3])reduce (memo, a, b)!-> v += a k += b , 0 assert.same v, \123,'correct order #1' assert.same k, \012,'correct order #2' assert.throws (!-> Typed::reduce.call [0], -> on), "isn't generic"core-js-2.4.1/tests/tests/es6.typed.methods.reverse.ls000066400000000000000000000016121274277553300227000ustar00rootroot00000000000000{module, test} = QUnit module \ES6 DESCRIPTORS and test '%TypedArrayPrototype%.reverse' (assert)!-> # we can't implement %TypedArrayPrototype% in all engines, so run all tests for each typed array constructor for <[Float32Array Float64Array Int8Array Int16Array Int32Array Uint8Array Uint16Array Uint32Array Uint8ClampedArray]> Typed = global[..] assert.isFunction Typed::reverse, "#{..}::reverse is function" assert.arity Typed::reverse, 0, "#{..}::reverse arity is 0" assert.name Typed::reverse, \reverse, "#{..}::reverse name is 'reverse'" assert.looksNative Typed::reverse, "#{..}::reverse looks native" assert.same (a = new Typed [1 2])reverse!, a, 'return this' assert.arrayEqual new Typed([1 2 3 4])reverse!, [4 3 2 1], 'works #1' assert.arrayEqual new Typed([1 2 3])reverse!, [3 2 1], 'works #2' assert.throws (!-> Typed::reverse.call [1 2]), "isn't generic"core-js-2.4.1/tests/tests/es6.typed.methods.set.ls000066400000000000000000000023411274277553300220200ustar00rootroot00000000000000{module, test} = QUnit module \ES6 DESCRIPTORS and test '%TypedArrayPrototype%.set' (assert)!-> # we can't implement %TypedArrayPrototype% in all engines, so run all tests for each typed array constructor for <[Float32Array Float64Array Int8Array Int16Array Int32Array Uint8Array Uint16Array Uint32Array Uint8ClampedArray]> Typed = global[..] assert.isFunction Typed::set, "#{..}::set is function" NATIVE and assert.arity Typed::set, 1, "#{..}::set arity is 1" # 2 in most engines assert.name Typed::set, \set, "#{..}::set name is 'subarray'" assert.looksNative Typed::set, "#{..}::set looks native" assert.same new Typed(1).set([1]), void, 'void' a = new Typed [1 2 3 4 5] b = new Typed 5 b.set a assert.arrayEqual b, [1 2 3 4 5] assert.throws !-> b.set a, 1 assert.throws !-> b.set a, -1 b.set new Typed([99, 98]), 2 assert.arrayEqual b, [1 2 99 98 5] b.set new Typed([99 98 97]), 2 assert.arrayEqual b, [1 2 99 98 97] assert.throws !-> b.set new Typed([99 98 97 96]), 2 assert.throws !-> b.set [101, 102, 103, 104], 4 assert.arrayEqual (new Typed(2) ..set length: 2, 0: 1, 1: 2 ), [1 2] assert.throws (!-> Typed::set.call [1 2 3], [1]), "isn't generic"core-js-2.4.1/tests/tests/es6.typed.methods.slice.ls000066400000000000000000000022271274277553300223270ustar00rootroot00000000000000{module, test} = QUnit module \ES6 DESCRIPTORS and test '%TypedArrayPrototype%.slice' (assert)!-> # we can't implement %TypedArrayPrototype% in all engines, so run all tests for each typed array constructor for <[Float32Array Float64Array Int8Array Int16Array Int32Array Uint8Array Uint16Array Uint32Array Uint8ClampedArray]> Typed = global[..] assert.isFunction Typed::slice, "#{..}::slice is function" NATIVE and assert.arity Typed::slice, 2, "#{..}::slice arity is 2" assert.name Typed::slice, \slice, "#{..}::slice name is 'subarray'" assert.looksNative Typed::slice, "#{..}::slice looks native" arr = new Typed [1 2 3 4 5] assert.ok arr.slice! isnt arr, 'returns new array' assert.ok arr.slice! instanceof Typed, 'correct instance' assert.ok arr.slice!buffer isnt arr.buffer, 'with new buffer' assert.arrayEqual arr.slice!, arr assert.arrayEqual arr.slice(1 3), [2 3] assert.arrayEqual arr.slice(1 void), [2 3 4 5] assert.arrayEqual arr.slice(1 -1), [2 3 4] assert.arrayEqual arr.slice(-2 -1), [4] assert.arrayEqual arr.slice(-2 -3), [] assert.throws (!-> Typed::slice.call [1 2 3], 1), "isn't generic"core-js-2.4.1/tests/tests/es6.typed.methods.some.ls000066400000000000000000000026221274277553300221720ustar00rootroot00000000000000{module, test} = QUnit module \ES6 DESCRIPTORS and test '%TypedArrayPrototype%.some' (assert)!-> # we can't implement %TypedArrayPrototype% in all engines, so run all tests for each typed array constructor for <[Float32Array Float64Array Int8Array Int16Array Int32Array Uint8Array Uint16Array Uint32Array Uint8ClampedArray]> Typed = global[..] assert.isFunction Typed::some, "#{..}::some is function" assert.arity Typed::some, 1, "#{..}::some arity is 1" assert.name Typed::some, \some, "#{..}::some name is 'some'" assert.looksNative Typed::some, "#{..}::some looks native" (a = new Typed [1])some (val, key, that)-> assert.same &length, 3, 'correct number of callback arguments' assert.same val, 1, 'correct value in callback' assert.same key, 0, 'correct index in callback' assert.same that, a, 'correct link to array in callback' assert.same @, ctx, 'correct callback context' , ctx = {} assert.ok new Typed([1 2 3])some -> typeof it is \number assert.ok new Typed([1 2 3])some (<3) assert.ok not new Typed([1 2 3])some (<0) assert.ok not new Typed([1 2 3])some -> typeof it is \string v = '' k = '' new Typed([1 2 3])some (a, b)!-> v += a k += b assert.same v, \123 assert.same k, \012 assert.ok (arr = new Typed [1 2 3])some -> &2 is arr assert.throws (!-> Typed::some.call [0], -> on), "isn't generic"core-js-2.4.1/tests/tests/es6.typed.methods.subarray.ls000066400000000000000000000025741274277553300230650ustar00rootroot00000000000000{module, test} = QUnit module \ES6 DESCRIPTORS and test '%TypedArrayPrototype%.subarray' (assert)!-> # we can't implement %TypedArrayPrototype% in all engines, so run all tests for each typed array constructor for <[Float32Array Float64Array Int8Array Int16Array Int32Array Uint8Array Uint16Array Uint32Array Uint8ClampedArray]> Typed = global[..] assert.isFunction Typed::subarray, "#{..}::subarray is function" NATIVE and assert.arity Typed::subarray, 2, "#{..}::subarray arity is 2" # Chromium 29- bug assert.name Typed::subarray, \subarray, "#{..}::subarray name is 'subarray'" assert.looksNative Typed::subarray, "#{..}::subarray looks native" a = new Typed [1 2 3 4 5] b = a.subarray(3) assert.ok a != b, 'creates new array' assert.ok b instanceof Typed, "instance #{..}" assert.same a.buffer, b.buffer, 'with the same buffer' assert.arrayEqual b, [4 5] assert.arrayEqual a.subarray(1 3), [2 3] assert.arrayEqual a.subarray(-3), [3 4 5] assert.arrayEqual a.subarray(-3 -1), [3 4] assert.arrayEqual a.subarray(3 2), [] assert.arrayEqual a.subarray(-2 -3), [] assert.arrayEqual a.subarray(4 1), [] assert.arrayEqual a.subarray(-1 -4), [] assert.arrayEqual a.subarray(1).subarray(1), [3 4 5] assert.arrayEqual a.subarray(1 4).subarray(1 2), [3] assert.throws (!-> Typed::subarray.call [1 2 3], 1), "isn't generic"core-js-2.4.1/tests/tests/es6.typed.methods.to-locale-string.ls000066400000000000000000000015431274277553300244130ustar00rootroot00000000000000{module, test} = QUnit module \ES6 DESCRIPTORS and test '%TypedArrayPrototype%.toLocaleString' (assert)!-> # we can't implement %TypedArrayPrototype% in all engines, so run all tests for each typed array constructor for <[Float32Array Float64Array Int8Array Int16Array Int32Array Uint8Array Uint16Array Uint32Array Uint8ClampedArray]> Typed = global[..] assert.isFunction Typed::toLocaleString, "#{..}::toLocaleString is function" assert.arity Typed::toLocaleString, 0, "#{..}::toLocaleString arity is 0" assert.name Typed::toLocaleString, \toLocaleString, "#{..}::toLocaleString name is 'toLocaleString'" assert.looksNative Typed::toLocaleString, "#{..}::toLocaleString looks native" assert.same new Typed([1 2 3])toLocaleString!, [1 2 3]toLocaleString!, 'works' assert.throws (!-> Typed::toLocaleString.call [1 2 3]), "isn't generic"core-js-2.4.1/tests/tests/es6.typed.methods.to-string.ls000066400000000000000000000014011274277553300231470ustar00rootroot00000000000000{module, test} = QUnit module \ES6 DESCRIPTORS and test '%TypedArrayPrototype%.toString' (assert)!-> # we can't implement %TypedArrayPrototype% in all engines, so run all tests for each typed array constructor for <[Float32Array Float64Array Int8Array Int16Array Int32Array Uint8Array Uint16Array Uint32Array Uint8ClampedArray]> Typed = global[..] assert.isFunction Typed::toString, "#{..}::toString is function" assert.arity Typed::toString, 0 "#{..}::toString arity is 0" assert.name Typed::toString, \toString, "#{..}::toString name is 'toString'" assert.looksNative Typed::toString, "#{..}::toString looks native" assert.same new Typed([1 2 3])toString!, '1,2,3', 'works' assert.same Typed::toString.call([1 2 3]), '1,2,3', "generic"core-js-2.4.1/tests/tests/es6.weak-map.ls000066400000000000000000000101601274277553300201370ustar00rootroot00000000000000{module, test} = QUnit module \ES6 {freeze} = Object test 'WeakMap' (assert)!-> assert.isFunction WeakMap assert.name WeakMap, \WeakMap assert.arity WeakMap, 0 assert.looksNative WeakMap assert.ok \delete of WeakMap::, 'delete in WeakMap.prototype' assert.ok \get of WeakMap::, 'get in WeakMap.prototype' assert.ok \has of WeakMap::, 'has in WeakMap.prototype' assert.ok \set of WeakMap::, 'set in WeakMap.prototype' assert.ok new WeakMap instanceof WeakMap, 'new WeakMap instanceof WeakMap' assert.strictEqual new WeakMap(createIterable [[a = {}, 42]]).get(a), 42, 'Init from iterable' assert.strictEqual (new WeakMap! ..set f = freeze({}), 42 )get(f), 42, 'Support frozen objects' M = new WeakMap M.set freeze(f = {}), 42 assert.strictEqual M.has(f), on assert.strictEqual M.get(f), 42 M.delete f assert.strictEqual M.has(f), no assert.strictEqual M.get(f), void # return #throw done = no iter = createIterable [null, 1, 2], return: -> done := on try => new WeakMap iter assert.ok done, '.return #throw' assert.ok !(\clear of WeakMap::), 'should not contains `.clear` method' # call @@iterator in Array with custom iterator a = [] done = no a[Symbol?iterator] = -> done := on [][Symbol?iterator]call @ new WeakMap a assert.ok done o = {} new WeakMap!set o, 1 if DESCRIPTORS assert.arrayEqual [key for key of o], [] assert.arrayEqual Object.keys(o), [] assert.arrayEqual Object.getOwnPropertyNames(o), [] Object?getOwnPropertySymbols and assert.arrayEqual Object.getOwnPropertySymbols(o), [] Reflect?ownKeys and assert.arrayEqual Reflect.ownKeys(o), [] if nativeSubclass C = nativeSubclass WeakMap assert.ok new C instanceof C, 'correct subclassing with native classes #1' assert.ok new C instanceof WeakMap, 'correct subclassing with native classes #2' assert.same new C!set(O = {}, 2).get(O), 2, 'correct subclassing with native classes #3' test 'WeakMap#delete' (assert)!-> assert.isFunction WeakMap::delete NATIVE and assert.name WeakMap::delete, \delete # can't be polyfilled in some environments NATIVE and assert.arity WeakMap::delete, 1 assert.looksNative WeakMap::delete assert.nonEnumerable WeakMap::, \delete M = new WeakMap! ..set a = {}, 42 ..set b = {}, 21 assert.ok M.has(a) && M.has(b), 'WeakMap has values before .delete()' M.delete a assert.ok !M.has(a) && M.has(b), 'WeakMap hasn`t value after .delete()' assert.ok (try !M.delete 1), 'return false on primitive' test 'WeakMap#get' (assert)!-> assert.isFunction WeakMap::get assert.name WeakMap::get, \get NATIVE and assert.arity WeakMap::get, 1 assert.looksNative WeakMap::get assert.nonEnumerable WeakMap::, \get M = new WeakMap! assert.strictEqual M.get({}), void, 'WeakMap .get() before .set() return undefined' M.set a = {}, 42 assert.strictEqual M.get(a), 42, 'WeakMap .get() return value' M.delete a assert.strictEqual M.get(a), void, 'WeakMap .get() after .delete() return undefined' assert.ok (try void is M.get 1), 'return undefined on primitive' test 'WeakMap#has' (assert)!-> assert.isFunction WeakMap::has assert.name WeakMap::has, \has NATIVE and assert.arity WeakMap::has, 1 assert.looksNative WeakMap::has assert.nonEnumerable WeakMap::, \has M = new WeakMap! assert.ok !M.has({}), 'WeakMap .has() before .set() return false' M.set a = {}, 42 assert.ok M.has(a), 'WeakMap .has() return true' M.delete a assert.ok !M.has(a), 'WeakMap .has() after .delete() return false' assert.ok (try !M.has 1), 'return false on primitive' test 'WeakMap#set' (assert)!-> assert.isFunction WeakMap::set assert.name WeakMap::set, \set assert.arity WeakMap::set, 2 assert.looksNative WeakMap::set assert.nonEnumerable WeakMap::, \set assert.same (new WeakMap! ..set a = {}, 42 )get(a), 42, 'works with object as keys' assert.ok (try new WeakMap!set(42, 42); no; catch => on), 'throws with primitive keys' wmap = new WeakMap! assert.same wmap.set({}, 1), wmap, 'return this' test 'WeakMap#@@toStringTag' (assert)!-> assert.strictEqual WeakMap::[Symbol?toStringTag], \WeakMap, 'WeakMap::@@toStringTag is `WeakMap`'core-js-2.4.1/tests/tests/es6.weak-set.ls000066400000000000000000000064541274277553300201700ustar00rootroot00000000000000{module, test} = QUnit module \ES6 {freeze} = Object test 'WeakSet' (assert)!-> assert.isFunction WeakSet assert.name WeakSet, \WeakSet assert.arity WeakSet, 0 assert.looksNative WeakSet assert.ok \add of WeakSet::, 'add in WeakSet.prototype' assert.ok \delete of WeakSet::, 'delete in WeakSet.prototype' assert.ok \has of WeakSet::, 'has in WeakSet.prototype' assert.ok new WeakSet instanceof WeakSet, 'new WeakSet instanceof WeakSet' assert.ok new WeakSet(createIterable [a = {}]).has(a), 'Init from iterable' assert.ok (new WeakSet! ..add freeze f = {} ).has(f), 'Support frozen objects' S = new WeakSet S.add freeze f = {} assert.strictEqual S.has(f), on S.delete f assert.strictEqual S.has(f), no # return #throw done = no iter = createIterable [null, 1, 2], return: -> done := on try => new WeakSet iter assert.ok done, '.return #throw' assert.ok !(\clear of WeakSet::), 'should not contains `.clear` method' # call @@iterator in Array with custom iterator a = [] done = no a[Symbol?iterator] = -> done := on [][Symbol?iterator]call @ new WeakSet a assert.ok done o = {} new WeakSet!add o if DESCRIPTORS assert.arrayEqual [key for key of o], [] assert.arrayEqual Object.keys(o), [] assert.arrayEqual Object.getOwnPropertyNames(o), [] Object?getOwnPropertySymbols and assert.arrayEqual Object.getOwnPropertySymbols(o), [] Reflect?ownKeys and assert.arrayEqual Reflect.ownKeys(o), [] if nativeSubclass C = nativeSubclass WeakSet assert.ok new C instanceof C, 'correct subclassing with native classes #1' assert.ok new C instanceof WeakSet, 'correct subclassing with native classes #2' assert.ok new C!add(O = {}).has(O), 'correct subclassing with native classes #3' test 'WeakSet#add' (assert)!-> assert.isFunction WeakSet::add assert.name WeakSet::add, \add assert.arity WeakSet::add, 1 assert.looksNative WeakSet::add assert.nonEnumerable WeakSet::, \add assert.ok new WeakSet!add(a = {}), 'works with object as keys' assert.ok (try new WeakSet!add(42); no; catch => on), 'throws with primitive keys' wset = new WeakSet! assert.same wset.add({}), wset, 'return this' test 'WeakSet#delete' (assert)!-> assert.isFunction WeakSet::delete NATIVE and #assert.name WeakSet::delete, \delete # can't be polyfilled in some environments assert.arity WeakSet::delete, 1 assert.looksNative WeakSet::delete assert.nonEnumerable WeakSet::, \delete S = new WeakSet! ..add a = {} ..add b = {} assert.ok S.has(a) && S.has(b), 'WeakSet has values before .delete()' S.delete a assert.ok !S.has(a) && S.has(b), 'WeakSet hasn`t value after .delete()' assert.ok (try !S.delete 1), 'return false on primitive' test 'WeakSet#has' (assert)!-> assert.isFunction WeakSet::has assert.name WeakSet::has, \has assert.arity WeakSet::has, 1 assert.looksNative WeakSet::has assert.nonEnumerable WeakSet::, \has M = new WeakSet! assert.ok not M.has({}), 'WeakSet has`nt value' M.add a = {} assert.ok M.has(a), 'WeakSet has value after .add()' M.delete a assert.ok not M.has(a), 'WeakSet has`nt value after .delete()' assert.ok (try !M.has 1), 'return false on primitive' test 'WeakSet::@@toStringTag' (assert)!-> assert.strictEqual WeakSet::[Symbol?toStringTag], \WeakSet, 'WeakSet::@@toStringTag is `WeakSet`'core-js-2.4.1/tests/tests/es7.array.includes.ls000066400000000000000000000016331274277553300213660ustar00rootroot00000000000000{module, test} = QUnit module \ES7 test 'Array#includes' (assert)!-> assert.isFunction Array::includes assert.name Array::includes, \includes assert.arity Array::includes, 1 assert.looksNative Array::includes assert.nonEnumerable Array::, \includes arr = [1 2 3 -0 o = {}] assert.ok arr.includes 1 assert.ok arr.includes -0 assert.ok arr.includes 0 assert.ok arr.includes o assert.ok !arr.includes 4 assert.ok !arr.includes -0.5 assert.ok !arr.includes {} assert.ok Array(1)includes void assert.ok [NaN].includes(NaN) if STRICT assert.throws (!-> Array::includes.call null, 0), TypeError assert.throws (!-> Array::includes.call void, 0), TypeError if NATIVE and DESCRIPTORS assert.ok (try no is Array::includes.call Object.defineProperty({length: -1}, 0, get: -> throw Error!), 1), 'uses ToLength' assert.ok \includes of Array::[Symbol.unscopables], 'In Array#@@unscopables'core-js-2.4.1/tests/tests/es7.asap.ls000066400000000000000000000006271274277553300173710ustar00rootroot00000000000000{module, test} = QUnit module 'ES6' test 'asap' (assert)-> assert.expect 5 assert.isFunction asap assert.arity asap, 1 assert.name asap, \asap assert.looksNative asap async = assert.async! done = no asap !-> if !done done := on assert.ok after, \works async! setTimeout (!-> if !done done := on assert.ok no, \fails async! ), 3e3 after = oncore-js-2.4.1/tests/tests/es7.error.is-error.ls000066400000000000000000000005311274277553300213310ustar00rootroot00000000000000{module, test} = QUnit module \ES7 test 'Error.isError' (assert)!-> {isError} = Error assert.isFunction isError assert.arity isError, 1 assert.name isError, \isError assert.looksNative isError assert.nonEnumerable Error, \isError assert.same isError(new TypeError), on assert.same isError({}), no assert.same isError(null), nocore-js-2.4.1/tests/tests/es7.map.to-json.ls000066400000000000000000000005311274277553300206040ustar00rootroot00000000000000{module, test} = QUnit module \ES7 test 'Map#toJSON' (assert)!-> assert.isFunction Map::toJSON assert.name Map::toJSON, \toJSON assert.arity Map::toJSON, 0 assert.looksNative Map::toJSON assert.nonEnumerable Map::, \toJSON if JSON? assert.strictEqual JSON.stringify(new Map [[\a \b], [\c \d]] ), '[["a","b"],["c","d"]]', 'Works'core-js-2.4.1/tests/tests/es7.math.iaddh.ls000066400000000000000000000006211274277553300204400ustar00rootroot00000000000000{module, test} = QUnit module \ES7 test 'Math.iaddh' (assert)!-> {iaddh} = Math assert.isFunction iaddh assert.name iaddh, \iaddh assert.arity iaddh, 4 assert.looksNative iaddh assert.nonEnumerable Math, \iaddh assert.same iaddh(0 2 1 0), 2 assert.same iaddh(0 4 1 1), 5 assert.same iaddh(2 4 1 1), 5 assert.same iaddh(0xffffffff 4 1 1), 6 assert.same iaddh(1 4 0xffffffff 1), 6core-js-2.4.1/tests/tests/es7.math.imulh.ls000066400000000000000000000005441274277553300205110ustar00rootroot00000000000000{module, test} = QUnit module \ES7 test 'Math.imulh' (assert)!-> {imulh} = Math assert.isFunction imulh assert.name imulh, \imulh assert.arity imulh, 2 assert.looksNative imulh assert.nonEnumerable Math, \imulh assert.same imulh(0xffffffff 7), -1 assert.same imulh(0xfffffff 77), 4 assert.same imulh(1 7), 0 assert.same imulh(-1 7), -1core-js-2.4.1/tests/tests/es7.math.isubh.ls000066400000000000000000000006211274277553300205010ustar00rootroot00000000000000{module, test} = QUnit module \ES7 test 'Math.isubh' (assert)!-> {isubh} = Math assert.isFunction isubh assert.name isubh, \isubh assert.arity isubh, 4 assert.looksNative isubh assert.nonEnumerable Math, \isubh assert.same isubh(0 2 1 0), 1 assert.same isubh(0 4 1 1), 2 assert.same isubh(2 4 1 1), 3 assert.same isubh(0xffffffff 4 1 1), 3 assert.same isubh(1 4 0xffffffff 1), 2core-js-2.4.1/tests/tests/es7.math.umulh.ls000066400000000000000000000005421274277553300205230ustar00rootroot00000000000000{module, test} = QUnit module \ES7 test 'Math.umulh' (assert)!-> {umulh} = Math assert.isFunction umulh assert.name umulh, \umulh assert.arity umulh, 2 assert.looksNative umulh assert.nonEnumerable Math, \umulh assert.same umulh(0xffffffff 7), 6 assert.same umulh(0xfffffff 77), 4 assert.same umulh(1 7), 0 assert.same umulh(-1 7), 6core-js-2.4.1/tests/tests/es7.object.define-getter.ls000066400000000000000000000012521274277553300224270ustar00rootroot00000000000000{module, test} = QUnit module \ES7 if DESCRIPTORS => test 'Object#__defineGetter__' (assert)!-> {__defineGetter__} = Object:: assert.isFunction __defineGetter__ assert.arity __defineGetter__, 2 assert.name __defineGetter__, \__defineGetter__ assert.looksNative __defineGetter__ assert.nonEnumerable Object::, \__defineGetter__ O = {} assert.same O.__defineGetter__(\key, -> 42), void, \void assert.same O.key, 42, \works O.__defineSetter__ \key, !-> @foo = 43 O.key = 44 assert.ok (O.key is 42 and O.foo is 43), 'works with setter' if STRICT => for [null void] assert.throws (!-> __defineGetter__.call .., 1 ->), TypeError, "Throws on #{..} as `this`"core-js-2.4.1/tests/tests/es7.object.define-setter.ls000066400000000000000000000013511274277553300224430ustar00rootroot00000000000000{module, test} = QUnit module \ES7 if DESCRIPTORS => test 'Object#__defineSetter__' (assert)!-> {__defineSetter__} = Object:: assert.isFunction __defineSetter__ assert.arity __defineSetter__, 2 assert.name __defineSetter__, \__defineSetter__ assert.looksNative __defineSetter__ assert.nonEnumerable Object::, \__defineSetter__ O = {} assert.same O.__defineSetter__(\key, !-> @foo = 43), void, \void O.key = 44 assert.same O.foo, 43, \works O = {} O.__defineSetter__ \key, !-> @foo = 43 O.__defineGetter__ \key, -> 42 O.key = 44 assert.ok (O.key is 42 and O.foo is 43), 'works with getter' if STRICT => for [null void] assert.throws (!-> __defineSetter__.call .., 1 ->), TypeError, "Throws on #{..} as `this`"core-js-2.4.1/tests/tests/es7.object.entries.ls000066400000000000000000000014271274277553300213620ustar00rootroot00000000000000{module, test} = QUnit module \ES7 test 'Object.entries' (assert)!-> {entries, create, assign} = Object assert.isFunction entries assert.arity entries, 1 assert.name entries, \entries assert.looksNative entries assert.nonEnumerable Object, \entries assert.deepEqual entries({q:1, w:2, e:3}), [[\q 1] [\w 2] [\e 3]] assert.deepEqual entries(new String \qwe), [[\0 \q] [\1 \w] [\2 \e]] assert.deepEqual entries(assign create({q:1, w:2, e:3}), {a:4, s:5, d:6}), [[\a 4] [\s 5] [\d 6]] try assert.deepEqual Function('return Object.entries({a: 1, get b(){delete this.c;return 2},c: 3})')!, [[\a 1], [\b 2]] try assert.deepEqual Function('return Object.entries({a: 1, get b(){Object.defineProperty(this, "c", {value:4,enumerable:false});return 2},c: 3})')!, [[\a 1], [\b 2]]core-js-2.4.1/tests/tests/es7.object.get-own-property-descriptors.ls000066400000000000000000000015171274277553300255120ustar00rootroot00000000000000{module, test} = QUnit module \ES7 {create} = Object test 'Object.getOwnPropertyDescriptors' (assert)!-> {getOwnPropertyDescriptors} = Object assert.isFunction getOwnPropertyDescriptors assert.arity getOwnPropertyDescriptors, 1 assert.name getOwnPropertyDescriptors, \getOwnPropertyDescriptors assert.looksNative getOwnPropertyDescriptors assert.nonEnumerable Object, \getOwnPropertyDescriptors O = create {q: 1}, e: value: 3 O.w = 2 s = Symbol \s O[s] = 4 descs = getOwnPropertyDescriptors O assert.strictEqual descs.q, void assert.deepEqual descs.w, {+enumerable, +configurable, +writable, value: 2} if DESCRIPTORS => assert.deepEqual descs.e, {-enumerable, -configurable, -writable, value: 3} else assert.deepEqual descs.e, {+enumerable, +configurable, +writable, value: 3} assert.strictEqual descs[s].value, 4core-js-2.4.1/tests/tests/es7.object.lookup-getter.ls000066400000000000000000000015241274277553300225100ustar00rootroot00000000000000{module, test} = QUnit module \ES7 if DESCRIPTORS => test 'Object#__lookupGetter__' (assert)!-> {__lookupGetter__} = Object:: {create} = Object assert.isFunction __lookupGetter__ assert.arity __lookupGetter__, 1 assert.name __lookupGetter__, \__lookupGetter__ assert.looksNative __lookupGetter__ assert.nonEnumerable Object::, \__lookupGetter__ assert.same {}.__lookupGetter__(\key), void, 'empty object' assert.same {key: 42}.__lookupGetter__(\key), void, 'data descriptor' O = {} F = -> O.__defineGetter__ \key F assert.same O.__lookupGetter__(\key), F, 'own getter' assert.same (create O)__lookupGetter__(\key), F, 'proto getter' assert.same (create O)__lookupGetter__(\foo), void, 'empty proto' if STRICT => for [null void] assert.throws (!-> __lookupGetter__.call .., 1), TypeError, "Throws on #{..} as `this`"core-js-2.4.1/tests/tests/es7.object.lookup-setter.ls000066400000000000000000000015241274277553300225240ustar00rootroot00000000000000{module, test} = QUnit module \ES7 if DESCRIPTORS => test 'Object#__lookupSetter__' (assert)!-> {__lookupSetter__} = Object:: {create} = Object assert.isFunction __lookupSetter__ assert.arity __lookupSetter__, 1 assert.name __lookupSetter__, \__lookupSetter__ assert.looksNative __lookupSetter__ assert.nonEnumerable Object::, \__lookupSetter__ assert.same {}.__lookupSetter__(\key), void, 'empty object' assert.same {key: 42}.__lookupSetter__(\key), void, 'data descriptor' O = {} F = -> O.__defineSetter__ \key F assert.same O.__lookupSetter__(\key), F, 'own setter' assert.same (create O)__lookupSetter__(\key), F, 'proto setter' assert.same (create O)__lookupSetter__(\foo), void, 'empty proto' if STRICT => for [null void] assert.throws (!-> __lookupSetter__.call .., 1), TypeError, "Throws on #{..} as `this`"core-js-2.4.1/tests/tests/es7.object.values.ls000066400000000000000000000013071274277553300212050ustar00rootroot00000000000000{module, test} = QUnit module \ES7 test 'Object.values' (assert)!-> {values, create, assign} = Object assert.isFunction values assert.arity values, 1 assert.name values, \values assert.looksNative values assert.nonEnumerable Object, \values assert.deepEqual values({q:1, w:2, e:3}), [1 2 3] assert.deepEqual values(new String \qwe), [\q \w \e] assert.deepEqual values(assign create({q:1, w:2, e:3}), {a:4, s:5, d:6}), [4 5 6] try assert.deepEqual Function('return Object.values({a: 1, get b(){delete this.c;return 2},c: 3})')!, [1 2] try assert.deepEqual Function('return Object.values({a: 1, get b(){Object.defineProperty(this, "c", {value:4,enumerable:false});return 2},c: 3})')!, [1 2]core-js-2.4.1/tests/tests/es7.observable.ls000066400000000000000000000046301274277553300205670ustar00rootroot00000000000000'use strict' {module, test} = QUnit module \ES7 test \Observable (assert)!-> assert.isFunction Observable assert.arity Observable, 1 assert.name Observable, \Observable assert.looksNative Observable assert.throws (!-> Observable ->), 'throws w/o `new`' obsevable = new Observable (subscriptionObserver)!-> assert.same typeof subscriptionObserver, \object, 'Subscription observer is object' assert.same subscriptionObserver@@, Object {next, error, complete} = subscriptionObserver assert.isFunction next assert.isFunction error assert.isFunction complete assert.name next, \next assert.name error, \error assert.name complete, \complete assert.arity next, 1 assert.arity error, 1 assert.arity complete, 1 assert.looksNative next assert.looksNative error assert.looksNative complete if STRICT assert.same @, (-> @)!, 'correct executor context' obsevable.subscribe({}) assert.ok obsevable instanceof Observable test 'Observable#subscribe' (assert)!-> assert.isFunction Observable::subscribe assert.arity Observable::subscribe, 1 assert.name Observable::subscribe, \subscribe assert.looksNative Observable::subscribe subscription = new Observable(!->).subscribe({}) assert.same typeof subscription, \object, 'Subscription is object' assert.same subscription@@, Object assert.isFunction subscription.unsubscribe assert.arity subscription.unsubscribe, 0 assert.name subscription.unsubscribe, \unsubscribe assert.looksNative subscription.unsubscribe test 'Observable#forEach' (assert)!-> assert.isFunction Observable::forEach assert.arity Observable::forEach, 1 assert.name Observable::forEach, \forEach assert.looksNative Observable::forEach assert.ok new Observable(!->).forEach(!->) instanceof Promise, 'returns Promise' test 'Observable#constructor' (assert)!-> assert.same Observable::@@, Observable test 'Observable#@@observable' (assert)!-> assert.isFunction Observable::[Symbol.observable] observable = new Observable !-> assert.same observable[Symbol.observable]!, observable test 'Observable.of' (assert)!-> assert.isFunction Observable.of assert.arity Observable.of, 0 assert.name Observable.of, \of assert.looksNative Observable.of test 'Observable.from' (assert)!-> assert.isFunction Observable.from assert.arity Observable.from, 1 assert.name Observable.from, \from assert.looksNative Observable.fromcore-js-2.4.1/tests/tests/es7.reflect.define-metadata.ls000066400000000000000000000007511274277553300230760ustar00rootroot00000000000000{module, test} = QUnit module \ES7 test 'Reflect.defineMetadata' (assert)!-> {defineMetadata} = Reflect assert.isFunction defineMetadata assert.arity defineMetadata, 4 assert.name defineMetadata, \defineMetadata assert.looksNative defineMetadata assert.nonEnumerable Reflect, \defineMetadata assert.throws (!-> defineMetadata \key \value void void), TypeError assert.same defineMetadata(\key \value {}, void), void assert.same defineMetadata(\key \value {}, \name), voidcore-js-2.4.1/tests/tests/es7.reflect.delete-metadata.ls000066400000000000000000000014751274277553300231120ustar00rootroot00000000000000{module, test} = QUnit module \ES7 test 'Reflect.deleteMetadata' (assert)!-> {defineMetadata, hasOwnMetadata, deleteMetadata} = Reflect {create} = Object assert.isFunction deleteMetadata assert.arity deleteMetadata, 2 assert.name deleteMetadata, \deleteMetadata assert.looksNative deleteMetadata assert.nonEnumerable Reflect, \deleteMetadata assert.throws (!-> deleteMetadata \key void void), TypeError assert.same deleteMetadata(\key {}, void), no obj = {} defineMetadata \key \value obj, void assert.same deleteMetadata(\key obj, void), on prototype = {} defineMetadata \key \value prototype, void assert.same deleteMetadata(\key create(prototype), void), no obj = {} defineMetadata \key \value obj, void deleteMetadata \key obj, void assert.same hasOwnMetadata("key", obj, undefined), nocore-js-2.4.1/tests/tests/es7.reflect.get-metadata-keys.ls000066400000000000000000000037541274277553300234020ustar00rootroot00000000000000{module, test} = QUnit module \ES7 test 'Reflect.getMetadataKeys' (assert)!-> {defineMetadata, getMetadataKeys} = Reflect {create} = Object assert.isFunction getMetadataKeys assert.arity getMetadataKeys, 1 assert.name getMetadataKeys, \getMetadataKeys assert.looksNative getMetadataKeys assert.nonEnumerable Reflect, \getMetadataKeys assert.throws (!-> getMetadataKeys void void), TypeError assert.deepEqual getMetadataKeys({}, void), [] obj = {} defineMetadata \key \value obj, void assert.deepEqual getMetadataKeys(obj, void), <[key]> prototype = {}; obj = create prototype defineMetadata \key \value prototype, void assert.deepEqual getMetadataKeys(obj, void), <[key]> obj = {} defineMetadata \key0 \value obj, void defineMetadata \key1 \value obj, void assert.deepEqual getMetadataKeys(obj, void), <[key0 key1]> obj = {} defineMetadata \key0 \value obj, void defineMetadata \key1 \value obj, void defineMetadata \key0 \value obj, void assert.deepEqual getMetadataKeys(obj, void), <[key0 key1]> prototype = {} defineMetadata \key2 \value prototype, void obj = create prototype defineMetadata \key0 \value obj, void defineMetadata \key1 \value obj, void assert.deepEqual getMetadataKeys(obj, void), <[key0 key1 key2]> obj = {} assert.deepEqual getMetadataKeys({}, \name), [] obj = {} defineMetadata \key \value obj, \name assert.deepEqual getMetadataKeys(obj, \name), <[key]> prototype = {} obj = create prototype defineMetadata \key \value prototype, \name assert.deepEqual getMetadataKeys(obj, \name), <[key]> obj = {} defineMetadata \key0 \value obj, \name defineMetadata \key1 \value obj, \name defineMetadata \key0 \value obj, \name assert.deepEqual getMetadataKeys(obj, \name), <[key0 key1]> prototype = {} defineMetadata \key2 \value prototype, \name obj = create prototype defineMetadata \key0 \value obj, \name defineMetadata \key1 \value obj, \name assert.deepEqual getMetadataKeys(obj, \name), <[key0 key1 key2]>core-js-2.4.1/tests/tests/es7.reflect.get-metadata.ls000066400000000000000000000016651274277553300224300ustar00rootroot00000000000000{module, test} = QUnit module \ES7 test 'Reflect.getMetadata' (assert)!-> {defineMetadata, getMetadata} = Reflect {create} = Object assert.isFunction getMetadata assert.arity getMetadata, 2 assert.name getMetadata, \getMetadata assert.looksNative getMetadata assert.nonEnumerable Reflect, \getMetadata assert.throws (!-> getMetadata \key void void), TypeError assert.same getMetadata(\key {}, void), void obj = {} defineMetadata \key \value obj, void assert.same getMetadata(\key obj, void), \value prototype = {} obj = create prototype defineMetadata \key \value prototype, void assert.same getMetadata(\key obj, void), \value assert.same getMetadata(\key {}, \name), void obj = {} defineMetadata \key \value obj, \name assert.same getMetadata(\key obj, \name), \value prototype = {} obj = create prototype defineMetadata \key \value prototype, \name assert.same getMetadata(\key obj, \name), \valuecore-js-2.4.1/tests/tests/es7.reflect.get-own-matadata.ls000066400000000000000000000017361274277553300232240ustar00rootroot00000000000000{module, test} = QUnit module \ES7 test 'Reflect.getOwnMetadata' (assert)!-> {defineMetadata, getOwnMetadata} = Reflect {create} = Object assert.isFunction getOwnMetadata assert.arity getOwnMetadata, 2 assert.name getOwnMetadata, \getOwnMetadata assert.looksNative getOwnMetadata assert.nonEnumerable Reflect, \getOwnMetadata assert.throws (!-> getOwnMetadata \key void void), TypeError assert.same getOwnMetadata(\key {}, void), void obj = {} defineMetadata \key \value obj, void assert.same getOwnMetadata(\key obj, void), \value prototype = {} obj = create prototype defineMetadata \key \value prototype, void assert.same getOwnMetadata(\key obj, void), void assert.same getOwnMetadata(\key {}, \name), void obj = {} defineMetadata \key \value obj, \name assert.same getOwnMetadata(\key obj, \name), \value prototype = {} obj = create prototype defineMetadata \key \value prototype, \name assert.same getOwnMetadata(\key obj, \name), voidcore-js-2.4.1/tests/tests/es7.reflect.get-own-metadata-keys.ls000066400000000000000000000040241274277553300241720ustar00rootroot00000000000000{module, test} = QUnit module \ES7 test 'Reflect.getOwnMetadataKeys' (assert)!-> {defineMetadata, getOwnMetadataKeys} = Reflect {create} = Object assert.isFunction getOwnMetadataKeys assert.arity getOwnMetadataKeys, 1 assert.name getOwnMetadataKeys, \getOwnMetadataKeys assert.looksNative getOwnMetadataKeys assert.nonEnumerable Reflect, \getOwnMetadataKeys assert.throws (!-> getOwnMetadataKeys void void), TypeError assert.deepEqual getOwnMetadataKeys({}, void), [] obj = {} defineMetadata \key \value obj, void assert.deepEqual getOwnMetadataKeys(obj, void), <[key]> prototype = {}; obj = create prototype defineMetadata \key \value prototype, void assert.deepEqual getOwnMetadataKeys(obj, void), [] obj = {} defineMetadata \key0 \value obj, void defineMetadata \key1 \value obj, void assert.deepEqual getOwnMetadataKeys(obj, void), <[key0 key1]> obj = {} defineMetadata \key0 \value obj, void defineMetadata \key1 \value obj, void defineMetadata \key0 \value obj, void assert.deepEqual getOwnMetadataKeys(obj, void), <[key0 key1]> prototype = {} defineMetadata \key2 \value prototype, void obj = create prototype defineMetadata \key0 \value obj, void defineMetadata \key1 \value obj, void assert.deepEqual getOwnMetadataKeys(obj, void), <[key0 key1]> obj = {} assert.deepEqual getOwnMetadataKeys({}, \name), [] obj = {} defineMetadata \key \value obj, \name assert.deepEqual getOwnMetadataKeys(obj, \name), <[key]> prototype = {} obj = create prototype defineMetadata \key \value prototype, \name assert.deepEqual getOwnMetadataKeys(obj, \name), [] obj = {} defineMetadata \key0 \value obj, \name defineMetadata \key1 \value obj, \name defineMetadata \key0 \value obj, \name assert.deepEqual getOwnMetadataKeys(obj, \name), <[key0 key1]> prototype = {} defineMetadata \key2 \value prototype, \name obj = create prototype defineMetadata \key0 \value obj, \name defineMetadata \key1 \value obj, \name assert.deepEqual getOwnMetadataKeys(obj, \name), <[key0 key1]>core-js-2.4.1/tests/tests/es7.reflect.has-metadata.ls000066400000000000000000000016411274277553300224160ustar00rootroot00000000000000{module, test} = QUnit module \ES7 test 'Reflect.hasMetadata' (assert)!-> {defineMetadata, hasMetadata} = Reflect {create} = Object assert.isFunction hasMetadata assert.arity hasMetadata, 2 assert.name hasMetadata, \hasMetadata assert.looksNative hasMetadata assert.nonEnumerable Reflect, \hasMetadata assert.throws (!-> hasMetadata \key void void), TypeError assert.same hasMetadata(\key {}, void), no obj = {} defineMetadata \key \value obj, void assert.same hasMetadata(\key obj, void), on prototype = {} obj = create prototype defineMetadata \key \value prototype, void assert.same hasMetadata(\key obj, void), on assert.same hasMetadata(\key {}, \name), no obj = {} defineMetadata \key \value obj, \name assert.same hasMetadata(\key obj, \name), on prototype = {} obj = create prototype defineMetadata \key \value prototype, \name assert.same hasMetadata(\key obj, \name), oncore-js-2.4.1/tests/tests/es7.reflect.has-own-metadata.ls000066400000000000000000000017161274277553300232220ustar00rootroot00000000000000{module, test} = QUnit module \ES7 test 'Reflect.hasOwnMetadata' (assert)!-> {defineMetadata, hasOwnMetadata} = Reflect {create} = Object assert.isFunction hasOwnMetadata assert.arity hasOwnMetadata, 2 assert.name hasOwnMetadata, \hasOwnMetadata assert.looksNative hasOwnMetadata assert.nonEnumerable Reflect, \hasOwnMetadata assert.throws (!-> hasOwnMetadata \key void void), TypeError assert.same hasOwnMetadata(\key {}, void), no obj = {} defineMetadata \key \value obj, void assert.same hasOwnMetadata(\key obj, void), on prototype = {} obj = create prototype defineMetadata \key \value prototype, void assert.same hasOwnMetadata(\key obj, void), no assert.same hasOwnMetadata(\key {}, \name), no obj = {} defineMetadata \key \value obj, \name assert.same hasOwnMetadata(\key obj, \name), on prototype = {} obj = create prototype defineMetadata \key \value prototype, \name assert.same hasOwnMetadata(\key obj, \name), nocore-js-2.4.1/tests/tests/es7.reflect.metadata.ls000066400000000000000000000011711274277553300216430ustar00rootroot00000000000000{module, test} = QUnit module \ES7 test 'Reflect.metadata' (assert)!-> {metadata, hasOwnMetadata} = Reflect assert.isFunction metadata assert.arity metadata, 2 assert.name metadata, \metadata assert.looksNative metadata assert.nonEnumerable Reflect, \metadata assert.isFunction metadata \key \value decorator = metadata \key \value assert.throws (!-> decorator void \name), TypeError assert.throws (!-> decorator {}, void), TypeError target = !-> decorator target assert.same hasOwnMetadata(\key target, void), on target = {} decorator target, \name assert.same hasOwnMetadata(\key target, \name), oncore-js-2.4.1/tests/tests/es7.set.to-json.ls000066400000000000000000000005041274277553300206220ustar00rootroot00000000000000{module, test} = QUnit module \ES7 test 'Set#toJSON' (assert)!-> assert.isFunction Set::toJSON assert.name Set::toJSON, \toJSON assert.arity Set::toJSON, 0 assert.looksNative Set::toJSON assert.nonEnumerable Set::, \toJSON if JSON? assert.strictEqual JSON.stringify(new Set [1 2 3 2 1] ), '[1,2,3]', 'Works'core-js-2.4.1/tests/tests/es7.string.at.ls000066400000000000000000000105561274277553300203600ustar00rootroot00000000000000{module, test} = QUnit module \ES7 test 'String#at' (assert)!-> assert.isFunction String::at assert.arity String::at, 1 assert.name String::at, \at assert.looksNative String::at assert.nonEnumerable String::, \at # Tests from https://github.com/mathiasbynens/String.prototype.at/blob/master/tests/tests.js # String that starts with a BMP symbol assert.strictEqual 'abc\uD834\uDF06def'at(-Infinity), '' assert.strictEqual 'abc\uD834\uDF06def'at(-1), '' assert.strictEqual 'abc\uD834\uDF06def'at(-0), \a assert.strictEqual 'abc\uD834\uDF06def'at(+0), \a assert.strictEqual 'abc\uD834\uDF06def'at(1), \b assert.strictEqual 'abc\uD834\uDF06def'at(3), '\uD834\uDF06' assert.strictEqual 'abc\uD834\uDF06def'at(4), '\uDF06' assert.strictEqual 'abc\uD834\uDF06def'at(5), \d assert.strictEqual 'abc\uD834\uDF06def'at(42), '' assert.strictEqual 'abc\uD834\uDF06def'at(Infinity), '' assert.strictEqual 'abc\uD834\uDF06def'at(null), \a assert.strictEqual 'abc\uD834\uDF06def'at(void), \a assert.strictEqual 'abc\uD834\uDF06def'at!, \a assert.strictEqual 'abc\uD834\uDF06def'at(no), \a assert.strictEqual 'abc\uD834\uDF06def'at(NaN), \a assert.strictEqual 'abc\uD834\uDF06def'at(''), \a assert.strictEqual 'abc\uD834\uDF06def'at(\_), \a assert.strictEqual 'abc\uD834\uDF06def'at(\1), \b assert.strictEqual 'abc\uD834\uDF06def'at([]), \a assert.strictEqual 'abc\uD834\uDF06def'at({}), \a assert.strictEqual 'abc\uD834\uDF06def'at(-0.9), \a assert.strictEqual 'abc\uD834\uDF06def'at(1.9), \b assert.strictEqual 'abc\uD834\uDF06def'at(7.9), \f assert.strictEqual 'abc\uD834\uDF06def'at(2 ** 32), '' # String that starts with an astral symbol assert.strictEqual '\uD834\uDF06def'at(-Infinity), '' assert.strictEqual '\uD834\uDF06def'at(-1), '' assert.strictEqual '\uD834\uDF06def'at(-0), '\uD834\uDF06' assert.strictEqual '\uD834\uDF06def'at(0), '\uD834\uDF06' assert.strictEqual '\uD834\uDF06def'at(1), '\uDF06' assert.strictEqual '\uD834\uDF06def'at(2), 'd' assert.strictEqual '\uD834\uDF06def'at(3), 'e' assert.strictEqual '\uD834\uDF06def'at(4), 'f' assert.strictEqual '\uD834\uDF06def'at(42), '' assert.strictEqual '\uD834\uDF06def'at(Infinity), '' assert.strictEqual '\uD834\uDF06def'at(null), '\uD834\uDF06' assert.strictEqual '\uD834\uDF06def'at(void), '\uD834\uDF06' assert.strictEqual '\uD834\uDF06def'at(), '\uD834\uDF06' assert.strictEqual '\uD834\uDF06def'at(no), '\uD834\uDF06' assert.strictEqual '\uD834\uDF06def'at(NaN), '\uD834\uDF06' assert.strictEqual '\uD834\uDF06def'at(''), '\uD834\uDF06' assert.strictEqual '\uD834\uDF06def'at(\_), '\uD834\uDF06' assert.strictEqual '\uD834\uDF06def'at(\1), '\uDF06' # Lone high surrogates assert.strictEqual '\uD834abc'at(-Infinity), '' assert.strictEqual '\uD834abc'at(-1), '' assert.strictEqual '\uD834abc'at(-0), '\uD834' assert.strictEqual '\uD834abc'at(0), '\uD834' assert.strictEqual '\uD834abc'at(1), \a assert.strictEqual '\uD834abc'at(42), '' assert.strictEqual '\uD834abc'at(Infinity), '' assert.strictEqual '\uD834abc'at(null), '\uD834' assert.strictEqual '\uD834abc'at(void), '\uD834' assert.strictEqual '\uD834abc'at!, '\uD834' assert.strictEqual '\uD834abc'at(no), '\uD834' assert.strictEqual '\uD834abc'at(NaN), '\uD834' assert.strictEqual '\uD834abc'at(''), '\uD834' assert.strictEqual '\uD834abc'at(\_), '\uD834' assert.strictEqual '\uD834abc'at(\1), \a # Lone low surrogates assert.strictEqual '\uDF06abc'at(-Infinity), '' assert.strictEqual '\uDF06abc'at(-1), '' assert.strictEqual '\uDF06abc'at(-0), '\uDF06' assert.strictEqual '\uDF06abc'at(0), '\uDF06' assert.strictEqual '\uDF06abc'at(1), \a assert.strictEqual '\uDF06abc'at(42), '' assert.strictEqual '\uDF06abc'at(Infinity), '' assert.strictEqual '\uDF06abc'at(null), '\uDF06' assert.strictEqual '\uDF06abc'at(void), '\uDF06' assert.strictEqual '\uDF06abc'at!, '\uDF06' assert.strictEqual '\uDF06abc'at(no), '\uDF06' assert.strictEqual '\uDF06abc'at(NaN), '\uDF06' assert.strictEqual '\uDF06abc'at(''), '\uDF06' assert.strictEqual '\uDF06abc'at(\_), '\uDF06' assert.strictEqual '\uDF06abc'at(\1), \a {at} = String:: assert.strictEqual at.call(42 0), \4 assert.strictEqual at.call(42 1), \2 assert.strictEqual at.call({toString: -> \abc}, 2), \c if STRICT assert.throws (!-> String::at.call null, 0), TypeError assert.throws (!-> String::at.call void, 0), TypeErrorcore-js-2.4.1/tests/tests/es7.string.match-all.ls000066400000000000000000000026361274277553300216160ustar00rootroot00000000000000{module, test} = QUnit module \ES7 test 'String#matchAll' (assert)!-> {matchAll} = String:: {assign} = Object assert.isFunction matchAll assert.arity matchAll, 1 assert.name matchAll, \matchAll assert.looksNative matchAll assert.nonEnumerable String::, \matchAll for [\aabc {toString: -> \aabc}] iter = matchAll.call .., /[ac]/ assert.isIterator iter assert.isIterable iter assert.deepEqual iter.next!, {value: assign(<[a]> {input: \aabc, index: 0}), done: no} assert.deepEqual iter.next!, {value: assign(<[a]> {input: \aabc, index: 1}), done: no} assert.deepEqual iter.next!, {value: assign(<[c]> {input: \aabc, index: 3}), done: no} assert.deepEqual iter.next!, {value: null, done: on} iter = '1111a2b3cccc'matchAll /(\d)(\D)/ assert.isIterator iter assert.isIterable iter assert.deepEqual iter.next!, {value: assign(<[1a 1 a]> {input: \1111a2b3cccc, index: 3}), done: no} assert.deepEqual iter.next!, {value: assign(<[2b 2 b]> {input: \1111a2b3cccc, index: 5}), done: no} assert.deepEqual iter.next!, {value: assign(<[3c 3 c]> {input: \1111a2b3cccc, index: 7}), done: no} assert.deepEqual iter.next!, {value: null, done: on} for [null void \qwe NaN, 42 new Date!, {} []] assert.throws (!-> ''matchAll ..), TypeError, "Throws on #{..} as first arguments" if STRICT => for [null void] assert.throws (!-> matchAll.call .., /./), TypeError, "Throws on #{..} as `this`"core-js-2.4.1/tests/tests/es7.string.pad-end.ls000066400000000000000000000012701274277553300212550ustar00rootroot00000000000000{module, test} = QUnit module \ES7 test 'String#padEnd' (assert)!-> assert.isFunction String::padEnd assert.arity String::padEnd, 1 assert.name String::padEnd, \padEnd assert.looksNative String::padEnd assert.nonEnumerable String::, \padEnd assert.strictEqual 'abc'padEnd(5), 'abc ' assert.strictEqual 'abc'padEnd(4, \de), \abcd assert.strictEqual 'abc'padEnd!, \abc assert.strictEqual 'abc'padEnd(5 '_'), 'abc__' assert.strictEqual ''padEnd(0), '' assert.strictEqual 'foo'padEnd(1), \foo assert.strictEqual 'foo'padEnd(5 ''), \foo if STRICT assert.throws (!-> String::padEnd.call null, 0), TypeError assert.throws (!-> String::padEnd.call void, 0), TypeErrorcore-js-2.4.1/tests/tests/es7.string.pad-start.ls000066400000000000000000000013271274277553300216470ustar00rootroot00000000000000{module, test} = QUnit module \ES7 test 'String#padStart' (assert)!-> assert.isFunction String::padStart assert.arity String::padStart, 1 assert.name String::padStart, \padStart assert.looksNative String::padStart assert.nonEnumerable String::, \padStart assert.strictEqual 'abc'padStart(5), ' abc' assert.strictEqual 'abc'padStart(4 \de), \dabc assert.strictEqual 'abc'padStart!, \abc assert.strictEqual 'abc'padStart(5 '_'), '__abc' assert.strictEqual ''padStart(0), '' assert.strictEqual 'foo'padStart(1), \foo assert.strictEqual 'foo'padStart(5 ''), \foo if STRICT assert.throws (!-> String::padStart.call null, 0), TypeError assert.throws (!-> String::padStart.call void, 0), TypeErrorcore-js-2.4.1/tests/tests/es7.string.trim-left.ls000066400000000000000000000031771274277553300216600ustar00rootroot00000000000000{module, test} = QUnit module \ES7 test 'String#trimLeft' (assert)!-> assert.isFunction ''trimLeft assert.arity String::trimLeft, 0 assert.name String::trimLeft, \trimLeft assert.looksNative String::trimLeft assert.nonEnumerable String::, \trimLeft assert.strictEqual ' \n q w e \n 'trimLeft!, 'q w e \n ', 'removes whitespaces at left side of string' assert.strictEqual '\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u180E\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF'trimLeft!, '', 'removes all whitespaces' assert.strictEqual '\u200b\u0085'trimLeft!, '\u200b\u0085', "shouldn't remove this symbols" if STRICT assert.throws (!-> String::trimLeft.call null, 0), TypeError assert.throws (!-> String::trimLeft.call void, 0), TypeError test 'String#trimStart' (assert)!-> assert.isFunction ''trimStart assert.arity String::trimStart, 0 assert.name String::trimStart, \trimLeft assert.looksNative String::trimStart assert.nonEnumerable String::, \trimStart assert.same String::trimStart, String::trimLeft, 'same #trimLeft' assert.strictEqual ' \n q w e \n 'trimStart!, 'q w e \n ', 'removes whitespaces at left side of string' assert.strictEqual '\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u180E\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF'trimStart!, '', 'removes all whitespaces' assert.strictEqual '\u200b\u0085'trimStart!, '\u200b\u0085', "shouldn't remove this symbols" if STRICT assert.throws (!-> String::trimStart.call null, 0), TypeError assert.throws (!-> String::trimStart.call void, 0), TypeErrorcore-js-2.4.1/tests/tests/es7.string.trim-right.ls000066400000000000000000000031701274277553300220340ustar00rootroot00000000000000{module, test} = QUnit module \ES7 test 'String#trimRight' (assert)!-> assert.isFunction ''trimRight assert.arity String::trimRight, 0 assert.name String::trimRight, \trimRight assert.looksNative String::trimRight assert.nonEnumerable String::, \trimRight assert.strictEqual ' \n q w e \n 'trimRight!, ' \n q w e', 'removes whitespaces at right side of string' assert.strictEqual '\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u180E\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF'trimRight!, '', 'removes all whitespaces' assert.strictEqual '\u200b\u0085'trimRight!, '\u200b\u0085', "shouldn't remove this symbols" if STRICT assert.throws (!-> String::trimRight.call null, 0), TypeError assert.throws (!-> String::trimRight.call void, 0), TypeError test 'String#trimEnd' (assert)!-> assert.isFunction ''trimEnd assert.arity String::trimEnd, 0 assert.name String::trimEnd, \trimRight assert.looksNative String::trimEnd assert.nonEnumerable String::, \trimEnd assert.same String::trimEnd, String::trimRight, 'same #trimRight' assert.strictEqual ' \n q w e \n 'trimEnd!, ' \n q w e', 'removes whitespaces at right side of string' assert.strictEqual '\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u180E\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF'trimEnd!, '', 'removes all whitespaces' assert.strictEqual '\u200b\u0085'trimEnd!, '\u200b\u0085', "shouldn't remove this symbols" if STRICT assert.throws (!-> String::trimEnd.call null, 0), TypeError assert.throws (!-> String::trimEnd.call void, 0), TypeErrorcore-js-2.4.1/tests/tests/es7.symbol.async-iterator.ls000066400000000000000000000010021274277553300227010ustar00rootroot00000000000000{module, test} = QUnit module \ES7 test 'Symbol.asyncIterator' (assert)!-> assert.ok \asyncIterator of Symbol, "Symbol.asyncIterator available" assert.nonEnumerable Symbol, \asyncIterator assert.ok Object(Symbol.asyncIterator) instanceof Symbol, "Symbol.asyncIterator is symbol" if DESCRIPTORS desc = Object.getOwnPropertyDescriptor Symbol, \asyncIterator assert.ok !desc.enumerble, 'non-enumerable' assert.ok !desc.writable, 'non-writable' assert.ok !desc.configurable, 'non-configurable'core-js-2.4.1/tests/tests/es7.symbol.observable.ls000066400000000000000000000007551274277553300220770ustar00rootroot00000000000000{module, test} = QUnit module \ES7 test 'Symbol.observable' (assert)!-> assert.ok \observable of Symbol, "Symbol.observable available" assert.nonEnumerable Symbol, \observable assert.ok Object(Symbol.observable) instanceof Symbol, "Symbol.observable is symbol" if DESCRIPTORS desc = Object.getOwnPropertyDescriptor Symbol, \observable assert.ok !desc.enumerble, 'non-enumerable' assert.ok !desc.writable, 'non-writable' assert.ok !desc.configurable, 'non-configurable'core-js-2.4.1/tests/tests/es7.system.global.ls000066400000000000000000000003521274277553300212230ustar00rootroot00000000000000{module, test} = QUnit module \ES7 test 'System.global' (assert)!-> global = System?global assert.nonEnumerable System, \global assert.same global, Object(global), 'is object' assert.same global.Math, Math, 'contains globals'core-js-2.4.1/tests/tests/es7.typed.methods.includes.ls000066400000000000000000000020001274277553300230240ustar00rootroot00000000000000{module, test} = QUnit module \ES7 DESCRIPTORS and test '%TypedArrayPrototype%.includes', !(assert)~> # we can't implement %TypedArrayPrototype% in all engines, so run all tests for each typed array constructor for <[Float32Array Float64Array Int8Array Int16Array Int32Array Uint8Array Uint16Array Uint32Array Uint8ClampedArray]> Typed = global[..] assert.isFunction Typed::includes, "#{..}::includes is function" assert.arity Typed::includes, 1, "#{..}::includes arity is 1" assert.name Typed::includes, \includes, "#{..}::includes name is 'includes'" assert.looksNative Typed::includes, "#{..}::includes looks native" assert.same new Typed([1 1 1])includes(1), on assert.same new Typed([1 1 1])includes(2), no assert.same new Typed([1 2 3])includes(1 1), no assert.same new Typed([1 2 3])includes(2 1), on assert.same new Typed([1 2 3])includes(2 -1), no assert.same new Typed([1 2 3])includes(2 -2), on assert.throws (!-> Typed::includes.call [1 2], 1), "isn't generic"core-js-2.4.1/tests/tests/web.dom.iterable.ls000066400000000000000000000015761274277553300210750ustar00rootroot00000000000000{module, test} = QUnit module 'Web' test 'Iterable DOM collections' (assert)-> absent = on; for <[NodeList DOMTokenList MediaList StyleSheetList CSSRuleList]> Collection = global[..] if Collection assert.same Collection::[Symbol?toStringTag], .., "#{..}::@@toStringTag is '#{..}'" assert.isFunction Collection::[Symbol?iterator], "#{..}::@@iterator is function" assert.isFunction Collection::values, "#{..}::@@values is function" assert.isFunction Collection::keys, "#{..}::@@keys is function" assert.isFunction Collection::entries, "#{..}::@@entries is function" absent = no if NodeList? and document?querySelectorAll and document.querySelectorAll(\div) instanceof NodeList assert.isFunction document.querySelectorAll(\div)[Symbol.iterator], 'works with document.querySelectorAll' if absent => assert.ok on, 'DOM collections are absent'core-js-2.4.1/tests/tests/web.immediate.ls000066400000000000000000000032541274277553300204610ustar00rootroot00000000000000{module, test} = QUnit module 'Web' isFunction = -> typeof! it is \Function timeLimitedPromise = (time, fn)-> Promise.race [new Promise(fn), new Promise (res, rej)!-> setTimeout rej, time] test 'setImmediate / clearImmediate' (assert)-> assert.expect 10 assert.ok isFunction(setImmediate), 'setImmediate is function' assert.ok isFunction(clearImmediate), 'clearImmediate is function' assert.ok /native code/.test(setImmediate), 'setImmediate looks like native' assert.ok /native code/.test(clearImmediate), 'clearImmediate looks like native' assert.strictEqual setImmediate.name, \setImmediate, 'setImmediate.name is "setImmediate"' assert.strictEqual clearImmediate.name, \clearImmediate, 'clearImmediate.name is "clearImmediate"' var def timeLimitedPromise(1e3, (res)!-> setImmediate !-> def := \a res! ) .then !-> assert.ok on 'setImmediate works' .catch !-> assert.ok no 'setImmediate works' .then assert.async! assert.strictEqual def, void, 'setImmediate is async' timeLimitedPromise(1e3, (res)-> setImmediate(((a, b)-> res a + b), \a \b)) .then !-> assert.strictEqual it, \ab, 'setImmediate works with additional args' .catch !-> assert.ok no 'setImmediate works with additional args' .then assert.async! timeLimitedPromise(50, (res)-> clearImmediate setImmediate res) .then !-> assert.ok no 'clearImmediate works' .catch !-> assert.ok on 'clearImmediate works' .then assert.async! (!-> if window? => window.onload = it else it!) <| !-> setTimeout _, 5e3 <| !-> x = 0 now = Date.now! do inc = !-> setImmediate !-> x := x + 1 if Date.now! - now < 5e3 => inc! else console?log "setImmediate: #{x / 5} per second"core-js-2.4.1/tests/tests/web.timers.ls000066400000000000000000000023771274277553300200330ustar00rootroot00000000000000{module, test} = QUnit module 'Web' timeLimitedPromise = (time, fn)-> Promise.race [new Promise(fn), new Promise (res, rej)!-> setTimeout rej, time] global = Function('return this')! test 'setTimeout / clearTimeout' (assert)!-> assert.expect 2 timeLimitedPromise(1e3, (res)!-> global.setTimeout(((a, b)!-> res a + b), 10 \a \b)) .then !-> assert.strictEqual it, \ab, 'setTimeout works with additional args' .catch !-> assert.ok no 'setTimeout works with additional args' .then assert.async! timeLimitedPromise(50, (res)!-> clearTimeout setTimeout res, 10) .then !-> assert.ok no 'clearImmediate works with wraped setTimeout' .catch !-> assert.ok on 'clearImmediate works with wraped setTimeout' .then assert.async! test 'setInterval / clearInterval' (assert)!-> assert.expect 1 i = 0 timeLimitedPromise(1e4, (res, rej)!-> interval = global.setInterval(((a, b)-> if a + b isnt \ab or i > 2 => rej {a, b, i} if i++ is 2 global.clearInterval interval global.setTimeout res, 30 ), 5 \a \b)) .then !-> assert.ok on 'setInterval & clearInterval works with additional args' .catch ({a, b, i} = {})!-> assert.ok no "setInterval & clearInterval works with additional args: #a, #b, times: #i" .then assert.async!core-js-2.4.1/tests/worker.html000066400000000000000000000001171274277553300164370ustar00rootroot00000000000000 core-js-2.4.1/tests/worker/000077500000000000000000000000001274277553300155525ustar00rootroot00000000000000core-js-2.4.1/tests/worker/runner.js000066400000000000000000000002771274277553300174270ustar00rootroot00000000000000importScripts('../../client/core.js'); postMessage(typeof core != 'undefined'); setImmediate(_ => postMessage('setImmediate')); Promise.resolve().then(_ => postMessage('Promise.resolve'));core-js-2.4.1/tests/worker/test.js000066400000000000000000000003131274277553300170640ustar00rootroot00000000000000var worker = new Worker('./worker/runner.js'); worker.addEventListener('error', function(e){ console.error(e); }); worker.addEventListener('message', function(message){ console.log(message.data); });core-js-2.4.1/web/000077500000000000000000000000001274277553300136545ustar00rootroot00000000000000core-js-2.4.1/web/dom-collections.js000066400000000000000000000001251274277553300173030ustar00rootroot00000000000000require('../modules/web.dom.iterable'); module.exports = require('../modules/_core');core-js-2.4.1/web/immediate.js000066400000000000000000000001221274277553300161430ustar00rootroot00000000000000require('../modules/web.immediate'); module.exports = require('../modules/_core');core-js-2.4.1/web/index.js000066400000000000000000000002341274277553300153200ustar00rootroot00000000000000require('../modules/web.timers'); require('../modules/web.immediate'); require('../modules/web.dom.iterable'); module.exports = require('../modules/_core');core-js-2.4.1/web/timers.js000066400000000000000000000001171274277553300155140ustar00rootroot00000000000000require('../modules/web.timers'); module.exports = require('../modules/_core');