We use standard rates for all gas + a itty-bitty bit more to ensure it gets mined quickly. We do not take a transaction fee.
+
A standard transaction using 21000 gas will cost 0.000441 ETH. We use a slightly-above-minimum gas price of 0.000000021 ETH to ensure it gets mined quickly. We do not take a transaction fee.
@@ -604,8 +604,7 @@
"Only ETH
ETH (Standard Transaction): This generates a default transaction directly from one address to another. It has a default gas of 21000. It is likely that any ETH sent via this method will be replayed onto the ETC chain.
Coinbase: Do not send ETC & only send ETH via Standard Transaction. Split your ETC into a separate wallet and then use a standard transaction to send ETH. If you use "Only ETH", you need to manually reach out to Coinbase support to have it processed.
-
ShapeShift: Using the "Only ETH" or "Only ETC" function may lead to delays in processing you need to reach out to them to have it manually processed.
+
Coinbase & ShapeShift: Only send via Standard Transaction. If you send via the "Only" contracts, you will need to reach out to their support staff to manually add your balance or refund you. You can try Shapeshift's "split" tool as well.
We use standard rates for all gas + a itty-bitty bit more to ensure it gets mined quickly. We do not take a transaction fee.
+
A standard transaction using 21000 gas will cost 0.000441 ETH. We use a slightly-above-minimum gas price of 0.000000021 ETH to ensure it gets mined quickly. We do not take a transaction fee.
@@ -463,8 +463,7 @@
"Only ETH
ETH (Standard Transaction): This generates a default transaction directly from one address to another. It has a default gas of 21000. It is likely that any ETH sent via this method will be replayed onto the ETC chain.
Coinbase: Do not send ETC & only send ETH via Standard Transaction. Split your ETC into a separate wallet and then use a standard transaction to send ETH. If you use "Only ETH", you need to manually reach out to Coinbase support to have it processed.
-
ShapeShift: Using the "Only ETH" or "Only ETC" function may lead to delays in processing you need to reach out to them to have it manually processed.
+
Coinbase & ShapeShift: Only send via Standard Transaction. If you send via the "Only" contracts, you will need to reach out to their support staff to manually add your balance or refund you. You can try Shapeshift's "split" tool as well.
'
-}
-globalFuncs.errorMsgs = [
- "Please enter valid amount. ",
- "Your password must be at least 9 characters. Please ensure it is a strong password. ",
- "Sorry! We don't have a clue what type of wallet file this is. ",
- "This is not a valid wallet file. ",
- "This unit doesn\'t exists, please use the one of the following units ",
- "Invalid address. ",
- "Invalid password. ",
- "Invalid amount. ",
- "Invalid gas limit. ",
- "Invalid data value. ",
- "Invalid gas amount. ",
- "Invalid nonce. ",
- "Invalid signed transaction. ",
- "A wallet with this nickname already exists. ",
- "Wallet not found. ",
- "Whoops. It doesnt look like a proposal with this ID exists yet or there is an error reading this proposal. ",
- "A wallet with this address already exists in storage. Please check your wallets page. ",
- "You need to have at some ETH in your account to cover the cost of gas. .01ETH should be more than sufficient for a few sends and votes. ",
- "All gas would be used on this transaction. This means you have already voted on this proposal or the debate period has ended.",
- "Invalid symbol"];
-globalFuncs.successMsgs = ["Valid address", "Wallet successfully decrypted", "Transaction submitted. TX ID: ", "New wallet added: ", "You have successfully voted. Thank you for being an active participant in The DAO."];
-globalFuncs.scrypt = {
- n: 1024
-};
-globalFuncs.postDelay = 300;
-globalFuncs.kdf = "scrypt";
-globalFuncs.defaultTxGasLimit = 21000;
-globalFuncs.digixClaimTxGasLimit = 150000;
-globalFuncs.donateAddress = "0x7cB57B5A97eAbe94205C07890BE4c1aD31E486A8";
-globalFuncs.isNumeric = function(n) {
- return !isNaN(parseFloat(n)) && isFinite(n);
-}
-globalFuncs.urlGet = function(name) {
- if (name = (new RegExp('[?&]' + encodeURIComponent(name) + '=([^&]*)')).exec(location.search)) return this.stripTags(decodeURIComponent(name[1]));
-}
-globalFuncs.stripTags = function(str) {
- var SCRIPT_REGEX = /");
+}
+globalFuncs.getBlob = function(mime, str) {
+ var str = (typeof str === 'object') ? JSON.stringify(str) : str;
+ if (str == null) return '';
+ var blob = new Blob([str], {
+ type: mime
+ });
+ return window.URL.createObjectURL(blob);
+}
+globalFuncs.getSuccessText = function(str) {
+ return '
'
+}
+globalFuncs.errorMsgs = [
+ "Please enter valid amount. ",
+ "Your password must be at least 9 characters. Please ensure it is a strong password. ",
+ "Sorry! We don't have a clue what type of wallet file this is. ",
+ "This is not a valid wallet file. ",
+ "This unit doesn\'t exists, please use the one of the following units ",
+ "Invalid address. ",
+ "Invalid password. ",
+ "Invalid amount. ",
+ "Invalid gas limit. ",
+ "Invalid data value. ",
+ "Invalid gas amount. ",
+ "Invalid nonce. ",
+ "Invalid signed transaction. ",
+ "A wallet with this nickname already exists. ",
+ "Wallet not found. ",
+ "Whoops. It doesnt look like a proposal with this ID exists yet or there is an error reading this proposal. ",
+ "A wallet with this address already exists in storage. Please check your wallets page. ",
+ "You need to have at some ETH in your account to cover the cost of gas. .01ETH should be more than sufficient for a few sends and votes. ",
+ "All gas would be used on this transaction. This means you have already voted on this proposal or the debate period has ended.",
+ "Invalid symbol"];
+globalFuncs.successMsgs = ["Valid address", "Wallet successfully decrypted", "Transaction submitted. TX ID: ", "New wallet added: ", "You have successfully voted. Thank you for being an active participant in The DAO."];
+globalFuncs.scrypt = {
+ n: 1024
+};
+globalFuncs.postDelay = 300;
+globalFuncs.kdf = "scrypt";
+globalFuncs.defaultTxGasLimit = 21000;
+globalFuncs.digixClaimTxGasLimit = 150000;
+globalFuncs.donateAddress = "0x7cB57B5A97eAbe94205C07890BE4c1aD31E486A8";
+globalFuncs.isNumeric = function(n) {
+ return !isNaN(parseFloat(n)) && isFinite(n);
+}
+globalFuncs.urlGet = function(name) {
+ if (name = (new RegExp('[?&]' + encodeURIComponent(name) + '=([^&]*)')).exec(location.search)) return this.stripTags(decodeURIComponent(name[1]));
+}
+globalFuncs.stripTags = function(str) {
+ var SCRIPT_REGEX = /
+
+
*/
function copy(source, destination) {
var stackSource = [];
@@ -7789,7 +7783,7 @@ function copy(source, destination) {
case '[object Uint8ClampedArray]':
case '[object Uint16Array]':
case '[object Uint32Array]':
- return new source.constructor(copyElement(source.buffer), source.byteOffset, source.length);
+ return new source.constructor(copyElement(source.buffer));
case '[object ArrayBuffer]':
//Support: IE10
@@ -7821,6 +7815,31 @@ function copy(source, destination) {
}
}
+/**
+ * Creates a shallow copy of an object, an array or a primitive.
+ *
+ * Assumes that there are no proto properties for objects.
+ */
+function shallowCopy(src, dst) {
+ if (isArray(src)) {
+ dst = dst || [];
+
+ for (var i = 0, ii = src.length; i < ii; i++) {
+ dst[i] = src[i];
+ }
+ } else if (isObject(src)) {
+ dst = dst || {};
+
+ for (var key in src) {
+ if (!(key.charAt(0) === '$' && key.charAt(1) === '$')) {
+ dst[key] = src[key];
+ }
+ }
+ }
+
+ return dst || src;
+}
+
/**
* @ngdoc function
@@ -9161,34 +9180,7 @@ function setupModuleLoader(window) {
}
-/* global shallowCopy: true */
-
-/**
- * Creates a shallow copy of an object, an array or a primitive.
- *
- * Assumes that there are no proto properties for objects.
- */
-function shallowCopy(src, dst) {
- if (isArray(src)) {
- dst = dst || [];
-
- for (var i = 0, ii = src.length; i < ii; i++) {
- dst[i] = src[i];
- }
- } else if (isObject(src)) {
- dst = dst || {};
-
- for (var key in src) {
- if (!(key.charAt(0) === '$' && key.charAt(1) === '$')) {
- dst[key] = src[key];
- }
- }
- }
-
- return dst || src;
-}
-
-/* global toDebugString: true */
+/* global: toDebugString: true */
function serializeObject(obj) {
var seen = [];
@@ -9292,7 +9284,6 @@ function toDebugString(obj) {
$HttpParamSerializerJQLikeProvider,
$HttpBackendProvider,
$xhrFactoryProvider,
- $jsonpCallbacksProvider,
$LocationProvider,
$LogProvider,
$ParseProvider,
@@ -9330,11 +9321,11 @@ function toDebugString(obj) {
* - `codeName` – `{string}` – Code name of the release, such as "jiggling-armfat".
*/
var version = {
- full: '1.5.8', // all of these placeholder strings will be replaced by grunt's
+ full: '1.5.6', // all of these placeholder strings will be replaced by grunt's
major: 1, // package task
minor: 5,
- dot: 8,
- codeName: 'arbitrary-fallbacks'
+ dot: 6,
+ codeName: 'arrow-stringification'
};
@@ -9365,7 +9356,7 @@ function publishExternalAPI(angular) {
'isDate': isDate,
'lowercase': lowercase,
'uppercase': uppercase,
- 'callbacks': {$$counter: 0},
+ 'callbacks': {counter: 0},
'getTestability': getTestability,
'$$minErr': minErr,
'$$csp': csp,
@@ -9454,7 +9445,6 @@ function publishExternalAPI(angular) {
$httpParamSerializerJQLike: $HttpParamSerializerJQLikeProvider,
$httpBackend: $HttpBackendProvider,
$xhrFactory: $xhrFactoryProvider,
- $jsonpCallbacks: $jsonpCallbacksProvider,
$location: $LocationProvider,
$log: $LogProvider,
$parse: $ParseProvider,
@@ -9531,7 +9521,7 @@ function publishExternalAPI(angular) {
* ## Angular's jqLite
* jqLite provides only the following jQuery methods:
*
- * - [`addClass()`](http://api.jquery.com/addClass/) - Does not support a function as first argument
+ * - [`addClass()`](http://api.jquery.com/addClass/)
* - [`after()`](http://api.jquery.com/after/)
* - [`append()`](http://api.jquery.com/append/)
* - [`attr()`](http://api.jquery.com/attr/) - Does not support functions as parameters
@@ -9558,7 +9548,7 @@ function publishExternalAPI(angular) {
* - [`ready()`](http://api.jquery.com/ready/)
* - [`remove()`](http://api.jquery.com/remove/)
* - [`removeAttr()`](http://api.jquery.com/removeAttr/)
- * - [`removeClass()`](http://api.jquery.com/removeClass/) - Does not support a function as first argument
+ * - [`removeClass()`](http://api.jquery.com/removeClass/)
* - [`removeData()`](http://api.jquery.com/removeData/)
* - [`replaceWith()`](http://api.jquery.com/replaceWith/)
* - [`text()`](http://api.jquery.com/text/)
@@ -9693,7 +9683,7 @@ function jqLiteBuildFragment(html, context) {
nodes.push(context.createTextNode(html));
} else {
// Convert html into DOM nodes
- tmp = fragment.appendChild(context.createElement("div"));
+ tmp = tmp || fragment.appendChild(context.createElement("div"));
tag = (TAG_NAME_REGEXP.exec(html) || ["", ""])[1].toLowerCase();
wrap = wrapMap[tag] || wrapMap._default;
tmp.innerHTML = wrap[1] + html.replace(XHTML_TAG_REGEXP, "<$1>$2>") + wrap[2];
@@ -11506,10 +11496,10 @@ function createInjector(modulesToLoad, strictDi) {
if (msie <= 11) {
return false;
}
- // Support: Edge 12-13 only
- // See: https://developer.microsoft.com/en-us/microsoft-edge/platform/issues/6156135/
+ // Workaround for MS Edge.
+ // Check https://connect.microsoft.com/IE/Feedback/Details/2211653
return typeof func === 'function'
- && /^(?:class\b|constructor\()/.test(stringifyFn(func));
+ && /^(?:class\s|constructor\()/.test(stringifyFn(func));
}
function invoke(fn, self, locals, serviceName) {
@@ -12250,13 +12240,7 @@ var $AnimateProvider = ['$provide', function($provide) {
* @param {DOMElement} parent the parent element which will append the element as
* a child (so long as the after element is not present)
* @param {DOMElement=} after the sibling element after which the element will be appended
- * @param {object=} options an optional collection of options/styles that will be applied to the element.
- * The object can have the following properties:
- *
- * - **addClass** - `{string}` - space-separated CSS classes to add to element
- * - **from** - `{Object}` - CSS properties & values at the beginning of animation. Must have matching `to`
- * - **removeClass** - `{string}` - space-separated CSS classes to remove from element
- * - **to** - `{Object}` - CSS properties & values at end of animation. Must have matching `from`
+ * @param {object=} options an optional collection of options/styles that will be applied to the element
*
* @return {Promise} the animation callback promise
*/
@@ -12282,13 +12266,7 @@ var $AnimateProvider = ['$provide', function($provide) {
* @param {DOMElement} parent the parent element which will append the element as
* a child (so long as the after element is not present)
* @param {DOMElement=} after the sibling element after which the element will be appended
- * @param {object=} options an optional collection of options/styles that will be applied to the element.
- * The object can have the following properties:
- *
- * - **addClass** - `{string}` - space-separated CSS classes to add to element
- * - **from** - `{Object}` - CSS properties & values at the beginning of animation. Must have matching `to`
- * - **removeClass** - `{string}` - space-separated CSS classes to remove from element
- * - **to** - `{Object}` - CSS properties & values at end of animation. Must have matching `from`
+ * @param {object=} options an optional collection of options/styles that will be applied to the element
*
* @return {Promise} the animation callback promise
*/
@@ -12309,13 +12287,7 @@ var $AnimateProvider = ['$provide', function($provide) {
* digest once the animation has completed.
*
* @param {DOMElement} element the element which will be removed from the DOM
- * @param {object=} options an optional collection of options/styles that will be applied to the element.
- * The object can have the following properties:
- *
- * - **addClass** - `{string}` - space-separated CSS classes to add to element
- * - **from** - `{Object}` - CSS properties & values at the beginning of animation. Must have matching `to`
- * - **removeClass** - `{string}` - space-separated CSS classes to remove from element
- * - **to** - `{Object}` - CSS properties & values at end of animation. Must have matching `from`
+ * @param {object=} options an optional collection of options/styles that will be applied to the element
*
* @return {Promise} the animation callback promise
*/
@@ -12339,13 +12311,7 @@ var $AnimateProvider = ['$provide', function($provide) {
*
* @param {DOMElement} element the element which the CSS classes will be applied to
* @param {string} className the CSS class(es) that will be added (multiple classes are separated via spaces)
- * @param {object=} options an optional collection of options/styles that will be applied to the element.
- * The object can have the following properties:
- *
- * - **addClass** - `{string}` - space-separated CSS classes to add to element
- * - **from** - `{Object}` - CSS properties & values at the beginning of animation. Must have matching `to`
- * - **removeClass** - `{string}` - space-separated CSS classes to remove from element
- * - **to** - `{Object}` - CSS properties & values at end of animation. Must have matching `from`
+ * @param {object=} options an optional collection of options/styles that will be applied to the element
*
* @return {Promise} the animation callback promise
*/
@@ -12369,13 +12335,7 @@ var $AnimateProvider = ['$provide', function($provide) {
*
* @param {DOMElement} element the element which the CSS classes will be applied to
* @param {string} className the CSS class(es) that will be removed (multiple classes are separated via spaces)
- * @param {object=} options an optional collection of options/styles that will be applied to the element.
- * The object can have the following properties:
- *
- * - **addClass** - `{string}` - space-separated CSS classes to add to element
- * - **from** - `{Object}` - CSS properties & values at the beginning of animation. Must have matching `to`
- * - **removeClass** - `{string}` - space-separated CSS classes to remove from element
- * - **to** - `{Object}` - CSS properties & values at end of animation. Must have matching `from`
+ * @param {object=} options an optional collection of options/styles that will be applied to the element
*
* @return {Promise} the animation callback promise
*/
@@ -12400,13 +12360,7 @@ var $AnimateProvider = ['$provide', function($provide) {
* @param {DOMElement} element the element which the CSS classes will be applied to
* @param {string} add the CSS class(es) that will be added (multiple classes are separated via spaces)
* @param {string} remove the CSS class(es) that will be removed (multiple classes are separated via spaces)
- * @param {object=} options an optional collection of options/styles that will be applied to the element.
- * The object can have the following properties:
- *
- * - **addClass** - `{string}` - space-separated CSS classes to add to element
- * - **from** - `{Object}` - CSS properties & values at the beginning of animation. Must have matching `to`
- * - **removeClass** - `{string}` - space-separated CSS classes to remove from element
- * - **to** - `{Object}` - CSS properties & values at end of animation. Must have matching `from`
+ * @param {object=} options an optional collection of options/styles that will be applied to the element
*
* @return {Promise} the animation callback promise
*/
@@ -12447,13 +12401,7 @@ var $AnimateProvider = ['$provide', function($provide) {
* @param {string=} className an optional CSS class that will be applied to the element for the duration of the animation. If
* this value is left as empty then a CSS class of `ng-inline-animate` will be applied to the element.
* (Note that if no animation is detected then this value will not be applied to the element.)
- * @param {object=} options an optional collection of options/styles that will be applied to the element.
- * The object can have the following properties:
- *
- * - **addClass** - `{string}` - space-separated CSS classes to add to element
- * - **from** - `{Object}` - CSS properties & values at the beginning of animation. Must have matching `to`
- * - **removeClass** - `{string}` - space-separated CSS classes to remove from element
- * - **to** - `{Object}` - CSS properties & values at end of animation. Must have matching `from`
+ * @param {object=} options an optional collection of options/styles that will be applied to the element
*
* @return {Promise} the animation callback promise
*/
@@ -13541,9 +13489,8 @@ function $TemplateCacheProvider() {
* There are many different options for a directive.
*
* The difference resides in the return value of the factory function.
- * You can either return a {@link $compile#directive-definition-object Directive Definition Object (see below)}
- * that defines the directive properties, or just the `postLink` function (all other properties will have
- * the default values).
+ * You can either return a "Directive Definition Object" (see below) that defines the directive properties,
+ * or just the `postLink` function (all other properties will have the default values).
*
*
* **Best Practice:** It's recommended to use the "directive definition object" form.
@@ -13607,125 +13554,6 @@ function $TemplateCacheProvider() {
* });
* ```
*
- * ### Life-cycle hooks
- * Directive controllers can provide the following methods that are called by Angular at points in the life-cycle of the
- * directive:
- * * `$onInit()` - Called on each controller after all the controllers on an element have been constructed and
- * had their bindings initialized (and before the pre & post linking functions for the directives on
- * this element). This is a good place to put initialization code for your controller.
- * * `$onChanges(changesObj)` - Called whenever one-way (`<`) or interpolation (`@`) bindings are updated. The
- * `changesObj` is a hash whose keys are the names of the bound properties that have changed, and the values are an
- * object of the form `{ currentValue, previousValue, isFirstChange() }`. Use this hook to trigger updates within a
- * component such as cloning the bound value to prevent accidental mutation of the outer value.
- * * `$doCheck()` - Called on each turn of the digest cycle. Provides an opportunity to detect and act on
- * changes. Any actions that you wish to take in response to the changes that you detect must be
- * invoked from this hook; implementing this has no effect on when `$onChanges` is called. For example, this hook
- * could be useful if you wish to perform a deep equality check, or to check a Date object, changes to which would not
- * be detected by Angular's change detector and thus not trigger `$onChanges`. This hook is invoked with no arguments;
- * if detecting changes, you must store the previous value(s) for comparison to the current values.
- * * `$onDestroy()` - Called on a controller when its containing scope is destroyed. Use this hook for releasing
- * external resources, watches and event handlers. Note that components have their `$onDestroy()` hooks called in
- * the same order as the `$scope.$broadcast` events are triggered, which is top down. This means that parent
- * components will have their `$onDestroy()` hook called before child components.
- * * `$postLink()` - Called after this controller's element and its children have been linked. Similar to the post-link
- * function this hook can be used to set up DOM event handlers and do direct DOM manipulation.
- * Note that child elements that contain `templateUrl` directives will not have been compiled and linked since
- * they are waiting for their template to load asynchronously and their own compilation and linking has been
- * suspended until that occurs.
- *
- * #### Comparison with Angular 2 life-cycle hooks
- * Angular 2 also uses life-cycle hooks for its components. While the Angular 1 life-cycle hooks are similar there are
- * some differences that you should be aware of, especially when it comes to moving your code from Angular 1 to Angular 2:
- *
- * * Angular 1 hooks are prefixed with `$`, such as `$onInit`. Angular 2 hooks are prefixed with `ng`, such as `ngOnInit`.
- * * Angular 1 hooks can be defined on the controller prototype or added to the controller inside its constructor.
- * In Angular 2 you can only define hooks on the prototype of the Component class.
- * * Due to the differences in change-detection, you may get many more calls to `$doCheck` in Angular 1 than you would to
- * `ngDoCheck` in Angular 2
- * * Changes to the model inside `$doCheck` will trigger new turns of the digest loop, which will cause the changes to be
- * propagated throughout the application.
- * Angular 2 does not allow the `ngDoCheck` hook to trigger a change outside of the component. It will either throw an
- * error or do nothing depending upon the state of `enableProdMode()`.
- *
- * #### Life-cycle hook examples
- *
- * This example shows how you can check for mutations to a Date object even though the identity of the object
- * has not changed.
- *
- *
- *
- * angular.module('do-check-module', [])
- * .component('app', {
- * template:
- * 'Month: ' +
- * 'Date: {{ $ctrl.date }}' +
- * '',
- * controller: function() {
- * this.date = new Date();
- * this.month = this.date.getMonth();
- * this.updateDate = function() {
- * this.date.setMonth(this.month);
- * };
- * }
- * })
- * .component('test', {
- * bindings: { date: '<' },
- * template:
- * '
{{ $ctrl.log | json }}
',
- * controller: function() {
- * var previousValue;
- * this.log = [];
- * this.$doCheck = function() {
- * var currentValue = this.date && this.date.valueOf();
- * if (previousValue !== currentValue) {
- * this.log.push('doCheck: date mutated: ' + this.date);
- * previousValue = currentValue;
- * }
- * };
- * }
- * });
- *
- *
- *
- *
- *
- *
- * This example show how you might use `$doCheck` to trigger changes in your component's inputs even if the
- * actual identity of the component doesn't change. (Be aware that cloning and deep equality checks on large
- * arrays or objects can have a negative impact on your application performance)
- *
- *
- *
- *
',
- * controller: function() {
- * this.log = [];
- *
- * this.$doCheck = function() {
- * if (this.items_ref !== this.items) {
- * this.log.push('doCheck: items changed');
- * this.items_ref = this.items;
- * }
- * if (!angular.equals(this.items_clone, this.items)) {
- * this.log.push('doCheck: items mutated');
- * this.items_clone = angular.copy(this.items);
- * }
- * };
- * }
- * });
- *
- *
*
*
* ### Directive Definition Object
@@ -13901,6 +13729,25 @@ function $TemplateCacheProvider() {
* The `$transclude` function also has a method on it, `$transclude.isSlotFilled(slotName)`, which returns
* `true` if the specified slot contains content (i.e. one or more DOM nodes).
*
+ * The controller can provide the following methods that act as life-cycle hooks:
+ * * `$onInit()` - Called on each controller after all the controllers on an element have been constructed and
+ * had their bindings initialized (and before the pre & post linking functions for the directives on
+ * this element). This is a good place to put initialization code for your controller.
+ * * `$onChanges(changesObj)` - Called whenever one-way (`<`) or interpolation (`@`) bindings are updated. The
+ * `changesObj` is a hash whose keys are the names of the bound properties that have changed, and the values are an
+ * object of the form `{ currentValue, previousValue, isFirstChange() }`. Use this hook to trigger updates within a
+ * component such as cloning the bound value to prevent accidental mutation of the outer value.
+ * * `$onDestroy()` - Called on a controller when its containing scope is destroyed. Use this hook for releasing
+ * external resources, watches and event handlers. Note that components have their `$onDestroy()` hooks called in
+ * the same order as the `$scope.$broadcast` events are triggered, which is top down. This means that parent
+ * components will have their `$onDestroy()` hook called before child components.
+ * * `$postLink()` - Called after this controller's element and its children have been linked. Similar to the post-link
+ * function this hook can be used to set up DOM event handlers and do direct DOM manipulation.
+ * Note that child elements that contain `templateUrl` directives will not have been compiled and linked since
+ * they are waiting for their template to load asynchronously and their own compilation and linking has been
+ * suspended until that occurs.
+ *
+ *
* #### `require`
* Require another directive and inject its controller as the fourth argument to the linking function. The
* `require` property can be a string, an array or an object:
@@ -14098,8 +13945,8 @@ function $TemplateCacheProvider() {
* any other controller.
*
* * `transcludeFn` - A transclude linking function pre-bound to the correct transclusion scope.
- * This is the same as the `$transclude` parameter of directive controllers,
- * see {@link ng.$compile#-controller- the controller section for details}.
+ * This is the same as the `$transclude`
+ * parameter of directive controllers, see there for details.
* `function([scope], cloneLinkingFn, futureParentElement)`.
*
* #### Pre-linking function
@@ -14901,19 +14748,11 @@ function $CompileProvider($provide, $$sanitizeUriProvider) {
}
// We must run this hook in an apply since the $$postDigest runs outside apply
$rootScope.$apply(function() {
- var errors = [];
for (var i = 0, ii = onChangesQueue.length; i < ii; ++i) {
- try {
- onChangesQueue[i]();
- } catch (e) {
- errors.push(e);
- }
+ onChangesQueue[i]();
}
// Reset the queue to trigger a new schedule next time there is a change
onChangesQueue = undefined;
- if (errors.length) {
- throw errors;
- }
});
} finally {
onChangesTtl++;
@@ -15554,7 +15393,19 @@ function $CompileProvider($provide, $$sanitizeUriProvider) {
addTextInterpolateDirective(directives, node.nodeValue);
break;
case NODE_TYPE_COMMENT: /* Comment */
- collectCommentDirectives(node, directives, attrs, maxPriority, ignoreDirective);
+ try {
+ match = COMMENT_DIRECTIVE_REGEXP.exec(node.nodeValue);
+ if (match) {
+ nName = directiveNormalize(match[1]);
+ if (addDirective(directives, nName, 'M', maxPriority, ignoreDirective)) {
+ attrs[nName] = trim(match[2]);
+ }
+ }
+ } catch (e) {
+ // turns out that under some circumstances IE9 throws errors when one attempts to read
+ // comment's node value.
+ // Just ignore it and continue. (Can't seem to reproduce in test case.)
+ }
break;
}
@@ -15562,24 +15413,6 @@ function $CompileProvider($provide, $$sanitizeUriProvider) {
return directives;
}
- function collectCommentDirectives(node, directives, attrs, maxPriority, ignoreDirective) {
- // function created because of performance, try/catch disables
- // the optimization of the whole function #14848
- try {
- var match = COMMENT_DIRECTIVE_REGEXP.exec(node.nodeValue);
- if (match) {
- var nName = directiveNormalize(match[1]);
- if (addDirective(directives, nName, 'M', maxPriority, ignoreDirective)) {
- attrs[nName] = trim(match[2]);
- }
- }
- } catch (e) {
- // turns out that under some circumstances IE9 throws errors when one attempts to read
- // comment's node value.
- // Just ignore it and continue. (Can't seem to reproduce in test case.)
- }
- }
-
/**
* Given a node with an directive-start it collects all of the siblings until it finds
* directive-end.
@@ -16095,22 +15928,10 @@ function $CompileProvider($provide, $$sanitizeUriProvider) {
forEach(elementControllers, function(controller) {
var controllerInstance = controller.instance;
if (isFunction(controllerInstance.$onChanges)) {
- try {
- controllerInstance.$onChanges(controller.bindingInfo.initialChanges);
- } catch (e) {
- $exceptionHandler(e);
- }
+ controllerInstance.$onChanges(controller.bindingInfo.initialChanges);
}
if (isFunction(controllerInstance.$onInit)) {
- try {
- controllerInstance.$onInit();
- } catch (e) {
- $exceptionHandler(e);
- }
- }
- if (isFunction(controllerInstance.$doCheck)) {
- controllerScope.$watch(function() { controllerInstance.$doCheck(); });
- controllerInstance.$doCheck();
+ controllerInstance.$onInit();
}
if (isFunction(controllerInstance.$onDestroy)) {
controllerScope.$on('$destroy', function callOnDestroyHook() {
@@ -16374,16 +16195,18 @@ function $CompileProvider($provide, $$sanitizeUriProvider) {
// copy the new attributes on the old attrs object
forEach(src, function(value, key) {
- // Check if we already set this attribute in the loop above.
- // `dst` will never contain hasOwnProperty as DOM parser won't let it.
- // You will get an "InvalidCharacterError: DOM Exception 5" error if you
- // have an attribute like "has-own-property" or "data-has-own-property", etc.
- if (!dst.hasOwnProperty(key) && key.charAt(0) !== '$') {
+ if (key == 'class') {
+ safeAddClass($element, value);
+ dst['class'] = (dst['class'] ? dst['class'] + ' ' : '') + value;
+ } else if (key == 'style') {
+ $element.attr('style', $element.attr('style') + ';' + value);
+ dst['style'] = (dst['style'] ? dst['style'] + ';' : '') + value;
+ // `dst` will never contain hasOwnProperty as DOM parser won't let it.
+ // You will get an "InvalidCharacterError: DOM Exception 5" error if you
+ // have an attribute like "has-own-property" or "data-has-own-property", etc.
+ } else if (key.charAt(0) != '$' && !dst.hasOwnProperty(key)) {
dst[key] = value;
-
- if (key !== 'class' && key !== 'style') {
- dstAttr[key] = srcAttr[key];
- }
+ dstAttr[key] = srcAttr[key];
}
});
}
@@ -16758,7 +16581,7 @@ function $CompileProvider($provide, $$sanitizeUriProvider) {
forEach(bindings, function initializeBinding(definition, scopeName) {
var attrName = definition.attrName,
optional = definition.optional,
- mode = definition.mode, // @, =, <, or &
+ mode = definition.mode, // @, =, or &
lastValue,
parentGet, parentSet, compare, removeWatch;
@@ -17244,21 +17067,18 @@ function $DocumentProvider() {
*
* ## Example:
*
- * The example below will overwrite the default `$exceptionHandler` in order to (a) log uncaught
- * errors to the backend for later inspection by the developers and (b) to use `$log.warn()` instead
- * of `$log.error()`.
- *
* ```js
- * angular.
- * module('exceptionOverwrite', []).
- * factory('$exceptionHandler', ['$log', 'logErrorsToBackend', function($log, logErrorsToBackend) {
- * return function myExceptionHandler(exception, cause) {
- * logErrorsToBackend(exception, cause);
- * $log.warn(exception, cause);
- * };
- * }]);
+ * angular.module('exceptionOverride', []).factory('$exceptionHandler', function() {
+ * return function(exception, cause) {
+ * exception.message += ' (caused by "' + cause + '")';
+ * throw exception;
+ * };
+ * });
* ```
*
+ * This example will override the normal action of `$exceptionHandler`, to make angular
+ * exceptions fail hard when they happen, instead of just logging to the console.
+ *
*
* Note, that code executed in event-listeners (even those registered using jqLite's `on`/`bind`
* methods) does not delegate exceptions to the {@link ng.$exceptionHandler $exceptionHandler}
@@ -17268,7 +17088,7 @@ function $DocumentProvider() {
* `try { ... } catch(e) { $exceptionHandler(e); }`
*
* @param {Error} exception Exception associated with the error.
- * @param {string=} cause Optional information about the context in which
+ * @param {string=} cause optional information about the context in which
* the error was thrown.
*
*/
@@ -17338,7 +17158,7 @@ function $HttpParamSerializerProvider() {
* * `{'foo': 'bar'}` results in `foo=bar`
* * `{'foo': Date.now()}` results in `foo=2015-04-01T09%3A50%3A49.262Z` (`toISOString()` and encoded representation of a Date object)
* * `{'foo': ['bar', 'baz']}` results in `foo=bar&foo=baz` (repeated key for each array element)
- * * `{'foo': {'bar':'baz'}}` results in `foo=%7B%22bar%22%3A%22baz%22%7D` (stringified and encoded representation of an object)
+ * * `{'foo': {'bar':'baz'}}` results in `foo=%7B%22bar%22%3A%22baz%22%7D"` (stringified and encoded representation of an object)
*
* Note that serializer will sort the request parameters alphabetically.
* */
@@ -17889,7 +17709,7 @@ function $HttpProvider() {
*
* ### Overriding the Default Transformations Per Request
*
- * If you wish to override the request/response transformations only for a single request then provide
+ * If you wish override the request/response transformations only for a single request then provide
* `transformRequest` and/or `transformResponse` properties on the configuration object passed
* into `$http`.
*
@@ -17932,7 +17752,7 @@ function $HttpProvider() {
* * cache a specific response - set config.cache value to TRUE or to a cache object
*
* If caching is enabled, but neither the default cache nor config.cache are set to a cache object,
- * then the default `$cacheFactory("$http")` object is used.
+ * then the default `$cacheFactory($http)` object is used.
*
* The default cache value can be set by updating the
* {@link ng.$http#defaults `$http.defaults.cache`} property or the
@@ -18260,25 +18080,48 @@ function $HttpProvider() {
config.headers = mergeHeaders(requestConfig);
config.method = uppercase(config.method);
config.paramSerializer = isString(config.paramSerializer) ?
- $injector.get(config.paramSerializer) : config.paramSerializer;
+ $injector.get(config.paramSerializer) : config.paramSerializer;
+
+ var serverRequest = function(config) {
+ var headers = config.headers;
+ var reqData = transformData(config.data, headersGetter(headers), undefined, config.transformRequest);
- var requestInterceptors = [];
- var responseInterceptors = [];
+ // strip content-type if data is undefined
+ if (isUndefined(reqData)) {
+ forEach(headers, function(value, header) {
+ if (lowercase(header) === 'content-type') {
+ delete headers[header];
+ }
+ });
+ }
+
+ if (isUndefined(config.withCredentials) && !isUndefined(defaults.withCredentials)) {
+ config.withCredentials = defaults.withCredentials;
+ }
+
+ // send request
+ return sendReq(config, reqData).then(transformResponse, transformResponse);
+ };
+
+ var chain = [serverRequest, undefined];
var promise = $q.when(config);
// apply interceptors
forEach(reversedInterceptors, function(interceptor) {
if (interceptor.request || interceptor.requestError) {
- requestInterceptors.unshift(interceptor.request, interceptor.requestError);
+ chain.unshift(interceptor.request, interceptor.requestError);
}
if (interceptor.response || interceptor.responseError) {
- responseInterceptors.push(interceptor.response, interceptor.responseError);
+ chain.push(interceptor.response, interceptor.responseError);
}
});
- promise = chainInterceptors(promise, requestInterceptors);
- promise = promise.then(serverRequest);
- promise = chainInterceptors(promise, responseInterceptors);
+ while (chain.length) {
+ var thenFn = chain.shift();
+ var rejectFn = chain.shift();
+
+ promise = promise.then(thenFn, rejectFn);
+ }
if (useLegacyPromise) {
promise.success = function(fn) {
@@ -18305,18 +18148,14 @@ function $HttpProvider() {
return promise;
-
- function chainInterceptors(promise, interceptors) {
- for (var i = 0, ii = interceptors.length; i < ii;) {
- var thenFn = interceptors[i++];
- var rejectFn = interceptors[i++];
-
- promise = promise.then(thenFn, rejectFn);
- }
-
- interceptors.length = 0;
-
- return promise;
+ function transformResponse(response) {
+ // make a copy since the response must be cacheable
+ var resp = extend({}, response);
+ resp.data = transformData(response.data, response.headers, response.status,
+ config.transformResponse);
+ return (isSuccess(response.status))
+ ? resp
+ : $q.reject(resp);
}
function executeHeaderFns(headers, config) {
@@ -18360,37 +18199,6 @@ function $HttpProvider() {
// execute if header value is a function for merged headers
return executeHeaderFns(reqHeaders, shallowCopy(config));
}
-
- function serverRequest(config) {
- var headers = config.headers;
- var reqData = transformData(config.data, headersGetter(headers), undefined, config.transformRequest);
-
- // strip content-type if data is undefined
- if (isUndefined(reqData)) {
- forEach(headers, function(value, header) {
- if (lowercase(header) === 'content-type') {
- delete headers[header];
- }
- });
- }
-
- if (isUndefined(config.withCredentials) && !isUndefined(defaults.withCredentials)) {
- config.withCredentials = defaults.withCredentials;
- }
-
- // send request
- return sendReq(config, reqData).then(transformResponse, transformResponse);
- }
-
- function transformResponse(response) {
- // make a copy since the response must be cacheable
- var resp = extend({}, response);
- resp.data = transformData(response.data, response.headers, response.status,
- config.transformResponse);
- return (isSuccess(response.status))
- ? resp
- : $q.reject(resp);
- }
}
$http.pendingRequests = [];
@@ -18437,8 +18245,6 @@ function $HttpProvider() {
*
* @description
* Shortcut method to perform `JSONP` request.
- * If you would like to customise where and how the callbacks are stored then try overriding
- * or decorating the {@link $jsonpCallbacks} service.
*
* @param {string} url Relative or absolute URL specifying the destination of the request.
* The name of the callback should be the string `JSON_CALLBACK`.
@@ -18712,7 +18518,7 @@ function $xhrFactoryProvider() {
/**
* @ngdoc service
* @name $httpBackend
- * @requires $jsonpCallbacks
+ * @requires $window
* @requires $document
* @requires $xhrFactory
*
@@ -18727,8 +18533,8 @@ function $xhrFactoryProvider() {
* $httpBackend} which can be trained with responses.
*/
function $HttpBackendProvider() {
- this.$get = ['$browser', '$jsonpCallbacks', '$document', '$xhrFactory', function($browser, $jsonpCallbacks, $document, $xhrFactory) {
- return createHttpBackend($browser, $xhrFactory, $browser.defer, $jsonpCallbacks, $document[0]);
+ this.$get = ['$browser', '$window', '$document', '$xhrFactory', function($browser, $window, $document, $xhrFactory) {
+ return createHttpBackend($browser, $xhrFactory, $browser.defer, $window.angular.callbacks, $document[0]);
}];
}
@@ -18738,13 +18544,17 @@ function createHttpBackend($browser, createXhr, $browserDefer, callbacks, rawDoc
$browser.$$incOutstandingRequestCount();
url = url || $browser.url();
- if (lowercase(method) === 'jsonp') {
- var callbackPath = callbacks.createCallback(url);
- var jsonpDone = jsonpReq(url, callbackPath, function(status, text) {
- // jsonpReq only ever sets status to 200 (OK), 404 (ERROR) or -1 (WAITING)
- var response = (status === 200) && callbacks.getResponse(callbackPath);
- completeRequest(callback, status, response, "", text);
- callbacks.removeCallback(callbackPath);
+ if (lowercase(method) == 'jsonp') {
+ var callbackId = '_' + (callbacks.counter++).toString(36);
+ callbacks[callbackId] = function(data) {
+ callbacks[callbackId].data = data;
+ callbacks[callbackId].called = true;
+ };
+
+ var jsonpDone = jsonpReq(url.replace('JSON_CALLBACK', 'angular.callbacks.' + callbackId),
+ callbackId, function(status, text) {
+ completeRequest(callback, status, callbacks[callbackId].data, "", text);
+ callbacks[callbackId] = noop;
});
} else {
@@ -18846,8 +18656,7 @@ function createHttpBackend($browser, createXhr, $browserDefer, callbacks, rawDoc
}
};
- function jsonpReq(url, callbackPath, done) {
- url = url.replace('JSON_CALLBACK', callbackPath);
+ function jsonpReq(url, callbackId, done) {
// we can't use jQuery/jqLite here because jQuery does crazy stuff with script elements, e.g.:
// - fetches local scripts via XHR and evals them
// - adds and immediately removes script elements from the document
@@ -18865,7 +18674,7 @@ function createHttpBackend($browser, createXhr, $browserDefer, callbacks, rawDoc
var text = "unknown";
if (event) {
- if (event.type === "load" && !callbacks.wasCalled(callbackPath)) {
+ if (event.type === "load" && !callbacks[callbackId].called) {
event = { type: "error" };
}
text = event.type;
@@ -19064,7 +18873,7 @@ function $InterpolateProvider() {
*
* `allOrNothing` is useful for interpolating URLs. `ngSrc` and `ngSrcset` use this behavior.
*
- * #### Escaped Interpolation
+ * ####Escaped Interpolation
* $interpolate provides a mechanism for escaping interpolation markers. Start and end markers
* can be escaped by preceding each of their characters with a REVERSE SOLIDUS U+005C (backslash).
* It will be rendered as a regular start/end marker, and will not be interpreted as an expression
@@ -19487,87 +19296,6 @@ function $IntervalProvider() {
}];
}
-/**
- * @ngdoc service
- * @name $jsonpCallbacks
- * @requires $window
- * @description
- * This service handles the lifecycle of callbacks to handle JSONP requests.
- * Override this service if you wish to customise where the callbacks are stored and
- * how they vary compared to the requested url.
- */
-var $jsonpCallbacksProvider = function() {
- this.$get = ['$window', function($window) {
- var callbacks = $window.angular.callbacks;
- var callbackMap = {};
-
- function createCallback(callbackId) {
- var callback = function(data) {
- callback.data = data;
- callback.called = true;
- };
- callback.id = callbackId;
- return callback;
- }
-
- return {
- /**
- * @ngdoc method
- * @name $jsonpCallbacks#createCallback
- * @param {string} url the url of the JSONP request
- * @returns {string} the callback path to send to the server as part of the JSONP request
- * @description
- * {@link $httpBackend} calls this method to create a callback and get hold of the path to the callback
- * to pass to the server, which will be used to call the callback with its payload in the JSONP response.
- */
- createCallback: function(url) {
- var callbackId = '_' + (callbacks.$$counter++).toString(36);
- var callbackPath = 'angular.callbacks.' + callbackId;
- var callback = createCallback(callbackId);
- callbackMap[callbackPath] = callbacks[callbackId] = callback;
- return callbackPath;
- },
- /**
- * @ngdoc method
- * @name $jsonpCallbacks#wasCalled
- * @param {string} callbackPath the path to the callback that was sent in the JSONP request
- * @returns {boolean} whether the callback has been called, as a result of the JSONP response
- * @description
- * {@link $httpBackend} calls this method to find out whether the JSONP response actually called the
- * callback that was passed in the request.
- */
- wasCalled: function(callbackPath) {
- return callbackMap[callbackPath].called;
- },
- /**
- * @ngdoc method
- * @name $jsonpCallbacks#getResponse
- * @param {string} callbackPath the path to the callback that was sent in the JSONP request
- * @returns {*} the data received from the response via the registered callback
- * @description
- * {@link $httpBackend} calls this method to get hold of the data that was provided to the callback
- * in the JSONP response.
- */
- getResponse: function(callbackPath) {
- return callbackMap[callbackPath].data;
- },
- /**
- * @ngdoc method
- * @name $jsonpCallbacks#removeCallback
- * @param {string} callbackPath the path to the callback that was sent in the JSONP request
- * @description
- * {@link $httpBackend} calls this method to remove the callback after the JSONP request has
- * completed or timed-out.
- */
- removeCallback: function(callbackPath) {
- var callback = callbackMap[callbackPath];
- delete callbacks[callback.id];
- delete callbackMap[callbackPath];
- }
- };
- }];
-};
-
/**
* @ngdoc service
* @name $locale
@@ -19907,12 +19635,6 @@ function LocationHashbangInHtml5Url(appBase, appBaseNoFile, hashPrefix) {
var locationPrototype = {
- /**
- * Ensure absolute url is initialized.
- * @private
- */
- $$absUrl:'',
-
/**
* Are we in html5 mode?
* @private
@@ -21286,7 +21008,7 @@ AST.prototype = {
var args = [];
if (this.peekToken().text !== ')') {
do {
- args.push(this.filterChain());
+ args.push(this.expression());
} while (this.expect(','));
}
return args;
@@ -23013,7 +22735,7 @@ function $ParseProvider() {
*
* **Methods**
*
- * - `then(successCallback, [errorCallback], [notifyCallback])` – regardless of when the promise was or
+ * - `then(successCallback, errorCallback, notifyCallback)` – regardless of when the promise was or
* will be resolved or rejected, `then` calls one of the success or error callbacks asynchronously
* as soon as the result is available. The callbacks are called with a single argument: the result
* or rejection reason. Additionally, the notify callback may be called zero or more times to
@@ -23024,8 +22746,7 @@ function $ParseProvider() {
* with the value which is resolved in that promise using
* [promise chaining](http://www.html5rocks.com/en/tutorials/es6/promises/#toc-promises-queues)).
* It also notifies via the return value of the `notifyCallback` method. The promise cannot be
- * resolved or rejected from the notifyCallback method. The errorCallback and notifyCallback
- * arguments are optional.
+ * resolved or rejected from the notifyCallback method.
*
* - `catch(errorCallback)` – shorthand for `promise.then(null, errorCallback)`
*
@@ -23440,30 +23161,6 @@ function qFactory(nextTick, exceptionHandler) {
return deferred.promise;
}
- /**
- * @ngdoc method
- * @name $q#race
- * @kind function
- *
- * @description
- * Returns a promise that resolves or rejects as soon as one of those promises
- * resolves or rejects, with the value or reason from that promise.
- *
- * @param {Array.|Object.} promises An array or hash of promises.
- * @returns {Promise} a promise that resolves or rejects as soon as one of the `promises`
- * resolves or rejects, with the value or reason from that promise.
- */
-
- function race(promises) {
- var deferred = defer();
-
- forEach(promises, function(promise) {
- when(promise).then(deferred.resolve, deferred.reject);
- });
-
- return deferred.promise;
- }
-
var $Q = function Q(resolver) {
if (!isFunction(resolver)) {
throw $qMinErr('norslvr', "Expected resolverFn, got '{0}'", resolver);
@@ -23493,7 +23190,6 @@ function qFactory(nextTick, exceptionHandler) {
$Q.when = when;
$Q.resolve = resolve;
$Q.all = all;
- $Q.race = race;
return $Q;
}
@@ -26845,11 +26541,10 @@ function $FilterProvider($provide) {
* - `Object`: A pattern object can be used to filter specific properties on objects contained
* by `array`. For example `{name:"M", phone:"1"}` predicate will return an array of items
* which have property `name` containing "M" and property `phone` containing "1". A special
- * property name (`$` by default) can be used (e.g. as in `{$: "text"}`) to accept a match
- * against any property of the object or its nested object properties. That's equivalent to the
- * simple substring match with a `string` as described above. The special property name can be
- * overwritten, using the `anyPropertyKey` parameter.
- * The predicate can be negated by prefixing the string with `!`.
+ * property name `$` can be used (as in `{$:"text"}`) to accept a match against any
+ * property of the object or its nested object properties. That's equivalent to the simple
+ * substring match with a `string` as described above. The predicate can be negated by prefixing
+ * the string with `!`.
* For example `{name: "!M"}` predicate will return an array of items which have property `name`
* not containing "M".
*
@@ -26883,9 +26578,6 @@ function $FilterProvider($provide) {
* Primitive values are converted to strings. Objects are not compared against primitives,
* unless they have a custom `toString` method (e.g. `Date` objects).
*
- * @param {string=} anyPropertyKey The special property name that matches against any property.
- * By default `$`.
- *
* @example
@@ -26954,9 +26646,8 @@ function $FilterProvider($provide) {
*/
-
function filterFilter() {
- return function(array, expression, comparator, anyPropertyKey) {
+ return function(array, expression, comparator) {
if (!isArrayLike(array)) {
if (array == null) {
return array;
@@ -26965,7 +26656,6 @@ function filterFilter() {
}
}
- anyPropertyKey = anyPropertyKey || '$';
var expressionType = getTypeForFilter(expression);
var predicateFn;
var matchAgainstAnyProp;
@@ -26982,7 +26672,7 @@ function filterFilter() {
//jshint -W086
case 'object':
//jshint +W086
- predicateFn = createPredicateFn(expression, comparator, anyPropertyKey, matchAgainstAnyProp);
+ predicateFn = createPredicateFn(expression, comparator, matchAgainstAnyProp);
break;
default:
return array;
@@ -26993,8 +26683,8 @@ function filterFilter() {
}
// Helper functions for `filterFilter`
-function createPredicateFn(expression, comparator, anyPropertyKey, matchAgainstAnyProp) {
- var shouldMatchPrimitives = isObject(expression) && (anyPropertyKey in expression);
+function createPredicateFn(expression, comparator, matchAgainstAnyProp) {
+ var shouldMatchPrimitives = isObject(expression) && ('$' in expression);
var predicateFn;
if (comparator === true) {
@@ -27022,25 +26712,25 @@ function createPredicateFn(expression, comparator, anyPropertyKey, matchAgainstA
predicateFn = function(item) {
if (shouldMatchPrimitives && !isObject(item)) {
- return deepCompare(item, expression[anyPropertyKey], comparator, anyPropertyKey, false);
+ return deepCompare(item, expression.$, comparator, false);
}
- return deepCompare(item, expression, comparator, anyPropertyKey, matchAgainstAnyProp);
+ return deepCompare(item, expression, comparator, matchAgainstAnyProp);
};
return predicateFn;
}
-function deepCompare(actual, expected, comparator, anyPropertyKey, matchAgainstAnyProp, dontMatchWholeObject) {
+function deepCompare(actual, expected, comparator, matchAgainstAnyProp, dontMatchWholeObject) {
var actualType = getTypeForFilter(actual);
var expectedType = getTypeForFilter(expected);
if ((expectedType === 'string') && (expected.charAt(0) === '!')) {
- return !deepCompare(actual, expected.substring(1), comparator, anyPropertyKey, matchAgainstAnyProp);
+ return !deepCompare(actual, expected.substring(1), comparator, matchAgainstAnyProp);
} else if (isArray(actual)) {
// In case `actual` is an array, consider it a match
// if ANY of it's items matches `expected`
return actual.some(function(item) {
- return deepCompare(item, expected, comparator, anyPropertyKey, matchAgainstAnyProp);
+ return deepCompare(item, expected, comparator, matchAgainstAnyProp);
});
}
@@ -27049,11 +26739,11 @@ function deepCompare(actual, expected, comparator, anyPropertyKey, matchAgainstA
var key;
if (matchAgainstAnyProp) {
for (key in actual) {
- if ((key.charAt(0) !== '$') && deepCompare(actual[key], expected, comparator, anyPropertyKey, true)) {
+ if ((key.charAt(0) !== '$') && deepCompare(actual[key], expected, comparator, true)) {
return true;
}
}
- return dontMatchWholeObject ? false : deepCompare(actual, expected, comparator, anyPropertyKey, false);
+ return dontMatchWholeObject ? false : deepCompare(actual, expected, comparator, false);
} else if (expectedType === 'object') {
for (key in expected) {
var expectedVal = expected[key];
@@ -27061,9 +26751,9 @@ function deepCompare(actual, expected, comparator, anyPropertyKey, matchAgainstA
continue;
}
- var matchAnyProperty = key === anyPropertyKey;
+ var matchAnyProperty = key === '$';
var actualVal = matchAnyProperty ? actual : actual[key];
- if (!deepCompare(actualVal, expectedVal, comparator, anyPropertyKey, matchAnyProperty, matchAnyProperty)) {
+ if (!deepCompare(actualVal, expectedVal, comparator, matchAnyProperty, matchAnyProperty)) {
return false;
}
}
@@ -27801,22 +27491,21 @@ var uppercaseFilter = valueFn(uppercase);
* @kind function
*
* @description
- * Creates a new array or string containing only a specified number of elements. The elements are
- * taken from either the beginning or the end of the source array, string or number, as specified by
- * the value and sign (positive or negative) of `limit`. Other array-like objects are also supported
- * (e.g. array subclasses, NodeLists, jqLite/jQuery collections etc). If a number is used as input,
- * it is converted to a string.
- *
- * @param {Array|ArrayLike|string|number} input - Array/array-like, string or number to be limited.
- * @param {string|number} limit - The length of the returned array or string. If the `limit` number
+ * Creates a new array or string containing only a specified number of elements. The elements
+ * are taken from either the beginning or the end of the source array, string or number, as specified by
+ * the value and sign (positive or negative) of `limit`. If a number is used as input, it is
+ * converted to a string.
+ *
+ * @param {Array|string|number} input Source array, string or number to be limited.
+ * @param {string|number} limit The length of the returned array or string. If the `limit` number
* is positive, `limit` number of items from the beginning of the source array/string are copied.
* If the number is negative, `limit` number of items from the end of the source array/string
* are copied. The `limit` will be trimmed if it exceeds `array.length`. If `limit` is undefined,
* the input will be returned unchanged.
- * @param {(string|number)=} begin - Index at which to begin limitation. As a negative index,
- * `begin` indicates an offset from the end of `input`. Defaults to `0`.
- * @returns {Array|string} A new sub-array or substring of length `limit` or less if the input had
- * less than `limit` elements.
+ * @param {(string|number)=} begin Index at which to begin limitation. As a negative index, `begin`
+ * indicates an offset from the end of `input`. Defaults to `0`.
+ * @returns {Array|string} A new sub-array or substring of length `limit` or less if input array
+ * had less than `limit` elements.
*
* @example
@@ -27904,157 +27593,67 @@ function limitToFilter() {
if (isNaN(limit)) return input;
if (isNumber(input)) input = input.toString();
- if (!isArrayLike(input)) return input;
+ if (!isArray(input) && !isString(input)) return input;
begin = (!begin || isNaN(begin)) ? 0 : toInt(begin);
begin = (begin < 0) ? Math.max(0, input.length + begin) : begin;
if (limit >= 0) {
- return sliceFn(input, begin, begin + limit);
+ return input.slice(begin, begin + limit);
} else {
if (begin === 0) {
- return sliceFn(input, limit, input.length);
+ return input.slice(limit, input.length);
} else {
- return sliceFn(input, Math.max(0, begin + limit), begin);
+ return input.slice(Math.max(0, begin + limit), begin);
}
}
};
}
-function sliceFn(input, begin, end) {
- if (isString(input)) return input.slice(begin, end);
-
- return slice.call(input, begin, end);
-}
-
/**
* @ngdoc filter
* @name orderBy
* @kind function
*
* @description
- * Returns an array containing the items from the specified `collection`, ordered by a `comparator`
- * function based on the values computed using the `expression` predicate.
- *
- * For example, `[{id: 'foo'}, {id: 'bar'}] | orderBy:'id'` would result in
- * `[{id: 'bar'}, {id: 'foo'}]`.
+ * Orders a specified `array` by the `expression` predicate. It is ordered alphabetically
+ * for strings and numerically for numbers. Note: if you notice numbers are not being sorted
+ * as expected, make sure they are actually being saved as numbers and not strings.
+ * Array-like values (e.g. NodeLists, jQuery objects, TypedArrays, Strings, etc) are also supported.
*
- * The `collection` can be an Array or array-like object (e.g. NodeList, jQuery object, TypedArray,
- * String, etc).
- *
- * The `expression` can be a single predicate, or a list of predicates each serving as a tie-breaker
- * for the preceeding one. The `expression` is evaluated against each item and the output is used
- * for comparing with other items.
- *
- * You can change the sorting order by setting `reverse` to `true`. By default, items are sorted in
- * ascending order.
- *
- * The comparison is done using the `comparator` function. If none is specified, a default, built-in
- * comparator is used (see below for details - in a nutshell, it compares numbers numerically and
- * strings alphabetically).
- *
- * ### Under the hood
- *
- * Ordering the specified `collection` happens in two phases:
- *
- * 1. All items are passed through the predicate (or predicates), and the returned values are saved
- * along with their type (`string`, `number` etc). For example, an item `{label: 'foo'}`, passed
- * through a predicate that extracts the value of the `label` property, would be transformed to:
- * ```
- * {
- * value: 'foo',
- * type: 'string',
- * index: ...
- * }
- * ```
- * 2. The comparator function is used to sort the items, based on the derived values, types and
- * indices.
- *
- * If you use a custom comparator, it will be called with pairs of objects of the form
- * `{value: ..., type: '...', index: ...}` and is expected to return `0` if the objects are equal
- * (as far as the comparator is concerned), `-1` if the 1st one should be ranked higher than the
- * second, or `1` otherwise.
- *
- * In order to ensure that the sorting will be deterministic across platforms, if none of the
- * specified predicates can distinguish between two items, `orderBy` will automatically introduce a
- * dummy predicate that returns the item's index as `value`.
- * (If you are using a custom comparator, make sure it can handle this predicate as well.)
- *
- * Finally, in an attempt to simplify things, if a predicate returns an object as the extracted
- * value for an item, `orderBy` will try to convert that object to a primitive value, before passing
- * it to the comparator. The following rules govern the conversion:
- *
- * 1. If the object has a `valueOf()` method that returns a primitive, its return value will be
- * used instead.
- * (If the object has a `valueOf()` method that returns another object, then the returned object
- * will be used in subsequent steps.)
- * 2. If the object has a custom `toString()` method (i.e. not the one inherited from `Object`) that
- * returns a primitive, its return value will be used instead.
- * (If the object has a `toString()` method that returns another object, then the returned object
- * will be used in subsequent steps.)
- * 3. No conversion; the object itself is used.
- *
- * ### The default comparator
- *
- * The default, built-in comparator should be sufficient for most usecases. In short, it compares
- * numbers numerically, strings alphabetically (and case-insensitively), for objects falls back to
- * using their index in the original collection, and sorts values of different types by type.
- *
- * More specifically, it follows these steps to determine the relative order of items:
- *
- * 1. If the compared values are of different types, compare the types themselves alphabetically.
- * 2. If both values are of type `string`, compare them alphabetically in a case- and
- * locale-insensitive way.
- * 3. If both values are objects, compare their indices instead.
- * 4. Otherwise, return:
- * - `0`, if the values are equal (by strict equality comparison, i.e. using `===`).
- * - `-1`, if the 1st value is "less than" the 2nd value (compared using the `<` operator).
- * - `1`, otherwise.
- *
- * **Note:** If you notice numbers not being sorted as expected, make sure they are actually being
- * saved as numbers and not strings.
- *
- * @param {Array|ArrayLike} collection - The collection (array or array-like object) to sort.
- * @param {(Function|string|Array.)=} expression - A predicate (or list of
- * predicates) to be used by the comparator to determine the order of elements.
+ * @param {Array} array The array (or array-like object) to sort.
+ * @param {function(*)|string|Array.<(function(*)|string)>=} expression A predicate to be
+ * used by the comparator to determine the order of elements.
*
* Can be one of:
*
- * - `Function`: A getter function. This function will be called with each item as argument and
- * the return value will be used for sorting.
- * - `string`: An Angular expression. This expression will be evaluated against each item and the
- * result will be used for sorting. For example, use `'label'` to sort by a property called
- * `label` or `'label.substring(0, 3)'` to sort by the first 3 characters of the `label`
- * property.
- * (The result of a constant expression is interpreted as a property name to be used for
- * comparison. For example, use `'"special name"'` (note the extra pair of quotes) to sort by a
- * property called `special name`.)
- * An expression can be optionally prefixed with `+` or `-` to control the sorting direction,
- * ascending or descending. For example, `'+label'` or `'-label'`. If no property is provided,
- * (e.g. `'+'` or `'-'`), the collection element itself is used in comparisons.
- * - `Array`: An array of function and/or string predicates. If a predicate cannot determine the
- * relative order of two items, the next predicate is used as a tie-breaker.
- *
- * **Note:** If the predicate is missing or empty then it defaults to `'+'`.
+ * - `function`: Getter function. The result of this function will be sorted using the
+ * `<`, `===`, `>` operator.
+ * - `string`: An Angular expression. The result of this expression is used to compare elements
+ * (for example `name` to sort by a property called `name` or `name.substr(0, 3)` to sort by
+ * 3 first characters of a property called `name`). The result of a constant expression
+ * is interpreted as a property name to be used in comparisons (for example `"special name"`
+ * to sort object by the value of their `special name` property). An expression can be
+ * optionally prefixed with `+` or `-` to control ascending or descending sort order
+ * (for example, `+name` or `-name`). If no property is provided, (e.g. `'+'`) then the array
+ * element itself is used to compare where sorting.
+ * - `Array`: An array of function or string predicates. The first predicate in the array
+ * is used for sorting, but when two items are equivalent, the next predicate is used.
*
- * @param {boolean=} reverse - If `true`, reverse the sorting order.
- * @param {(Function)=} comparator - The comparator function used to determine the relative order of
- * value pairs. If omitted, the built-in comparator will be used.
+ * If the predicate is missing or empty then it defaults to `'+'`.
*
- * @returns {Array} - The sorted array.
+ * @param {boolean=} reverse Reverse the order of the array.
+ * @returns {Array} Sorted copy of the source array.
*
*
* @example
- * ### Ordering a table with `ngRepeat`
- *
- * The example below demonstrates a simple {@link ngRepeat ngRepeat}, where the data is sorted by
- * age in descending order (expression is set to `'-age'`). The `comparator` is not set, which means
- * it defaults to the built-in comparator.
- *
-
+ * The example below demonstrates a simple ngRepeat, where the data is sorted
+ * by age in descending order (predicate is set to `'-age'`).
+ * `reverse` is not set, which means it defaults to `false`.
+
-
+
Name
Phone Number
@@ -28069,77 +27668,43 @@ function sliceFn(input, begin, end) {
- angular.module('orderByExample1', [])
+ angular.module('orderByExample', [])
.controller('ExampleController', ['$scope', function($scope) {
- $scope.friends = [
- {name: 'John', phone: '555-1212', age: 10},
- {name: 'Mary', phone: '555-9876', age: 19},
- {name: 'Mike', phone: '555-4321', age: 21},
- {name: 'Adam', phone: '555-5678', age: 35},
- {name: 'Julie', phone: '555-8765', age: 29}
- ];
+ $scope.friends =
+ [{name:'John', phone:'555-1212', age:10},
+ {name:'Mary', phone:'555-9876', age:19},
+ {name:'Mike', phone:'555-4321', age:21},
+ {name:'Adam', phone:'555-5678', age:35},
+ {name:'Julie', phone:'555-8765', age:29}];
}]);
-
- .friends {
- border-collapse: collapse;
- }
-
- .friends th {
- border-bottom: 1px solid;
- }
- .friends td, .friends th {
- border-left: 1px solid;
- padding: 5px 10px;
- }
- .friends td:first-child, .friends th:first-child {
- border-left: none;
- }
-
-
- // Element locators
- var names = element.all(by.repeater('friends').column('friend.name'));
-
- it('should sort friends by age in reverse order', function() {
- expect(names.get(0).getText()).toBe('Adam');
- expect(names.get(1).getText()).toBe('Julie');
- expect(names.get(2).getText()).toBe('Mike');
- expect(names.get(3).getText()).toBe('Mary');
- expect(names.get(4).getText()).toBe('John');
- });
-
- *
*
+ * The predicate and reverse parameters can be controlled dynamically through scope properties,
+ * as shown in the next example.
* @example
- * ### Changing parameters dynamically
- *
- * All parameters can be changed dynamically. The next example shows how you can make the columns of
- * a table sortable, by binding the `expression` and `reverse` parameters to scope properties.
- *
-
+
+
- .friends th {
- border-bottom: 1px solid;
- }
- .friends td, .friends th {
- border-left: 1px solid;
- padding: 5px 10px;
- }
- .friends td:first-child, .friends th:first-child {
- border-left: none;
- }
+
+ angular.module('orderByExample', [])
+ .controller('ExampleController', ['$scope', '$filter', function($scope, $filter) {
+ var orderBy = $filter('orderBy');
+ $scope.friends = [
+ { name: 'John', phone: '555-1212', age: 10 },
+ { name: 'Mary', phone: '555-9876', age: 19 },
+ { name: 'Mike', phone: '555-4321', age: 21 },
+ { name: 'Adam', phone: '555-5678', age: 35 },
+ { name: 'Julie', phone: '555-8765', age: 29 }
+ ];
+ $scope.order = function(predicate) {
+ $scope.predicate = predicate;
+ $scope.reverse = ($scope.predicate === predicate) ? !$scope.reverse : false;
+ $scope.friends = orderBy($scope.friends, predicate, $scope.reverse);
+ };
+ $scope.order('age', true);
+ }]);
+
+
.sortorder:after {
- content: '\25b2'; // BLACK UP-POINTING TRIANGLE
+ content: '\25b2';
}
.sortorder.reverse:after {
- content: '\25bc'; // BLACK DOWN-POINTING TRIANGLE
- }
-
-
- // Element locators
- var unsortButton = element(by.partialButtonText('unsorted'));
- var nameHeader = element(by.partialButtonText('Name'));
- var phoneHeader = element(by.partialButtonText('Phone'));
- var ageHeader = element(by.partialButtonText('Age'));
- var firstName = element(by.repeater('friends').column('friend.name').row(0));
- var lastName = element(by.repeater('friends').column('friend.name').row(4));
-
- it('should sort friends by some property, when clicking on the column header', function() {
- expect(firstName.getText()).toBe('Adam');
- expect(lastName.getText()).toBe('John');
-
- phoneHeader.click();
- expect(firstName.getText()).toBe('John');
- expect(lastName.getText()).toBe('Mary');
-
- nameHeader.click();
- expect(firstName.getText()).toBe('Adam');
- expect(lastName.getText()).toBe('Mike');
-
- ageHeader.click();
- expect(firstName.getText()).toBe('John');
- expect(lastName.getText()).toBe('Adam');
- });
-
- it('should sort friends in reverse order, when clicking on the same column', function() {
- expect(firstName.getText()).toBe('Adam');
- expect(lastName.getText()).toBe('John');
-
- ageHeader.click();
- expect(firstName.getText()).toBe('John');
- expect(lastName.getText()).toBe('Adam');
-
- ageHeader.click();
- expect(firstName.getText()).toBe('Adam');
- expect(lastName.getText()).toBe('John');
- });
-
- it('should restore the original order, when clicking "Set to unsorted"', function() {
- expect(firstName.getText()).toBe('Adam');
- expect(lastName.getText()).toBe('John');
-
- unsortButton.click();
- expect(firstName.getText()).toBe('John');
- expect(lastName.getText()).toBe('Julie');
- });
-
-
- *
- *
- * @example
- * ### Using a custom comparator
- *
- * If you have very specific requirements about the way items are sorted, you can pass your own
- * comparator function. For example, you might need to compare some strings in a locale-sensitive
- * way. (When specifying a custom comparator, you also need to pass a value for the `reverse`
- * argument - passing `false` retains the default sorting order, i.e. ascending.)
- *
-
-
-
-
-
Locale-sensitive Comparator
-
-
-
Name
-
Favorite Letter
-
-
-
{{friend.name}}
-
{{friend.favoriteLetter}}
-
-
-
-
-
Default Comparator
-
-
-
Name
-
Favorite Letter
-
-
-
{{friend.name}}
-
{{friend.favoriteLetter}}
-
-
-
-
-
-
- angular.module('orderByExample4', [])
- .controller('ExampleController', ['$scope', function($scope) {
- $scope.friends = [
- {name: 'John', favoriteLetter: 'Ä'},
- {name: 'Mary', favoriteLetter: 'Ü'},
- {name: 'Mike', favoriteLetter: 'Ö'},
- {name: 'Adam', favoriteLetter: 'H'},
- {name: 'Julie', favoriteLetter: 'Z'}
- ];
-
- $scope.localeSensitiveComparator = function(v1, v2) {
- // If we don't get strings, just compare by index
- if (v1.type !== 'string' || v2.type !== 'string') {
- return (v1.index < v2.index) ? -1 : 1;
- }
-
- // Compare strings alphabetically, taking locale into account
- return v1.value.localeCompare(v2.value);
- };
- }]);
-
-
- .friends-container {
- display: inline-block;
- margin: 0 30px;
- }
-
- .friends {
- border-collapse: collapse;
+ content: '\25bc';
}
-
- .friends th {
- border-bottom: 1px solid;
- }
- .friends td, .friends th {
- border-left: 1px solid;
- padding: 5px 10px;
- }
- .friends td:first-child, .friends th:first-child {
- border-left: none;
- }
-
-
- // Element locators
- var container = element(by.css('.custom-comparator'));
- var names = container.all(by.repeater('friends').column('friend.name'));
-
- it('should sort friends by favorite letter (in correct alphabetical order)', function() {
- expect(names.get(0).getText()).toBe('John');
- expect(names.get(1).getText()).toBe('Adam');
- expect(names.get(2).getText()).toBe('Mike');
- expect(names.get(3).getText()).toBe('Mary');
- expect(names.get(4).getText()).toBe('Julie');
- });
-
-
- *
+
+
*/
orderByFilter.$inject = ['$parse'];
function orderByFilter($parse) {
- return function(array, sortPredicate, reverseOrder, compareFn) {
+ return function(array, sortPredicate, reverseOrder) {
if (array == null) return array;
if (!isArrayLike(array)) {
@@ -28486,12 +27816,11 @@ function orderByFilter($parse) {
if (!isArray(sortPredicate)) { sortPredicate = [sortPredicate]; }
if (sortPredicate.length === 0) { sortPredicate = ['+']; }
- var predicates = processPredicates(sortPredicate);
-
- var descending = reverseOrder ? -1 : 1;
-
- // Define the `compare()` function. Use a default comparator if none is specified.
- var compare = isFunction(compareFn) ? compareFn : defaultCompare;
+ var predicates = processPredicates(sortPredicate, reverseOrder);
+ // Add a predicate at the end that evaluates to the element index. This makes the
+ // sort stable as it works as a tie-breaker when all the input predicates cannot
+ // distinguish between two elements.
+ predicates.push({ get: function() { return {}; }, descending: reverseOrder ? -1 : 1});
// The next three lines are a version of a Swartzian Transform idiom from Perl
// (sometimes called the Decorate-Sort-Undecorate idiom)
@@ -28503,12 +27832,8 @@ function orderByFilter($parse) {
return array;
function getComparisonObject(value, index) {
- // NOTE: We are adding an extra `tieBreaker` value based on the element's index.
- // This will be used to keep the sort stable when none of the input predicates can
- // distinguish between two elements.
return {
value: value,
- tieBreaker: {value: index, type: 'number', index: index},
predicateValues: predicates.map(function(predicate) {
return getPredicateValue(predicate.get(value), index);
})
@@ -28516,19 +27841,18 @@ function orderByFilter($parse) {
}
function doComparison(v1, v2) {
- for (var i = 0, ii = predicates.length; i < ii; i++) {
- var result = compare(v1.predicateValues[i], v2.predicateValues[i]);
- if (result) {
- return result * predicates[i].descending * descending;
- }
+ var result = 0;
+ for (var index=0, length = predicates.length; index < length; ++index) {
+ result = compare(v1.predicateValues[index], v2.predicateValues[index]) * predicates[index].descending;
+ if (result) break;
}
-
- return compare(v1.tieBreaker, v2.tieBreaker) * descending;
+ return result;
}
};
- function processPredicates(sortPredicates) {
- return sortPredicates.map(function(predicate) {
+ function processPredicates(sortPredicate, reverseOrder) {
+ reverseOrder = reverseOrder ? -1 : 1;
+ return sortPredicate.map(function(predicate) {
var descending = 1, get = identity;
if (isFunction(predicate)) {
@@ -28546,7 +27870,7 @@ function orderByFilter($parse) {
}
}
}
- return {get: get, descending: descending};
+ return { get: get, descending: descending * reverseOrder };
});
}
@@ -28561,9 +27885,9 @@ function orderByFilter($parse) {
}
}
- function objectValue(value) {
+ function objectValue(value, index) {
// If `valueOf` is a valid function use that
- if (isFunction(value.valueOf)) {
+ if (typeof value.valueOf === 'function') {
value = value.valueOf();
if (isPrimitive(value)) return value;
}
@@ -28572,8 +27896,8 @@ function orderByFilter($parse) {
value = value.toString();
if (isPrimitive(value)) return value;
}
-
- return value;
+ // We have a basic object so we use the position of the object in the collection
+ return index;
}
function getPredicateValue(value, index) {
@@ -28581,39 +27905,23 @@ function orderByFilter($parse) {
if (value === null) {
type = 'string';
value = 'null';
+ } else if (type === 'string') {
+ value = value.toLowerCase();
} else if (type === 'object') {
- value = objectValue(value);
+ value = objectValue(value, index);
}
- return {value: value, type: type, index: index};
+ return { value: value, type: type };
}
- function defaultCompare(v1, v2) {
+ function compare(v1, v2) {
var result = 0;
- var type1 = v1.type;
- var type2 = v2.type;
-
- if (type1 === type2) {
- var value1 = v1.value;
- var value2 = v2.value;
-
- if (type1 === 'string') {
- // Compare strings case-insensitively
- value1 = value1.toLowerCase();
- value2 = value2.toLowerCase();
- } else if (type1 === 'object') {
- // For basic objects, use the position of the object
- // in the collection instead of the value
- if (isObject(value1)) value1 = v1.index;
- if (isObject(value2)) value2 = v2.index;
- }
-
- if (value1 !== value2) {
- result = value1 < value2 ? -1 : 1;
+ if (v1.type === v2.type) {
+ if (v1.value !== v2.value) {
+ result = v1.value < v2.value ? -1 : 1;
}
} else {
- result = type1 < type2 ? -1 : 1;
+ result = v1.type < v2.type ? -1 : 1;
}
-
return result;
}
}
@@ -28893,11 +28201,9 @@ var htmlAnchorDirective = valueFn({
*
* @description
*
- * Sets the `readonly` attribute on the element, if the expression inside `ngReadonly` is truthy.
- * Note that `readonly` applies only to `input` elements with specific types. [See the input docs on
- * MDN](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#attr-readonly) for more information.
+ * Sets the `readOnly` attribute on the element, if the expression inside `ngReadonly` is truthy.
*
- * A special directive is necessary because we cannot use interpolation inside the `readonly`
+ * A special directive is necessary because we cannot use interpolation inside the `readOnly`
* attribute. See the {@link guide/interpolation interpolation guide} for more info.
*
* @example
@@ -28934,13 +28240,6 @@ var htmlAnchorDirective = valueFn({
* A special directive is necessary because we cannot use interpolation inside the `selected`
* attribute. See the {@link guide/interpolation interpolation guide} for more info.
*
- *
- * **Note:** `ngSelected` does not interact with the `select` and `ngModel` directives, it only
- * sets the `selected` attribute on the element. If you are using `ngModel` on the select, you
- * should not use `ngSelected` on the options, as `ngModel` will set the select value and
- * selected options.
- *
'
-}
-globalFuncs.errorMsgs = [
- "Please enter valid amount. ",
- "Your password must be at least 9 characters. Please ensure it is a strong password. ",
- "Sorry! We don't have a clue what type of wallet file this is. ",
- "This is not a valid wallet file. ",
- "This unit doesn\'t exists, please use the one of the following units ",
- "Invalid address. ",
- "Invalid password. ",
- "Invalid amount. ",
- "Invalid gas limit. ",
- "Invalid data value. ",
- "Invalid gas amount. ",
- "Invalid nonce. ",
- "Invalid signed transaction. ",
- "A wallet with this nickname already exists. ",
- "Wallet not found. ",
- "Whoops. It doesnt look like a proposal with this ID exists yet or there is an error reading this proposal. ",
- "A wallet with this address already exists in storage. Please check your wallets page. ",
- "You need to have at some ETH in your account to cover the cost of gas. .01ETH should be more than sufficient for a few sends and votes. ",
- "All gas would be used on this transaction. This means you have already voted on this proposal or the debate period has ended.",
- "Invalid symbol"];
-globalFuncs.successMsgs = ["Valid address", "Wallet successfully decrypted", "Transaction submitted. TX ID: ", "New wallet added: ", "You have successfully voted. Thank you for being an active participant in The DAO."];
-globalFuncs.scrypt = {
- n: 1024
-};
-globalFuncs.postDelay = 300;
-globalFuncs.kdf = "scrypt";
-globalFuncs.defaultTxGasLimit = 21000;
-globalFuncs.digixClaimTxGasLimit = 150000;
-globalFuncs.donateAddress = "0x7cB57B5A97eAbe94205C07890BE4c1aD31E486A8";
-globalFuncs.isNumeric = function(n) {
- return !isNaN(parseFloat(n)) && isFinite(n);
-}
-globalFuncs.urlGet = function(name) {
- if (name = (new RegExp('[?&]' + encodeURIComponent(name) + '=([^&]*)')).exec(location.search)) return this.stripTags(decodeURIComponent(name[1]));
-}
-globalFuncs.stripTags = function(str) {
- var SCRIPT_REGEX = /");
+}
+globalFuncs.getBlob = function(mime, str) {
+ var str = (typeof str === 'object') ? JSON.stringify(str) : str;
+ if (str == null) return '';
+ var blob = new Blob([str], {
+ type: mime
+ });
+ return window.URL.createObjectURL(blob);
+}
+globalFuncs.getSuccessText = function(str) {
+ return '
'
+}
+globalFuncs.errorMsgs = [
+ "Please enter valid amount. ",
+ "Your password must be at least 9 characters. Please ensure it is a strong password. ",
+ "Sorry! We don't have a clue what type of wallet file this is. ",
+ "This is not a valid wallet file. ",
+ "This unit doesn\'t exists, please use the one of the following units ",
+ "Invalid address. ",
+ "Invalid password. ",
+ "Invalid amount. ",
+ "Invalid gas limit. ",
+ "Invalid data value. ",
+ "Invalid gas amount. ",
+ "Invalid nonce. ",
+ "Invalid signed transaction. ",
+ "A wallet with this nickname already exists. ",
+ "Wallet not found. ",
+ "Whoops. It doesnt look like a proposal with this ID exists yet or there is an error reading this proposal. ",
+ "A wallet with this address already exists in storage. Please check your wallets page. ",
+ "You need to have at some ETH in your account to cover the cost of gas. .01ETH should be more than sufficient for a few sends and votes. ",
+ "All gas would be used on this transaction. This means you have already voted on this proposal or the debate period has ended.",
+ "Invalid symbol"];
+globalFuncs.successMsgs = ["Valid address", "Wallet successfully decrypted", "Transaction submitted. TX ID: ", "New wallet added: ", "You have successfully voted. Thank you for being an active participant in The DAO."];
+globalFuncs.scrypt = {
+ n: 1024
+};
+globalFuncs.postDelay = 300;
+globalFuncs.kdf = "scrypt";
+globalFuncs.defaultTxGasLimit = 21000;
+globalFuncs.digixClaimTxGasLimit = 150000;
+globalFuncs.donateAddress = "0x7cB57B5A97eAbe94205C07890BE4c1aD31E486A8";
+globalFuncs.isNumeric = function(n) {
+ return !isNaN(parseFloat(n)) && isFinite(n);
+}
+globalFuncs.urlGet = function(name) {
+ if (name = (new RegExp('[?&]' + encodeURIComponent(name) + '=([^&]*)')).exec(location.search)) return this.stripTags(decodeURIComponent(name[1]));
+}
+globalFuncs.stripTags = function(str) {
+ var SCRIPT_REGEX = /
+
+
*/
function copy(source, destination) {
var stackSource = [];
@@ -7789,7 +7783,7 @@ function copy(source, destination) {
case '[object Uint8ClampedArray]':
case '[object Uint16Array]':
case '[object Uint32Array]':
- return new source.constructor(copyElement(source.buffer), source.byteOffset, source.length);
+ return new source.constructor(copyElement(source.buffer));
case '[object ArrayBuffer]':
//Support: IE10
@@ -7821,6 +7815,31 @@ function copy(source, destination) {
}
}
+/**
+ * Creates a shallow copy of an object, an array or a primitive.
+ *
+ * Assumes that there are no proto properties for objects.
+ */
+function shallowCopy(src, dst) {
+ if (isArray(src)) {
+ dst = dst || [];
+
+ for (var i = 0, ii = src.length; i < ii; i++) {
+ dst[i] = src[i];
+ }
+ } else if (isObject(src)) {
+ dst = dst || {};
+
+ for (var key in src) {
+ if (!(key.charAt(0) === '$' && key.charAt(1) === '$')) {
+ dst[key] = src[key];
+ }
+ }
+ }
+
+ return dst || src;
+}
+
/**
* @ngdoc function
@@ -9161,34 +9180,7 @@ function setupModuleLoader(window) {
}
-/* global shallowCopy: true */
-
-/**
- * Creates a shallow copy of an object, an array or a primitive.
- *
- * Assumes that there are no proto properties for objects.
- */
-function shallowCopy(src, dst) {
- if (isArray(src)) {
- dst = dst || [];
-
- for (var i = 0, ii = src.length; i < ii; i++) {
- dst[i] = src[i];
- }
- } else if (isObject(src)) {
- dst = dst || {};
-
- for (var key in src) {
- if (!(key.charAt(0) === '$' && key.charAt(1) === '$')) {
- dst[key] = src[key];
- }
- }
- }
-
- return dst || src;
-}
-
-/* global toDebugString: true */
+/* global: toDebugString: true */
function serializeObject(obj) {
var seen = [];
@@ -9292,7 +9284,6 @@ function toDebugString(obj) {
$HttpParamSerializerJQLikeProvider,
$HttpBackendProvider,
$xhrFactoryProvider,
- $jsonpCallbacksProvider,
$LocationProvider,
$LogProvider,
$ParseProvider,
@@ -9330,11 +9321,11 @@ function toDebugString(obj) {
* - `codeName` – `{string}` – Code name of the release, such as "jiggling-armfat".
*/
var version = {
- full: '1.5.8', // all of these placeholder strings will be replaced by grunt's
+ full: '1.5.6', // all of these placeholder strings will be replaced by grunt's
major: 1, // package task
minor: 5,
- dot: 8,
- codeName: 'arbitrary-fallbacks'
+ dot: 6,
+ codeName: 'arrow-stringification'
};
@@ -9365,7 +9356,7 @@ function publishExternalAPI(angular) {
'isDate': isDate,
'lowercase': lowercase,
'uppercase': uppercase,
- 'callbacks': {$$counter: 0},
+ 'callbacks': {counter: 0},
'getTestability': getTestability,
'$$minErr': minErr,
'$$csp': csp,
@@ -9454,7 +9445,6 @@ function publishExternalAPI(angular) {
$httpParamSerializerJQLike: $HttpParamSerializerJQLikeProvider,
$httpBackend: $HttpBackendProvider,
$xhrFactory: $xhrFactoryProvider,
- $jsonpCallbacks: $jsonpCallbacksProvider,
$location: $LocationProvider,
$log: $LogProvider,
$parse: $ParseProvider,
@@ -9531,7 +9521,7 @@ function publishExternalAPI(angular) {
* ## Angular's jqLite
* jqLite provides only the following jQuery methods:
*
- * - [`addClass()`](http://api.jquery.com/addClass/) - Does not support a function as first argument
+ * - [`addClass()`](http://api.jquery.com/addClass/)
* - [`after()`](http://api.jquery.com/after/)
* - [`append()`](http://api.jquery.com/append/)
* - [`attr()`](http://api.jquery.com/attr/) - Does not support functions as parameters
@@ -9558,7 +9548,7 @@ function publishExternalAPI(angular) {
* - [`ready()`](http://api.jquery.com/ready/)
* - [`remove()`](http://api.jquery.com/remove/)
* - [`removeAttr()`](http://api.jquery.com/removeAttr/)
- * - [`removeClass()`](http://api.jquery.com/removeClass/) - Does not support a function as first argument
+ * - [`removeClass()`](http://api.jquery.com/removeClass/)
* - [`removeData()`](http://api.jquery.com/removeData/)
* - [`replaceWith()`](http://api.jquery.com/replaceWith/)
* - [`text()`](http://api.jquery.com/text/)
@@ -9693,7 +9683,7 @@ function jqLiteBuildFragment(html, context) {
nodes.push(context.createTextNode(html));
} else {
// Convert html into DOM nodes
- tmp = fragment.appendChild(context.createElement("div"));
+ tmp = tmp || fragment.appendChild(context.createElement("div"));
tag = (TAG_NAME_REGEXP.exec(html) || ["", ""])[1].toLowerCase();
wrap = wrapMap[tag] || wrapMap._default;
tmp.innerHTML = wrap[1] + html.replace(XHTML_TAG_REGEXP, "<$1>$2>") + wrap[2];
@@ -11506,10 +11496,10 @@ function createInjector(modulesToLoad, strictDi) {
if (msie <= 11) {
return false;
}
- // Support: Edge 12-13 only
- // See: https://developer.microsoft.com/en-us/microsoft-edge/platform/issues/6156135/
+ // Workaround for MS Edge.
+ // Check https://connect.microsoft.com/IE/Feedback/Details/2211653
return typeof func === 'function'
- && /^(?:class\b|constructor\()/.test(stringifyFn(func));
+ && /^(?:class\s|constructor\()/.test(stringifyFn(func));
}
function invoke(fn, self, locals, serviceName) {
@@ -12250,13 +12240,7 @@ var $AnimateProvider = ['$provide', function($provide) {
* @param {DOMElement} parent the parent element which will append the element as
* a child (so long as the after element is not present)
* @param {DOMElement=} after the sibling element after which the element will be appended
- * @param {object=} options an optional collection of options/styles that will be applied to the element.
- * The object can have the following properties:
- *
- * - **addClass** - `{string}` - space-separated CSS classes to add to element
- * - **from** - `{Object}` - CSS properties & values at the beginning of animation. Must have matching `to`
- * - **removeClass** - `{string}` - space-separated CSS classes to remove from element
- * - **to** - `{Object}` - CSS properties & values at end of animation. Must have matching `from`
+ * @param {object=} options an optional collection of options/styles that will be applied to the element
*
* @return {Promise} the animation callback promise
*/
@@ -12282,13 +12266,7 @@ var $AnimateProvider = ['$provide', function($provide) {
* @param {DOMElement} parent the parent element which will append the element as
* a child (so long as the after element is not present)
* @param {DOMElement=} after the sibling element after which the element will be appended
- * @param {object=} options an optional collection of options/styles that will be applied to the element.
- * The object can have the following properties:
- *
- * - **addClass** - `{string}` - space-separated CSS classes to add to element
- * - **from** - `{Object}` - CSS properties & values at the beginning of animation. Must have matching `to`
- * - **removeClass** - `{string}` - space-separated CSS classes to remove from element
- * - **to** - `{Object}` - CSS properties & values at end of animation. Must have matching `from`
+ * @param {object=} options an optional collection of options/styles that will be applied to the element
*
* @return {Promise} the animation callback promise
*/
@@ -12309,13 +12287,7 @@ var $AnimateProvider = ['$provide', function($provide) {
* digest once the animation has completed.
*
* @param {DOMElement} element the element which will be removed from the DOM
- * @param {object=} options an optional collection of options/styles that will be applied to the element.
- * The object can have the following properties:
- *
- * - **addClass** - `{string}` - space-separated CSS classes to add to element
- * - **from** - `{Object}` - CSS properties & values at the beginning of animation. Must have matching `to`
- * - **removeClass** - `{string}` - space-separated CSS classes to remove from element
- * - **to** - `{Object}` - CSS properties & values at end of animation. Must have matching `from`
+ * @param {object=} options an optional collection of options/styles that will be applied to the element
*
* @return {Promise} the animation callback promise
*/
@@ -12339,13 +12311,7 @@ var $AnimateProvider = ['$provide', function($provide) {
*
* @param {DOMElement} element the element which the CSS classes will be applied to
* @param {string} className the CSS class(es) that will be added (multiple classes are separated via spaces)
- * @param {object=} options an optional collection of options/styles that will be applied to the element.
- * The object can have the following properties:
- *
- * - **addClass** - `{string}` - space-separated CSS classes to add to element
- * - **from** - `{Object}` - CSS properties & values at the beginning of animation. Must have matching `to`
- * - **removeClass** - `{string}` - space-separated CSS classes to remove from element
- * - **to** - `{Object}` - CSS properties & values at end of animation. Must have matching `from`
+ * @param {object=} options an optional collection of options/styles that will be applied to the element
*
* @return {Promise} the animation callback promise
*/
@@ -12369,13 +12335,7 @@ var $AnimateProvider = ['$provide', function($provide) {
*
* @param {DOMElement} element the element which the CSS classes will be applied to
* @param {string} className the CSS class(es) that will be removed (multiple classes are separated via spaces)
- * @param {object=} options an optional collection of options/styles that will be applied to the element.
- * The object can have the following properties:
- *
- * - **addClass** - `{string}` - space-separated CSS classes to add to element
- * - **from** - `{Object}` - CSS properties & values at the beginning of animation. Must have matching `to`
- * - **removeClass** - `{string}` - space-separated CSS classes to remove from element
- * - **to** - `{Object}` - CSS properties & values at end of animation. Must have matching `from`
+ * @param {object=} options an optional collection of options/styles that will be applied to the element
*
* @return {Promise} the animation callback promise
*/
@@ -12400,13 +12360,7 @@ var $AnimateProvider = ['$provide', function($provide) {
* @param {DOMElement} element the element which the CSS classes will be applied to
* @param {string} add the CSS class(es) that will be added (multiple classes are separated via spaces)
* @param {string} remove the CSS class(es) that will be removed (multiple classes are separated via spaces)
- * @param {object=} options an optional collection of options/styles that will be applied to the element.
- * The object can have the following properties:
- *
- * - **addClass** - `{string}` - space-separated CSS classes to add to element
- * - **from** - `{Object}` - CSS properties & values at the beginning of animation. Must have matching `to`
- * - **removeClass** - `{string}` - space-separated CSS classes to remove from element
- * - **to** - `{Object}` - CSS properties & values at end of animation. Must have matching `from`
+ * @param {object=} options an optional collection of options/styles that will be applied to the element
*
* @return {Promise} the animation callback promise
*/
@@ -12447,13 +12401,7 @@ var $AnimateProvider = ['$provide', function($provide) {
* @param {string=} className an optional CSS class that will be applied to the element for the duration of the animation. If
* this value is left as empty then a CSS class of `ng-inline-animate` will be applied to the element.
* (Note that if no animation is detected then this value will not be applied to the element.)
- * @param {object=} options an optional collection of options/styles that will be applied to the element.
- * The object can have the following properties:
- *
- * - **addClass** - `{string}` - space-separated CSS classes to add to element
- * - **from** - `{Object}` - CSS properties & values at the beginning of animation. Must have matching `to`
- * - **removeClass** - `{string}` - space-separated CSS classes to remove from element
- * - **to** - `{Object}` - CSS properties & values at end of animation. Must have matching `from`
+ * @param {object=} options an optional collection of options/styles that will be applied to the element
*
* @return {Promise} the animation callback promise
*/
@@ -13541,9 +13489,8 @@ function $TemplateCacheProvider() {
* There are many different options for a directive.
*
* The difference resides in the return value of the factory function.
- * You can either return a {@link $compile#directive-definition-object Directive Definition Object (see below)}
- * that defines the directive properties, or just the `postLink` function (all other properties will have
- * the default values).
+ * You can either return a "Directive Definition Object" (see below) that defines the directive properties,
+ * or just the `postLink` function (all other properties will have the default values).
*
*
* **Best Practice:** It's recommended to use the "directive definition object" form.
@@ -13607,125 +13554,6 @@ function $TemplateCacheProvider() {
* });
* ```
*
- * ### Life-cycle hooks
- * Directive controllers can provide the following methods that are called by Angular at points in the life-cycle of the
- * directive:
- * * `$onInit()` - Called on each controller after all the controllers on an element have been constructed and
- * had their bindings initialized (and before the pre & post linking functions for the directives on
- * this element). This is a good place to put initialization code for your controller.
- * * `$onChanges(changesObj)` - Called whenever one-way (`<`) or interpolation (`@`) bindings are updated. The
- * `changesObj` is a hash whose keys are the names of the bound properties that have changed, and the values are an
- * object of the form `{ currentValue, previousValue, isFirstChange() }`. Use this hook to trigger updates within a
- * component such as cloning the bound value to prevent accidental mutation of the outer value.
- * * `$doCheck()` - Called on each turn of the digest cycle. Provides an opportunity to detect and act on
- * changes. Any actions that you wish to take in response to the changes that you detect must be
- * invoked from this hook; implementing this has no effect on when `$onChanges` is called. For example, this hook
- * could be useful if you wish to perform a deep equality check, or to check a Date object, changes to which would not
- * be detected by Angular's change detector and thus not trigger `$onChanges`. This hook is invoked with no arguments;
- * if detecting changes, you must store the previous value(s) for comparison to the current values.
- * * `$onDestroy()` - Called on a controller when its containing scope is destroyed. Use this hook for releasing
- * external resources, watches and event handlers. Note that components have their `$onDestroy()` hooks called in
- * the same order as the `$scope.$broadcast` events are triggered, which is top down. This means that parent
- * components will have their `$onDestroy()` hook called before child components.
- * * `$postLink()` - Called after this controller's element and its children have been linked. Similar to the post-link
- * function this hook can be used to set up DOM event handlers and do direct DOM manipulation.
- * Note that child elements that contain `templateUrl` directives will not have been compiled and linked since
- * they are waiting for their template to load asynchronously and their own compilation and linking has been
- * suspended until that occurs.
- *
- * #### Comparison with Angular 2 life-cycle hooks
- * Angular 2 also uses life-cycle hooks for its components. While the Angular 1 life-cycle hooks are similar there are
- * some differences that you should be aware of, especially when it comes to moving your code from Angular 1 to Angular 2:
- *
- * * Angular 1 hooks are prefixed with `$`, such as `$onInit`. Angular 2 hooks are prefixed with `ng`, such as `ngOnInit`.
- * * Angular 1 hooks can be defined on the controller prototype or added to the controller inside its constructor.
- * In Angular 2 you can only define hooks on the prototype of the Component class.
- * * Due to the differences in change-detection, you may get many more calls to `$doCheck` in Angular 1 than you would to
- * `ngDoCheck` in Angular 2
- * * Changes to the model inside `$doCheck` will trigger new turns of the digest loop, which will cause the changes to be
- * propagated throughout the application.
- * Angular 2 does not allow the `ngDoCheck` hook to trigger a change outside of the component. It will either throw an
- * error or do nothing depending upon the state of `enableProdMode()`.
- *
- * #### Life-cycle hook examples
- *
- * This example shows how you can check for mutations to a Date object even though the identity of the object
- * has not changed.
- *
- *
- *
- * angular.module('do-check-module', [])
- * .component('app', {
- * template:
- * 'Month: ' +
- * 'Date: {{ $ctrl.date }}' +
- * '',
- * controller: function() {
- * this.date = new Date();
- * this.month = this.date.getMonth();
- * this.updateDate = function() {
- * this.date.setMonth(this.month);
- * };
- * }
- * })
- * .component('test', {
- * bindings: { date: '<' },
- * template:
- * '
{{ $ctrl.log | json }}
',
- * controller: function() {
- * var previousValue;
- * this.log = [];
- * this.$doCheck = function() {
- * var currentValue = this.date && this.date.valueOf();
- * if (previousValue !== currentValue) {
- * this.log.push('doCheck: date mutated: ' + this.date);
- * previousValue = currentValue;
- * }
- * };
- * }
- * });
- *
- *
- *
- *
- *
- *
- * This example show how you might use `$doCheck` to trigger changes in your component's inputs even if the
- * actual identity of the component doesn't change. (Be aware that cloning and deep equality checks on large
- * arrays or objects can have a negative impact on your application performance)
- *
- *
- *
- *
',
- * controller: function() {
- * this.log = [];
- *
- * this.$doCheck = function() {
- * if (this.items_ref !== this.items) {
- * this.log.push('doCheck: items changed');
- * this.items_ref = this.items;
- * }
- * if (!angular.equals(this.items_clone, this.items)) {
- * this.log.push('doCheck: items mutated');
- * this.items_clone = angular.copy(this.items);
- * }
- * };
- * }
- * });
- *
- *
*
*
* ### Directive Definition Object
@@ -13901,6 +13729,25 @@ function $TemplateCacheProvider() {
* The `$transclude` function also has a method on it, `$transclude.isSlotFilled(slotName)`, which returns
* `true` if the specified slot contains content (i.e. one or more DOM nodes).
*
+ * The controller can provide the following methods that act as life-cycle hooks:
+ * * `$onInit()` - Called on each controller after all the controllers on an element have been constructed and
+ * had their bindings initialized (and before the pre & post linking functions for the directives on
+ * this element). This is a good place to put initialization code for your controller.
+ * * `$onChanges(changesObj)` - Called whenever one-way (`<`) or interpolation (`@`) bindings are updated. The
+ * `changesObj` is a hash whose keys are the names of the bound properties that have changed, and the values are an
+ * object of the form `{ currentValue, previousValue, isFirstChange() }`. Use this hook to trigger updates within a
+ * component such as cloning the bound value to prevent accidental mutation of the outer value.
+ * * `$onDestroy()` - Called on a controller when its containing scope is destroyed. Use this hook for releasing
+ * external resources, watches and event handlers. Note that components have their `$onDestroy()` hooks called in
+ * the same order as the `$scope.$broadcast` events are triggered, which is top down. This means that parent
+ * components will have their `$onDestroy()` hook called before child components.
+ * * `$postLink()` - Called after this controller's element and its children have been linked. Similar to the post-link
+ * function this hook can be used to set up DOM event handlers and do direct DOM manipulation.
+ * Note that child elements that contain `templateUrl` directives will not have been compiled and linked since
+ * they are waiting for their template to load asynchronously and their own compilation and linking has been
+ * suspended until that occurs.
+ *
+ *
* #### `require`
* Require another directive and inject its controller as the fourth argument to the linking function. The
* `require` property can be a string, an array or an object:
@@ -14098,8 +13945,8 @@ function $TemplateCacheProvider() {
* any other controller.
*
* * `transcludeFn` - A transclude linking function pre-bound to the correct transclusion scope.
- * This is the same as the `$transclude` parameter of directive controllers,
- * see {@link ng.$compile#-controller- the controller section for details}.
+ * This is the same as the `$transclude`
+ * parameter of directive controllers, see there for details.
* `function([scope], cloneLinkingFn, futureParentElement)`.
*
* #### Pre-linking function
@@ -14901,19 +14748,11 @@ function $CompileProvider($provide, $$sanitizeUriProvider) {
}
// We must run this hook in an apply since the $$postDigest runs outside apply
$rootScope.$apply(function() {
- var errors = [];
for (var i = 0, ii = onChangesQueue.length; i < ii; ++i) {
- try {
- onChangesQueue[i]();
- } catch (e) {
- errors.push(e);
- }
+ onChangesQueue[i]();
}
// Reset the queue to trigger a new schedule next time there is a change
onChangesQueue = undefined;
- if (errors.length) {
- throw errors;
- }
});
} finally {
onChangesTtl++;
@@ -15554,7 +15393,19 @@ function $CompileProvider($provide, $$sanitizeUriProvider) {
addTextInterpolateDirective(directives, node.nodeValue);
break;
case NODE_TYPE_COMMENT: /* Comment */
- collectCommentDirectives(node, directives, attrs, maxPriority, ignoreDirective);
+ try {
+ match = COMMENT_DIRECTIVE_REGEXP.exec(node.nodeValue);
+ if (match) {
+ nName = directiveNormalize(match[1]);
+ if (addDirective(directives, nName, 'M', maxPriority, ignoreDirective)) {
+ attrs[nName] = trim(match[2]);
+ }
+ }
+ } catch (e) {
+ // turns out that under some circumstances IE9 throws errors when one attempts to read
+ // comment's node value.
+ // Just ignore it and continue. (Can't seem to reproduce in test case.)
+ }
break;
}
@@ -15562,24 +15413,6 @@ function $CompileProvider($provide, $$sanitizeUriProvider) {
return directives;
}
- function collectCommentDirectives(node, directives, attrs, maxPriority, ignoreDirective) {
- // function created because of performance, try/catch disables
- // the optimization of the whole function #14848
- try {
- var match = COMMENT_DIRECTIVE_REGEXP.exec(node.nodeValue);
- if (match) {
- var nName = directiveNormalize(match[1]);
- if (addDirective(directives, nName, 'M', maxPriority, ignoreDirective)) {
- attrs[nName] = trim(match[2]);
- }
- }
- } catch (e) {
- // turns out that under some circumstances IE9 throws errors when one attempts to read
- // comment's node value.
- // Just ignore it and continue. (Can't seem to reproduce in test case.)
- }
- }
-
/**
* Given a node with an directive-start it collects all of the siblings until it finds
* directive-end.
@@ -16095,22 +15928,10 @@ function $CompileProvider($provide, $$sanitizeUriProvider) {
forEach(elementControllers, function(controller) {
var controllerInstance = controller.instance;
if (isFunction(controllerInstance.$onChanges)) {
- try {
- controllerInstance.$onChanges(controller.bindingInfo.initialChanges);
- } catch (e) {
- $exceptionHandler(e);
- }
+ controllerInstance.$onChanges(controller.bindingInfo.initialChanges);
}
if (isFunction(controllerInstance.$onInit)) {
- try {
- controllerInstance.$onInit();
- } catch (e) {
- $exceptionHandler(e);
- }
- }
- if (isFunction(controllerInstance.$doCheck)) {
- controllerScope.$watch(function() { controllerInstance.$doCheck(); });
- controllerInstance.$doCheck();
+ controllerInstance.$onInit();
}
if (isFunction(controllerInstance.$onDestroy)) {
controllerScope.$on('$destroy', function callOnDestroyHook() {
@@ -16374,16 +16195,18 @@ function $CompileProvider($provide, $$sanitizeUriProvider) {
// copy the new attributes on the old attrs object
forEach(src, function(value, key) {
- // Check if we already set this attribute in the loop above.
- // `dst` will never contain hasOwnProperty as DOM parser won't let it.
- // You will get an "InvalidCharacterError: DOM Exception 5" error if you
- // have an attribute like "has-own-property" or "data-has-own-property", etc.
- if (!dst.hasOwnProperty(key) && key.charAt(0) !== '$') {
+ if (key == 'class') {
+ safeAddClass($element, value);
+ dst['class'] = (dst['class'] ? dst['class'] + ' ' : '') + value;
+ } else if (key == 'style') {
+ $element.attr('style', $element.attr('style') + ';' + value);
+ dst['style'] = (dst['style'] ? dst['style'] + ';' : '') + value;
+ // `dst` will never contain hasOwnProperty as DOM parser won't let it.
+ // You will get an "InvalidCharacterError: DOM Exception 5" error if you
+ // have an attribute like "has-own-property" or "data-has-own-property", etc.
+ } else if (key.charAt(0) != '$' && !dst.hasOwnProperty(key)) {
dst[key] = value;
-
- if (key !== 'class' && key !== 'style') {
- dstAttr[key] = srcAttr[key];
- }
+ dstAttr[key] = srcAttr[key];
}
});
}
@@ -16758,7 +16581,7 @@ function $CompileProvider($provide, $$sanitizeUriProvider) {
forEach(bindings, function initializeBinding(definition, scopeName) {
var attrName = definition.attrName,
optional = definition.optional,
- mode = definition.mode, // @, =, <, or &
+ mode = definition.mode, // @, =, or &
lastValue,
parentGet, parentSet, compare, removeWatch;
@@ -17244,21 +17067,18 @@ function $DocumentProvider() {
*
* ## Example:
*
- * The example below will overwrite the default `$exceptionHandler` in order to (a) log uncaught
- * errors to the backend for later inspection by the developers and (b) to use `$log.warn()` instead
- * of `$log.error()`.
- *
* ```js
- * angular.
- * module('exceptionOverwrite', []).
- * factory('$exceptionHandler', ['$log', 'logErrorsToBackend', function($log, logErrorsToBackend) {
- * return function myExceptionHandler(exception, cause) {
- * logErrorsToBackend(exception, cause);
- * $log.warn(exception, cause);
- * };
- * }]);
+ * angular.module('exceptionOverride', []).factory('$exceptionHandler', function() {
+ * return function(exception, cause) {
+ * exception.message += ' (caused by "' + cause + '")';
+ * throw exception;
+ * };
+ * });
* ```
*
+ * This example will override the normal action of `$exceptionHandler`, to make angular
+ * exceptions fail hard when they happen, instead of just logging to the console.
+ *
*
* Note, that code executed in event-listeners (even those registered using jqLite's `on`/`bind`
* methods) does not delegate exceptions to the {@link ng.$exceptionHandler $exceptionHandler}
@@ -17268,7 +17088,7 @@ function $DocumentProvider() {
* `try { ... } catch(e) { $exceptionHandler(e); }`
*
* @param {Error} exception Exception associated with the error.
- * @param {string=} cause Optional information about the context in which
+ * @param {string=} cause optional information about the context in which
* the error was thrown.
*
*/
@@ -17338,7 +17158,7 @@ function $HttpParamSerializerProvider() {
* * `{'foo': 'bar'}` results in `foo=bar`
* * `{'foo': Date.now()}` results in `foo=2015-04-01T09%3A50%3A49.262Z` (`toISOString()` and encoded representation of a Date object)
* * `{'foo': ['bar', 'baz']}` results in `foo=bar&foo=baz` (repeated key for each array element)
- * * `{'foo': {'bar':'baz'}}` results in `foo=%7B%22bar%22%3A%22baz%22%7D` (stringified and encoded representation of an object)
+ * * `{'foo': {'bar':'baz'}}` results in `foo=%7B%22bar%22%3A%22baz%22%7D"` (stringified and encoded representation of an object)
*
* Note that serializer will sort the request parameters alphabetically.
* */
@@ -17889,7 +17709,7 @@ function $HttpProvider() {
*
* ### Overriding the Default Transformations Per Request
*
- * If you wish to override the request/response transformations only for a single request then provide
+ * If you wish override the request/response transformations only for a single request then provide
* `transformRequest` and/or `transformResponse` properties on the configuration object passed
* into `$http`.
*
@@ -17932,7 +17752,7 @@ function $HttpProvider() {
* * cache a specific response - set config.cache value to TRUE or to a cache object
*
* If caching is enabled, but neither the default cache nor config.cache are set to a cache object,
- * then the default `$cacheFactory("$http")` object is used.
+ * then the default `$cacheFactory($http)` object is used.
*
* The default cache value can be set by updating the
* {@link ng.$http#defaults `$http.defaults.cache`} property or the
@@ -18260,25 +18080,48 @@ function $HttpProvider() {
config.headers = mergeHeaders(requestConfig);
config.method = uppercase(config.method);
config.paramSerializer = isString(config.paramSerializer) ?
- $injector.get(config.paramSerializer) : config.paramSerializer;
+ $injector.get(config.paramSerializer) : config.paramSerializer;
+
+ var serverRequest = function(config) {
+ var headers = config.headers;
+ var reqData = transformData(config.data, headersGetter(headers), undefined, config.transformRequest);
- var requestInterceptors = [];
- var responseInterceptors = [];
+ // strip content-type if data is undefined
+ if (isUndefined(reqData)) {
+ forEach(headers, function(value, header) {
+ if (lowercase(header) === 'content-type') {
+ delete headers[header];
+ }
+ });
+ }
+
+ if (isUndefined(config.withCredentials) && !isUndefined(defaults.withCredentials)) {
+ config.withCredentials = defaults.withCredentials;
+ }
+
+ // send request
+ return sendReq(config, reqData).then(transformResponse, transformResponse);
+ };
+
+ var chain = [serverRequest, undefined];
var promise = $q.when(config);
// apply interceptors
forEach(reversedInterceptors, function(interceptor) {
if (interceptor.request || interceptor.requestError) {
- requestInterceptors.unshift(interceptor.request, interceptor.requestError);
+ chain.unshift(interceptor.request, interceptor.requestError);
}
if (interceptor.response || interceptor.responseError) {
- responseInterceptors.push(interceptor.response, interceptor.responseError);
+ chain.push(interceptor.response, interceptor.responseError);
}
});
- promise = chainInterceptors(promise, requestInterceptors);
- promise = promise.then(serverRequest);
- promise = chainInterceptors(promise, responseInterceptors);
+ while (chain.length) {
+ var thenFn = chain.shift();
+ var rejectFn = chain.shift();
+
+ promise = promise.then(thenFn, rejectFn);
+ }
if (useLegacyPromise) {
promise.success = function(fn) {
@@ -18305,18 +18148,14 @@ function $HttpProvider() {
return promise;
-
- function chainInterceptors(promise, interceptors) {
- for (var i = 0, ii = interceptors.length; i < ii;) {
- var thenFn = interceptors[i++];
- var rejectFn = interceptors[i++];
-
- promise = promise.then(thenFn, rejectFn);
- }
-
- interceptors.length = 0;
-
- return promise;
+ function transformResponse(response) {
+ // make a copy since the response must be cacheable
+ var resp = extend({}, response);
+ resp.data = transformData(response.data, response.headers, response.status,
+ config.transformResponse);
+ return (isSuccess(response.status))
+ ? resp
+ : $q.reject(resp);
}
function executeHeaderFns(headers, config) {
@@ -18360,37 +18199,6 @@ function $HttpProvider() {
// execute if header value is a function for merged headers
return executeHeaderFns(reqHeaders, shallowCopy(config));
}
-
- function serverRequest(config) {
- var headers = config.headers;
- var reqData = transformData(config.data, headersGetter(headers), undefined, config.transformRequest);
-
- // strip content-type if data is undefined
- if (isUndefined(reqData)) {
- forEach(headers, function(value, header) {
- if (lowercase(header) === 'content-type') {
- delete headers[header];
- }
- });
- }
-
- if (isUndefined(config.withCredentials) && !isUndefined(defaults.withCredentials)) {
- config.withCredentials = defaults.withCredentials;
- }
-
- // send request
- return sendReq(config, reqData).then(transformResponse, transformResponse);
- }
-
- function transformResponse(response) {
- // make a copy since the response must be cacheable
- var resp = extend({}, response);
- resp.data = transformData(response.data, response.headers, response.status,
- config.transformResponse);
- return (isSuccess(response.status))
- ? resp
- : $q.reject(resp);
- }
}
$http.pendingRequests = [];
@@ -18437,8 +18245,6 @@ function $HttpProvider() {
*
* @description
* Shortcut method to perform `JSONP` request.
- * If you would like to customise where and how the callbacks are stored then try overriding
- * or decorating the {@link $jsonpCallbacks} service.
*
* @param {string} url Relative or absolute URL specifying the destination of the request.
* The name of the callback should be the string `JSON_CALLBACK`.
@@ -18712,7 +18518,7 @@ function $xhrFactoryProvider() {
/**
* @ngdoc service
* @name $httpBackend
- * @requires $jsonpCallbacks
+ * @requires $window
* @requires $document
* @requires $xhrFactory
*
@@ -18727,8 +18533,8 @@ function $xhrFactoryProvider() {
* $httpBackend} which can be trained with responses.
*/
function $HttpBackendProvider() {
- this.$get = ['$browser', '$jsonpCallbacks', '$document', '$xhrFactory', function($browser, $jsonpCallbacks, $document, $xhrFactory) {
- return createHttpBackend($browser, $xhrFactory, $browser.defer, $jsonpCallbacks, $document[0]);
+ this.$get = ['$browser', '$window', '$document', '$xhrFactory', function($browser, $window, $document, $xhrFactory) {
+ return createHttpBackend($browser, $xhrFactory, $browser.defer, $window.angular.callbacks, $document[0]);
}];
}
@@ -18738,13 +18544,17 @@ function createHttpBackend($browser, createXhr, $browserDefer, callbacks, rawDoc
$browser.$$incOutstandingRequestCount();
url = url || $browser.url();
- if (lowercase(method) === 'jsonp') {
- var callbackPath = callbacks.createCallback(url);
- var jsonpDone = jsonpReq(url, callbackPath, function(status, text) {
- // jsonpReq only ever sets status to 200 (OK), 404 (ERROR) or -1 (WAITING)
- var response = (status === 200) && callbacks.getResponse(callbackPath);
- completeRequest(callback, status, response, "", text);
- callbacks.removeCallback(callbackPath);
+ if (lowercase(method) == 'jsonp') {
+ var callbackId = '_' + (callbacks.counter++).toString(36);
+ callbacks[callbackId] = function(data) {
+ callbacks[callbackId].data = data;
+ callbacks[callbackId].called = true;
+ };
+
+ var jsonpDone = jsonpReq(url.replace('JSON_CALLBACK', 'angular.callbacks.' + callbackId),
+ callbackId, function(status, text) {
+ completeRequest(callback, status, callbacks[callbackId].data, "", text);
+ callbacks[callbackId] = noop;
});
} else {
@@ -18846,8 +18656,7 @@ function createHttpBackend($browser, createXhr, $browserDefer, callbacks, rawDoc
}
};
- function jsonpReq(url, callbackPath, done) {
- url = url.replace('JSON_CALLBACK', callbackPath);
+ function jsonpReq(url, callbackId, done) {
// we can't use jQuery/jqLite here because jQuery does crazy stuff with script elements, e.g.:
// - fetches local scripts via XHR and evals them
// - adds and immediately removes script elements from the document
@@ -18865,7 +18674,7 @@ function createHttpBackend($browser, createXhr, $browserDefer, callbacks, rawDoc
var text = "unknown";
if (event) {
- if (event.type === "load" && !callbacks.wasCalled(callbackPath)) {
+ if (event.type === "load" && !callbacks[callbackId].called) {
event = { type: "error" };
}
text = event.type;
@@ -19064,7 +18873,7 @@ function $InterpolateProvider() {
*
* `allOrNothing` is useful for interpolating URLs. `ngSrc` and `ngSrcset` use this behavior.
*
- * #### Escaped Interpolation
+ * ####Escaped Interpolation
* $interpolate provides a mechanism for escaping interpolation markers. Start and end markers
* can be escaped by preceding each of their characters with a REVERSE SOLIDUS U+005C (backslash).
* It will be rendered as a regular start/end marker, and will not be interpreted as an expression
@@ -19487,87 +19296,6 @@ function $IntervalProvider() {
}];
}
-/**
- * @ngdoc service
- * @name $jsonpCallbacks
- * @requires $window
- * @description
- * This service handles the lifecycle of callbacks to handle JSONP requests.
- * Override this service if you wish to customise where the callbacks are stored and
- * how they vary compared to the requested url.
- */
-var $jsonpCallbacksProvider = function() {
- this.$get = ['$window', function($window) {
- var callbacks = $window.angular.callbacks;
- var callbackMap = {};
-
- function createCallback(callbackId) {
- var callback = function(data) {
- callback.data = data;
- callback.called = true;
- };
- callback.id = callbackId;
- return callback;
- }
-
- return {
- /**
- * @ngdoc method
- * @name $jsonpCallbacks#createCallback
- * @param {string} url the url of the JSONP request
- * @returns {string} the callback path to send to the server as part of the JSONP request
- * @description
- * {@link $httpBackend} calls this method to create a callback and get hold of the path to the callback
- * to pass to the server, which will be used to call the callback with its payload in the JSONP response.
- */
- createCallback: function(url) {
- var callbackId = '_' + (callbacks.$$counter++).toString(36);
- var callbackPath = 'angular.callbacks.' + callbackId;
- var callback = createCallback(callbackId);
- callbackMap[callbackPath] = callbacks[callbackId] = callback;
- return callbackPath;
- },
- /**
- * @ngdoc method
- * @name $jsonpCallbacks#wasCalled
- * @param {string} callbackPath the path to the callback that was sent in the JSONP request
- * @returns {boolean} whether the callback has been called, as a result of the JSONP response
- * @description
- * {@link $httpBackend} calls this method to find out whether the JSONP response actually called the
- * callback that was passed in the request.
- */
- wasCalled: function(callbackPath) {
- return callbackMap[callbackPath].called;
- },
- /**
- * @ngdoc method
- * @name $jsonpCallbacks#getResponse
- * @param {string} callbackPath the path to the callback that was sent in the JSONP request
- * @returns {*} the data received from the response via the registered callback
- * @description
- * {@link $httpBackend} calls this method to get hold of the data that was provided to the callback
- * in the JSONP response.
- */
- getResponse: function(callbackPath) {
- return callbackMap[callbackPath].data;
- },
- /**
- * @ngdoc method
- * @name $jsonpCallbacks#removeCallback
- * @param {string} callbackPath the path to the callback that was sent in the JSONP request
- * @description
- * {@link $httpBackend} calls this method to remove the callback after the JSONP request has
- * completed or timed-out.
- */
- removeCallback: function(callbackPath) {
- var callback = callbackMap[callbackPath];
- delete callbacks[callback.id];
- delete callbackMap[callbackPath];
- }
- };
- }];
-};
-
/**
* @ngdoc service
* @name $locale
@@ -19907,12 +19635,6 @@ function LocationHashbangInHtml5Url(appBase, appBaseNoFile, hashPrefix) {
var locationPrototype = {
- /**
- * Ensure absolute url is initialized.
- * @private
- */
- $$absUrl:'',
-
/**
* Are we in html5 mode?
* @private
@@ -21286,7 +21008,7 @@ AST.prototype = {
var args = [];
if (this.peekToken().text !== ')') {
do {
- args.push(this.filterChain());
+ args.push(this.expression());
} while (this.expect(','));
}
return args;
@@ -23013,7 +22735,7 @@ function $ParseProvider() {
*
* **Methods**
*
- * - `then(successCallback, [errorCallback], [notifyCallback])` – regardless of when the promise was or
+ * - `then(successCallback, errorCallback, notifyCallback)` – regardless of when the promise was or
* will be resolved or rejected, `then` calls one of the success or error callbacks asynchronously
* as soon as the result is available. The callbacks are called with a single argument: the result
* or rejection reason. Additionally, the notify callback may be called zero or more times to
@@ -23024,8 +22746,7 @@ function $ParseProvider() {
* with the value which is resolved in that promise using
* [promise chaining](http://www.html5rocks.com/en/tutorials/es6/promises/#toc-promises-queues)).
* It also notifies via the return value of the `notifyCallback` method. The promise cannot be
- * resolved or rejected from the notifyCallback method. The errorCallback and notifyCallback
- * arguments are optional.
+ * resolved or rejected from the notifyCallback method.
*
* - `catch(errorCallback)` – shorthand for `promise.then(null, errorCallback)`
*
@@ -23440,30 +23161,6 @@ function qFactory(nextTick, exceptionHandler) {
return deferred.promise;
}
- /**
- * @ngdoc method
- * @name $q#race
- * @kind function
- *
- * @description
- * Returns a promise that resolves or rejects as soon as one of those promises
- * resolves or rejects, with the value or reason from that promise.
- *
- * @param {Array.|Object.} promises An array or hash of promises.
- * @returns {Promise} a promise that resolves or rejects as soon as one of the `promises`
- * resolves or rejects, with the value or reason from that promise.
- */
-
- function race(promises) {
- var deferred = defer();
-
- forEach(promises, function(promise) {
- when(promise).then(deferred.resolve, deferred.reject);
- });
-
- return deferred.promise;
- }
-
var $Q = function Q(resolver) {
if (!isFunction(resolver)) {
throw $qMinErr('norslvr', "Expected resolverFn, got '{0}'", resolver);
@@ -23493,7 +23190,6 @@ function qFactory(nextTick, exceptionHandler) {
$Q.when = when;
$Q.resolve = resolve;
$Q.all = all;
- $Q.race = race;
return $Q;
}
@@ -26845,11 +26541,10 @@ function $FilterProvider($provide) {
* - `Object`: A pattern object can be used to filter specific properties on objects contained
* by `array`. For example `{name:"M", phone:"1"}` predicate will return an array of items
* which have property `name` containing "M" and property `phone` containing "1". A special
- * property name (`$` by default) can be used (e.g. as in `{$: "text"}`) to accept a match
- * against any property of the object or its nested object properties. That's equivalent to the
- * simple substring match with a `string` as described above. The special property name can be
- * overwritten, using the `anyPropertyKey` parameter.
- * The predicate can be negated by prefixing the string with `!`.
+ * property name `$` can be used (as in `{$:"text"}`) to accept a match against any
+ * property of the object or its nested object properties. That's equivalent to the simple
+ * substring match with a `string` as described above. The predicate can be negated by prefixing
+ * the string with `!`.
* For example `{name: "!M"}` predicate will return an array of items which have property `name`
* not containing "M".
*
@@ -26883,9 +26578,6 @@ function $FilterProvider($provide) {
* Primitive values are converted to strings. Objects are not compared against primitives,
* unless they have a custom `toString` method (e.g. `Date` objects).
*
- * @param {string=} anyPropertyKey The special property name that matches against any property.
- * By default `$`.
- *
* @example
@@ -26954,9 +26646,8 @@ function $FilterProvider($provide) {
*/
-
function filterFilter() {
- return function(array, expression, comparator, anyPropertyKey) {
+ return function(array, expression, comparator) {
if (!isArrayLike(array)) {
if (array == null) {
return array;
@@ -26965,7 +26656,6 @@ function filterFilter() {
}
}
- anyPropertyKey = anyPropertyKey || '$';
var expressionType = getTypeForFilter(expression);
var predicateFn;
var matchAgainstAnyProp;
@@ -26982,7 +26672,7 @@ function filterFilter() {
//jshint -W086
case 'object':
//jshint +W086
- predicateFn = createPredicateFn(expression, comparator, anyPropertyKey, matchAgainstAnyProp);
+ predicateFn = createPredicateFn(expression, comparator, matchAgainstAnyProp);
break;
default:
return array;
@@ -26993,8 +26683,8 @@ function filterFilter() {
}
// Helper functions for `filterFilter`
-function createPredicateFn(expression, comparator, anyPropertyKey, matchAgainstAnyProp) {
- var shouldMatchPrimitives = isObject(expression) && (anyPropertyKey in expression);
+function createPredicateFn(expression, comparator, matchAgainstAnyProp) {
+ var shouldMatchPrimitives = isObject(expression) && ('$' in expression);
var predicateFn;
if (comparator === true) {
@@ -27022,25 +26712,25 @@ function createPredicateFn(expression, comparator, anyPropertyKey, matchAgainstA
predicateFn = function(item) {
if (shouldMatchPrimitives && !isObject(item)) {
- return deepCompare(item, expression[anyPropertyKey], comparator, anyPropertyKey, false);
+ return deepCompare(item, expression.$, comparator, false);
}
- return deepCompare(item, expression, comparator, anyPropertyKey, matchAgainstAnyProp);
+ return deepCompare(item, expression, comparator, matchAgainstAnyProp);
};
return predicateFn;
}
-function deepCompare(actual, expected, comparator, anyPropertyKey, matchAgainstAnyProp, dontMatchWholeObject) {
+function deepCompare(actual, expected, comparator, matchAgainstAnyProp, dontMatchWholeObject) {
var actualType = getTypeForFilter(actual);
var expectedType = getTypeForFilter(expected);
if ((expectedType === 'string') && (expected.charAt(0) === '!')) {
- return !deepCompare(actual, expected.substring(1), comparator, anyPropertyKey, matchAgainstAnyProp);
+ return !deepCompare(actual, expected.substring(1), comparator, matchAgainstAnyProp);
} else if (isArray(actual)) {
// In case `actual` is an array, consider it a match
// if ANY of it's items matches `expected`
return actual.some(function(item) {
- return deepCompare(item, expected, comparator, anyPropertyKey, matchAgainstAnyProp);
+ return deepCompare(item, expected, comparator, matchAgainstAnyProp);
});
}
@@ -27049,11 +26739,11 @@ function deepCompare(actual, expected, comparator, anyPropertyKey, matchAgainstA
var key;
if (matchAgainstAnyProp) {
for (key in actual) {
- if ((key.charAt(0) !== '$') && deepCompare(actual[key], expected, comparator, anyPropertyKey, true)) {
+ if ((key.charAt(0) !== '$') && deepCompare(actual[key], expected, comparator, true)) {
return true;
}
}
- return dontMatchWholeObject ? false : deepCompare(actual, expected, comparator, anyPropertyKey, false);
+ return dontMatchWholeObject ? false : deepCompare(actual, expected, comparator, false);
} else if (expectedType === 'object') {
for (key in expected) {
var expectedVal = expected[key];
@@ -27061,9 +26751,9 @@ function deepCompare(actual, expected, comparator, anyPropertyKey, matchAgainstA
continue;
}
- var matchAnyProperty = key === anyPropertyKey;
+ var matchAnyProperty = key === '$';
var actualVal = matchAnyProperty ? actual : actual[key];
- if (!deepCompare(actualVal, expectedVal, comparator, anyPropertyKey, matchAnyProperty, matchAnyProperty)) {
+ if (!deepCompare(actualVal, expectedVal, comparator, matchAnyProperty, matchAnyProperty)) {
return false;
}
}
@@ -27801,22 +27491,21 @@ var uppercaseFilter = valueFn(uppercase);
* @kind function
*
* @description
- * Creates a new array or string containing only a specified number of elements. The elements are
- * taken from either the beginning or the end of the source array, string or number, as specified by
- * the value and sign (positive or negative) of `limit`. Other array-like objects are also supported
- * (e.g. array subclasses, NodeLists, jqLite/jQuery collections etc). If a number is used as input,
- * it is converted to a string.
- *
- * @param {Array|ArrayLike|string|number} input - Array/array-like, string or number to be limited.
- * @param {string|number} limit - The length of the returned array or string. If the `limit` number
+ * Creates a new array or string containing only a specified number of elements. The elements
+ * are taken from either the beginning or the end of the source array, string or number, as specified by
+ * the value and sign (positive or negative) of `limit`. If a number is used as input, it is
+ * converted to a string.
+ *
+ * @param {Array|string|number} input Source array, string or number to be limited.
+ * @param {string|number} limit The length of the returned array or string. If the `limit` number
* is positive, `limit` number of items from the beginning of the source array/string are copied.
* If the number is negative, `limit` number of items from the end of the source array/string
* are copied. The `limit` will be trimmed if it exceeds `array.length`. If `limit` is undefined,
* the input will be returned unchanged.
- * @param {(string|number)=} begin - Index at which to begin limitation. As a negative index,
- * `begin` indicates an offset from the end of `input`. Defaults to `0`.
- * @returns {Array|string} A new sub-array or substring of length `limit` or less if the input had
- * less than `limit` elements.
+ * @param {(string|number)=} begin Index at which to begin limitation. As a negative index, `begin`
+ * indicates an offset from the end of `input`. Defaults to `0`.
+ * @returns {Array|string} A new sub-array or substring of length `limit` or less if input array
+ * had less than `limit` elements.
*
* @example
@@ -27904,157 +27593,67 @@ function limitToFilter() {
if (isNaN(limit)) return input;
if (isNumber(input)) input = input.toString();
- if (!isArrayLike(input)) return input;
+ if (!isArray(input) && !isString(input)) return input;
begin = (!begin || isNaN(begin)) ? 0 : toInt(begin);
begin = (begin < 0) ? Math.max(0, input.length + begin) : begin;
if (limit >= 0) {
- return sliceFn(input, begin, begin + limit);
+ return input.slice(begin, begin + limit);
} else {
if (begin === 0) {
- return sliceFn(input, limit, input.length);
+ return input.slice(limit, input.length);
} else {
- return sliceFn(input, Math.max(0, begin + limit), begin);
+ return input.slice(Math.max(0, begin + limit), begin);
}
}
};
}
-function sliceFn(input, begin, end) {
- if (isString(input)) return input.slice(begin, end);
-
- return slice.call(input, begin, end);
-}
-
/**
* @ngdoc filter
* @name orderBy
* @kind function
*
* @description
- * Returns an array containing the items from the specified `collection`, ordered by a `comparator`
- * function based on the values computed using the `expression` predicate.
- *
- * For example, `[{id: 'foo'}, {id: 'bar'}] | orderBy:'id'` would result in
- * `[{id: 'bar'}, {id: 'foo'}]`.
+ * Orders a specified `array` by the `expression` predicate. It is ordered alphabetically
+ * for strings and numerically for numbers. Note: if you notice numbers are not being sorted
+ * as expected, make sure they are actually being saved as numbers and not strings.
+ * Array-like values (e.g. NodeLists, jQuery objects, TypedArrays, Strings, etc) are also supported.
*
- * The `collection` can be an Array or array-like object (e.g. NodeList, jQuery object, TypedArray,
- * String, etc).
- *
- * The `expression` can be a single predicate, or a list of predicates each serving as a tie-breaker
- * for the preceeding one. The `expression` is evaluated against each item and the output is used
- * for comparing with other items.
- *
- * You can change the sorting order by setting `reverse` to `true`. By default, items are sorted in
- * ascending order.
- *
- * The comparison is done using the `comparator` function. If none is specified, a default, built-in
- * comparator is used (see below for details - in a nutshell, it compares numbers numerically and
- * strings alphabetically).
- *
- * ### Under the hood
- *
- * Ordering the specified `collection` happens in two phases:
- *
- * 1. All items are passed through the predicate (or predicates), and the returned values are saved
- * along with their type (`string`, `number` etc). For example, an item `{label: 'foo'}`, passed
- * through a predicate that extracts the value of the `label` property, would be transformed to:
- * ```
- * {
- * value: 'foo',
- * type: 'string',
- * index: ...
- * }
- * ```
- * 2. The comparator function is used to sort the items, based on the derived values, types and
- * indices.
- *
- * If you use a custom comparator, it will be called with pairs of objects of the form
- * `{value: ..., type: '...', index: ...}` and is expected to return `0` if the objects are equal
- * (as far as the comparator is concerned), `-1` if the 1st one should be ranked higher than the
- * second, or `1` otherwise.
- *
- * In order to ensure that the sorting will be deterministic across platforms, if none of the
- * specified predicates can distinguish between two items, `orderBy` will automatically introduce a
- * dummy predicate that returns the item's index as `value`.
- * (If you are using a custom comparator, make sure it can handle this predicate as well.)
- *
- * Finally, in an attempt to simplify things, if a predicate returns an object as the extracted
- * value for an item, `orderBy` will try to convert that object to a primitive value, before passing
- * it to the comparator. The following rules govern the conversion:
- *
- * 1. If the object has a `valueOf()` method that returns a primitive, its return value will be
- * used instead.
- * (If the object has a `valueOf()` method that returns another object, then the returned object
- * will be used in subsequent steps.)
- * 2. If the object has a custom `toString()` method (i.e. not the one inherited from `Object`) that
- * returns a primitive, its return value will be used instead.
- * (If the object has a `toString()` method that returns another object, then the returned object
- * will be used in subsequent steps.)
- * 3. No conversion; the object itself is used.
- *
- * ### The default comparator
- *
- * The default, built-in comparator should be sufficient for most usecases. In short, it compares
- * numbers numerically, strings alphabetically (and case-insensitively), for objects falls back to
- * using their index in the original collection, and sorts values of different types by type.
- *
- * More specifically, it follows these steps to determine the relative order of items:
- *
- * 1. If the compared values are of different types, compare the types themselves alphabetically.
- * 2. If both values are of type `string`, compare them alphabetically in a case- and
- * locale-insensitive way.
- * 3. If both values are objects, compare their indices instead.
- * 4. Otherwise, return:
- * - `0`, if the values are equal (by strict equality comparison, i.e. using `===`).
- * - `-1`, if the 1st value is "less than" the 2nd value (compared using the `<` operator).
- * - `1`, otherwise.
- *
- * **Note:** If you notice numbers not being sorted as expected, make sure they are actually being
- * saved as numbers and not strings.
- *
- * @param {Array|ArrayLike} collection - The collection (array or array-like object) to sort.
- * @param {(Function|string|Array.)=} expression - A predicate (or list of
- * predicates) to be used by the comparator to determine the order of elements.
+ * @param {Array} array The array (or array-like object) to sort.
+ * @param {function(*)|string|Array.<(function(*)|string)>=} expression A predicate to be
+ * used by the comparator to determine the order of elements.
*
* Can be one of:
*
- * - `Function`: A getter function. This function will be called with each item as argument and
- * the return value will be used for sorting.
- * - `string`: An Angular expression. This expression will be evaluated against each item and the
- * result will be used for sorting. For example, use `'label'` to sort by a property called
- * `label` or `'label.substring(0, 3)'` to sort by the first 3 characters of the `label`
- * property.
- * (The result of a constant expression is interpreted as a property name to be used for
- * comparison. For example, use `'"special name"'` (note the extra pair of quotes) to sort by a
- * property called `special name`.)
- * An expression can be optionally prefixed with `+` or `-` to control the sorting direction,
- * ascending or descending. For example, `'+label'` or `'-label'`. If no property is provided,
- * (e.g. `'+'` or `'-'`), the collection element itself is used in comparisons.
- * - `Array`: An array of function and/or string predicates. If a predicate cannot determine the
- * relative order of two items, the next predicate is used as a tie-breaker.
- *
- * **Note:** If the predicate is missing or empty then it defaults to `'+'`.
+ * - `function`: Getter function. The result of this function will be sorted using the
+ * `<`, `===`, `>` operator.
+ * - `string`: An Angular expression. The result of this expression is used to compare elements
+ * (for example `name` to sort by a property called `name` or `name.substr(0, 3)` to sort by
+ * 3 first characters of a property called `name`). The result of a constant expression
+ * is interpreted as a property name to be used in comparisons (for example `"special name"`
+ * to sort object by the value of their `special name` property). An expression can be
+ * optionally prefixed with `+` or `-` to control ascending or descending sort order
+ * (for example, `+name` or `-name`). If no property is provided, (e.g. `'+'`) then the array
+ * element itself is used to compare where sorting.
+ * - `Array`: An array of function or string predicates. The first predicate in the array
+ * is used for sorting, but when two items are equivalent, the next predicate is used.
*
- * @param {boolean=} reverse - If `true`, reverse the sorting order.
- * @param {(Function)=} comparator - The comparator function used to determine the relative order of
- * value pairs. If omitted, the built-in comparator will be used.
+ * If the predicate is missing or empty then it defaults to `'+'`.
*
- * @returns {Array} - The sorted array.
+ * @param {boolean=} reverse Reverse the order of the array.
+ * @returns {Array} Sorted copy of the source array.
*
*
* @example
- * ### Ordering a table with `ngRepeat`
- *
- * The example below demonstrates a simple {@link ngRepeat ngRepeat}, where the data is sorted by
- * age in descending order (expression is set to `'-age'`). The `comparator` is not set, which means
- * it defaults to the built-in comparator.
- *
-
+ * The example below demonstrates a simple ngRepeat, where the data is sorted
+ * by age in descending order (predicate is set to `'-age'`).
+ * `reverse` is not set, which means it defaults to `false`.
+
-
+
Name
Phone Number
@@ -28069,77 +27668,43 @@ function sliceFn(input, begin, end) {
- angular.module('orderByExample1', [])
+ angular.module('orderByExample', [])
.controller('ExampleController', ['$scope', function($scope) {
- $scope.friends = [
- {name: 'John', phone: '555-1212', age: 10},
- {name: 'Mary', phone: '555-9876', age: 19},
- {name: 'Mike', phone: '555-4321', age: 21},
- {name: 'Adam', phone: '555-5678', age: 35},
- {name: 'Julie', phone: '555-8765', age: 29}
- ];
+ $scope.friends =
+ [{name:'John', phone:'555-1212', age:10},
+ {name:'Mary', phone:'555-9876', age:19},
+ {name:'Mike', phone:'555-4321', age:21},
+ {name:'Adam', phone:'555-5678', age:35},
+ {name:'Julie', phone:'555-8765', age:29}];
}]);
-
- .friends {
- border-collapse: collapse;
- }
-
- .friends th {
- border-bottom: 1px solid;
- }
- .friends td, .friends th {
- border-left: 1px solid;
- padding: 5px 10px;
- }
- .friends td:first-child, .friends th:first-child {
- border-left: none;
- }
-
-
- // Element locators
- var names = element.all(by.repeater('friends').column('friend.name'));
-
- it('should sort friends by age in reverse order', function() {
- expect(names.get(0).getText()).toBe('Adam');
- expect(names.get(1).getText()).toBe('Julie');
- expect(names.get(2).getText()).toBe('Mike');
- expect(names.get(3).getText()).toBe('Mary');
- expect(names.get(4).getText()).toBe('John');
- });
-
- *
*
+ * The predicate and reverse parameters can be controlled dynamically through scope properties,
+ * as shown in the next example.
* @example
- * ### Changing parameters dynamically
- *
- * All parameters can be changed dynamically. The next example shows how you can make the columns of
- * a table sortable, by binding the `expression` and `reverse` parameters to scope properties.
- *
-
+
+
- .friends th {
- border-bottom: 1px solid;
- }
- .friends td, .friends th {
- border-left: 1px solid;
- padding: 5px 10px;
- }
- .friends td:first-child, .friends th:first-child {
- border-left: none;
- }
+
+ angular.module('orderByExample', [])
+ .controller('ExampleController', ['$scope', '$filter', function($scope, $filter) {
+ var orderBy = $filter('orderBy');
+ $scope.friends = [
+ { name: 'John', phone: '555-1212', age: 10 },
+ { name: 'Mary', phone: '555-9876', age: 19 },
+ { name: 'Mike', phone: '555-4321', age: 21 },
+ { name: 'Adam', phone: '555-5678', age: 35 },
+ { name: 'Julie', phone: '555-8765', age: 29 }
+ ];
+ $scope.order = function(predicate) {
+ $scope.predicate = predicate;
+ $scope.reverse = ($scope.predicate === predicate) ? !$scope.reverse : false;
+ $scope.friends = orderBy($scope.friends, predicate, $scope.reverse);
+ };
+ $scope.order('age', true);
+ }]);
+
+
.sortorder:after {
- content: '\25b2'; // BLACK UP-POINTING TRIANGLE
+ content: '\25b2';
}
.sortorder.reverse:after {
- content: '\25bc'; // BLACK DOWN-POINTING TRIANGLE
- }
-
-
- // Element locators
- var unsortButton = element(by.partialButtonText('unsorted'));
- var nameHeader = element(by.partialButtonText('Name'));
- var phoneHeader = element(by.partialButtonText('Phone'));
- var ageHeader = element(by.partialButtonText('Age'));
- var firstName = element(by.repeater('friends').column('friend.name').row(0));
- var lastName = element(by.repeater('friends').column('friend.name').row(4));
-
- it('should sort friends by some property, when clicking on the column header', function() {
- expect(firstName.getText()).toBe('Adam');
- expect(lastName.getText()).toBe('John');
-
- phoneHeader.click();
- expect(firstName.getText()).toBe('John');
- expect(lastName.getText()).toBe('Mary');
-
- nameHeader.click();
- expect(firstName.getText()).toBe('Adam');
- expect(lastName.getText()).toBe('Mike');
-
- ageHeader.click();
- expect(firstName.getText()).toBe('John');
- expect(lastName.getText()).toBe('Adam');
- });
-
- it('should sort friends in reverse order, when clicking on the same column', function() {
- expect(firstName.getText()).toBe('Adam');
- expect(lastName.getText()).toBe('John');
-
- ageHeader.click();
- expect(firstName.getText()).toBe('John');
- expect(lastName.getText()).toBe('Adam');
-
- ageHeader.click();
- expect(firstName.getText()).toBe('Adam');
- expect(lastName.getText()).toBe('John');
- });
-
- it('should restore the original order, when clicking "Set to unsorted"', function() {
- expect(firstName.getText()).toBe('Adam');
- expect(lastName.getText()).toBe('John');
-
- unsortButton.click();
- expect(firstName.getText()).toBe('John');
- expect(lastName.getText()).toBe('Julie');
- });
-
-
- *
- *
- * @example
- * ### Using a custom comparator
- *
- * If you have very specific requirements about the way items are sorted, you can pass your own
- * comparator function. For example, you might need to compare some strings in a locale-sensitive
- * way. (When specifying a custom comparator, you also need to pass a value for the `reverse`
- * argument - passing `false` retains the default sorting order, i.e. ascending.)
- *
-
-
-
-
-
Locale-sensitive Comparator
-
-
-
Name
-
Favorite Letter
-
-
-
{{friend.name}}
-
{{friend.favoriteLetter}}
-
-
-
-
-
Default Comparator
-
-
-
Name
-
Favorite Letter
-
-
-
{{friend.name}}
-
{{friend.favoriteLetter}}
-
-
-
-
-
-
- angular.module('orderByExample4', [])
- .controller('ExampleController', ['$scope', function($scope) {
- $scope.friends = [
- {name: 'John', favoriteLetter: 'Ä'},
- {name: 'Mary', favoriteLetter: 'Ü'},
- {name: 'Mike', favoriteLetter: 'Ö'},
- {name: 'Adam', favoriteLetter: 'H'},
- {name: 'Julie', favoriteLetter: 'Z'}
- ];
-
- $scope.localeSensitiveComparator = function(v1, v2) {
- // If we don't get strings, just compare by index
- if (v1.type !== 'string' || v2.type !== 'string') {
- return (v1.index < v2.index) ? -1 : 1;
- }
-
- // Compare strings alphabetically, taking locale into account
- return v1.value.localeCompare(v2.value);
- };
- }]);
-
-
- .friends-container {
- display: inline-block;
- margin: 0 30px;
- }
-
- .friends {
- border-collapse: collapse;
+ content: '\25bc';
}
-
- .friends th {
- border-bottom: 1px solid;
- }
- .friends td, .friends th {
- border-left: 1px solid;
- padding: 5px 10px;
- }
- .friends td:first-child, .friends th:first-child {
- border-left: none;
- }
-
-
- // Element locators
- var container = element(by.css('.custom-comparator'));
- var names = container.all(by.repeater('friends').column('friend.name'));
-
- it('should sort friends by favorite letter (in correct alphabetical order)', function() {
- expect(names.get(0).getText()).toBe('John');
- expect(names.get(1).getText()).toBe('Adam');
- expect(names.get(2).getText()).toBe('Mike');
- expect(names.get(3).getText()).toBe('Mary');
- expect(names.get(4).getText()).toBe('Julie');
- });
-
-
- *
+
+
*/
orderByFilter.$inject = ['$parse'];
function orderByFilter($parse) {
- return function(array, sortPredicate, reverseOrder, compareFn) {
+ return function(array, sortPredicate, reverseOrder) {
if (array == null) return array;
if (!isArrayLike(array)) {
@@ -28486,12 +27816,11 @@ function orderByFilter($parse) {
if (!isArray(sortPredicate)) { sortPredicate = [sortPredicate]; }
if (sortPredicate.length === 0) { sortPredicate = ['+']; }
- var predicates = processPredicates(sortPredicate);
-
- var descending = reverseOrder ? -1 : 1;
-
- // Define the `compare()` function. Use a default comparator if none is specified.
- var compare = isFunction(compareFn) ? compareFn : defaultCompare;
+ var predicates = processPredicates(sortPredicate, reverseOrder);
+ // Add a predicate at the end that evaluates to the element index. This makes the
+ // sort stable as it works as a tie-breaker when all the input predicates cannot
+ // distinguish between two elements.
+ predicates.push({ get: function() { return {}; }, descending: reverseOrder ? -1 : 1});
// The next three lines are a version of a Swartzian Transform idiom from Perl
// (sometimes called the Decorate-Sort-Undecorate idiom)
@@ -28503,12 +27832,8 @@ function orderByFilter($parse) {
return array;
function getComparisonObject(value, index) {
- // NOTE: We are adding an extra `tieBreaker` value based on the element's index.
- // This will be used to keep the sort stable when none of the input predicates can
- // distinguish between two elements.
return {
value: value,
- tieBreaker: {value: index, type: 'number', index: index},
predicateValues: predicates.map(function(predicate) {
return getPredicateValue(predicate.get(value), index);
})
@@ -28516,19 +27841,18 @@ function orderByFilter($parse) {
}
function doComparison(v1, v2) {
- for (var i = 0, ii = predicates.length; i < ii; i++) {
- var result = compare(v1.predicateValues[i], v2.predicateValues[i]);
- if (result) {
- return result * predicates[i].descending * descending;
- }
+ var result = 0;
+ for (var index=0, length = predicates.length; index < length; ++index) {
+ result = compare(v1.predicateValues[index], v2.predicateValues[index]) * predicates[index].descending;
+ if (result) break;
}
-
- return compare(v1.tieBreaker, v2.tieBreaker) * descending;
+ return result;
}
};
- function processPredicates(sortPredicates) {
- return sortPredicates.map(function(predicate) {
+ function processPredicates(sortPredicate, reverseOrder) {
+ reverseOrder = reverseOrder ? -1 : 1;
+ return sortPredicate.map(function(predicate) {
var descending = 1, get = identity;
if (isFunction(predicate)) {
@@ -28546,7 +27870,7 @@ function orderByFilter($parse) {
}
}
}
- return {get: get, descending: descending};
+ return { get: get, descending: descending * reverseOrder };
});
}
@@ -28561,9 +27885,9 @@ function orderByFilter($parse) {
}
}
- function objectValue(value) {
+ function objectValue(value, index) {
// If `valueOf` is a valid function use that
- if (isFunction(value.valueOf)) {
+ if (typeof value.valueOf === 'function') {
value = value.valueOf();
if (isPrimitive(value)) return value;
}
@@ -28572,8 +27896,8 @@ function orderByFilter($parse) {
value = value.toString();
if (isPrimitive(value)) return value;
}
-
- return value;
+ // We have a basic object so we use the position of the object in the collection
+ return index;
}
function getPredicateValue(value, index) {
@@ -28581,39 +27905,23 @@ function orderByFilter($parse) {
if (value === null) {
type = 'string';
value = 'null';
+ } else if (type === 'string') {
+ value = value.toLowerCase();
} else if (type === 'object') {
- value = objectValue(value);
+ value = objectValue(value, index);
}
- return {value: value, type: type, index: index};
+ return { value: value, type: type };
}
- function defaultCompare(v1, v2) {
+ function compare(v1, v2) {
var result = 0;
- var type1 = v1.type;
- var type2 = v2.type;
-
- if (type1 === type2) {
- var value1 = v1.value;
- var value2 = v2.value;
-
- if (type1 === 'string') {
- // Compare strings case-insensitively
- value1 = value1.toLowerCase();
- value2 = value2.toLowerCase();
- } else if (type1 === 'object') {
- // For basic objects, use the position of the object
- // in the collection instead of the value
- if (isObject(value1)) value1 = v1.index;
- if (isObject(value2)) value2 = v2.index;
- }
-
- if (value1 !== value2) {
- result = value1 < value2 ? -1 : 1;
+ if (v1.type === v2.type) {
+ if (v1.value !== v2.value) {
+ result = v1.value < v2.value ? -1 : 1;
}
} else {
- result = type1 < type2 ? -1 : 1;
+ result = v1.type < v2.type ? -1 : 1;
}
-
return result;
}
}
@@ -28893,11 +28201,9 @@ var htmlAnchorDirective = valueFn({
*
* @description
*
- * Sets the `readonly` attribute on the element, if the expression inside `ngReadonly` is truthy.
- * Note that `readonly` applies only to `input` elements with specific types. [See the input docs on
- * MDN](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#attr-readonly) for more information.
+ * Sets the `readOnly` attribute on the element, if the expression inside `ngReadonly` is truthy.
*
- * A special directive is necessary because we cannot use interpolation inside the `readonly`
+ * A special directive is necessary because we cannot use interpolation inside the `readOnly`
* attribute. See the {@link guide/interpolation interpolation guide} for more info.
*
* @example
@@ -28934,13 +28240,6 @@ var htmlAnchorDirective = valueFn({
* A special directive is necessary because we cannot use interpolation inside the `selected`
* attribute. See the {@link guide/interpolation interpolation guide} for more info.
*
- *
- * **Note:** `ngSelected` does not interact with the `select` and `ngModel` directives, it only
- * sets the `selected` attribute on the element. If you are using `ngModel` on the select, you
- * should not use `ngSelected` on the options, as `ngModel` will set the select value and
- * selected options.
- *
- *
* @example
@@ -28977,11 +28276,6 @@ var htmlAnchorDirective = valueFn({
* A special directive is necessary because we cannot use interpolation inside the `open`
* attribute. See the {@link guide/interpolation interpolation guide} for more info.
*
- * ## A note about browser compatibility
- *
- * Edge, Firefox, and Internet Explorer do not support the `details` element, it is
- * recommended to use {@link ng.ngShow} and {@link ng.ngHide} instead.
- *
* @example
@@ -29672,9 +28966,7 @@ var ISO_DATE_REGEXP = /^\d{4,}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d:[0-5]\d\.\d+(?:[+-
// 9. Fragment
// 1111111111111111 222 333333 44444 555555555555555555555555 666 77777777 8888888 999
var URL_REGEXP = /^[a-z][a-z\d.+-]*:\/*(?:[^:@]+(?::[^@]+)?@)?(?:[^\s:/?#]+|\[[a-f\d:]+\])(?::\d+)?(?:\/[^?#]*)?(?:\?[^#]*)?(?:#.*)?$/i;
-/* jshint maxlen:220 */
-var EMAIL_REGEXP = /^(?=.{1,254}$)(?=.{1,64}@)[-!#$%&'*+\/0-9=?A-Z^_`a-z{|}~]+(\.[-!#$%&'*+\/0-9=?A-Z^_`a-z{|}~]+)*@[A-Za-z0-9]([A-Za-z0-9-]{0,61}[A-Za-z0-9])?(\.[A-Za-z0-9]([A-Za-z0-9-]{0,61}[A-Za-z0-9])?)*$/;
-/* jshint maxlen:200 */
+var EMAIL_REGEXP = /^[a-z0-9!#$%&'*+\/=?^_`{|}~.-]+@[a-z0-9]([a-z0-9-]*[a-z0-9])?(\.[a-z0-9]([a-z0-9-]*[a-z0-9])?)*$/i;
var NUMBER_REGEXP = /^\s*(\-|\+)?(\d+|(\d*(\.\d*)))([eE][+-]?\d+)?\s*$/;
var DATE_REGEXP = /^(\d{4,})-(\d{2})-(\d{2})$/;
var DATETIMELOCAL_REGEXP = /^(\d{4,})-(\d\d)-(\d\d)T(\d\d):(\d\d)(?::(\d\d)(\.\d{1,3})?)?$/;
@@ -31059,7 +30351,7 @@ function numberInputType(scope, element, attr, ctrl, $sniffer, $browser) {
attr.$observe('min', function(val) {
if (isDefined(val) && !isNumber(val)) {
- val = parseFloat(val);
+ val = parseFloat(val, 10);
}
minVal = isNumber(val) && !isNaN(val) ? val : undefined;
// TODO(matsko): implement validateLater to reduce number of validations
@@ -31075,7 +30367,7 @@ function numberInputType(scope, element, attr, ctrl, $sniffer, $browser) {
attr.$observe('max', function(val) {
if (isDefined(val) && !isNumber(val)) {
- val = parseFloat(val);
+ val = parseFloat(val, 10);
}
maxVal = isNumber(val) && !isNaN(val) ? val : undefined;
// TODO(matsko): implement validateLater to reduce number of validations
@@ -31882,11 +31174,6 @@ function classDirective(name, selector) {
* When the expression changes, the previously added classes are removed and only then are the
* new classes added.
*
- * @knownIssue
- * You should not use {@link guide/interpolation interpolation} in the value of the `class`
- * attribute, when using the `ngClass` directive on the same element.
- * See {@link guide/interpolation#known-issues here} for more info.
- *
* @animations
* | Animation | Occurs |
* |----------------------------------|-------------------------------------|
@@ -35832,7 +35119,7 @@ var ngOptionsDirective = ['$compile', '$document', '$parse', function($compile,
for (var i = options.items.length - 1; i >= 0; i--) {
var option = options.items[i];
- if (isDefined(option.group)) {
+ if (option.group) {
jqLiteRemove(option.element.parentNode);
} else {
jqLiteRemove(option.element);
@@ -35864,8 +35151,7 @@ var ngOptionsDirective = ['$compile', '$document', '$parse', function($compile,
listFragment.appendChild(groupElement);
// Update the label on the group element
- // "null" is special cased because of Safari
- groupElement.label = option.group === null ? 'null' : option.group;
+ groupElement.label = option.group;
// Store it for use later
groupElementMap[option.group] = groupElement;
@@ -36201,7 +35487,7 @@ var ngPluralizeDirective = ['$locale', '$interpolate', '$log', function($locale,
* it's a prefix used by Angular for public (`$`) and private (`$$`) properties.
*
* - The built-in filters {@link ng.orderBy orderBy} and {@link ng.filter filter} do not work with
- * objects, and will throw an error if used with one.
+ * objects, and will throw if used with one.
*
* If you are hitting any of these limitations, the recommended workaround is to convert your object into an array
* that is sorted into the order that you prefer before providing it to `ngRepeat`. You could
@@ -37050,11 +36336,6 @@ var ngHideDirective = ['$animate', function($animate) {
* @description
* The `ngStyle` directive allows you to set CSS style on an HTML element conditionally.
*
- * @knownIssue
- * You should not use {@link guide/interpolation interpolation} in the value of the `style`
- * attribute, when using the `ngStyle` directive on the same element.
- * See {@link guide/interpolation#known-issues here} for more info.
- *
* @element ANY
* @param {expression} ngStyle
*
@@ -37466,63 +36747,37 @@ var ngSwitchDefaultDirective = ngDirective({
*
*/
var ngTranscludeMinErr = minErr('ngTransclude');
-var ngTranscludeDirective = ['$compile', function($compile) {
- return {
- restrict: 'EAC',
- terminal: true,
- compile: function ngTranscludeCompile(tElement) {
+var ngTranscludeDirective = ngDirective({
+ restrict: 'EAC',
+ link: function($scope, $element, $attrs, controller, $transclude) {
- // Remove and cache any original content to act as a fallback
- var fallbackLinkFn = $compile(tElement.contents());
- tElement.empty();
-
- return function ngTranscludePostLink($scope, $element, $attrs, controller, $transclude) {
-
- if (!$transclude) {
- throw ngTranscludeMinErr('orphan',
- 'Illegal use of ngTransclude directive in the template! ' +
- 'No parent directive that requires a transclusion found. ' +
- 'Element: {0}',
- startingTag($element));
- }
-
-
- // If the attribute is of the form: `ng-transclude="ng-transclude"` then treat it like the default
- if ($attrs.ngTransclude === $attrs.$attr.ngTransclude) {
- $attrs.ngTransclude = '';
- }
- var slotName = $attrs.ngTransclude || $attrs.ngTranscludeSlot;
-
- // If the slot is required and no transclusion content is provided then this call will throw an error
- $transclude(ngTranscludeCloneAttachFn, null, slotName);
-
- // If the slot is optional and no transclusion content is provided then use the fallback content
- if (slotName && !$transclude.isSlotFilled(slotName)) {
- useFallbackContent();
- }
+ if ($attrs.ngTransclude === $attrs.$attr.ngTransclude) {
+ // If the attribute is of the form: `ng-transclude="ng-transclude"`
+ // then treat it like the default
+ $attrs.ngTransclude = '';
+ }
- function ngTranscludeCloneAttachFn(clone, transcludedScope) {
- if (clone.length) {
- $element.append(clone);
- } else {
- useFallbackContent();
- // There is nothing linked against the transcluded scope since no content was available,
- // so it should be safe to clean up the generated scope.
- transcludedScope.$destroy();
- }
- }
+ function ngTranscludeCloneAttachFn(clone) {
+ if (clone.length) {
+ $element.empty();
+ $element.append(clone);
+ }
+ }
- function useFallbackContent() {
- // Since this is the fallback content rather than the transcluded content,
- // we link against the scope of this directive rather than the transcluded scope
- fallbackLinkFn($scope, function(clone) {
- $element.append(clone);
- });
- }
- };
+ if (!$transclude) {
+ throw ngTranscludeMinErr('orphan',
+ 'Illegal use of ngTransclude directive in the template! ' +
+ 'No parent directive that requires a transclusion found. ' +
+ 'Element: {0}',
+ startingTag($element));
}
- };
-}];
+
+ // If there is no slot name defined or the slot name is not optional
+ // then transclude the slot
+ var slotName = $attrs.ngTransclude || $attrs.ngTranscludeSlot;
+ $transclude(ngTranscludeCloneAttachFn, null, slotName);
+ }
+});
/**
* @ngdoc directive
@@ -38655,7 +37910,7 @@ Entity.prototype.encode = function encode(data, enc, /* internal */ reporter) {
return this._getEncoder(enc).encode(data, reporter);
};
-},{"../asn1":41,"inherits":434,"vm":490}],43:[function(require,module,exports){
+},{"../asn1":41,"inherits":435,"vm":491}],43:[function(require,module,exports){
var inherits = require('inherits');
var Reporter = require('../base').Reporter;
var Buffer = require('buffer').Buffer;
@@ -38773,7 +38028,7 @@ EncoderBuffer.prototype.join = function join(out, offset) {
return out;
};
-},{"../base":44,"buffer":90,"inherits":434}],44:[function(require,module,exports){
+},{"../base":44,"buffer":90,"inherits":435}],44:[function(require,module,exports){
var base = exports;
base.Reporter = require('./reporter').Reporter;
@@ -38847,7 +38102,7 @@ module.exports = Node;
var stateProps = [
'enc', 'parent', 'children', 'tag', 'args', 'reverseArgs', 'choice',
'optional', 'any', 'obj', 'use', 'alteredUse', 'key', 'default', 'explicit',
- 'implicit', 'contains'
+ 'implicit'
];
Node.prototype.clone = function clone() {
@@ -39052,17 +38307,17 @@ Node.prototype.contains = function contains(item) {
// Decoding
//
-Node.prototype._decode = function decode(input, options) {
+Node.prototype._decode = function decode(input) {
var state = this._baseState;
// Decode root node
if (state.parent === null)
- return input.wrapResult(state.children[0]._decode(input, options));
+ return input.wrapResult(state.children[0]._decode(input));
var result = state['default'];
var present = true;
- var prevKey = null;
+ var prevKey;
if (state.key !== null)
prevKey = input.enterKey(state.key);
@@ -39081,9 +38336,9 @@ Node.prototype._decode = function decode(input, options) {
var save = input.save();
try {
if (state.choice === null)
- this._decodeGeneric(state.tag, input, options);
+ this._decodeGeneric(state.tag, input);
else
- this._decodeChoice(input, options);
+ this._decodeChoice(input);
present = true;
} catch (e) {
present = false;
@@ -39111,8 +38366,6 @@ Node.prototype._decode = function decode(input, options) {
input = explicit;
}
- var start = input.offset;
-
// Unwrap implicit and normal values
if (state.use === null && state.choice === null) {
if (state.any)
@@ -39131,19 +38384,13 @@ Node.prototype._decode = function decode(input, options) {
input = body;
}
- if (options && options.track && state.tag !== null)
- options.track(input.path(), start, input.length, 'tagged');
-
- if (options && options.track && state.tag !== null)
- options.track(input.path(), input.offset, input.length, 'content');
-
// Select proper method for tag
if (state.any)
result = result;
else if (state.choice === null)
- result = this._decodeGeneric(state.tag, input, options);
+ result = this._decodeGeneric(state.tag, input);
else
- result = this._decodeChoice(input, options);
+ result = this._decodeChoice(input);
if (input.isError(result))
return result;
@@ -39153,15 +38400,14 @@ Node.prototype._decode = function decode(input, options) {
state.children.forEach(function decodeChildren(child) {
// NOTE: We are ignoring errors here, to let parser continue with other
// parts of encoded data
- child._decode(input, options);
+ child._decode(input);
});
}
// Decode contained/encoded by schema, only in bit or octet strings
if (state.contains && (state.tag === 'octstr' || state.tag === 'bitstr')) {
var data = new DecoderBuffer(result);
- result = this._getUse(state.contains, input._reporterState.obj)
- ._decode(data, options);
+ result = this._getUse(state.contains, input._reporterState.obj)._decode(data);
}
}
@@ -39172,40 +38418,35 @@ Node.prototype._decode = function decode(input, options) {
// Set key
if (state.key !== null && (result !== null || present === true))
input.leaveKey(prevKey, state.key, result);
- else if (prevKey !== null)
- input.exitKey(prevKey);
return result;
};
-Node.prototype._decodeGeneric = function decodeGeneric(tag, input, options) {
+Node.prototype._decodeGeneric = function decodeGeneric(tag, input) {
var state = this._baseState;
if (tag === 'seq' || tag === 'set')
return null;
if (tag === 'seqof' || tag === 'setof')
- return this._decodeList(input, tag, state.args[0], options);
+ return this._decodeList(input, tag, state.args[0]);
else if (/str$/.test(tag))
- return this._decodeStr(input, tag, options);
+ return this._decodeStr(input, tag);
else if (tag === 'objid' && state.args)
- return this._decodeObjid(input, state.args[0], state.args[1], options);
+ return this._decodeObjid(input, state.args[0], state.args[1]);
else if (tag === 'objid')
- return this._decodeObjid(input, null, null, options);
+ return this._decodeObjid(input, null, null);
else if (tag === 'gentime' || tag === 'utctime')
- return this._decodeTime(input, tag, options);
+ return this._decodeTime(input, tag);
else if (tag === 'null_')
- return this._decodeNull(input, options);
+ return this._decodeNull(input);
else if (tag === 'bool')
- return this._decodeBool(input, options);
+ return this._decodeBool(input);
else if (tag === 'int' || tag === 'enum')
- return this._decodeInt(input, state.args && state.args[0], options);
-
- if (state.use !== null) {
- return this._getUse(state.use, input._reporterState.obj)
- ._decode(input, options);
- } else {
+ return this._decodeInt(input, state.args && state.args[0]);
+ else if (state.use !== null)
+ return this._getUse(state.use, input._reporterState.obj)._decode(input);
+ else
return input.error('unknown tag: ' + tag);
- }
};
Node.prototype._getUse = function _getUse(entity, obj) {
@@ -39222,7 +38463,7 @@ Node.prototype._getUse = function _getUse(entity, obj) {
return state.useDecoder;
};
-Node.prototype._decodeChoice = function decodeChoice(input, options) {
+Node.prototype._decodeChoice = function decodeChoice(input) {
var state = this._baseState;
var result = null;
var match = false;
@@ -39231,7 +38472,7 @@ Node.prototype._decodeChoice = function decodeChoice(input, options) {
var save = input.save();
var node = state.choice[key];
try {
- var value = node._decode(input, options);
+ var value = node._decode(input);
if (input.isError(value))
return false;
@@ -39412,7 +38653,7 @@ Node.prototype._isPrintstr = function isPrintstr(str) {
return /^[A-Za-z0-9 '\(\)\+,\-\.\/:=\?]*$/.test(str);
};
-},{"../base":44,"minimalistic-assert":441}],46:[function(require,module,exports){
+},{"../base":44,"minimalistic-assert":442}],46:[function(require,module,exports){
var inherits = require('inherits');
function Reporter(options) {
@@ -39446,24 +38687,14 @@ Reporter.prototype.enterKey = function enterKey(key) {
return this._reporterState.path.push(key);
};
-Reporter.prototype.exitKey = function exitKey(index) {
- var state = this._reporterState;
-
- state.path = state.path.slice(0, index - 1);
-};
-
Reporter.prototype.leaveKey = function leaveKey(index, key, value) {
var state = this._reporterState;
- this.exitKey(index);
+ state.path = state.path.slice(0, index - 1);
if (state.obj !== null)
state.obj[key] = value;
};
-Reporter.prototype.path = function path() {
- return this._reporterState.path.join('/');
-};
-
Reporter.prototype.enterObject = function enterObject() {
var state = this._reporterState;
@@ -39535,7 +38766,7 @@ ReporterError.prototype.rethrow = function rethrow(msg) {
return this;
};
-},{"inherits":434}],47:[function(require,module,exports){
+},{"inherits":435}],47:[function(require,module,exports){
var constants = require('../constants');
exports.tagClass = {
@@ -39711,15 +38942,14 @@ DERNode.prototype._skipUntilEnd = function skipUntilEnd(buffer, fail) {
}
};
-DERNode.prototype._decodeList = function decodeList(buffer, tag, decoder,
- options) {
+DERNode.prototype._decodeList = function decodeList(buffer, tag, decoder) {
var result = [];
while (!buffer.isEmpty()) {
var possibleEnd = this._peekTag(buffer, 'end');
if (buffer.isError(possibleEnd))
return possibleEnd;
- var res = decoder.decode(buffer, 'der', options);
+ var res = decoder.decode(buffer, 'der');
if (buffer.isError(res) && possibleEnd)
break;
result.push(res);
@@ -39924,7 +39154,7 @@ function derDecodeLen(buf, primitive, fail) {
return len;
}
-},{"../../asn1":41,"inherits":434}],50:[function(require,module,exports){
+},{"../../asn1":41,"inherits":435}],50:[function(require,module,exports){
var decoders = exports;
decoders.der = require('./der');
@@ -39981,7 +39211,7 @@ PEMDecoder.prototype.decode = function decode(data, options) {
return DERDecoder.prototype.decode.call(this, input, options);
};
-},{"./der":49,"buffer":90,"inherits":434}],52:[function(require,module,exports){
+},{"./der":49,"buffer":90,"inherits":435}],52:[function(require,module,exports){
var inherits = require('inherits');
var Buffer = require('buffer').Buffer;
@@ -40276,7 +39506,7 @@ function encodeTag(tag, primitive, cls, reporter) {
return res;
}
-},{"../../asn1":41,"buffer":90,"inherits":434}],53:[function(require,module,exports){
+},{"../../asn1":41,"buffer":90,"inherits":435}],53:[function(require,module,exports){
var encoders = exports;
encoders.der = require('./der');
@@ -40305,7 +39535,7 @@ PEMEncoder.prototype.encode = function encode(data, options) {
return out.join('\n');
};
-},{"./der":52,"inherits":434}],55:[function(require,module,exports){
+},{"./der":52,"inherits":435}],55:[function(require,module,exports){
// http://wiki.commonjs.org/wiki/Unit_Testing/1.0
//
// THIS IS NOT TESTED NOR LIKELY TO WORK OUTSIDE V8!
@@ -40666,7 +39896,7 @@ var objectKeys = Object.keys || function (obj) {
return keys;
};
-},{"util/":487}],56:[function(require,module,exports){
+},{"util/":488}],56:[function(require,module,exports){
(function (global){
"use strict";
@@ -40701,7 +39931,7 @@ define(String.prototype, "padRight", "".padEnd);
[][key] && define(Array, key, Function.call.bind([][key]));
});
}).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {})
-},{"core-js/fn/regexp/escape":92,"core-js/shim":385,"regenerator-runtime/runtime":466}],57:[function(require,module,exports){
+},{"core-js/fn/regexp/escape":92,"core-js/shim":386,"regenerator-runtime/runtime":467}],57:[function(require,module,exports){
'use strict'
exports.toByteArray = toByteArray
@@ -40813,13 +40043,13 @@ function fromByteArray (uint8) {
}
},{}],58:[function(require,module,exports){
-/*! bignumber.js v2.4.0 https://github.com/MikeMcl/bignumber.js/LICENCE */
+/*! bignumber.js v2.3.0 https://github.com/MikeMcl/bignumber.js/LICENCE */
;(function (globalObj) {
'use strict';
/*
- bignumber.js v2.4.0
+ bignumber.js v2.3.0
A JavaScript library for arbitrary-precision arithmetic.
https://github.com/MikeMcl/bignumber.js
Copyright (c) 2016 Michael Mclaughlin
@@ -40827,7 +40057,7 @@ function fromByteArray (uint8) {
*/
- var BigNumber, cryptoObj, parseNumeric,
+ var cryptoObj, parseNumeric,
isNumeric = /^-?(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,
mathceil = Math.ceil,
mathfloor = Math.floor,
@@ -43529,17 +42759,13 @@ function fromByteArray (uint8) {
// EXPORT
- BigNumber = constructorFactory();
- BigNumber.default = BigNumber.BigNumber = BigNumber;
-
-
- // AMD.
+ // AMD.
if ( typeof define == 'function' && define.amd ) {
- define( function () { return BigNumber; } );
+ define( function () { return constructorFactory(); } );
// Node.js and other environments that support module.exports.
} else if ( typeof module != 'undefined' && module.exports ) {
- module.exports = BigNumber;
+ module.exports = constructorFactory();
// Split string stops browserify adding crypto shim.
if ( !cryptoObj ) try { cryptoObj = require('cry' + 'pto'); } catch (e) {}
@@ -43547,7 +42773,7 @@ function fromByteArray (uint8) {
// Browser.
} else {
if ( !globalObj ) globalObj = typeof self != 'undefined' ? self : Function('return this')();
- globalObj.BigNumber = BigNumber;
+ globalObj.BigNumber = constructorFactory();
}
})(this);
@@ -43724,12 +42950,8 @@ module.exports = {
}
BN.isBN = function isBN (num) {
- if (num instanceof BN) {
- return true;
- }
-
return num !== null && typeof num === 'object' &&
- num.constructor.wordSize === BN.wordSize && Array.isArray(num.words);
+ num.constructor.name === 'BN' && Array.isArray(num.words);
};
BN.max = function max (left, right) {
@@ -45770,10 +44992,6 @@ module.exports = {
assert(this.negative === 0, 'imaskn works only with positive numbers');
- if (this.length <= s) {
- return this;
- }
-
if (r !== 0) {
s++;
}
@@ -47438,7 +46656,7 @@ function xorTest (a, b) {
}
}).call(this,require("buffer").Buffer)
-},{"./aes":63,"./ghash":68,"buffer":90,"buffer-xor":89,"cipher-base":91,"inherits":434}],65:[function(require,module,exports){
+},{"./aes":63,"./ghash":68,"buffer":90,"buffer-xor":89,"cipher-base":91,"inherits":435}],65:[function(require,module,exports){
var ciphers = require('./encrypter')
exports.createCipher = exports.Cipher = ciphers.createCipher
exports.createCipheriv = exports.Cipheriv = ciphers.createCipheriv
@@ -47592,7 +46810,7 @@ exports.createDecipher = createDecipher
exports.createDecipheriv = createDecipheriv
}).call(this,require("buffer").Buffer)
-},{"./aes":63,"./authCipher":64,"./modes":69,"./modes/cbc":70,"./modes/cfb":71,"./modes/cfb1":72,"./modes/cfb8":73,"./modes/ctr":74,"./modes/ecb":75,"./modes/ofb":76,"./streamCipher":77,"buffer":90,"cipher-base":91,"evp_bytestokey":425,"inherits":434}],67:[function(require,module,exports){
+},{"./aes":63,"./authCipher":64,"./modes":69,"./modes/cbc":70,"./modes/cfb":71,"./modes/cfb1":72,"./modes/cfb8":73,"./modes/ctr":74,"./modes/ecb":75,"./modes/ofb":76,"./streamCipher":77,"buffer":90,"cipher-base":91,"evp_bytestokey":426,"inherits":435}],67:[function(require,module,exports){
(function (Buffer){
var aes = require('./aes')
var Transform = require('cipher-base')
@@ -47718,7 +46936,7 @@ exports.createCipheriv = createCipheriv
exports.createCipher = createCipher
}).call(this,require("buffer").Buffer)
-},{"./aes":63,"./authCipher":64,"./modes":69,"./modes/cbc":70,"./modes/cfb":71,"./modes/cfb1":72,"./modes/cfb8":73,"./modes/ctr":74,"./modes/ecb":75,"./modes/ofb":76,"./streamCipher":77,"buffer":90,"cipher-base":91,"evp_bytestokey":425,"inherits":434}],68:[function(require,module,exports){
+},{"./aes":63,"./authCipher":64,"./modes":69,"./modes/cbc":70,"./modes/cfb":71,"./modes/cfb1":72,"./modes/cfb8":73,"./modes/ctr":74,"./modes/ecb":75,"./modes/ofb":76,"./streamCipher":77,"buffer":90,"cipher-base":91,"evp_bytestokey":426,"inherits":435}],68:[function(require,module,exports){
(function (Buffer){
var zeros = new Buffer(16)
zeros.fill(0)
@@ -48196,7 +47414,7 @@ StreamCipher.prototype._final = function () {
}
}).call(this,require("buffer").Buffer)
-},{"./aes":63,"buffer":90,"cipher-base":91,"inherits":434}],78:[function(require,module,exports){
+},{"./aes":63,"buffer":90,"cipher-base":91,"inherits":435}],78:[function(require,module,exports){
var ebtk = require('evp_bytestokey')
var aes = require('browserify-aes/browser')
var DES = require('browserify-des')
@@ -48271,7 +47489,7 @@ function getCiphers () {
}
exports.listCiphers = exports.getCiphers = getCiphers
-},{"browserify-aes/browser":65,"browserify-aes/modes":69,"browserify-des":79,"browserify-des/modes":80,"evp_bytestokey":425}],79:[function(require,module,exports){
+},{"browserify-aes/browser":65,"browserify-aes/modes":69,"browserify-des":79,"browserify-des/modes":80,"evp_bytestokey":426}],79:[function(require,module,exports){
(function (Buffer){
var CipherBase = require('cipher-base')
var des = require('des.js')
@@ -48318,7 +47536,7 @@ DES.prototype._final = function () {
}
}).call(this,require("buffer").Buffer)
-},{"buffer":90,"cipher-base":91,"des.js":393,"inherits":434}],80:[function(require,module,exports){
+},{"buffer":90,"cipher-base":91,"des.js":394,"inherits":435}],80:[function(require,module,exports){
exports['des-ecb'] = {
key: 8,
iv: 0
@@ -48388,7 +47606,7 @@ function getr(priv) {
}
}).call(this,require("buffer").Buffer)
-},{"bn.js":60,"buffer":90,"randombytes":455}],82:[function(require,module,exports){
+},{"bn.js":60,"buffer":90,"randombytes":456}],82:[function(require,module,exports){
(function (Buffer){
const Sha3 = require('js-sha3')
@@ -48426,7 +47644,7 @@ module.exports = {
}
}).call(this,require("buffer").Buffer)
-},{"buffer":90,"js-sha3":437}],83:[function(require,module,exports){
+},{"buffer":90,"js-sha3":438}],83:[function(require,module,exports){
(function (Buffer){
'use strict'
exports['RSA-SHA224'] = exports.sha224WithRSAEncryption = {
@@ -48609,7 +47827,7 @@ module.exports = {
}
}).call(this,require("buffer").Buffer)
-},{"./algos":83,"./sign":86,"./verify":87,"buffer":90,"create-hash":388,"inherits":434,"stream":483}],85:[function(require,module,exports){
+},{"./algos":83,"./sign":86,"./verify":87,"buffer":90,"create-hash":389,"inherits":435,"stream":484}],85:[function(require,module,exports){
'use strict'
exports['1.3.132.0.10'] = 'secp256k1'
@@ -48812,7 +48030,7 @@ module.exports.getKey = getKey
module.exports.makeKey = makeKey
}).call(this,require("buffer").Buffer)
-},{"./curves":85,"bn.js":60,"browserify-rsa":81,"buffer":90,"create-hmac":391,"elliptic":403,"parse-asn1":445}],87:[function(require,module,exports){
+},{"./curves":85,"bn.js":60,"browserify-rsa":81,"buffer":90,"create-hmac":392,"elliptic":404,"parse-asn1":446}],87:[function(require,module,exports){
(function (Buffer){
// much of this based on https://github.com/indutny/self-signed/blob/gh-pages/lib/rsa.js
var curves = require('./curves')
@@ -48919,7 +48137,7 @@ function checkValue (b, q) {
module.exports = verify
}).call(this,require("buffer").Buffer)
-},{"./curves":85,"bn.js":60,"buffer":90,"elliptic":403,"parse-asn1":445}],88:[function(require,module,exports){
+},{"./curves":85,"bn.js":60,"buffer":90,"elliptic":404,"parse-asn1":446}],88:[function(require,module,exports){
(function (global){
'use strict';
@@ -49101,7 +48319,7 @@ exports.kMaxLength = kMaxLength()
function typedArraySupport () {
try {
var arr = new Uint8Array(1)
- arr.__proto__ = {__proto__: Uint8Array.prototype, foo: function () { return 42 }}
+ arr.foo = function () { return 42 }
return arr.foo() === 42 && // typed array instances can be augmented
typeof arr.subarray === 'function' && // chrome 9-10 lack `subarray`
arr.subarray(1, 1).byteLength === 0 // ie10 has broken `subarray`
@@ -49245,7 +48463,7 @@ function allocUnsafe (that, size) {
assertSize(size)
that = createBuffer(that, size < 0 ? 0 : checked(size) | 0)
if (!Buffer.TYPED_ARRAY_SUPPORT) {
- for (var i = 0; i < size; ++i) {
+ for (var i = 0; i < size; i++) {
that[i] = 0
}
}
@@ -49301,9 +48519,7 @@ function fromArrayBuffer (that, array, byteOffset, length) {
throw new RangeError('\'length\' is out of bounds')
}
- if (byteOffset === undefined && length === undefined) {
- array = new Uint8Array(array)
- } else if (length === undefined) {
+ if (length === undefined) {
array = new Uint8Array(array, byteOffset)
} else {
array = new Uint8Array(array, byteOffset, length)
@@ -49425,14 +48641,14 @@ Buffer.concat = function concat (list, length) {
var i
if (length === undefined) {
length = 0
- for (i = 0; i < list.length; ++i) {
+ for (i = 0; i < list.length; i++) {
length += list[i].length
}
}
var buffer = Buffer.allocUnsafe(length)
var pos = 0
- for (i = 0; i < list.length; ++i) {
+ for (i = 0; i < list.length; i++) {
var buf = list[i]
if (!Buffer.isBuffer(buf)) {
throw new TypeError('"list" argument must be an Array of Buffers')
@@ -49464,6 +48680,7 @@ function byteLength (string, encoding) {
switch (encoding) {
case 'ascii':
case 'binary':
+ // Deprecated
case 'raw':
case 'raws':
return len
@@ -49701,16 +48918,15 @@ function arrayIndexOf (arr, val, byteOffset, encoding) {
}
var foundIndex = -1
- for (var i = byteOffset; i < arrLength; ++i) {
- if (read(arr, i) === read(val, foundIndex === -1 ? 0 : i - foundIndex)) {
+ for (var i = 0; byteOffset + i < arrLength; i++) {
+ if (read(arr, byteOffset + i) === read(val, foundIndex === -1 ? 0 : i - foundIndex)) {
if (foundIndex === -1) foundIndex = i
- if (i - foundIndex + 1 === valLength) return foundIndex * indexSize
+ if (i - foundIndex + 1 === valLength) return (byteOffset + foundIndex) * indexSize
} else {
if (foundIndex !== -1) i -= i - foundIndex
foundIndex = -1
}
}
-
return -1
}
@@ -49775,7 +48991,7 @@ function hexWrite (buf, string, offset, length) {
if (length > strLen / 2) {
length = strLen / 2
}
- for (var i = 0; i < length; ++i) {
+ for (var i = 0; i < length; i++) {
var parsed = parseInt(string.substr(i * 2, 2), 16)
if (isNaN(parsed)) return i
buf[offset + i] = parsed
@@ -49989,7 +49205,7 @@ function asciiSlice (buf, start, end) {
var ret = ''
end = Math.min(buf.length, end)
- for (var i = start; i < end; ++i) {
+ for (var i = start; i < end; i++) {
ret += String.fromCharCode(buf[i] & 0x7F)
}
return ret
@@ -49999,7 +49215,7 @@ function binarySlice (buf, start, end) {
var ret = ''
end = Math.min(buf.length, end)
- for (var i = start; i < end; ++i) {
+ for (var i = start; i < end; i++) {
ret += String.fromCharCode(buf[i])
}
return ret
@@ -50012,7 +49228,7 @@ function hexSlice (buf, start, end) {
if (!end || end < 0 || end > len) end = len
var out = ''
- for (var i = start; i < end; ++i) {
+ for (var i = start; i < end; i++) {
out += toHex(buf[i])
}
return out
@@ -50055,7 +49271,7 @@ Buffer.prototype.slice = function slice (start, end) {
} else {
var sliceLen = end - start
newBuf = new Buffer(sliceLen, undefined)
- for (var i = 0; i < sliceLen; ++i) {
+ for (var i = 0; i < sliceLen; i++) {
newBuf[i] = this[i + start]
}
}
@@ -50282,7 +49498,7 @@ Buffer.prototype.writeUInt8 = function writeUInt8 (value, offset, noAssert) {
function objectWriteUInt16 (buf, value, offset, littleEndian) {
if (value < 0) value = 0xffff + value + 1
- for (var i = 0, j = Math.min(buf.length - offset, 2); i < j; ++i) {
+ for (var i = 0, j = Math.min(buf.length - offset, 2); i < j; i++) {
buf[offset + i] = (value & (0xff << (8 * (littleEndian ? i : 1 - i)))) >>>
(littleEndian ? i : 1 - i) * 8
}
@@ -50316,7 +49532,7 @@ Buffer.prototype.writeUInt16BE = function writeUInt16BE (value, offset, noAssert
function objectWriteUInt32 (buf, value, offset, littleEndian) {
if (value < 0) value = 0xffffffff + value + 1
- for (var i = 0, j = Math.min(buf.length - offset, 4); i < j; ++i) {
+ for (var i = 0, j = Math.min(buf.length - offset, 4); i < j; i++) {
buf[offset + i] = (value >>> (littleEndian ? i : 3 - i) * 8) & 0xff
}
}
@@ -50531,12 +49747,12 @@ Buffer.prototype.copy = function copy (target, targetStart, start, end) {
if (this === target && start < targetStart && targetStart < end) {
// descending copy from end
- for (i = len - 1; i >= 0; --i) {
+ for (i = len - 1; i >= 0; i--) {
target[i + targetStart] = this[i + start]
}
} else if (len < 1000 || !Buffer.TYPED_ARRAY_SUPPORT) {
// ascending copy from start
- for (i = 0; i < len; ++i) {
+ for (i = 0; i < len; i++) {
target[i + targetStart] = this[i + start]
}
} else {
@@ -50597,7 +49813,7 @@ Buffer.prototype.fill = function fill (val, start, end, encoding) {
var i
if (typeof val === 'number') {
- for (i = start; i < end; ++i) {
+ for (i = start; i < end; i++) {
this[i] = val
}
} else {
@@ -50605,7 +49821,7 @@ Buffer.prototype.fill = function fill (val, start, end, encoding) {
? val
: utf8ToBytes(new Buffer(val, encoding).toString())
var len = bytes.length
- for (i = 0; i < end - start; ++i) {
+ for (i = 0; i < end - start; i++) {
this[i + start] = bytes[i % len]
}
}
@@ -50647,7 +49863,7 @@ function utf8ToBytes (string, units) {
var leadSurrogate = null
var bytes = []
- for (var i = 0; i < length; ++i) {
+ for (var i = 0; i < length; i++) {
codePoint = string.charCodeAt(i)
// is surrogate component
@@ -50722,7 +49938,7 @@ function utf8ToBytes (string, units) {
function asciiToBytes (str) {
var byteArray = []
- for (var i = 0; i < str.length; ++i) {
+ 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)
}
@@ -50732,7 +49948,7 @@ function asciiToBytes (str) {
function utf16leToBytes (str, units) {
var c, hi, lo
var byteArray = []
- for (var i = 0; i < str.length; ++i) {
+ for (var i = 0; i < str.length; i++) {
if ((units -= 2) < 0) break
c = str.charCodeAt(i)
@@ -50750,7 +49966,7 @@ function base64ToBytes (str) {
}
function blitBuffer (src, dst, offset, length) {
- for (var i = 0; i < length; ++i) {
+ for (var i = 0; i < length; i++) {
if ((i + offset >= dst.length) || (i >= src.length)) break
dst[i + offset] = src[i]
}
@@ -50762,7 +49978,7 @@ function isnan (val) {
}
}).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {})
-},{"base64-js":57,"ieee754":432,"isarray":436}],91:[function(require,module,exports){
+},{"base64-js":57,"ieee754":433,"isarray":437}],91:[function(require,module,exports){
(function (Buffer){
var Transform = require('stream').Transform
var inherits = require('inherits')
@@ -50856,19 +50072,19 @@ CipherBase.prototype._toString = function (value, enc, final) {
}
}).call(this,require("buffer").Buffer)
-},{"buffer":90,"inherits":434,"stream":483,"string_decoder":484}],92:[function(require,module,exports){
+},{"buffer":90,"inherits":435,"stream":484,"string_decoder":485}],92:[function(require,module,exports){
require('../../modules/core.regexp.escape');
module.exports = require('../../modules/_core').RegExp.escape;
-},{"../../modules/_core":113,"../../modules/core.regexp.escape":209}],93:[function(require,module,exports){
+},{"../../modules/_core":113,"../../modules/core.regexp.escape":210}],93:[function(require,module,exports){
module.exports = function(it){
if(typeof it != 'function')throw TypeError(it + ' is not a function!');
return it;
};
},{}],94:[function(require,module,exports){
-var cof = require('./_cof');
-module.exports = function(it, msg){
- if(typeof it != 'number' && cof(it) != 'Number')throw TypeError(msg);
- return +it;
+var cof = require('./_cof');
+module.exports = function(it, msg){
+ if(typeof it != 'number' && cof(it) != 'Number')throw TypeError(msg);
+ return +it;
};
},{"./_cof":108}],95:[function(require,module,exports){
// 22.1.3.31 Array.prototype[@@unscopables]
@@ -51010,50 +50226,50 @@ module.exports = function(TYPE, $create){
};
};
},{"./_array-species-create":105,"./_ctx":115,"./_iobject":135,"./_to-length":198,"./_to-object":199}],103:[function(require,module,exports){
-var 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;
+var 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;
};
},{"./_a-function":93,"./_iobject":135,"./_to-length":198,"./_to-object":199}],104:[function(require,module,exports){
-var 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;
+var 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;
};
},{"./_is-array":137,"./_is-object":139,"./_wks":207}],105:[function(require,module,exports){
// 9.4.2.3 ArraySpeciesCreate(originalArray, length)
@@ -51121,6 +50337,7 @@ module.exports = function(it){
'use strict';
var dP = require('./_object-dp').f
, create = require('./_object-create')
+ , hide = require('./_hide')
, redefineAll = require('./_redefine-all')
, ctx = require('./_ctx')
, anInstance = require('./_an-instance')
@@ -51260,7 +50477,7 @@ module.exports = {
setSpecies(NAME);
}
};
-},{"./_an-instance":96,"./_ctx":115,"./_defined":117,"./_descriptors":118,"./_for-of":127,"./_iter-define":143,"./_iter-step":145,"./_meta":152,"./_object-create":156,"./_object-dp":157,"./_redefine-all":176,"./_set-species":181}],110:[function(require,module,exports){
+},{"./_an-instance":96,"./_ctx":115,"./_defined":117,"./_descriptors":118,"./_for-of":127,"./_hide":130,"./_iter-define":143,"./_iter-step":145,"./_meta":152,"./_object-create":156,"./_object-dp":157,"./_redefine-all":176,"./_set-species":181}],110:[function(require,module,exports){
// https://github.com/DavidBruant/Map-Set.prototype.toJSON
var classof = require('./_classof')
, from = require('./_array-from-iterable');
@@ -51444,13 +50661,13 @@ module.exports = function(NAME, wrapper, methods, common, IS_MAP, IS_WEAK){
var core = module.exports = {version: '2.4.0'};
if(typeof __e == 'number')__e = core; // eslint-disable-line no-undef
},{}],114:[function(require,module,exports){
-'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;
+'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;
};
},{"./_object-dp":157,"./_property-desc":175}],115:[function(require,module,exports){
// optional / simple context binding
@@ -51474,14 +50691,14 @@ module.exports = function(fn, that, length){
};
};
},{"./_a-function":93}],116:[function(require,module,exports){
-'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);
+'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);
};
},{"./_an-object":97,"./_to-primitive":200}],117:[function(require,module,exports){
// 7.2.1 RequireObjectCoercible(argument)
@@ -51503,9 +50720,9 @@ module.exports = function(it){
return is ? document.createElement(it) : {};
};
},{"./_global":128,"./_is-object":139}],120:[function(require,module,exports){
-// IE 8- don't enum bug keys
-module.exports = (
- 'constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf'
+// IE 8- don't enum bug keys
+module.exports = (
+ 'constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf'
).split(',');
},{}],121:[function(require,module,exports){
// all enumerable object keys, includes symbols
@@ -51679,17 +50896,17 @@ module.exports = require('./_descriptors') ? function(object, key, value){
},{"./_descriptors":118,"./_object-dp":157,"./_property-desc":175}],131:[function(require,module,exports){
module.exports = require('./_global').document && document.documentElement;
},{"./_global":128}],132:[function(require,module,exports){
-module.exports = !require('./_descriptors') && !require('./_fails')(function(){
- return Object.defineProperty(require('./_dom-create')('div'), 'a', {get: function(){ return 7; }}).a != 7;
+module.exports = !require('./_descriptors') && !require('./_fails')(function(){
+ return Object.defineProperty(require('./_dom-create')('div'), 'a', {get: function(){ return 7; }}).a != 7;
});
},{"./_descriptors":118,"./_dom-create":119,"./_fails":124}],133:[function(require,module,exports){
-var 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;
+var 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;
};
},{"./_is-object":139,"./_set-proto":180}],134:[function(require,module,exports){
// fast apply, http://jsperf.lnkit.com/fast-apply/5
@@ -52015,7 +51232,7 @@ module.exports = {
key: toMetaKey,
exp: exp
};
-},{"./_export":122,"./_shared":184,"./es6.map":239,"./es6.weak-map":345}],154:[function(require,module,exports){
+},{"./_export":122,"./_shared":184,"./es6.map":240,"./es6.weak-map":346}],154:[function(require,module,exports){
var global = require('./_global')
, macrotask = require('./_task').set
, Observer = global.MutationObserver || global.WebKitMutationObserver
@@ -52119,48 +51336,46 @@ module.exports = !$assign || require('./_fails')(function(){
} return T;
} : $assign;
},{"./_fails":124,"./_iobject":135,"./_object-gops":163,"./_object-keys":166,"./_object-pie":167,"./_to-object":199}],156:[function(require,module,exports){
-// 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);
+// 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
+ , 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(' i)dP.f(O, P = keys[i++], Properties[P]);
- return O;
+var 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;
};
},{"./_an-object":97,"./_descriptors":118,"./_object-dp":157,"./_object-keys":166}],159:[function(require,module,exports){
-// 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];
+// 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];
});
},{"./_fails":124,"./_global":128,"./_library":148}],160:[function(require,module,exports){
-var 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]);
+var 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]);
};
},{"./_descriptors":118,"./_has":129,"./_ie8-dom-define":132,"./_object-pie":167,"./_property-desc":175,"./_to-iobject":197,"./_to-primitive":200}],161:[function(require,module,exports){
// fallback for IE11 buggy Object.getOwnPropertyNames with iframe and window
@@ -52239,54 +51454,54 @@ module.exports.f = function getOwnPropertyNames(it){
};
},{"./_object-gopn":162,"./_to-iobject":197}],162:[function(require,module,exports){
-// 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);
+// 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);
};
},{"./_enum-bug-keys":120,"./_object-keys-internal":165}],163:[function(require,module,exports){
exports.f = Object.getOwnPropertySymbols;
},{}],164:[function(require,module,exports){
-// 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;
+// 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;
};
},{"./_has":129,"./_shared-key":183,"./_to-object":199}],165:[function(require,module,exports){
-var 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;
+var 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;
};
},{"./_array-includes":101,"./_has":129,"./_shared-key":183,"./_to-iobject":197}],166:[function(require,module,exports){
-// 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);
+// 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);
};
},{"./_enum-bug-keys":120,"./_object-keys-internal":165}],167:[function(require,module,exports){
exports.f = {}.propertyIsEnumerable;
@@ -52485,10 +51700,10 @@ module.exports = function(it, tag, stat){
if(it && !has(it = stat ? it : it.prototype, TAG))def(it, TAG, {configurable: true, value: tag});
};
},{"./_has":129,"./_object-dp":157,"./_wks":207}],183:[function(require,module,exports){
-var shared = require('./_shared')('keys')
- , uid = require('./_uid');
-module.exports = function(key){
- return shared[key] || (shared[key] = uid(key));
+var shared = require('./_shared')('keys')
+ , uid = require('./_uid');
+module.exports = function(key){
+ return shared[key] || (shared[key] = uid(key));
};
},{"./_shared":184,"./_uid":204}],184:[function(require,module,exports){
var global = require('./_global')
@@ -52507,12 +51722,12 @@ module.exports = function(O, D){
return C === undefined || (S = anObject(C)[SPECIES]) == undefined ? D : aFunction(S);
};
},{"./_a-function":93,"./_an-object":97,"./_wks":207}],186:[function(require,module,exports){
-var fails = require('./_fails');
-
-module.exports = function(method, arg){
- return !!method && fails(function(){
- arg ? method.call(null, function(){}, 1) : method.call(null);
- });
+var fails = require('./_fails');
+
+module.exports = function(method, arg){
+ return !!method && fails(function(){
+ arg ? method.call(null, function(){}, 1) : method.call(null);
+ });
};
},{"./_fails":124}],187:[function(require,module,exports){
var toInteger = require('./_to-integer')
@@ -52624,7 +51839,7 @@ var trim = exporter.trim = function(string, TYPE){
module.exports = exporter;
},{"./_defined":117,"./_export":122,"./_fails":124,"./_string-ws":193}],193:[function(require,module,exports){
-module.exports = '\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u180E\u2000\u2001\u2002\u2003' +
+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';
},{}],194:[function(require,module,exports){
var ctx = require('./_ctx')
@@ -52764,6 +51979,7 @@ if(require('./_descriptors')){
, propertyDesc = require('./_property-desc')
, hide = require('./_hide')
, redefineAll = require('./_redefine-all')
+ , isInteger = require('./_is-integer')
, toInteger = require('./_to-integer')
, toLength = require('./_to-length')
, toIndex = require('./_to-index')
@@ -52777,6 +51993,7 @@ if(require('./_descriptors')){
, create = require('./_object-create')
, getPrototypeOf = require('./_object-gpo')
, gOPN = require('./_object-gopn').f
+ , isIterable = require('./core.is-iterable')
, getIterFn = require('./core.get-iterator-method')
, uid = require('./_uid')
, wks = require('./_wks')
@@ -53230,7 +52447,7 @@ if(require('./_descriptors')){
if(!LIBRARY && !CORRECT_ITER_NAME)hide(TypedArrayPrototype, ITERATOR, $iterator);
};
} else module.exports = function(){ /* empty */ };
-},{"./_an-instance":96,"./_array-copy-within":98,"./_array-fill":99,"./_array-includes":101,"./_array-methods":102,"./_classof":107,"./_ctx":115,"./_descriptors":118,"./_export":122,"./_fails":124,"./_global":128,"./_has":129,"./_hide":130,"./_is-array-iter":136,"./_is-object":139,"./_iter-detect":144,"./_iterators":146,"./_library":148,"./_object-create":156,"./_object-dp":157,"./_object-gopd":160,"./_object-gopn":162,"./_object-gpo":164,"./_property-desc":175,"./_redefine-all":176,"./_same-value":179,"./_set-species":181,"./_species-constructor":185,"./_to-index":195,"./_to-integer":196,"./_to-length":198,"./_to-object":199,"./_to-primitive":200,"./_typed":203,"./_typed-buffer":202,"./_uid":204,"./_wks":207,"./core.get-iterator-method":208,"./es6.array.iterator":220}],202:[function(require,module,exports){
+},{"./_an-instance":96,"./_array-copy-within":98,"./_array-fill":99,"./_array-includes":101,"./_array-methods":102,"./_classof":107,"./_ctx":115,"./_descriptors":118,"./_export":122,"./_fails":124,"./_global":128,"./_has":129,"./_hide":130,"./_is-array-iter":136,"./_is-integer":138,"./_is-object":139,"./_iter-detect":144,"./_iterators":146,"./_library":148,"./_object-create":156,"./_object-dp":157,"./_object-gopd":160,"./_object-gopn":162,"./_object-gpo":164,"./_property-desc":175,"./_redefine-all":176,"./_same-value":179,"./_set-species":181,"./_species-constructor":185,"./_to-index":195,"./_to-integer":196,"./_to-length":198,"./_to-object":199,"./_to-primitive":200,"./_typed":203,"./_typed-buffer":202,"./_uid":204,"./_wks":207,"./core.get-iterator-method":208,"./core.is-iterable":209,"./es6.array.iterator":221}],202:[function(require,module,exports){
'use strict';
var global = require('./_global')
, DESCRIPTORS = require('./_descriptors')
@@ -53254,11 +52471,13 @@ var global = require('./_global')
, $ArrayBuffer = global[ARRAY_BUFFER]
, $DataView = global[DATA_VIEW]
, Math = global.Math
+ , parseInt = global.parseInt
, RangeError = global.RangeError
, Infinity = global.Infinity
, BaseBuffer = $ArrayBuffer
, abs = Math.abs
, pow = Math.pow
+ , min = Math.min
, floor = Math.floor
, log = Math.log
, LN2 = Math.LN2
@@ -53538,14 +52757,14 @@ module.exports = function(key){
return 'Symbol('.concat(key === undefined ? '' : key, ')_', (++id + px).toString(36));
};
},{}],205:[function(require,module,exports){
-var 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)});
+var 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":113,"./_global":128,"./_library":148,"./_object-dp":157,"./_wks-ext":206}],206:[function(require,module,exports){
exports.f = require('./_wks');
@@ -53571,38 +52790,48 @@ module.exports = require('./_core').getIteratorMethod = function(it){
|| Iterators[classof(it)];
};
},{"./_classof":107,"./_core":113,"./_iterators":146,"./_wks":207}],209:[function(require,module,exports){
+var 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));
+};
+},{"./_classof":107,"./_core":113,"./_iterators":146,"./_wks":207}],210:[function(require,module,exports){
// 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); }});
-},{"./_export":122,"./_replacer":178}],210:[function(require,module,exports){
+},{"./_export":122,"./_replacer":178}],211:[function(require,module,exports){
// 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');
-},{"./_add-to-unscopables":95,"./_array-copy-within":98,"./_export":122}],211:[function(require,module,exports){
-'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]);
- }
+},{"./_add-to-unscopables":95,"./_array-copy-within":98,"./_export":122}],212:[function(require,module,exports){
+'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]);
+ }
});
-},{"./_array-methods":102,"./_export":122,"./_strict-method":186}],212:[function(require,module,exports){
+},{"./_array-methods":102,"./_export":122,"./_strict-method":186}],213:[function(require,module,exports){
// 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');
-},{"./_add-to-unscopables":95,"./_array-fill":99,"./_export":122}],213:[function(require,module,exports){
+},{"./_add-to-unscopables":95,"./_array-fill":99,"./_export":122}],214:[function(require,module,exports){
'use strict';
var $export = require('./_export')
, $filter = require('./_array-methods')(2);
@@ -53613,7 +52842,7 @@ $export($export.P + $export.F * !require('./_strict-method')([].filter, true), '
return $filter(this, callbackfn, arguments[1]);
}
});
-},{"./_array-methods":102,"./_export":122,"./_strict-method":186}],214:[function(require,module,exports){
+},{"./_array-methods":102,"./_export":122,"./_strict-method":186}],215:[function(require,module,exports){
'use strict';
// 22.1.3.9 Array.prototype.findIndex(predicate, thisArg = undefined)
var $export = require('./_export')
@@ -53628,7 +52857,7 @@ $export($export.P + $export.F * forced, 'Array', {
}
});
require('./_add-to-unscopables')(KEY);
-},{"./_add-to-unscopables":95,"./_array-methods":102,"./_export":122}],215:[function(require,module,exports){
+},{"./_add-to-unscopables":95,"./_array-methods":102,"./_export":122}],216:[function(require,module,exports){
'use strict';
// 22.1.3.8 Array.prototype.find(predicate, thisArg = undefined)
var $export = require('./_export')
@@ -53643,19 +52872,19 @@ $export($export.P + $export.F * forced, 'Array', {
}
});
require('./_add-to-unscopables')(KEY);
-},{"./_add-to-unscopables":95,"./_array-methods":102,"./_export":122}],216:[function(require,module,exports){
-'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]);
- }
+},{"./_add-to-unscopables":95,"./_array-methods":102,"./_export":122}],217:[function(require,module,exports){
+'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]);
+ }
});
-},{"./_array-methods":102,"./_export":122,"./_strict-method":186}],217:[function(require,module,exports){
+},{"./_array-methods":102,"./_export":122,"./_strict-method":186}],218:[function(require,module,exports){
'use strict';
var ctx = require('./_ctx')
, $export = require('./_export')
@@ -53694,28 +52923,28 @@ $export($export.S + $export.F * !require('./_iter-detect')(function(iter){ Array
}
});
-},{"./_create-property":114,"./_ctx":115,"./_export":122,"./_is-array-iter":136,"./_iter-call":141,"./_iter-detect":144,"./_to-length":198,"./_to-object":199,"./core.get-iterator-method":208}],218:[function(require,module,exports){
-'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]);
- }
+},{"./_create-property":114,"./_ctx":115,"./_export":122,"./_is-array-iter":136,"./_iter-call":141,"./_iter-detect":144,"./_to-length":198,"./_to-object":199,"./core.get-iterator-method":208}],219:[function(require,module,exports){
+'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]);
+ }
});
-},{"./_array-includes":101,"./_export":122,"./_strict-method":186}],219:[function(require,module,exports){
-// 22.1.2.2 / 15.4.3.2 Array.isArray(arg)
-var $export = require('./_export');
-
+},{"./_array-includes":101,"./_export":122,"./_strict-method":186}],220:[function(require,module,exports){
+// 22.1.2.2 / 15.4.3.2 Array.isArray(arg)
+var $export = require('./_export');
+
$export($export.S, 'Array', {isArray: require('./_is-array')});
-},{"./_export":122,"./_is-array":137}],220:[function(require,module,exports){
+},{"./_export":122,"./_is-array":137}],221:[function(require,module,exports){
'use strict';
var addToUnscopables = require('./_add-to-unscopables')
, step = require('./_iter-step')
@@ -53750,54 +52979,54 @@ Iterators.Arguments = Iterators.Array;
addToUnscopables('keys');
addToUnscopables('values');
addToUnscopables('entries');
-},{"./_add-to-unscopables":95,"./_iter-define":143,"./_iter-step":145,"./_iterators":146,"./_to-iobject":197}],221:[function(require,module,exports){
-'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);
- }
+},{"./_add-to-unscopables":95,"./_iter-define":143,"./_iter-step":145,"./_iterators":146,"./_to-iobject":197}],222:[function(require,module,exports){
+'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);
+ }
});
-},{"./_export":122,"./_iobject":135,"./_strict-method":186,"./_to-iobject":197}],222:[function(require,module,exports){
-'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;
- }
+},{"./_export":122,"./_iobject":135,"./_strict-method":186,"./_to-iobject":197}],223:[function(require,module,exports){
+'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;
+ }
});
-},{"./_export":122,"./_strict-method":186,"./_to-integer":196,"./_to-iobject":197,"./_to-length":198}],223:[function(require,module,exports){
-'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]);
- }
+},{"./_export":122,"./_strict-method":186,"./_to-integer":196,"./_to-iobject":197,"./_to-length":198}],224:[function(require,module,exports){
+'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]);
+ }
});
-},{"./_array-methods":102,"./_export":122,"./_strict-method":186}],224:[function(require,module,exports){
+},{"./_array-methods":102,"./_export":122,"./_strict-method":186}],225:[function(require,module,exports){
'use strict';
var $export = require('./_export')
, createProperty = require('./_create-property');
@@ -53817,129 +53046,129 @@ $export($export.S + $export.F * require('./_fails')(function(){
return result;
}
});
-},{"./_create-property":114,"./_export":122,"./_fails":124}],225:[function(require,module,exports){
-'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);
- }
-});
-},{"./_array-reduce":103,"./_export":122,"./_strict-method":186}],226:[function(require,module,exports){
-'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);
- }
+},{"./_create-property":114,"./_export":122,"./_fails":124}],226:[function(require,module,exports){
+'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);
+ }
});
},{"./_array-reduce":103,"./_export":122,"./_strict-method":186}],227:[function(require,module,exports){
-'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;
- }
+'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);
+ }
});
-},{"./_cof":108,"./_export":122,"./_fails":124,"./_html":131,"./_to-index":195,"./_to-length":198}],228:[function(require,module,exports){
-'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]);
- }
+},{"./_array-reduce":103,"./_export":122,"./_strict-method":186}],228:[function(require,module,exports){
+'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;
+ }
});
-},{"./_array-methods":102,"./_export":122,"./_strict-method":186}],229:[function(require,module,exports){
-'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));
- }
+},{"./_cof":108,"./_export":122,"./_fails":124,"./_html":131,"./_to-index":195,"./_to-length":198}],229:[function(require,module,exports){
+'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]);
+ }
+});
+},{"./_array-methods":102,"./_export":122,"./_strict-method":186}],230:[function(require,module,exports){
+'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));
+ }
});
-},{"./_a-function":93,"./_export":122,"./_fails":124,"./_strict-method":186,"./_to-object":199}],230:[function(require,module,exports){
+},{"./_a-function":93,"./_export":122,"./_fails":124,"./_strict-method":186,"./_to-object":199}],231:[function(require,module,exports){
require('./_set-species')('Array');
-},{"./_set-species":181}],231:[function(require,module,exports){
-// 20.3.3.1 / 15.9.4.4 Date.now()
-var $export = require('./_export');
-
+},{"./_set-species":181}],232:[function(require,module,exports){
+// 20.3.3.1 / 15.9.4.4 Date.now()
+var $export = require('./_export');
+
$export($export.S, 'Date', {now: function(){ return new Date().getTime(); }});
-},{"./_export":122}],232:[function(require,module,exports){
-'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';
- }
+},{"./_export":122}],233:[function(require,module,exports){
+'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';
+ }
});
-},{"./_export":122,"./_fails":124}],233:[function(require,module,exports){
+},{"./_export":122,"./_fails":124}],234:[function(require,module,exports){
'use strict';
var $export = require('./_export')
, toObject = require('./_to-object')
@@ -53954,12 +53183,12 @@ $export($export.P + $export.F * require('./_fails')(function(){
return typeof pv == 'number' && !isFinite(pv) ? null : O.toISOString();
}
});
-},{"./_export":122,"./_fails":124,"./_to-object":199,"./_to-primitive":200}],234:[function(require,module,exports){
-var TO_PRIMITIVE = require('./_wks')('toPrimitive')
- , proto = Date.prototype;
-
+},{"./_export":122,"./_fails":124,"./_to-object":199,"./_to-primitive":200}],235:[function(require,module,exports){
+var TO_PRIMITIVE = require('./_wks')('toPrimitive')
+ , proto = Date.prototype;
+
if(!(TO_PRIMITIVE in proto))require('./_hide')(proto, TO_PRIMITIVE, require('./_date-to-primitive'));
-},{"./_date-to-primitive":116,"./_hide":130,"./_wks":207}],235:[function(require,module,exports){
+},{"./_date-to-primitive":116,"./_hide":130,"./_wks":207}],236:[function(require,module,exports){
var DateProto = Date.prototype
, INVALID_DATE = 'Invalid Date'
, TO_STRING = 'toString'
@@ -53971,12 +53200,12 @@ if(new Date(NaN) + '' != INVALID_DATE){
return value === value ? $toString.call(this) : INVALID_DATE;
});
}
-},{"./_redefine":177}],236:[function(require,module,exports){
-// 19.2.3.2 / 15.3.4.5 Function.prototype.bind(thisArg, args...)
-var $export = require('./_export');
-
+},{"./_redefine":177}],237:[function(require,module,exports){
+// 19.2.3.2 / 15.3.4.5 Function.prototype.bind(thisArg, args...)
+var $export = require('./_export');
+
$export($export.P, 'Function', {bind: require('./_bind')});
-},{"./_bind":106,"./_export":122}],237:[function(require,module,exports){
+},{"./_bind":106,"./_export":122}],238:[function(require,module,exports){
'use strict';
var isObject = require('./_is-object')
, getPrototypeOf = require('./_object-gpo')
@@ -53990,7 +53219,7 @@ if(!(HAS_INSTANCE in FunctionProto))require('./_object-dp').f(FunctionProto, HAS
while(O = getPrototypeOf(O))if(this.prototype === O)return true;
return false;
}});
-},{"./_is-object":139,"./_object-dp":157,"./_object-gpo":164,"./_wks":207}],238:[function(require,module,exports){
+},{"./_is-object":139,"./_object-dp":157,"./_object-gpo":164,"./_wks":207}],239:[function(require,module,exports){
var dP = require('./_object-dp').f
, createDesc = require('./_property-desc')
, has = require('./_has')
@@ -54016,7 +53245,7 @@ NAME in FProto || require('./_descriptors') && dP(FProto, NAME, {
}
}
});
-},{"./_descriptors":118,"./_has":129,"./_object-dp":157,"./_property-desc":175}],239:[function(require,module,exports){
+},{"./_descriptors":118,"./_has":129,"./_object-dp":157,"./_property-desc":175}],240:[function(require,module,exports){
'use strict';
var strong = require('./_collection-strong');
@@ -54034,7 +53263,7 @@ module.exports = require('./_collection')('Map', function(get){
return strong.def(this, key === 0 ? 0 : key, value);
}
}, strong, true);
-},{"./_collection":112,"./_collection-strong":109}],240:[function(require,module,exports){
+},{"./_collection":112,"./_collection-strong":109}],241:[function(require,module,exports){
// 20.2.2.3 Math.acosh(x)
var $export = require('./_export')
, log1p = require('./_math-log1p')
@@ -54053,7 +53282,7 @@ $export($export.S + $export.F * !($acosh
: log1p(x - 1 + sqrt(x - 1) * sqrt(x + 1));
}
});
-},{"./_export":122,"./_math-log1p":150}],241:[function(require,module,exports){
+},{"./_export":122,"./_math-log1p":150}],242:[function(require,module,exports){
// 20.2.2.5 Math.asinh(x)
var $export = require('./_export')
, $asinh = Math.asinh;
@@ -54064,7 +53293,7 @@ function asinh(x){
// Tor Browser bug: Math.asinh(0) -> -0
$export($export.S + $export.F * !($asinh && 1 / $asinh(0) > 0), 'Math', {asinh: asinh});
-},{"./_export":122}],242:[function(require,module,exports){
+},{"./_export":122}],243:[function(require,module,exports){
// 20.2.2.7 Math.atanh(x)
var $export = require('./_export')
, $atanh = Math.atanh;
@@ -54075,7 +53304,7 @@ $export($export.S + $export.F * !($atanh && 1 / $atanh(-0) < 0), 'Math', {
return (x = +x) == 0 ? x : Math.log((1 + x) / (1 - x)) / 2;
}
});
-},{"./_export":122}],243:[function(require,module,exports){
+},{"./_export":122}],244:[function(require,module,exports){
// 20.2.2.9 Math.cbrt(x)
var $export = require('./_export')
, sign = require('./_math-sign');
@@ -54085,7 +53314,7 @@ $export($export.S, 'Math', {
return sign(x = +x) * Math.pow(Math.abs(x), 1 / 3);
}
});
-},{"./_export":122,"./_math-sign":151}],244:[function(require,module,exports){
+},{"./_export":122,"./_math-sign":151}],245:[function(require,module,exports){
// 20.2.2.11 Math.clz32(x)
var $export = require('./_export');
@@ -54094,7 +53323,7 @@ $export($export.S, 'Math', {
return (x >>>= 0) ? 31 - Math.floor(Math.log(x + 0.5) * Math.LOG2E) : 32;
}
});
-},{"./_export":122}],245:[function(require,module,exports){
+},{"./_export":122}],246:[function(require,module,exports){
// 20.2.2.12 Math.cosh(x)
var $export = require('./_export')
, exp = Math.exp;
@@ -54104,13 +53333,13 @@ $export($export.S, 'Math', {
return (exp(x = +x) + exp(-x)) / 2;
}
});
-},{"./_export":122}],246:[function(require,module,exports){
+},{"./_export":122}],247:[function(require,module,exports){
// 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});
-},{"./_export":122,"./_math-expm1":149}],247:[function(require,module,exports){
+},{"./_export":122,"./_math-expm1":149}],248:[function(require,module,exports){
// 20.2.2.16 Math.fround(x)
var $export = require('./_export')
, sign = require('./_math-sign')
@@ -54137,7 +53366,7 @@ $export($export.S, 'Math', {
return $sign * result;
}
});
-},{"./_export":122,"./_math-sign":151}],248:[function(require,module,exports){
+},{"./_export":122,"./_math-sign":151}],249:[function(require,module,exports){
// 20.2.2.17 Math.hypot([value1[, value2[, … ]]])
var $export = require('./_export')
, abs = Math.abs;
@@ -54163,7 +53392,7 @@ $export($export.S, 'Math', {
return larg === Infinity ? Infinity : larg * Math.sqrt(sum);
}
});
-},{"./_export":122}],249:[function(require,module,exports){
+},{"./_export":122}],250:[function(require,module,exports){
// 20.2.2.18 Math.imul(x, y)
var $export = require('./_export')
, $imul = Math.imul;
@@ -54181,7 +53410,7 @@ $export($export.S + $export.F * require('./_fails')(function(){
return 0 | xl * yl + ((UINT16 & xn >>> 16) * yl + xl * (UINT16 & yn >>> 16) << 16 >>> 0);
}
});
-},{"./_export":122,"./_fails":124}],250:[function(require,module,exports){
+},{"./_export":122,"./_fails":124}],251:[function(require,module,exports){
// 20.2.2.21 Math.log10(x)
var $export = require('./_export');
@@ -54190,12 +53419,12 @@ $export($export.S, 'Math', {
return Math.log(x) / Math.LN10;
}
});
-},{"./_export":122}],251:[function(require,module,exports){
+},{"./_export":122}],252:[function(require,module,exports){
// 20.2.2.20 Math.log1p(x)
var $export = require('./_export');
$export($export.S, 'Math', {log1p: require('./_math-log1p')});
-},{"./_export":122,"./_math-log1p":150}],252:[function(require,module,exports){
+},{"./_export":122,"./_math-log1p":150}],253:[function(require,module,exports){
// 20.2.2.22 Math.log2(x)
var $export = require('./_export');
@@ -54204,12 +53433,12 @@ $export($export.S, 'Math', {
return Math.log(x) / Math.LN2;
}
});
-},{"./_export":122}],253:[function(require,module,exports){
+},{"./_export":122}],254:[function(require,module,exports){
// 20.2.2.28 Math.sign(x)
var $export = require('./_export');
$export($export.S, 'Math', {sign: require('./_math-sign')});
-},{"./_export":122,"./_math-sign":151}],254:[function(require,module,exports){
+},{"./_export":122,"./_math-sign":151}],255:[function(require,module,exports){
// 20.2.2.30 Math.sinh(x)
var $export = require('./_export')
, expm1 = require('./_math-expm1')
@@ -54225,7 +53454,7 @@ $export($export.S + $export.F * require('./_fails')(function(){
: (exp(x - 1) - exp(-x - 1)) * (Math.E / 2);
}
});
-},{"./_export":122,"./_fails":124,"./_math-expm1":149}],255:[function(require,module,exports){
+},{"./_export":122,"./_fails":124,"./_math-expm1":149}],256:[function(require,module,exports){
// 20.2.2.33 Math.tanh(x)
var $export = require('./_export')
, expm1 = require('./_math-expm1')
@@ -54238,7 +53467,7 @@ $export($export.S, 'Math', {
return a == Infinity ? 1 : b == Infinity ? -1 : (a - b) / (exp(x) + exp(-x));
}
});
-},{"./_export":122,"./_math-expm1":149}],256:[function(require,module,exports){
+},{"./_export":122,"./_math-expm1":149}],257:[function(require,module,exports){
// 20.2.2.34 Math.trunc(x)
var $export = require('./_export');
@@ -54247,7 +53476,7 @@ $export($export.S, 'Math', {
return (it > 0 ? Math.floor : Math.ceil)(it);
}
});
-},{"./_export":122}],257:[function(require,module,exports){
+},{"./_export":122}],258:[function(require,module,exports){
'use strict';
var global = require('./_global')
, has = require('./_has')
@@ -54317,12 +53546,12 @@ if(!$Number(' 0o1') || !$Number('0b1') || $Number('+0x1')){
proto.constructor = $Number;
require('./_redefine')(global, NUMBER, $Number);
}
-},{"./_cof":108,"./_descriptors":118,"./_fails":124,"./_global":128,"./_has":129,"./_inherit-if-required":133,"./_object-create":156,"./_object-dp":157,"./_object-gopd":160,"./_object-gopn":162,"./_redefine":177,"./_string-trim":192,"./_to-primitive":200}],258:[function(require,module,exports){
+},{"./_cof":108,"./_descriptors":118,"./_fails":124,"./_global":128,"./_has":129,"./_inherit-if-required":133,"./_object-create":156,"./_object-dp":157,"./_object-gopd":160,"./_object-gopn":162,"./_redefine":177,"./_string-trim":192,"./_to-primitive":200}],259:[function(require,module,exports){
// 20.1.2.1 Number.EPSILON
var $export = require('./_export');
$export($export.S, 'Number', {EPSILON: Math.pow(2, -52)});
-},{"./_export":122}],259:[function(require,module,exports){
+},{"./_export":122}],260:[function(require,module,exports){
// 20.1.2.2 Number.isFinite(number)
var $export = require('./_export')
, _isFinite = require('./_global').isFinite;
@@ -54332,12 +53561,12 @@ $export($export.S, 'Number', {
return typeof it == 'number' && _isFinite(it);
}
});
-},{"./_export":122,"./_global":128}],260:[function(require,module,exports){
+},{"./_export":122,"./_global":128}],261:[function(require,module,exports){
// 20.1.2.3 Number.isInteger(number)
var $export = require('./_export');
$export($export.S, 'Number', {isInteger: require('./_is-integer')});
-},{"./_export":122,"./_is-integer":138}],261:[function(require,module,exports){
+},{"./_export":122,"./_is-integer":138}],262:[function(require,module,exports){
// 20.1.2.4 Number.isNaN(number)
var $export = require('./_export');
@@ -54346,7 +53575,7 @@ $export($export.S, 'Number', {
return number != number;
}
});
-},{"./_export":122}],262:[function(require,module,exports){
+},{"./_export":122}],263:[function(require,module,exports){
// 20.1.2.5 Number.isSafeInteger(number)
var $export = require('./_export')
, isInteger = require('./_is-integer')
@@ -54357,177 +53586,178 @@ $export($export.S, 'Number', {
return isInteger(number) && abs(number) <= 0x1fffffffffffff;
}
});
-},{"./_export":122,"./_is-integer":138}],263:[function(require,module,exports){
+},{"./_export":122,"./_is-integer":138}],264:[function(require,module,exports){
// 20.1.2.6 Number.MAX_SAFE_INTEGER
var $export = require('./_export');
$export($export.S, 'Number', {MAX_SAFE_INTEGER: 0x1fffffffffffff});
-},{"./_export":122}],264:[function(require,module,exports){
+},{"./_export":122}],265:[function(require,module,exports){
// 20.1.2.10 Number.MIN_SAFE_INTEGER
var $export = require('./_export');
$export($export.S, 'Number', {MIN_SAFE_INTEGER: -0x1fffffffffffff});
-},{"./_export":122}],265:[function(require,module,exports){
+},{"./_export":122}],266:[function(require,module,exports){
var $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});
-},{"./_export":122,"./_parse-float":171}],266:[function(require,module,exports){
+},{"./_export":122,"./_parse-float":171}],267:[function(require,module,exports){
var $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});
-},{"./_export":122,"./_parse-int":172}],267:[function(require,module,exports){
-'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;
- }
+},{"./_export":122,"./_parse-int":172}],268:[function(require,module,exports){
+'use strict';
+var $export = require('./_export')
+ , anInstance = require('./_an-instance')
+ , 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;
+ }
});
-},{"./_a-number-value":94,"./_export":122,"./_fails":124,"./_string-repeat":191,"./_to-integer":196}],268:[function(require,module,exports){
-'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);
- }
+},{"./_a-number-value":94,"./_an-instance":96,"./_export":122,"./_fails":124,"./_string-repeat":191,"./_to-integer":196}],269:[function(require,module,exports){
+'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);
+ }
});
-},{"./_a-number-value":94,"./_export":122,"./_fails":124}],269:[function(require,module,exports){
+},{"./_a-number-value":94,"./_export":122,"./_fails":124}],270:[function(require,module,exports){
// 19.1.3.1 Object.assign(target, source)
var $export = require('./_export');
$export($export.S + $export.F, 'Object', {assign: require('./_object-assign')});
-},{"./_export":122,"./_object-assign":155}],270:[function(require,module,exports){
-var $export = require('./_export')
-// 19.1.2.2 / 15.2.3.5 Object.create(O [, Properties])
+},{"./_export":122,"./_object-assign":155}],271:[function(require,module,exports){
+var $export = require('./_export')
+// 19.1.2.2 / 15.2.3.5 Object.create(O [, Properties])
$export($export.S, 'Object', {create: require('./_object-create')});
-},{"./_export":122,"./_object-create":156}],271:[function(require,module,exports){
-var $export = require('./_export');
-// 19.1.2.3 / 15.2.3.7 Object.defineProperties(O, Properties)
+},{"./_export":122,"./_object-create":156}],272:[function(require,module,exports){
+var $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')});
-},{"./_descriptors":118,"./_export":122,"./_object-dps":158}],272:[function(require,module,exports){
-var $export = require('./_export');
-// 19.1.2.4 / 15.2.3.6 Object.defineProperty(O, P, Attributes)
+},{"./_descriptors":118,"./_export":122,"./_object-dps":158}],273:[function(require,module,exports){
+var $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});
-},{"./_descriptors":118,"./_export":122,"./_object-dp":157}],273:[function(require,module,exports){
+},{"./_descriptors":118,"./_export":122,"./_object-dp":157}],274:[function(require,module,exports){
// 19.1.2.5 Object.freeze(O)
var isObject = require('./_is-object')
, meta = require('./_meta').onFreeze;
@@ -54537,7 +53767,7 @@ require('./_object-sap')('freeze', function($freeze){
return $freeze && isObject(it) ? $freeze(meta(it)) : it;
};
});
-},{"./_is-object":139,"./_meta":152,"./_object-sap":168}],274:[function(require,module,exports){
+},{"./_is-object":139,"./_meta":152,"./_object-sap":168}],275:[function(require,module,exports){
// 19.1.2.6 Object.getOwnPropertyDescriptor(O, P)
var toIObject = require('./_to-iobject')
, $getOwnPropertyDescriptor = require('./_object-gopd').f;
@@ -54547,12 +53777,12 @@ require('./_object-sap')('getOwnPropertyDescriptor', function(){
return $getOwnPropertyDescriptor(toIObject(it), key);
};
});
-},{"./_object-gopd":160,"./_object-sap":168,"./_to-iobject":197}],275:[function(require,module,exports){
+},{"./_object-gopd":160,"./_object-sap":168,"./_to-iobject":197}],276:[function(require,module,exports){
// 19.1.2.7 Object.getOwnPropertyNames(O)
require('./_object-sap')('getOwnPropertyNames', function(){
return require('./_object-gopn-ext').f;
});
-},{"./_object-gopn-ext":161,"./_object-sap":168}],276:[function(require,module,exports){
+},{"./_object-gopn-ext":161,"./_object-sap":168}],277:[function(require,module,exports){
// 19.1.2.9 Object.getPrototypeOf(O)
var toObject = require('./_to-object')
, $getPrototypeOf = require('./_object-gpo');
@@ -54562,7 +53792,7 @@ require('./_object-sap')('getPrototypeOf', function(){
return $getPrototypeOf(toObject(it));
};
});
-},{"./_object-gpo":164,"./_object-sap":168,"./_to-object":199}],277:[function(require,module,exports){
+},{"./_object-gpo":164,"./_object-sap":168,"./_to-object":199}],278:[function(require,module,exports){
// 19.1.2.11 Object.isExtensible(O)
var isObject = require('./_is-object');
@@ -54571,7 +53801,7 @@ require('./_object-sap')('isExtensible', function($isExtensible){
return isObject(it) ? $isExtensible ? $isExtensible(it) : true : false;
};
});
-},{"./_is-object":139,"./_object-sap":168}],278:[function(require,module,exports){
+},{"./_is-object":139,"./_object-sap":168}],279:[function(require,module,exports){
// 19.1.2.12 Object.isFrozen(O)
var isObject = require('./_is-object');
@@ -54580,7 +53810,7 @@ require('./_object-sap')('isFrozen', function($isFrozen){
return isObject(it) ? $isFrozen ? $isFrozen(it) : false : true;
};
});
-},{"./_is-object":139,"./_object-sap":168}],279:[function(require,module,exports){
+},{"./_is-object":139,"./_object-sap":168}],280:[function(require,module,exports){
// 19.1.2.13 Object.isSealed(O)
var isObject = require('./_is-object');
@@ -54589,11 +53819,11 @@ require('./_object-sap')('isSealed', function($isSealed){
return isObject(it) ? $isSealed ? $isSealed(it) : false : true;
};
});
-},{"./_is-object":139,"./_object-sap":168}],280:[function(require,module,exports){
+},{"./_is-object":139,"./_object-sap":168}],281:[function(require,module,exports){
// 19.1.3.10 Object.is(value1, value2)
var $export = require('./_export');
$export($export.S, 'Object', {is: require('./_same-value')});
-},{"./_export":122,"./_same-value":179}],281:[function(require,module,exports){
+},{"./_export":122,"./_same-value":179}],282:[function(require,module,exports){
// 19.1.2.14 Object.keys(O)
var toObject = require('./_to-object')
, $keys = require('./_object-keys');
@@ -54603,7 +53833,7 @@ require('./_object-sap')('keys', function(){
return $keys(toObject(it));
};
});
-},{"./_object-keys":166,"./_object-sap":168,"./_to-object":199}],282:[function(require,module,exports){
+},{"./_object-keys":166,"./_object-sap":168,"./_to-object":199}],283:[function(require,module,exports){
// 19.1.2.15 Object.preventExtensions(O)
var isObject = require('./_is-object')
, meta = require('./_meta').onFreeze;
@@ -54613,7 +53843,7 @@ require('./_object-sap')('preventExtensions', function($preventExtensions){
return $preventExtensions && isObject(it) ? $preventExtensions(meta(it)) : it;
};
});
-},{"./_is-object":139,"./_meta":152,"./_object-sap":168}],283:[function(require,module,exports){
+},{"./_is-object":139,"./_meta":152,"./_object-sap":168}],284:[function(require,module,exports){
// 19.1.2.17 Object.seal(O)
var isObject = require('./_is-object')
, meta = require('./_meta').onFreeze;
@@ -54623,11 +53853,11 @@ require('./_object-sap')('seal', function($seal){
return $seal && isObject(it) ? $seal(meta(it)) : it;
};
});
-},{"./_is-object":139,"./_meta":152,"./_object-sap":168}],284:[function(require,module,exports){
+},{"./_is-object":139,"./_meta":152,"./_object-sap":168}],285:[function(require,module,exports){
// 19.1.3.19 Object.setPrototypeOf(O, proto)
var $export = require('./_export');
$export($export.S, 'Object', {setPrototypeOf: require('./_set-proto').set});
-},{"./_export":122,"./_set-proto":180}],285:[function(require,module,exports){
+},{"./_export":122,"./_set-proto":180}],286:[function(require,module,exports){
'use strict';
// 19.1.3.6 Object.prototype.toString()
var classof = require('./_classof')
@@ -54638,17 +53868,17 @@ if(test + '' != '[object z]'){
return '[object ' + classof(this) + ']';
}, true);
}
-},{"./_classof":107,"./_redefine":177,"./_wks":207}],286:[function(require,module,exports){
-var $export = require('./_export')
- , $parseFloat = require('./_parse-float');
-// 18.2.4 parseFloat(string)
+},{"./_classof":107,"./_redefine":177,"./_wks":207}],287:[function(require,module,exports){
+var $export = require('./_export')
+ , $parseFloat = require('./_parse-float');
+// 18.2.4 parseFloat(string)
$export($export.G + $export.F * (parseFloat != $parseFloat), {parseFloat: $parseFloat});
-},{"./_export":122,"./_parse-float":171}],287:[function(require,module,exports){
-var $export = require('./_export')
- , $parseInt = require('./_parse-int');
-// 18.2.5 parseInt(string, radix)
+},{"./_export":122,"./_parse-float":171}],288:[function(require,module,exports){
+var $export = require('./_export')
+ , $parseInt = require('./_parse-int');
+// 18.2.5 parseInt(string, radix)
$export($export.G + $export.F * (parseInt != $parseInt), {parseInt: $parseInt});
-},{"./_export":122,"./_parse-int":172}],288:[function(require,module,exports){
+},{"./_export":122,"./_parse-int":172}],289:[function(require,module,exports){
'use strict';
var LIBRARY = require('./_library')
, global = require('./_global')
@@ -54656,9 +53886,11 @@ var LIBRARY = require('./_library')
, classof = require('./_classof')
, $export = require('./_export')
, isObject = require('./_is-object')
+ , anObject = require('./_an-object')
, aFunction = require('./_a-function')
, anInstance = require('./_an-instance')
, forOf = require('./_for-of')
+ , setProto = require('./_set-proto').set
, speciesConstructor = require('./_species-constructor')
, task = require('./_task').set
, microtask = require('./_microtask')()
@@ -54948,50 +54180,37 @@ $export($export.S + $export.F * !(USE_NATIVE && require('./_iter-detect')(functi
return capability.promise;
}
});
-},{"./_a-function":93,"./_an-instance":96,"./_classof":107,"./_core":113,"./_ctx":115,"./_export":122,"./_for-of":127,"./_global":128,"./_is-object":139,"./_iter-detect":144,"./_library":148,"./_microtask":154,"./_redefine-all":176,"./_set-species":181,"./_set-to-string-tag":182,"./_species-constructor":185,"./_task":194,"./_wks":207}],289:[function(require,module,exports){
+},{"./_a-function":93,"./_an-instance":96,"./_an-object":97,"./_classof":107,"./_core":113,"./_ctx":115,"./_export":122,"./_for-of":127,"./_global":128,"./_is-object":139,"./_iter-detect":144,"./_library":148,"./_microtask":154,"./_redefine-all":176,"./_set-proto":180,"./_set-species":181,"./_set-to-string-tag":182,"./_species-constructor":185,"./_task":194,"./_wks":207}],290:[function(require,module,exports){
// 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;
+
+$export($export.S, '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);
+ return _apply.call(aFunction(target), thisArgument, anObject(argumentsList));
}
});
-},{"./_a-function":93,"./_an-object":97,"./_export":122,"./_fails":124,"./_global":128}],290:[function(require,module,exports){
+},{"./_a-function":93,"./_an-object":97,"./_export":122}],291:[function(require,module,exports){
// 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;
+var $export = require('./_export')
+ , create = require('./_object-create')
+ , aFunction = require('./_a-function')
+ , anObject = require('./_an-object')
+ , isObject = require('./_is-object')
+ , bind = require('./_bind');
-// MS Edge supports only 2 arguments and argumentsList argument is optional
+// MS Edge supports only 2 arguments
// FF Nightly sets third argument as `new.target`, but does not create `this` from it
-var NEW_TARGET_BUG = fails(function(){
+$export($export.S + $export.F * require('./_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', {
+ return !(Reflect.construct(function(){}, [], F) instanceof F);
+}), '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){
@@ -55013,7 +54232,7 @@ $export($export.S + $export.F * (NEW_TARGET_BUG || ARGS_BUG), 'Reflect', {
return isObject(result) ? result : instance;
}
});
-},{"./_a-function":93,"./_an-object":97,"./_bind":106,"./_export":122,"./_fails":124,"./_global":128,"./_is-object":139,"./_object-create":156}],291:[function(require,module,exports){
+},{"./_a-function":93,"./_an-object":97,"./_bind":106,"./_export":122,"./_fails":124,"./_is-object":139,"./_object-create":156}],292:[function(require,module,exports){
// 26.1.3 Reflect.defineProperty(target, propertyKey, attributes)
var dP = require('./_object-dp')
, $export = require('./_export')
@@ -55036,7 +54255,7 @@ $export($export.S + $export.F * require('./_fails')(function(){
}
}
});
-},{"./_an-object":97,"./_export":122,"./_fails":124,"./_object-dp":157,"./_to-primitive":200}],292:[function(require,module,exports){
+},{"./_an-object":97,"./_export":122,"./_fails":124,"./_object-dp":157,"./_to-primitive":200}],293:[function(require,module,exports){
// 26.1.4 Reflect.deleteProperty(target, propertyKey)
var $export = require('./_export')
, gOPD = require('./_object-gopd').f
@@ -55048,7 +54267,7 @@ $export($export.S, 'Reflect', {
return desc && !desc.configurable ? false : delete target[propertyKey];
}
});
-},{"./_an-object":97,"./_export":122,"./_object-gopd":160}],293:[function(require,module,exports){
+},{"./_an-object":97,"./_export":122,"./_object-gopd":160}],294:[function(require,module,exports){
'use strict';
// 26.1.5 Reflect.enumerate(target)
var $export = require('./_export')
@@ -55075,7 +54294,7 @@ $export($export.S, 'Reflect', {
return new Enumerate(target);
}
});
-},{"./_an-object":97,"./_export":122,"./_iter-create":142}],294:[function(require,module,exports){
+},{"./_an-object":97,"./_export":122,"./_iter-create":142}],295:[function(require,module,exports){
// 26.1.7 Reflect.getOwnPropertyDescriptor(target, propertyKey)
var gOPD = require('./_object-gopd')
, $export = require('./_export')
@@ -55086,7 +54305,7 @@ $export($export.S, 'Reflect', {
return gOPD.f(anObject(target), propertyKey);
}
});
-},{"./_an-object":97,"./_export":122,"./_object-gopd":160}],295:[function(require,module,exports){
+},{"./_an-object":97,"./_export":122,"./_object-gopd":160}],296:[function(require,module,exports){
// 26.1.8 Reflect.getPrototypeOf(target)
var $export = require('./_export')
, getProto = require('./_object-gpo')
@@ -55097,7 +54316,7 @@ $export($export.S, 'Reflect', {
return getProto(anObject(target));
}
});
-},{"./_an-object":97,"./_export":122,"./_object-gpo":164}],296:[function(require,module,exports){
+},{"./_an-object":97,"./_export":122,"./_object-gpo":164}],297:[function(require,module,exports){
// 26.1.6 Reflect.get(target, propertyKey [, receiver])
var gOPD = require('./_object-gopd')
, getPrototypeOf = require('./_object-gpo')
@@ -55119,7 +54338,7 @@ function get(target, propertyKey/*, receiver*/){
}
$export($export.S, 'Reflect', {get: get});
-},{"./_an-object":97,"./_export":122,"./_has":129,"./_is-object":139,"./_object-gopd":160,"./_object-gpo":164}],297:[function(require,module,exports){
+},{"./_an-object":97,"./_export":122,"./_has":129,"./_is-object":139,"./_object-gopd":160,"./_object-gpo":164}],298:[function(require,module,exports){
// 26.1.9 Reflect.has(target, propertyKey)
var $export = require('./_export');
@@ -55128,7 +54347,7 @@ $export($export.S, 'Reflect', {
return propertyKey in target;
}
});
-},{"./_export":122}],298:[function(require,module,exports){
+},{"./_export":122}],299:[function(require,module,exports){
// 26.1.10 Reflect.isExtensible(target)
var $export = require('./_export')
, anObject = require('./_an-object')
@@ -55140,12 +54359,12 @@ $export($export.S, 'Reflect', {
return $isExtensible ? $isExtensible(target) : true;
}
});
-},{"./_an-object":97,"./_export":122}],299:[function(require,module,exports){
+},{"./_an-object":97,"./_export":122}],300:[function(require,module,exports){
// 26.1.11 Reflect.ownKeys(target)
var $export = require('./_export');
$export($export.S, 'Reflect', {ownKeys: require('./_own-keys')});
-},{"./_export":122,"./_own-keys":170}],300:[function(require,module,exports){
+},{"./_export":122,"./_own-keys":170}],301:[function(require,module,exports){
// 26.1.12 Reflect.preventExtensions(target)
var $export = require('./_export')
, anObject = require('./_an-object')
@@ -55162,7 +54381,7 @@ $export($export.S, 'Reflect', {
}
}
});
-},{"./_an-object":97,"./_export":122}],301:[function(require,module,exports){
+},{"./_an-object":97,"./_export":122}],302:[function(require,module,exports){
// 26.1.14 Reflect.setPrototypeOf(target, proto)
var $export = require('./_export')
, setProto = require('./_set-proto');
@@ -55178,7 +54397,7 @@ if(setProto)$export($export.S, 'Reflect', {
}
}
});
-},{"./_export":122,"./_set-proto":180}],302:[function(require,module,exports){
+},{"./_export":122,"./_set-proto":180}],303:[function(require,module,exports){
// 26.1.13 Reflect.set(target, propertyKey, V [, receiver])
var dP = require('./_object-dp')
, gOPD = require('./_object-gopd')
@@ -55210,7 +54429,7 @@ function set(target, propertyKey, V/*, receiver*/){
}
$export($export.S, 'Reflect', {set: set});
-},{"./_an-object":97,"./_export":122,"./_has":129,"./_is-object":139,"./_object-dp":157,"./_object-gopd":160,"./_object-gpo":164,"./_property-desc":175}],303:[function(require,module,exports){
+},{"./_an-object":97,"./_export":122,"./_has":129,"./_is-object":139,"./_object-dp":157,"./_object-gopd":160,"./_object-gpo":164,"./_property-desc":175}],304:[function(require,module,exports){
var global = require('./_global')
, inheritIfRequired = require('./_inherit-if-required')
, dP = require('./_object-dp').f
@@ -55254,13 +54473,13 @@ if(require('./_descriptors') && (!CORRECT_NEW || require('./_fails')(function(){
}
require('./_set-species')('RegExp');
-},{"./_descriptors":118,"./_fails":124,"./_flags":126,"./_global":128,"./_inherit-if-required":133,"./_is-regexp":140,"./_object-dp":157,"./_object-gopn":162,"./_redefine":177,"./_set-species":181,"./_wks":207}],304:[function(require,module,exports){
+},{"./_descriptors":118,"./_fails":124,"./_flags":126,"./_global":128,"./_inherit-if-required":133,"./_is-regexp":140,"./_object-dp":157,"./_object-gopn":162,"./_redefine":177,"./_set-species":181,"./_wks":207}],305:[function(require,module,exports){
// 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')
});
-},{"./_descriptors":118,"./_flags":126,"./_object-dp":157}],305:[function(require,module,exports){
+},{"./_descriptors":118,"./_flags":126,"./_object-dp":157}],306:[function(require,module,exports){
// @@match logic
require('./_fix-re-wks')('match', 1, function(defined, MATCH, $match){
// 21.1.3.11 String.prototype.match(regexp)
@@ -55271,7 +54490,7 @@ require('./_fix-re-wks')('match', 1, function(defined, MATCH, $match){
return fn !== undefined ? fn.call(regexp, O) : new RegExp(regexp)[MATCH](String(O));
}, $match];
});
-},{"./_fix-re-wks":125}],306:[function(require,module,exports){
+},{"./_fix-re-wks":125}],307:[function(require,module,exports){
// @@replace logic
require('./_fix-re-wks')('replace', 2, function(defined, REPLACE, $replace){
// 21.1.3.14 String.prototype.replace(searchValue, replaceValue)
@@ -55284,7 +54503,7 @@ require('./_fix-re-wks')('replace', 2, function(defined, REPLACE, $replace){
: $replace.call(String(O), searchValue, replaceValue);
}, $replace];
});
-},{"./_fix-re-wks":125}],307:[function(require,module,exports){
+},{"./_fix-re-wks":125}],308:[function(require,module,exports){
// @@search logic
require('./_fix-re-wks')('search', 1, function(defined, SEARCH, $search){
// 21.1.3.15 String.prototype.search(regexp)
@@ -55295,7 +54514,7 @@ require('./_fix-re-wks')('search', 1, function(defined, SEARCH, $search){
return fn !== undefined ? fn.call(regexp, O) : new RegExp(regexp)[SEARCH](String(O));
}, $search];
});
-},{"./_fix-re-wks":125}],308:[function(require,module,exports){
+},{"./_fix-re-wks":125}],309:[function(require,module,exports){
// @@split logic
require('./_fix-re-wks')('split', 2, function(defined, SPLIT, $split){
'use strict';
@@ -55366,33 +54585,33 @@ require('./_fix-re-wks')('split', 2, function(defined, SPLIT, $split){
return fn !== undefined ? fn.call(separator, O, limit) : $split.call(String(O), separator, limit);
}, $split];
});
-},{"./_fix-re-wks":125,"./_is-regexp":140}],309:[function(require,module,exports){
-'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);
- });
-}
-},{"./_an-object":97,"./_descriptors":118,"./_fails":124,"./_flags":126,"./_redefine":177,"./es6.regexp.flags":304}],310:[function(require,module,exports){
+},{"./_fix-re-wks":125,"./_is-regexp":140}],310:[function(require,module,exports){
+'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);
+ });
+}
+},{"./_an-object":97,"./_descriptors":118,"./_fails":124,"./_flags":126,"./_redefine":177,"./es6.regexp.flags":305}],311:[function(require,module,exports){
'use strict';
var strong = require('./_collection-strong');
@@ -55405,7 +54624,7 @@ module.exports = require('./_collection')('Set', function(get){
return strong.def(this, value = value === 0 ? 0 : value, value);
}
}, strong);
-},{"./_collection":112,"./_collection-strong":109}],311:[function(require,module,exports){
+},{"./_collection":112,"./_collection-strong":109}],312:[function(require,module,exports){
'use strict';
// B.2.3.2 String.prototype.anchor(name)
require('./_string-html')('anchor', function(createHTML){
@@ -55413,7 +54632,7 @@ require('./_string-html')('anchor', function(createHTML){
return createHTML(this, 'a', 'name', name);
}
});
-},{"./_string-html":189}],312:[function(require,module,exports){
+},{"./_string-html":189}],313:[function(require,module,exports){
'use strict';
// B.2.3.3 String.prototype.big()
require('./_string-html')('big', function(createHTML){
@@ -55421,7 +54640,7 @@ require('./_string-html')('big', function(createHTML){
return createHTML(this, 'big', '', '');
}
});
-},{"./_string-html":189}],313:[function(require,module,exports){
+},{"./_string-html":189}],314:[function(require,module,exports){
'use strict';
// B.2.3.4 String.prototype.blink()
require('./_string-html')('blink', function(createHTML){
@@ -55429,7 +54648,7 @@ require('./_string-html')('blink', function(createHTML){
return createHTML(this, 'blink', '', '');
}
});
-},{"./_string-html":189}],314:[function(require,module,exports){
+},{"./_string-html":189}],315:[function(require,module,exports){
'use strict';
// B.2.3.5 String.prototype.bold()
require('./_string-html')('bold', function(createHTML){
@@ -55437,7 +54656,7 @@ require('./_string-html')('bold', function(createHTML){
return createHTML(this, 'b', '', '');
}
});
-},{"./_string-html":189}],315:[function(require,module,exports){
+},{"./_string-html":189}],316:[function(require,module,exports){
'use strict';
var $export = require('./_export')
, $at = require('./_string-at')(false);
@@ -55447,7 +54666,7 @@ $export($export.P, 'String', {
return $at(this, pos);
}
});
-},{"./_export":122,"./_string-at":187}],316:[function(require,module,exports){
+},{"./_export":122,"./_string-at":187}],317:[function(require,module,exports){
// 21.1.3.6 String.prototype.endsWith(searchString [, endPosition])
'use strict';
var $export = require('./_export')
@@ -55468,7 +54687,7 @@ $export($export.P + $export.F * require('./_fails-is-regexp')(ENDS_WITH), 'Strin
: that.slice(end - search.length, end) === search;
}
});
-},{"./_export":122,"./_fails-is-regexp":123,"./_string-context":188,"./_to-length":198}],317:[function(require,module,exports){
+},{"./_export":122,"./_fails-is-regexp":123,"./_string-context":188,"./_to-length":198}],318:[function(require,module,exports){
'use strict';
// B.2.3.6 String.prototype.fixed()
require('./_string-html')('fixed', function(createHTML){
@@ -55476,7 +54695,7 @@ require('./_string-html')('fixed', function(createHTML){
return createHTML(this, 'tt', '', '');
}
});
-},{"./_string-html":189}],318:[function(require,module,exports){
+},{"./_string-html":189}],319:[function(require,module,exports){
'use strict';
// B.2.3.7 String.prototype.fontcolor(color)
require('./_string-html')('fontcolor', function(createHTML){
@@ -55484,7 +54703,7 @@ require('./_string-html')('fontcolor', function(createHTML){
return createHTML(this, 'font', 'color', color);
}
});
-},{"./_string-html":189}],319:[function(require,module,exports){
+},{"./_string-html":189}],320:[function(require,module,exports){
'use strict';
// B.2.3.8 String.prototype.fontsize(size)
require('./_string-html')('fontsize', function(createHTML){
@@ -55492,7 +54711,7 @@ require('./_string-html')('fontsize', function(createHTML){
return createHTML(this, 'font', 'size', size);
}
});
-},{"./_string-html":189}],320:[function(require,module,exports){
+},{"./_string-html":189}],321:[function(require,module,exports){
var $export = require('./_export')
, toIndex = require('./_to-index')
, fromCharCode = String.fromCharCode
@@ -55516,7 +54735,7 @@ $export($export.S + $export.F * (!!$fromCodePoint && $fromCodePoint.length != 1)
} return res.join('');
}
});
-},{"./_export":122,"./_to-index":195}],321:[function(require,module,exports){
+},{"./_export":122,"./_to-index":195}],322:[function(require,module,exports){
// 21.1.3.7 String.prototype.includes(searchString, position = 0)
'use strict';
var $export = require('./_export')
@@ -55529,7 +54748,7 @@ $export($export.P + $export.F * require('./_fails-is-regexp')(INCLUDES), 'String
.indexOf(searchString, arguments.length > 1 ? arguments[1] : undefined);
}
});
-},{"./_export":122,"./_fails-is-regexp":123,"./_string-context":188}],322:[function(require,module,exports){
+},{"./_export":122,"./_fails-is-regexp":123,"./_string-context":188}],323:[function(require,module,exports){
'use strict';
// B.2.3.9 String.prototype.italics()
require('./_string-html')('italics', function(createHTML){
@@ -55537,7 +54756,7 @@ require('./_string-html')('italics', function(createHTML){
return createHTML(this, 'i', '', '');
}
});
-},{"./_string-html":189}],323:[function(require,module,exports){
+},{"./_string-html":189}],324:[function(require,module,exports){
'use strict';
var $at = require('./_string-at')(true);
@@ -55555,7 +54774,7 @@ require('./_iter-define')(String, 'String', function(iterated){
this._i += point.length;
return {value: point, done: false};
});
-},{"./_iter-define":143,"./_string-at":187}],324:[function(require,module,exports){
+},{"./_iter-define":143,"./_string-at":187}],325:[function(require,module,exports){
'use strict';
// B.2.3.10 String.prototype.link(url)
require('./_string-html')('link', function(createHTML){
@@ -55563,7 +54782,7 @@ require('./_string-html')('link', function(createHTML){
return createHTML(this, 'a', 'href', url);
}
});
-},{"./_string-html":189}],325:[function(require,module,exports){
+},{"./_string-html":189}],326:[function(require,module,exports){
var $export = require('./_export')
, toIObject = require('./_to-iobject')
, toLength = require('./_to-length');
@@ -55582,14 +54801,14 @@ $export($export.S, 'String', {
} return res.join('');
}
});
-},{"./_export":122,"./_to-iobject":197,"./_to-length":198}],326:[function(require,module,exports){
+},{"./_export":122,"./_to-iobject":197,"./_to-length":198}],327:[function(require,module,exports){
var $export = require('./_export');
$export($export.P, 'String', {
// 21.1.3.13 String.prototype.repeat(count)
repeat: require('./_string-repeat')
});
-},{"./_export":122,"./_string-repeat":191}],327:[function(require,module,exports){
+},{"./_export":122,"./_string-repeat":191}],328:[function(require,module,exports){
'use strict';
// B.2.3.11 String.prototype.small()
require('./_string-html')('small', function(createHTML){
@@ -55597,7 +54816,7 @@ require('./_string-html')('small', function(createHTML){
return createHTML(this, 'small', '', '');
}
});
-},{"./_string-html":189}],328:[function(require,module,exports){
+},{"./_string-html":189}],329:[function(require,module,exports){
// 21.1.3.18 String.prototype.startsWith(searchString [, position ])
'use strict';
var $export = require('./_export')
@@ -55616,7 +54835,7 @@ $export($export.P + $export.F * require('./_fails-is-regexp')(STARTS_WITH), 'Str
: that.slice(index, index + search.length) === search;
}
});
-},{"./_export":122,"./_fails-is-regexp":123,"./_string-context":188,"./_to-length":198}],329:[function(require,module,exports){
+},{"./_export":122,"./_fails-is-regexp":123,"./_string-context":188,"./_to-length":198}],330:[function(require,module,exports){
'use strict';
// B.2.3.12 String.prototype.strike()
require('./_string-html')('strike', function(createHTML){
@@ -55624,7 +54843,7 @@ require('./_string-html')('strike', function(createHTML){
return createHTML(this, 'strike', '', '');
}
});
-},{"./_string-html":189}],330:[function(require,module,exports){
+},{"./_string-html":189}],331:[function(require,module,exports){
'use strict';
// B.2.3.13 String.prototype.sub()
require('./_string-html')('sub', function(createHTML){
@@ -55632,7 +54851,7 @@ require('./_string-html')('sub', function(createHTML){
return createHTML(this, 'sub', '', '');
}
});
-},{"./_string-html":189}],331:[function(require,module,exports){
+},{"./_string-html":189}],332:[function(require,module,exports){
'use strict';
// B.2.3.14 String.prototype.sup()
require('./_string-html')('sup', function(createHTML){
@@ -55640,7 +54859,7 @@ require('./_string-html')('sup', function(createHTML){
return createHTML(this, 'sup', '', '');
}
});
-},{"./_string-html":189}],332:[function(require,module,exports){
+},{"./_string-html":189}],333:[function(require,module,exports){
'use strict';
// 21.1.3.25 String.prototype.trim()
require('./_string-trim')('trim', function($trim){
@@ -55648,7 +54867,7 @@ require('./_string-trim')('trim', function($trim){
return $trim(this, 3);
};
});
-},{"./_string-trim":192}],333:[function(require,module,exports){
+},{"./_string-trim":192}],334:[function(require,module,exports){
'use strict';
// ECMAScript 6 symbols shim
var global = require('./_global')
@@ -55884,7 +55103,7 @@ setToStringTag($Symbol, 'Symbol');
setToStringTag(Math, 'Math', true);
// 24.3.3 JSON[@@toStringTag]
setToStringTag(global.JSON, 'JSON', true);
-},{"./_an-object":97,"./_descriptors":118,"./_enum-keys":121,"./_export":122,"./_fails":124,"./_global":128,"./_has":129,"./_hide":130,"./_is-array":137,"./_keyof":147,"./_library":148,"./_meta":152,"./_object-create":156,"./_object-dp":157,"./_object-gopd":160,"./_object-gopn":162,"./_object-gopn-ext":161,"./_object-gops":163,"./_object-keys":166,"./_object-pie":167,"./_property-desc":175,"./_redefine":177,"./_set-to-string-tag":182,"./_shared":184,"./_to-iobject":197,"./_to-primitive":200,"./_uid":204,"./_wks":207,"./_wks-define":205,"./_wks-ext":206}],334:[function(require,module,exports){
+},{"./_an-object":97,"./_descriptors":118,"./_enum-keys":121,"./_export":122,"./_fails":124,"./_global":128,"./_has":129,"./_hide":130,"./_is-array":137,"./_keyof":147,"./_library":148,"./_meta":152,"./_object-create":156,"./_object-dp":157,"./_object-gopd":160,"./_object-gopn":162,"./_object-gopn-ext":161,"./_object-gops":163,"./_object-keys":166,"./_object-pie":167,"./_property-desc":175,"./_redefine":177,"./_set-to-string-tag":182,"./_shared":184,"./_to-iobject":197,"./_to-primitive":200,"./_uid":204,"./_wks":207,"./_wks-define":205,"./_wks-ext":206}],335:[function(require,module,exports){
'use strict';
var $export = require('./_export')
, $typed = require('./_typed')
@@ -55893,6 +55112,7 @@ var $export = require('./_export')
, toIndex = require('./_to-index')
, toLength = require('./_to-length')
, isObject = require('./_is-object')
+ , TYPED_ARRAY = require('./_wks')('typed_array')
, ArrayBuffer = require('./_global').ArrayBuffer
, speciesConstructor = require('./_species-constructor')
, $ArrayBuffer = buffer.ArrayBuffer
@@ -55931,66 +55151,66 @@ $export($export.P + $export.U + $export.F * require('./_fails')(function(){
});
require('./_set-species')(ARRAY_BUFFER);
-},{"./_an-object":97,"./_export":122,"./_fails":124,"./_global":128,"./_is-object":139,"./_set-species":181,"./_species-constructor":185,"./_to-index":195,"./_to-length":198,"./_typed":203,"./_typed-buffer":202}],335:[function(require,module,exports){
+},{"./_an-object":97,"./_export":122,"./_fails":124,"./_global":128,"./_is-object":139,"./_set-species":181,"./_species-constructor":185,"./_to-index":195,"./_to-length":198,"./_typed":203,"./_typed-buffer":202,"./_wks":207}],336:[function(require,module,exports){
var $export = require('./_export');
$export($export.G + $export.W + $export.F * !require('./_typed').ABV, {
DataView: require('./_typed-buffer').DataView
});
-},{"./_export":122,"./_typed":203,"./_typed-buffer":202}],336:[function(require,module,exports){
+},{"./_export":122,"./_typed":203,"./_typed-buffer":202}],337:[function(require,module,exports){
require('./_typed-array')('Float32', 4, function(init){
return function Float32Array(data, byteOffset, length){
return init(this, data, byteOffset, length);
};
});
-},{"./_typed-array":201}],337:[function(require,module,exports){
+},{"./_typed-array":201}],338:[function(require,module,exports){
require('./_typed-array')('Float64', 8, function(init){
return function Float64Array(data, byteOffset, length){
return init(this, data, byteOffset, length);
};
});
-},{"./_typed-array":201}],338:[function(require,module,exports){
+},{"./_typed-array":201}],339:[function(require,module,exports){
require('./_typed-array')('Int16', 2, function(init){
return function Int16Array(data, byteOffset, length){
return init(this, data, byteOffset, length);
};
});
-},{"./_typed-array":201}],339:[function(require,module,exports){
+},{"./_typed-array":201}],340:[function(require,module,exports){
require('./_typed-array')('Int32', 4, function(init){
return function Int32Array(data, byteOffset, length){
return init(this, data, byteOffset, length);
};
});
-},{"./_typed-array":201}],340:[function(require,module,exports){
+},{"./_typed-array":201}],341:[function(require,module,exports){
require('./_typed-array')('Int8', 1, function(init){
return function Int8Array(data, byteOffset, length){
return init(this, data, byteOffset, length);
};
});
-},{"./_typed-array":201}],341:[function(require,module,exports){
+},{"./_typed-array":201}],342:[function(require,module,exports){
require('./_typed-array')('Uint16', 2, function(init){
return function Uint16Array(data, byteOffset, length){
return init(this, data, byteOffset, length);
};
});
-},{"./_typed-array":201}],342:[function(require,module,exports){
+},{"./_typed-array":201}],343:[function(require,module,exports){
require('./_typed-array')('Uint32', 4, function(init){
return function Uint32Array(data, byteOffset, length){
return init(this, data, byteOffset, length);
};
});
-},{"./_typed-array":201}],343:[function(require,module,exports){
+},{"./_typed-array":201}],344:[function(require,module,exports){
require('./_typed-array')('Uint8', 1, function(init){
return function Uint8Array(data, byteOffset, length){
return init(this, data, byteOffset, length);
};
});
-},{"./_typed-array":201}],344:[function(require,module,exports){
+},{"./_typed-array":201}],345:[function(require,module,exports){
require('./_typed-array')('Uint8', 1, function(init){
return function Uint8ClampedArray(data, byteOffset, length){
return init(this, data, byteOffset, length);
};
}, true);
-},{"./_typed-array":201}],345:[function(require,module,exports){
+},{"./_typed-array":201}],346:[function(require,module,exports){
'use strict';
var each = require('./_array-methods')(0)
, redefine = require('./_redefine')
@@ -55998,6 +55218,7 @@ var each = require('./_array-methods')(0)
, assign = require('./_object-assign')
, weak = require('./_collection-weak')
, isObject = require('./_is-object')
+ , has = require('./_has')
, getWeak = meta.getWeak
, isExtensible = Object.isExtensible
, uncaughtFrozenStore = weak.ufstore
@@ -56047,7 +55268,7 @@ if(new $WeakMap().set((Object.freeze || Object)(tmp), 7).get(tmp) != 7){
});
});
}
-},{"./_array-methods":102,"./_collection":112,"./_collection-weak":111,"./_is-object":139,"./_meta":152,"./_object-assign":155,"./_redefine":177}],346:[function(require,module,exports){
+},{"./_array-methods":102,"./_collection":112,"./_collection-weak":111,"./_has":129,"./_is-object":139,"./_meta":152,"./_object-assign":155,"./_redefine":177}],347:[function(require,module,exports){
'use strict';
var weak = require('./_collection-weak');
@@ -56060,7 +55281,7 @@ require('./_collection')('WeakSet', function(get){
return weak.def(this, value, true);
}
}, weak, false, true);
-},{"./_collection":112,"./_collection-weak":111}],347:[function(require,module,exports){
+},{"./_collection":112,"./_collection-weak":111}],348:[function(require,module,exports){
'use strict';
// https://github.com/tc39/Array.prototype.includes
var $export = require('./_export')
@@ -56073,20 +55294,20 @@ $export($export.P, 'Array', {
});
require('./_add-to-unscopables')('includes');
-},{"./_add-to-unscopables":95,"./_array-includes":101,"./_export":122}],348:[function(require,module,exports){
-// 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);
- }
+},{"./_add-to-unscopables":95,"./_array-includes":101,"./_export":122}],349:[function(require,module,exports){
+// 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);
+ }
});
-},{"./_cof":108,"./_export":122,"./_global":128,"./_microtask":154}],349:[function(require,module,exports){
+},{"./_cof":108,"./_export":122,"./_global":128,"./_microtask":154}],350:[function(require,module,exports){
// https://github.com/ljharb/proposal-is-error
var $export = require('./_export')
, cof = require('./_cof');
@@ -56096,12 +55317,12 @@ $export($export.S, 'Error', {
return cof(it) === 'Error';
}
});
-},{"./_cof":108,"./_export":122}],350:[function(require,module,exports){
+},{"./_cof":108,"./_export":122}],351:[function(require,module,exports){
// https://github.com/DavidBruant/Map-Set.prototype.toJSON
var $export = require('./_export');
$export($export.P + $export.R, 'Map', {toJSON: require('./_collection-to-json')('Map')});
-},{"./_collection-to-json":110,"./_export":122}],351:[function(require,module,exports){
+},{"./_collection-to-json":110,"./_export":122}],352:[function(require,module,exports){
// https://gist.github.com/BrendanEich/4294d5c212a6d2254703
var $export = require('./_export');
@@ -56113,7 +55334,7 @@ $export($export.S, 'Math', {
return $x1 + (y1 >>> 0) + (($x0 & $y0 | ($x0 | $y0) & ~($x0 + $y0 >>> 0)) >>> 31) | 0;
}
});
-},{"./_export":122}],352:[function(require,module,exports){
+},{"./_export":122}],353:[function(require,module,exports){
// https://gist.github.com/BrendanEich/4294d5c212a6d2254703
var $export = require('./_export');
@@ -56130,7 +55351,7 @@ $export($export.S, 'Math', {
return u1 * v1 + (t >> 16) + ((u0 * v1 >>> 0) + (t & UINT16) >> 16);
}
});
-},{"./_export":122}],353:[function(require,module,exports){
+},{"./_export":122}],354:[function(require,module,exports){
// https://gist.github.com/BrendanEich/4294d5c212a6d2254703
var $export = require('./_export');
@@ -56142,7 +55363,7 @@ $export($export.S, 'Math', {
return $x1 - (y1 >>> 0) - ((~$x0 & $y0 | ~($x0 ^ $y0) & $x0 - $y0 >>> 0) >>> 31) | 0;
}
});
-},{"./_export":122}],354:[function(require,module,exports){
+},{"./_export":122}],355:[function(require,module,exports){
// https://gist.github.com/BrendanEich/4294d5c212a6d2254703
var $export = require('./_export');
@@ -56159,33 +55380,33 @@ $export($export.S, 'Math', {
return u1 * v1 + (t >>> 16) + ((u0 * v1 >>> 0) + (t & UINT16) >>> 16);
}
});
-},{"./_export":122}],355:[function(require,module,exports){
-'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});
- }
-});
-},{"./_a-function":93,"./_descriptors":118,"./_export":122,"./_object-dp":157,"./_object-forced-pam":159,"./_to-object":199}],356:[function(require,module,exports){
-'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});
- }
+},{"./_export":122}],356:[function(require,module,exports){
+'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});
+ }
});
},{"./_a-function":93,"./_descriptors":118,"./_export":122,"./_object-dp":157,"./_object-forced-pam":159,"./_to-object":199}],357:[function(require,module,exports){
+'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});
+ }
+});
+},{"./_a-function":93,"./_descriptors":118,"./_export":122,"./_object-dp":157,"./_object-forced-pam":159,"./_to-object":199}],358:[function(require,module,exports){
// https://github.com/tc39/proposal-object-values-entries
var $export = require('./_export')
, $entries = require('./_object-to-array')(true);
@@ -56195,7 +55416,7 @@ $export($export.S, 'Object', {
return $entries(it);
}
});
-},{"./_export":122,"./_object-to-array":169}],358:[function(require,module,exports){
+},{"./_export":122,"./_object-to-array":169}],359:[function(require,module,exports){
// https://github.com/tc39/proposal-object-getownpropertydescriptors
var $export = require('./_export')
, ownKeys = require('./_own-keys')
@@ -56210,50 +55431,50 @@ $export($export.S, 'Object', {
, keys = ownKeys(O)
, result = {}
, i = 0
- , key;
+ , key, D;
while(keys.length > i)createProperty(result, key = keys[i++], getDesc(O, key));
return result;
}
});
-},{"./_create-property":114,"./_export":122,"./_object-gopd":160,"./_own-keys":170,"./_to-iobject":197}],359:[function(require,module,exports){
-'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));
- }
-});
-},{"./_descriptors":118,"./_export":122,"./_object-forced-pam":159,"./_object-gopd":160,"./_object-gpo":164,"./_to-object":199,"./_to-primitive":200}],360:[function(require,module,exports){
-'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));
- }
+},{"./_create-property":114,"./_export":122,"./_object-gopd":160,"./_own-keys":170,"./_to-iobject":197}],360:[function(require,module,exports){
+'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));
+ }
});
},{"./_descriptors":118,"./_export":122,"./_object-forced-pam":159,"./_object-gopd":160,"./_object-gpo":164,"./_to-object":199,"./_to-primitive":200}],361:[function(require,module,exports){
+'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));
+ }
+});
+},{"./_descriptors":118,"./_export":122,"./_object-forced-pam":159,"./_object-gopd":160,"./_object-gpo":164,"./_to-object":199,"./_to-primitive":200}],362:[function(require,module,exports){
// https://github.com/tc39/proposal-object-values-entries
var $export = require('./_export')
, $values = require('./_object-to-array')(false);
@@ -56263,207 +55484,207 @@ $export($export.S, 'Object', {
return $values(it);
}
});
-},{"./_export":122,"./_object-to-array":169}],362:[function(require,module,exports){
-'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});
-
+},{"./_export":122,"./_object-to-array":169}],363:[function(require,module,exports){
+'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');
-},{"./_a-function":93,"./_an-instance":96,"./_an-object":97,"./_core":113,"./_export":122,"./_for-of":127,"./_global":128,"./_hide":130,"./_microtask":154,"./_redefine-all":176,"./_set-species":181,"./_wks":207}],363:[function(require,module,exports){
+},{"./_a-function":93,"./_an-instance":96,"./_an-object":97,"./_core":113,"./_export":122,"./_for-of":127,"./_global":128,"./_hide":130,"./_microtask":154,"./_redefine-all":176,"./_set-species":181,"./_wks":207}],364:[function(require,module,exports){
var metadata = require('./_metadata')
, anObject = require('./_an-object')
, toMetaKey = metadata.key
@@ -56472,7 +55693,7 @@ var metadata = require('./_metadata')
metadata.exp({defineMetadata: function defineMetadata(metadataKey, metadataValue, target, targetKey){
ordinaryDefineOwnMetadata(metadataKey, metadataValue, anObject(target), toMetaKey(targetKey));
}});
-},{"./_an-object":97,"./_metadata":153}],364:[function(require,module,exports){
+},{"./_an-object":97,"./_metadata":153}],365:[function(require,module,exports){
var metadata = require('./_metadata')
, anObject = require('./_an-object')
, toMetaKey = metadata.key
@@ -56488,7 +55709,7 @@ metadata.exp({deleteMetadata: function deleteMetadata(metadataKey, target /*, ta
targetMetadata['delete'](targetKey);
return !!targetMetadata.size || store['delete'](target);
}});
-},{"./_an-object":97,"./_metadata":153}],365:[function(require,module,exports){
+},{"./_an-object":97,"./_metadata":153}],366:[function(require,module,exports){
var Set = require('./es6.set')
, from = require('./_array-from-iterable')
, metadata = require('./_metadata')
@@ -56508,7 +55729,7 @@ var ordinaryMetadataKeys = function(O, P){
metadata.exp({getMetadataKeys: function getMetadataKeys(target /*, targetKey */){
return ordinaryMetadataKeys(anObject(target), arguments.length < 2 ? undefined : toMetaKey(arguments[1]));
}});
-},{"./_an-object":97,"./_array-from-iterable":100,"./_metadata":153,"./_object-gpo":164,"./es6.set":310}],366:[function(require,module,exports){
+},{"./_an-object":97,"./_array-from-iterable":100,"./_metadata":153,"./_object-gpo":164,"./es6.set":311}],367:[function(require,module,exports){
var metadata = require('./_metadata')
, anObject = require('./_an-object')
, getPrototypeOf = require('./_object-gpo')
@@ -56526,7 +55747,7 @@ var ordinaryGetMetadata = function(MetadataKey, O, P){
metadata.exp({getMetadata: function getMetadata(metadataKey, target /*, targetKey */){
return ordinaryGetMetadata(metadataKey, anObject(target), arguments.length < 3 ? undefined : toMetaKey(arguments[2]));
}});
-},{"./_an-object":97,"./_metadata":153,"./_object-gpo":164}],367:[function(require,module,exports){
+},{"./_an-object":97,"./_metadata":153,"./_object-gpo":164}],368:[function(require,module,exports){
var metadata = require('./_metadata')
, anObject = require('./_an-object')
, ordinaryOwnMetadataKeys = metadata.keys
@@ -56535,7 +55756,7 @@ var metadata = require('./_metadata')
metadata.exp({getOwnMetadataKeys: function getOwnMetadataKeys(target /*, targetKey */){
return ordinaryOwnMetadataKeys(anObject(target), arguments.length < 2 ? undefined : toMetaKey(arguments[1]));
}});
-},{"./_an-object":97,"./_metadata":153}],368:[function(require,module,exports){
+},{"./_an-object":97,"./_metadata":153}],369:[function(require,module,exports){
var metadata = require('./_metadata')
, anObject = require('./_an-object')
, ordinaryGetOwnMetadata = metadata.get
@@ -56545,7 +55766,7 @@ metadata.exp({getOwnMetadata: function getOwnMetadata(metadataKey, target /*, ta
return ordinaryGetOwnMetadata(metadataKey, anObject(target)
, arguments.length < 3 ? undefined : toMetaKey(arguments[2]));
}});
-},{"./_an-object":97,"./_metadata":153}],369:[function(require,module,exports){
+},{"./_an-object":97,"./_metadata":153}],370:[function(require,module,exports){
var metadata = require('./_metadata')
, anObject = require('./_an-object')
, getPrototypeOf = require('./_object-gpo')
@@ -56562,7 +55783,7 @@ var ordinaryHasMetadata = function(MetadataKey, O, P){
metadata.exp({hasMetadata: function hasMetadata(metadataKey, target /*, targetKey */){
return ordinaryHasMetadata(metadataKey, anObject(target), arguments.length < 3 ? undefined : toMetaKey(arguments[2]));
}});
-},{"./_an-object":97,"./_metadata":153,"./_object-gpo":164}],370:[function(require,module,exports){
+},{"./_an-object":97,"./_metadata":153,"./_object-gpo":164}],371:[function(require,module,exports){
var metadata = require('./_metadata')
, anObject = require('./_an-object')
, ordinaryHasOwnMetadata = metadata.has
@@ -56572,7 +55793,7 @@ metadata.exp({hasOwnMetadata: function hasOwnMetadata(metadataKey, target /*, ta
return ordinaryHasOwnMetadata(metadataKey, anObject(target)
, arguments.length < 3 ? undefined : toMetaKey(arguments[2]));
}});
-},{"./_an-object":97,"./_metadata":153}],371:[function(require,module,exports){
+},{"./_an-object":97,"./_metadata":153}],372:[function(require,module,exports){
var metadata = require('./_metadata')
, anObject = require('./_an-object')
, aFunction = require('./_a-function')
@@ -56588,12 +55809,12 @@ metadata.exp({metadata: function metadata(metadataKey, metadataValue){
);
};
}});
-},{"./_a-function":93,"./_an-object":97,"./_metadata":153}],372:[function(require,module,exports){
+},{"./_a-function":93,"./_an-object":97,"./_metadata":153}],373:[function(require,module,exports){
// https://github.com/DavidBruant/Map-Set.prototype.toJSON
var $export = require('./_export');
$export($export.P + $export.R, 'Set', {toJSON: require('./_collection-to-json')('Set')});
-},{"./_collection-to-json":110,"./_export":122}],373:[function(require,module,exports){
+},{"./_collection-to-json":110,"./_export":122}],374:[function(require,module,exports){
'use strict';
// https://github.com/mathiasbynens/String.prototype.at
var $export = require('./_export')
@@ -56604,38 +55825,38 @@ $export($export.P, 'String', {
return $at(this, pos);
}
});
-},{"./_export":122,"./_string-at":187}],374:[function(require,module,exports){
-'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);
- }
+},{"./_export":122,"./_string-at":187}],375:[function(require,module,exports){
+'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);
+ }
});
-},{"./_defined":117,"./_export":122,"./_flags":126,"./_is-regexp":140,"./_iter-create":142,"./_to-length":198}],375:[function(require,module,exports){
+},{"./_defined":117,"./_export":122,"./_flags":126,"./_is-regexp":140,"./_iter-create":142,"./_to-length":198}],376:[function(require,module,exports){
'use strict';
// https://github.com/tc39/proposal-string-pad-start-end
var $export = require('./_export')
@@ -56646,7 +55867,7 @@ $export($export.P, 'String', {
return $pad(this, maxLength, arguments.length > 1 ? arguments[1] : undefined, false);
}
});
-},{"./_export":122,"./_string-pad":190}],376:[function(require,module,exports){
+},{"./_export":122,"./_string-pad":190}],377:[function(require,module,exports){
'use strict';
// https://github.com/tc39/proposal-string-pad-start-end
var $export = require('./_export')
@@ -56657,7 +55878,7 @@ $export($export.P, 'String', {
return $pad(this, maxLength, arguments.length > 1 ? arguments[1] : undefined, true);
}
});
-},{"./_export":122,"./_string-pad":190}],377:[function(require,module,exports){
+},{"./_export":122,"./_string-pad":190}],378:[function(require,module,exports){
'use strict';
// https://github.com/sebmarkbage/ecmascript-string-left-right-trim
require('./_string-trim')('trimLeft', function($trim){
@@ -56665,7 +55886,7 @@ require('./_string-trim')('trimLeft', function($trim){
return $trim(this, 1);
};
}, 'trimStart');
-},{"./_string-trim":192}],378:[function(require,module,exports){
+},{"./_string-trim":192}],379:[function(require,module,exports){
'use strict';
// https://github.com/sebmarkbage/ecmascript-string-left-right-trim
require('./_string-trim')('trimRight', function($trim){
@@ -56673,16 +55894,16 @@ require('./_string-trim')('trimRight', function($trim){
return $trim(this, 2);
};
}, 'trimEnd');
-},{"./_string-trim":192}],379:[function(require,module,exports){
+},{"./_string-trim":192}],380:[function(require,module,exports){
require('./_wks-define')('asyncIterator');
-},{"./_wks-define":205}],380:[function(require,module,exports){
-require('./_wks-define')('observable');
},{"./_wks-define":205}],381:[function(require,module,exports){
+require('./_wks-define')('observable');
+},{"./_wks-define":205}],382:[function(require,module,exports){
// https://github.com/ljharb/proposal-global
var $export = require('./_export');
$export($export.S, 'System', {global: require('./_global')});
-},{"./_export":122,"./_global":128}],382:[function(require,module,exports){
+},{"./_export":122,"./_global":128}],383:[function(require,module,exports){
var $iterators = require('./es6.array.iterator')
, redefine = require('./_redefine')
, global = require('./_global')
@@ -56705,14 +55926,14 @@ for(var collections = ['NodeList', 'DOMTokenList', 'MediaList', 'StyleSheetList'
for(key in $iterators)if(!proto[key])redefine(proto, key, $iterators[key], true);
}
}
-},{"./_global":128,"./_hide":130,"./_iterators":146,"./_redefine":177,"./_wks":207,"./es6.array.iterator":220}],383:[function(require,module,exports){
+},{"./_global":128,"./_hide":130,"./_iterators":146,"./_redefine":177,"./_wks":207,"./es6.array.iterator":221}],384:[function(require,module,exports){
var $export = require('./_export')
, $task = require('./_task');
$export($export.G + $export.B, {
setImmediate: $task.set,
clearImmediate: $task.clear
});
-},{"./_export":122,"./_task":194}],384:[function(require,module,exports){
+},{"./_export":122,"./_task":194}],385:[function(require,module,exports){
// ie9- setTimeout & setInterval additional parameters fix
var global = require('./_global')
, $export = require('./_export')
@@ -56733,7 +55954,7 @@ $export($export.G + $export.B + $export.F * MSIE, {
setTimeout: wrap(global.setTimeout),
setInterval: wrap(global.setInterval)
});
-},{"./_export":122,"./_global":128,"./_invoke":134,"./_partial":173}],385:[function(require,module,exports){
+},{"./_export":122,"./_global":128,"./_invoke":134,"./_partial":173}],386:[function(require,module,exports){
require('./modules/es6.symbol');
require('./modules/es6.object.create');
require('./modules/es6.object.define-property');
@@ -56910,7 +56131,7 @@ require('./modules/web.timers');
require('./modules/web.immediate');
require('./modules/web.dom.iterable');
module.exports = require('./modules/_core');
-},{"./modules/_core":113,"./modules/es6.array.copy-within":210,"./modules/es6.array.every":211,"./modules/es6.array.fill":212,"./modules/es6.array.filter":213,"./modules/es6.array.find":215,"./modules/es6.array.find-index":214,"./modules/es6.array.for-each":216,"./modules/es6.array.from":217,"./modules/es6.array.index-of":218,"./modules/es6.array.is-array":219,"./modules/es6.array.iterator":220,"./modules/es6.array.join":221,"./modules/es6.array.last-index-of":222,"./modules/es6.array.map":223,"./modules/es6.array.of":224,"./modules/es6.array.reduce":226,"./modules/es6.array.reduce-right":225,"./modules/es6.array.slice":227,"./modules/es6.array.some":228,"./modules/es6.array.sort":229,"./modules/es6.array.species":230,"./modules/es6.date.now":231,"./modules/es6.date.to-iso-string":232,"./modules/es6.date.to-json":233,"./modules/es6.date.to-primitive":234,"./modules/es6.date.to-string":235,"./modules/es6.function.bind":236,"./modules/es6.function.has-instance":237,"./modules/es6.function.name":238,"./modules/es6.map":239,"./modules/es6.math.acosh":240,"./modules/es6.math.asinh":241,"./modules/es6.math.atanh":242,"./modules/es6.math.cbrt":243,"./modules/es6.math.clz32":244,"./modules/es6.math.cosh":245,"./modules/es6.math.expm1":246,"./modules/es6.math.fround":247,"./modules/es6.math.hypot":248,"./modules/es6.math.imul":249,"./modules/es6.math.log10":250,"./modules/es6.math.log1p":251,"./modules/es6.math.log2":252,"./modules/es6.math.sign":253,"./modules/es6.math.sinh":254,"./modules/es6.math.tanh":255,"./modules/es6.math.trunc":256,"./modules/es6.number.constructor":257,"./modules/es6.number.epsilon":258,"./modules/es6.number.is-finite":259,"./modules/es6.number.is-integer":260,"./modules/es6.number.is-nan":261,"./modules/es6.number.is-safe-integer":262,"./modules/es6.number.max-safe-integer":263,"./modules/es6.number.min-safe-integer":264,"./modules/es6.number.parse-float":265,"./modules/es6.number.parse-int":266,"./modules/es6.number.to-fixed":267,"./modules/es6.number.to-precision":268,"./modules/es6.object.assign":269,"./modules/es6.object.create":270,"./modules/es6.object.define-properties":271,"./modules/es6.object.define-property":272,"./modules/es6.object.freeze":273,"./modules/es6.object.get-own-property-descriptor":274,"./modules/es6.object.get-own-property-names":275,"./modules/es6.object.get-prototype-of":276,"./modules/es6.object.is":280,"./modules/es6.object.is-extensible":277,"./modules/es6.object.is-frozen":278,"./modules/es6.object.is-sealed":279,"./modules/es6.object.keys":281,"./modules/es6.object.prevent-extensions":282,"./modules/es6.object.seal":283,"./modules/es6.object.set-prototype-of":284,"./modules/es6.object.to-string":285,"./modules/es6.parse-float":286,"./modules/es6.parse-int":287,"./modules/es6.promise":288,"./modules/es6.reflect.apply":289,"./modules/es6.reflect.construct":290,"./modules/es6.reflect.define-property":291,"./modules/es6.reflect.delete-property":292,"./modules/es6.reflect.enumerate":293,"./modules/es6.reflect.get":296,"./modules/es6.reflect.get-own-property-descriptor":294,"./modules/es6.reflect.get-prototype-of":295,"./modules/es6.reflect.has":297,"./modules/es6.reflect.is-extensible":298,"./modules/es6.reflect.own-keys":299,"./modules/es6.reflect.prevent-extensions":300,"./modules/es6.reflect.set":302,"./modules/es6.reflect.set-prototype-of":301,"./modules/es6.regexp.constructor":303,"./modules/es6.regexp.flags":304,"./modules/es6.regexp.match":305,"./modules/es6.regexp.replace":306,"./modules/es6.regexp.search":307,"./modules/es6.regexp.split":308,"./modules/es6.regexp.to-string":309,"./modules/es6.set":310,"./modules/es6.string.anchor":311,"./modules/es6.string.big":312,"./modules/es6.string.blink":313,"./modules/es6.string.bold":314,"./modules/es6.string.code-point-at":315,"./modules/es6.string.ends-with":316,"./modules/es6.string.fixed":317,"./modules/es6.string.fontcolor":318,"./modules/es6.string.fontsize":319,"./modules/es6.string.from-code-point":320,"./modules/es6.string.includes":321,"./modules/es6.string.italics":322,"./modules/es6.string.iterator":323,"./modules/es6.string.link":324,"./modules/es6.string.raw":325,"./modules/es6.string.repeat":326,"./modules/es6.string.small":327,"./modules/es6.string.starts-with":328,"./modules/es6.string.strike":329,"./modules/es6.string.sub":330,"./modules/es6.string.sup":331,"./modules/es6.string.trim":332,"./modules/es6.symbol":333,"./modules/es6.typed.array-buffer":334,"./modules/es6.typed.data-view":335,"./modules/es6.typed.float32-array":336,"./modules/es6.typed.float64-array":337,"./modules/es6.typed.int16-array":338,"./modules/es6.typed.int32-array":339,"./modules/es6.typed.int8-array":340,"./modules/es6.typed.uint16-array":341,"./modules/es6.typed.uint32-array":342,"./modules/es6.typed.uint8-array":343,"./modules/es6.typed.uint8-clamped-array":344,"./modules/es6.weak-map":345,"./modules/es6.weak-set":346,"./modules/es7.array.includes":347,"./modules/es7.asap":348,"./modules/es7.error.is-error":349,"./modules/es7.map.to-json":350,"./modules/es7.math.iaddh":351,"./modules/es7.math.imulh":352,"./modules/es7.math.isubh":353,"./modules/es7.math.umulh":354,"./modules/es7.object.define-getter":355,"./modules/es7.object.define-setter":356,"./modules/es7.object.entries":357,"./modules/es7.object.get-own-property-descriptors":358,"./modules/es7.object.lookup-getter":359,"./modules/es7.object.lookup-setter":360,"./modules/es7.object.values":361,"./modules/es7.observable":362,"./modules/es7.reflect.define-metadata":363,"./modules/es7.reflect.delete-metadata":364,"./modules/es7.reflect.get-metadata":366,"./modules/es7.reflect.get-metadata-keys":365,"./modules/es7.reflect.get-own-metadata":368,"./modules/es7.reflect.get-own-metadata-keys":367,"./modules/es7.reflect.has-metadata":369,"./modules/es7.reflect.has-own-metadata":370,"./modules/es7.reflect.metadata":371,"./modules/es7.set.to-json":372,"./modules/es7.string.at":373,"./modules/es7.string.match-all":374,"./modules/es7.string.pad-end":375,"./modules/es7.string.pad-start":376,"./modules/es7.string.trim-left":377,"./modules/es7.string.trim-right":378,"./modules/es7.symbol.async-iterator":379,"./modules/es7.symbol.observable":380,"./modules/es7.system.global":381,"./modules/web.dom.iterable":382,"./modules/web.immediate":383,"./modules/web.timers":384}],386:[function(require,module,exports){
+},{"./modules/_core":113,"./modules/es6.array.copy-within":211,"./modules/es6.array.every":212,"./modules/es6.array.fill":213,"./modules/es6.array.filter":214,"./modules/es6.array.find":216,"./modules/es6.array.find-index":215,"./modules/es6.array.for-each":217,"./modules/es6.array.from":218,"./modules/es6.array.index-of":219,"./modules/es6.array.is-array":220,"./modules/es6.array.iterator":221,"./modules/es6.array.join":222,"./modules/es6.array.last-index-of":223,"./modules/es6.array.map":224,"./modules/es6.array.of":225,"./modules/es6.array.reduce":227,"./modules/es6.array.reduce-right":226,"./modules/es6.array.slice":228,"./modules/es6.array.some":229,"./modules/es6.array.sort":230,"./modules/es6.array.species":231,"./modules/es6.date.now":232,"./modules/es6.date.to-iso-string":233,"./modules/es6.date.to-json":234,"./modules/es6.date.to-primitive":235,"./modules/es6.date.to-string":236,"./modules/es6.function.bind":237,"./modules/es6.function.has-instance":238,"./modules/es6.function.name":239,"./modules/es6.map":240,"./modules/es6.math.acosh":241,"./modules/es6.math.asinh":242,"./modules/es6.math.atanh":243,"./modules/es6.math.cbrt":244,"./modules/es6.math.clz32":245,"./modules/es6.math.cosh":246,"./modules/es6.math.expm1":247,"./modules/es6.math.fround":248,"./modules/es6.math.hypot":249,"./modules/es6.math.imul":250,"./modules/es6.math.log10":251,"./modules/es6.math.log1p":252,"./modules/es6.math.log2":253,"./modules/es6.math.sign":254,"./modules/es6.math.sinh":255,"./modules/es6.math.tanh":256,"./modules/es6.math.trunc":257,"./modules/es6.number.constructor":258,"./modules/es6.number.epsilon":259,"./modules/es6.number.is-finite":260,"./modules/es6.number.is-integer":261,"./modules/es6.number.is-nan":262,"./modules/es6.number.is-safe-integer":263,"./modules/es6.number.max-safe-integer":264,"./modules/es6.number.min-safe-integer":265,"./modules/es6.number.parse-float":266,"./modules/es6.number.parse-int":267,"./modules/es6.number.to-fixed":268,"./modules/es6.number.to-precision":269,"./modules/es6.object.assign":270,"./modules/es6.object.create":271,"./modules/es6.object.define-properties":272,"./modules/es6.object.define-property":273,"./modules/es6.object.freeze":274,"./modules/es6.object.get-own-property-descriptor":275,"./modules/es6.object.get-own-property-names":276,"./modules/es6.object.get-prototype-of":277,"./modules/es6.object.is":281,"./modules/es6.object.is-extensible":278,"./modules/es6.object.is-frozen":279,"./modules/es6.object.is-sealed":280,"./modules/es6.object.keys":282,"./modules/es6.object.prevent-extensions":283,"./modules/es6.object.seal":284,"./modules/es6.object.set-prototype-of":285,"./modules/es6.object.to-string":286,"./modules/es6.parse-float":287,"./modules/es6.parse-int":288,"./modules/es6.promise":289,"./modules/es6.reflect.apply":290,"./modules/es6.reflect.construct":291,"./modules/es6.reflect.define-property":292,"./modules/es6.reflect.delete-property":293,"./modules/es6.reflect.enumerate":294,"./modules/es6.reflect.get":297,"./modules/es6.reflect.get-own-property-descriptor":295,"./modules/es6.reflect.get-prototype-of":296,"./modules/es6.reflect.has":298,"./modules/es6.reflect.is-extensible":299,"./modules/es6.reflect.own-keys":300,"./modules/es6.reflect.prevent-extensions":301,"./modules/es6.reflect.set":303,"./modules/es6.reflect.set-prototype-of":302,"./modules/es6.regexp.constructor":304,"./modules/es6.regexp.flags":305,"./modules/es6.regexp.match":306,"./modules/es6.regexp.replace":307,"./modules/es6.regexp.search":308,"./modules/es6.regexp.split":309,"./modules/es6.regexp.to-string":310,"./modules/es6.set":311,"./modules/es6.string.anchor":312,"./modules/es6.string.big":313,"./modules/es6.string.blink":314,"./modules/es6.string.bold":315,"./modules/es6.string.code-point-at":316,"./modules/es6.string.ends-with":317,"./modules/es6.string.fixed":318,"./modules/es6.string.fontcolor":319,"./modules/es6.string.fontsize":320,"./modules/es6.string.from-code-point":321,"./modules/es6.string.includes":322,"./modules/es6.string.italics":323,"./modules/es6.string.iterator":324,"./modules/es6.string.link":325,"./modules/es6.string.raw":326,"./modules/es6.string.repeat":327,"./modules/es6.string.small":328,"./modules/es6.string.starts-with":329,"./modules/es6.string.strike":330,"./modules/es6.string.sub":331,"./modules/es6.string.sup":332,"./modules/es6.string.trim":333,"./modules/es6.symbol":334,"./modules/es6.typed.array-buffer":335,"./modules/es6.typed.data-view":336,"./modules/es6.typed.float32-array":337,"./modules/es6.typed.float64-array":338,"./modules/es6.typed.int16-array":339,"./modules/es6.typed.int32-array":340,"./modules/es6.typed.int8-array":341,"./modules/es6.typed.uint16-array":342,"./modules/es6.typed.uint32-array":343,"./modules/es6.typed.uint8-array":344,"./modules/es6.typed.uint8-clamped-array":345,"./modules/es6.weak-map":346,"./modules/es6.weak-set":347,"./modules/es7.array.includes":348,"./modules/es7.asap":349,"./modules/es7.error.is-error":350,"./modules/es7.map.to-json":351,"./modules/es7.math.iaddh":352,"./modules/es7.math.imulh":353,"./modules/es7.math.isubh":354,"./modules/es7.math.umulh":355,"./modules/es7.object.define-getter":356,"./modules/es7.object.define-setter":357,"./modules/es7.object.entries":358,"./modules/es7.object.get-own-property-descriptors":359,"./modules/es7.object.lookup-getter":360,"./modules/es7.object.lookup-setter":361,"./modules/es7.object.values":362,"./modules/es7.observable":363,"./modules/es7.reflect.define-metadata":364,"./modules/es7.reflect.delete-metadata":365,"./modules/es7.reflect.get-metadata":367,"./modules/es7.reflect.get-metadata-keys":366,"./modules/es7.reflect.get-own-metadata":369,"./modules/es7.reflect.get-own-metadata-keys":368,"./modules/es7.reflect.has-metadata":370,"./modules/es7.reflect.has-own-metadata":371,"./modules/es7.reflect.metadata":372,"./modules/es7.set.to-json":373,"./modules/es7.string.at":374,"./modules/es7.string.match-all":375,"./modules/es7.string.pad-end":376,"./modules/es7.string.pad-start":377,"./modules/es7.string.trim-left":378,"./modules/es7.string.trim-right":379,"./modules/es7.symbol.async-iterator":380,"./modules/es7.symbol.observable":381,"./modules/es7.system.global":382,"./modules/web.dom.iterable":383,"./modules/web.immediate":384,"./modules/web.timers":385}],387:[function(require,module,exports){
(function (Buffer){
// Copyright Joyent, Inc. and other Node contributors.
//
@@ -57021,7 +56242,7 @@ function objectToString(o) {
}
}).call(this,{"isBuffer":require("../../is-buffer/index.js")})
-},{"../../is-buffer/index.js":435}],387:[function(require,module,exports){
+},{"../../is-buffer/index.js":436}],388:[function(require,module,exports){
(function (Buffer){
var elliptic = require('elliptic');
var BN = require('bn.js');
@@ -57147,7 +56368,7 @@ function formatReturnValue(bn, enc, len) {
}
}).call(this,require("buffer").Buffer)
-},{"bn.js":60,"buffer":90,"elliptic":403}],388:[function(require,module,exports){
+},{"bn.js":60,"buffer":90,"elliptic":404}],389:[function(require,module,exports){
(function (Buffer){
'use strict';
var inherits = require('inherits')
@@ -57203,7 +56424,7 @@ module.exports = function createHash (alg) {
}
}).call(this,require("buffer").Buffer)
-},{"./md5":390,"buffer":90,"cipher-base":91,"inherits":434,"ripemd160":467,"sha.js":476}],389:[function(require,module,exports){
+},{"./md5":391,"buffer":90,"cipher-base":91,"inherits":435,"ripemd160":468,"sha.js":477}],390:[function(require,module,exports){
(function (Buffer){
'use strict';
var intSize = 4;
@@ -57240,7 +56461,7 @@ function hash(buf, fn, hashSize, bigEndian) {
}
exports.hash = hash;
}).call(this,require("buffer").Buffer)
-},{"buffer":90}],390:[function(require,module,exports){
+},{"buffer":90}],391:[function(require,module,exports){
'use strict';
/*
* A JavaScript implementation of the RSA Data Security, Inc. MD5 Message
@@ -57397,7 +56618,7 @@ function bit_rol(num, cnt)
module.exports = function md5(buf) {
return helpers.hash(buf, core_md5, 16);
};
-},{"./helpers":389}],391:[function(require,module,exports){
+},{"./helpers":390}],392:[function(require,module,exports){
(function (Buffer){
'use strict';
var createHash = require('create-hash/browser');
@@ -57469,7 +56690,7 @@ module.exports = function createHmac(alg, key) {
}
}).call(this,require("buffer").Buffer)
-},{"buffer":90,"create-hash/browser":388,"inherits":434,"stream":483}],392:[function(require,module,exports){
+},{"buffer":90,"create-hash/browser":389,"inherits":435,"stream":484}],393:[function(require,module,exports){
'use strict'
exports.randomBytes = exports.rng = exports.pseudoRandomBytes = exports.prng = require('randombytes')
@@ -57548,7 +56769,7 @@ var publicEncrypt = require('public-encrypt')
}
})
-},{"browserify-cipher":78,"browserify-sign":84,"browserify-sign/algos":83,"create-ecdh":387,"create-hash":388,"create-hmac":391,"diffie-hellman":399,"pbkdf2":446,"public-encrypt":449,"randombytes":455}],393:[function(require,module,exports){
+},{"browserify-cipher":78,"browserify-sign":84,"browserify-sign/algos":83,"create-ecdh":388,"create-hash":389,"create-hmac":392,"diffie-hellman":400,"pbkdf2":447,"public-encrypt":450,"randombytes":456}],394:[function(require,module,exports){
'use strict';
exports.utils = require('./des/utils');
@@ -57557,7 +56778,7 @@ exports.DES = require('./des/des');
exports.CBC = require('./des/cbc');
exports.EDE = require('./des/ede');
-},{"./des/cbc":394,"./des/cipher":395,"./des/des":396,"./des/ede":397,"./des/utils":398}],394:[function(require,module,exports){
+},{"./des/cbc":395,"./des/cipher":396,"./des/des":397,"./des/ede":398,"./des/utils":399}],395:[function(require,module,exports){
'use strict';
var assert = require('minimalistic-assert');
@@ -57624,7 +56845,7 @@ proto._update = function _update(inp, inOff, out, outOff) {
}
};
-},{"inherits":434,"minimalistic-assert":441}],395:[function(require,module,exports){
+},{"inherits":435,"minimalistic-assert":442}],396:[function(require,module,exports){
'use strict';
var assert = require('minimalistic-assert');
@@ -57767,7 +56988,7 @@ Cipher.prototype._finalDecrypt = function _finalDecrypt() {
return this._unpad(out);
};
-},{"minimalistic-assert":441}],396:[function(require,module,exports){
+},{"minimalistic-assert":442}],397:[function(require,module,exports){
'use strict';
var assert = require('minimalistic-assert');
@@ -57912,7 +57133,7 @@ DES.prototype._decrypt = function _decrypt(state, lStart, rStart, out, off) {
utils.rip(l, r, out, off);
};
-},{"../des":393,"inherits":434,"minimalistic-assert":441}],397:[function(require,module,exports){
+},{"../des":394,"inherits":435,"minimalistic-assert":442}],398:[function(require,module,exports){
'use strict';
var assert = require('minimalistic-assert');
@@ -57969,7 +57190,7 @@ EDE.prototype._update = function _update(inp, inOff, out, outOff) {
EDE.prototype._pad = DES.prototype._pad;
EDE.prototype._unpad = DES.prototype._unpad;
-},{"../des":393,"inherits":434,"minimalistic-assert":441}],398:[function(require,module,exports){
+},{"../des":394,"inherits":435,"minimalistic-assert":442}],399:[function(require,module,exports){
'use strict';
exports.readUInt32BE = function readUInt32BE(bytes, off) {
@@ -58227,7 +57448,7 @@ exports.padSplit = function padSplit(num, size, group) {
return out.join(' ');
};
-},{}],399:[function(require,module,exports){
+},{}],400:[function(require,module,exports){
(function (Buffer){
var generatePrime = require('./lib/generatePrime')
var primes = require('./lib/primes.json')
@@ -58273,7 +57494,7 @@ exports.DiffieHellmanGroup = exports.createDiffieHellmanGroup = exports.getDiffi
exports.createDiffieHellman = exports.DiffieHellman = createDiffieHellman
}).call(this,require("buffer").Buffer)
-},{"./lib/dh":400,"./lib/generatePrime":401,"./lib/primes.json":402,"buffer":90}],400:[function(require,module,exports){
+},{"./lib/dh":401,"./lib/generatePrime":402,"./lib/primes.json":403,"buffer":90}],401:[function(require,module,exports){
(function (Buffer){
var BN = require('bn.js');
var MillerRabin = require('miller-rabin');
@@ -58441,7 +57662,7 @@ function formatReturnValue(bn, enc) {
}
}).call(this,require("buffer").Buffer)
-},{"./generatePrime":401,"bn.js":60,"buffer":90,"miller-rabin":440,"randombytes":455}],401:[function(require,module,exports){
+},{"./generatePrime":402,"bn.js":60,"buffer":90,"miller-rabin":441,"randombytes":456}],402:[function(require,module,exports){
var randomBytes = require('randombytes');
module.exports = findPrime;
findPrime.simpleSieve = simpleSieve;
@@ -58548,7 +57769,7 @@ function findPrime(bits, gen) {
}
-},{"bn.js":60,"miller-rabin":440,"randombytes":455}],402:[function(require,module,exports){
+},{"bn.js":60,"miller-rabin":441,"randombytes":456}],403:[function(require,module,exports){
module.exports={
"modp1": {
"gen": "02",
@@ -58583,7 +57804,7 @@ module.exports={
"prime": "ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a92108011a723c12a787e6d788719a10bdba5b2699c327186af4e23c1a946834b6150bda2583e9ca2ad44ce8dbbbc2db04de8ef92e8efc141fbecaa6287c59474e6bc05d99b2964fa090c3a2233ba186515be7ed1f612970cee2d7afb81bdd762170481cd0069127d5b05aa993b4ea988d8fddc186ffb7dc90a6c08f4df435c93402849236c3fab4d27c7026c1d4dcb2602646dec9751e763dba37bdf8ff9406ad9e530ee5db382f413001aeb06a53ed9027d831179727b0865a8918da3edbebcf9b14ed44ce6cbaced4bb1bdb7f1447e6cc254b332051512bd7af426fb8f401378cd2bf5983ca01c64b92ecf032ea15d1721d03f482d7ce6e74fef6d55e702f46980c82b5a84031900b1c9e59e7c97fbec7e8f323a97a7e36cc88be0f1d45b7ff585ac54bd407b22b4154aacc8f6d7ebf48e1d814cc5ed20f8037e0a79715eef29be32806a1d58bb7c5da76f550aa3d8a1fbff0eb19ccb1a313d55cda56c9ec2ef29632387fe8d76e3c0468043e8f663f4860ee12bf2d5b0b7474d6e694f91e6dbe115974a3926f12fee5e438777cb6a932df8cd8bec4d073b931ba3bc832b68d9dd300741fa7bf8afc47ed2576f6936ba424663aab639c5ae4f5683423b4742bf1c978238f16cbe39d652de3fdb8befc848ad922222e04a4037c0713eb57a81a23f0c73473fc646cea306b4bcbc8862f8385ddfa9d4b7fa2c087e879683303ed5bdd3a062b3cf5b3a278a66d2a13f83f44f82ddf310ee074ab6a364597e899a0255dc164f31cc50846851df9ab48195ded7ea1b1d510bd7ee74d73faf36bc31ecfa268359046f4eb879f924009438b481c6cd7889a002ed5ee382bc9190da6fc026e479558e4475677e9aa9e3050e2765694dfc81f56e880b96e7160c980dd98edd3dfffffffffffffffff"
}
}
-},{}],403:[function(require,module,exports){
+},{}],404:[function(require,module,exports){
'use strict';
var elliptic = exports;
@@ -58599,7 +57820,7 @@ elliptic.curves = require('./elliptic/curves');
elliptic.ec = require('./elliptic/ec');
elliptic.eddsa = require('./elliptic/eddsa');
-},{"../package.json":419,"./elliptic/curve":406,"./elliptic/curves":409,"./elliptic/ec":410,"./elliptic/eddsa":413,"./elliptic/hmac-drbg":416,"./elliptic/utils":418,"brorand":61}],404:[function(require,module,exports){
+},{"../package.json":420,"./elliptic/curve":407,"./elliptic/curves":410,"./elliptic/ec":411,"./elliptic/eddsa":414,"./elliptic/hmac-drbg":417,"./elliptic/utils":419,"brorand":61}],405:[function(require,module,exports){
'use strict';
var BN = require('bn.js');
@@ -58630,15 +57851,6 @@ function BaseCurve(type, conf) {
this._wnafT2 = new Array(4);
this._wnafT3 = new Array(4);
this._wnafT4 = new Array(4);
-
- // Generalized Greg Maxwell's trick
- var adjustCount = this.n && this.p.div(this.n);
- if (!adjustCount || adjustCount.cmpn(100) > 0) {
- this.redN = null;
- } else {
- this._maxwellTrick = true;
- this.redN = this.n.toRed(this.red);
- }
}
module.exports = BaseCurve;
@@ -58727,8 +57939,7 @@ BaseCurve.prototype._wnafMul = function _wnafMul(p, k) {
BaseCurve.prototype._wnafMulAdd = function _wnafMulAdd(defW,
points,
coeffs,
- len,
- jacobianResult) {
+ len) {
var wndWidth = this._wnafT1;
var wnd = this._wnafT2;
var naf = this._wnafT3;
@@ -58841,11 +58052,7 @@ BaseCurve.prototype._wnafMulAdd = function _wnafMulAdd(defW,
// Zeroify references
for (var i = 0; i < len; i++)
wnd[i] = null;
-
- if (jacobianResult)
- return acc;
- else
- return acc.toP();
+ return acc.toP();
};
function BasePoint(curve, type) {
@@ -58976,7 +58183,7 @@ BasePoint.prototype.dblp = function dblp(k) {
return r;
};
-},{"../../elliptic":403,"bn.js":60}],405:[function(require,module,exports){
+},{"../../elliptic":404,"bn.js":60}],406:[function(require,module,exports){
'use strict';
var curve = require('../curve');
@@ -59343,11 +58550,7 @@ Point.prototype.mul = function mul(k) {
};
Point.prototype.mulAdd = function mulAdd(k1, p, k2) {
- return this.curve._wnafMulAdd(1, [ this, p ], [ k1, k2 ], 2, false);
-};
-
-Point.prototype.jmulAdd = function jmulAdd(k1, p, k2) {
- return this.curve._wnafMulAdd(1, [ this, p ], [ k1, k2 ], 2, true);
+ return this.curve._wnafMulAdd(1, [ this, p ], [ k1, k2 ], 2);
};
Point.prototype.normalize = function normalize() {
@@ -59388,30 +58591,11 @@ Point.prototype.eq = function eq(other) {
this.getY().cmp(other.getY()) === 0;
};
-Point.prototype.eqXToP = function eqXToP(x) {
- var rx = x.toRed(this.curve.red).redMul(this.z);
- if (this.x.cmp(rx) === 0)
- return true;
-
- var xc = x.clone();
- var t = this.curve.redN.redMul(this.z);
- for (;;) {
- xc.iadd(this.curve.n);
- if (xc.cmp(this.curve.p) >= 0)
- return false;
-
- rx.redIAdd(t);
- if (this.x.cmp(rx) === 0)
- return true;
- }
- return false;
-};
-
// Compatibility with BaseCurve
Point.prototype.toP = Point.prototype.normalize;
Point.prototype.mixedAdd = Point.prototype.add;
-},{"../../elliptic":403,"../curve":406,"bn.js":60,"inherits":434}],406:[function(require,module,exports){
+},{"../../elliptic":404,"../curve":407,"bn.js":60,"inherits":435}],407:[function(require,module,exports){
'use strict';
var curve = exports;
@@ -59421,7 +58605,7 @@ curve.short = require('./short');
curve.mont = require('./mont');
curve.edwards = require('./edwards');
-},{"./base":404,"./edwards":405,"./mont":407,"./short":408}],407:[function(require,module,exports){
+},{"./base":405,"./edwards":406,"./mont":408,"./short":409}],408:[function(require,module,exports){
'use strict';
var curve = require('../curve');
@@ -59582,10 +58766,6 @@ Point.prototype.mulAdd = function mulAdd() {
throw new Error('Not supported on Montgomery curve');
};
-Point.prototype.jumlAdd = function jumlAdd() {
- throw new Error('Not supported on Montgomery curve');
-};
-
Point.prototype.eq = function eq(other) {
return this.getX().cmp(other.getX()) === 0;
};
@@ -59603,7 +58783,7 @@ Point.prototype.getX = function getX() {
return this.x.fromRed();
};
-},{"../../elliptic":403,"../curve":406,"bn.js":60,"inherits":434}],408:[function(require,module,exports){
+},{"../../elliptic":404,"../curve":407,"bn.js":60,"inherits":435}],409:[function(require,module,exports){
'use strict';
var curve = require('../curve');
@@ -59823,7 +59003,7 @@ ShortCurve.prototype.validate = function validate(point) {
};
ShortCurve.prototype._endoWnafMulAdd =
- function _endoWnafMulAdd(points, coeffs, jacobianResult) {
+ function _endoWnafMulAdd(points, coeffs) {
var npoints = this._endoWnafT1;
var ncoeffs = this._endoWnafT2;
for (var i = 0; i < points.length; i++) {
@@ -59845,7 +59025,7 @@ ShortCurve.prototype._endoWnafMulAdd =
ncoeffs[i * 2] = split.k1;
ncoeffs[i * 2 + 1] = split.k2;
}
- var res = this._wnafMulAdd(1, npoints, ncoeffs, i * 2, jacobianResult);
+ var res = this._wnafMulAdd(1, npoints, ncoeffs, i * 2);
// Clean-up references to points and coefficients
for (var j = 0; j < i * 2; j++) {
@@ -60046,15 +59226,6 @@ Point.prototype.mulAdd = function mulAdd(k1, p2, k2) {
return this.curve._wnafMulAdd(1, points, coeffs, 2);
};
-Point.prototype.jmulAdd = function jmulAdd(k1, p2, k2) {
- var points = [ this, p2 ];
- var coeffs = [ k1, k2 ];
- if (this.curve.endo)
- return this.curve._endoWnafMulAdd(points, coeffs, true);
- else
- return this.curve._wnafMulAdd(1, points, coeffs, 2, true);
-};
-
Point.prototype.eq = function eq(p) {
return this === p ||
this.inf === p.inf &&
@@ -60510,26 +59681,6 @@ JPoint.prototype.eq = function eq(p) {
return this.y.redMul(pz3).redISub(p.y.redMul(z3)).cmpn(0) === 0;
};
-JPoint.prototype.eqXToP = function eqXToP(x) {
- var zs = this.z.redSqr();
- var rx = x.toRed(this.curve.red).redMul(zs);
- if (this.x.cmp(rx) === 0)
- return true;
-
- var xc = x.clone();
- var t = this.curve.redN.redMul(zs);
- for (;;) {
- xc.iadd(this.curve.n);
- if (xc.cmp(this.curve.p) >= 0)
- return false;
-
- rx.redIAdd(t);
- if (this.x.cmp(rx) === 0)
- return true;
- }
- return false;
-};
-
JPoint.prototype.inspect = function inspect() {
if (this.isInfinity())
return '';
@@ -60543,7 +59694,7 @@ JPoint.prototype.isInfinity = function isInfinity() {
return this.z.cmpn(0) === 0;
};
-},{"../../elliptic":403,"../curve":406,"bn.js":60,"inherits":434}],409:[function(require,module,exports){
+},{"../../elliptic":404,"../curve":407,"bn.js":60,"inherits":435}],410:[function(require,module,exports){
'use strict';
var curves = exports;
@@ -60750,7 +59901,7 @@ defineCurve('secp256k1', {
]
});
-},{"../elliptic":403,"./precomputed/secp256k1":417,"hash.js":426}],410:[function(require,module,exports){
+},{"../elliptic":404,"./precomputed/secp256k1":418,"hash.js":427}],411:[function(require,module,exports){
'use strict';
var BN = require('bn.js');
@@ -60919,25 +60070,11 @@ EC.prototype.verify = function verify(msg, signature, key, enc) {
var u1 = sinv.mul(msg).umod(this.n);
var u2 = sinv.mul(r).umod(this.n);
- if (!this.curve._maxwellTrick) {
- var p = this.g.mulAdd(u1, key.getPublic(), u2);
- if (p.isInfinity())
- return false;
-
- return p.getX().umod(this.n).cmp(r) === 0;
- }
-
- // NOTE: Greg Maxwell's trick, inspired by:
- // https://git.io/vad3K
-
- var p = this.g.jmulAdd(u1, key.getPublic(), u2);
+ var p = this.g.mulAdd(u1, key.getPublic(), u2);
if (p.isInfinity())
return false;
- // Compare `p.x` of Jacobian point with `r`,
- // this will do `p.x == r * p.z^2` instead of multiplying `p.x` by the
- // inverse of `p.z^2`
- return p.eqXToP(r);
+ return p.getX().umod(this.n).cmp(r) === 0;
};
EC.prototype.recoverPubKey = function(msg, signature, j, enc) {
@@ -60988,7 +60125,7 @@ EC.prototype.getKeyRecoveryParam = function(e, signature, Q, enc) {
throw new Error('Unable to find valid recovery factor');
};
-},{"../../elliptic":403,"./key":411,"./signature":412,"bn.js":60}],411:[function(require,module,exports){
+},{"../../elliptic":404,"./key":412,"./signature":413,"bn.js":60}],412:[function(require,module,exports){
'use strict';
var BN = require('bn.js');
@@ -61097,7 +60234,7 @@ KeyPair.prototype.inspect = function inspect() {
' pub: ' + (this.pub && this.pub.inspect()) + ' >';
};
-},{"bn.js":60}],412:[function(require,module,exports){
+},{"bn.js":60}],413:[function(require,module,exports){
'use strict';
var BN = require('bn.js');
@@ -61234,7 +60371,7 @@ Signature.prototype.toDER = function toDER(enc) {
return utils.encode(res, enc);
};
-},{"../../elliptic":403,"bn.js":60}],413:[function(require,module,exports){
+},{"../../elliptic":404,"bn.js":60}],414:[function(require,module,exports){
'use strict';
var hash = require('hash.js');
@@ -61354,7 +60491,7 @@ EDDSA.prototype.isPoint = function isPoint(val) {
return val instanceof this.pointClass;
};
-},{"../../elliptic":403,"./key":414,"./signature":415,"hash.js":426}],414:[function(require,module,exports){
+},{"../../elliptic":404,"./key":415,"./signature":416,"hash.js":427}],415:[function(require,module,exports){
'use strict';
var elliptic = require('../../elliptic');
@@ -61452,7 +60589,7 @@ KeyPair.prototype.getPublic = function getPublic(enc) {
module.exports = KeyPair;
-},{"../../elliptic":403}],415:[function(require,module,exports){
+},{"../../elliptic":404}],416:[function(require,module,exports){
'use strict';
var BN = require('bn.js');
@@ -61520,7 +60657,7 @@ Signature.prototype.toHex = function toHex() {
module.exports = Signature;
-},{"../../elliptic":403,"bn.js":60}],416:[function(require,module,exports){
+},{"../../elliptic":404,"bn.js":60}],417:[function(require,module,exports){
'use strict';
var hash = require('hash.js');
@@ -61636,7 +60773,7 @@ HmacDRBG.prototype.generate = function generate(len, enc, add, addEnc) {
return utils.encode(res, enc);
};
-},{"../elliptic":403,"hash.js":426}],417:[function(require,module,exports){
+},{"../elliptic":404,"hash.js":427}],418:[function(require,module,exports){
module.exports = {
doubles: {
step: 4,
@@ -62418,7 +61555,7 @@ module.exports = {
}
};
-},{}],418:[function(require,module,exports){
+},{}],419:[function(require,module,exports){
'use strict';
var utils = exports;
@@ -62592,23 +61729,23 @@ function intFromLE(bytes) {
utils.intFromLE = intFromLE;
-},{"bn.js":60}],419:[function(require,module,exports){
+},{"bn.js":60}],420:[function(require,module,exports){
module.exports={
"_args": [
[
"elliptic@^6.0.0",
- "C:\\Users\\Kosala\\Documents\\GitHub\\etherwallet\\node_modules\\browserify-sign"
+ "/Volumes/Macintosh HD/Users/TayTay/Documents/Dropbox/local-dev/etherwallet/node_modules/browserify-sign"
]
],
"_from": "elliptic@>=6.0.0 <7.0.0",
- "_id": "elliptic@6.3.1",
+ "_id": "elliptic@6.2.8",
"_inCache": true,
"_installable": true,
"_location": "/elliptic",
"_nodeVersion": "6.0.0",
"_npmOperationalInternal": {
- "host": "packages-16-east.internal.npmjs.com",
- "tmp": "tmp/elliptic-6.3.1.tgz_1465921413402_0.5202967382501811"
+ "host": "packages-12-west.internal.npmjs.com",
+ "tmp": "tmp/elliptic-6.2.8.tgz_1464746004719_0.6379144776146859"
},
"_npmUser": {
"email": "fedor@indutny.com",
@@ -62629,11 +61766,11 @@ module.exports={
"/create-ecdh",
"/secp256k1"
],
- "_resolved": "https://registry.npmjs.org/elliptic/-/elliptic-6.3.1.tgz",
- "_shasum": "17781f2109ab0ec686b146bdcff5d2e8c6aeceda",
+ "_resolved": "https://registry.npmjs.org/elliptic/-/elliptic-6.2.8.tgz",
+ "_shasum": "44a25b3d1550bebb74d0b6d22d89940206b51739",
"_shrinkwrap": null,
"_spec": "elliptic@^6.0.0",
- "_where": "C:\\Users\\Kosala\\Documents\\GitHub\\etherwallet\\node_modules\\browserify-sign",
+ "_where": "/Volumes/Macintosh HD/Users/TayTay/Documents/Dropbox/local-dev/etherwallet/node_modules/browserify-sign",
"author": {
"email": "fedor@indutny.com",
"name": "Fedor Indutny"
@@ -62642,7 +61779,7 @@ module.exports={
"url": "https://github.com/indutny/elliptic/issues"
},
"dependencies": {
- "bn.js": "^4.4.0",
+ "bn.js": "^4.0.0",
"brorand": "^1.0.1",
"hash.js": "^1.0.0",
"inherits": "^2.0.1"
@@ -62665,13 +61802,13 @@ module.exports={
},
"directories": {},
"dist": {
- "shasum": "17781f2109ab0ec686b146bdcff5d2e8c6aeceda",
- "tarball": "https://registry.npmjs.org/elliptic/-/elliptic-6.3.1.tgz"
+ "shasum": "44a25b3d1550bebb74d0b6d22d89940206b51739",
+ "tarball": "https://registry.npmjs.org/elliptic/-/elliptic-6.2.8.tgz"
},
"files": [
"lib"
],
- "gitHead": "c53f5cf3d832c0073eb4a4ed423a464cbce68f3e",
+ "gitHead": "236f37395bdf9e4af1dfc8e84f6353bce540b93e",
"homepage": "https://github.com/indutny/elliptic",
"keywords": [
"EC",
@@ -62702,10 +61839,10 @@ module.exports={
"unit": "istanbul test _mocha --reporter=spec test/index.js",
"version": "grunt dist && git add dist/"
},
- "version": "6.3.1"
+ "version": "6.2.8"
}
-},{}],420:[function(require,module,exports){
+},{}],421:[function(require,module,exports){
module.exports={
"genesisGasLimit": {
"v": 5000,
@@ -62938,12 +62075,11 @@ module.exports={
}
}
-},{}],421:[function(require,module,exports){
+},{}],422:[function(require,module,exports){
module.exports = require('./params.json')
-},{"./params.json":420}],422:[function(require,module,exports){
-(function (Buffer){
-'use strict'
+},{"./params.json":421}],423:[function(require,module,exports){
+(function (global,Buffer){
const ethUtil = require('ethereumjs-util')
const fees = require('ethereum-common/params')
const BN = ethUtil.BN
@@ -62951,6 +62087,10 @@ const BN = ethUtil.BN
// secp256k1n/2
const N_DIV_2 = new BN('7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a0', 16)
+// give browser access to Buffers
+global.Buffer = Buffer
+global.ethUtil = ethUtil
+
/**
* Creates a new transaction object
* @constructor
@@ -62979,7 +62119,7 @@ const N_DIV_2 = new BN('7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46
* @prop {Buffer} r EC signature parameter
* @prop {Buffer} s EC recovery ID
*/
-const Transaction = module.exports = function (data) {
+var Transaction = module.exports = function (data) {
// Define Properties
const fields = [{
name: 'nonce',
@@ -63064,7 +62204,7 @@ Transaction.prototype.toCreationAddress = function () {
* @return {Buffer}
*/
Transaction.prototype.hash = function (signature) {
- let toHash
+ var toHash
if (typeof signature === 'undefined') {
signature = true
@@ -63085,7 +62225,7 @@ Transaction.prototype.getSenderAddress = function () {
if (this._from) {
return this._from
}
- const pubkey = this.getSenderPublicKey()
+ var pubkey = this.getSenderPublicKey()
this._from = ethUtil.publicToAddress(pubkey)
return this._from
}
@@ -63109,7 +62249,7 @@ Transaction.prototype.getSenderPublicKey = function () {
* @return {Boolean}
*/
Transaction.prototype.verifySignature = function () {
- const msgHash = this.hash(false)
+ var msgHash = this.hash(false)
// All transaction signatures whose s-value is greater than secp256k1n/2 are considered invalid.
if (this._homestead && new BN(this.s).cmp(N_DIV_2) === 1) {
@@ -63131,8 +62271,8 @@ Transaction.prototype.verifySignature = function () {
* @param {Buffer} privateKey
*/
Transaction.prototype.sign = function (privateKey) {
- const msgHash = this.hash(false)
- const sig = ethUtil.ecsign(msgHash, privateKey)
+ var msgHash = this.hash(false)
+ var sig = ethUtil.ecsign(msgHash, privateKey)
Object.assign(this, sig)
}
@@ -63143,7 +62283,7 @@ Transaction.prototype.sign = function (privateKey) {
*/
Transaction.prototype.getDataFee = function () {
const data = this.raw[5]
- const cost = new BN(0)
+ var cost = new BN(0)
for (var i = 0; i < data.length; i++) {
data[i] === 0 ? cost.iaddn(fees.txDataZeroGas.v) : cost.iaddn(fees.txDataNonZeroGas.v)
}
@@ -63156,7 +62296,7 @@ Transaction.prototype.getDataFee = function () {
* @return {BN}
*/
Transaction.prototype.getBaseFee = function () {
- const fee = this.getDataFee().iaddn(fees.txGas.v)
+ var fee = this.getDataFee().iaddn(fees.txGas.v)
if (this._homestead && this.toCreationAddress()) {
fee.iaddn(fees.txCreation.v)
}
@@ -63181,13 +62321,13 @@ Transaction.prototype.getUpfrontCost = function () {
* @return {Boolean|String}
*/
Transaction.prototype.validate = function (stringError) {
- const errors = []
+ var errors = []
if (!this.verifySignature()) {
errors.push('Invalid Signature')
}
if (this.getBaseFee().cmp(new BN(this.gasLimit)) > 0) {
- errors.push([`gas limit is to low. Need at least ${this.getBaseFee()}`])
+ errors.push(['gas limit is to low. Need at least ' + this.getBaseFee()])
}
if (stringError === undefined || stringError === false) {
@@ -63197,8 +62337,8 @@ Transaction.prototype.validate = function (stringError) {
}
}
-}).call(this,require("buffer").Buffer)
-},{"buffer":90,"ethereum-common/params":421,"ethereumjs-util":423}],423:[function(require,module,exports){
+}).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {},require("buffer").Buffer)
+},{"buffer":90,"ethereum-common/params":422,"ethereumjs-util":424}],424:[function(require,module,exports){
(function (Buffer){
const SHA3 = require('keccakjs')
const secp256k1 = require('secp256k1')
@@ -63608,42 +62748,6 @@ exports.ecrecover = function (msgHash, v, r, s) {
return secp256k1.publicKeyConvert(senderPubKey, false).slice(1)
}
-/**
- * Convert signature parameters into the format of `eth_sign` RPC method
- * @method toRpcSig
- * @param {Number} v
- * @param {Buffer} r
- * @param {Buffer} s
- * @return {String} sig
- */
-exports.toRpcSig = function (v, r, s) {
- // geth (and the RPC eth_sign method) uses the 65 byte format used by Bitcoin
- // FIXME: this might change in the future - https://github.com/ethereum/go-ethereum/issues/2053
- return exports.bufferToHex(Buffer.concat([ r, s, exports.toBuffer(v - 27) ]))
-}
-
-/**
- * Convert signature format of the `eth_sign` RPC method to signature parameters
- * @method fromRpcSig
- * @param {String} sig
- * @return {Object}
- */
-exports.fromRpcSig = function (sig) {
- sig = exports.toBuffer(sig)
-
- var v = sig[64]
- // support both versions of `eth_sign` responses
- if (v < 27) {
- v += 27
- }
-
- return {
- v: v,
- r: sig.slice(0, 32),
- s: sig.slice(32, 64)
- }
-}
-
/**
* Returns the ethereum address of a given private key
* @method privateToAddress
@@ -63903,7 +63007,7 @@ exports.defineProperties = function (self, fields, data) {
}
}).call(this,require("buffer").Buffer)
-},{"assert":55,"bn.js":60,"buffer":90,"create-hash":388,"keccakjs":438,"rlp":468,"secp256k1":470}],424:[function(require,module,exports){
+},{"assert":55,"bn.js":60,"buffer":90,"create-hash":389,"keccakjs":439,"rlp":469,"secp256k1":471}],425:[function(require,module,exports){
// Copyright Joyent, Inc. and other Node contributors.
//
// Permission is hereby granted, free of charge, to any person obtaining a
@@ -63963,12 +63067,8 @@ EventEmitter.prototype.emit = function(type) {
er = arguments[1];
if (er instanceof Error) {
throw er; // Unhandled 'error' event
- } else {
- // At least give some kind of context to the user
- var err = new Error('Uncaught, unspecified "error" event. (' + er + ')');
- err.context = er;
- throw err;
}
+ throw TypeError('Uncaught, unspecified "error" event.');
}
}
@@ -64207,7 +63307,7 @@ function isUndefined(arg) {
return arg === void 0;
}
-},{}],425:[function(require,module,exports){
+},{}],426:[function(require,module,exports){
(function (Buffer){
var md5 = require('create-hash/md5')
module.exports = EVP_BytesToKey
@@ -64279,7 +63379,7 @@ function EVP_BytesToKey (password, salt, keyLen, ivLen) {
}
}).call(this,require("buffer").Buffer)
-},{"buffer":90,"create-hash/md5":390}],426:[function(require,module,exports){
+},{"buffer":90,"create-hash/md5":391}],427:[function(require,module,exports){
var hash = exports;
hash.utils = require('./hash/utils');
@@ -64296,7 +63396,7 @@ hash.sha384 = hash.sha.sha384;
hash.sha512 = hash.sha.sha512;
hash.ripemd160 = hash.ripemd.ripemd160;
-},{"./hash/common":427,"./hash/hmac":428,"./hash/ripemd":429,"./hash/sha":430,"./hash/utils":431}],427:[function(require,module,exports){
+},{"./hash/common":428,"./hash/hmac":429,"./hash/ripemd":430,"./hash/sha":431,"./hash/utils":432}],428:[function(require,module,exports){
var hash = require('../hash');
var utils = hash.utils;
var assert = utils.assert;
@@ -64389,7 +63489,7 @@ BlockHash.prototype._pad = function pad() {
return res;
};
-},{"../hash":426}],428:[function(require,module,exports){
+},{"../hash":427}],429:[function(require,module,exports){
var hmac = exports;
var hash = require('../hash');
@@ -64439,7 +63539,7 @@ Hmac.prototype.digest = function digest(enc) {
return this.outer.digest(enc);
};
-},{"../hash":426}],429:[function(require,module,exports){
+},{"../hash":427}],430:[function(require,module,exports){
var hash = require('../hash');
var utils = hash.utils;
@@ -64585,7 +63685,7 @@ var sh = [
8, 5, 12, 9, 12, 5, 14, 6, 8, 13, 6, 5, 15, 13, 11, 11
];
-},{"../hash":426}],430:[function(require,module,exports){
+},{"../hash":427}],431:[function(require,module,exports){
var hash = require('../hash');
var utils = hash.utils;
var assert = utils.assert;
@@ -65151,7 +64251,7 @@ function g1_512_lo(xh, xl) {
return r;
}
-},{"../hash":426}],431:[function(require,module,exports){
+},{"../hash":427}],432:[function(require,module,exports){
var utils = exports;
var inherits = require('inherits');
@@ -65410,7 +64510,7 @@ function shr64_lo(ah, al, num) {
};
exports.shr64_lo = shr64_lo;
-},{"inherits":434}],432:[function(require,module,exports){
+},{"inherits":435}],433:[function(require,module,exports){
exports.read = function (buffer, offset, isLE, mLen, nBytes) {
var e, m
var eLen = nBytes * 8 - mLen - 1
@@ -65496,7 +64596,7 @@ exports.write = function (buffer, value, offset, isLE, mLen, nBytes) {
buffer[offset + i - d] |= s * 128
}
-},{}],433:[function(require,module,exports){
+},{}],434:[function(require,module,exports){
var indexOf = [].indexOf;
@@ -65507,7 +64607,7 @@ module.exports = function(arr, obj){
}
return -1;
};
-},{}],434:[function(require,module,exports){
+},{}],435:[function(require,module,exports){
if (typeof Object.create === 'function') {
// implementation from standard node.js 'util' module
module.exports = function inherits(ctor, superCtor) {
@@ -65532,37 +64632,33 @@ if (typeof Object.create === 'function') {
}
}
-},{}],435:[function(require,module,exports){
-/*!
- * Determine if an object is a Buffer
+},{}],436:[function(require,module,exports){
+/**
+ * Determine if an object is Buffer
*
- * @author Feross Aboukhadijeh
- * @license MIT
+ * Author: Feross Aboukhadijeh
+ * License: MIT
+ *
+ * `npm install is-buffer`
*/
-// The _isBuffer check is for Safari 5-7 support, because it's missing
-// Object.prototype.constructor. Remove this eventually
module.exports = function (obj) {
- return obj != null && (isBuffer(obj) || isSlowBuffer(obj) || !!obj._isBuffer)
-}
-
-function isBuffer (obj) {
- return !!obj.constructor && typeof obj.constructor.isBuffer === 'function' && obj.constructor.isBuffer(obj)
+ return !!(obj != null &&
+ (obj._isBuffer || // For Safari 5-7 (missing Object.prototype.constructor)
+ (obj.constructor &&
+ typeof obj.constructor.isBuffer === 'function' &&
+ obj.constructor.isBuffer(obj))
+ ))
}
-// For Node v0.10 support. Remove this eventually.
-function isSlowBuffer (obj) {
- return typeof obj.readFloatLE === 'function' && typeof obj.slice === 'function' && isBuffer(obj.slice(0, 0))
-}
-
-},{}],436:[function(require,module,exports){
+},{}],437:[function(require,module,exports){
var toString = {}.toString;
module.exports = Array.isArray || function (arr) {
return toString.call(arr) == '[object Array]';
};
-},{}],437:[function(require,module,exports){
+},{}],438:[function(require,module,exports){
(function (global){
/*
* js-sha3 v0.3.1
@@ -65998,10 +65094,10 @@ module.exports = Array.isArray || function (arr) {
}(this));
}).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {})
-},{}],438:[function(require,module,exports){
+},{}],439:[function(require,module,exports){
module.exports = require('browserify-sha3').SHA3Hash
-},{"browserify-sha3":82}],439:[function(require,module,exports){
+},{"browserify-sha3":82}],440:[function(require,module,exports){
(function (global){
/**
* marked - a markdown parser
@@ -67099,8 +66195,7 @@ function escape(html, encode) {
}
function unescape(html) {
- // explicitly match decimal, hex, and named HTML entities
- return html.replace(/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/g, function(_, n) {
+ return html.replace(/&([#\w]+);/g, function(_, n) {
n = n.toLowerCase();
if (n === 'colon') return ':';
if (n.charAt(0) === '#') {
@@ -67291,7 +66386,7 @@ if (typeof module !== 'undefined' && typeof exports === 'object') {
}());
}).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {})
-},{}],440:[function(require,module,exports){
+},{}],441:[function(require,module,exports){
var bn = require('bn.js');
var brorand = require('brorand');
@@ -67406,7 +66501,7 @@ MillerRabin.prototype.getDivisor = function getDivisor(n, k) {
return false;
};
-},{"bn.js":60,"brorand":61}],441:[function(require,module,exports){
+},{"bn.js":60,"brorand":61}],442:[function(require,module,exports){
module.exports = assert;
function assert(val, msg) {
@@ -67419,7 +66514,7 @@ assert.equal = function assertEqual(l, r, msg) {
throw new Error(msg || ('Assertion failed: ' + l + ' != ' + r));
};
-},{}],442:[function(require,module,exports){
+},{}],443:[function(require,module,exports){
module.exports={"2.16.840.1.101.3.4.1.1": "aes-128-ecb",
"2.16.840.1.101.3.4.1.2": "aes-128-cbc",
"2.16.840.1.101.3.4.1.3": "aes-128-ofb",
@@ -67433,7 +66528,7 @@ module.exports={"2.16.840.1.101.3.4.1.1": "aes-128-ecb",
"2.16.840.1.101.3.4.1.43": "aes-256-ofb",
"2.16.840.1.101.3.4.1.44": "aes-256-cfb"
}
-},{}],443:[function(require,module,exports){
+},{}],444:[function(require,module,exports){
// from https://github.com/indutny/self-signed/blob/gh-pages/lib/asn1.js
// Fedor, you are amazing.
@@ -67552,7 +66647,7 @@ exports.signature = asn1.define('signature', function () {
)
})
-},{"asn1.js":41}],444:[function(require,module,exports){
+},{"asn1.js":41}],445:[function(require,module,exports){
(function (Buffer){
// adapted from https://github.com/apatil/pemstrip
var findProc = /Proc-Type: 4,ENCRYPTED\r?\nDEK-Info: AES-((?:128)|(?:192)|(?:256))-CBC,([0-9A-H]+)\r?\n\r?\n([0-9A-z\n\r\+\/\=]+)\r?\n/m
@@ -67586,7 +66681,7 @@ module.exports = function (okey, password) {
}
}).call(this,require("buffer").Buffer)
-},{"browserify-aes":65,"buffer":90,"evp_bytestokey":425}],445:[function(require,module,exports){
+},{"browserify-aes":65,"buffer":90,"evp_bytestokey":426}],446:[function(require,module,exports){
(function (Buffer){
var asn1 = require('./asn1')
var aesid = require('./aesid.json')
@@ -67691,7 +66786,7 @@ function decrypt (data, password) {
}
}).call(this,require("buffer").Buffer)
-},{"./aesid.json":442,"./asn1":443,"./fixProc":444,"browserify-aes":65,"buffer":90,"pbkdf2":446}],446:[function(require,module,exports){
+},{"./aesid.json":443,"./asn1":444,"./fixProc":445,"browserify-aes":65,"buffer":90,"pbkdf2":447}],447:[function(require,module,exports){
(function (Buffer){
var createHmac = require('create-hmac')
var MAX_ALLOC = Math.pow(2, 30) - 1 // default in iojs
@@ -67775,7 +66870,7 @@ function pbkdf2Sync (password, salt, iterations, keylen, digest) {
}
}).call(this,require("buffer").Buffer)
-},{"buffer":90,"create-hmac":391}],447:[function(require,module,exports){
+},{"buffer":90,"create-hmac":392}],448:[function(require,module,exports){
(function (process){
'use strict';
@@ -67822,48 +66917,15 @@ function nextTick(fn, arg1, arg2, arg3) {
}
}).call(this,require('_process'))
-},{"_process":448}],448:[function(require,module,exports){
+},{"_process":449}],449:[function(require,module,exports){
// shim for using process in browser
-var process = module.exports = {};
-// cached from whatever global is present so that test runners that stub it
-// don't break things. But we need to wrap it in a try catch in case it is
-// wrapped in strict mode code which doesn't define any globals. It's inside a
-// function because try/catches deoptimize in certain engines.
+var process = module.exports = {};
-var cachedSetTimeout;
-var cachedClearTimeout;
+// cached from whatever global is present so that test runners that stub it don't break things.
+var cachedSetTimeout = setTimeout;
+var cachedClearTimeout = clearTimeout;
-(function () {
- try {
- cachedSetTimeout = setTimeout;
- } catch (e) {
- cachedSetTimeout = function () {
- throw new Error('setTimeout is not defined');
- }
- }
- try {
- cachedClearTimeout = clearTimeout;
- } catch (e) {
- cachedClearTimeout = function () {
- throw new Error('clearTimeout is not defined');
- }
- }
-} ())
-function runTimeout(fun) {
- if (cachedSetTimeout === setTimeout) {
- return setTimeout(fun, 0);
- } else {
- return cachedSetTimeout.call(null, fun, 0);
- }
-}
-function runClearTimeout(marker) {
- if (cachedClearTimeout === clearTimeout) {
- clearTimeout(marker);
- } else {
- cachedClearTimeout.call(null, marker);
- }
-}
var queue = [];
var draining = false;
var currentQueue;
@@ -67888,7 +66950,7 @@ function drainQueue() {
if (draining) {
return;
}
- var timeout = runTimeout(cleanUpNextTick);
+ var timeout = cachedSetTimeout(cleanUpNextTick);
draining = true;
var len = queue.length;
@@ -67905,7 +66967,7 @@ function drainQueue() {
}
currentQueue = null;
draining = false;
- runClearTimeout(timeout);
+ cachedClearTimeout(timeout);
}
process.nextTick = function (fun) {
@@ -67917,7 +66979,7 @@ process.nextTick = function (fun) {
}
queue.push(new Item(fun, args));
if (queue.length === 1 && !draining) {
- runTimeout(drainQueue);
+ cachedSetTimeout(drainQueue, 0);
}
};
@@ -67956,7 +67018,7 @@ process.chdir = function (dir) {
};
process.umask = function() { return 0; };
-},{}],449:[function(require,module,exports){
+},{}],450:[function(require,module,exports){
exports.publicEncrypt = require('./publicEncrypt');
exports.privateDecrypt = require('./privateDecrypt');
@@ -67967,7 +67029,7 @@ exports.privateEncrypt = function privateEncrypt(key, buf) {
exports.publicDecrypt = function publicDecrypt(key, buf) {
return exports.privateDecrypt(key, buf, true);
};
-},{"./privateDecrypt":451,"./publicEncrypt":452}],450:[function(require,module,exports){
+},{"./privateDecrypt":452,"./publicEncrypt":453}],451:[function(require,module,exports){
(function (Buffer){
var createHash = require('create-hash');
module.exports = function (seed, len) {
@@ -67986,7 +67048,7 @@ function i2ops(c) {
return out;
}
}).call(this,require("buffer").Buffer)
-},{"buffer":90,"create-hash":388}],451:[function(require,module,exports){
+},{"buffer":90,"create-hash":389}],452:[function(require,module,exports){
(function (Buffer){
var parseKeys = require('parse-asn1');
var mgf = require('./mgf');
@@ -68097,7 +67159,7 @@ function compare(a, b){
return dif;
}
}).call(this,require("buffer").Buffer)
-},{"./mgf":450,"./withPublic":453,"./xor":454,"bn.js":60,"browserify-rsa":81,"buffer":90,"create-hash":388,"parse-asn1":445}],452:[function(require,module,exports){
+},{"./mgf":451,"./withPublic":454,"./xor":455,"bn.js":60,"browserify-rsa":81,"buffer":90,"create-hash":389,"parse-asn1":446}],453:[function(require,module,exports){
(function (Buffer){
var parseKeys = require('parse-asn1');
var randomBytes = require('randombytes');
@@ -68195,7 +67257,7 @@ function nonZero(len, crypto) {
return out;
}
}).call(this,require("buffer").Buffer)
-},{"./mgf":450,"./withPublic":453,"./xor":454,"bn.js":60,"browserify-rsa":81,"buffer":90,"create-hash":388,"parse-asn1":445,"randombytes":455}],453:[function(require,module,exports){
+},{"./mgf":451,"./withPublic":454,"./xor":455,"bn.js":60,"browserify-rsa":81,"buffer":90,"create-hash":389,"parse-asn1":446,"randombytes":456}],454:[function(require,module,exports){
(function (Buffer){
var bn = require('bn.js');
function withPublic(paddedMsg, key) {
@@ -68208,7 +67270,7 @@ function withPublic(paddedMsg, key) {
module.exports = withPublic;
}).call(this,require("buffer").Buffer)
-},{"bn.js":60,"buffer":90}],454:[function(require,module,exports){
+},{"bn.js":60,"buffer":90}],455:[function(require,module,exports){
module.exports = function xor(a, b) {
var len = a.length;
var i = -1;
@@ -68217,7 +67279,7 @@ module.exports = function xor(a, b) {
}
return a
};
-},{}],455:[function(require,module,exports){
+},{}],456:[function(require,module,exports){
(function (process,global,Buffer){
'use strict'
@@ -68257,10 +67319,10 @@ function randomBytes (size, cb) {
}
}).call(this,require('_process'),typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {},require("buffer").Buffer)
-},{"_process":448,"buffer":90}],456:[function(require,module,exports){
+},{"_process":449,"buffer":90}],457:[function(require,module,exports){
module.exports = require("./lib/_stream_duplex.js")
-},{"./lib/_stream_duplex.js":457}],457:[function(require,module,exports){
+},{"./lib/_stream_duplex.js":458}],458:[function(require,module,exports){
// a duplex stream is just a stream that is both readable and writable.
// Since JS doesn't have multiple prototypal inheritance, this class
// prototypally inherits from Readable, and then parasitically from
@@ -68336,7 +67398,7 @@ function forEach(xs, f) {
f(xs[i], i);
}
}
-},{"./_stream_readable":459,"./_stream_writable":461,"core-util-is":386,"inherits":434,"process-nextick-args":447}],458:[function(require,module,exports){
+},{"./_stream_readable":460,"./_stream_writable":462,"core-util-is":387,"inherits":435,"process-nextick-args":448}],459:[function(require,module,exports){
// a passthrough stream.
// basically just the most minimal sort of Transform stream.
// Every written chunk gets output as-is.
@@ -68363,7 +67425,7 @@ function PassThrough(options) {
PassThrough.prototype._transform = function (chunk, encoding, cb) {
cb(null, chunk);
};
-},{"./_stream_transform":460,"core-util-is":386,"inherits":434}],459:[function(require,module,exports){
+},{"./_stream_transform":461,"core-util-is":387,"inherits":435}],460:[function(require,module,exports){
(function (process){
'use strict';
@@ -69259,7 +68321,7 @@ function indexOf(xs, x) {
return -1;
}
}).call(this,require('_process'))
-},{"./_stream_duplex":457,"_process":448,"buffer":90,"buffer-shims":88,"core-util-is":386,"events":424,"inherits":434,"isarray":436,"process-nextick-args":447,"string_decoder/":484,"util":62}],460:[function(require,module,exports){
+},{"./_stream_duplex":458,"_process":449,"buffer":90,"buffer-shims":88,"core-util-is":387,"events":425,"inherits":435,"isarray":437,"process-nextick-args":448,"string_decoder/":485,"util":62}],461:[function(require,module,exports){
// a transform stream is a readable/writable stream where you do
// something with the data. Sometimes it's called a "filter",
// but that's not a great name for it, since that implies a thing where
@@ -69440,7 +68502,7 @@ function done(stream, er) {
return stream.push(null);
}
-},{"./_stream_duplex":457,"core-util-is":386,"inherits":434}],461:[function(require,module,exports){
+},{"./_stream_duplex":458,"core-util-is":387,"inherits":435}],462:[function(require,module,exports){
(function (process){
// A bit simpler than readable streams.
// Implement an async ._write(chunk, encoding, cb), and it'll handle all
@@ -69969,10 +69031,10 @@ function CorkedRequest(state) {
};
}
}).call(this,require('_process'))
-},{"./_stream_duplex":457,"_process":448,"buffer":90,"buffer-shims":88,"core-util-is":386,"events":424,"inherits":434,"process-nextick-args":447,"util-deprecate":485}],462:[function(require,module,exports){
+},{"./_stream_duplex":458,"_process":449,"buffer":90,"buffer-shims":88,"core-util-is":387,"events":425,"inherits":435,"process-nextick-args":448,"util-deprecate":486}],463:[function(require,module,exports){
module.exports = require("./lib/_stream_passthrough.js")
-},{"./lib/_stream_passthrough.js":458}],463:[function(require,module,exports){
+},{"./lib/_stream_passthrough.js":459}],464:[function(require,module,exports){
(function (process){
var Stream = (function (){
try {
@@ -69992,13 +69054,13 @@ if (!process.browser && process.env.READABLE_STREAM === 'disable' && Stream) {
}
}).call(this,require('_process'))
-},{"./lib/_stream_duplex.js":457,"./lib/_stream_passthrough.js":458,"./lib/_stream_readable.js":459,"./lib/_stream_transform.js":460,"./lib/_stream_writable.js":461,"_process":448}],464:[function(require,module,exports){
+},{"./lib/_stream_duplex.js":458,"./lib/_stream_passthrough.js":459,"./lib/_stream_readable.js":460,"./lib/_stream_transform.js":461,"./lib/_stream_writable.js":462,"_process":449}],465:[function(require,module,exports){
module.exports = require("./lib/_stream_transform.js")
-},{"./lib/_stream_transform.js":460}],465:[function(require,module,exports){
+},{"./lib/_stream_transform.js":461}],466:[function(require,module,exports){
module.exports = require("./lib/_stream_writable.js")
-},{"./lib/_stream_writable.js":461}],466:[function(require,module,exports){
+},{"./lib/_stream_writable.js":462}],467:[function(require,module,exports){
(function (process,global){
/**
* Copyright (c) 2014, Facebook, Inc.
@@ -70670,7 +69732,7 @@ module.exports = require("./lib/_stream_writable.js")
);
}).call(this,require('_process'),typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {})
-},{"_process":448}],467:[function(require,module,exports){
+},{"_process":449}],468:[function(require,module,exports){
(function (Buffer){
/*
CryptoJS v3.1.2
@@ -70884,7 +69946,7 @@ function ripemd160 (message) {
module.exports = ripemd160
}).call(this,require("buffer").Buffer)
-},{"buffer":90}],468:[function(require,module,exports){
+},{"buffer":90}],469:[function(require,module,exports){
(function (Buffer){
const assert = require('assert')
/**
@@ -71117,7 +70179,7 @@ function toBuffer (v) {
}
}).call(this,require("buffer").Buffer)
-},{"assert":55,"buffer":90}],469:[function(require,module,exports){
+},{"assert":55,"buffer":90}],470:[function(require,module,exports){
(function (Buffer){
var pbkdf2Sync = require('pbkdf2').pbkdf2Sync
@@ -71300,11 +70362,11 @@ function arraycopy (src, srcPos, dest, destPos, length) {
module.exports = scrypt
}).call(this,require("buffer").Buffer)
-},{"buffer":90,"pbkdf2":446}],470:[function(require,module,exports){
+},{"buffer":90,"pbkdf2":447}],471:[function(require,module,exports){
'use strict'
module.exports = require('./lib')(require('./lib/elliptic'))
-},{"./lib":473,"./lib/elliptic":472}],471:[function(require,module,exports){
+},{"./lib":474,"./lib/elliptic":473}],472:[function(require,module,exports){
(function (Buffer){
'use strict'
var toString = Object.prototype.toString
@@ -71352,7 +70414,7 @@ exports.isNumberInInterval = function (number, x, y, message) {
}
}).call(this,{"isBuffer":require("../../is-buffer/index.js")})
-},{"../../is-buffer/index.js":435}],472:[function(require,module,exports){
+},{"../../is-buffer/index.js":436}],473:[function(require,module,exports){
(function (Buffer){
'use strict'
var createHash = require('create-hash')
@@ -71603,7 +70665,7 @@ exports.ecdhUnsafe = function (publicKey, privateKey, compressed) {
}
}).call(this,require("buffer").Buffer)
-},{"../messages.json":474,"bn.js":60,"buffer":90,"create-hash":388,"elliptic":403}],473:[function(require,module,exports){
+},{"../messages.json":475,"bn.js":60,"buffer":90,"create-hash":389,"elliptic":404}],474:[function(require,module,exports){
(function (Buffer){
'use strict'
var bip66 = require('bip66')
@@ -71923,7 +70985,7 @@ module.exports = function (secp256k1) {
}
}).call(this,require("buffer").Buffer)
-},{"./assert":471,"./messages.json":474,"bip66":59,"buffer":90}],474:[function(require,module,exports){
+},{"./assert":472,"./messages.json":475,"bip66":59,"buffer":90}],475:[function(require,module,exports){
module.exports={
"COMPRESSED_TYPE_INVALID": "compressed should be a boolean",
"EC_PRIVATE_KEY_TYPE_INVALID": "private key should be a Buffer",
@@ -71961,7 +71023,7 @@ module.exports={
"TWEAK_LENGTH_INVALID": "tweak length is invalid"
}
-},{}],475:[function(require,module,exports){
+},{}],476:[function(require,module,exports){
(function (Buffer){
// prototype class for hash functions
function Hash (blockSize, finalSize) {
@@ -72034,7 +71096,7 @@ Hash.prototype._update = function () {
module.exports = Hash
}).call(this,require("buffer").Buffer)
-},{"buffer":90}],476:[function(require,module,exports){
+},{"buffer":90}],477:[function(require,module,exports){
var exports = module.exports = function SHA (algorithm) {
algorithm = algorithm.toLowerCase()
@@ -72051,7 +71113,7 @@ exports.sha256 = require('./sha256')
exports.sha384 = require('./sha384')
exports.sha512 = require('./sha512')
-},{"./sha":477,"./sha1":478,"./sha224":479,"./sha256":480,"./sha384":481,"./sha512":482}],477:[function(require,module,exports){
+},{"./sha":478,"./sha1":479,"./sha224":480,"./sha256":481,"./sha384":482,"./sha512":483}],478:[function(require,module,exports){
(function (Buffer){
/*
* A JavaScript implementation of the Secure Hash Algorithm, SHA-0, as defined
@@ -72148,7 +71210,7 @@ Sha.prototype._hash = function () {
module.exports = Sha
}).call(this,require("buffer").Buffer)
-},{"./hash":475,"buffer":90,"inherits":434}],478:[function(require,module,exports){
+},{"./hash":476,"buffer":90,"inherits":435}],479:[function(require,module,exports){
(function (Buffer){
/*
* A JavaScript implementation of the Secure Hash Algorithm, SHA-1, as defined
@@ -72250,7 +71312,7 @@ Sha1.prototype._hash = function () {
module.exports = Sha1
}).call(this,require("buffer").Buffer)
-},{"./hash":475,"buffer":90,"inherits":434}],479:[function(require,module,exports){
+},{"./hash":476,"buffer":90,"inherits":435}],480:[function(require,module,exports){
(function (Buffer){
/**
* A JavaScript implementation of the Secure Hash Algorithm, SHA-256, as defined
@@ -72306,7 +71368,7 @@ Sha224.prototype._hash = function () {
module.exports = Sha224
}).call(this,require("buffer").Buffer)
-},{"./hash":475,"./sha256":480,"buffer":90,"inherits":434}],480:[function(require,module,exports){
+},{"./hash":476,"./sha256":481,"buffer":90,"inherits":435}],481:[function(require,module,exports){
(function (Buffer){
/**
* A JavaScript implementation of the Secure Hash Algorithm, SHA-256, as defined
@@ -72444,7 +71506,7 @@ Sha256.prototype._hash = function () {
module.exports = Sha256
}).call(this,require("buffer").Buffer)
-},{"./hash":475,"buffer":90,"inherits":434}],481:[function(require,module,exports){
+},{"./hash":476,"buffer":90,"inherits":435}],482:[function(require,module,exports){
(function (Buffer){
var inherits = require('inherits')
var SHA512 = require('./sha512')
@@ -72504,7 +71566,7 @@ Sha384.prototype._hash = function () {
module.exports = Sha384
}).call(this,require("buffer").Buffer)
-},{"./hash":475,"./sha512":482,"buffer":90,"inherits":434}],482:[function(require,module,exports){
+},{"./hash":476,"./sha512":483,"buffer":90,"inherits":435}],483:[function(require,module,exports){
(function (Buffer){
var inherits = require('inherits')
var Hash = require('./hash')
@@ -72767,7 +71829,7 @@ Sha512.prototype._hash = function () {
module.exports = Sha512
}).call(this,require("buffer").Buffer)
-},{"./hash":475,"buffer":90,"inherits":434}],483:[function(require,module,exports){
+},{"./hash":476,"buffer":90,"inherits":435}],484:[function(require,module,exports){
// Copyright Joyent, Inc. and other Node contributors.
//
// Permission is hereby granted, free of charge, to any person obtaining a
@@ -72896,7 +71958,7 @@ Stream.prototype.pipe = function(dest, options) {
return dest;
};
-},{"events":424,"inherits":434,"readable-stream/duplex.js":456,"readable-stream/passthrough.js":462,"readable-stream/readable.js":463,"readable-stream/transform.js":464,"readable-stream/writable.js":465}],484:[function(require,module,exports){
+},{"events":425,"inherits":435,"readable-stream/duplex.js":457,"readable-stream/passthrough.js":463,"readable-stream/readable.js":464,"readable-stream/transform.js":465,"readable-stream/writable.js":466}],485:[function(require,module,exports){
// Copyright Joyent, Inc. and other Node contributors.
//
// Permission is hereby granted, free of charge, to any person obtaining a
@@ -73119,7 +72181,7 @@ function base64DetectIncompleteChar(buffer) {
this.charLength = this.charReceived ? 3 : 0;
}
-},{"buffer":90}],485:[function(require,module,exports){
+},{"buffer":90}],486:[function(require,module,exports){
(function (global){
/**
@@ -73190,14 +72252,14 @@ function config (name) {
}
}).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {})
-},{}],486:[function(require,module,exports){
+},{}],487:[function(require,module,exports){
module.exports = function isBuffer(arg) {
return arg && typeof arg === 'object'
&& typeof arg.copy === 'function'
&& typeof arg.fill === 'function'
&& typeof arg.readUInt8 === 'function';
}
-},{}],487:[function(require,module,exports){
+},{}],488:[function(require,module,exports){
(function (process,global){
// Copyright Joyent, Inc. and other Node contributors.
//
@@ -73787,7 +72849,7 @@ function hasOwnProperty(obj, prop) {
}
}).call(this,require('_process'),typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {})
-},{"./support/isBuffer":486,"_process":448,"inherits":434}],488:[function(require,module,exports){
+},{"./support/isBuffer":487,"_process":449,"inherits":435}],489:[function(require,module,exports){
(function (global){
var rng;
@@ -73822,7 +72884,7 @@ module.exports = rng;
}).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {})
-},{}],489:[function(require,module,exports){
+},{}],490:[function(require,module,exports){
// uuid.js
//
// Copyright (c) 2010-2012 Robert Kieffer
@@ -74007,7 +73069,7 @@ uuid.unparse = unparse;
module.exports = uuid;
-},{"./rng":488}],490:[function(require,module,exports){
+},{"./rng":489}],491:[function(require,module,exports){
var indexOf = require('indexof');
var Object_keys = function (obj) {
@@ -74147,4 +73209,4 @@ exports.createContext = Script.createContext = function (context) {
return copy;
};
-},{"indexof":433}]},{},[27]);
+},{"indexof":434}]},{},[27]);
diff --git a/chrome-extension/js/etherwallet-static.min.js b/chrome-extension/js/etherwallet-static.min.js
index a10e0b8439..fdb4eeffff 100644
--- a/chrome-extension/js/etherwallet-static.min.js
+++ b/chrome-extension/js/etherwallet-static.min.js
@@ -1 +1 @@
-!function(){function t(t){for(var e=0;e>19^t^t>>8,(a[3]>>>0)/(1<<31>>>0)}function o(){var t=Math.floor(360*e()),o=60*e()+40+"%",r=25*(e()+e()+e()+e())+"%",i="hsl("+t+","+o+","+r+")";return i}function r(t){for(var o=t,r=t,i=Math.ceil(o/2),n=o-i,a=[],s=0;sdocument.documentElement.clientHeight,this.scrollbarWidth=this.measureScrollbar()},this.setScrollbar=function(){var t=window.getComputedStyle(document.body),e=parseInt(t.paddingRight,10);this.bodyIsOverflowing&&(document.body.style.paddingRight=e+this.scrollbarWidth+"px")},this.resetScrollbar=function(){document.body.style.paddingRight=""},this.measureScrollbar=function(){var t=document.createElement("div");t.className="modal-scrollbar-measure",document.body.appendChild(t);var e=t.offsetWidth-t.clientWidth;return document.body.removeChild(t),e},this.addClass=function(t,e){t.classList?t.classList.add(e):t.className+=" "+e},this.removeClass=function(t,e){t.classList?t.classList.remove(e):t.className=t.className.replace(e,"").replace(/^\s+|\s+$/g,"")}}};var o=document.querySelectorAll(".modal"),r=o.length,i=0;for(i;io;o++){var i=this.data.charCodeAt(o);i>65536?(e[0]=240|(1835008&i)>>>18,e[1]=128|(258048&i)>>>12,e[2]=128|(4032&i)>>>6,e[3]=128|63&i):i>2048?(e[0]=224|(61440&i)>>>12,e[1]=128|(4032&i)>>>6,e[2]=128|63&i):i>128?(e[0]=192|(1984&i)>>>6,e[1]=128|63&i):e[0]=i,this.parsedData=this.parsedData.concat(e)}this.parsedData.length!=this.data.length&&(this.parsedData.unshift(191),this.parsedData.unshift(187),this.parsedData.unshift(239))}function e(t,e){this.typeNumber=t,this.errorCorrectLevel=e,this.modules=null,this.moduleCount=0,this.dataCache=null,this.dataList=[]}function o(t,e){if(void 0==t.length)throw new Error(t.length+"/"+e);for(var o=0;o=i;i++){var a=0;switch(e){case u.L:a=m[i][0];break;case u.M:a=m[i][1];break;case u.Q:a=m[i][2];break;case u.H:a=m[i][3]}if(a>=r)break;o++}if(o>m.length)throw new Error("Too long data");return o}function l(t){var e=encodeURI(t).toString().replace(/\%[0-9a-fA-F]{2}/g,"a");return e.length+(e.length!=t?3:0)}t.prototype={getLength:function(){return this.parsedData.length},write:function(t){for(var e=0,o=this.parsedData.length;o>e;e++)t.put(this.parsedData[e],8)}},e.prototype={addData:function(e){var o=new t(e);this.dataList.push(o),this.dataCache=null},isDark:function(t,e){if(0>t||this.moduleCount<=t||0>e||this.moduleCount<=e)throw new Error(t+","+e);return this.modules[t][e]},getModuleCount:function(){return this.moduleCount},make:function(){this.makeImpl(!1,this.getBestMaskPattern())},makeImpl:function(t,o){this.moduleCount=4*this.typeNumber+17,this.modules=new Array(this.moduleCount);for(var r=0;r=7&&this.setupTypeNumber(t),null==this.dataCache&&(this.dataCache=e.createData(this.typeNumber,this.errorCorrectLevel,this.dataList)),this.mapData(this.dataCache,o)},setupPositionProbePattern:function(t,e){for(var o=-1;7>=o;o++)if(!(-1>=t+o||this.moduleCount<=t+o))for(var r=-1;7>=r;r++)-1>=e+r||this.moduleCount<=e+r||(this.modules[t+o][e+r]=o>=0&&6>=o&&(0==r||6==r)||r>=0&&6>=r&&(0==o||6==o)||o>=2&&4>=o&&r>=2&&4>=r)},getBestMaskPattern:function(){for(var t=0,e=0,o=0;8>o;o++){this.makeImpl(!0,o);var r=c.getLostPoint(this);(0==o||t>r)&&(t=r,e=o)}return e},createMovieClip:function(t,e,o){var r=t.createEmptyMovieClip(e,o),i=1;this.make();for(var n=0;n=n;n++)for(var a=-2;2>=a;a++)this.modules[r+n][i+a]=-2==n||2==n||-2==a||2==a||0==n&&0==a}},setupTypeNumber:function(t){for(var e=c.getBCHTypeNumber(this.typeNumber),o=0;18>o;o++){var r=!t&&1==(1&e>>o);this.modules[Math.floor(o/3)][o%3+this.moduleCount-8-3]=r}for(var o=0;18>o;o++){var r=!t&&1==(1&e>>o);this.modules[o%3+this.moduleCount-8-3][Math.floor(o/3)]=r}},setupTypeInfo:function(t,e){for(var o=this.errorCorrectLevel<<3|e,r=c.getBCHTypeInfo(o),i=0;15>i;i++){var n=!t&&1==(1&r>>i);6>i?this.modules[i][8]=n:8>i?this.modules[i+1][8]=n:this.modules[this.moduleCount-15+i][8]=n}for(var i=0;15>i;i++){var n=!t&&1==(1&r>>i);8>i?this.modules[8][this.moduleCount-i-1]=n:9>i?this.modules[8][15-i-1+1]=n:this.modules[8][15-i-1]=n}this.modules[this.moduleCount-8][8]=!t},mapData:function(t,e){for(var o=-1,r=this.moduleCount-1,i=7,n=0,a=this.moduleCount-1;a>0;a-=2)for(6==a&&a--;;){for(var s=0;2>s;s++)if(null==this.modules[r][a-s]){var l=!1;n>>i));var h=c.getMask(e,r,a-s);h&&(l=!l),this.modules[r][a-s]=l,i--,-1==i&&(n++,i=7)}if(r+=o,0>r||this.moduleCount<=r){r-=o,o=-o;break}}}},e.PAD0=236,e.PAD1=17,e.createData=function(t,o,n){for(var a=r.getRSBlocks(t,o),s=new i,l=0;l8*u)throw new Error("code length overflow. ("+s.getLengthInBits()+">"+8*u+")");for(s.getLengthInBits()+4<=8*u&&s.put(0,4);0!=s.getLengthInBits()%8;)s.putBit(!1);for(;!(s.getLengthInBits()>=8*u)&&(s.put(e.PAD0,8),!(s.getLengthInBits()>=8*u));)s.put(e.PAD1,8);return e.createBytes(s,a)},e.createBytes=function(t,e){for(var r=0,i=0,n=0,a=new Array(e.length),s=new Array(e.length),l=0;l=0?m.get(p):0}}for(var v=0,d=0;dd;d++)for(var l=0;ld;d++)for(var l=0;l=0;)e^=c.G15<=0;)e^=c.G18<>>=1;return e},getPatternPosition:function(t){return c.PATTERN_POSITION_TABLE[t-1]},getMask:function(t,e,o){switch(t){case d.PATTERN000:return 0==(e+o)%2;case d.PATTERN001:return 0==e%2;case d.PATTERN010:return 0==o%3;case d.PATTERN011:return 0==(e+o)%3;case d.PATTERN100:return 0==(Math.floor(e/2)+Math.floor(o/3))%2;case d.PATTERN101:return 0==e*o%2+e*o%3;case d.PATTERN110:return 0==(e*o%2+e*o%3)%2;case d.PATTERN111:return 0==(e*o%3+(e+o)%2)%2;default:throw new Error("bad maskPattern:"+t)}},getErrorCorrectPolynomial:function(t){for(var e=new o([1],0),r=0;t>r;r++)e=e.multiply(new o([1,g.gexp(r)],0));return e},getLengthInBits:function(t,e){if(e>=1&&10>e)switch(t){case h.MODE_NUMBER:return 10;case h.MODE_ALPHA_NUM:return 9;case h.MODE_8BIT_BYTE:return 8;case h.MODE_KANJI:return 8;default:throw new Error("mode:"+t)}else if(27>e)switch(t){case h.MODE_NUMBER:return 12;case h.MODE_ALPHA_NUM:return 11;case h.MODE_8BIT_BYTE:return 16;case h.MODE_KANJI:return 10;default:throw new Error("mode:"+t)}else{if(!(41>e))throw new Error("type:"+e);switch(t){case h.MODE_NUMBER:return 14;case h.MODE_ALPHA_NUM:return 13;case h.MODE_8BIT_BYTE:return 16;case h.MODE_KANJI:return 12;default:throw new Error("mode:"+t)}}},getLostPoint:function(t){for(var e=t.getModuleCount(),o=0,r=0;e>r;r++)for(var i=0;e>i;i++){for(var n=0,a=t.isDark(r,i),s=-1;1>=s;s++)if(!(0>r+s||r+s>=e))for(var l=-1;1>=l;l++)0>i+l||i+l>=e||(0!=s||0!=l)&&a==t.isDark(r+s,i+l)&&n++;n>5&&(o+=3+n-5)}for(var r=0;e-1>r;r++)for(var i=0;e-1>i;i++){var h=0;t.isDark(r,i)&&h++,t.isDark(r+1,i)&&h++,t.isDark(r,i+1)&&h++,t.isDark(r+1,i+1)&&h++,(0==h||4==h)&&(o+=3)}for(var r=0;e>r;r++)for(var i=0;e-6>i;i++)t.isDark(r,i)&&!t.isDark(r,i+1)&&t.isDark(r,i+2)&&t.isDark(r,i+3)&&t.isDark(r,i+4)&&!t.isDark(r,i+5)&&t.isDark(r,i+6)&&(o+=40);for(var i=0;e>i;i++)for(var r=0;e-6>r;r++)t.isDark(r,i)&&!t.isDark(r+1,i)&&t.isDark(r+2,i)&&t.isDark(r+3,i)&&t.isDark(r+4,i)&&!t.isDark(r+5,i)&&t.isDark(r+6,i)&&(o+=40);for(var u=0,i=0;e>i;i++)for(var r=0;e>r;r++)t.isDark(r,i)&&u++;var d=Math.abs(100*u/e/e-50)/5;return o+=10*d}},g={glog:function(t){if(1>t)throw new Error("glog("+t+")");return g.LOG_TABLE[t]},gexp:function(t){for(;0>t;)t+=255;for(;t>=256;)t-=255;return g.EXP_TABLE[t]},EXP_TABLE:new Array(256),LOG_TABLE:new Array(256)},f=0;8>f;f++)g.EXP_TABLE[f]=1<f;f++)g.EXP_TABLE[f]=g.EXP_TABLE[f-4]^g.EXP_TABLE[f-5]^g.EXP_TABLE[f-6]^g.EXP_TABLE[f-8];for(var f=0;255>f;f++)g.LOG_TABLE[g.EXP_TABLE[f]]=f;o.prototype={get:function(t){return this.num[t]},getLength:function(){return this.num.length},multiply:function(t){for(var e=new Array(this.getLength()+t.getLength()-1),r=0;ra;a++)for(var s=o[3*a+0],l=o[3*a+1],h=o[3*a+2],u=0;s>u;u++)n.push(new r(l,h));return n},r.getRsBlockTable=function(t,e){switch(e){case u.L:return r.RS_BLOCK_TABLE[4*(t-1)+0];case u.M:return r.RS_BLOCK_TABLE[4*(t-1)+1];case u.Q:return r.RS_BLOCK_TABLE[4*(t-1)+2];case u.H:return r.RS_BLOCK_TABLE[4*(t-1)+3];default:return}},i.prototype={get:function(t){var e=Math.floor(t/8);return 1==(1&this.buffer[e]>>>7-t%8)},put:function(t,e){for(var o=0;e>o;o++)this.putBit(1==(1&t>>>e-o-1))},getLengthInBits:function(){return this.length},putBit:function(t){var e=Math.floor(this.length/8);this.buffer.length<=e&&this.buffer.push(0),t&&(this.buffer[e]|=128>>>this.length%8),this.length++}};var m=[[17,14,11,7],[32,26,20,14],[53,42,32,24],[78,62,46,34],[106,84,60,44],[134,106,74,58],[154,122,86,64],[192,152,108,84],[230,180,130,98],[271,213,151,119],[321,251,177,137],[367,287,203,155],[425,331,241,177],[458,362,258,194],[520,412,292,220],[586,450,322,250],[644,504,364,280],[718,560,394,310],[792,624,442,338],[858,666,482,382],[929,711,509,403],[1003,779,565,439],[1091,857,611,461],[1171,911,661,511],[1273,997,715,535],[1367,1059,751,593],[1465,1125,805,625],[1528,1190,868,658],[1628,1264,908,698],[1732,1370,982,742],[1840,1452,1030,790],[1952,1538,1112,842],[2068,1628,1168,898],[2188,1722,1228,958],[2303,1809,1283,983],[2431,1911,1351,1051],[2563,1989,1423,1093],[2699,2099,1499,1139],[2809,2213,1579,1219],[2953,2331,1663,1273]],p=function(){var t=function(t,e){this._el=t,this._htOption=e};return t.prototype.draw=function(t){function e(t,e){var o=document.createElementNS("http://www.w3.org/2000/svg",t);for(var r in e)e.hasOwnProperty(r)&&o.setAttribute(r,e[r]);return o}var o=this._htOption,r=this._el,i=t.getModuleCount();Math.floor(o.width/i),Math.floor(o.height/i),this.clear();var n=e("svg",{viewBox:"0 0 "+String(i)+" "+String(i),width:"100%",height:"100%",fill:o.colorLight});n.setAttributeNS("http://www.w3.org/2000/xmlns/","xmlns:xlink","http://www.w3.org/1999/xlink"),r.appendChild(n),n.appendChild(e("rect",{fill:o.colorDark,width:"1",height:"1",id:"template"}));for(var a=0;i>a;a++)for(var s=0;i>s;s++)if(t.isDark(a,s)){var l=e("use",{x:String(a),y:String(s)});l.setAttributeNS("http://www.w3.org/1999/xlink","href","#template"),n.appendChild(l)}},t.prototype.clear=function(){for(;this._el.hasChildNodes();)this._el.removeChild(this._el.lastChild)},t}(),v="svg"===document.documentElement.tagName.toLowerCase(),y=v?p:n()?function(){function t(){this._elImage.src=this._elCanvas.toDataURL("image/png"),this._elImage.style.display="block",this._elCanvas.style.display="none"}function e(t,e){var o=this;if(o._fFail=e,o._fSuccess=t,null===o._bSupportDataURI){var r=document.createElement("img"),i=function(){o._bSupportDataURI=!1,o._fFail&&_fFail.call(o)},n=function(){o._bSupportDataURI=!0,o._fSuccess&&o._fSuccess.call(o)};return r.onabort=i,r.onerror=i,r.onload=n,void(r.src="data:image/gif;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAHElEQVQI12P4//8/w38GIAXDIBKE0DHxgljNBAAO9TXL0Y4OHwAAAABJRU5ErkJggg==")}o._bSupportDataURI===!0&&o._fSuccess?o._fSuccess.call(o):o._bSupportDataURI===!1&&o._fFail&&o._fFail.call(o)}if(this._android&&this._android<=2.1){var o=1/window.devicePixelRatio,r=CanvasRenderingContext2D.prototype.drawImage;CanvasRenderingContext2D.prototype.drawImage=function(t,e,i,n,a,s,l,h){if("nodeName"in t&&/img/i.test(t.nodeName))for(var u=arguments.length-1;u>=1;u--)arguments[u]=arguments[u]*o;else"undefined"==typeof h&&(arguments[1]*=o,arguments[2]*=o,arguments[3]*=o,arguments[4]*=o);r.apply(this,arguments)}}var i=function(t,e){this._bIsPainted=!1,this._android=a(),this._htOption=e,this._elCanvas=document.createElement("canvas"),this._elCanvas.width=e.width,this._elCanvas.height=e.height,t.appendChild(this._elCanvas),this._el=t,this._oContext=this._elCanvas.getContext("2d"),this._bIsPainted=!1,this._elImage=document.createElement("img"),this._elImage.style.display="none",this._el.appendChild(this._elImage),this._bSupportDataURI=null};return i.prototype.draw=function(t){var e=this._elImage,o=this._oContext,r=this._htOption,i=t.getModuleCount(),n=r.width/i,a=r.height/i,s=Math.round(n),l=Math.round(a);e.style.display="none",this.clear();for(var h=0;i>h;h++)for(var u=0;i>u;u++){var d=t.isDark(h,u),c=u*n,g=h*a;o.strokeStyle=d?r.colorDark:r.colorLight,o.lineWidth=1,o.fillStyle=d?r.colorDark:r.colorLight,o.fillRect(c,g,n,a),o.strokeRect(Math.floor(c)+.5,Math.floor(g)+.5,s,l),o.strokeRect(Math.ceil(c)-.5,Math.ceil(g)-.5,s,l)}this._bIsPainted=!0},i.prototype.makeImage=function(){this._bIsPainted&&e.call(this,t)},i.prototype.isPainted=function(){return this._bIsPainted},i.prototype.clear=function(){this._oContext.clearRect(0,0,this._elCanvas.width,this._elCanvas.height),this._bIsPainted=!1},i.prototype.round=function(t){return t?Math.floor(1e3*t)/1e3:t},i}():function(){var t=function(t,e){this._el=t,this._htOption=e};return t.prototype.draw=function(t){for(var e=this._htOption,o=this._el,r=t.getModuleCount(),i=Math.floor(e.width/r),n=Math.floor(e.height/r),a=['
"),o.innerHTML=a.join("");var h=o.childNodes[0],u=(e.width-h.offsetWidth)/2,d=(e.height-h.offsetHeight)/2;u>0&&d>0&&(h.style.margin=d+"px "+u+"px")},t.prototype.clear=function(){this._el.innerHTML=""},t}();QRCode=function(t,e){if(this._htOption={width:256,height:256,typeNumber:4,colorDark:"#000000",colorLight:"#ffffff",correctLevel:u.H},"string"==typeof e&&(e={text:e}),e)for(var o in e)this._htOption[o]=e[o];"string"==typeof t&&(t=document.getElementById(t)),this._android=a(),this._el=t,this._oQRCode=null,this._oDrawing=new y(this._el,this._htOption),this._htOption.text&&this.makeCode(this._htOption.text)},QRCode.prototype.makeCode=function(t){this._oQRCode=new e(s(t,this._htOption.correctLevel),this._htOption.correctLevel),this._oQRCode.addData(t),this._oQRCode.make(),this._el.title=t,this._oDrawing.draw(this._oQRCode),this.makeImage()},QRCode.prototype.makeImage=function(){"function"==typeof this._oDrawing.makeImage&&(!this._android||this._android>=3)&&this._oDrawing.makeImage()},QRCode.prototype.clear=function(){this._oDrawing.clear()},QRCode.CorrectLevel=u}();
\ No newline at end of file
diff --git a/dist/cx-wallet.html b/dist/cx-wallet.html
index 61d06d6d0b..2ec04b0bbc 100644
--- a/dist/cx-wallet.html
+++ b/dist/cx-wallet.html
@@ -560,7 +560,7 @@
Send Transaction
-
We use standard rates for all gas + a itty-bitty bit more to ensure it gets mined quickly. We do not take a transaction fee.
+
A standard transaction using 21000 gas will cost 0.000441 ETH. We use a slightly-above-minimum gas price of 0.000000021 ETH to ensure it gets mined quickly. We do not take a transaction fee.
@@ -604,8 +604,7 @@
"Only ETH
ETH (Standard Transaction): This generates a default transaction directly from one address to another. It has a default gas of 21000. It is likely that any ETH sent via this method will be replayed onto the ETC chain.
Coinbase: Do not send ETC & only send ETH via Standard Transaction. Split your ETC into a separate wallet and then use a standard transaction to send ETH. If you use "Only ETH", you need to manually reach out to Coinbase support to have it processed.
-
ShapeShift: Using the "Only ETH" or "Only ETC" function may lead to delays in processing you need to reach out to them to have it manually processed.
+
Coinbase & ShapeShift: Only send via Standard Transaction. If you send via the "Only" contracts, you will need to reach out to their support staff to manually add your balance or refund you. You can try Shapeshift's "split" tool as well.
We use standard rates for all gas + a itty-bitty bit more to ensure it gets mined quickly. We do not take a transaction fee.
+
A standard transaction using 21000 gas will cost 0.000441 ETH. We use a slightly-above-minimum gas price of 0.000000021 ETH to ensure it gets mined quickly. We do not take a transaction fee.
@@ -463,8 +463,7 @@
"Only ETH
ETH (Standard Transaction): This generates a default transaction directly from one address to another. It has a default gas of 21000. It is likely that any ETH sent via this method will be replayed onto the ETC chain.
Coinbase: Do not send ETC & only send ETH via Standard Transaction. Split your ETC into a separate wallet and then use a standard transaction to send ETH. If you use "Only ETH", you need to manually reach out to Coinbase support to have it processed.
-
ShapeShift: Using the "Only ETH" or "Only ETC" function may lead to delays in processing you need to reach out to them to have it manually processed.
+
Coinbase & ShapeShift: Only send via Standard Transaction. If you send via the "Only" contracts, you will need to reach out to their support staff to manually add your balance or refund you. You can try Shapeshift's "split" tool as well.
'
-}
-globalFuncs.errorMsgs = [
- "Please enter valid amount. ",
- "Your password must be at least 9 characters. Please ensure it is a strong password. ",
- "Sorry! We don't have a clue what type of wallet file this is. ",
- "This is not a valid wallet file. ",
- "This unit doesn\'t exists, please use the one of the following units ",
- "Invalid address. ",
- "Invalid password. ",
- "Invalid amount. ",
- "Invalid gas limit. ",
- "Invalid data value. ",
- "Invalid gas amount. ",
- "Invalid nonce. ",
- "Invalid signed transaction. ",
- "A wallet with this nickname already exists. ",
- "Wallet not found. ",
- "Whoops. It doesnt look like a proposal with this ID exists yet or there is an error reading this proposal. ",
- "A wallet with this address already exists in storage. Please check your wallets page. ",
- "You need to have at some ETH in your account to cover the cost of gas. .01ETH should be more than sufficient for a few sends and votes. ",
- "All gas would be used on this transaction. This means you have already voted on this proposal or the debate period has ended.",
- "Invalid symbol"];
-globalFuncs.successMsgs = ["Valid address", "Wallet successfully decrypted", "Transaction submitted. TX ID: ", "New wallet added: ", "You have successfully voted. Thank you for being an active participant in The DAO."];
-globalFuncs.scrypt = {
- n: 1024
-};
-globalFuncs.postDelay = 300;
-globalFuncs.kdf = "scrypt";
-globalFuncs.defaultTxGasLimit = 21000;
-globalFuncs.digixClaimTxGasLimit = 150000;
-globalFuncs.donateAddress = "0x7cB57B5A97eAbe94205C07890BE4c1aD31E486A8";
-globalFuncs.isNumeric = function(n) {
- return !isNaN(parseFloat(n)) && isFinite(n);
-}
-globalFuncs.urlGet = function(name) {
- if (name = (new RegExp('[?&]' + encodeURIComponent(name) + '=([^&]*)')).exec(location.search)) return this.stripTags(decodeURIComponent(name[1]));
-}
-globalFuncs.stripTags = function(str) {
- var SCRIPT_REGEX = /");
+}
+globalFuncs.getBlob = function(mime, str) {
+ var str = (typeof str === 'object') ? JSON.stringify(str) : str;
+ if (str == null) return '';
+ var blob = new Blob([str], {
+ type: mime
+ });
+ return window.URL.createObjectURL(blob);
+}
+globalFuncs.getSuccessText = function(str) {
+ return '
'
+}
+globalFuncs.errorMsgs = [
+ "Please enter valid amount. ",
+ "Your password must be at least 9 characters. Please ensure it is a strong password. ",
+ "Sorry! We don't have a clue what type of wallet file this is. ",
+ "This is not a valid wallet file. ",
+ "This unit doesn\'t exists, please use the one of the following units ",
+ "Invalid address. ",
+ "Invalid password. ",
+ "Invalid amount. ",
+ "Invalid gas limit. ",
+ "Invalid data value. ",
+ "Invalid gas amount. ",
+ "Invalid nonce. ",
+ "Invalid signed transaction. ",
+ "A wallet with this nickname already exists. ",
+ "Wallet not found. ",
+ "Whoops. It doesnt look like a proposal with this ID exists yet or there is an error reading this proposal. ",
+ "A wallet with this address already exists in storage. Please check your wallets page. ",
+ "You need to have at some ETH in your account to cover the cost of gas. .01ETH should be more than sufficient for a few sends and votes. ",
+ "All gas would be used on this transaction. This means you have already voted on this proposal or the debate period has ended.",
+ "Invalid symbol"];
+globalFuncs.successMsgs = ["Valid address", "Wallet successfully decrypted", "Transaction submitted. TX ID: ", "New wallet added: ", "You have successfully voted. Thank you for being an active participant in The DAO."];
+globalFuncs.scrypt = {
+ n: 1024
+};
+globalFuncs.postDelay = 300;
+globalFuncs.kdf = "scrypt";
+globalFuncs.defaultTxGasLimit = 21000;
+globalFuncs.digixClaimTxGasLimit = 150000;
+globalFuncs.donateAddress = "0x7cB57B5A97eAbe94205C07890BE4c1aD31E486A8";
+globalFuncs.isNumeric = function(n) {
+ return !isNaN(parseFloat(n)) && isFinite(n);
+}
+globalFuncs.urlGet = function(name) {
+ if (name = (new RegExp('[?&]' + encodeURIComponent(name) + '=([^&]*)')).exec(location.search)) return this.stripTags(decodeURIComponent(name[1]));
+}
+globalFuncs.stripTags = function(str) {
+ var SCRIPT_REGEX = /
+
+
*/
function copy(source, destination) {
var stackSource = [];
@@ -7789,7 +7783,7 @@ function copy(source, destination) {
case '[object Uint8ClampedArray]':
case '[object Uint16Array]':
case '[object Uint32Array]':
- return new source.constructor(copyElement(source.buffer), source.byteOffset, source.length);
+ return new source.constructor(copyElement(source.buffer));
case '[object ArrayBuffer]':
//Support: IE10
@@ -7821,6 +7815,31 @@ function copy(source, destination) {
}
}
+/**
+ * Creates a shallow copy of an object, an array or a primitive.
+ *
+ * Assumes that there are no proto properties for objects.
+ */
+function shallowCopy(src, dst) {
+ if (isArray(src)) {
+ dst = dst || [];
+
+ for (var i = 0, ii = src.length; i < ii; i++) {
+ dst[i] = src[i];
+ }
+ } else if (isObject(src)) {
+ dst = dst || {};
+
+ for (var key in src) {
+ if (!(key.charAt(0) === '$' && key.charAt(1) === '$')) {
+ dst[key] = src[key];
+ }
+ }
+ }
+
+ return dst || src;
+}
+
/**
* @ngdoc function
@@ -9161,34 +9180,7 @@ function setupModuleLoader(window) {
}
-/* global shallowCopy: true */
-
-/**
- * Creates a shallow copy of an object, an array or a primitive.
- *
- * Assumes that there are no proto properties for objects.
- */
-function shallowCopy(src, dst) {
- if (isArray(src)) {
- dst = dst || [];
-
- for (var i = 0, ii = src.length; i < ii; i++) {
- dst[i] = src[i];
- }
- } else if (isObject(src)) {
- dst = dst || {};
-
- for (var key in src) {
- if (!(key.charAt(0) === '$' && key.charAt(1) === '$')) {
- dst[key] = src[key];
- }
- }
- }
-
- return dst || src;
-}
-
-/* global toDebugString: true */
+/* global: toDebugString: true */
function serializeObject(obj) {
var seen = [];
@@ -9292,7 +9284,6 @@ function toDebugString(obj) {
$HttpParamSerializerJQLikeProvider,
$HttpBackendProvider,
$xhrFactoryProvider,
- $jsonpCallbacksProvider,
$LocationProvider,
$LogProvider,
$ParseProvider,
@@ -9330,11 +9321,11 @@ function toDebugString(obj) {
* - `codeName` – `{string}` – Code name of the release, such as "jiggling-armfat".
*/
var version = {
- full: '1.5.8', // all of these placeholder strings will be replaced by grunt's
+ full: '1.5.6', // all of these placeholder strings will be replaced by grunt's
major: 1, // package task
minor: 5,
- dot: 8,
- codeName: 'arbitrary-fallbacks'
+ dot: 6,
+ codeName: 'arrow-stringification'
};
@@ -9365,7 +9356,7 @@ function publishExternalAPI(angular) {
'isDate': isDate,
'lowercase': lowercase,
'uppercase': uppercase,
- 'callbacks': {$$counter: 0},
+ 'callbacks': {counter: 0},
'getTestability': getTestability,
'$$minErr': minErr,
'$$csp': csp,
@@ -9454,7 +9445,6 @@ function publishExternalAPI(angular) {
$httpParamSerializerJQLike: $HttpParamSerializerJQLikeProvider,
$httpBackend: $HttpBackendProvider,
$xhrFactory: $xhrFactoryProvider,
- $jsonpCallbacks: $jsonpCallbacksProvider,
$location: $LocationProvider,
$log: $LogProvider,
$parse: $ParseProvider,
@@ -9531,7 +9521,7 @@ function publishExternalAPI(angular) {
* ## Angular's jqLite
* jqLite provides only the following jQuery methods:
*
- * - [`addClass()`](http://api.jquery.com/addClass/) - Does not support a function as first argument
+ * - [`addClass()`](http://api.jquery.com/addClass/)
* - [`after()`](http://api.jquery.com/after/)
* - [`append()`](http://api.jquery.com/append/)
* - [`attr()`](http://api.jquery.com/attr/) - Does not support functions as parameters
@@ -9558,7 +9548,7 @@ function publishExternalAPI(angular) {
* - [`ready()`](http://api.jquery.com/ready/)
* - [`remove()`](http://api.jquery.com/remove/)
* - [`removeAttr()`](http://api.jquery.com/removeAttr/)
- * - [`removeClass()`](http://api.jquery.com/removeClass/) - Does not support a function as first argument
+ * - [`removeClass()`](http://api.jquery.com/removeClass/)
* - [`removeData()`](http://api.jquery.com/removeData/)
* - [`replaceWith()`](http://api.jquery.com/replaceWith/)
* - [`text()`](http://api.jquery.com/text/)
@@ -9693,7 +9683,7 @@ function jqLiteBuildFragment(html, context) {
nodes.push(context.createTextNode(html));
} else {
// Convert html into DOM nodes
- tmp = fragment.appendChild(context.createElement("div"));
+ tmp = tmp || fragment.appendChild(context.createElement("div"));
tag = (TAG_NAME_REGEXP.exec(html) || ["", ""])[1].toLowerCase();
wrap = wrapMap[tag] || wrapMap._default;
tmp.innerHTML = wrap[1] + html.replace(XHTML_TAG_REGEXP, "<$1>$2>") + wrap[2];
@@ -11506,10 +11496,10 @@ function createInjector(modulesToLoad, strictDi) {
if (msie <= 11) {
return false;
}
- // Support: Edge 12-13 only
- // See: https://developer.microsoft.com/en-us/microsoft-edge/platform/issues/6156135/
+ // Workaround for MS Edge.
+ // Check https://connect.microsoft.com/IE/Feedback/Details/2211653
return typeof func === 'function'
- && /^(?:class\b|constructor\()/.test(stringifyFn(func));
+ && /^(?:class\s|constructor\()/.test(stringifyFn(func));
}
function invoke(fn, self, locals, serviceName) {
@@ -12250,13 +12240,7 @@ var $AnimateProvider = ['$provide', function($provide) {
* @param {DOMElement} parent the parent element which will append the element as
* a child (so long as the after element is not present)
* @param {DOMElement=} after the sibling element after which the element will be appended
- * @param {object=} options an optional collection of options/styles that will be applied to the element.
- * The object can have the following properties:
- *
- * - **addClass** - `{string}` - space-separated CSS classes to add to element
- * - **from** - `{Object}` - CSS properties & values at the beginning of animation. Must have matching `to`
- * - **removeClass** - `{string}` - space-separated CSS classes to remove from element
- * - **to** - `{Object}` - CSS properties & values at end of animation. Must have matching `from`
+ * @param {object=} options an optional collection of options/styles that will be applied to the element
*
* @return {Promise} the animation callback promise
*/
@@ -12282,13 +12266,7 @@ var $AnimateProvider = ['$provide', function($provide) {
* @param {DOMElement} parent the parent element which will append the element as
* a child (so long as the after element is not present)
* @param {DOMElement=} after the sibling element after which the element will be appended
- * @param {object=} options an optional collection of options/styles that will be applied to the element.
- * The object can have the following properties:
- *
- * - **addClass** - `{string}` - space-separated CSS classes to add to element
- * - **from** - `{Object}` - CSS properties & values at the beginning of animation. Must have matching `to`
- * - **removeClass** - `{string}` - space-separated CSS classes to remove from element
- * - **to** - `{Object}` - CSS properties & values at end of animation. Must have matching `from`
+ * @param {object=} options an optional collection of options/styles that will be applied to the element
*
* @return {Promise} the animation callback promise
*/
@@ -12309,13 +12287,7 @@ var $AnimateProvider = ['$provide', function($provide) {
* digest once the animation has completed.
*
* @param {DOMElement} element the element which will be removed from the DOM
- * @param {object=} options an optional collection of options/styles that will be applied to the element.
- * The object can have the following properties:
- *
- * - **addClass** - `{string}` - space-separated CSS classes to add to element
- * - **from** - `{Object}` - CSS properties & values at the beginning of animation. Must have matching `to`
- * - **removeClass** - `{string}` - space-separated CSS classes to remove from element
- * - **to** - `{Object}` - CSS properties & values at end of animation. Must have matching `from`
+ * @param {object=} options an optional collection of options/styles that will be applied to the element
*
* @return {Promise} the animation callback promise
*/
@@ -12339,13 +12311,7 @@ var $AnimateProvider = ['$provide', function($provide) {
*
* @param {DOMElement} element the element which the CSS classes will be applied to
* @param {string} className the CSS class(es) that will be added (multiple classes are separated via spaces)
- * @param {object=} options an optional collection of options/styles that will be applied to the element.
- * The object can have the following properties:
- *
- * - **addClass** - `{string}` - space-separated CSS classes to add to element
- * - **from** - `{Object}` - CSS properties & values at the beginning of animation. Must have matching `to`
- * - **removeClass** - `{string}` - space-separated CSS classes to remove from element
- * - **to** - `{Object}` - CSS properties & values at end of animation. Must have matching `from`
+ * @param {object=} options an optional collection of options/styles that will be applied to the element
*
* @return {Promise} the animation callback promise
*/
@@ -12369,13 +12335,7 @@ var $AnimateProvider = ['$provide', function($provide) {
*
* @param {DOMElement} element the element which the CSS classes will be applied to
* @param {string} className the CSS class(es) that will be removed (multiple classes are separated via spaces)
- * @param {object=} options an optional collection of options/styles that will be applied to the element.
- * The object can have the following properties:
- *
- * - **addClass** - `{string}` - space-separated CSS classes to add to element
- * - **from** - `{Object}` - CSS properties & values at the beginning of animation. Must have matching `to`
- * - **removeClass** - `{string}` - space-separated CSS classes to remove from element
- * - **to** - `{Object}` - CSS properties & values at end of animation. Must have matching `from`
+ * @param {object=} options an optional collection of options/styles that will be applied to the element
*
* @return {Promise} the animation callback promise
*/
@@ -12400,13 +12360,7 @@ var $AnimateProvider = ['$provide', function($provide) {
* @param {DOMElement} element the element which the CSS classes will be applied to
* @param {string} add the CSS class(es) that will be added (multiple classes are separated via spaces)
* @param {string} remove the CSS class(es) that will be removed (multiple classes are separated via spaces)
- * @param {object=} options an optional collection of options/styles that will be applied to the element.
- * The object can have the following properties:
- *
- * - **addClass** - `{string}` - space-separated CSS classes to add to element
- * - **from** - `{Object}` - CSS properties & values at the beginning of animation. Must have matching `to`
- * - **removeClass** - `{string}` - space-separated CSS classes to remove from element
- * - **to** - `{Object}` - CSS properties & values at end of animation. Must have matching `from`
+ * @param {object=} options an optional collection of options/styles that will be applied to the element
*
* @return {Promise} the animation callback promise
*/
@@ -12447,13 +12401,7 @@ var $AnimateProvider = ['$provide', function($provide) {
* @param {string=} className an optional CSS class that will be applied to the element for the duration of the animation. If
* this value is left as empty then a CSS class of `ng-inline-animate` will be applied to the element.
* (Note that if no animation is detected then this value will not be applied to the element.)
- * @param {object=} options an optional collection of options/styles that will be applied to the element.
- * The object can have the following properties:
- *
- * - **addClass** - `{string}` - space-separated CSS classes to add to element
- * - **from** - `{Object}` - CSS properties & values at the beginning of animation. Must have matching `to`
- * - **removeClass** - `{string}` - space-separated CSS classes to remove from element
- * - **to** - `{Object}` - CSS properties & values at end of animation. Must have matching `from`
+ * @param {object=} options an optional collection of options/styles that will be applied to the element
*
* @return {Promise} the animation callback promise
*/
@@ -13541,9 +13489,8 @@ function $TemplateCacheProvider() {
* There are many different options for a directive.
*
* The difference resides in the return value of the factory function.
- * You can either return a {@link $compile#directive-definition-object Directive Definition Object (see below)}
- * that defines the directive properties, or just the `postLink` function (all other properties will have
- * the default values).
+ * You can either return a "Directive Definition Object" (see below) that defines the directive properties,
+ * or just the `postLink` function (all other properties will have the default values).
*
*
* **Best Practice:** It's recommended to use the "directive definition object" form.
@@ -13607,125 +13554,6 @@ function $TemplateCacheProvider() {
* });
* ```
*
- * ### Life-cycle hooks
- * Directive controllers can provide the following methods that are called by Angular at points in the life-cycle of the
- * directive:
- * * `$onInit()` - Called on each controller after all the controllers on an element have been constructed and
- * had their bindings initialized (and before the pre & post linking functions for the directives on
- * this element). This is a good place to put initialization code for your controller.
- * * `$onChanges(changesObj)` - Called whenever one-way (`<`) or interpolation (`@`) bindings are updated. The
- * `changesObj` is a hash whose keys are the names of the bound properties that have changed, and the values are an
- * object of the form `{ currentValue, previousValue, isFirstChange() }`. Use this hook to trigger updates within a
- * component such as cloning the bound value to prevent accidental mutation of the outer value.
- * * `$doCheck()` - Called on each turn of the digest cycle. Provides an opportunity to detect and act on
- * changes. Any actions that you wish to take in response to the changes that you detect must be
- * invoked from this hook; implementing this has no effect on when `$onChanges` is called. For example, this hook
- * could be useful if you wish to perform a deep equality check, or to check a Date object, changes to which would not
- * be detected by Angular's change detector and thus not trigger `$onChanges`. This hook is invoked with no arguments;
- * if detecting changes, you must store the previous value(s) for comparison to the current values.
- * * `$onDestroy()` - Called on a controller when its containing scope is destroyed. Use this hook for releasing
- * external resources, watches and event handlers. Note that components have their `$onDestroy()` hooks called in
- * the same order as the `$scope.$broadcast` events are triggered, which is top down. This means that parent
- * components will have their `$onDestroy()` hook called before child components.
- * * `$postLink()` - Called after this controller's element and its children have been linked. Similar to the post-link
- * function this hook can be used to set up DOM event handlers and do direct DOM manipulation.
- * Note that child elements that contain `templateUrl` directives will not have been compiled and linked since
- * they are waiting for their template to load asynchronously and their own compilation and linking has been
- * suspended until that occurs.
- *
- * #### Comparison with Angular 2 life-cycle hooks
- * Angular 2 also uses life-cycle hooks for its components. While the Angular 1 life-cycle hooks are similar there are
- * some differences that you should be aware of, especially when it comes to moving your code from Angular 1 to Angular 2:
- *
- * * Angular 1 hooks are prefixed with `$`, such as `$onInit`. Angular 2 hooks are prefixed with `ng`, such as `ngOnInit`.
- * * Angular 1 hooks can be defined on the controller prototype or added to the controller inside its constructor.
- * In Angular 2 you can only define hooks on the prototype of the Component class.
- * * Due to the differences in change-detection, you may get many more calls to `$doCheck` in Angular 1 than you would to
- * `ngDoCheck` in Angular 2
- * * Changes to the model inside `$doCheck` will trigger new turns of the digest loop, which will cause the changes to be
- * propagated throughout the application.
- * Angular 2 does not allow the `ngDoCheck` hook to trigger a change outside of the component. It will either throw an
- * error or do nothing depending upon the state of `enableProdMode()`.
- *
- * #### Life-cycle hook examples
- *
- * This example shows how you can check for mutations to a Date object even though the identity of the object
- * has not changed.
- *
- *
- *
- * angular.module('do-check-module', [])
- * .component('app', {
- * template:
- * 'Month: ' +
- * 'Date: {{ $ctrl.date }}' +
- * '',
- * controller: function() {
- * this.date = new Date();
- * this.month = this.date.getMonth();
- * this.updateDate = function() {
- * this.date.setMonth(this.month);
- * };
- * }
- * })
- * .component('test', {
- * bindings: { date: '<' },
- * template:
- * '
{{ $ctrl.log | json }}
',
- * controller: function() {
- * var previousValue;
- * this.log = [];
- * this.$doCheck = function() {
- * var currentValue = this.date && this.date.valueOf();
- * if (previousValue !== currentValue) {
- * this.log.push('doCheck: date mutated: ' + this.date);
- * previousValue = currentValue;
- * }
- * };
- * }
- * });
- *
- *
- *
- *
- *
- *
- * This example show how you might use `$doCheck` to trigger changes in your component's inputs even if the
- * actual identity of the component doesn't change. (Be aware that cloning and deep equality checks on large
- * arrays or objects can have a negative impact on your application performance)
- *
- *
- *
- *
',
- * controller: function() {
- * this.log = [];
- *
- * this.$doCheck = function() {
- * if (this.items_ref !== this.items) {
- * this.log.push('doCheck: items changed');
- * this.items_ref = this.items;
- * }
- * if (!angular.equals(this.items_clone, this.items)) {
- * this.log.push('doCheck: items mutated');
- * this.items_clone = angular.copy(this.items);
- * }
- * };
- * }
- * });
- *
- *
*
*
* ### Directive Definition Object
@@ -13901,6 +13729,25 @@ function $TemplateCacheProvider() {
* The `$transclude` function also has a method on it, `$transclude.isSlotFilled(slotName)`, which returns
* `true` if the specified slot contains content (i.e. one or more DOM nodes).
*
+ * The controller can provide the following methods that act as life-cycle hooks:
+ * * `$onInit()` - Called on each controller after all the controllers on an element have been constructed and
+ * had their bindings initialized (and before the pre & post linking functions for the directives on
+ * this element). This is a good place to put initialization code for your controller.
+ * * `$onChanges(changesObj)` - Called whenever one-way (`<`) or interpolation (`@`) bindings are updated. The
+ * `changesObj` is a hash whose keys are the names of the bound properties that have changed, and the values are an
+ * object of the form `{ currentValue, previousValue, isFirstChange() }`. Use this hook to trigger updates within a
+ * component such as cloning the bound value to prevent accidental mutation of the outer value.
+ * * `$onDestroy()` - Called on a controller when its containing scope is destroyed. Use this hook for releasing
+ * external resources, watches and event handlers. Note that components have their `$onDestroy()` hooks called in
+ * the same order as the `$scope.$broadcast` events are triggered, which is top down. This means that parent
+ * components will have their `$onDestroy()` hook called before child components.
+ * * `$postLink()` - Called after this controller's element and its children have been linked. Similar to the post-link
+ * function this hook can be used to set up DOM event handlers and do direct DOM manipulation.
+ * Note that child elements that contain `templateUrl` directives will not have been compiled and linked since
+ * they are waiting for their template to load asynchronously and their own compilation and linking has been
+ * suspended until that occurs.
+ *
+ *
* #### `require`
* Require another directive and inject its controller as the fourth argument to the linking function. The
* `require` property can be a string, an array or an object:
@@ -14098,8 +13945,8 @@ function $TemplateCacheProvider() {
* any other controller.
*
* * `transcludeFn` - A transclude linking function pre-bound to the correct transclusion scope.
- * This is the same as the `$transclude` parameter of directive controllers,
- * see {@link ng.$compile#-controller- the controller section for details}.
+ * This is the same as the `$transclude`
+ * parameter of directive controllers, see there for details.
* `function([scope], cloneLinkingFn, futureParentElement)`.
*
* #### Pre-linking function
@@ -14901,19 +14748,11 @@ function $CompileProvider($provide, $$sanitizeUriProvider) {
}
// We must run this hook in an apply since the $$postDigest runs outside apply
$rootScope.$apply(function() {
- var errors = [];
for (var i = 0, ii = onChangesQueue.length; i < ii; ++i) {
- try {
- onChangesQueue[i]();
- } catch (e) {
- errors.push(e);
- }
+ onChangesQueue[i]();
}
// Reset the queue to trigger a new schedule next time there is a change
onChangesQueue = undefined;
- if (errors.length) {
- throw errors;
- }
});
} finally {
onChangesTtl++;
@@ -15554,7 +15393,19 @@ function $CompileProvider($provide, $$sanitizeUriProvider) {
addTextInterpolateDirective(directives, node.nodeValue);
break;
case NODE_TYPE_COMMENT: /* Comment */
- collectCommentDirectives(node, directives, attrs, maxPriority, ignoreDirective);
+ try {
+ match = COMMENT_DIRECTIVE_REGEXP.exec(node.nodeValue);
+ if (match) {
+ nName = directiveNormalize(match[1]);
+ if (addDirective(directives, nName, 'M', maxPriority, ignoreDirective)) {
+ attrs[nName] = trim(match[2]);
+ }
+ }
+ } catch (e) {
+ // turns out that under some circumstances IE9 throws errors when one attempts to read
+ // comment's node value.
+ // Just ignore it and continue. (Can't seem to reproduce in test case.)
+ }
break;
}
@@ -15562,24 +15413,6 @@ function $CompileProvider($provide, $$sanitizeUriProvider) {
return directives;
}
- function collectCommentDirectives(node, directives, attrs, maxPriority, ignoreDirective) {
- // function created because of performance, try/catch disables
- // the optimization of the whole function #14848
- try {
- var match = COMMENT_DIRECTIVE_REGEXP.exec(node.nodeValue);
- if (match) {
- var nName = directiveNormalize(match[1]);
- if (addDirective(directives, nName, 'M', maxPriority, ignoreDirective)) {
- attrs[nName] = trim(match[2]);
- }
- }
- } catch (e) {
- // turns out that under some circumstances IE9 throws errors when one attempts to read
- // comment's node value.
- // Just ignore it and continue. (Can't seem to reproduce in test case.)
- }
- }
-
/**
* Given a node with an directive-start it collects all of the siblings until it finds
* directive-end.
@@ -16095,22 +15928,10 @@ function $CompileProvider($provide, $$sanitizeUriProvider) {
forEach(elementControllers, function(controller) {
var controllerInstance = controller.instance;
if (isFunction(controllerInstance.$onChanges)) {
- try {
- controllerInstance.$onChanges(controller.bindingInfo.initialChanges);
- } catch (e) {
- $exceptionHandler(e);
- }
+ controllerInstance.$onChanges(controller.bindingInfo.initialChanges);
}
if (isFunction(controllerInstance.$onInit)) {
- try {
- controllerInstance.$onInit();
- } catch (e) {
- $exceptionHandler(e);
- }
- }
- if (isFunction(controllerInstance.$doCheck)) {
- controllerScope.$watch(function() { controllerInstance.$doCheck(); });
- controllerInstance.$doCheck();
+ controllerInstance.$onInit();
}
if (isFunction(controllerInstance.$onDestroy)) {
controllerScope.$on('$destroy', function callOnDestroyHook() {
@@ -16374,16 +16195,18 @@ function $CompileProvider($provide, $$sanitizeUriProvider) {
// copy the new attributes on the old attrs object
forEach(src, function(value, key) {
- // Check if we already set this attribute in the loop above.
- // `dst` will never contain hasOwnProperty as DOM parser won't let it.
- // You will get an "InvalidCharacterError: DOM Exception 5" error if you
- // have an attribute like "has-own-property" or "data-has-own-property", etc.
- if (!dst.hasOwnProperty(key) && key.charAt(0) !== '$') {
+ if (key == 'class') {
+ safeAddClass($element, value);
+ dst['class'] = (dst['class'] ? dst['class'] + ' ' : '') + value;
+ } else if (key == 'style') {
+ $element.attr('style', $element.attr('style') + ';' + value);
+ dst['style'] = (dst['style'] ? dst['style'] + ';' : '') + value;
+ // `dst` will never contain hasOwnProperty as DOM parser won't let it.
+ // You will get an "InvalidCharacterError: DOM Exception 5" error if you
+ // have an attribute like "has-own-property" or "data-has-own-property", etc.
+ } else if (key.charAt(0) != '$' && !dst.hasOwnProperty(key)) {
dst[key] = value;
-
- if (key !== 'class' && key !== 'style') {
- dstAttr[key] = srcAttr[key];
- }
+ dstAttr[key] = srcAttr[key];
}
});
}
@@ -16758,7 +16581,7 @@ function $CompileProvider($provide, $$sanitizeUriProvider) {
forEach(bindings, function initializeBinding(definition, scopeName) {
var attrName = definition.attrName,
optional = definition.optional,
- mode = definition.mode, // @, =, <, or &
+ mode = definition.mode, // @, =, or &
lastValue,
parentGet, parentSet, compare, removeWatch;
@@ -17244,21 +17067,18 @@ function $DocumentProvider() {
*
* ## Example:
*
- * The example below will overwrite the default `$exceptionHandler` in order to (a) log uncaught
- * errors to the backend for later inspection by the developers and (b) to use `$log.warn()` instead
- * of `$log.error()`.
- *
* ```js
- * angular.
- * module('exceptionOverwrite', []).
- * factory('$exceptionHandler', ['$log', 'logErrorsToBackend', function($log, logErrorsToBackend) {
- * return function myExceptionHandler(exception, cause) {
- * logErrorsToBackend(exception, cause);
- * $log.warn(exception, cause);
- * };
- * }]);
+ * angular.module('exceptionOverride', []).factory('$exceptionHandler', function() {
+ * return function(exception, cause) {
+ * exception.message += ' (caused by "' + cause + '")';
+ * throw exception;
+ * };
+ * });
* ```
*
+ * This example will override the normal action of `$exceptionHandler`, to make angular
+ * exceptions fail hard when they happen, instead of just logging to the console.
+ *
*
* Note, that code executed in event-listeners (even those registered using jqLite's `on`/`bind`
* methods) does not delegate exceptions to the {@link ng.$exceptionHandler $exceptionHandler}
@@ -17268,7 +17088,7 @@ function $DocumentProvider() {
* `try { ... } catch(e) { $exceptionHandler(e); }`
*
* @param {Error} exception Exception associated with the error.
- * @param {string=} cause Optional information about the context in which
+ * @param {string=} cause optional information about the context in which
* the error was thrown.
*
*/
@@ -17338,7 +17158,7 @@ function $HttpParamSerializerProvider() {
* * `{'foo': 'bar'}` results in `foo=bar`
* * `{'foo': Date.now()}` results in `foo=2015-04-01T09%3A50%3A49.262Z` (`toISOString()` and encoded representation of a Date object)
* * `{'foo': ['bar', 'baz']}` results in `foo=bar&foo=baz` (repeated key for each array element)
- * * `{'foo': {'bar':'baz'}}` results in `foo=%7B%22bar%22%3A%22baz%22%7D` (stringified and encoded representation of an object)
+ * * `{'foo': {'bar':'baz'}}` results in `foo=%7B%22bar%22%3A%22baz%22%7D"` (stringified and encoded representation of an object)
*
* Note that serializer will sort the request parameters alphabetically.
* */
@@ -17889,7 +17709,7 @@ function $HttpProvider() {
*
* ### Overriding the Default Transformations Per Request
*
- * If you wish to override the request/response transformations only for a single request then provide
+ * If you wish override the request/response transformations only for a single request then provide
* `transformRequest` and/or `transformResponse` properties on the configuration object passed
* into `$http`.
*
@@ -17932,7 +17752,7 @@ function $HttpProvider() {
* * cache a specific response - set config.cache value to TRUE or to a cache object
*
* If caching is enabled, but neither the default cache nor config.cache are set to a cache object,
- * then the default `$cacheFactory("$http")` object is used.
+ * then the default `$cacheFactory($http)` object is used.
*
* The default cache value can be set by updating the
* {@link ng.$http#defaults `$http.defaults.cache`} property or the
@@ -18260,25 +18080,48 @@ function $HttpProvider() {
config.headers = mergeHeaders(requestConfig);
config.method = uppercase(config.method);
config.paramSerializer = isString(config.paramSerializer) ?
- $injector.get(config.paramSerializer) : config.paramSerializer;
+ $injector.get(config.paramSerializer) : config.paramSerializer;
+
+ var serverRequest = function(config) {
+ var headers = config.headers;
+ var reqData = transformData(config.data, headersGetter(headers), undefined, config.transformRequest);
- var requestInterceptors = [];
- var responseInterceptors = [];
+ // strip content-type if data is undefined
+ if (isUndefined(reqData)) {
+ forEach(headers, function(value, header) {
+ if (lowercase(header) === 'content-type') {
+ delete headers[header];
+ }
+ });
+ }
+
+ if (isUndefined(config.withCredentials) && !isUndefined(defaults.withCredentials)) {
+ config.withCredentials = defaults.withCredentials;
+ }
+
+ // send request
+ return sendReq(config, reqData).then(transformResponse, transformResponse);
+ };
+
+ var chain = [serverRequest, undefined];
var promise = $q.when(config);
// apply interceptors
forEach(reversedInterceptors, function(interceptor) {
if (interceptor.request || interceptor.requestError) {
- requestInterceptors.unshift(interceptor.request, interceptor.requestError);
+ chain.unshift(interceptor.request, interceptor.requestError);
}
if (interceptor.response || interceptor.responseError) {
- responseInterceptors.push(interceptor.response, interceptor.responseError);
+ chain.push(interceptor.response, interceptor.responseError);
}
});
- promise = chainInterceptors(promise, requestInterceptors);
- promise = promise.then(serverRequest);
- promise = chainInterceptors(promise, responseInterceptors);
+ while (chain.length) {
+ var thenFn = chain.shift();
+ var rejectFn = chain.shift();
+
+ promise = promise.then(thenFn, rejectFn);
+ }
if (useLegacyPromise) {
promise.success = function(fn) {
@@ -18305,18 +18148,14 @@ function $HttpProvider() {
return promise;
-
- function chainInterceptors(promise, interceptors) {
- for (var i = 0, ii = interceptors.length; i < ii;) {
- var thenFn = interceptors[i++];
- var rejectFn = interceptors[i++];
-
- promise = promise.then(thenFn, rejectFn);
- }
-
- interceptors.length = 0;
-
- return promise;
+ function transformResponse(response) {
+ // make a copy since the response must be cacheable
+ var resp = extend({}, response);
+ resp.data = transformData(response.data, response.headers, response.status,
+ config.transformResponse);
+ return (isSuccess(response.status))
+ ? resp
+ : $q.reject(resp);
}
function executeHeaderFns(headers, config) {
@@ -18360,37 +18199,6 @@ function $HttpProvider() {
// execute if header value is a function for merged headers
return executeHeaderFns(reqHeaders, shallowCopy(config));
}
-
- function serverRequest(config) {
- var headers = config.headers;
- var reqData = transformData(config.data, headersGetter(headers), undefined, config.transformRequest);
-
- // strip content-type if data is undefined
- if (isUndefined(reqData)) {
- forEach(headers, function(value, header) {
- if (lowercase(header) === 'content-type') {
- delete headers[header];
- }
- });
- }
-
- if (isUndefined(config.withCredentials) && !isUndefined(defaults.withCredentials)) {
- config.withCredentials = defaults.withCredentials;
- }
-
- // send request
- return sendReq(config, reqData).then(transformResponse, transformResponse);
- }
-
- function transformResponse(response) {
- // make a copy since the response must be cacheable
- var resp = extend({}, response);
- resp.data = transformData(response.data, response.headers, response.status,
- config.transformResponse);
- return (isSuccess(response.status))
- ? resp
- : $q.reject(resp);
- }
}
$http.pendingRequests = [];
@@ -18437,8 +18245,6 @@ function $HttpProvider() {
*
* @description
* Shortcut method to perform `JSONP` request.
- * If you would like to customise where and how the callbacks are stored then try overriding
- * or decorating the {@link $jsonpCallbacks} service.
*
* @param {string} url Relative or absolute URL specifying the destination of the request.
* The name of the callback should be the string `JSON_CALLBACK`.
@@ -18712,7 +18518,7 @@ function $xhrFactoryProvider() {
/**
* @ngdoc service
* @name $httpBackend
- * @requires $jsonpCallbacks
+ * @requires $window
* @requires $document
* @requires $xhrFactory
*
@@ -18727,8 +18533,8 @@ function $xhrFactoryProvider() {
* $httpBackend} which can be trained with responses.
*/
function $HttpBackendProvider() {
- this.$get = ['$browser', '$jsonpCallbacks', '$document', '$xhrFactory', function($browser, $jsonpCallbacks, $document, $xhrFactory) {
- return createHttpBackend($browser, $xhrFactory, $browser.defer, $jsonpCallbacks, $document[0]);
+ this.$get = ['$browser', '$window', '$document', '$xhrFactory', function($browser, $window, $document, $xhrFactory) {
+ return createHttpBackend($browser, $xhrFactory, $browser.defer, $window.angular.callbacks, $document[0]);
}];
}
@@ -18738,13 +18544,17 @@ function createHttpBackend($browser, createXhr, $browserDefer, callbacks, rawDoc
$browser.$$incOutstandingRequestCount();
url = url || $browser.url();
- if (lowercase(method) === 'jsonp') {
- var callbackPath = callbacks.createCallback(url);
- var jsonpDone = jsonpReq(url, callbackPath, function(status, text) {
- // jsonpReq only ever sets status to 200 (OK), 404 (ERROR) or -1 (WAITING)
- var response = (status === 200) && callbacks.getResponse(callbackPath);
- completeRequest(callback, status, response, "", text);
- callbacks.removeCallback(callbackPath);
+ if (lowercase(method) == 'jsonp') {
+ var callbackId = '_' + (callbacks.counter++).toString(36);
+ callbacks[callbackId] = function(data) {
+ callbacks[callbackId].data = data;
+ callbacks[callbackId].called = true;
+ };
+
+ var jsonpDone = jsonpReq(url.replace('JSON_CALLBACK', 'angular.callbacks.' + callbackId),
+ callbackId, function(status, text) {
+ completeRequest(callback, status, callbacks[callbackId].data, "", text);
+ callbacks[callbackId] = noop;
});
} else {
@@ -18846,8 +18656,7 @@ function createHttpBackend($browser, createXhr, $browserDefer, callbacks, rawDoc
}
};
- function jsonpReq(url, callbackPath, done) {
- url = url.replace('JSON_CALLBACK', callbackPath);
+ function jsonpReq(url, callbackId, done) {
// we can't use jQuery/jqLite here because jQuery does crazy stuff with script elements, e.g.:
// - fetches local scripts via XHR and evals them
// - adds and immediately removes script elements from the document
@@ -18865,7 +18674,7 @@ function createHttpBackend($browser, createXhr, $browserDefer, callbacks, rawDoc
var text = "unknown";
if (event) {
- if (event.type === "load" && !callbacks.wasCalled(callbackPath)) {
+ if (event.type === "load" && !callbacks[callbackId].called) {
event = { type: "error" };
}
text = event.type;
@@ -19064,7 +18873,7 @@ function $InterpolateProvider() {
*
* `allOrNothing` is useful for interpolating URLs. `ngSrc` and `ngSrcset` use this behavior.
*
- * #### Escaped Interpolation
+ * ####Escaped Interpolation
* $interpolate provides a mechanism for escaping interpolation markers. Start and end markers
* can be escaped by preceding each of their characters with a REVERSE SOLIDUS U+005C (backslash).
* It will be rendered as a regular start/end marker, and will not be interpreted as an expression
@@ -19487,87 +19296,6 @@ function $IntervalProvider() {
}];
}
-/**
- * @ngdoc service
- * @name $jsonpCallbacks
- * @requires $window
- * @description
- * This service handles the lifecycle of callbacks to handle JSONP requests.
- * Override this service if you wish to customise where the callbacks are stored and
- * how they vary compared to the requested url.
- */
-var $jsonpCallbacksProvider = function() {
- this.$get = ['$window', function($window) {
- var callbacks = $window.angular.callbacks;
- var callbackMap = {};
-
- function createCallback(callbackId) {
- var callback = function(data) {
- callback.data = data;
- callback.called = true;
- };
- callback.id = callbackId;
- return callback;
- }
-
- return {
- /**
- * @ngdoc method
- * @name $jsonpCallbacks#createCallback
- * @param {string} url the url of the JSONP request
- * @returns {string} the callback path to send to the server as part of the JSONP request
- * @description
- * {@link $httpBackend} calls this method to create a callback and get hold of the path to the callback
- * to pass to the server, which will be used to call the callback with its payload in the JSONP response.
- */
- createCallback: function(url) {
- var callbackId = '_' + (callbacks.$$counter++).toString(36);
- var callbackPath = 'angular.callbacks.' + callbackId;
- var callback = createCallback(callbackId);
- callbackMap[callbackPath] = callbacks[callbackId] = callback;
- return callbackPath;
- },
- /**
- * @ngdoc method
- * @name $jsonpCallbacks#wasCalled
- * @param {string} callbackPath the path to the callback that was sent in the JSONP request
- * @returns {boolean} whether the callback has been called, as a result of the JSONP response
- * @description
- * {@link $httpBackend} calls this method to find out whether the JSONP response actually called the
- * callback that was passed in the request.
- */
- wasCalled: function(callbackPath) {
- return callbackMap[callbackPath].called;
- },
- /**
- * @ngdoc method
- * @name $jsonpCallbacks#getResponse
- * @param {string} callbackPath the path to the callback that was sent in the JSONP request
- * @returns {*} the data received from the response via the registered callback
- * @description
- * {@link $httpBackend} calls this method to get hold of the data that was provided to the callback
- * in the JSONP response.
- */
- getResponse: function(callbackPath) {
- return callbackMap[callbackPath].data;
- },
- /**
- * @ngdoc method
- * @name $jsonpCallbacks#removeCallback
- * @param {string} callbackPath the path to the callback that was sent in the JSONP request
- * @description
- * {@link $httpBackend} calls this method to remove the callback after the JSONP request has
- * completed or timed-out.
- */
- removeCallback: function(callbackPath) {
- var callback = callbackMap[callbackPath];
- delete callbacks[callback.id];
- delete callbackMap[callbackPath];
- }
- };
- }];
-};
-
/**
* @ngdoc service
* @name $locale
@@ -19907,12 +19635,6 @@ function LocationHashbangInHtml5Url(appBase, appBaseNoFile, hashPrefix) {
var locationPrototype = {
- /**
- * Ensure absolute url is initialized.
- * @private
- */
- $$absUrl:'',
-
/**
* Are we in html5 mode?
* @private
@@ -21286,7 +21008,7 @@ AST.prototype = {
var args = [];
if (this.peekToken().text !== ')') {
do {
- args.push(this.filterChain());
+ args.push(this.expression());
} while (this.expect(','));
}
return args;
@@ -23013,7 +22735,7 @@ function $ParseProvider() {
*
* **Methods**
*
- * - `then(successCallback, [errorCallback], [notifyCallback])` – regardless of when the promise was or
+ * - `then(successCallback, errorCallback, notifyCallback)` – regardless of when the promise was or
* will be resolved or rejected, `then` calls one of the success or error callbacks asynchronously
* as soon as the result is available. The callbacks are called with a single argument: the result
* or rejection reason. Additionally, the notify callback may be called zero or more times to
@@ -23024,8 +22746,7 @@ function $ParseProvider() {
* with the value which is resolved in that promise using
* [promise chaining](http://www.html5rocks.com/en/tutorials/es6/promises/#toc-promises-queues)).
* It also notifies via the return value of the `notifyCallback` method. The promise cannot be
- * resolved or rejected from the notifyCallback method. The errorCallback and notifyCallback
- * arguments are optional.
+ * resolved or rejected from the notifyCallback method.
*
* - `catch(errorCallback)` – shorthand for `promise.then(null, errorCallback)`
*
@@ -23440,30 +23161,6 @@ function qFactory(nextTick, exceptionHandler) {
return deferred.promise;
}
- /**
- * @ngdoc method
- * @name $q#race
- * @kind function
- *
- * @description
- * Returns a promise that resolves or rejects as soon as one of those promises
- * resolves or rejects, with the value or reason from that promise.
- *
- * @param {Array.|Object.} promises An array or hash of promises.
- * @returns {Promise} a promise that resolves or rejects as soon as one of the `promises`
- * resolves or rejects, with the value or reason from that promise.
- */
-
- function race(promises) {
- var deferred = defer();
-
- forEach(promises, function(promise) {
- when(promise).then(deferred.resolve, deferred.reject);
- });
-
- return deferred.promise;
- }
-
var $Q = function Q(resolver) {
if (!isFunction(resolver)) {
throw $qMinErr('norslvr', "Expected resolverFn, got '{0}'", resolver);
@@ -23493,7 +23190,6 @@ function qFactory(nextTick, exceptionHandler) {
$Q.when = when;
$Q.resolve = resolve;
$Q.all = all;
- $Q.race = race;
return $Q;
}
@@ -26845,11 +26541,10 @@ function $FilterProvider($provide) {
* - `Object`: A pattern object can be used to filter specific properties on objects contained
* by `array`. For example `{name:"M", phone:"1"}` predicate will return an array of items
* which have property `name` containing "M" and property `phone` containing "1". A special
- * property name (`$` by default) can be used (e.g. as in `{$: "text"}`) to accept a match
- * against any property of the object or its nested object properties. That's equivalent to the
- * simple substring match with a `string` as described above. The special property name can be
- * overwritten, using the `anyPropertyKey` parameter.
- * The predicate can be negated by prefixing the string with `!`.
+ * property name `$` can be used (as in `{$:"text"}`) to accept a match against any
+ * property of the object or its nested object properties. That's equivalent to the simple
+ * substring match with a `string` as described above. The predicate can be negated by prefixing
+ * the string with `!`.
* For example `{name: "!M"}` predicate will return an array of items which have property `name`
* not containing "M".
*
@@ -26883,9 +26578,6 @@ function $FilterProvider($provide) {
* Primitive values are converted to strings. Objects are not compared against primitives,
* unless they have a custom `toString` method (e.g. `Date` objects).
*
- * @param {string=} anyPropertyKey The special property name that matches against any property.
- * By default `$`.
- *
* @example
@@ -26954,9 +26646,8 @@ function $FilterProvider($provide) {
*/
-
function filterFilter() {
- return function(array, expression, comparator, anyPropertyKey) {
+ return function(array, expression, comparator) {
if (!isArrayLike(array)) {
if (array == null) {
return array;
@@ -26965,7 +26656,6 @@ function filterFilter() {
}
}
- anyPropertyKey = anyPropertyKey || '$';
var expressionType = getTypeForFilter(expression);
var predicateFn;
var matchAgainstAnyProp;
@@ -26982,7 +26672,7 @@ function filterFilter() {
//jshint -W086
case 'object':
//jshint +W086
- predicateFn = createPredicateFn(expression, comparator, anyPropertyKey, matchAgainstAnyProp);
+ predicateFn = createPredicateFn(expression, comparator, matchAgainstAnyProp);
break;
default:
return array;
@@ -26993,8 +26683,8 @@ function filterFilter() {
}
// Helper functions for `filterFilter`
-function createPredicateFn(expression, comparator, anyPropertyKey, matchAgainstAnyProp) {
- var shouldMatchPrimitives = isObject(expression) && (anyPropertyKey in expression);
+function createPredicateFn(expression, comparator, matchAgainstAnyProp) {
+ var shouldMatchPrimitives = isObject(expression) && ('$' in expression);
var predicateFn;
if (comparator === true) {
@@ -27022,25 +26712,25 @@ function createPredicateFn(expression, comparator, anyPropertyKey, matchAgainstA
predicateFn = function(item) {
if (shouldMatchPrimitives && !isObject(item)) {
- return deepCompare(item, expression[anyPropertyKey], comparator, anyPropertyKey, false);
+ return deepCompare(item, expression.$, comparator, false);
}
- return deepCompare(item, expression, comparator, anyPropertyKey, matchAgainstAnyProp);
+ return deepCompare(item, expression, comparator, matchAgainstAnyProp);
};
return predicateFn;
}
-function deepCompare(actual, expected, comparator, anyPropertyKey, matchAgainstAnyProp, dontMatchWholeObject) {
+function deepCompare(actual, expected, comparator, matchAgainstAnyProp, dontMatchWholeObject) {
var actualType = getTypeForFilter(actual);
var expectedType = getTypeForFilter(expected);
if ((expectedType === 'string') && (expected.charAt(0) === '!')) {
- return !deepCompare(actual, expected.substring(1), comparator, anyPropertyKey, matchAgainstAnyProp);
+ return !deepCompare(actual, expected.substring(1), comparator, matchAgainstAnyProp);
} else if (isArray(actual)) {
// In case `actual` is an array, consider it a match
// if ANY of it's items matches `expected`
return actual.some(function(item) {
- return deepCompare(item, expected, comparator, anyPropertyKey, matchAgainstAnyProp);
+ return deepCompare(item, expected, comparator, matchAgainstAnyProp);
});
}
@@ -27049,11 +26739,11 @@ function deepCompare(actual, expected, comparator, anyPropertyKey, matchAgainstA
var key;
if (matchAgainstAnyProp) {
for (key in actual) {
- if ((key.charAt(0) !== '$') && deepCompare(actual[key], expected, comparator, anyPropertyKey, true)) {
+ if ((key.charAt(0) !== '$') && deepCompare(actual[key], expected, comparator, true)) {
return true;
}
}
- return dontMatchWholeObject ? false : deepCompare(actual, expected, comparator, anyPropertyKey, false);
+ return dontMatchWholeObject ? false : deepCompare(actual, expected, comparator, false);
} else if (expectedType === 'object') {
for (key in expected) {
var expectedVal = expected[key];
@@ -27061,9 +26751,9 @@ function deepCompare(actual, expected, comparator, anyPropertyKey, matchAgainstA
continue;
}
- var matchAnyProperty = key === anyPropertyKey;
+ var matchAnyProperty = key === '$';
var actualVal = matchAnyProperty ? actual : actual[key];
- if (!deepCompare(actualVal, expectedVal, comparator, anyPropertyKey, matchAnyProperty, matchAnyProperty)) {
+ if (!deepCompare(actualVal, expectedVal, comparator, matchAnyProperty, matchAnyProperty)) {
return false;
}
}
@@ -27801,22 +27491,21 @@ var uppercaseFilter = valueFn(uppercase);
* @kind function
*
* @description
- * Creates a new array or string containing only a specified number of elements. The elements are
- * taken from either the beginning or the end of the source array, string or number, as specified by
- * the value and sign (positive or negative) of `limit`. Other array-like objects are also supported
- * (e.g. array subclasses, NodeLists, jqLite/jQuery collections etc). If a number is used as input,
- * it is converted to a string.
- *
- * @param {Array|ArrayLike|string|number} input - Array/array-like, string or number to be limited.
- * @param {string|number} limit - The length of the returned array or string. If the `limit` number
+ * Creates a new array or string containing only a specified number of elements. The elements
+ * are taken from either the beginning or the end of the source array, string or number, as specified by
+ * the value and sign (positive or negative) of `limit`. If a number is used as input, it is
+ * converted to a string.
+ *
+ * @param {Array|string|number} input Source array, string or number to be limited.
+ * @param {string|number} limit The length of the returned array or string. If the `limit` number
* is positive, `limit` number of items from the beginning of the source array/string are copied.
* If the number is negative, `limit` number of items from the end of the source array/string
* are copied. The `limit` will be trimmed if it exceeds `array.length`. If `limit` is undefined,
* the input will be returned unchanged.
- * @param {(string|number)=} begin - Index at which to begin limitation. As a negative index,
- * `begin` indicates an offset from the end of `input`. Defaults to `0`.
- * @returns {Array|string} A new sub-array or substring of length `limit` or less if the input had
- * less than `limit` elements.
+ * @param {(string|number)=} begin Index at which to begin limitation. As a negative index, `begin`
+ * indicates an offset from the end of `input`. Defaults to `0`.
+ * @returns {Array|string} A new sub-array or substring of length `limit` or less if input array
+ * had less than `limit` elements.
*
* @example
@@ -27904,157 +27593,67 @@ function limitToFilter() {
if (isNaN(limit)) return input;
if (isNumber(input)) input = input.toString();
- if (!isArrayLike(input)) return input;
+ if (!isArray(input) && !isString(input)) return input;
begin = (!begin || isNaN(begin)) ? 0 : toInt(begin);
begin = (begin < 0) ? Math.max(0, input.length + begin) : begin;
if (limit >= 0) {
- return sliceFn(input, begin, begin + limit);
+ return input.slice(begin, begin + limit);
} else {
if (begin === 0) {
- return sliceFn(input, limit, input.length);
+ return input.slice(limit, input.length);
} else {
- return sliceFn(input, Math.max(0, begin + limit), begin);
+ return input.slice(Math.max(0, begin + limit), begin);
}
}
};
}
-function sliceFn(input, begin, end) {
- if (isString(input)) return input.slice(begin, end);
-
- return slice.call(input, begin, end);
-}
-
/**
* @ngdoc filter
* @name orderBy
* @kind function
*
* @description
- * Returns an array containing the items from the specified `collection`, ordered by a `comparator`
- * function based on the values computed using the `expression` predicate.
- *
- * For example, `[{id: 'foo'}, {id: 'bar'}] | orderBy:'id'` would result in
- * `[{id: 'bar'}, {id: 'foo'}]`.
+ * Orders a specified `array` by the `expression` predicate. It is ordered alphabetically
+ * for strings and numerically for numbers. Note: if you notice numbers are not being sorted
+ * as expected, make sure they are actually being saved as numbers and not strings.
+ * Array-like values (e.g. NodeLists, jQuery objects, TypedArrays, Strings, etc) are also supported.
*
- * The `collection` can be an Array or array-like object (e.g. NodeList, jQuery object, TypedArray,
- * String, etc).
- *
- * The `expression` can be a single predicate, or a list of predicates each serving as a tie-breaker
- * for the preceeding one. The `expression` is evaluated against each item and the output is used
- * for comparing with other items.
- *
- * You can change the sorting order by setting `reverse` to `true`. By default, items are sorted in
- * ascending order.
- *
- * The comparison is done using the `comparator` function. If none is specified, a default, built-in
- * comparator is used (see below for details - in a nutshell, it compares numbers numerically and
- * strings alphabetically).
- *
- * ### Under the hood
- *
- * Ordering the specified `collection` happens in two phases:
- *
- * 1. All items are passed through the predicate (or predicates), and the returned values are saved
- * along with their type (`string`, `number` etc). For example, an item `{label: 'foo'}`, passed
- * through a predicate that extracts the value of the `label` property, would be transformed to:
- * ```
- * {
- * value: 'foo',
- * type: 'string',
- * index: ...
- * }
- * ```
- * 2. The comparator function is used to sort the items, based on the derived values, types and
- * indices.
- *
- * If you use a custom comparator, it will be called with pairs of objects of the form
- * `{value: ..., type: '...', index: ...}` and is expected to return `0` if the objects are equal
- * (as far as the comparator is concerned), `-1` if the 1st one should be ranked higher than the
- * second, or `1` otherwise.
- *
- * In order to ensure that the sorting will be deterministic across platforms, if none of the
- * specified predicates can distinguish between two items, `orderBy` will automatically introduce a
- * dummy predicate that returns the item's index as `value`.
- * (If you are using a custom comparator, make sure it can handle this predicate as well.)
- *
- * Finally, in an attempt to simplify things, if a predicate returns an object as the extracted
- * value for an item, `orderBy` will try to convert that object to a primitive value, before passing
- * it to the comparator. The following rules govern the conversion:
- *
- * 1. If the object has a `valueOf()` method that returns a primitive, its return value will be
- * used instead.
- * (If the object has a `valueOf()` method that returns another object, then the returned object
- * will be used in subsequent steps.)
- * 2. If the object has a custom `toString()` method (i.e. not the one inherited from `Object`) that
- * returns a primitive, its return value will be used instead.
- * (If the object has a `toString()` method that returns another object, then the returned object
- * will be used in subsequent steps.)
- * 3. No conversion; the object itself is used.
- *
- * ### The default comparator
- *
- * The default, built-in comparator should be sufficient for most usecases. In short, it compares
- * numbers numerically, strings alphabetically (and case-insensitively), for objects falls back to
- * using their index in the original collection, and sorts values of different types by type.
- *
- * More specifically, it follows these steps to determine the relative order of items:
- *
- * 1. If the compared values are of different types, compare the types themselves alphabetically.
- * 2. If both values are of type `string`, compare them alphabetically in a case- and
- * locale-insensitive way.
- * 3. If both values are objects, compare their indices instead.
- * 4. Otherwise, return:
- * - `0`, if the values are equal (by strict equality comparison, i.e. using `===`).
- * - `-1`, if the 1st value is "less than" the 2nd value (compared using the `<` operator).
- * - `1`, otherwise.
- *
- * **Note:** If you notice numbers not being sorted as expected, make sure they are actually being
- * saved as numbers and not strings.
- *
- * @param {Array|ArrayLike} collection - The collection (array or array-like object) to sort.
- * @param {(Function|string|Array.)=} expression - A predicate (or list of
- * predicates) to be used by the comparator to determine the order of elements.
+ * @param {Array} array The array (or array-like object) to sort.
+ * @param {function(*)|string|Array.<(function(*)|string)>=} expression A predicate to be
+ * used by the comparator to determine the order of elements.
*
* Can be one of:
*
- * - `Function`: A getter function. This function will be called with each item as argument and
- * the return value will be used for sorting.
- * - `string`: An Angular expression. This expression will be evaluated against each item and the
- * result will be used for sorting. For example, use `'label'` to sort by a property called
- * `label` or `'label.substring(0, 3)'` to sort by the first 3 characters of the `label`
- * property.
- * (The result of a constant expression is interpreted as a property name to be used for
- * comparison. For example, use `'"special name"'` (note the extra pair of quotes) to sort by a
- * property called `special name`.)
- * An expression can be optionally prefixed with `+` or `-` to control the sorting direction,
- * ascending or descending. For example, `'+label'` or `'-label'`. If no property is provided,
- * (e.g. `'+'` or `'-'`), the collection element itself is used in comparisons.
- * - `Array`: An array of function and/or string predicates. If a predicate cannot determine the
- * relative order of two items, the next predicate is used as a tie-breaker.
- *
- * **Note:** If the predicate is missing or empty then it defaults to `'+'`.
+ * - `function`: Getter function. The result of this function will be sorted using the
+ * `<`, `===`, `>` operator.
+ * - `string`: An Angular expression. The result of this expression is used to compare elements
+ * (for example `name` to sort by a property called `name` or `name.substr(0, 3)` to sort by
+ * 3 first characters of a property called `name`). The result of a constant expression
+ * is interpreted as a property name to be used in comparisons (for example `"special name"`
+ * to sort object by the value of their `special name` property). An expression can be
+ * optionally prefixed with `+` or `-` to control ascending or descending sort order
+ * (for example, `+name` or `-name`). If no property is provided, (e.g. `'+'`) then the array
+ * element itself is used to compare where sorting.
+ * - `Array`: An array of function or string predicates. The first predicate in the array
+ * is used for sorting, but when two items are equivalent, the next predicate is used.
*
- * @param {boolean=} reverse - If `true`, reverse the sorting order.
- * @param {(Function)=} comparator - The comparator function used to determine the relative order of
- * value pairs. If omitted, the built-in comparator will be used.
+ * If the predicate is missing or empty then it defaults to `'+'`.
*
- * @returns {Array} - The sorted array.
+ * @param {boolean=} reverse Reverse the order of the array.
+ * @returns {Array} Sorted copy of the source array.
*
*
* @example
- * ### Ordering a table with `ngRepeat`
- *
- * The example below demonstrates a simple {@link ngRepeat ngRepeat}, where the data is sorted by
- * age in descending order (expression is set to `'-age'`). The `comparator` is not set, which means
- * it defaults to the built-in comparator.
- *
-
+ * The example below demonstrates a simple ngRepeat, where the data is sorted
+ * by age in descending order (predicate is set to `'-age'`).
+ * `reverse` is not set, which means it defaults to `false`.
+
-
+
Name
Phone Number
@@ -28069,77 +27668,43 @@ function sliceFn(input, begin, end) {
- angular.module('orderByExample1', [])
+ angular.module('orderByExample', [])
.controller('ExampleController', ['$scope', function($scope) {
- $scope.friends = [
- {name: 'John', phone: '555-1212', age: 10},
- {name: 'Mary', phone: '555-9876', age: 19},
- {name: 'Mike', phone: '555-4321', age: 21},
- {name: 'Adam', phone: '555-5678', age: 35},
- {name: 'Julie', phone: '555-8765', age: 29}
- ];
+ $scope.friends =
+ [{name:'John', phone:'555-1212', age:10},
+ {name:'Mary', phone:'555-9876', age:19},
+ {name:'Mike', phone:'555-4321', age:21},
+ {name:'Adam', phone:'555-5678', age:35},
+ {name:'Julie', phone:'555-8765', age:29}];
}]);
-
- .friends {
- border-collapse: collapse;
- }
-
- .friends th {
- border-bottom: 1px solid;
- }
- .friends td, .friends th {
- border-left: 1px solid;
- padding: 5px 10px;
- }
- .friends td:first-child, .friends th:first-child {
- border-left: none;
- }
-
-
- // Element locators
- var names = element.all(by.repeater('friends').column('friend.name'));
-
- it('should sort friends by age in reverse order', function() {
- expect(names.get(0).getText()).toBe('Adam');
- expect(names.get(1).getText()).toBe('Julie');
- expect(names.get(2).getText()).toBe('Mike');
- expect(names.get(3).getText()).toBe('Mary');
- expect(names.get(4).getText()).toBe('John');
- });
-
- *
*
+ * The predicate and reverse parameters can be controlled dynamically through scope properties,
+ * as shown in the next example.
* @example
- * ### Changing parameters dynamically
- *
- * All parameters can be changed dynamically. The next example shows how you can make the columns of
- * a table sortable, by binding the `expression` and `reverse` parameters to scope properties.
- *
-
+
+
- .friends th {
- border-bottom: 1px solid;
- }
- .friends td, .friends th {
- border-left: 1px solid;
- padding: 5px 10px;
- }
- .friends td:first-child, .friends th:first-child {
- border-left: none;
- }
+
+ angular.module('orderByExample', [])
+ .controller('ExampleController', ['$scope', '$filter', function($scope, $filter) {
+ var orderBy = $filter('orderBy');
+ $scope.friends = [
+ { name: 'John', phone: '555-1212', age: 10 },
+ { name: 'Mary', phone: '555-9876', age: 19 },
+ { name: 'Mike', phone: '555-4321', age: 21 },
+ { name: 'Adam', phone: '555-5678', age: 35 },
+ { name: 'Julie', phone: '555-8765', age: 29 }
+ ];
+ $scope.order = function(predicate) {
+ $scope.predicate = predicate;
+ $scope.reverse = ($scope.predicate === predicate) ? !$scope.reverse : false;
+ $scope.friends = orderBy($scope.friends, predicate, $scope.reverse);
+ };
+ $scope.order('age', true);
+ }]);
+
+
.sortorder:after {
- content: '\25b2'; // BLACK UP-POINTING TRIANGLE
+ content: '\25b2';
}
.sortorder.reverse:after {
- content: '\25bc'; // BLACK DOWN-POINTING TRIANGLE
- }
-
-
- // Element locators
- var unsortButton = element(by.partialButtonText('unsorted'));
- var nameHeader = element(by.partialButtonText('Name'));
- var phoneHeader = element(by.partialButtonText('Phone'));
- var ageHeader = element(by.partialButtonText('Age'));
- var firstName = element(by.repeater('friends').column('friend.name').row(0));
- var lastName = element(by.repeater('friends').column('friend.name').row(4));
-
- it('should sort friends by some property, when clicking on the column header', function() {
- expect(firstName.getText()).toBe('Adam');
- expect(lastName.getText()).toBe('John');
-
- phoneHeader.click();
- expect(firstName.getText()).toBe('John');
- expect(lastName.getText()).toBe('Mary');
-
- nameHeader.click();
- expect(firstName.getText()).toBe('Adam');
- expect(lastName.getText()).toBe('Mike');
-
- ageHeader.click();
- expect(firstName.getText()).toBe('John');
- expect(lastName.getText()).toBe('Adam');
- });
-
- it('should sort friends in reverse order, when clicking on the same column', function() {
- expect(firstName.getText()).toBe('Adam');
- expect(lastName.getText()).toBe('John');
-
- ageHeader.click();
- expect(firstName.getText()).toBe('John');
- expect(lastName.getText()).toBe('Adam');
-
- ageHeader.click();
- expect(firstName.getText()).toBe('Adam');
- expect(lastName.getText()).toBe('John');
- });
-
- it('should restore the original order, when clicking "Set to unsorted"', function() {
- expect(firstName.getText()).toBe('Adam');
- expect(lastName.getText()).toBe('John');
-
- unsortButton.click();
- expect(firstName.getText()).toBe('John');
- expect(lastName.getText()).toBe('Julie');
- });
-
-
- *
- *
- * @example
- * ### Using a custom comparator
- *
- * If you have very specific requirements about the way items are sorted, you can pass your own
- * comparator function. For example, you might need to compare some strings in a locale-sensitive
- * way. (When specifying a custom comparator, you also need to pass a value for the `reverse`
- * argument - passing `false` retains the default sorting order, i.e. ascending.)
- *
-
-
-
-
-
Locale-sensitive Comparator
-
-
-
Name
-
Favorite Letter
-
-
-
{{friend.name}}
-
{{friend.favoriteLetter}}
-
-
-
-
-
Default Comparator
-
-
-
Name
-
Favorite Letter
-
-
-
{{friend.name}}
-
{{friend.favoriteLetter}}
-
-
-
-
-
-
- angular.module('orderByExample4', [])
- .controller('ExampleController', ['$scope', function($scope) {
- $scope.friends = [
- {name: 'John', favoriteLetter: 'Ä'},
- {name: 'Mary', favoriteLetter: 'Ü'},
- {name: 'Mike', favoriteLetter: 'Ö'},
- {name: 'Adam', favoriteLetter: 'H'},
- {name: 'Julie', favoriteLetter: 'Z'}
- ];
-
- $scope.localeSensitiveComparator = function(v1, v2) {
- // If we don't get strings, just compare by index
- if (v1.type !== 'string' || v2.type !== 'string') {
- return (v1.index < v2.index) ? -1 : 1;
- }
-
- // Compare strings alphabetically, taking locale into account
- return v1.value.localeCompare(v2.value);
- };
- }]);
-
-
- .friends-container {
- display: inline-block;
- margin: 0 30px;
- }
-
- .friends {
- border-collapse: collapse;
+ content: '\25bc';
}
-
- .friends th {
- border-bottom: 1px solid;
- }
- .friends td, .friends th {
- border-left: 1px solid;
- padding: 5px 10px;
- }
- .friends td:first-child, .friends th:first-child {
- border-left: none;
- }
-
-
- // Element locators
- var container = element(by.css('.custom-comparator'));
- var names = container.all(by.repeater('friends').column('friend.name'));
-
- it('should sort friends by favorite letter (in correct alphabetical order)', function() {
- expect(names.get(0).getText()).toBe('John');
- expect(names.get(1).getText()).toBe('Adam');
- expect(names.get(2).getText()).toBe('Mike');
- expect(names.get(3).getText()).toBe('Mary');
- expect(names.get(4).getText()).toBe('Julie');
- });
-
-
- *
+
+
*/
orderByFilter.$inject = ['$parse'];
function orderByFilter($parse) {
- return function(array, sortPredicate, reverseOrder, compareFn) {
+ return function(array, sortPredicate, reverseOrder) {
if (array == null) return array;
if (!isArrayLike(array)) {
@@ -28486,12 +27816,11 @@ function orderByFilter($parse) {
if (!isArray(sortPredicate)) { sortPredicate = [sortPredicate]; }
if (sortPredicate.length === 0) { sortPredicate = ['+']; }
- var predicates = processPredicates(sortPredicate);
-
- var descending = reverseOrder ? -1 : 1;
-
- // Define the `compare()` function. Use a default comparator if none is specified.
- var compare = isFunction(compareFn) ? compareFn : defaultCompare;
+ var predicates = processPredicates(sortPredicate, reverseOrder);
+ // Add a predicate at the end that evaluates to the element index. This makes the
+ // sort stable as it works as a tie-breaker when all the input predicates cannot
+ // distinguish between two elements.
+ predicates.push({ get: function() { return {}; }, descending: reverseOrder ? -1 : 1});
// The next three lines are a version of a Swartzian Transform idiom from Perl
// (sometimes called the Decorate-Sort-Undecorate idiom)
@@ -28503,12 +27832,8 @@ function orderByFilter($parse) {
return array;
function getComparisonObject(value, index) {
- // NOTE: We are adding an extra `tieBreaker` value based on the element's index.
- // This will be used to keep the sort stable when none of the input predicates can
- // distinguish between two elements.
return {
value: value,
- tieBreaker: {value: index, type: 'number', index: index},
predicateValues: predicates.map(function(predicate) {
return getPredicateValue(predicate.get(value), index);
})
@@ -28516,19 +27841,18 @@ function orderByFilter($parse) {
}
function doComparison(v1, v2) {
- for (var i = 0, ii = predicates.length; i < ii; i++) {
- var result = compare(v1.predicateValues[i], v2.predicateValues[i]);
- if (result) {
- return result * predicates[i].descending * descending;
- }
+ var result = 0;
+ for (var index=0, length = predicates.length; index < length; ++index) {
+ result = compare(v1.predicateValues[index], v2.predicateValues[index]) * predicates[index].descending;
+ if (result) break;
}
-
- return compare(v1.tieBreaker, v2.tieBreaker) * descending;
+ return result;
}
};
- function processPredicates(sortPredicates) {
- return sortPredicates.map(function(predicate) {
+ function processPredicates(sortPredicate, reverseOrder) {
+ reverseOrder = reverseOrder ? -1 : 1;
+ return sortPredicate.map(function(predicate) {
var descending = 1, get = identity;
if (isFunction(predicate)) {
@@ -28546,7 +27870,7 @@ function orderByFilter($parse) {
}
}
}
- return {get: get, descending: descending};
+ return { get: get, descending: descending * reverseOrder };
});
}
@@ -28561,9 +27885,9 @@ function orderByFilter($parse) {
}
}
- function objectValue(value) {
+ function objectValue(value, index) {
// If `valueOf` is a valid function use that
- if (isFunction(value.valueOf)) {
+ if (typeof value.valueOf === 'function') {
value = value.valueOf();
if (isPrimitive(value)) return value;
}
@@ -28572,8 +27896,8 @@ function orderByFilter($parse) {
value = value.toString();
if (isPrimitive(value)) return value;
}
-
- return value;
+ // We have a basic object so we use the position of the object in the collection
+ return index;
}
function getPredicateValue(value, index) {
@@ -28581,39 +27905,23 @@ function orderByFilter($parse) {
if (value === null) {
type = 'string';
value = 'null';
+ } else if (type === 'string') {
+ value = value.toLowerCase();
} else if (type === 'object') {
- value = objectValue(value);
+ value = objectValue(value, index);
}
- return {value: value, type: type, index: index};
+ return { value: value, type: type };
}
- function defaultCompare(v1, v2) {
+ function compare(v1, v2) {
var result = 0;
- var type1 = v1.type;
- var type2 = v2.type;
-
- if (type1 === type2) {
- var value1 = v1.value;
- var value2 = v2.value;
-
- if (type1 === 'string') {
- // Compare strings case-insensitively
- value1 = value1.toLowerCase();
- value2 = value2.toLowerCase();
- } else if (type1 === 'object') {
- // For basic objects, use the position of the object
- // in the collection instead of the value
- if (isObject(value1)) value1 = v1.index;
- if (isObject(value2)) value2 = v2.index;
- }
-
- if (value1 !== value2) {
- result = value1 < value2 ? -1 : 1;
+ if (v1.type === v2.type) {
+ if (v1.value !== v2.value) {
+ result = v1.value < v2.value ? -1 : 1;
}
} else {
- result = type1 < type2 ? -1 : 1;
+ result = v1.type < v2.type ? -1 : 1;
}
-
return result;
}
}
@@ -28893,11 +28201,9 @@ var htmlAnchorDirective = valueFn({
*
* @description
*
- * Sets the `readonly` attribute on the element, if the expression inside `ngReadonly` is truthy.
- * Note that `readonly` applies only to `input` elements with specific types. [See the input docs on
- * MDN](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#attr-readonly) for more information.
+ * Sets the `readOnly` attribute on the element, if the expression inside `ngReadonly` is truthy.
*
- * A special directive is necessary because we cannot use interpolation inside the `readonly`
+ * A special directive is necessary because we cannot use interpolation inside the `readOnly`
* attribute. See the {@link guide/interpolation interpolation guide} for more info.
*
* @example
@@ -28934,13 +28240,6 @@ var htmlAnchorDirective = valueFn({
* A special directive is necessary because we cannot use interpolation inside the `selected`
* attribute. See the {@link guide/interpolation interpolation guide} for more info.
*
- *
- * **Note:** `ngSelected` does not interact with the `select` and `ngModel` directives, it only
- * sets the `selected` attribute on the element. If you are using `ngModel` on the select, you
- * should not use `ngSelected` on the options, as `ngModel` will set the select value and
- * selected options.
- *
'
-}
-globalFuncs.errorMsgs = [
- "Please enter valid amount. ",
- "Your password must be at least 9 characters. Please ensure it is a strong password. ",
- "Sorry! We don't have a clue what type of wallet file this is. ",
- "This is not a valid wallet file. ",
- "This unit doesn\'t exists, please use the one of the following units ",
- "Invalid address. ",
- "Invalid password. ",
- "Invalid amount. ",
- "Invalid gas limit. ",
- "Invalid data value. ",
- "Invalid gas amount. ",
- "Invalid nonce. ",
- "Invalid signed transaction. ",
- "A wallet with this nickname already exists. ",
- "Wallet not found. ",
- "Whoops. It doesnt look like a proposal with this ID exists yet or there is an error reading this proposal. ",
- "A wallet with this address already exists in storage. Please check your wallets page. ",
- "You need to have at some ETH in your account to cover the cost of gas. .01ETH should be more than sufficient for a few sends and votes. ",
- "All gas would be used on this transaction. This means you have already voted on this proposal or the debate period has ended.",
- "Invalid symbol"];
-globalFuncs.successMsgs = ["Valid address", "Wallet successfully decrypted", "Transaction submitted. TX ID: ", "New wallet added: ", "You have successfully voted. Thank you for being an active participant in The DAO."];
-globalFuncs.scrypt = {
- n: 1024
-};
-globalFuncs.postDelay = 300;
-globalFuncs.kdf = "scrypt";
-globalFuncs.defaultTxGasLimit = 21000;
-globalFuncs.digixClaimTxGasLimit = 150000;
-globalFuncs.donateAddress = "0x7cB57B5A97eAbe94205C07890BE4c1aD31E486A8";
-globalFuncs.isNumeric = function(n) {
- return !isNaN(parseFloat(n)) && isFinite(n);
-}
-globalFuncs.urlGet = function(name) {
- if (name = (new RegExp('[?&]' + encodeURIComponent(name) + '=([^&]*)')).exec(location.search)) return this.stripTags(decodeURIComponent(name[1]));
-}
-globalFuncs.stripTags = function(str) {
- var SCRIPT_REGEX = /");
+}
+globalFuncs.getBlob = function(mime, str) {
+ var str = (typeof str === 'object') ? JSON.stringify(str) : str;
+ if (str == null) return '';
+ var blob = new Blob([str], {
+ type: mime
+ });
+ return window.URL.createObjectURL(blob);
+}
+globalFuncs.getSuccessText = function(str) {
+ return '
'
+}
+globalFuncs.errorMsgs = [
+ "Please enter valid amount. ",
+ "Your password must be at least 9 characters. Please ensure it is a strong password. ",
+ "Sorry! We don't have a clue what type of wallet file this is. ",
+ "This is not a valid wallet file. ",
+ "This unit doesn\'t exists, please use the one of the following units ",
+ "Invalid address. ",
+ "Invalid password. ",
+ "Invalid amount. ",
+ "Invalid gas limit. ",
+ "Invalid data value. ",
+ "Invalid gas amount. ",
+ "Invalid nonce. ",
+ "Invalid signed transaction. ",
+ "A wallet with this nickname already exists. ",
+ "Wallet not found. ",
+ "Whoops. It doesnt look like a proposal with this ID exists yet or there is an error reading this proposal. ",
+ "A wallet with this address already exists in storage. Please check your wallets page. ",
+ "You need to have at some ETH in your account to cover the cost of gas. .01ETH should be more than sufficient for a few sends and votes. ",
+ "All gas would be used on this transaction. This means you have already voted on this proposal or the debate period has ended.",
+ "Invalid symbol"];
+globalFuncs.successMsgs = ["Valid address", "Wallet successfully decrypted", "Transaction submitted. TX ID: ", "New wallet added: ", "You have successfully voted. Thank you for being an active participant in The DAO."];
+globalFuncs.scrypt = {
+ n: 1024
+};
+globalFuncs.postDelay = 300;
+globalFuncs.kdf = "scrypt";
+globalFuncs.defaultTxGasLimit = 21000;
+globalFuncs.digixClaimTxGasLimit = 150000;
+globalFuncs.donateAddress = "0x7cB57B5A97eAbe94205C07890BE4c1aD31E486A8";
+globalFuncs.isNumeric = function(n) {
+ return !isNaN(parseFloat(n)) && isFinite(n);
+}
+globalFuncs.urlGet = function(name) {
+ if (name = (new RegExp('[?&]' + encodeURIComponent(name) + '=([^&]*)')).exec(location.search)) return this.stripTags(decodeURIComponent(name[1]));
+}
+globalFuncs.stripTags = function(str) {
+ var SCRIPT_REGEX = /
+
+
*/
function copy(source, destination) {
var stackSource = [];
@@ -7789,7 +7783,7 @@ function copy(source, destination) {
case '[object Uint8ClampedArray]':
case '[object Uint16Array]':
case '[object Uint32Array]':
- return new source.constructor(copyElement(source.buffer), source.byteOffset, source.length);
+ return new source.constructor(copyElement(source.buffer));
case '[object ArrayBuffer]':
//Support: IE10
@@ -7821,6 +7815,31 @@ function copy(source, destination) {
}
}
+/**
+ * Creates a shallow copy of an object, an array or a primitive.
+ *
+ * Assumes that there are no proto properties for objects.
+ */
+function shallowCopy(src, dst) {
+ if (isArray(src)) {
+ dst = dst || [];
+
+ for (var i = 0, ii = src.length; i < ii; i++) {
+ dst[i] = src[i];
+ }
+ } else if (isObject(src)) {
+ dst = dst || {};
+
+ for (var key in src) {
+ if (!(key.charAt(0) === '$' && key.charAt(1) === '$')) {
+ dst[key] = src[key];
+ }
+ }
+ }
+
+ return dst || src;
+}
+
/**
* @ngdoc function
@@ -9161,34 +9180,7 @@ function setupModuleLoader(window) {
}
-/* global shallowCopy: true */
-
-/**
- * Creates a shallow copy of an object, an array or a primitive.
- *
- * Assumes that there are no proto properties for objects.
- */
-function shallowCopy(src, dst) {
- if (isArray(src)) {
- dst = dst || [];
-
- for (var i = 0, ii = src.length; i < ii; i++) {
- dst[i] = src[i];
- }
- } else if (isObject(src)) {
- dst = dst || {};
-
- for (var key in src) {
- if (!(key.charAt(0) === '$' && key.charAt(1) === '$')) {
- dst[key] = src[key];
- }
- }
- }
-
- return dst || src;
-}
-
-/* global toDebugString: true */
+/* global: toDebugString: true */
function serializeObject(obj) {
var seen = [];
@@ -9292,7 +9284,6 @@ function toDebugString(obj) {
$HttpParamSerializerJQLikeProvider,
$HttpBackendProvider,
$xhrFactoryProvider,
- $jsonpCallbacksProvider,
$LocationProvider,
$LogProvider,
$ParseProvider,
@@ -9330,11 +9321,11 @@ function toDebugString(obj) {
* - `codeName` – `{string}` – Code name of the release, such as "jiggling-armfat".
*/
var version = {
- full: '1.5.8', // all of these placeholder strings will be replaced by grunt's
+ full: '1.5.6', // all of these placeholder strings will be replaced by grunt's
major: 1, // package task
minor: 5,
- dot: 8,
- codeName: 'arbitrary-fallbacks'
+ dot: 6,
+ codeName: 'arrow-stringification'
};
@@ -9365,7 +9356,7 @@ function publishExternalAPI(angular) {
'isDate': isDate,
'lowercase': lowercase,
'uppercase': uppercase,
- 'callbacks': {$$counter: 0},
+ 'callbacks': {counter: 0},
'getTestability': getTestability,
'$$minErr': minErr,
'$$csp': csp,
@@ -9454,7 +9445,6 @@ function publishExternalAPI(angular) {
$httpParamSerializerJQLike: $HttpParamSerializerJQLikeProvider,
$httpBackend: $HttpBackendProvider,
$xhrFactory: $xhrFactoryProvider,
- $jsonpCallbacks: $jsonpCallbacksProvider,
$location: $LocationProvider,
$log: $LogProvider,
$parse: $ParseProvider,
@@ -9531,7 +9521,7 @@ function publishExternalAPI(angular) {
* ## Angular's jqLite
* jqLite provides only the following jQuery methods:
*
- * - [`addClass()`](http://api.jquery.com/addClass/) - Does not support a function as first argument
+ * - [`addClass()`](http://api.jquery.com/addClass/)
* - [`after()`](http://api.jquery.com/after/)
* - [`append()`](http://api.jquery.com/append/)
* - [`attr()`](http://api.jquery.com/attr/) - Does not support functions as parameters
@@ -9558,7 +9548,7 @@ function publishExternalAPI(angular) {
* - [`ready()`](http://api.jquery.com/ready/)
* - [`remove()`](http://api.jquery.com/remove/)
* - [`removeAttr()`](http://api.jquery.com/removeAttr/)
- * - [`removeClass()`](http://api.jquery.com/removeClass/) - Does not support a function as first argument
+ * - [`removeClass()`](http://api.jquery.com/removeClass/)
* - [`removeData()`](http://api.jquery.com/removeData/)
* - [`replaceWith()`](http://api.jquery.com/replaceWith/)
* - [`text()`](http://api.jquery.com/text/)
@@ -9693,7 +9683,7 @@ function jqLiteBuildFragment(html, context) {
nodes.push(context.createTextNode(html));
} else {
// Convert html into DOM nodes
- tmp = fragment.appendChild(context.createElement("div"));
+ tmp = tmp || fragment.appendChild(context.createElement("div"));
tag = (TAG_NAME_REGEXP.exec(html) || ["", ""])[1].toLowerCase();
wrap = wrapMap[tag] || wrapMap._default;
tmp.innerHTML = wrap[1] + html.replace(XHTML_TAG_REGEXP, "<$1>$2>") + wrap[2];
@@ -11506,10 +11496,10 @@ function createInjector(modulesToLoad, strictDi) {
if (msie <= 11) {
return false;
}
- // Support: Edge 12-13 only
- // See: https://developer.microsoft.com/en-us/microsoft-edge/platform/issues/6156135/
+ // Workaround for MS Edge.
+ // Check https://connect.microsoft.com/IE/Feedback/Details/2211653
return typeof func === 'function'
- && /^(?:class\b|constructor\()/.test(stringifyFn(func));
+ && /^(?:class\s|constructor\()/.test(stringifyFn(func));
}
function invoke(fn, self, locals, serviceName) {
@@ -12250,13 +12240,7 @@ var $AnimateProvider = ['$provide', function($provide) {
* @param {DOMElement} parent the parent element which will append the element as
* a child (so long as the after element is not present)
* @param {DOMElement=} after the sibling element after which the element will be appended
- * @param {object=} options an optional collection of options/styles that will be applied to the element.
- * The object can have the following properties:
- *
- * - **addClass** - `{string}` - space-separated CSS classes to add to element
- * - **from** - `{Object}` - CSS properties & values at the beginning of animation. Must have matching `to`
- * - **removeClass** - `{string}` - space-separated CSS classes to remove from element
- * - **to** - `{Object}` - CSS properties & values at end of animation. Must have matching `from`
+ * @param {object=} options an optional collection of options/styles that will be applied to the element
*
* @return {Promise} the animation callback promise
*/
@@ -12282,13 +12266,7 @@ var $AnimateProvider = ['$provide', function($provide) {
* @param {DOMElement} parent the parent element which will append the element as
* a child (so long as the after element is not present)
* @param {DOMElement=} after the sibling element after which the element will be appended
- * @param {object=} options an optional collection of options/styles that will be applied to the element.
- * The object can have the following properties:
- *
- * - **addClass** - `{string}` - space-separated CSS classes to add to element
- * - **from** - `{Object}` - CSS properties & values at the beginning of animation. Must have matching `to`
- * - **removeClass** - `{string}` - space-separated CSS classes to remove from element
- * - **to** - `{Object}` - CSS properties & values at end of animation. Must have matching `from`
+ * @param {object=} options an optional collection of options/styles that will be applied to the element
*
* @return {Promise} the animation callback promise
*/
@@ -12309,13 +12287,7 @@ var $AnimateProvider = ['$provide', function($provide) {
* digest once the animation has completed.
*
* @param {DOMElement} element the element which will be removed from the DOM
- * @param {object=} options an optional collection of options/styles that will be applied to the element.
- * The object can have the following properties:
- *
- * - **addClass** - `{string}` - space-separated CSS classes to add to element
- * - **from** - `{Object}` - CSS properties & values at the beginning of animation. Must have matching `to`
- * - **removeClass** - `{string}` - space-separated CSS classes to remove from element
- * - **to** - `{Object}` - CSS properties & values at end of animation. Must have matching `from`
+ * @param {object=} options an optional collection of options/styles that will be applied to the element
*
* @return {Promise} the animation callback promise
*/
@@ -12339,13 +12311,7 @@ var $AnimateProvider = ['$provide', function($provide) {
*
* @param {DOMElement} element the element which the CSS classes will be applied to
* @param {string} className the CSS class(es) that will be added (multiple classes are separated via spaces)
- * @param {object=} options an optional collection of options/styles that will be applied to the element.
- * The object can have the following properties:
- *
- * - **addClass** - `{string}` - space-separated CSS classes to add to element
- * - **from** - `{Object}` - CSS properties & values at the beginning of animation. Must have matching `to`
- * - **removeClass** - `{string}` - space-separated CSS classes to remove from element
- * - **to** - `{Object}` - CSS properties & values at end of animation. Must have matching `from`
+ * @param {object=} options an optional collection of options/styles that will be applied to the element
*
* @return {Promise} the animation callback promise
*/
@@ -12369,13 +12335,7 @@ var $AnimateProvider = ['$provide', function($provide) {
*
* @param {DOMElement} element the element which the CSS classes will be applied to
* @param {string} className the CSS class(es) that will be removed (multiple classes are separated via spaces)
- * @param {object=} options an optional collection of options/styles that will be applied to the element.
- * The object can have the following properties:
- *
- * - **addClass** - `{string}` - space-separated CSS classes to add to element
- * - **from** - `{Object}` - CSS properties & values at the beginning of animation. Must have matching `to`
- * - **removeClass** - `{string}` - space-separated CSS classes to remove from element
- * - **to** - `{Object}` - CSS properties & values at end of animation. Must have matching `from`
+ * @param {object=} options an optional collection of options/styles that will be applied to the element
*
* @return {Promise} the animation callback promise
*/
@@ -12400,13 +12360,7 @@ var $AnimateProvider = ['$provide', function($provide) {
* @param {DOMElement} element the element which the CSS classes will be applied to
* @param {string} add the CSS class(es) that will be added (multiple classes are separated via spaces)
* @param {string} remove the CSS class(es) that will be removed (multiple classes are separated via spaces)
- * @param {object=} options an optional collection of options/styles that will be applied to the element.
- * The object can have the following properties:
- *
- * - **addClass** - `{string}` - space-separated CSS classes to add to element
- * - **from** - `{Object}` - CSS properties & values at the beginning of animation. Must have matching `to`
- * - **removeClass** - `{string}` - space-separated CSS classes to remove from element
- * - **to** - `{Object}` - CSS properties & values at end of animation. Must have matching `from`
+ * @param {object=} options an optional collection of options/styles that will be applied to the element
*
* @return {Promise} the animation callback promise
*/
@@ -12447,13 +12401,7 @@ var $AnimateProvider = ['$provide', function($provide) {
* @param {string=} className an optional CSS class that will be applied to the element for the duration of the animation. If
* this value is left as empty then a CSS class of `ng-inline-animate` will be applied to the element.
* (Note that if no animation is detected then this value will not be applied to the element.)
- * @param {object=} options an optional collection of options/styles that will be applied to the element.
- * The object can have the following properties:
- *
- * - **addClass** - `{string}` - space-separated CSS classes to add to element
- * - **from** - `{Object}` - CSS properties & values at the beginning of animation. Must have matching `to`
- * - **removeClass** - `{string}` - space-separated CSS classes to remove from element
- * - **to** - `{Object}` - CSS properties & values at end of animation. Must have matching `from`
+ * @param {object=} options an optional collection of options/styles that will be applied to the element
*
* @return {Promise} the animation callback promise
*/
@@ -13541,9 +13489,8 @@ function $TemplateCacheProvider() {
* There are many different options for a directive.
*
* The difference resides in the return value of the factory function.
- * You can either return a {@link $compile#directive-definition-object Directive Definition Object (see below)}
- * that defines the directive properties, or just the `postLink` function (all other properties will have
- * the default values).
+ * You can either return a "Directive Definition Object" (see below) that defines the directive properties,
+ * or just the `postLink` function (all other properties will have the default values).
*
*
* **Best Practice:** It's recommended to use the "directive definition object" form.
@@ -13607,125 +13554,6 @@ function $TemplateCacheProvider() {
* });
* ```
*
- * ### Life-cycle hooks
- * Directive controllers can provide the following methods that are called by Angular at points in the life-cycle of the
- * directive:
- * * `$onInit()` - Called on each controller after all the controllers on an element have been constructed and
- * had their bindings initialized (and before the pre & post linking functions for the directives on
- * this element). This is a good place to put initialization code for your controller.
- * * `$onChanges(changesObj)` - Called whenever one-way (`<`) or interpolation (`@`) bindings are updated. The
- * `changesObj` is a hash whose keys are the names of the bound properties that have changed, and the values are an
- * object of the form `{ currentValue, previousValue, isFirstChange() }`. Use this hook to trigger updates within a
- * component such as cloning the bound value to prevent accidental mutation of the outer value.
- * * `$doCheck()` - Called on each turn of the digest cycle. Provides an opportunity to detect and act on
- * changes. Any actions that you wish to take in response to the changes that you detect must be
- * invoked from this hook; implementing this has no effect on when `$onChanges` is called. For example, this hook
- * could be useful if you wish to perform a deep equality check, or to check a Date object, changes to which would not
- * be detected by Angular's change detector and thus not trigger `$onChanges`. This hook is invoked with no arguments;
- * if detecting changes, you must store the previous value(s) for comparison to the current values.
- * * `$onDestroy()` - Called on a controller when its containing scope is destroyed. Use this hook for releasing
- * external resources, watches and event handlers. Note that components have their `$onDestroy()` hooks called in
- * the same order as the `$scope.$broadcast` events are triggered, which is top down. This means that parent
- * components will have their `$onDestroy()` hook called before child components.
- * * `$postLink()` - Called after this controller's element and its children have been linked. Similar to the post-link
- * function this hook can be used to set up DOM event handlers and do direct DOM manipulation.
- * Note that child elements that contain `templateUrl` directives will not have been compiled and linked since
- * they are waiting for their template to load asynchronously and their own compilation and linking has been
- * suspended until that occurs.
- *
- * #### Comparison with Angular 2 life-cycle hooks
- * Angular 2 also uses life-cycle hooks for its components. While the Angular 1 life-cycle hooks are similar there are
- * some differences that you should be aware of, especially when it comes to moving your code from Angular 1 to Angular 2:
- *
- * * Angular 1 hooks are prefixed with `$`, such as `$onInit`. Angular 2 hooks are prefixed with `ng`, such as `ngOnInit`.
- * * Angular 1 hooks can be defined on the controller prototype or added to the controller inside its constructor.
- * In Angular 2 you can only define hooks on the prototype of the Component class.
- * * Due to the differences in change-detection, you may get many more calls to `$doCheck` in Angular 1 than you would to
- * `ngDoCheck` in Angular 2
- * * Changes to the model inside `$doCheck` will trigger new turns of the digest loop, which will cause the changes to be
- * propagated throughout the application.
- * Angular 2 does not allow the `ngDoCheck` hook to trigger a change outside of the component. It will either throw an
- * error or do nothing depending upon the state of `enableProdMode()`.
- *
- * #### Life-cycle hook examples
- *
- * This example shows how you can check for mutations to a Date object even though the identity of the object
- * has not changed.
- *
- *
- *
- * angular.module('do-check-module', [])
- * .component('app', {
- * template:
- * 'Month: ' +
- * 'Date: {{ $ctrl.date }}' +
- * '',
- * controller: function() {
- * this.date = new Date();
- * this.month = this.date.getMonth();
- * this.updateDate = function() {
- * this.date.setMonth(this.month);
- * };
- * }
- * })
- * .component('test', {
- * bindings: { date: '<' },
- * template:
- * '
{{ $ctrl.log | json }}
',
- * controller: function() {
- * var previousValue;
- * this.log = [];
- * this.$doCheck = function() {
- * var currentValue = this.date && this.date.valueOf();
- * if (previousValue !== currentValue) {
- * this.log.push('doCheck: date mutated: ' + this.date);
- * previousValue = currentValue;
- * }
- * };
- * }
- * });
- *
- *
- *
- *
- *
- *
- * This example show how you might use `$doCheck` to trigger changes in your component's inputs even if the
- * actual identity of the component doesn't change. (Be aware that cloning and deep equality checks on large
- * arrays or objects can have a negative impact on your application performance)
- *
- *
- *
- *
',
- * controller: function() {
- * this.log = [];
- *
- * this.$doCheck = function() {
- * if (this.items_ref !== this.items) {
- * this.log.push('doCheck: items changed');
- * this.items_ref = this.items;
- * }
- * if (!angular.equals(this.items_clone, this.items)) {
- * this.log.push('doCheck: items mutated');
- * this.items_clone = angular.copy(this.items);
- * }
- * };
- * }
- * });
- *
- *
*
*
* ### Directive Definition Object
@@ -13901,6 +13729,25 @@ function $TemplateCacheProvider() {
* The `$transclude` function also has a method on it, `$transclude.isSlotFilled(slotName)`, which returns
* `true` if the specified slot contains content (i.e. one or more DOM nodes).
*
+ * The controller can provide the following methods that act as life-cycle hooks:
+ * * `$onInit()` - Called on each controller after all the controllers on an element have been constructed and
+ * had their bindings initialized (and before the pre & post linking functions for the directives on
+ * this element). This is a good place to put initialization code for your controller.
+ * * `$onChanges(changesObj)` - Called whenever one-way (`<`) or interpolation (`@`) bindings are updated. The
+ * `changesObj` is a hash whose keys are the names of the bound properties that have changed, and the values are an
+ * object of the form `{ currentValue, previousValue, isFirstChange() }`. Use this hook to trigger updates within a
+ * component such as cloning the bound value to prevent accidental mutation of the outer value.
+ * * `$onDestroy()` - Called on a controller when its containing scope is destroyed. Use this hook for releasing
+ * external resources, watches and event handlers. Note that components have their `$onDestroy()` hooks called in
+ * the same order as the `$scope.$broadcast` events are triggered, which is top down. This means that parent
+ * components will have their `$onDestroy()` hook called before child components.
+ * * `$postLink()` - Called after this controller's element and its children have been linked. Similar to the post-link
+ * function this hook can be used to set up DOM event handlers and do direct DOM manipulation.
+ * Note that child elements that contain `templateUrl` directives will not have been compiled and linked since
+ * they are waiting for their template to load asynchronously and their own compilation and linking has been
+ * suspended until that occurs.
+ *
+ *
* #### `require`
* Require another directive and inject its controller as the fourth argument to the linking function. The
* `require` property can be a string, an array or an object:
@@ -14098,8 +13945,8 @@ function $TemplateCacheProvider() {
* any other controller.
*
* * `transcludeFn` - A transclude linking function pre-bound to the correct transclusion scope.
- * This is the same as the `$transclude` parameter of directive controllers,
- * see {@link ng.$compile#-controller- the controller section for details}.
+ * This is the same as the `$transclude`
+ * parameter of directive controllers, see there for details.
* `function([scope], cloneLinkingFn, futureParentElement)`.
*
* #### Pre-linking function
@@ -14901,19 +14748,11 @@ function $CompileProvider($provide, $$sanitizeUriProvider) {
}
// We must run this hook in an apply since the $$postDigest runs outside apply
$rootScope.$apply(function() {
- var errors = [];
for (var i = 0, ii = onChangesQueue.length; i < ii; ++i) {
- try {
- onChangesQueue[i]();
- } catch (e) {
- errors.push(e);
- }
+ onChangesQueue[i]();
}
// Reset the queue to trigger a new schedule next time there is a change
onChangesQueue = undefined;
- if (errors.length) {
- throw errors;
- }
});
} finally {
onChangesTtl++;
@@ -15554,7 +15393,19 @@ function $CompileProvider($provide, $$sanitizeUriProvider) {
addTextInterpolateDirective(directives, node.nodeValue);
break;
case NODE_TYPE_COMMENT: /* Comment */
- collectCommentDirectives(node, directives, attrs, maxPriority, ignoreDirective);
+ try {
+ match = COMMENT_DIRECTIVE_REGEXP.exec(node.nodeValue);
+ if (match) {
+ nName = directiveNormalize(match[1]);
+ if (addDirective(directives, nName, 'M', maxPriority, ignoreDirective)) {
+ attrs[nName] = trim(match[2]);
+ }
+ }
+ } catch (e) {
+ // turns out that under some circumstances IE9 throws errors when one attempts to read
+ // comment's node value.
+ // Just ignore it and continue. (Can't seem to reproduce in test case.)
+ }
break;
}
@@ -15562,24 +15413,6 @@ function $CompileProvider($provide, $$sanitizeUriProvider) {
return directives;
}
- function collectCommentDirectives(node, directives, attrs, maxPriority, ignoreDirective) {
- // function created because of performance, try/catch disables
- // the optimization of the whole function #14848
- try {
- var match = COMMENT_DIRECTIVE_REGEXP.exec(node.nodeValue);
- if (match) {
- var nName = directiveNormalize(match[1]);
- if (addDirective(directives, nName, 'M', maxPriority, ignoreDirective)) {
- attrs[nName] = trim(match[2]);
- }
- }
- } catch (e) {
- // turns out that under some circumstances IE9 throws errors when one attempts to read
- // comment's node value.
- // Just ignore it and continue. (Can't seem to reproduce in test case.)
- }
- }
-
/**
* Given a node with an directive-start it collects all of the siblings until it finds
* directive-end.
@@ -16095,22 +15928,10 @@ function $CompileProvider($provide, $$sanitizeUriProvider) {
forEach(elementControllers, function(controller) {
var controllerInstance = controller.instance;
if (isFunction(controllerInstance.$onChanges)) {
- try {
- controllerInstance.$onChanges(controller.bindingInfo.initialChanges);
- } catch (e) {
- $exceptionHandler(e);
- }
+ controllerInstance.$onChanges(controller.bindingInfo.initialChanges);
}
if (isFunction(controllerInstance.$onInit)) {
- try {
- controllerInstance.$onInit();
- } catch (e) {
- $exceptionHandler(e);
- }
- }
- if (isFunction(controllerInstance.$doCheck)) {
- controllerScope.$watch(function() { controllerInstance.$doCheck(); });
- controllerInstance.$doCheck();
+ controllerInstance.$onInit();
}
if (isFunction(controllerInstance.$onDestroy)) {
controllerScope.$on('$destroy', function callOnDestroyHook() {
@@ -16374,16 +16195,18 @@ function $CompileProvider($provide, $$sanitizeUriProvider) {
// copy the new attributes on the old attrs object
forEach(src, function(value, key) {
- // Check if we already set this attribute in the loop above.
- // `dst` will never contain hasOwnProperty as DOM parser won't let it.
- // You will get an "InvalidCharacterError: DOM Exception 5" error if you
- // have an attribute like "has-own-property" or "data-has-own-property", etc.
- if (!dst.hasOwnProperty(key) && key.charAt(0) !== '$') {
+ if (key == 'class') {
+ safeAddClass($element, value);
+ dst['class'] = (dst['class'] ? dst['class'] + ' ' : '') + value;
+ } else if (key == 'style') {
+ $element.attr('style', $element.attr('style') + ';' + value);
+ dst['style'] = (dst['style'] ? dst['style'] + ';' : '') + value;
+ // `dst` will never contain hasOwnProperty as DOM parser won't let it.
+ // You will get an "InvalidCharacterError: DOM Exception 5" error if you
+ // have an attribute like "has-own-property" or "data-has-own-property", etc.
+ } else if (key.charAt(0) != '$' && !dst.hasOwnProperty(key)) {
dst[key] = value;
-
- if (key !== 'class' && key !== 'style') {
- dstAttr[key] = srcAttr[key];
- }
+ dstAttr[key] = srcAttr[key];
}
});
}
@@ -16758,7 +16581,7 @@ function $CompileProvider($provide, $$sanitizeUriProvider) {
forEach(bindings, function initializeBinding(definition, scopeName) {
var attrName = definition.attrName,
optional = definition.optional,
- mode = definition.mode, // @, =, <, or &
+ mode = definition.mode, // @, =, or &
lastValue,
parentGet, parentSet, compare, removeWatch;
@@ -17244,21 +17067,18 @@ function $DocumentProvider() {
*
* ## Example:
*
- * The example below will overwrite the default `$exceptionHandler` in order to (a) log uncaught
- * errors to the backend for later inspection by the developers and (b) to use `$log.warn()` instead
- * of `$log.error()`.
- *
* ```js
- * angular.
- * module('exceptionOverwrite', []).
- * factory('$exceptionHandler', ['$log', 'logErrorsToBackend', function($log, logErrorsToBackend) {
- * return function myExceptionHandler(exception, cause) {
- * logErrorsToBackend(exception, cause);
- * $log.warn(exception, cause);
- * };
- * }]);
+ * angular.module('exceptionOverride', []).factory('$exceptionHandler', function() {
+ * return function(exception, cause) {
+ * exception.message += ' (caused by "' + cause + '")';
+ * throw exception;
+ * };
+ * });
* ```
*
+ * This example will override the normal action of `$exceptionHandler`, to make angular
+ * exceptions fail hard when they happen, instead of just logging to the console.
+ *
*
* Note, that code executed in event-listeners (even those registered using jqLite's `on`/`bind`
* methods) does not delegate exceptions to the {@link ng.$exceptionHandler $exceptionHandler}
@@ -17268,7 +17088,7 @@ function $DocumentProvider() {
* `try { ... } catch(e) { $exceptionHandler(e); }`
*
* @param {Error} exception Exception associated with the error.
- * @param {string=} cause Optional information about the context in which
+ * @param {string=} cause optional information about the context in which
* the error was thrown.
*
*/
@@ -17338,7 +17158,7 @@ function $HttpParamSerializerProvider() {
* * `{'foo': 'bar'}` results in `foo=bar`
* * `{'foo': Date.now()}` results in `foo=2015-04-01T09%3A50%3A49.262Z` (`toISOString()` and encoded representation of a Date object)
* * `{'foo': ['bar', 'baz']}` results in `foo=bar&foo=baz` (repeated key for each array element)
- * * `{'foo': {'bar':'baz'}}` results in `foo=%7B%22bar%22%3A%22baz%22%7D` (stringified and encoded representation of an object)
+ * * `{'foo': {'bar':'baz'}}` results in `foo=%7B%22bar%22%3A%22baz%22%7D"` (stringified and encoded representation of an object)
*
* Note that serializer will sort the request parameters alphabetically.
* */
@@ -17889,7 +17709,7 @@ function $HttpProvider() {
*
* ### Overriding the Default Transformations Per Request
*
- * If you wish to override the request/response transformations only for a single request then provide
+ * If you wish override the request/response transformations only for a single request then provide
* `transformRequest` and/or `transformResponse` properties on the configuration object passed
* into `$http`.
*
@@ -17932,7 +17752,7 @@ function $HttpProvider() {
* * cache a specific response - set config.cache value to TRUE or to a cache object
*
* If caching is enabled, but neither the default cache nor config.cache are set to a cache object,
- * then the default `$cacheFactory("$http")` object is used.
+ * then the default `$cacheFactory($http)` object is used.
*
* The default cache value can be set by updating the
* {@link ng.$http#defaults `$http.defaults.cache`} property or the
@@ -18260,25 +18080,48 @@ function $HttpProvider() {
config.headers = mergeHeaders(requestConfig);
config.method = uppercase(config.method);
config.paramSerializer = isString(config.paramSerializer) ?
- $injector.get(config.paramSerializer) : config.paramSerializer;
+ $injector.get(config.paramSerializer) : config.paramSerializer;
+
+ var serverRequest = function(config) {
+ var headers = config.headers;
+ var reqData = transformData(config.data, headersGetter(headers), undefined, config.transformRequest);
- var requestInterceptors = [];
- var responseInterceptors = [];
+ // strip content-type if data is undefined
+ if (isUndefined(reqData)) {
+ forEach(headers, function(value, header) {
+ if (lowercase(header) === 'content-type') {
+ delete headers[header];
+ }
+ });
+ }
+
+ if (isUndefined(config.withCredentials) && !isUndefined(defaults.withCredentials)) {
+ config.withCredentials = defaults.withCredentials;
+ }
+
+ // send request
+ return sendReq(config, reqData).then(transformResponse, transformResponse);
+ };
+
+ var chain = [serverRequest, undefined];
var promise = $q.when(config);
// apply interceptors
forEach(reversedInterceptors, function(interceptor) {
if (interceptor.request || interceptor.requestError) {
- requestInterceptors.unshift(interceptor.request, interceptor.requestError);
+ chain.unshift(interceptor.request, interceptor.requestError);
}
if (interceptor.response || interceptor.responseError) {
- responseInterceptors.push(interceptor.response, interceptor.responseError);
+ chain.push(interceptor.response, interceptor.responseError);
}
});
- promise = chainInterceptors(promise, requestInterceptors);
- promise = promise.then(serverRequest);
- promise = chainInterceptors(promise, responseInterceptors);
+ while (chain.length) {
+ var thenFn = chain.shift();
+ var rejectFn = chain.shift();
+
+ promise = promise.then(thenFn, rejectFn);
+ }
if (useLegacyPromise) {
promise.success = function(fn) {
@@ -18305,18 +18148,14 @@ function $HttpProvider() {
return promise;
-
- function chainInterceptors(promise, interceptors) {
- for (var i = 0, ii = interceptors.length; i < ii;) {
- var thenFn = interceptors[i++];
- var rejectFn = interceptors[i++];
-
- promise = promise.then(thenFn, rejectFn);
- }
-
- interceptors.length = 0;
-
- return promise;
+ function transformResponse(response) {
+ // make a copy since the response must be cacheable
+ var resp = extend({}, response);
+ resp.data = transformData(response.data, response.headers, response.status,
+ config.transformResponse);
+ return (isSuccess(response.status))
+ ? resp
+ : $q.reject(resp);
}
function executeHeaderFns(headers, config) {
@@ -18360,37 +18199,6 @@ function $HttpProvider() {
// execute if header value is a function for merged headers
return executeHeaderFns(reqHeaders, shallowCopy(config));
}
-
- function serverRequest(config) {
- var headers = config.headers;
- var reqData = transformData(config.data, headersGetter(headers), undefined, config.transformRequest);
-
- // strip content-type if data is undefined
- if (isUndefined(reqData)) {
- forEach(headers, function(value, header) {
- if (lowercase(header) === 'content-type') {
- delete headers[header];
- }
- });
- }
-
- if (isUndefined(config.withCredentials) && !isUndefined(defaults.withCredentials)) {
- config.withCredentials = defaults.withCredentials;
- }
-
- // send request
- return sendReq(config, reqData).then(transformResponse, transformResponse);
- }
-
- function transformResponse(response) {
- // make a copy since the response must be cacheable
- var resp = extend({}, response);
- resp.data = transformData(response.data, response.headers, response.status,
- config.transformResponse);
- return (isSuccess(response.status))
- ? resp
- : $q.reject(resp);
- }
}
$http.pendingRequests = [];
@@ -18437,8 +18245,6 @@ function $HttpProvider() {
*
* @description
* Shortcut method to perform `JSONP` request.
- * If you would like to customise where and how the callbacks are stored then try overriding
- * or decorating the {@link $jsonpCallbacks} service.
*
* @param {string} url Relative or absolute URL specifying the destination of the request.
* The name of the callback should be the string `JSON_CALLBACK`.
@@ -18712,7 +18518,7 @@ function $xhrFactoryProvider() {
/**
* @ngdoc service
* @name $httpBackend
- * @requires $jsonpCallbacks
+ * @requires $window
* @requires $document
* @requires $xhrFactory
*
@@ -18727,8 +18533,8 @@ function $xhrFactoryProvider() {
* $httpBackend} which can be trained with responses.
*/
function $HttpBackendProvider() {
- this.$get = ['$browser', '$jsonpCallbacks', '$document', '$xhrFactory', function($browser, $jsonpCallbacks, $document, $xhrFactory) {
- return createHttpBackend($browser, $xhrFactory, $browser.defer, $jsonpCallbacks, $document[0]);
+ this.$get = ['$browser', '$window', '$document', '$xhrFactory', function($browser, $window, $document, $xhrFactory) {
+ return createHttpBackend($browser, $xhrFactory, $browser.defer, $window.angular.callbacks, $document[0]);
}];
}
@@ -18738,13 +18544,17 @@ function createHttpBackend($browser, createXhr, $browserDefer, callbacks, rawDoc
$browser.$$incOutstandingRequestCount();
url = url || $browser.url();
- if (lowercase(method) === 'jsonp') {
- var callbackPath = callbacks.createCallback(url);
- var jsonpDone = jsonpReq(url, callbackPath, function(status, text) {
- // jsonpReq only ever sets status to 200 (OK), 404 (ERROR) or -1 (WAITING)
- var response = (status === 200) && callbacks.getResponse(callbackPath);
- completeRequest(callback, status, response, "", text);
- callbacks.removeCallback(callbackPath);
+ if (lowercase(method) == 'jsonp') {
+ var callbackId = '_' + (callbacks.counter++).toString(36);
+ callbacks[callbackId] = function(data) {
+ callbacks[callbackId].data = data;
+ callbacks[callbackId].called = true;
+ };
+
+ var jsonpDone = jsonpReq(url.replace('JSON_CALLBACK', 'angular.callbacks.' + callbackId),
+ callbackId, function(status, text) {
+ completeRequest(callback, status, callbacks[callbackId].data, "", text);
+ callbacks[callbackId] = noop;
});
} else {
@@ -18846,8 +18656,7 @@ function createHttpBackend($browser, createXhr, $browserDefer, callbacks, rawDoc
}
};
- function jsonpReq(url, callbackPath, done) {
- url = url.replace('JSON_CALLBACK', callbackPath);
+ function jsonpReq(url, callbackId, done) {
// we can't use jQuery/jqLite here because jQuery does crazy stuff with script elements, e.g.:
// - fetches local scripts via XHR and evals them
// - adds and immediately removes script elements from the document
@@ -18865,7 +18674,7 @@ function createHttpBackend($browser, createXhr, $browserDefer, callbacks, rawDoc
var text = "unknown";
if (event) {
- if (event.type === "load" && !callbacks.wasCalled(callbackPath)) {
+ if (event.type === "load" && !callbacks[callbackId].called) {
event = { type: "error" };
}
text = event.type;
@@ -19064,7 +18873,7 @@ function $InterpolateProvider() {
*
* `allOrNothing` is useful for interpolating URLs. `ngSrc` and `ngSrcset` use this behavior.
*
- * #### Escaped Interpolation
+ * ####Escaped Interpolation
* $interpolate provides a mechanism for escaping interpolation markers. Start and end markers
* can be escaped by preceding each of their characters with a REVERSE SOLIDUS U+005C (backslash).
* It will be rendered as a regular start/end marker, and will not be interpreted as an expression
@@ -19487,87 +19296,6 @@ function $IntervalProvider() {
}];
}
-/**
- * @ngdoc service
- * @name $jsonpCallbacks
- * @requires $window
- * @description
- * This service handles the lifecycle of callbacks to handle JSONP requests.
- * Override this service if you wish to customise where the callbacks are stored and
- * how they vary compared to the requested url.
- */
-var $jsonpCallbacksProvider = function() {
- this.$get = ['$window', function($window) {
- var callbacks = $window.angular.callbacks;
- var callbackMap = {};
-
- function createCallback(callbackId) {
- var callback = function(data) {
- callback.data = data;
- callback.called = true;
- };
- callback.id = callbackId;
- return callback;
- }
-
- return {
- /**
- * @ngdoc method
- * @name $jsonpCallbacks#createCallback
- * @param {string} url the url of the JSONP request
- * @returns {string} the callback path to send to the server as part of the JSONP request
- * @description
- * {@link $httpBackend} calls this method to create a callback and get hold of the path to the callback
- * to pass to the server, which will be used to call the callback with its payload in the JSONP response.
- */
- createCallback: function(url) {
- var callbackId = '_' + (callbacks.$$counter++).toString(36);
- var callbackPath = 'angular.callbacks.' + callbackId;
- var callback = createCallback(callbackId);
- callbackMap[callbackPath] = callbacks[callbackId] = callback;
- return callbackPath;
- },
- /**
- * @ngdoc method
- * @name $jsonpCallbacks#wasCalled
- * @param {string} callbackPath the path to the callback that was sent in the JSONP request
- * @returns {boolean} whether the callback has been called, as a result of the JSONP response
- * @description
- * {@link $httpBackend} calls this method to find out whether the JSONP response actually called the
- * callback that was passed in the request.
- */
- wasCalled: function(callbackPath) {
- return callbackMap[callbackPath].called;
- },
- /**
- * @ngdoc method
- * @name $jsonpCallbacks#getResponse
- * @param {string} callbackPath the path to the callback that was sent in the JSONP request
- * @returns {*} the data received from the response via the registered callback
- * @description
- * {@link $httpBackend} calls this method to get hold of the data that was provided to the callback
- * in the JSONP response.
- */
- getResponse: function(callbackPath) {
- return callbackMap[callbackPath].data;
- },
- /**
- * @ngdoc method
- * @name $jsonpCallbacks#removeCallback
- * @param {string} callbackPath the path to the callback that was sent in the JSONP request
- * @description
- * {@link $httpBackend} calls this method to remove the callback after the JSONP request has
- * completed or timed-out.
- */
- removeCallback: function(callbackPath) {
- var callback = callbackMap[callbackPath];
- delete callbacks[callback.id];
- delete callbackMap[callbackPath];
- }
- };
- }];
-};
-
/**
* @ngdoc service
* @name $locale
@@ -19907,12 +19635,6 @@ function LocationHashbangInHtml5Url(appBase, appBaseNoFile, hashPrefix) {
var locationPrototype = {
- /**
- * Ensure absolute url is initialized.
- * @private
- */
- $$absUrl:'',
-
/**
* Are we in html5 mode?
* @private
@@ -21286,7 +21008,7 @@ AST.prototype = {
var args = [];
if (this.peekToken().text !== ')') {
do {
- args.push(this.filterChain());
+ args.push(this.expression());
} while (this.expect(','));
}
return args;
@@ -23013,7 +22735,7 @@ function $ParseProvider() {
*
* **Methods**
*
- * - `then(successCallback, [errorCallback], [notifyCallback])` – regardless of when the promise was or
+ * - `then(successCallback, errorCallback, notifyCallback)` – regardless of when the promise was or
* will be resolved or rejected, `then` calls one of the success or error callbacks asynchronously
* as soon as the result is available. The callbacks are called with a single argument: the result
* or rejection reason. Additionally, the notify callback may be called zero or more times to
@@ -23024,8 +22746,7 @@ function $ParseProvider() {
* with the value which is resolved in that promise using
* [promise chaining](http://www.html5rocks.com/en/tutorials/es6/promises/#toc-promises-queues)).
* It also notifies via the return value of the `notifyCallback` method. The promise cannot be
- * resolved or rejected from the notifyCallback method. The errorCallback and notifyCallback
- * arguments are optional.
+ * resolved or rejected from the notifyCallback method.
*
* - `catch(errorCallback)` – shorthand for `promise.then(null, errorCallback)`
*
@@ -23440,30 +23161,6 @@ function qFactory(nextTick, exceptionHandler) {
return deferred.promise;
}
- /**
- * @ngdoc method
- * @name $q#race
- * @kind function
- *
- * @description
- * Returns a promise that resolves or rejects as soon as one of those promises
- * resolves or rejects, with the value or reason from that promise.
- *
- * @param {Array.|Object.} promises An array or hash of promises.
- * @returns {Promise} a promise that resolves or rejects as soon as one of the `promises`
- * resolves or rejects, with the value or reason from that promise.
- */
-
- function race(promises) {
- var deferred = defer();
-
- forEach(promises, function(promise) {
- when(promise).then(deferred.resolve, deferred.reject);
- });
-
- return deferred.promise;
- }
-
var $Q = function Q(resolver) {
if (!isFunction(resolver)) {
throw $qMinErr('norslvr', "Expected resolverFn, got '{0}'", resolver);
@@ -23493,7 +23190,6 @@ function qFactory(nextTick, exceptionHandler) {
$Q.when = when;
$Q.resolve = resolve;
$Q.all = all;
- $Q.race = race;
return $Q;
}
@@ -26845,11 +26541,10 @@ function $FilterProvider($provide) {
* - `Object`: A pattern object can be used to filter specific properties on objects contained
* by `array`. For example `{name:"M", phone:"1"}` predicate will return an array of items
* which have property `name` containing "M" and property `phone` containing "1". A special
- * property name (`$` by default) can be used (e.g. as in `{$: "text"}`) to accept a match
- * against any property of the object or its nested object properties. That's equivalent to the
- * simple substring match with a `string` as described above. The special property name can be
- * overwritten, using the `anyPropertyKey` parameter.
- * The predicate can be negated by prefixing the string with `!`.
+ * property name `$` can be used (as in `{$:"text"}`) to accept a match against any
+ * property of the object or its nested object properties. That's equivalent to the simple
+ * substring match with a `string` as described above. The predicate can be negated by prefixing
+ * the string with `!`.
* For example `{name: "!M"}` predicate will return an array of items which have property `name`
* not containing "M".
*
@@ -26883,9 +26578,6 @@ function $FilterProvider($provide) {
* Primitive values are converted to strings. Objects are not compared against primitives,
* unless they have a custom `toString` method (e.g. `Date` objects).
*
- * @param {string=} anyPropertyKey The special property name that matches against any property.
- * By default `$`.
- *
* @example
@@ -26954,9 +26646,8 @@ function $FilterProvider($provide) {
*/
-
function filterFilter() {
- return function(array, expression, comparator, anyPropertyKey) {
+ return function(array, expression, comparator) {
if (!isArrayLike(array)) {
if (array == null) {
return array;
@@ -26965,7 +26656,6 @@ function filterFilter() {
}
}
- anyPropertyKey = anyPropertyKey || '$';
var expressionType = getTypeForFilter(expression);
var predicateFn;
var matchAgainstAnyProp;
@@ -26982,7 +26672,7 @@ function filterFilter() {
//jshint -W086
case 'object':
//jshint +W086
- predicateFn = createPredicateFn(expression, comparator, anyPropertyKey, matchAgainstAnyProp);
+ predicateFn = createPredicateFn(expression, comparator, matchAgainstAnyProp);
break;
default:
return array;
@@ -26993,8 +26683,8 @@ function filterFilter() {
}
// Helper functions for `filterFilter`
-function createPredicateFn(expression, comparator, anyPropertyKey, matchAgainstAnyProp) {
- var shouldMatchPrimitives = isObject(expression) && (anyPropertyKey in expression);
+function createPredicateFn(expression, comparator, matchAgainstAnyProp) {
+ var shouldMatchPrimitives = isObject(expression) && ('$' in expression);
var predicateFn;
if (comparator === true) {
@@ -27022,25 +26712,25 @@ function createPredicateFn(expression, comparator, anyPropertyKey, matchAgainstA
predicateFn = function(item) {
if (shouldMatchPrimitives && !isObject(item)) {
- return deepCompare(item, expression[anyPropertyKey], comparator, anyPropertyKey, false);
+ return deepCompare(item, expression.$, comparator, false);
}
- return deepCompare(item, expression, comparator, anyPropertyKey, matchAgainstAnyProp);
+ return deepCompare(item, expression, comparator, matchAgainstAnyProp);
};
return predicateFn;
}
-function deepCompare(actual, expected, comparator, anyPropertyKey, matchAgainstAnyProp, dontMatchWholeObject) {
+function deepCompare(actual, expected, comparator, matchAgainstAnyProp, dontMatchWholeObject) {
var actualType = getTypeForFilter(actual);
var expectedType = getTypeForFilter(expected);
if ((expectedType === 'string') && (expected.charAt(0) === '!')) {
- return !deepCompare(actual, expected.substring(1), comparator, anyPropertyKey, matchAgainstAnyProp);
+ return !deepCompare(actual, expected.substring(1), comparator, matchAgainstAnyProp);
} else if (isArray(actual)) {
// In case `actual` is an array, consider it a match
// if ANY of it's items matches `expected`
return actual.some(function(item) {
- return deepCompare(item, expected, comparator, anyPropertyKey, matchAgainstAnyProp);
+ return deepCompare(item, expected, comparator, matchAgainstAnyProp);
});
}
@@ -27049,11 +26739,11 @@ function deepCompare(actual, expected, comparator, anyPropertyKey, matchAgainstA
var key;
if (matchAgainstAnyProp) {
for (key in actual) {
- if ((key.charAt(0) !== '$') && deepCompare(actual[key], expected, comparator, anyPropertyKey, true)) {
+ if ((key.charAt(0) !== '$') && deepCompare(actual[key], expected, comparator, true)) {
return true;
}
}
- return dontMatchWholeObject ? false : deepCompare(actual, expected, comparator, anyPropertyKey, false);
+ return dontMatchWholeObject ? false : deepCompare(actual, expected, comparator, false);
} else if (expectedType === 'object') {
for (key in expected) {
var expectedVal = expected[key];
@@ -27061,9 +26751,9 @@ function deepCompare(actual, expected, comparator, anyPropertyKey, matchAgainstA
continue;
}
- var matchAnyProperty = key === anyPropertyKey;
+ var matchAnyProperty = key === '$';
var actualVal = matchAnyProperty ? actual : actual[key];
- if (!deepCompare(actualVal, expectedVal, comparator, anyPropertyKey, matchAnyProperty, matchAnyProperty)) {
+ if (!deepCompare(actualVal, expectedVal, comparator, matchAnyProperty, matchAnyProperty)) {
return false;
}
}
@@ -27801,22 +27491,21 @@ var uppercaseFilter = valueFn(uppercase);
* @kind function
*
* @description
- * Creates a new array or string containing only a specified number of elements. The elements are
- * taken from either the beginning or the end of the source array, string or number, as specified by
- * the value and sign (positive or negative) of `limit`. Other array-like objects are also supported
- * (e.g. array subclasses, NodeLists, jqLite/jQuery collections etc). If a number is used as input,
- * it is converted to a string.
- *
- * @param {Array|ArrayLike|string|number} input - Array/array-like, string or number to be limited.
- * @param {string|number} limit - The length of the returned array or string. If the `limit` number
+ * Creates a new array or string containing only a specified number of elements. The elements
+ * are taken from either the beginning or the end of the source array, string or number, as specified by
+ * the value and sign (positive or negative) of `limit`. If a number is used as input, it is
+ * converted to a string.
+ *
+ * @param {Array|string|number} input Source array, string or number to be limited.
+ * @param {string|number} limit The length of the returned array or string. If the `limit` number
* is positive, `limit` number of items from the beginning of the source array/string are copied.
* If the number is negative, `limit` number of items from the end of the source array/string
* are copied. The `limit` will be trimmed if it exceeds `array.length`. If `limit` is undefined,
* the input will be returned unchanged.
- * @param {(string|number)=} begin - Index at which to begin limitation. As a negative index,
- * `begin` indicates an offset from the end of `input`. Defaults to `0`.
- * @returns {Array|string} A new sub-array or substring of length `limit` or less if the input had
- * less than `limit` elements.
+ * @param {(string|number)=} begin Index at which to begin limitation. As a negative index, `begin`
+ * indicates an offset from the end of `input`. Defaults to `0`.
+ * @returns {Array|string} A new sub-array or substring of length `limit` or less if input array
+ * had less than `limit` elements.
*
* @example
@@ -27904,157 +27593,67 @@ function limitToFilter() {
if (isNaN(limit)) return input;
if (isNumber(input)) input = input.toString();
- if (!isArrayLike(input)) return input;
+ if (!isArray(input) && !isString(input)) return input;
begin = (!begin || isNaN(begin)) ? 0 : toInt(begin);
begin = (begin < 0) ? Math.max(0, input.length + begin) : begin;
if (limit >= 0) {
- return sliceFn(input, begin, begin + limit);
+ return input.slice(begin, begin + limit);
} else {
if (begin === 0) {
- return sliceFn(input, limit, input.length);
+ return input.slice(limit, input.length);
} else {
- return sliceFn(input, Math.max(0, begin + limit), begin);
+ return input.slice(Math.max(0, begin + limit), begin);
}
}
};
}
-function sliceFn(input, begin, end) {
- if (isString(input)) return input.slice(begin, end);
-
- return slice.call(input, begin, end);
-}
-
/**
* @ngdoc filter
* @name orderBy
* @kind function
*
* @description
- * Returns an array containing the items from the specified `collection`, ordered by a `comparator`
- * function based on the values computed using the `expression` predicate.
- *
- * For example, `[{id: 'foo'}, {id: 'bar'}] | orderBy:'id'` would result in
- * `[{id: 'bar'}, {id: 'foo'}]`.
+ * Orders a specified `array` by the `expression` predicate. It is ordered alphabetically
+ * for strings and numerically for numbers. Note: if you notice numbers are not being sorted
+ * as expected, make sure they are actually being saved as numbers and not strings.
+ * Array-like values (e.g. NodeLists, jQuery objects, TypedArrays, Strings, etc) are also supported.
*
- * The `collection` can be an Array or array-like object (e.g. NodeList, jQuery object, TypedArray,
- * String, etc).
- *
- * The `expression` can be a single predicate, or a list of predicates each serving as a tie-breaker
- * for the preceeding one. The `expression` is evaluated against each item and the output is used
- * for comparing with other items.
- *
- * You can change the sorting order by setting `reverse` to `true`. By default, items are sorted in
- * ascending order.
- *
- * The comparison is done using the `comparator` function. If none is specified, a default, built-in
- * comparator is used (see below for details - in a nutshell, it compares numbers numerically and
- * strings alphabetically).
- *
- * ### Under the hood
- *
- * Ordering the specified `collection` happens in two phases:
- *
- * 1. All items are passed through the predicate (or predicates), and the returned values are saved
- * along with their type (`string`, `number` etc). For example, an item `{label: 'foo'}`, passed
- * through a predicate that extracts the value of the `label` property, would be transformed to:
- * ```
- * {
- * value: 'foo',
- * type: 'string',
- * index: ...
- * }
- * ```
- * 2. The comparator function is used to sort the items, based on the derived values, types and
- * indices.
- *
- * If you use a custom comparator, it will be called with pairs of objects of the form
- * `{value: ..., type: '...', index: ...}` and is expected to return `0` if the objects are equal
- * (as far as the comparator is concerned), `-1` if the 1st one should be ranked higher than the
- * second, or `1` otherwise.
- *
- * In order to ensure that the sorting will be deterministic across platforms, if none of the
- * specified predicates can distinguish between two items, `orderBy` will automatically introduce a
- * dummy predicate that returns the item's index as `value`.
- * (If you are using a custom comparator, make sure it can handle this predicate as well.)
- *
- * Finally, in an attempt to simplify things, if a predicate returns an object as the extracted
- * value for an item, `orderBy` will try to convert that object to a primitive value, before passing
- * it to the comparator. The following rules govern the conversion:
- *
- * 1. If the object has a `valueOf()` method that returns a primitive, its return value will be
- * used instead.
- * (If the object has a `valueOf()` method that returns another object, then the returned object
- * will be used in subsequent steps.)
- * 2. If the object has a custom `toString()` method (i.e. not the one inherited from `Object`) that
- * returns a primitive, its return value will be used instead.
- * (If the object has a `toString()` method that returns another object, then the returned object
- * will be used in subsequent steps.)
- * 3. No conversion; the object itself is used.
- *
- * ### The default comparator
- *
- * The default, built-in comparator should be sufficient for most usecases. In short, it compares
- * numbers numerically, strings alphabetically (and case-insensitively), for objects falls back to
- * using their index in the original collection, and sorts values of different types by type.
- *
- * More specifically, it follows these steps to determine the relative order of items:
- *
- * 1. If the compared values are of different types, compare the types themselves alphabetically.
- * 2. If both values are of type `string`, compare them alphabetically in a case- and
- * locale-insensitive way.
- * 3. If both values are objects, compare their indices instead.
- * 4. Otherwise, return:
- * - `0`, if the values are equal (by strict equality comparison, i.e. using `===`).
- * - `-1`, if the 1st value is "less than" the 2nd value (compared using the `<` operator).
- * - `1`, otherwise.
- *
- * **Note:** If you notice numbers not being sorted as expected, make sure they are actually being
- * saved as numbers and not strings.
- *
- * @param {Array|ArrayLike} collection - The collection (array or array-like object) to sort.
- * @param {(Function|string|Array.)=} expression - A predicate (or list of
- * predicates) to be used by the comparator to determine the order of elements.
+ * @param {Array} array The array (or array-like object) to sort.
+ * @param {function(*)|string|Array.<(function(*)|string)>=} expression A predicate to be
+ * used by the comparator to determine the order of elements.
*
* Can be one of:
*
- * - `Function`: A getter function. This function will be called with each item as argument and
- * the return value will be used for sorting.
- * - `string`: An Angular expression. This expression will be evaluated against each item and the
- * result will be used for sorting. For example, use `'label'` to sort by a property called
- * `label` or `'label.substring(0, 3)'` to sort by the first 3 characters of the `label`
- * property.
- * (The result of a constant expression is interpreted as a property name to be used for
- * comparison. For example, use `'"special name"'` (note the extra pair of quotes) to sort by a
- * property called `special name`.)
- * An expression can be optionally prefixed with `+` or `-` to control the sorting direction,
- * ascending or descending. For example, `'+label'` or `'-label'`. If no property is provided,
- * (e.g. `'+'` or `'-'`), the collection element itself is used in comparisons.
- * - `Array`: An array of function and/or string predicates. If a predicate cannot determine the
- * relative order of two items, the next predicate is used as a tie-breaker.
- *
- * **Note:** If the predicate is missing or empty then it defaults to `'+'`.
+ * - `function`: Getter function. The result of this function will be sorted using the
+ * `<`, `===`, `>` operator.
+ * - `string`: An Angular expression. The result of this expression is used to compare elements
+ * (for example `name` to sort by a property called `name` or `name.substr(0, 3)` to sort by
+ * 3 first characters of a property called `name`). The result of a constant expression
+ * is interpreted as a property name to be used in comparisons (for example `"special name"`
+ * to sort object by the value of their `special name` property). An expression can be
+ * optionally prefixed with `+` or `-` to control ascending or descending sort order
+ * (for example, `+name` or `-name`). If no property is provided, (e.g. `'+'`) then the array
+ * element itself is used to compare where sorting.
+ * - `Array`: An array of function or string predicates. The first predicate in the array
+ * is used for sorting, but when two items are equivalent, the next predicate is used.
*
- * @param {boolean=} reverse - If `true`, reverse the sorting order.
- * @param {(Function)=} comparator - The comparator function used to determine the relative order of
- * value pairs. If omitted, the built-in comparator will be used.
+ * If the predicate is missing or empty then it defaults to `'+'`.
*
- * @returns {Array} - The sorted array.
+ * @param {boolean=} reverse Reverse the order of the array.
+ * @returns {Array} Sorted copy of the source array.
*
*
* @example
- * ### Ordering a table with `ngRepeat`
- *
- * The example below demonstrates a simple {@link ngRepeat ngRepeat}, where the data is sorted by
- * age in descending order (expression is set to `'-age'`). The `comparator` is not set, which means
- * it defaults to the built-in comparator.
- *
-
+ * The example below demonstrates a simple ngRepeat, where the data is sorted
+ * by age in descending order (predicate is set to `'-age'`).
+ * `reverse` is not set, which means it defaults to `false`.
+
-
+
Name
Phone Number
@@ -28069,77 +27668,43 @@ function sliceFn(input, begin, end) {
- angular.module('orderByExample1', [])
+ angular.module('orderByExample', [])
.controller('ExampleController', ['$scope', function($scope) {
- $scope.friends = [
- {name: 'John', phone: '555-1212', age: 10},
- {name: 'Mary', phone: '555-9876', age: 19},
- {name: 'Mike', phone: '555-4321', age: 21},
- {name: 'Adam', phone: '555-5678', age: 35},
- {name: 'Julie', phone: '555-8765', age: 29}
- ];
+ $scope.friends =
+ [{name:'John', phone:'555-1212', age:10},
+ {name:'Mary', phone:'555-9876', age:19},
+ {name:'Mike', phone:'555-4321', age:21},
+ {name:'Adam', phone:'555-5678', age:35},
+ {name:'Julie', phone:'555-8765', age:29}];
}]);
-
- .friends {
- border-collapse: collapse;
- }
-
- .friends th {
- border-bottom: 1px solid;
- }
- .friends td, .friends th {
- border-left: 1px solid;
- padding: 5px 10px;
- }
- .friends td:first-child, .friends th:first-child {
- border-left: none;
- }
-
-
- // Element locators
- var names = element.all(by.repeater('friends').column('friend.name'));
-
- it('should sort friends by age in reverse order', function() {
- expect(names.get(0).getText()).toBe('Adam');
- expect(names.get(1).getText()).toBe('Julie');
- expect(names.get(2).getText()).toBe('Mike');
- expect(names.get(3).getText()).toBe('Mary');
- expect(names.get(4).getText()).toBe('John');
- });
-
- *
*
+ * The predicate and reverse parameters can be controlled dynamically through scope properties,
+ * as shown in the next example.
* @example
- * ### Changing parameters dynamically
- *
- * All parameters can be changed dynamically. The next example shows how you can make the columns of
- * a table sortable, by binding the `expression` and `reverse` parameters to scope properties.
- *
-
+
+
- .friends th {
- border-bottom: 1px solid;
- }
- .friends td, .friends th {
- border-left: 1px solid;
- padding: 5px 10px;
- }
- .friends td:first-child, .friends th:first-child {
- border-left: none;
- }
+
+ angular.module('orderByExample', [])
+ .controller('ExampleController', ['$scope', '$filter', function($scope, $filter) {
+ var orderBy = $filter('orderBy');
+ $scope.friends = [
+ { name: 'John', phone: '555-1212', age: 10 },
+ { name: 'Mary', phone: '555-9876', age: 19 },
+ { name: 'Mike', phone: '555-4321', age: 21 },
+ { name: 'Adam', phone: '555-5678', age: 35 },
+ { name: 'Julie', phone: '555-8765', age: 29 }
+ ];
+ $scope.order = function(predicate) {
+ $scope.predicate = predicate;
+ $scope.reverse = ($scope.predicate === predicate) ? !$scope.reverse : false;
+ $scope.friends = orderBy($scope.friends, predicate, $scope.reverse);
+ };
+ $scope.order('age', true);
+ }]);
+
+
.sortorder:after {
- content: '\25b2'; // BLACK UP-POINTING TRIANGLE
+ content: '\25b2';
}
.sortorder.reverse:after {
- content: '\25bc'; // BLACK DOWN-POINTING TRIANGLE
- }
-
-
- // Element locators
- var unsortButton = element(by.partialButtonText('unsorted'));
- var nameHeader = element(by.partialButtonText('Name'));
- var phoneHeader = element(by.partialButtonText('Phone'));
- var ageHeader = element(by.partialButtonText('Age'));
- var firstName = element(by.repeater('friends').column('friend.name').row(0));
- var lastName = element(by.repeater('friends').column('friend.name').row(4));
-
- it('should sort friends by some property, when clicking on the column header', function() {
- expect(firstName.getText()).toBe('Adam');
- expect(lastName.getText()).toBe('John');
-
- phoneHeader.click();
- expect(firstName.getText()).toBe('John');
- expect(lastName.getText()).toBe('Mary');
-
- nameHeader.click();
- expect(firstName.getText()).toBe('Adam');
- expect(lastName.getText()).toBe('Mike');
-
- ageHeader.click();
- expect(firstName.getText()).toBe('John');
- expect(lastName.getText()).toBe('Adam');
- });
-
- it('should sort friends in reverse order, when clicking on the same column', function() {
- expect(firstName.getText()).toBe('Adam');
- expect(lastName.getText()).toBe('John');
-
- ageHeader.click();
- expect(firstName.getText()).toBe('John');
- expect(lastName.getText()).toBe('Adam');
-
- ageHeader.click();
- expect(firstName.getText()).toBe('Adam');
- expect(lastName.getText()).toBe('John');
- });
-
- it('should restore the original order, when clicking "Set to unsorted"', function() {
- expect(firstName.getText()).toBe('Adam');
- expect(lastName.getText()).toBe('John');
-
- unsortButton.click();
- expect(firstName.getText()).toBe('John');
- expect(lastName.getText()).toBe('Julie');
- });
-
-
- *
- *
- * @example
- * ### Using a custom comparator
- *
- * If you have very specific requirements about the way items are sorted, you can pass your own
- * comparator function. For example, you might need to compare some strings in a locale-sensitive
- * way. (When specifying a custom comparator, you also need to pass a value for the `reverse`
- * argument - passing `false` retains the default sorting order, i.e. ascending.)
- *
-
-
-
-
-
Locale-sensitive Comparator
-
-
-
Name
-
Favorite Letter
-
-
-
{{friend.name}}
-
{{friend.favoriteLetter}}
-
-
-
-
-
Default Comparator
-
-
-
Name
-
Favorite Letter
-
-
-
{{friend.name}}
-
{{friend.favoriteLetter}}
-
-
-
-
-
-
- angular.module('orderByExample4', [])
- .controller('ExampleController', ['$scope', function($scope) {
- $scope.friends = [
- {name: 'John', favoriteLetter: 'Ä'},
- {name: 'Mary', favoriteLetter: 'Ü'},
- {name: 'Mike', favoriteLetter: 'Ö'},
- {name: 'Adam', favoriteLetter: 'H'},
- {name: 'Julie', favoriteLetter: 'Z'}
- ];
-
- $scope.localeSensitiveComparator = function(v1, v2) {
- // If we don't get strings, just compare by index
- if (v1.type !== 'string' || v2.type !== 'string') {
- return (v1.index < v2.index) ? -1 : 1;
- }
-
- // Compare strings alphabetically, taking locale into account
- return v1.value.localeCompare(v2.value);
- };
- }]);
-
-
- .friends-container {
- display: inline-block;
- margin: 0 30px;
- }
-
- .friends {
- border-collapse: collapse;
+ content: '\25bc';
}
-
- .friends th {
- border-bottom: 1px solid;
- }
- .friends td, .friends th {
- border-left: 1px solid;
- padding: 5px 10px;
- }
- .friends td:first-child, .friends th:first-child {
- border-left: none;
- }
-
-
- // Element locators
- var container = element(by.css('.custom-comparator'));
- var names = container.all(by.repeater('friends').column('friend.name'));
-
- it('should sort friends by favorite letter (in correct alphabetical order)', function() {
- expect(names.get(0).getText()).toBe('John');
- expect(names.get(1).getText()).toBe('Adam');
- expect(names.get(2).getText()).toBe('Mike');
- expect(names.get(3).getText()).toBe('Mary');
- expect(names.get(4).getText()).toBe('Julie');
- });
-
-
- *
+
+
*/
orderByFilter.$inject = ['$parse'];
function orderByFilter($parse) {
- return function(array, sortPredicate, reverseOrder, compareFn) {
+ return function(array, sortPredicate, reverseOrder) {
if (array == null) return array;
if (!isArrayLike(array)) {
@@ -28486,12 +27816,11 @@ function orderByFilter($parse) {
if (!isArray(sortPredicate)) { sortPredicate = [sortPredicate]; }
if (sortPredicate.length === 0) { sortPredicate = ['+']; }
- var predicates = processPredicates(sortPredicate);
-
- var descending = reverseOrder ? -1 : 1;
-
- // Define the `compare()` function. Use a default comparator if none is specified.
- var compare = isFunction(compareFn) ? compareFn : defaultCompare;
+ var predicates = processPredicates(sortPredicate, reverseOrder);
+ // Add a predicate at the end that evaluates to the element index. This makes the
+ // sort stable as it works as a tie-breaker when all the input predicates cannot
+ // distinguish between two elements.
+ predicates.push({ get: function() { return {}; }, descending: reverseOrder ? -1 : 1});
// The next three lines are a version of a Swartzian Transform idiom from Perl
// (sometimes called the Decorate-Sort-Undecorate idiom)
@@ -28503,12 +27832,8 @@ function orderByFilter($parse) {
return array;
function getComparisonObject(value, index) {
- // NOTE: We are adding an extra `tieBreaker` value based on the element's index.
- // This will be used to keep the sort stable when none of the input predicates can
- // distinguish between two elements.
return {
value: value,
- tieBreaker: {value: index, type: 'number', index: index},
predicateValues: predicates.map(function(predicate) {
return getPredicateValue(predicate.get(value), index);
})
@@ -28516,19 +27841,18 @@ function orderByFilter($parse) {
}
function doComparison(v1, v2) {
- for (var i = 0, ii = predicates.length; i < ii; i++) {
- var result = compare(v1.predicateValues[i], v2.predicateValues[i]);
- if (result) {
- return result * predicates[i].descending * descending;
- }
+ var result = 0;
+ for (var index=0, length = predicates.length; index < length; ++index) {
+ result = compare(v1.predicateValues[index], v2.predicateValues[index]) * predicates[index].descending;
+ if (result) break;
}
-
- return compare(v1.tieBreaker, v2.tieBreaker) * descending;
+ return result;
}
};
- function processPredicates(sortPredicates) {
- return sortPredicates.map(function(predicate) {
+ function processPredicates(sortPredicate, reverseOrder) {
+ reverseOrder = reverseOrder ? -1 : 1;
+ return sortPredicate.map(function(predicate) {
var descending = 1, get = identity;
if (isFunction(predicate)) {
@@ -28546,7 +27870,7 @@ function orderByFilter($parse) {
}
}
}
- return {get: get, descending: descending};
+ return { get: get, descending: descending * reverseOrder };
});
}
@@ -28561,9 +27885,9 @@ function orderByFilter($parse) {
}
}
- function objectValue(value) {
+ function objectValue(value, index) {
// If `valueOf` is a valid function use that
- if (isFunction(value.valueOf)) {
+ if (typeof value.valueOf === 'function') {
value = value.valueOf();
if (isPrimitive(value)) return value;
}
@@ -28572,8 +27896,8 @@ function orderByFilter($parse) {
value = value.toString();
if (isPrimitive(value)) return value;
}
-
- return value;
+ // We have a basic object so we use the position of the object in the collection
+ return index;
}
function getPredicateValue(value, index) {
@@ -28581,39 +27905,23 @@ function orderByFilter($parse) {
if (value === null) {
type = 'string';
value = 'null';
+ } else if (type === 'string') {
+ value = value.toLowerCase();
} else if (type === 'object') {
- value = objectValue(value);
+ value = objectValue(value, index);
}
- return {value: value, type: type, index: index};
+ return { value: value, type: type };
}
- function defaultCompare(v1, v2) {
+ function compare(v1, v2) {
var result = 0;
- var type1 = v1.type;
- var type2 = v2.type;
-
- if (type1 === type2) {
- var value1 = v1.value;
- var value2 = v2.value;
-
- if (type1 === 'string') {
- // Compare strings case-insensitively
- value1 = value1.toLowerCase();
- value2 = value2.toLowerCase();
- } else if (type1 === 'object') {
- // For basic objects, use the position of the object
- // in the collection instead of the value
- if (isObject(value1)) value1 = v1.index;
- if (isObject(value2)) value2 = v2.index;
- }
-
- if (value1 !== value2) {
- result = value1 < value2 ? -1 : 1;
+ if (v1.type === v2.type) {
+ if (v1.value !== v2.value) {
+ result = v1.value < v2.value ? -1 : 1;
}
} else {
- result = type1 < type2 ? -1 : 1;
+ result = v1.type < v2.type ? -1 : 1;
}
-
return result;
}
}
@@ -28893,11 +28201,9 @@ var htmlAnchorDirective = valueFn({
*
* @description
*
- * Sets the `readonly` attribute on the element, if the expression inside `ngReadonly` is truthy.
- * Note that `readonly` applies only to `input` elements with specific types. [See the input docs on
- * MDN](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#attr-readonly) for more information.
+ * Sets the `readOnly` attribute on the element, if the expression inside `ngReadonly` is truthy.
*
- * A special directive is necessary because we cannot use interpolation inside the `readonly`
+ * A special directive is necessary because we cannot use interpolation inside the `readOnly`
* attribute. See the {@link guide/interpolation interpolation guide} for more info.
*
* @example
@@ -28934,13 +28240,6 @@ var htmlAnchorDirective = valueFn({
* A special directive is necessary because we cannot use interpolation inside the `selected`
* attribute. See the {@link guide/interpolation interpolation guide} for more info.
*
- *
- * **Note:** `ngSelected` does not interact with the `select` and `ngModel` directives, it only
- * sets the `selected` attribute on the element. If you are using `ngModel` on the select, you
- * should not use `ngSelected` on the options, as `ngModel` will set the select value and
- * selected options.
- *
- *
* @example
@@ -28977,11 +28276,6 @@ var htmlAnchorDirective = valueFn({
* A special directive is necessary because we cannot use interpolation inside the `open`
* attribute. See the {@link guide/interpolation interpolation guide} for more info.
*
- * ## A note about browser compatibility
- *
- * Edge, Firefox, and Internet Explorer do not support the `details` element, it is
- * recommended to use {@link ng.ngShow} and {@link ng.ngHide} instead.
- *
* @example
@@ -29672,9 +28966,7 @@ var ISO_DATE_REGEXP = /^\d{4,}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d:[0-5]\d\.\d+(?:[+-
// 9. Fragment
// 1111111111111111 222 333333 44444 555555555555555555555555 666 77777777 8888888 999
var URL_REGEXP = /^[a-z][a-z\d.+-]*:\/*(?:[^:@]+(?::[^@]+)?@)?(?:[^\s:/?#]+|\[[a-f\d:]+\])(?::\d+)?(?:\/[^?#]*)?(?:\?[^#]*)?(?:#.*)?$/i;
-/* jshint maxlen:220 */
-var EMAIL_REGEXP = /^(?=.{1,254}$)(?=.{1,64}@)[-!#$%&'*+\/0-9=?A-Z^_`a-z{|}~]+(\.[-!#$%&'*+\/0-9=?A-Z^_`a-z{|}~]+)*@[A-Za-z0-9]([A-Za-z0-9-]{0,61}[A-Za-z0-9])?(\.[A-Za-z0-9]([A-Za-z0-9-]{0,61}[A-Za-z0-9])?)*$/;
-/* jshint maxlen:200 */
+var EMAIL_REGEXP = /^[a-z0-9!#$%&'*+\/=?^_`{|}~.-]+@[a-z0-9]([a-z0-9-]*[a-z0-9])?(\.[a-z0-9]([a-z0-9-]*[a-z0-9])?)*$/i;
var NUMBER_REGEXP = /^\s*(\-|\+)?(\d+|(\d*(\.\d*)))([eE][+-]?\d+)?\s*$/;
var DATE_REGEXP = /^(\d{4,})-(\d{2})-(\d{2})$/;
var DATETIMELOCAL_REGEXP = /^(\d{4,})-(\d\d)-(\d\d)T(\d\d):(\d\d)(?::(\d\d)(\.\d{1,3})?)?$/;
@@ -31059,7 +30351,7 @@ function numberInputType(scope, element, attr, ctrl, $sniffer, $browser) {
attr.$observe('min', function(val) {
if (isDefined(val) && !isNumber(val)) {
- val = parseFloat(val);
+ val = parseFloat(val, 10);
}
minVal = isNumber(val) && !isNaN(val) ? val : undefined;
// TODO(matsko): implement validateLater to reduce number of validations
@@ -31075,7 +30367,7 @@ function numberInputType(scope, element, attr, ctrl, $sniffer, $browser) {
attr.$observe('max', function(val) {
if (isDefined(val) && !isNumber(val)) {
- val = parseFloat(val);
+ val = parseFloat(val, 10);
}
maxVal = isNumber(val) && !isNaN(val) ? val : undefined;
// TODO(matsko): implement validateLater to reduce number of validations
@@ -31882,11 +31174,6 @@ function classDirective(name, selector) {
* When the expression changes, the previously added classes are removed and only then are the
* new classes added.
*
- * @knownIssue
- * You should not use {@link guide/interpolation interpolation} in the value of the `class`
- * attribute, when using the `ngClass` directive on the same element.
- * See {@link guide/interpolation#known-issues here} for more info.
- *
* @animations
* | Animation | Occurs |
* |----------------------------------|-------------------------------------|
@@ -35832,7 +35119,7 @@ var ngOptionsDirective = ['$compile', '$document', '$parse', function($compile,
for (var i = options.items.length - 1; i >= 0; i--) {
var option = options.items[i];
- if (isDefined(option.group)) {
+ if (option.group) {
jqLiteRemove(option.element.parentNode);
} else {
jqLiteRemove(option.element);
@@ -35864,8 +35151,7 @@ var ngOptionsDirective = ['$compile', '$document', '$parse', function($compile,
listFragment.appendChild(groupElement);
// Update the label on the group element
- // "null" is special cased because of Safari
- groupElement.label = option.group === null ? 'null' : option.group;
+ groupElement.label = option.group;
// Store it for use later
groupElementMap[option.group] = groupElement;
@@ -36201,7 +35487,7 @@ var ngPluralizeDirective = ['$locale', '$interpolate', '$log', function($locale,
* it's a prefix used by Angular for public (`$`) and private (`$$`) properties.
*
* - The built-in filters {@link ng.orderBy orderBy} and {@link ng.filter filter} do not work with
- * objects, and will throw an error if used with one.
+ * objects, and will throw if used with one.
*
* If you are hitting any of these limitations, the recommended workaround is to convert your object into an array
* that is sorted into the order that you prefer before providing it to `ngRepeat`. You could
@@ -37050,11 +36336,6 @@ var ngHideDirective = ['$animate', function($animate) {
* @description
* The `ngStyle` directive allows you to set CSS style on an HTML element conditionally.
*
- * @knownIssue
- * You should not use {@link guide/interpolation interpolation} in the value of the `style`
- * attribute, when using the `ngStyle` directive on the same element.
- * See {@link guide/interpolation#known-issues here} for more info.
- *
* @element ANY
* @param {expression} ngStyle
*
@@ -37466,63 +36747,37 @@ var ngSwitchDefaultDirective = ngDirective({
*
*/
var ngTranscludeMinErr = minErr('ngTransclude');
-var ngTranscludeDirective = ['$compile', function($compile) {
- return {
- restrict: 'EAC',
- terminal: true,
- compile: function ngTranscludeCompile(tElement) {
+var ngTranscludeDirective = ngDirective({
+ restrict: 'EAC',
+ link: function($scope, $element, $attrs, controller, $transclude) {
- // Remove and cache any original content to act as a fallback
- var fallbackLinkFn = $compile(tElement.contents());
- tElement.empty();
-
- return function ngTranscludePostLink($scope, $element, $attrs, controller, $transclude) {
-
- if (!$transclude) {
- throw ngTranscludeMinErr('orphan',
- 'Illegal use of ngTransclude directive in the template! ' +
- 'No parent directive that requires a transclusion found. ' +
- 'Element: {0}',
- startingTag($element));
- }
-
-
- // If the attribute is of the form: `ng-transclude="ng-transclude"` then treat it like the default
- if ($attrs.ngTransclude === $attrs.$attr.ngTransclude) {
- $attrs.ngTransclude = '';
- }
- var slotName = $attrs.ngTransclude || $attrs.ngTranscludeSlot;
-
- // If the slot is required and no transclusion content is provided then this call will throw an error
- $transclude(ngTranscludeCloneAttachFn, null, slotName);
-
- // If the slot is optional and no transclusion content is provided then use the fallback content
- if (slotName && !$transclude.isSlotFilled(slotName)) {
- useFallbackContent();
- }
+ if ($attrs.ngTransclude === $attrs.$attr.ngTransclude) {
+ // If the attribute is of the form: `ng-transclude="ng-transclude"`
+ // then treat it like the default
+ $attrs.ngTransclude = '';
+ }
- function ngTranscludeCloneAttachFn(clone, transcludedScope) {
- if (clone.length) {
- $element.append(clone);
- } else {
- useFallbackContent();
- // There is nothing linked against the transcluded scope since no content was available,
- // so it should be safe to clean up the generated scope.
- transcludedScope.$destroy();
- }
- }
+ function ngTranscludeCloneAttachFn(clone) {
+ if (clone.length) {
+ $element.empty();
+ $element.append(clone);
+ }
+ }
- function useFallbackContent() {
- // Since this is the fallback content rather than the transcluded content,
- // we link against the scope of this directive rather than the transcluded scope
- fallbackLinkFn($scope, function(clone) {
- $element.append(clone);
- });
- }
- };
+ if (!$transclude) {
+ throw ngTranscludeMinErr('orphan',
+ 'Illegal use of ngTransclude directive in the template! ' +
+ 'No parent directive that requires a transclusion found. ' +
+ 'Element: {0}',
+ startingTag($element));
}
- };
-}];
+
+ // If there is no slot name defined or the slot name is not optional
+ // then transclude the slot
+ var slotName = $attrs.ngTransclude || $attrs.ngTranscludeSlot;
+ $transclude(ngTranscludeCloneAttachFn, null, slotName);
+ }
+});
/**
* @ngdoc directive
@@ -38655,7 +37910,7 @@ Entity.prototype.encode = function encode(data, enc, /* internal */ reporter) {
return this._getEncoder(enc).encode(data, reporter);
};
-},{"../asn1":41,"inherits":434,"vm":490}],43:[function(require,module,exports){
+},{"../asn1":41,"inherits":435,"vm":491}],43:[function(require,module,exports){
var inherits = require('inherits');
var Reporter = require('../base').Reporter;
var Buffer = require('buffer').Buffer;
@@ -38773,7 +38028,7 @@ EncoderBuffer.prototype.join = function join(out, offset) {
return out;
};
-},{"../base":44,"buffer":90,"inherits":434}],44:[function(require,module,exports){
+},{"../base":44,"buffer":90,"inherits":435}],44:[function(require,module,exports){
var base = exports;
base.Reporter = require('./reporter').Reporter;
@@ -38847,7 +38102,7 @@ module.exports = Node;
var stateProps = [
'enc', 'parent', 'children', 'tag', 'args', 'reverseArgs', 'choice',
'optional', 'any', 'obj', 'use', 'alteredUse', 'key', 'default', 'explicit',
- 'implicit', 'contains'
+ 'implicit'
];
Node.prototype.clone = function clone() {
@@ -39052,17 +38307,17 @@ Node.prototype.contains = function contains(item) {
// Decoding
//
-Node.prototype._decode = function decode(input, options) {
+Node.prototype._decode = function decode(input) {
var state = this._baseState;
// Decode root node
if (state.parent === null)
- return input.wrapResult(state.children[0]._decode(input, options));
+ return input.wrapResult(state.children[0]._decode(input));
var result = state['default'];
var present = true;
- var prevKey = null;
+ var prevKey;
if (state.key !== null)
prevKey = input.enterKey(state.key);
@@ -39081,9 +38336,9 @@ Node.prototype._decode = function decode(input, options) {
var save = input.save();
try {
if (state.choice === null)
- this._decodeGeneric(state.tag, input, options);
+ this._decodeGeneric(state.tag, input);
else
- this._decodeChoice(input, options);
+ this._decodeChoice(input);
present = true;
} catch (e) {
present = false;
@@ -39111,8 +38366,6 @@ Node.prototype._decode = function decode(input, options) {
input = explicit;
}
- var start = input.offset;
-
// Unwrap implicit and normal values
if (state.use === null && state.choice === null) {
if (state.any)
@@ -39131,19 +38384,13 @@ Node.prototype._decode = function decode(input, options) {
input = body;
}
- if (options && options.track && state.tag !== null)
- options.track(input.path(), start, input.length, 'tagged');
-
- if (options && options.track && state.tag !== null)
- options.track(input.path(), input.offset, input.length, 'content');
-
// Select proper method for tag
if (state.any)
result = result;
else if (state.choice === null)
- result = this._decodeGeneric(state.tag, input, options);
+ result = this._decodeGeneric(state.tag, input);
else
- result = this._decodeChoice(input, options);
+ result = this._decodeChoice(input);
if (input.isError(result))
return result;
@@ -39153,15 +38400,14 @@ Node.prototype._decode = function decode(input, options) {
state.children.forEach(function decodeChildren(child) {
// NOTE: We are ignoring errors here, to let parser continue with other
// parts of encoded data
- child._decode(input, options);
+ child._decode(input);
});
}
// Decode contained/encoded by schema, only in bit or octet strings
if (state.contains && (state.tag === 'octstr' || state.tag === 'bitstr')) {
var data = new DecoderBuffer(result);
- result = this._getUse(state.contains, input._reporterState.obj)
- ._decode(data, options);
+ result = this._getUse(state.contains, input._reporterState.obj)._decode(data);
}
}
@@ -39172,40 +38418,35 @@ Node.prototype._decode = function decode(input, options) {
// Set key
if (state.key !== null && (result !== null || present === true))
input.leaveKey(prevKey, state.key, result);
- else if (prevKey !== null)
- input.exitKey(prevKey);
return result;
};
-Node.prototype._decodeGeneric = function decodeGeneric(tag, input, options) {
+Node.prototype._decodeGeneric = function decodeGeneric(tag, input) {
var state = this._baseState;
if (tag === 'seq' || tag === 'set')
return null;
if (tag === 'seqof' || tag === 'setof')
- return this._decodeList(input, tag, state.args[0], options);
+ return this._decodeList(input, tag, state.args[0]);
else if (/str$/.test(tag))
- return this._decodeStr(input, tag, options);
+ return this._decodeStr(input, tag);
else if (tag === 'objid' && state.args)
- return this._decodeObjid(input, state.args[0], state.args[1], options);
+ return this._decodeObjid(input, state.args[0], state.args[1]);
else if (tag === 'objid')
- return this._decodeObjid(input, null, null, options);
+ return this._decodeObjid(input, null, null);
else if (tag === 'gentime' || tag === 'utctime')
- return this._decodeTime(input, tag, options);
+ return this._decodeTime(input, tag);
else if (tag === 'null_')
- return this._decodeNull(input, options);
+ return this._decodeNull(input);
else if (tag === 'bool')
- return this._decodeBool(input, options);
+ return this._decodeBool(input);
else if (tag === 'int' || tag === 'enum')
- return this._decodeInt(input, state.args && state.args[0], options);
-
- if (state.use !== null) {
- return this._getUse(state.use, input._reporterState.obj)
- ._decode(input, options);
- } else {
+ return this._decodeInt(input, state.args && state.args[0]);
+ else if (state.use !== null)
+ return this._getUse(state.use, input._reporterState.obj)._decode(input);
+ else
return input.error('unknown tag: ' + tag);
- }
};
Node.prototype._getUse = function _getUse(entity, obj) {
@@ -39222,7 +38463,7 @@ Node.prototype._getUse = function _getUse(entity, obj) {
return state.useDecoder;
};
-Node.prototype._decodeChoice = function decodeChoice(input, options) {
+Node.prototype._decodeChoice = function decodeChoice(input) {
var state = this._baseState;
var result = null;
var match = false;
@@ -39231,7 +38472,7 @@ Node.prototype._decodeChoice = function decodeChoice(input, options) {
var save = input.save();
var node = state.choice[key];
try {
- var value = node._decode(input, options);
+ var value = node._decode(input);
if (input.isError(value))
return false;
@@ -39412,7 +38653,7 @@ Node.prototype._isPrintstr = function isPrintstr(str) {
return /^[A-Za-z0-9 '\(\)\+,\-\.\/:=\?]*$/.test(str);
};
-},{"../base":44,"minimalistic-assert":441}],46:[function(require,module,exports){
+},{"../base":44,"minimalistic-assert":442}],46:[function(require,module,exports){
var inherits = require('inherits');
function Reporter(options) {
@@ -39446,24 +38687,14 @@ Reporter.prototype.enterKey = function enterKey(key) {
return this._reporterState.path.push(key);
};
-Reporter.prototype.exitKey = function exitKey(index) {
- var state = this._reporterState;
-
- state.path = state.path.slice(0, index - 1);
-};
-
Reporter.prototype.leaveKey = function leaveKey(index, key, value) {
var state = this._reporterState;
- this.exitKey(index);
+ state.path = state.path.slice(0, index - 1);
if (state.obj !== null)
state.obj[key] = value;
};
-Reporter.prototype.path = function path() {
- return this._reporterState.path.join('/');
-};
-
Reporter.prototype.enterObject = function enterObject() {
var state = this._reporterState;
@@ -39535,7 +38766,7 @@ ReporterError.prototype.rethrow = function rethrow(msg) {
return this;
};
-},{"inherits":434}],47:[function(require,module,exports){
+},{"inherits":435}],47:[function(require,module,exports){
var constants = require('../constants');
exports.tagClass = {
@@ -39711,15 +38942,14 @@ DERNode.prototype._skipUntilEnd = function skipUntilEnd(buffer, fail) {
}
};
-DERNode.prototype._decodeList = function decodeList(buffer, tag, decoder,
- options) {
+DERNode.prototype._decodeList = function decodeList(buffer, tag, decoder) {
var result = [];
while (!buffer.isEmpty()) {
var possibleEnd = this._peekTag(buffer, 'end');
if (buffer.isError(possibleEnd))
return possibleEnd;
- var res = decoder.decode(buffer, 'der', options);
+ var res = decoder.decode(buffer, 'der');
if (buffer.isError(res) && possibleEnd)
break;
result.push(res);
@@ -39924,7 +39154,7 @@ function derDecodeLen(buf, primitive, fail) {
return len;
}
-},{"../../asn1":41,"inherits":434}],50:[function(require,module,exports){
+},{"../../asn1":41,"inherits":435}],50:[function(require,module,exports){
var decoders = exports;
decoders.der = require('./der');
@@ -39981,7 +39211,7 @@ PEMDecoder.prototype.decode = function decode(data, options) {
return DERDecoder.prototype.decode.call(this, input, options);
};
-},{"./der":49,"buffer":90,"inherits":434}],52:[function(require,module,exports){
+},{"./der":49,"buffer":90,"inherits":435}],52:[function(require,module,exports){
var inherits = require('inherits');
var Buffer = require('buffer').Buffer;
@@ -40276,7 +39506,7 @@ function encodeTag(tag, primitive, cls, reporter) {
return res;
}
-},{"../../asn1":41,"buffer":90,"inherits":434}],53:[function(require,module,exports){
+},{"../../asn1":41,"buffer":90,"inherits":435}],53:[function(require,module,exports){
var encoders = exports;
encoders.der = require('./der');
@@ -40305,7 +39535,7 @@ PEMEncoder.prototype.encode = function encode(data, options) {
return out.join('\n');
};
-},{"./der":52,"inherits":434}],55:[function(require,module,exports){
+},{"./der":52,"inherits":435}],55:[function(require,module,exports){
// http://wiki.commonjs.org/wiki/Unit_Testing/1.0
//
// THIS IS NOT TESTED NOR LIKELY TO WORK OUTSIDE V8!
@@ -40666,7 +39896,7 @@ var objectKeys = Object.keys || function (obj) {
return keys;
};
-},{"util/":487}],56:[function(require,module,exports){
+},{"util/":488}],56:[function(require,module,exports){
(function (global){
"use strict";
@@ -40701,7 +39931,7 @@ define(String.prototype, "padRight", "".padEnd);
[][key] && define(Array, key, Function.call.bind([][key]));
});
}).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {})
-},{"core-js/fn/regexp/escape":92,"core-js/shim":385,"regenerator-runtime/runtime":466}],57:[function(require,module,exports){
+},{"core-js/fn/regexp/escape":92,"core-js/shim":386,"regenerator-runtime/runtime":467}],57:[function(require,module,exports){
'use strict'
exports.toByteArray = toByteArray
@@ -40813,13 +40043,13 @@ function fromByteArray (uint8) {
}
},{}],58:[function(require,module,exports){
-/*! bignumber.js v2.4.0 https://github.com/MikeMcl/bignumber.js/LICENCE */
+/*! bignumber.js v2.3.0 https://github.com/MikeMcl/bignumber.js/LICENCE */
;(function (globalObj) {
'use strict';
/*
- bignumber.js v2.4.0
+ bignumber.js v2.3.0
A JavaScript library for arbitrary-precision arithmetic.
https://github.com/MikeMcl/bignumber.js
Copyright (c) 2016 Michael Mclaughlin
@@ -40827,7 +40057,7 @@ function fromByteArray (uint8) {
*/
- var BigNumber, cryptoObj, parseNumeric,
+ var cryptoObj, parseNumeric,
isNumeric = /^-?(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,
mathceil = Math.ceil,
mathfloor = Math.floor,
@@ -43529,17 +42759,13 @@ function fromByteArray (uint8) {
// EXPORT
- BigNumber = constructorFactory();
- BigNumber.default = BigNumber.BigNumber = BigNumber;
-
-
- // AMD.
+ // AMD.
if ( typeof define == 'function' && define.amd ) {
- define( function () { return BigNumber; } );
+ define( function () { return constructorFactory(); } );
// Node.js and other environments that support module.exports.
} else if ( typeof module != 'undefined' && module.exports ) {
- module.exports = BigNumber;
+ module.exports = constructorFactory();
// Split string stops browserify adding crypto shim.
if ( !cryptoObj ) try { cryptoObj = require('cry' + 'pto'); } catch (e) {}
@@ -43547,7 +42773,7 @@ function fromByteArray (uint8) {
// Browser.
} else {
if ( !globalObj ) globalObj = typeof self != 'undefined' ? self : Function('return this')();
- globalObj.BigNumber = BigNumber;
+ globalObj.BigNumber = constructorFactory();
}
})(this);
@@ -43724,12 +42950,8 @@ module.exports = {
}
BN.isBN = function isBN (num) {
- if (num instanceof BN) {
- return true;
- }
-
return num !== null && typeof num === 'object' &&
- num.constructor.wordSize === BN.wordSize && Array.isArray(num.words);
+ num.constructor.name === 'BN' && Array.isArray(num.words);
};
BN.max = function max (left, right) {
@@ -45770,10 +44992,6 @@ module.exports = {
assert(this.negative === 0, 'imaskn works only with positive numbers');
- if (this.length <= s) {
- return this;
- }
-
if (r !== 0) {
s++;
}
@@ -47438,7 +46656,7 @@ function xorTest (a, b) {
}
}).call(this,require("buffer").Buffer)
-},{"./aes":63,"./ghash":68,"buffer":90,"buffer-xor":89,"cipher-base":91,"inherits":434}],65:[function(require,module,exports){
+},{"./aes":63,"./ghash":68,"buffer":90,"buffer-xor":89,"cipher-base":91,"inherits":435}],65:[function(require,module,exports){
var ciphers = require('./encrypter')
exports.createCipher = exports.Cipher = ciphers.createCipher
exports.createCipheriv = exports.Cipheriv = ciphers.createCipheriv
@@ -47592,7 +46810,7 @@ exports.createDecipher = createDecipher
exports.createDecipheriv = createDecipheriv
}).call(this,require("buffer").Buffer)
-},{"./aes":63,"./authCipher":64,"./modes":69,"./modes/cbc":70,"./modes/cfb":71,"./modes/cfb1":72,"./modes/cfb8":73,"./modes/ctr":74,"./modes/ecb":75,"./modes/ofb":76,"./streamCipher":77,"buffer":90,"cipher-base":91,"evp_bytestokey":425,"inherits":434}],67:[function(require,module,exports){
+},{"./aes":63,"./authCipher":64,"./modes":69,"./modes/cbc":70,"./modes/cfb":71,"./modes/cfb1":72,"./modes/cfb8":73,"./modes/ctr":74,"./modes/ecb":75,"./modes/ofb":76,"./streamCipher":77,"buffer":90,"cipher-base":91,"evp_bytestokey":426,"inherits":435}],67:[function(require,module,exports){
(function (Buffer){
var aes = require('./aes')
var Transform = require('cipher-base')
@@ -47718,7 +46936,7 @@ exports.createCipheriv = createCipheriv
exports.createCipher = createCipher
}).call(this,require("buffer").Buffer)
-},{"./aes":63,"./authCipher":64,"./modes":69,"./modes/cbc":70,"./modes/cfb":71,"./modes/cfb1":72,"./modes/cfb8":73,"./modes/ctr":74,"./modes/ecb":75,"./modes/ofb":76,"./streamCipher":77,"buffer":90,"cipher-base":91,"evp_bytestokey":425,"inherits":434}],68:[function(require,module,exports){
+},{"./aes":63,"./authCipher":64,"./modes":69,"./modes/cbc":70,"./modes/cfb":71,"./modes/cfb1":72,"./modes/cfb8":73,"./modes/ctr":74,"./modes/ecb":75,"./modes/ofb":76,"./streamCipher":77,"buffer":90,"cipher-base":91,"evp_bytestokey":426,"inherits":435}],68:[function(require,module,exports){
(function (Buffer){
var zeros = new Buffer(16)
zeros.fill(0)
@@ -48196,7 +47414,7 @@ StreamCipher.prototype._final = function () {
}
}).call(this,require("buffer").Buffer)
-},{"./aes":63,"buffer":90,"cipher-base":91,"inherits":434}],78:[function(require,module,exports){
+},{"./aes":63,"buffer":90,"cipher-base":91,"inherits":435}],78:[function(require,module,exports){
var ebtk = require('evp_bytestokey')
var aes = require('browserify-aes/browser')
var DES = require('browserify-des')
@@ -48271,7 +47489,7 @@ function getCiphers () {
}
exports.listCiphers = exports.getCiphers = getCiphers
-},{"browserify-aes/browser":65,"browserify-aes/modes":69,"browserify-des":79,"browserify-des/modes":80,"evp_bytestokey":425}],79:[function(require,module,exports){
+},{"browserify-aes/browser":65,"browserify-aes/modes":69,"browserify-des":79,"browserify-des/modes":80,"evp_bytestokey":426}],79:[function(require,module,exports){
(function (Buffer){
var CipherBase = require('cipher-base')
var des = require('des.js')
@@ -48318,7 +47536,7 @@ DES.prototype._final = function () {
}
}).call(this,require("buffer").Buffer)
-},{"buffer":90,"cipher-base":91,"des.js":393,"inherits":434}],80:[function(require,module,exports){
+},{"buffer":90,"cipher-base":91,"des.js":394,"inherits":435}],80:[function(require,module,exports){
exports['des-ecb'] = {
key: 8,
iv: 0
@@ -48388,7 +47606,7 @@ function getr(priv) {
}
}).call(this,require("buffer").Buffer)
-},{"bn.js":60,"buffer":90,"randombytes":455}],82:[function(require,module,exports){
+},{"bn.js":60,"buffer":90,"randombytes":456}],82:[function(require,module,exports){
(function (Buffer){
const Sha3 = require('js-sha3')
@@ -48426,7 +47644,7 @@ module.exports = {
}
}).call(this,require("buffer").Buffer)
-},{"buffer":90,"js-sha3":437}],83:[function(require,module,exports){
+},{"buffer":90,"js-sha3":438}],83:[function(require,module,exports){
(function (Buffer){
'use strict'
exports['RSA-SHA224'] = exports.sha224WithRSAEncryption = {
@@ -48609,7 +47827,7 @@ module.exports = {
}
}).call(this,require("buffer").Buffer)
-},{"./algos":83,"./sign":86,"./verify":87,"buffer":90,"create-hash":388,"inherits":434,"stream":483}],85:[function(require,module,exports){
+},{"./algos":83,"./sign":86,"./verify":87,"buffer":90,"create-hash":389,"inherits":435,"stream":484}],85:[function(require,module,exports){
'use strict'
exports['1.3.132.0.10'] = 'secp256k1'
@@ -48812,7 +48030,7 @@ module.exports.getKey = getKey
module.exports.makeKey = makeKey
}).call(this,require("buffer").Buffer)
-},{"./curves":85,"bn.js":60,"browserify-rsa":81,"buffer":90,"create-hmac":391,"elliptic":403,"parse-asn1":445}],87:[function(require,module,exports){
+},{"./curves":85,"bn.js":60,"browserify-rsa":81,"buffer":90,"create-hmac":392,"elliptic":404,"parse-asn1":446}],87:[function(require,module,exports){
(function (Buffer){
// much of this based on https://github.com/indutny/self-signed/blob/gh-pages/lib/rsa.js
var curves = require('./curves')
@@ -48919,7 +48137,7 @@ function checkValue (b, q) {
module.exports = verify
}).call(this,require("buffer").Buffer)
-},{"./curves":85,"bn.js":60,"buffer":90,"elliptic":403,"parse-asn1":445}],88:[function(require,module,exports){
+},{"./curves":85,"bn.js":60,"buffer":90,"elliptic":404,"parse-asn1":446}],88:[function(require,module,exports){
(function (global){
'use strict';
@@ -49101,7 +48319,7 @@ exports.kMaxLength = kMaxLength()
function typedArraySupport () {
try {
var arr = new Uint8Array(1)
- arr.__proto__ = {__proto__: Uint8Array.prototype, foo: function () { return 42 }}
+ arr.foo = function () { return 42 }
return arr.foo() === 42 && // typed array instances can be augmented
typeof arr.subarray === 'function' && // chrome 9-10 lack `subarray`
arr.subarray(1, 1).byteLength === 0 // ie10 has broken `subarray`
@@ -49245,7 +48463,7 @@ function allocUnsafe (that, size) {
assertSize(size)
that = createBuffer(that, size < 0 ? 0 : checked(size) | 0)
if (!Buffer.TYPED_ARRAY_SUPPORT) {
- for (var i = 0; i < size; ++i) {
+ for (var i = 0; i < size; i++) {
that[i] = 0
}
}
@@ -49301,9 +48519,7 @@ function fromArrayBuffer (that, array, byteOffset, length) {
throw new RangeError('\'length\' is out of bounds')
}
- if (byteOffset === undefined && length === undefined) {
- array = new Uint8Array(array)
- } else if (length === undefined) {
+ if (length === undefined) {
array = new Uint8Array(array, byteOffset)
} else {
array = new Uint8Array(array, byteOffset, length)
@@ -49425,14 +48641,14 @@ Buffer.concat = function concat (list, length) {
var i
if (length === undefined) {
length = 0
- for (i = 0; i < list.length; ++i) {
+ for (i = 0; i < list.length; i++) {
length += list[i].length
}
}
var buffer = Buffer.allocUnsafe(length)
var pos = 0
- for (i = 0; i < list.length; ++i) {
+ for (i = 0; i < list.length; i++) {
var buf = list[i]
if (!Buffer.isBuffer(buf)) {
throw new TypeError('"list" argument must be an Array of Buffers')
@@ -49464,6 +48680,7 @@ function byteLength (string, encoding) {
switch (encoding) {
case 'ascii':
case 'binary':
+ // Deprecated
case 'raw':
case 'raws':
return len
@@ -49701,16 +48918,15 @@ function arrayIndexOf (arr, val, byteOffset, encoding) {
}
var foundIndex = -1
- for (var i = byteOffset; i < arrLength; ++i) {
- if (read(arr, i) === read(val, foundIndex === -1 ? 0 : i - foundIndex)) {
+ for (var i = 0; byteOffset + i < arrLength; i++) {
+ if (read(arr, byteOffset + i) === read(val, foundIndex === -1 ? 0 : i - foundIndex)) {
if (foundIndex === -1) foundIndex = i
- if (i - foundIndex + 1 === valLength) return foundIndex * indexSize
+ if (i - foundIndex + 1 === valLength) return (byteOffset + foundIndex) * indexSize
} else {
if (foundIndex !== -1) i -= i - foundIndex
foundIndex = -1
}
}
-
return -1
}
@@ -49775,7 +48991,7 @@ function hexWrite (buf, string, offset, length) {
if (length > strLen / 2) {
length = strLen / 2
}
- for (var i = 0; i < length; ++i) {
+ for (var i = 0; i < length; i++) {
var parsed = parseInt(string.substr(i * 2, 2), 16)
if (isNaN(parsed)) return i
buf[offset + i] = parsed
@@ -49989,7 +49205,7 @@ function asciiSlice (buf, start, end) {
var ret = ''
end = Math.min(buf.length, end)
- for (var i = start; i < end; ++i) {
+ for (var i = start; i < end; i++) {
ret += String.fromCharCode(buf[i] & 0x7F)
}
return ret
@@ -49999,7 +49215,7 @@ function binarySlice (buf, start, end) {
var ret = ''
end = Math.min(buf.length, end)
- for (var i = start; i < end; ++i) {
+ for (var i = start; i < end; i++) {
ret += String.fromCharCode(buf[i])
}
return ret
@@ -50012,7 +49228,7 @@ function hexSlice (buf, start, end) {
if (!end || end < 0 || end > len) end = len
var out = ''
- for (var i = start; i < end; ++i) {
+ for (var i = start; i < end; i++) {
out += toHex(buf[i])
}
return out
@@ -50055,7 +49271,7 @@ Buffer.prototype.slice = function slice (start, end) {
} else {
var sliceLen = end - start
newBuf = new Buffer(sliceLen, undefined)
- for (var i = 0; i < sliceLen; ++i) {
+ for (var i = 0; i < sliceLen; i++) {
newBuf[i] = this[i + start]
}
}
@@ -50282,7 +49498,7 @@ Buffer.prototype.writeUInt8 = function writeUInt8 (value, offset, noAssert) {
function objectWriteUInt16 (buf, value, offset, littleEndian) {
if (value < 0) value = 0xffff + value + 1
- for (var i = 0, j = Math.min(buf.length - offset, 2); i < j; ++i) {
+ for (var i = 0, j = Math.min(buf.length - offset, 2); i < j; i++) {
buf[offset + i] = (value & (0xff << (8 * (littleEndian ? i : 1 - i)))) >>>
(littleEndian ? i : 1 - i) * 8
}
@@ -50316,7 +49532,7 @@ Buffer.prototype.writeUInt16BE = function writeUInt16BE (value, offset, noAssert
function objectWriteUInt32 (buf, value, offset, littleEndian) {
if (value < 0) value = 0xffffffff + value + 1
- for (var i = 0, j = Math.min(buf.length - offset, 4); i < j; ++i) {
+ for (var i = 0, j = Math.min(buf.length - offset, 4); i < j; i++) {
buf[offset + i] = (value >>> (littleEndian ? i : 3 - i) * 8) & 0xff
}
}
@@ -50531,12 +49747,12 @@ Buffer.prototype.copy = function copy (target, targetStart, start, end) {
if (this === target && start < targetStart && targetStart < end) {
// descending copy from end
- for (i = len - 1; i >= 0; --i) {
+ for (i = len - 1; i >= 0; i--) {
target[i + targetStart] = this[i + start]
}
} else if (len < 1000 || !Buffer.TYPED_ARRAY_SUPPORT) {
// ascending copy from start
- for (i = 0; i < len; ++i) {
+ for (i = 0; i < len; i++) {
target[i + targetStart] = this[i + start]
}
} else {
@@ -50597,7 +49813,7 @@ Buffer.prototype.fill = function fill (val, start, end, encoding) {
var i
if (typeof val === 'number') {
- for (i = start; i < end; ++i) {
+ for (i = start; i < end; i++) {
this[i] = val
}
} else {
@@ -50605,7 +49821,7 @@ Buffer.prototype.fill = function fill (val, start, end, encoding) {
? val
: utf8ToBytes(new Buffer(val, encoding).toString())
var len = bytes.length
- for (i = 0; i < end - start; ++i) {
+ for (i = 0; i < end - start; i++) {
this[i + start] = bytes[i % len]
}
}
@@ -50647,7 +49863,7 @@ function utf8ToBytes (string, units) {
var leadSurrogate = null
var bytes = []
- for (var i = 0; i < length; ++i) {
+ for (var i = 0; i < length; i++) {
codePoint = string.charCodeAt(i)
// is surrogate component
@@ -50722,7 +49938,7 @@ function utf8ToBytes (string, units) {
function asciiToBytes (str) {
var byteArray = []
- for (var i = 0; i < str.length; ++i) {
+ 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)
}
@@ -50732,7 +49948,7 @@ function asciiToBytes (str) {
function utf16leToBytes (str, units) {
var c, hi, lo
var byteArray = []
- for (var i = 0; i < str.length; ++i) {
+ for (var i = 0; i < str.length; i++) {
if ((units -= 2) < 0) break
c = str.charCodeAt(i)
@@ -50750,7 +49966,7 @@ function base64ToBytes (str) {
}
function blitBuffer (src, dst, offset, length) {
- for (var i = 0; i < length; ++i) {
+ for (var i = 0; i < length; i++) {
if ((i + offset >= dst.length) || (i >= src.length)) break
dst[i + offset] = src[i]
}
@@ -50762,7 +49978,7 @@ function isnan (val) {
}
}).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {})
-},{"base64-js":57,"ieee754":432,"isarray":436}],91:[function(require,module,exports){
+},{"base64-js":57,"ieee754":433,"isarray":437}],91:[function(require,module,exports){
(function (Buffer){
var Transform = require('stream').Transform
var inherits = require('inherits')
@@ -50856,19 +50072,19 @@ CipherBase.prototype._toString = function (value, enc, final) {
}
}).call(this,require("buffer").Buffer)
-},{"buffer":90,"inherits":434,"stream":483,"string_decoder":484}],92:[function(require,module,exports){
+},{"buffer":90,"inherits":435,"stream":484,"string_decoder":485}],92:[function(require,module,exports){
require('../../modules/core.regexp.escape');
module.exports = require('../../modules/_core').RegExp.escape;
-},{"../../modules/_core":113,"../../modules/core.regexp.escape":209}],93:[function(require,module,exports){
+},{"../../modules/_core":113,"../../modules/core.regexp.escape":210}],93:[function(require,module,exports){
module.exports = function(it){
if(typeof it != 'function')throw TypeError(it + ' is not a function!');
return it;
};
},{}],94:[function(require,module,exports){
-var cof = require('./_cof');
-module.exports = function(it, msg){
- if(typeof it != 'number' && cof(it) != 'Number')throw TypeError(msg);
- return +it;
+var cof = require('./_cof');
+module.exports = function(it, msg){
+ if(typeof it != 'number' && cof(it) != 'Number')throw TypeError(msg);
+ return +it;
};
},{"./_cof":108}],95:[function(require,module,exports){
// 22.1.3.31 Array.prototype[@@unscopables]
@@ -51010,50 +50226,50 @@ module.exports = function(TYPE, $create){
};
};
},{"./_array-species-create":105,"./_ctx":115,"./_iobject":135,"./_to-length":198,"./_to-object":199}],103:[function(require,module,exports){
-var 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;
+var 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;
};
},{"./_a-function":93,"./_iobject":135,"./_to-length":198,"./_to-object":199}],104:[function(require,module,exports){
-var 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;
+var 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;
};
},{"./_is-array":137,"./_is-object":139,"./_wks":207}],105:[function(require,module,exports){
// 9.4.2.3 ArraySpeciesCreate(originalArray, length)
@@ -51121,6 +50337,7 @@ module.exports = function(it){
'use strict';
var dP = require('./_object-dp').f
, create = require('./_object-create')
+ , hide = require('./_hide')
, redefineAll = require('./_redefine-all')
, ctx = require('./_ctx')
, anInstance = require('./_an-instance')
@@ -51260,7 +50477,7 @@ module.exports = {
setSpecies(NAME);
}
};
-},{"./_an-instance":96,"./_ctx":115,"./_defined":117,"./_descriptors":118,"./_for-of":127,"./_iter-define":143,"./_iter-step":145,"./_meta":152,"./_object-create":156,"./_object-dp":157,"./_redefine-all":176,"./_set-species":181}],110:[function(require,module,exports){
+},{"./_an-instance":96,"./_ctx":115,"./_defined":117,"./_descriptors":118,"./_for-of":127,"./_hide":130,"./_iter-define":143,"./_iter-step":145,"./_meta":152,"./_object-create":156,"./_object-dp":157,"./_redefine-all":176,"./_set-species":181}],110:[function(require,module,exports){
// https://github.com/DavidBruant/Map-Set.prototype.toJSON
var classof = require('./_classof')
, from = require('./_array-from-iterable');
@@ -51444,13 +50661,13 @@ module.exports = function(NAME, wrapper, methods, common, IS_MAP, IS_WEAK){
var core = module.exports = {version: '2.4.0'};
if(typeof __e == 'number')__e = core; // eslint-disable-line no-undef
},{}],114:[function(require,module,exports){
-'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;
+'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;
};
},{"./_object-dp":157,"./_property-desc":175}],115:[function(require,module,exports){
// optional / simple context binding
@@ -51474,14 +50691,14 @@ module.exports = function(fn, that, length){
};
};
},{"./_a-function":93}],116:[function(require,module,exports){
-'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);
+'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);
};
},{"./_an-object":97,"./_to-primitive":200}],117:[function(require,module,exports){
// 7.2.1 RequireObjectCoercible(argument)
@@ -51503,9 +50720,9 @@ module.exports = function(it){
return is ? document.createElement(it) : {};
};
},{"./_global":128,"./_is-object":139}],120:[function(require,module,exports){
-// IE 8- don't enum bug keys
-module.exports = (
- 'constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf'
+// IE 8- don't enum bug keys
+module.exports = (
+ 'constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf'
).split(',');
},{}],121:[function(require,module,exports){
// all enumerable object keys, includes symbols
@@ -51679,17 +50896,17 @@ module.exports = require('./_descriptors') ? function(object, key, value){
},{"./_descriptors":118,"./_object-dp":157,"./_property-desc":175}],131:[function(require,module,exports){
module.exports = require('./_global').document && document.documentElement;
},{"./_global":128}],132:[function(require,module,exports){
-module.exports = !require('./_descriptors') && !require('./_fails')(function(){
- return Object.defineProperty(require('./_dom-create')('div'), 'a', {get: function(){ return 7; }}).a != 7;
+module.exports = !require('./_descriptors') && !require('./_fails')(function(){
+ return Object.defineProperty(require('./_dom-create')('div'), 'a', {get: function(){ return 7; }}).a != 7;
});
},{"./_descriptors":118,"./_dom-create":119,"./_fails":124}],133:[function(require,module,exports){
-var 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;
+var 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;
};
},{"./_is-object":139,"./_set-proto":180}],134:[function(require,module,exports){
// fast apply, http://jsperf.lnkit.com/fast-apply/5
@@ -52015,7 +51232,7 @@ module.exports = {
key: toMetaKey,
exp: exp
};
-},{"./_export":122,"./_shared":184,"./es6.map":239,"./es6.weak-map":345}],154:[function(require,module,exports){
+},{"./_export":122,"./_shared":184,"./es6.map":240,"./es6.weak-map":346}],154:[function(require,module,exports){
var global = require('./_global')
, macrotask = require('./_task').set
, Observer = global.MutationObserver || global.WebKitMutationObserver
@@ -52119,48 +51336,46 @@ module.exports = !$assign || require('./_fails')(function(){
} return T;
} : $assign;
},{"./_fails":124,"./_iobject":135,"./_object-gops":163,"./_object-keys":166,"./_object-pie":167,"./_to-object":199}],156:[function(require,module,exports){
-// 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);
+// 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
+ , 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(' i)dP.f(O, P = keys[i++], Properties[P]);
- return O;
+var 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;
};
},{"./_an-object":97,"./_descriptors":118,"./_object-dp":157,"./_object-keys":166}],159:[function(require,module,exports){
-// 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];
+// 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];
});
},{"./_fails":124,"./_global":128,"./_library":148}],160:[function(require,module,exports){
-var 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]);
+var 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]);
};
},{"./_descriptors":118,"./_has":129,"./_ie8-dom-define":132,"./_object-pie":167,"./_property-desc":175,"./_to-iobject":197,"./_to-primitive":200}],161:[function(require,module,exports){
// fallback for IE11 buggy Object.getOwnPropertyNames with iframe and window
@@ -52239,54 +51454,54 @@ module.exports.f = function getOwnPropertyNames(it){
};
},{"./_object-gopn":162,"./_to-iobject":197}],162:[function(require,module,exports){
-// 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);
+// 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);
};
},{"./_enum-bug-keys":120,"./_object-keys-internal":165}],163:[function(require,module,exports){
exports.f = Object.getOwnPropertySymbols;
},{}],164:[function(require,module,exports){
-// 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;
+// 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;
};
},{"./_has":129,"./_shared-key":183,"./_to-object":199}],165:[function(require,module,exports){
-var 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;
+var 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;
};
},{"./_array-includes":101,"./_has":129,"./_shared-key":183,"./_to-iobject":197}],166:[function(require,module,exports){
-// 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);
+// 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);
};
},{"./_enum-bug-keys":120,"./_object-keys-internal":165}],167:[function(require,module,exports){
exports.f = {}.propertyIsEnumerable;
@@ -52485,10 +51700,10 @@ module.exports = function(it, tag, stat){
if(it && !has(it = stat ? it : it.prototype, TAG))def(it, TAG, {configurable: true, value: tag});
};
},{"./_has":129,"./_object-dp":157,"./_wks":207}],183:[function(require,module,exports){
-var shared = require('./_shared')('keys')
- , uid = require('./_uid');
-module.exports = function(key){
- return shared[key] || (shared[key] = uid(key));
+var shared = require('./_shared')('keys')
+ , uid = require('./_uid');
+module.exports = function(key){
+ return shared[key] || (shared[key] = uid(key));
};
},{"./_shared":184,"./_uid":204}],184:[function(require,module,exports){
var global = require('./_global')
@@ -52507,12 +51722,12 @@ module.exports = function(O, D){
return C === undefined || (S = anObject(C)[SPECIES]) == undefined ? D : aFunction(S);
};
},{"./_a-function":93,"./_an-object":97,"./_wks":207}],186:[function(require,module,exports){
-var fails = require('./_fails');
-
-module.exports = function(method, arg){
- return !!method && fails(function(){
- arg ? method.call(null, function(){}, 1) : method.call(null);
- });
+var fails = require('./_fails');
+
+module.exports = function(method, arg){
+ return !!method && fails(function(){
+ arg ? method.call(null, function(){}, 1) : method.call(null);
+ });
};
},{"./_fails":124}],187:[function(require,module,exports){
var toInteger = require('./_to-integer')
@@ -52624,7 +51839,7 @@ var trim = exporter.trim = function(string, TYPE){
module.exports = exporter;
},{"./_defined":117,"./_export":122,"./_fails":124,"./_string-ws":193}],193:[function(require,module,exports){
-module.exports = '\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u180E\u2000\u2001\u2002\u2003' +
+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';
},{}],194:[function(require,module,exports){
var ctx = require('./_ctx')
@@ -52764,6 +51979,7 @@ if(require('./_descriptors')){
, propertyDesc = require('./_property-desc')
, hide = require('./_hide')
, redefineAll = require('./_redefine-all')
+ , isInteger = require('./_is-integer')
, toInteger = require('./_to-integer')
, toLength = require('./_to-length')
, toIndex = require('./_to-index')
@@ -52777,6 +51993,7 @@ if(require('./_descriptors')){
, create = require('./_object-create')
, getPrototypeOf = require('./_object-gpo')
, gOPN = require('./_object-gopn').f
+ , isIterable = require('./core.is-iterable')
, getIterFn = require('./core.get-iterator-method')
, uid = require('./_uid')
, wks = require('./_wks')
@@ -53230,7 +52447,7 @@ if(require('./_descriptors')){
if(!LIBRARY && !CORRECT_ITER_NAME)hide(TypedArrayPrototype, ITERATOR, $iterator);
};
} else module.exports = function(){ /* empty */ };
-},{"./_an-instance":96,"./_array-copy-within":98,"./_array-fill":99,"./_array-includes":101,"./_array-methods":102,"./_classof":107,"./_ctx":115,"./_descriptors":118,"./_export":122,"./_fails":124,"./_global":128,"./_has":129,"./_hide":130,"./_is-array-iter":136,"./_is-object":139,"./_iter-detect":144,"./_iterators":146,"./_library":148,"./_object-create":156,"./_object-dp":157,"./_object-gopd":160,"./_object-gopn":162,"./_object-gpo":164,"./_property-desc":175,"./_redefine-all":176,"./_same-value":179,"./_set-species":181,"./_species-constructor":185,"./_to-index":195,"./_to-integer":196,"./_to-length":198,"./_to-object":199,"./_to-primitive":200,"./_typed":203,"./_typed-buffer":202,"./_uid":204,"./_wks":207,"./core.get-iterator-method":208,"./es6.array.iterator":220}],202:[function(require,module,exports){
+},{"./_an-instance":96,"./_array-copy-within":98,"./_array-fill":99,"./_array-includes":101,"./_array-methods":102,"./_classof":107,"./_ctx":115,"./_descriptors":118,"./_export":122,"./_fails":124,"./_global":128,"./_has":129,"./_hide":130,"./_is-array-iter":136,"./_is-integer":138,"./_is-object":139,"./_iter-detect":144,"./_iterators":146,"./_library":148,"./_object-create":156,"./_object-dp":157,"./_object-gopd":160,"./_object-gopn":162,"./_object-gpo":164,"./_property-desc":175,"./_redefine-all":176,"./_same-value":179,"./_set-species":181,"./_species-constructor":185,"./_to-index":195,"./_to-integer":196,"./_to-length":198,"./_to-object":199,"./_to-primitive":200,"./_typed":203,"./_typed-buffer":202,"./_uid":204,"./_wks":207,"./core.get-iterator-method":208,"./core.is-iterable":209,"./es6.array.iterator":221}],202:[function(require,module,exports){
'use strict';
var global = require('./_global')
, DESCRIPTORS = require('./_descriptors')
@@ -53254,11 +52471,13 @@ var global = require('./_global')
, $ArrayBuffer = global[ARRAY_BUFFER]
, $DataView = global[DATA_VIEW]
, Math = global.Math
+ , parseInt = global.parseInt
, RangeError = global.RangeError
, Infinity = global.Infinity
, BaseBuffer = $ArrayBuffer
, abs = Math.abs
, pow = Math.pow
+ , min = Math.min
, floor = Math.floor
, log = Math.log
, LN2 = Math.LN2
@@ -53538,14 +52757,14 @@ module.exports = function(key){
return 'Symbol('.concat(key === undefined ? '' : key, ')_', (++id + px).toString(36));
};
},{}],205:[function(require,module,exports){
-var 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)});
+var 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":113,"./_global":128,"./_library":148,"./_object-dp":157,"./_wks-ext":206}],206:[function(require,module,exports){
exports.f = require('./_wks');
@@ -53571,38 +52790,48 @@ module.exports = require('./_core').getIteratorMethod = function(it){
|| Iterators[classof(it)];
};
},{"./_classof":107,"./_core":113,"./_iterators":146,"./_wks":207}],209:[function(require,module,exports){
+var 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));
+};
+},{"./_classof":107,"./_core":113,"./_iterators":146,"./_wks":207}],210:[function(require,module,exports){
// 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); }});
-},{"./_export":122,"./_replacer":178}],210:[function(require,module,exports){
+},{"./_export":122,"./_replacer":178}],211:[function(require,module,exports){
// 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');
-},{"./_add-to-unscopables":95,"./_array-copy-within":98,"./_export":122}],211:[function(require,module,exports){
-'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]);
- }
+},{"./_add-to-unscopables":95,"./_array-copy-within":98,"./_export":122}],212:[function(require,module,exports){
+'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]);
+ }
});
-},{"./_array-methods":102,"./_export":122,"./_strict-method":186}],212:[function(require,module,exports){
+},{"./_array-methods":102,"./_export":122,"./_strict-method":186}],213:[function(require,module,exports){
// 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');
-},{"./_add-to-unscopables":95,"./_array-fill":99,"./_export":122}],213:[function(require,module,exports){
+},{"./_add-to-unscopables":95,"./_array-fill":99,"./_export":122}],214:[function(require,module,exports){
'use strict';
var $export = require('./_export')
, $filter = require('./_array-methods')(2);
@@ -53613,7 +52842,7 @@ $export($export.P + $export.F * !require('./_strict-method')([].filter, true), '
return $filter(this, callbackfn, arguments[1]);
}
});
-},{"./_array-methods":102,"./_export":122,"./_strict-method":186}],214:[function(require,module,exports){
+},{"./_array-methods":102,"./_export":122,"./_strict-method":186}],215:[function(require,module,exports){
'use strict';
// 22.1.3.9 Array.prototype.findIndex(predicate, thisArg = undefined)
var $export = require('./_export')
@@ -53628,7 +52857,7 @@ $export($export.P + $export.F * forced, 'Array', {
}
});
require('./_add-to-unscopables')(KEY);
-},{"./_add-to-unscopables":95,"./_array-methods":102,"./_export":122}],215:[function(require,module,exports){
+},{"./_add-to-unscopables":95,"./_array-methods":102,"./_export":122}],216:[function(require,module,exports){
'use strict';
// 22.1.3.8 Array.prototype.find(predicate, thisArg = undefined)
var $export = require('./_export')
@@ -53643,19 +52872,19 @@ $export($export.P + $export.F * forced, 'Array', {
}
});
require('./_add-to-unscopables')(KEY);
-},{"./_add-to-unscopables":95,"./_array-methods":102,"./_export":122}],216:[function(require,module,exports){
-'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]);
- }
+},{"./_add-to-unscopables":95,"./_array-methods":102,"./_export":122}],217:[function(require,module,exports){
+'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]);
+ }
});
-},{"./_array-methods":102,"./_export":122,"./_strict-method":186}],217:[function(require,module,exports){
+},{"./_array-methods":102,"./_export":122,"./_strict-method":186}],218:[function(require,module,exports){
'use strict';
var ctx = require('./_ctx')
, $export = require('./_export')
@@ -53694,28 +52923,28 @@ $export($export.S + $export.F * !require('./_iter-detect')(function(iter){ Array
}
});
-},{"./_create-property":114,"./_ctx":115,"./_export":122,"./_is-array-iter":136,"./_iter-call":141,"./_iter-detect":144,"./_to-length":198,"./_to-object":199,"./core.get-iterator-method":208}],218:[function(require,module,exports){
-'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]);
- }
+},{"./_create-property":114,"./_ctx":115,"./_export":122,"./_is-array-iter":136,"./_iter-call":141,"./_iter-detect":144,"./_to-length":198,"./_to-object":199,"./core.get-iterator-method":208}],219:[function(require,module,exports){
+'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]);
+ }
});
-},{"./_array-includes":101,"./_export":122,"./_strict-method":186}],219:[function(require,module,exports){
-// 22.1.2.2 / 15.4.3.2 Array.isArray(arg)
-var $export = require('./_export');
-
+},{"./_array-includes":101,"./_export":122,"./_strict-method":186}],220:[function(require,module,exports){
+// 22.1.2.2 / 15.4.3.2 Array.isArray(arg)
+var $export = require('./_export');
+
$export($export.S, 'Array', {isArray: require('./_is-array')});
-},{"./_export":122,"./_is-array":137}],220:[function(require,module,exports){
+},{"./_export":122,"./_is-array":137}],221:[function(require,module,exports){
'use strict';
var addToUnscopables = require('./_add-to-unscopables')
, step = require('./_iter-step')
@@ -53750,54 +52979,54 @@ Iterators.Arguments = Iterators.Array;
addToUnscopables('keys');
addToUnscopables('values');
addToUnscopables('entries');
-},{"./_add-to-unscopables":95,"./_iter-define":143,"./_iter-step":145,"./_iterators":146,"./_to-iobject":197}],221:[function(require,module,exports){
-'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);
- }
+},{"./_add-to-unscopables":95,"./_iter-define":143,"./_iter-step":145,"./_iterators":146,"./_to-iobject":197}],222:[function(require,module,exports){
+'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);
+ }
});
-},{"./_export":122,"./_iobject":135,"./_strict-method":186,"./_to-iobject":197}],222:[function(require,module,exports){
-'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;
- }
+},{"./_export":122,"./_iobject":135,"./_strict-method":186,"./_to-iobject":197}],223:[function(require,module,exports){
+'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;
+ }
});
-},{"./_export":122,"./_strict-method":186,"./_to-integer":196,"./_to-iobject":197,"./_to-length":198}],223:[function(require,module,exports){
-'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]);
- }
+},{"./_export":122,"./_strict-method":186,"./_to-integer":196,"./_to-iobject":197,"./_to-length":198}],224:[function(require,module,exports){
+'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]);
+ }
});
-},{"./_array-methods":102,"./_export":122,"./_strict-method":186}],224:[function(require,module,exports){
+},{"./_array-methods":102,"./_export":122,"./_strict-method":186}],225:[function(require,module,exports){
'use strict';
var $export = require('./_export')
, createProperty = require('./_create-property');
@@ -53817,129 +53046,129 @@ $export($export.S + $export.F * require('./_fails')(function(){
return result;
}
});
-},{"./_create-property":114,"./_export":122,"./_fails":124}],225:[function(require,module,exports){
-'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);
- }
-});
-},{"./_array-reduce":103,"./_export":122,"./_strict-method":186}],226:[function(require,module,exports){
-'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);
- }
+},{"./_create-property":114,"./_export":122,"./_fails":124}],226:[function(require,module,exports){
+'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);
+ }
});
},{"./_array-reduce":103,"./_export":122,"./_strict-method":186}],227:[function(require,module,exports){
-'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;
- }
+'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);
+ }
});
-},{"./_cof":108,"./_export":122,"./_fails":124,"./_html":131,"./_to-index":195,"./_to-length":198}],228:[function(require,module,exports){
-'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]);
- }
+},{"./_array-reduce":103,"./_export":122,"./_strict-method":186}],228:[function(require,module,exports){
+'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;
+ }
});
-},{"./_array-methods":102,"./_export":122,"./_strict-method":186}],229:[function(require,module,exports){
-'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));
- }
+},{"./_cof":108,"./_export":122,"./_fails":124,"./_html":131,"./_to-index":195,"./_to-length":198}],229:[function(require,module,exports){
+'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]);
+ }
+});
+},{"./_array-methods":102,"./_export":122,"./_strict-method":186}],230:[function(require,module,exports){
+'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));
+ }
});
-},{"./_a-function":93,"./_export":122,"./_fails":124,"./_strict-method":186,"./_to-object":199}],230:[function(require,module,exports){
+},{"./_a-function":93,"./_export":122,"./_fails":124,"./_strict-method":186,"./_to-object":199}],231:[function(require,module,exports){
require('./_set-species')('Array');
-},{"./_set-species":181}],231:[function(require,module,exports){
-// 20.3.3.1 / 15.9.4.4 Date.now()
-var $export = require('./_export');
-
+},{"./_set-species":181}],232:[function(require,module,exports){
+// 20.3.3.1 / 15.9.4.4 Date.now()
+var $export = require('./_export');
+
$export($export.S, 'Date', {now: function(){ return new Date().getTime(); }});
-},{"./_export":122}],232:[function(require,module,exports){
-'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';
- }
+},{"./_export":122}],233:[function(require,module,exports){
+'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';
+ }
});
-},{"./_export":122,"./_fails":124}],233:[function(require,module,exports){
+},{"./_export":122,"./_fails":124}],234:[function(require,module,exports){
'use strict';
var $export = require('./_export')
, toObject = require('./_to-object')
@@ -53954,12 +53183,12 @@ $export($export.P + $export.F * require('./_fails')(function(){
return typeof pv == 'number' && !isFinite(pv) ? null : O.toISOString();
}
});
-},{"./_export":122,"./_fails":124,"./_to-object":199,"./_to-primitive":200}],234:[function(require,module,exports){
-var TO_PRIMITIVE = require('./_wks')('toPrimitive')
- , proto = Date.prototype;
-
+},{"./_export":122,"./_fails":124,"./_to-object":199,"./_to-primitive":200}],235:[function(require,module,exports){
+var TO_PRIMITIVE = require('./_wks')('toPrimitive')
+ , proto = Date.prototype;
+
if(!(TO_PRIMITIVE in proto))require('./_hide')(proto, TO_PRIMITIVE, require('./_date-to-primitive'));
-},{"./_date-to-primitive":116,"./_hide":130,"./_wks":207}],235:[function(require,module,exports){
+},{"./_date-to-primitive":116,"./_hide":130,"./_wks":207}],236:[function(require,module,exports){
var DateProto = Date.prototype
, INVALID_DATE = 'Invalid Date'
, TO_STRING = 'toString'
@@ -53971,12 +53200,12 @@ if(new Date(NaN) + '' != INVALID_DATE){
return value === value ? $toString.call(this) : INVALID_DATE;
});
}
-},{"./_redefine":177}],236:[function(require,module,exports){
-// 19.2.3.2 / 15.3.4.5 Function.prototype.bind(thisArg, args...)
-var $export = require('./_export');
-
+},{"./_redefine":177}],237:[function(require,module,exports){
+// 19.2.3.2 / 15.3.4.5 Function.prototype.bind(thisArg, args...)
+var $export = require('./_export');
+
$export($export.P, 'Function', {bind: require('./_bind')});
-},{"./_bind":106,"./_export":122}],237:[function(require,module,exports){
+},{"./_bind":106,"./_export":122}],238:[function(require,module,exports){
'use strict';
var isObject = require('./_is-object')
, getPrototypeOf = require('./_object-gpo')
@@ -53990,7 +53219,7 @@ if(!(HAS_INSTANCE in FunctionProto))require('./_object-dp').f(FunctionProto, HAS
while(O = getPrototypeOf(O))if(this.prototype === O)return true;
return false;
}});
-},{"./_is-object":139,"./_object-dp":157,"./_object-gpo":164,"./_wks":207}],238:[function(require,module,exports){
+},{"./_is-object":139,"./_object-dp":157,"./_object-gpo":164,"./_wks":207}],239:[function(require,module,exports){
var dP = require('./_object-dp').f
, createDesc = require('./_property-desc')
, has = require('./_has')
@@ -54016,7 +53245,7 @@ NAME in FProto || require('./_descriptors') && dP(FProto, NAME, {
}
}
});
-},{"./_descriptors":118,"./_has":129,"./_object-dp":157,"./_property-desc":175}],239:[function(require,module,exports){
+},{"./_descriptors":118,"./_has":129,"./_object-dp":157,"./_property-desc":175}],240:[function(require,module,exports){
'use strict';
var strong = require('./_collection-strong');
@@ -54034,7 +53263,7 @@ module.exports = require('./_collection')('Map', function(get){
return strong.def(this, key === 0 ? 0 : key, value);
}
}, strong, true);
-},{"./_collection":112,"./_collection-strong":109}],240:[function(require,module,exports){
+},{"./_collection":112,"./_collection-strong":109}],241:[function(require,module,exports){
// 20.2.2.3 Math.acosh(x)
var $export = require('./_export')
, log1p = require('./_math-log1p')
@@ -54053,7 +53282,7 @@ $export($export.S + $export.F * !($acosh
: log1p(x - 1 + sqrt(x - 1) * sqrt(x + 1));
}
});
-},{"./_export":122,"./_math-log1p":150}],241:[function(require,module,exports){
+},{"./_export":122,"./_math-log1p":150}],242:[function(require,module,exports){
// 20.2.2.5 Math.asinh(x)
var $export = require('./_export')
, $asinh = Math.asinh;
@@ -54064,7 +53293,7 @@ function asinh(x){
// Tor Browser bug: Math.asinh(0) -> -0
$export($export.S + $export.F * !($asinh && 1 / $asinh(0) > 0), 'Math', {asinh: asinh});
-},{"./_export":122}],242:[function(require,module,exports){
+},{"./_export":122}],243:[function(require,module,exports){
// 20.2.2.7 Math.atanh(x)
var $export = require('./_export')
, $atanh = Math.atanh;
@@ -54075,7 +53304,7 @@ $export($export.S + $export.F * !($atanh && 1 / $atanh(-0) < 0), 'Math', {
return (x = +x) == 0 ? x : Math.log((1 + x) / (1 - x)) / 2;
}
});
-},{"./_export":122}],243:[function(require,module,exports){
+},{"./_export":122}],244:[function(require,module,exports){
// 20.2.2.9 Math.cbrt(x)
var $export = require('./_export')
, sign = require('./_math-sign');
@@ -54085,7 +53314,7 @@ $export($export.S, 'Math', {
return sign(x = +x) * Math.pow(Math.abs(x), 1 / 3);
}
});
-},{"./_export":122,"./_math-sign":151}],244:[function(require,module,exports){
+},{"./_export":122,"./_math-sign":151}],245:[function(require,module,exports){
// 20.2.2.11 Math.clz32(x)
var $export = require('./_export');
@@ -54094,7 +53323,7 @@ $export($export.S, 'Math', {
return (x >>>= 0) ? 31 - Math.floor(Math.log(x + 0.5) * Math.LOG2E) : 32;
}
});
-},{"./_export":122}],245:[function(require,module,exports){
+},{"./_export":122}],246:[function(require,module,exports){
// 20.2.2.12 Math.cosh(x)
var $export = require('./_export')
, exp = Math.exp;
@@ -54104,13 +53333,13 @@ $export($export.S, 'Math', {
return (exp(x = +x) + exp(-x)) / 2;
}
});
-},{"./_export":122}],246:[function(require,module,exports){
+},{"./_export":122}],247:[function(require,module,exports){
// 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});
-},{"./_export":122,"./_math-expm1":149}],247:[function(require,module,exports){
+},{"./_export":122,"./_math-expm1":149}],248:[function(require,module,exports){
// 20.2.2.16 Math.fround(x)
var $export = require('./_export')
, sign = require('./_math-sign')
@@ -54137,7 +53366,7 @@ $export($export.S, 'Math', {
return $sign * result;
}
});
-},{"./_export":122,"./_math-sign":151}],248:[function(require,module,exports){
+},{"./_export":122,"./_math-sign":151}],249:[function(require,module,exports){
// 20.2.2.17 Math.hypot([value1[, value2[, … ]]])
var $export = require('./_export')
, abs = Math.abs;
@@ -54163,7 +53392,7 @@ $export($export.S, 'Math', {
return larg === Infinity ? Infinity : larg * Math.sqrt(sum);
}
});
-},{"./_export":122}],249:[function(require,module,exports){
+},{"./_export":122}],250:[function(require,module,exports){
// 20.2.2.18 Math.imul(x, y)
var $export = require('./_export')
, $imul = Math.imul;
@@ -54181,7 +53410,7 @@ $export($export.S + $export.F * require('./_fails')(function(){
return 0 | xl * yl + ((UINT16 & xn >>> 16) * yl + xl * (UINT16 & yn >>> 16) << 16 >>> 0);
}
});
-},{"./_export":122,"./_fails":124}],250:[function(require,module,exports){
+},{"./_export":122,"./_fails":124}],251:[function(require,module,exports){
// 20.2.2.21 Math.log10(x)
var $export = require('./_export');
@@ -54190,12 +53419,12 @@ $export($export.S, 'Math', {
return Math.log(x) / Math.LN10;
}
});
-},{"./_export":122}],251:[function(require,module,exports){
+},{"./_export":122}],252:[function(require,module,exports){
// 20.2.2.20 Math.log1p(x)
var $export = require('./_export');
$export($export.S, 'Math', {log1p: require('./_math-log1p')});
-},{"./_export":122,"./_math-log1p":150}],252:[function(require,module,exports){
+},{"./_export":122,"./_math-log1p":150}],253:[function(require,module,exports){
// 20.2.2.22 Math.log2(x)
var $export = require('./_export');
@@ -54204,12 +53433,12 @@ $export($export.S, 'Math', {
return Math.log(x) / Math.LN2;
}
});
-},{"./_export":122}],253:[function(require,module,exports){
+},{"./_export":122}],254:[function(require,module,exports){
// 20.2.2.28 Math.sign(x)
var $export = require('./_export');
$export($export.S, 'Math', {sign: require('./_math-sign')});
-},{"./_export":122,"./_math-sign":151}],254:[function(require,module,exports){
+},{"./_export":122,"./_math-sign":151}],255:[function(require,module,exports){
// 20.2.2.30 Math.sinh(x)
var $export = require('./_export')
, expm1 = require('./_math-expm1')
@@ -54225,7 +53454,7 @@ $export($export.S + $export.F * require('./_fails')(function(){
: (exp(x - 1) - exp(-x - 1)) * (Math.E / 2);
}
});
-},{"./_export":122,"./_fails":124,"./_math-expm1":149}],255:[function(require,module,exports){
+},{"./_export":122,"./_fails":124,"./_math-expm1":149}],256:[function(require,module,exports){
// 20.2.2.33 Math.tanh(x)
var $export = require('./_export')
, expm1 = require('./_math-expm1')
@@ -54238,7 +53467,7 @@ $export($export.S, 'Math', {
return a == Infinity ? 1 : b == Infinity ? -1 : (a - b) / (exp(x) + exp(-x));
}
});
-},{"./_export":122,"./_math-expm1":149}],256:[function(require,module,exports){
+},{"./_export":122,"./_math-expm1":149}],257:[function(require,module,exports){
// 20.2.2.34 Math.trunc(x)
var $export = require('./_export');
@@ -54247,7 +53476,7 @@ $export($export.S, 'Math', {
return (it > 0 ? Math.floor : Math.ceil)(it);
}
});
-},{"./_export":122}],257:[function(require,module,exports){
+},{"./_export":122}],258:[function(require,module,exports){
'use strict';
var global = require('./_global')
, has = require('./_has')
@@ -54317,12 +53546,12 @@ if(!$Number(' 0o1') || !$Number('0b1') || $Number('+0x1')){
proto.constructor = $Number;
require('./_redefine')(global, NUMBER, $Number);
}
-},{"./_cof":108,"./_descriptors":118,"./_fails":124,"./_global":128,"./_has":129,"./_inherit-if-required":133,"./_object-create":156,"./_object-dp":157,"./_object-gopd":160,"./_object-gopn":162,"./_redefine":177,"./_string-trim":192,"./_to-primitive":200}],258:[function(require,module,exports){
+},{"./_cof":108,"./_descriptors":118,"./_fails":124,"./_global":128,"./_has":129,"./_inherit-if-required":133,"./_object-create":156,"./_object-dp":157,"./_object-gopd":160,"./_object-gopn":162,"./_redefine":177,"./_string-trim":192,"./_to-primitive":200}],259:[function(require,module,exports){
// 20.1.2.1 Number.EPSILON
var $export = require('./_export');
$export($export.S, 'Number', {EPSILON: Math.pow(2, -52)});
-},{"./_export":122}],259:[function(require,module,exports){
+},{"./_export":122}],260:[function(require,module,exports){
// 20.1.2.2 Number.isFinite(number)
var $export = require('./_export')
, _isFinite = require('./_global').isFinite;
@@ -54332,12 +53561,12 @@ $export($export.S, 'Number', {
return typeof it == 'number' && _isFinite(it);
}
});
-},{"./_export":122,"./_global":128}],260:[function(require,module,exports){
+},{"./_export":122,"./_global":128}],261:[function(require,module,exports){
// 20.1.2.3 Number.isInteger(number)
var $export = require('./_export');
$export($export.S, 'Number', {isInteger: require('./_is-integer')});
-},{"./_export":122,"./_is-integer":138}],261:[function(require,module,exports){
+},{"./_export":122,"./_is-integer":138}],262:[function(require,module,exports){
// 20.1.2.4 Number.isNaN(number)
var $export = require('./_export');
@@ -54346,7 +53575,7 @@ $export($export.S, 'Number', {
return number != number;
}
});
-},{"./_export":122}],262:[function(require,module,exports){
+},{"./_export":122}],263:[function(require,module,exports){
// 20.1.2.5 Number.isSafeInteger(number)
var $export = require('./_export')
, isInteger = require('./_is-integer')
@@ -54357,177 +53586,178 @@ $export($export.S, 'Number', {
return isInteger(number) && abs(number) <= 0x1fffffffffffff;
}
});
-},{"./_export":122,"./_is-integer":138}],263:[function(require,module,exports){
+},{"./_export":122,"./_is-integer":138}],264:[function(require,module,exports){
// 20.1.2.6 Number.MAX_SAFE_INTEGER
var $export = require('./_export');
$export($export.S, 'Number', {MAX_SAFE_INTEGER: 0x1fffffffffffff});
-},{"./_export":122}],264:[function(require,module,exports){
+},{"./_export":122}],265:[function(require,module,exports){
// 20.1.2.10 Number.MIN_SAFE_INTEGER
var $export = require('./_export');
$export($export.S, 'Number', {MIN_SAFE_INTEGER: -0x1fffffffffffff});
-},{"./_export":122}],265:[function(require,module,exports){
+},{"./_export":122}],266:[function(require,module,exports){
var $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});
-},{"./_export":122,"./_parse-float":171}],266:[function(require,module,exports){
+},{"./_export":122,"./_parse-float":171}],267:[function(require,module,exports){
var $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});
-},{"./_export":122,"./_parse-int":172}],267:[function(require,module,exports){
-'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;
- }
+},{"./_export":122,"./_parse-int":172}],268:[function(require,module,exports){
+'use strict';
+var $export = require('./_export')
+ , anInstance = require('./_an-instance')
+ , 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;
+ }
});
-},{"./_a-number-value":94,"./_export":122,"./_fails":124,"./_string-repeat":191,"./_to-integer":196}],268:[function(require,module,exports){
-'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);
- }
+},{"./_a-number-value":94,"./_an-instance":96,"./_export":122,"./_fails":124,"./_string-repeat":191,"./_to-integer":196}],269:[function(require,module,exports){
+'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);
+ }
});
-},{"./_a-number-value":94,"./_export":122,"./_fails":124}],269:[function(require,module,exports){
+},{"./_a-number-value":94,"./_export":122,"./_fails":124}],270:[function(require,module,exports){
// 19.1.3.1 Object.assign(target, source)
var $export = require('./_export');
$export($export.S + $export.F, 'Object', {assign: require('./_object-assign')});
-},{"./_export":122,"./_object-assign":155}],270:[function(require,module,exports){
-var $export = require('./_export')
-// 19.1.2.2 / 15.2.3.5 Object.create(O [, Properties])
+},{"./_export":122,"./_object-assign":155}],271:[function(require,module,exports){
+var $export = require('./_export')
+// 19.1.2.2 / 15.2.3.5 Object.create(O [, Properties])
$export($export.S, 'Object', {create: require('./_object-create')});
-},{"./_export":122,"./_object-create":156}],271:[function(require,module,exports){
-var $export = require('./_export');
-// 19.1.2.3 / 15.2.3.7 Object.defineProperties(O, Properties)
+},{"./_export":122,"./_object-create":156}],272:[function(require,module,exports){
+var $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')});
-},{"./_descriptors":118,"./_export":122,"./_object-dps":158}],272:[function(require,module,exports){
-var $export = require('./_export');
-// 19.1.2.4 / 15.2.3.6 Object.defineProperty(O, P, Attributes)
+},{"./_descriptors":118,"./_export":122,"./_object-dps":158}],273:[function(require,module,exports){
+var $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});
-},{"./_descriptors":118,"./_export":122,"./_object-dp":157}],273:[function(require,module,exports){
+},{"./_descriptors":118,"./_export":122,"./_object-dp":157}],274:[function(require,module,exports){
// 19.1.2.5 Object.freeze(O)
var isObject = require('./_is-object')
, meta = require('./_meta').onFreeze;
@@ -54537,7 +53767,7 @@ require('./_object-sap')('freeze', function($freeze){
return $freeze && isObject(it) ? $freeze(meta(it)) : it;
};
});
-},{"./_is-object":139,"./_meta":152,"./_object-sap":168}],274:[function(require,module,exports){
+},{"./_is-object":139,"./_meta":152,"./_object-sap":168}],275:[function(require,module,exports){
// 19.1.2.6 Object.getOwnPropertyDescriptor(O, P)
var toIObject = require('./_to-iobject')
, $getOwnPropertyDescriptor = require('./_object-gopd').f;
@@ -54547,12 +53777,12 @@ require('./_object-sap')('getOwnPropertyDescriptor', function(){
return $getOwnPropertyDescriptor(toIObject(it), key);
};
});
-},{"./_object-gopd":160,"./_object-sap":168,"./_to-iobject":197}],275:[function(require,module,exports){
+},{"./_object-gopd":160,"./_object-sap":168,"./_to-iobject":197}],276:[function(require,module,exports){
// 19.1.2.7 Object.getOwnPropertyNames(O)
require('./_object-sap')('getOwnPropertyNames', function(){
return require('./_object-gopn-ext').f;
});
-},{"./_object-gopn-ext":161,"./_object-sap":168}],276:[function(require,module,exports){
+},{"./_object-gopn-ext":161,"./_object-sap":168}],277:[function(require,module,exports){
// 19.1.2.9 Object.getPrototypeOf(O)
var toObject = require('./_to-object')
, $getPrototypeOf = require('./_object-gpo');
@@ -54562,7 +53792,7 @@ require('./_object-sap')('getPrototypeOf', function(){
return $getPrototypeOf(toObject(it));
};
});
-},{"./_object-gpo":164,"./_object-sap":168,"./_to-object":199}],277:[function(require,module,exports){
+},{"./_object-gpo":164,"./_object-sap":168,"./_to-object":199}],278:[function(require,module,exports){
// 19.1.2.11 Object.isExtensible(O)
var isObject = require('./_is-object');
@@ -54571,7 +53801,7 @@ require('./_object-sap')('isExtensible', function($isExtensible){
return isObject(it) ? $isExtensible ? $isExtensible(it) : true : false;
};
});
-},{"./_is-object":139,"./_object-sap":168}],278:[function(require,module,exports){
+},{"./_is-object":139,"./_object-sap":168}],279:[function(require,module,exports){
// 19.1.2.12 Object.isFrozen(O)
var isObject = require('./_is-object');
@@ -54580,7 +53810,7 @@ require('./_object-sap')('isFrozen', function($isFrozen){
return isObject(it) ? $isFrozen ? $isFrozen(it) : false : true;
};
});
-},{"./_is-object":139,"./_object-sap":168}],279:[function(require,module,exports){
+},{"./_is-object":139,"./_object-sap":168}],280:[function(require,module,exports){
// 19.1.2.13 Object.isSealed(O)
var isObject = require('./_is-object');
@@ -54589,11 +53819,11 @@ require('./_object-sap')('isSealed', function($isSealed){
return isObject(it) ? $isSealed ? $isSealed(it) : false : true;
};
});
-},{"./_is-object":139,"./_object-sap":168}],280:[function(require,module,exports){
+},{"./_is-object":139,"./_object-sap":168}],281:[function(require,module,exports){
// 19.1.3.10 Object.is(value1, value2)
var $export = require('./_export');
$export($export.S, 'Object', {is: require('./_same-value')});
-},{"./_export":122,"./_same-value":179}],281:[function(require,module,exports){
+},{"./_export":122,"./_same-value":179}],282:[function(require,module,exports){
// 19.1.2.14 Object.keys(O)
var toObject = require('./_to-object')
, $keys = require('./_object-keys');
@@ -54603,7 +53833,7 @@ require('./_object-sap')('keys', function(){
return $keys(toObject(it));
};
});
-},{"./_object-keys":166,"./_object-sap":168,"./_to-object":199}],282:[function(require,module,exports){
+},{"./_object-keys":166,"./_object-sap":168,"./_to-object":199}],283:[function(require,module,exports){
// 19.1.2.15 Object.preventExtensions(O)
var isObject = require('./_is-object')
, meta = require('./_meta').onFreeze;
@@ -54613,7 +53843,7 @@ require('./_object-sap')('preventExtensions', function($preventExtensions){
return $preventExtensions && isObject(it) ? $preventExtensions(meta(it)) : it;
};
});
-},{"./_is-object":139,"./_meta":152,"./_object-sap":168}],283:[function(require,module,exports){
+},{"./_is-object":139,"./_meta":152,"./_object-sap":168}],284:[function(require,module,exports){
// 19.1.2.17 Object.seal(O)
var isObject = require('./_is-object')
, meta = require('./_meta').onFreeze;
@@ -54623,11 +53853,11 @@ require('./_object-sap')('seal', function($seal){
return $seal && isObject(it) ? $seal(meta(it)) : it;
};
});
-},{"./_is-object":139,"./_meta":152,"./_object-sap":168}],284:[function(require,module,exports){
+},{"./_is-object":139,"./_meta":152,"./_object-sap":168}],285:[function(require,module,exports){
// 19.1.3.19 Object.setPrototypeOf(O, proto)
var $export = require('./_export');
$export($export.S, 'Object', {setPrototypeOf: require('./_set-proto').set});
-},{"./_export":122,"./_set-proto":180}],285:[function(require,module,exports){
+},{"./_export":122,"./_set-proto":180}],286:[function(require,module,exports){
'use strict';
// 19.1.3.6 Object.prototype.toString()
var classof = require('./_classof')
@@ -54638,17 +53868,17 @@ if(test + '' != '[object z]'){
return '[object ' + classof(this) + ']';
}, true);
}
-},{"./_classof":107,"./_redefine":177,"./_wks":207}],286:[function(require,module,exports){
-var $export = require('./_export')
- , $parseFloat = require('./_parse-float');
-// 18.2.4 parseFloat(string)
+},{"./_classof":107,"./_redefine":177,"./_wks":207}],287:[function(require,module,exports){
+var $export = require('./_export')
+ , $parseFloat = require('./_parse-float');
+// 18.2.4 parseFloat(string)
$export($export.G + $export.F * (parseFloat != $parseFloat), {parseFloat: $parseFloat});
-},{"./_export":122,"./_parse-float":171}],287:[function(require,module,exports){
-var $export = require('./_export')
- , $parseInt = require('./_parse-int');
-// 18.2.5 parseInt(string, radix)
+},{"./_export":122,"./_parse-float":171}],288:[function(require,module,exports){
+var $export = require('./_export')
+ , $parseInt = require('./_parse-int');
+// 18.2.5 parseInt(string, radix)
$export($export.G + $export.F * (parseInt != $parseInt), {parseInt: $parseInt});
-},{"./_export":122,"./_parse-int":172}],288:[function(require,module,exports){
+},{"./_export":122,"./_parse-int":172}],289:[function(require,module,exports){
'use strict';
var LIBRARY = require('./_library')
, global = require('./_global')
@@ -54656,9 +53886,11 @@ var LIBRARY = require('./_library')
, classof = require('./_classof')
, $export = require('./_export')
, isObject = require('./_is-object')
+ , anObject = require('./_an-object')
, aFunction = require('./_a-function')
, anInstance = require('./_an-instance')
, forOf = require('./_for-of')
+ , setProto = require('./_set-proto').set
, speciesConstructor = require('./_species-constructor')
, task = require('./_task').set
, microtask = require('./_microtask')()
@@ -54948,50 +54180,37 @@ $export($export.S + $export.F * !(USE_NATIVE && require('./_iter-detect')(functi
return capability.promise;
}
});
-},{"./_a-function":93,"./_an-instance":96,"./_classof":107,"./_core":113,"./_ctx":115,"./_export":122,"./_for-of":127,"./_global":128,"./_is-object":139,"./_iter-detect":144,"./_library":148,"./_microtask":154,"./_redefine-all":176,"./_set-species":181,"./_set-to-string-tag":182,"./_species-constructor":185,"./_task":194,"./_wks":207}],289:[function(require,module,exports){
+},{"./_a-function":93,"./_an-instance":96,"./_an-object":97,"./_classof":107,"./_core":113,"./_ctx":115,"./_export":122,"./_for-of":127,"./_global":128,"./_is-object":139,"./_iter-detect":144,"./_library":148,"./_microtask":154,"./_redefine-all":176,"./_set-proto":180,"./_set-species":181,"./_set-to-string-tag":182,"./_species-constructor":185,"./_task":194,"./_wks":207}],290:[function(require,module,exports){
// 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;
+
+$export($export.S, '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);
+ return _apply.call(aFunction(target), thisArgument, anObject(argumentsList));
}
});
-},{"./_a-function":93,"./_an-object":97,"./_export":122,"./_fails":124,"./_global":128}],290:[function(require,module,exports){
+},{"./_a-function":93,"./_an-object":97,"./_export":122}],291:[function(require,module,exports){
// 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;
+var $export = require('./_export')
+ , create = require('./_object-create')
+ , aFunction = require('./_a-function')
+ , anObject = require('./_an-object')
+ , isObject = require('./_is-object')
+ , bind = require('./_bind');
-// MS Edge supports only 2 arguments and argumentsList argument is optional
+// MS Edge supports only 2 arguments
// FF Nightly sets third argument as `new.target`, but does not create `this` from it
-var NEW_TARGET_BUG = fails(function(){
+$export($export.S + $export.F * require('./_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', {
+ return !(Reflect.construct(function(){}, [], F) instanceof F);
+}), '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){
@@ -55013,7 +54232,7 @@ $export($export.S + $export.F * (NEW_TARGET_BUG || ARGS_BUG), 'Reflect', {
return isObject(result) ? result : instance;
}
});
-},{"./_a-function":93,"./_an-object":97,"./_bind":106,"./_export":122,"./_fails":124,"./_global":128,"./_is-object":139,"./_object-create":156}],291:[function(require,module,exports){
+},{"./_a-function":93,"./_an-object":97,"./_bind":106,"./_export":122,"./_fails":124,"./_is-object":139,"./_object-create":156}],292:[function(require,module,exports){
// 26.1.3 Reflect.defineProperty(target, propertyKey, attributes)
var dP = require('./_object-dp')
, $export = require('./_export')
@@ -55036,7 +54255,7 @@ $export($export.S + $export.F * require('./_fails')(function(){
}
}
});
-},{"./_an-object":97,"./_export":122,"./_fails":124,"./_object-dp":157,"./_to-primitive":200}],292:[function(require,module,exports){
+},{"./_an-object":97,"./_export":122,"./_fails":124,"./_object-dp":157,"./_to-primitive":200}],293:[function(require,module,exports){
// 26.1.4 Reflect.deleteProperty(target, propertyKey)
var $export = require('./_export')
, gOPD = require('./_object-gopd').f
@@ -55048,7 +54267,7 @@ $export($export.S, 'Reflect', {
return desc && !desc.configurable ? false : delete target[propertyKey];
}
});
-},{"./_an-object":97,"./_export":122,"./_object-gopd":160}],293:[function(require,module,exports){
+},{"./_an-object":97,"./_export":122,"./_object-gopd":160}],294:[function(require,module,exports){
'use strict';
// 26.1.5 Reflect.enumerate(target)
var $export = require('./_export')
@@ -55075,7 +54294,7 @@ $export($export.S, 'Reflect', {
return new Enumerate(target);
}
});
-},{"./_an-object":97,"./_export":122,"./_iter-create":142}],294:[function(require,module,exports){
+},{"./_an-object":97,"./_export":122,"./_iter-create":142}],295:[function(require,module,exports){
// 26.1.7 Reflect.getOwnPropertyDescriptor(target, propertyKey)
var gOPD = require('./_object-gopd')
, $export = require('./_export')
@@ -55086,7 +54305,7 @@ $export($export.S, 'Reflect', {
return gOPD.f(anObject(target), propertyKey);
}
});
-},{"./_an-object":97,"./_export":122,"./_object-gopd":160}],295:[function(require,module,exports){
+},{"./_an-object":97,"./_export":122,"./_object-gopd":160}],296:[function(require,module,exports){
// 26.1.8 Reflect.getPrototypeOf(target)
var $export = require('./_export')
, getProto = require('./_object-gpo')
@@ -55097,7 +54316,7 @@ $export($export.S, 'Reflect', {
return getProto(anObject(target));
}
});
-},{"./_an-object":97,"./_export":122,"./_object-gpo":164}],296:[function(require,module,exports){
+},{"./_an-object":97,"./_export":122,"./_object-gpo":164}],297:[function(require,module,exports){
// 26.1.6 Reflect.get(target, propertyKey [, receiver])
var gOPD = require('./_object-gopd')
, getPrototypeOf = require('./_object-gpo')
@@ -55119,7 +54338,7 @@ function get(target, propertyKey/*, receiver*/){
}
$export($export.S, 'Reflect', {get: get});
-},{"./_an-object":97,"./_export":122,"./_has":129,"./_is-object":139,"./_object-gopd":160,"./_object-gpo":164}],297:[function(require,module,exports){
+},{"./_an-object":97,"./_export":122,"./_has":129,"./_is-object":139,"./_object-gopd":160,"./_object-gpo":164}],298:[function(require,module,exports){
// 26.1.9 Reflect.has(target, propertyKey)
var $export = require('./_export');
@@ -55128,7 +54347,7 @@ $export($export.S, 'Reflect', {
return propertyKey in target;
}
});
-},{"./_export":122}],298:[function(require,module,exports){
+},{"./_export":122}],299:[function(require,module,exports){
// 26.1.10 Reflect.isExtensible(target)
var $export = require('./_export')
, anObject = require('./_an-object')
@@ -55140,12 +54359,12 @@ $export($export.S, 'Reflect', {
return $isExtensible ? $isExtensible(target) : true;
}
});
-},{"./_an-object":97,"./_export":122}],299:[function(require,module,exports){
+},{"./_an-object":97,"./_export":122}],300:[function(require,module,exports){
// 26.1.11 Reflect.ownKeys(target)
var $export = require('./_export');
$export($export.S, 'Reflect', {ownKeys: require('./_own-keys')});
-},{"./_export":122,"./_own-keys":170}],300:[function(require,module,exports){
+},{"./_export":122,"./_own-keys":170}],301:[function(require,module,exports){
// 26.1.12 Reflect.preventExtensions(target)
var $export = require('./_export')
, anObject = require('./_an-object')
@@ -55162,7 +54381,7 @@ $export($export.S, 'Reflect', {
}
}
});
-},{"./_an-object":97,"./_export":122}],301:[function(require,module,exports){
+},{"./_an-object":97,"./_export":122}],302:[function(require,module,exports){
// 26.1.14 Reflect.setPrototypeOf(target, proto)
var $export = require('./_export')
, setProto = require('./_set-proto');
@@ -55178,7 +54397,7 @@ if(setProto)$export($export.S, 'Reflect', {
}
}
});
-},{"./_export":122,"./_set-proto":180}],302:[function(require,module,exports){
+},{"./_export":122,"./_set-proto":180}],303:[function(require,module,exports){
// 26.1.13 Reflect.set(target, propertyKey, V [, receiver])
var dP = require('./_object-dp')
, gOPD = require('./_object-gopd')
@@ -55210,7 +54429,7 @@ function set(target, propertyKey, V/*, receiver*/){
}
$export($export.S, 'Reflect', {set: set});
-},{"./_an-object":97,"./_export":122,"./_has":129,"./_is-object":139,"./_object-dp":157,"./_object-gopd":160,"./_object-gpo":164,"./_property-desc":175}],303:[function(require,module,exports){
+},{"./_an-object":97,"./_export":122,"./_has":129,"./_is-object":139,"./_object-dp":157,"./_object-gopd":160,"./_object-gpo":164,"./_property-desc":175}],304:[function(require,module,exports){
var global = require('./_global')
, inheritIfRequired = require('./_inherit-if-required')
, dP = require('./_object-dp').f
@@ -55254,13 +54473,13 @@ if(require('./_descriptors') && (!CORRECT_NEW || require('./_fails')(function(){
}
require('./_set-species')('RegExp');
-},{"./_descriptors":118,"./_fails":124,"./_flags":126,"./_global":128,"./_inherit-if-required":133,"./_is-regexp":140,"./_object-dp":157,"./_object-gopn":162,"./_redefine":177,"./_set-species":181,"./_wks":207}],304:[function(require,module,exports){
+},{"./_descriptors":118,"./_fails":124,"./_flags":126,"./_global":128,"./_inherit-if-required":133,"./_is-regexp":140,"./_object-dp":157,"./_object-gopn":162,"./_redefine":177,"./_set-species":181,"./_wks":207}],305:[function(require,module,exports){
// 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')
});
-},{"./_descriptors":118,"./_flags":126,"./_object-dp":157}],305:[function(require,module,exports){
+},{"./_descriptors":118,"./_flags":126,"./_object-dp":157}],306:[function(require,module,exports){
// @@match logic
require('./_fix-re-wks')('match', 1, function(defined, MATCH, $match){
// 21.1.3.11 String.prototype.match(regexp)
@@ -55271,7 +54490,7 @@ require('./_fix-re-wks')('match', 1, function(defined, MATCH, $match){
return fn !== undefined ? fn.call(regexp, O) : new RegExp(regexp)[MATCH](String(O));
}, $match];
});
-},{"./_fix-re-wks":125}],306:[function(require,module,exports){
+},{"./_fix-re-wks":125}],307:[function(require,module,exports){
// @@replace logic
require('./_fix-re-wks')('replace', 2, function(defined, REPLACE, $replace){
// 21.1.3.14 String.prototype.replace(searchValue, replaceValue)
@@ -55284,7 +54503,7 @@ require('./_fix-re-wks')('replace', 2, function(defined, REPLACE, $replace){
: $replace.call(String(O), searchValue, replaceValue);
}, $replace];
});
-},{"./_fix-re-wks":125}],307:[function(require,module,exports){
+},{"./_fix-re-wks":125}],308:[function(require,module,exports){
// @@search logic
require('./_fix-re-wks')('search', 1, function(defined, SEARCH, $search){
// 21.1.3.15 String.prototype.search(regexp)
@@ -55295,7 +54514,7 @@ require('./_fix-re-wks')('search', 1, function(defined, SEARCH, $search){
return fn !== undefined ? fn.call(regexp, O) : new RegExp(regexp)[SEARCH](String(O));
}, $search];
});
-},{"./_fix-re-wks":125}],308:[function(require,module,exports){
+},{"./_fix-re-wks":125}],309:[function(require,module,exports){
// @@split logic
require('./_fix-re-wks')('split', 2, function(defined, SPLIT, $split){
'use strict';
@@ -55366,33 +54585,33 @@ require('./_fix-re-wks')('split', 2, function(defined, SPLIT, $split){
return fn !== undefined ? fn.call(separator, O, limit) : $split.call(String(O), separator, limit);
}, $split];
});
-},{"./_fix-re-wks":125,"./_is-regexp":140}],309:[function(require,module,exports){
-'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);
- });
-}
-},{"./_an-object":97,"./_descriptors":118,"./_fails":124,"./_flags":126,"./_redefine":177,"./es6.regexp.flags":304}],310:[function(require,module,exports){
+},{"./_fix-re-wks":125,"./_is-regexp":140}],310:[function(require,module,exports){
+'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);
+ });
+}
+},{"./_an-object":97,"./_descriptors":118,"./_fails":124,"./_flags":126,"./_redefine":177,"./es6.regexp.flags":305}],311:[function(require,module,exports){
'use strict';
var strong = require('./_collection-strong');
@@ -55405,7 +54624,7 @@ module.exports = require('./_collection')('Set', function(get){
return strong.def(this, value = value === 0 ? 0 : value, value);
}
}, strong);
-},{"./_collection":112,"./_collection-strong":109}],311:[function(require,module,exports){
+},{"./_collection":112,"./_collection-strong":109}],312:[function(require,module,exports){
'use strict';
// B.2.3.2 String.prototype.anchor(name)
require('./_string-html')('anchor', function(createHTML){
@@ -55413,7 +54632,7 @@ require('./_string-html')('anchor', function(createHTML){
return createHTML(this, 'a', 'name', name);
}
});
-},{"./_string-html":189}],312:[function(require,module,exports){
+},{"./_string-html":189}],313:[function(require,module,exports){
'use strict';
// B.2.3.3 String.prototype.big()
require('./_string-html')('big', function(createHTML){
@@ -55421,7 +54640,7 @@ require('./_string-html')('big', function(createHTML){
return createHTML(this, 'big', '', '');
}
});
-},{"./_string-html":189}],313:[function(require,module,exports){
+},{"./_string-html":189}],314:[function(require,module,exports){
'use strict';
// B.2.3.4 String.prototype.blink()
require('./_string-html')('blink', function(createHTML){
@@ -55429,7 +54648,7 @@ require('./_string-html')('blink', function(createHTML){
return createHTML(this, 'blink', '', '');
}
});
-},{"./_string-html":189}],314:[function(require,module,exports){
+},{"./_string-html":189}],315:[function(require,module,exports){
'use strict';
// B.2.3.5 String.prototype.bold()
require('./_string-html')('bold', function(createHTML){
@@ -55437,7 +54656,7 @@ require('./_string-html')('bold', function(createHTML){
return createHTML(this, 'b', '', '');
}
});
-},{"./_string-html":189}],315:[function(require,module,exports){
+},{"./_string-html":189}],316:[function(require,module,exports){
'use strict';
var $export = require('./_export')
, $at = require('./_string-at')(false);
@@ -55447,7 +54666,7 @@ $export($export.P, 'String', {
return $at(this, pos);
}
});
-},{"./_export":122,"./_string-at":187}],316:[function(require,module,exports){
+},{"./_export":122,"./_string-at":187}],317:[function(require,module,exports){
// 21.1.3.6 String.prototype.endsWith(searchString [, endPosition])
'use strict';
var $export = require('./_export')
@@ -55468,7 +54687,7 @@ $export($export.P + $export.F * require('./_fails-is-regexp')(ENDS_WITH), 'Strin
: that.slice(end - search.length, end) === search;
}
});
-},{"./_export":122,"./_fails-is-regexp":123,"./_string-context":188,"./_to-length":198}],317:[function(require,module,exports){
+},{"./_export":122,"./_fails-is-regexp":123,"./_string-context":188,"./_to-length":198}],318:[function(require,module,exports){
'use strict';
// B.2.3.6 String.prototype.fixed()
require('./_string-html')('fixed', function(createHTML){
@@ -55476,7 +54695,7 @@ require('./_string-html')('fixed', function(createHTML){
return createHTML(this, 'tt', '', '');
}
});
-},{"./_string-html":189}],318:[function(require,module,exports){
+},{"./_string-html":189}],319:[function(require,module,exports){
'use strict';
// B.2.3.7 String.prototype.fontcolor(color)
require('./_string-html')('fontcolor', function(createHTML){
@@ -55484,7 +54703,7 @@ require('./_string-html')('fontcolor', function(createHTML){
return createHTML(this, 'font', 'color', color);
}
});
-},{"./_string-html":189}],319:[function(require,module,exports){
+},{"./_string-html":189}],320:[function(require,module,exports){
'use strict';
// B.2.3.8 String.prototype.fontsize(size)
require('./_string-html')('fontsize', function(createHTML){
@@ -55492,7 +54711,7 @@ require('./_string-html')('fontsize', function(createHTML){
return createHTML(this, 'font', 'size', size);
}
});
-},{"./_string-html":189}],320:[function(require,module,exports){
+},{"./_string-html":189}],321:[function(require,module,exports){
var $export = require('./_export')
, toIndex = require('./_to-index')
, fromCharCode = String.fromCharCode
@@ -55516,7 +54735,7 @@ $export($export.S + $export.F * (!!$fromCodePoint && $fromCodePoint.length != 1)
} return res.join('');
}
});
-},{"./_export":122,"./_to-index":195}],321:[function(require,module,exports){
+},{"./_export":122,"./_to-index":195}],322:[function(require,module,exports){
// 21.1.3.7 String.prototype.includes(searchString, position = 0)
'use strict';
var $export = require('./_export')
@@ -55529,7 +54748,7 @@ $export($export.P + $export.F * require('./_fails-is-regexp')(INCLUDES), 'String
.indexOf(searchString, arguments.length > 1 ? arguments[1] : undefined);
}
});
-},{"./_export":122,"./_fails-is-regexp":123,"./_string-context":188}],322:[function(require,module,exports){
+},{"./_export":122,"./_fails-is-regexp":123,"./_string-context":188}],323:[function(require,module,exports){
'use strict';
// B.2.3.9 String.prototype.italics()
require('./_string-html')('italics', function(createHTML){
@@ -55537,7 +54756,7 @@ require('./_string-html')('italics', function(createHTML){
return createHTML(this, 'i', '', '');
}
});
-},{"./_string-html":189}],323:[function(require,module,exports){
+},{"./_string-html":189}],324:[function(require,module,exports){
'use strict';
var $at = require('./_string-at')(true);
@@ -55555,7 +54774,7 @@ require('./_iter-define')(String, 'String', function(iterated){
this._i += point.length;
return {value: point, done: false};
});
-},{"./_iter-define":143,"./_string-at":187}],324:[function(require,module,exports){
+},{"./_iter-define":143,"./_string-at":187}],325:[function(require,module,exports){
'use strict';
// B.2.3.10 String.prototype.link(url)
require('./_string-html')('link', function(createHTML){
@@ -55563,7 +54782,7 @@ require('./_string-html')('link', function(createHTML){
return createHTML(this, 'a', 'href', url);
}
});
-},{"./_string-html":189}],325:[function(require,module,exports){
+},{"./_string-html":189}],326:[function(require,module,exports){
var $export = require('./_export')
, toIObject = require('./_to-iobject')
, toLength = require('./_to-length');
@@ -55582,14 +54801,14 @@ $export($export.S, 'String', {
} return res.join('');
}
});
-},{"./_export":122,"./_to-iobject":197,"./_to-length":198}],326:[function(require,module,exports){
+},{"./_export":122,"./_to-iobject":197,"./_to-length":198}],327:[function(require,module,exports){
var $export = require('./_export');
$export($export.P, 'String', {
// 21.1.3.13 String.prototype.repeat(count)
repeat: require('./_string-repeat')
});
-},{"./_export":122,"./_string-repeat":191}],327:[function(require,module,exports){
+},{"./_export":122,"./_string-repeat":191}],328:[function(require,module,exports){
'use strict';
// B.2.3.11 String.prototype.small()
require('./_string-html')('small', function(createHTML){
@@ -55597,7 +54816,7 @@ require('./_string-html')('small', function(createHTML){
return createHTML(this, 'small', '', '');
}
});
-},{"./_string-html":189}],328:[function(require,module,exports){
+},{"./_string-html":189}],329:[function(require,module,exports){
// 21.1.3.18 String.prototype.startsWith(searchString [, position ])
'use strict';
var $export = require('./_export')
@@ -55616,7 +54835,7 @@ $export($export.P + $export.F * require('./_fails-is-regexp')(STARTS_WITH), 'Str
: that.slice(index, index + search.length) === search;
}
});
-},{"./_export":122,"./_fails-is-regexp":123,"./_string-context":188,"./_to-length":198}],329:[function(require,module,exports){
+},{"./_export":122,"./_fails-is-regexp":123,"./_string-context":188,"./_to-length":198}],330:[function(require,module,exports){
'use strict';
// B.2.3.12 String.prototype.strike()
require('./_string-html')('strike', function(createHTML){
@@ -55624,7 +54843,7 @@ require('./_string-html')('strike', function(createHTML){
return createHTML(this, 'strike', '', '');
}
});
-},{"./_string-html":189}],330:[function(require,module,exports){
+},{"./_string-html":189}],331:[function(require,module,exports){
'use strict';
// B.2.3.13 String.prototype.sub()
require('./_string-html')('sub', function(createHTML){
@@ -55632,7 +54851,7 @@ require('./_string-html')('sub', function(createHTML){
return createHTML(this, 'sub', '', '');
}
});
-},{"./_string-html":189}],331:[function(require,module,exports){
+},{"./_string-html":189}],332:[function(require,module,exports){
'use strict';
// B.2.3.14 String.prototype.sup()
require('./_string-html')('sup', function(createHTML){
@@ -55640,7 +54859,7 @@ require('./_string-html')('sup', function(createHTML){
return createHTML(this, 'sup', '', '');
}
});
-},{"./_string-html":189}],332:[function(require,module,exports){
+},{"./_string-html":189}],333:[function(require,module,exports){
'use strict';
// 21.1.3.25 String.prototype.trim()
require('./_string-trim')('trim', function($trim){
@@ -55648,7 +54867,7 @@ require('./_string-trim')('trim', function($trim){
return $trim(this, 3);
};
});
-},{"./_string-trim":192}],333:[function(require,module,exports){
+},{"./_string-trim":192}],334:[function(require,module,exports){
'use strict';
// ECMAScript 6 symbols shim
var global = require('./_global')
@@ -55884,7 +55103,7 @@ setToStringTag($Symbol, 'Symbol');
setToStringTag(Math, 'Math', true);
// 24.3.3 JSON[@@toStringTag]
setToStringTag(global.JSON, 'JSON', true);
-},{"./_an-object":97,"./_descriptors":118,"./_enum-keys":121,"./_export":122,"./_fails":124,"./_global":128,"./_has":129,"./_hide":130,"./_is-array":137,"./_keyof":147,"./_library":148,"./_meta":152,"./_object-create":156,"./_object-dp":157,"./_object-gopd":160,"./_object-gopn":162,"./_object-gopn-ext":161,"./_object-gops":163,"./_object-keys":166,"./_object-pie":167,"./_property-desc":175,"./_redefine":177,"./_set-to-string-tag":182,"./_shared":184,"./_to-iobject":197,"./_to-primitive":200,"./_uid":204,"./_wks":207,"./_wks-define":205,"./_wks-ext":206}],334:[function(require,module,exports){
+},{"./_an-object":97,"./_descriptors":118,"./_enum-keys":121,"./_export":122,"./_fails":124,"./_global":128,"./_has":129,"./_hide":130,"./_is-array":137,"./_keyof":147,"./_library":148,"./_meta":152,"./_object-create":156,"./_object-dp":157,"./_object-gopd":160,"./_object-gopn":162,"./_object-gopn-ext":161,"./_object-gops":163,"./_object-keys":166,"./_object-pie":167,"./_property-desc":175,"./_redefine":177,"./_set-to-string-tag":182,"./_shared":184,"./_to-iobject":197,"./_to-primitive":200,"./_uid":204,"./_wks":207,"./_wks-define":205,"./_wks-ext":206}],335:[function(require,module,exports){
'use strict';
var $export = require('./_export')
, $typed = require('./_typed')
@@ -55893,6 +55112,7 @@ var $export = require('./_export')
, toIndex = require('./_to-index')
, toLength = require('./_to-length')
, isObject = require('./_is-object')
+ , TYPED_ARRAY = require('./_wks')('typed_array')
, ArrayBuffer = require('./_global').ArrayBuffer
, speciesConstructor = require('./_species-constructor')
, $ArrayBuffer = buffer.ArrayBuffer
@@ -55931,66 +55151,66 @@ $export($export.P + $export.U + $export.F * require('./_fails')(function(){
});
require('./_set-species')(ARRAY_BUFFER);
-},{"./_an-object":97,"./_export":122,"./_fails":124,"./_global":128,"./_is-object":139,"./_set-species":181,"./_species-constructor":185,"./_to-index":195,"./_to-length":198,"./_typed":203,"./_typed-buffer":202}],335:[function(require,module,exports){
+},{"./_an-object":97,"./_export":122,"./_fails":124,"./_global":128,"./_is-object":139,"./_set-species":181,"./_species-constructor":185,"./_to-index":195,"./_to-length":198,"./_typed":203,"./_typed-buffer":202,"./_wks":207}],336:[function(require,module,exports){
var $export = require('./_export');
$export($export.G + $export.W + $export.F * !require('./_typed').ABV, {
DataView: require('./_typed-buffer').DataView
});
-},{"./_export":122,"./_typed":203,"./_typed-buffer":202}],336:[function(require,module,exports){
+},{"./_export":122,"./_typed":203,"./_typed-buffer":202}],337:[function(require,module,exports){
require('./_typed-array')('Float32', 4, function(init){
return function Float32Array(data, byteOffset, length){
return init(this, data, byteOffset, length);
};
});
-},{"./_typed-array":201}],337:[function(require,module,exports){
+},{"./_typed-array":201}],338:[function(require,module,exports){
require('./_typed-array')('Float64', 8, function(init){
return function Float64Array(data, byteOffset, length){
return init(this, data, byteOffset, length);
};
});
-},{"./_typed-array":201}],338:[function(require,module,exports){
+},{"./_typed-array":201}],339:[function(require,module,exports){
require('./_typed-array')('Int16', 2, function(init){
return function Int16Array(data, byteOffset, length){
return init(this, data, byteOffset, length);
};
});
-},{"./_typed-array":201}],339:[function(require,module,exports){
+},{"./_typed-array":201}],340:[function(require,module,exports){
require('./_typed-array')('Int32', 4, function(init){
return function Int32Array(data, byteOffset, length){
return init(this, data, byteOffset, length);
};
});
-},{"./_typed-array":201}],340:[function(require,module,exports){
+},{"./_typed-array":201}],341:[function(require,module,exports){
require('./_typed-array')('Int8', 1, function(init){
return function Int8Array(data, byteOffset, length){
return init(this, data, byteOffset, length);
};
});
-},{"./_typed-array":201}],341:[function(require,module,exports){
+},{"./_typed-array":201}],342:[function(require,module,exports){
require('./_typed-array')('Uint16', 2, function(init){
return function Uint16Array(data, byteOffset, length){
return init(this, data, byteOffset, length);
};
});
-},{"./_typed-array":201}],342:[function(require,module,exports){
+},{"./_typed-array":201}],343:[function(require,module,exports){
require('./_typed-array')('Uint32', 4, function(init){
return function Uint32Array(data, byteOffset, length){
return init(this, data, byteOffset, length);
};
});
-},{"./_typed-array":201}],343:[function(require,module,exports){
+},{"./_typed-array":201}],344:[function(require,module,exports){
require('./_typed-array')('Uint8', 1, function(init){
return function Uint8Array(data, byteOffset, length){
return init(this, data, byteOffset, length);
};
});
-},{"./_typed-array":201}],344:[function(require,module,exports){
+},{"./_typed-array":201}],345:[function(require,module,exports){
require('./_typed-array')('Uint8', 1, function(init){
return function Uint8ClampedArray(data, byteOffset, length){
return init(this, data, byteOffset, length);
};
}, true);
-},{"./_typed-array":201}],345:[function(require,module,exports){
+},{"./_typed-array":201}],346:[function(require,module,exports){
'use strict';
var each = require('./_array-methods')(0)
, redefine = require('./_redefine')
@@ -55998,6 +55218,7 @@ var each = require('./_array-methods')(0)
, assign = require('./_object-assign')
, weak = require('./_collection-weak')
, isObject = require('./_is-object')
+ , has = require('./_has')
, getWeak = meta.getWeak
, isExtensible = Object.isExtensible
, uncaughtFrozenStore = weak.ufstore
@@ -56047,7 +55268,7 @@ if(new $WeakMap().set((Object.freeze || Object)(tmp), 7).get(tmp) != 7){
});
});
}
-},{"./_array-methods":102,"./_collection":112,"./_collection-weak":111,"./_is-object":139,"./_meta":152,"./_object-assign":155,"./_redefine":177}],346:[function(require,module,exports){
+},{"./_array-methods":102,"./_collection":112,"./_collection-weak":111,"./_has":129,"./_is-object":139,"./_meta":152,"./_object-assign":155,"./_redefine":177}],347:[function(require,module,exports){
'use strict';
var weak = require('./_collection-weak');
@@ -56060,7 +55281,7 @@ require('./_collection')('WeakSet', function(get){
return weak.def(this, value, true);
}
}, weak, false, true);
-},{"./_collection":112,"./_collection-weak":111}],347:[function(require,module,exports){
+},{"./_collection":112,"./_collection-weak":111}],348:[function(require,module,exports){
'use strict';
// https://github.com/tc39/Array.prototype.includes
var $export = require('./_export')
@@ -56073,20 +55294,20 @@ $export($export.P, 'Array', {
});
require('./_add-to-unscopables')('includes');
-},{"./_add-to-unscopables":95,"./_array-includes":101,"./_export":122}],348:[function(require,module,exports){
-// 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);
- }
+},{"./_add-to-unscopables":95,"./_array-includes":101,"./_export":122}],349:[function(require,module,exports){
+// 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);
+ }
});
-},{"./_cof":108,"./_export":122,"./_global":128,"./_microtask":154}],349:[function(require,module,exports){
+},{"./_cof":108,"./_export":122,"./_global":128,"./_microtask":154}],350:[function(require,module,exports){
// https://github.com/ljharb/proposal-is-error
var $export = require('./_export')
, cof = require('./_cof');
@@ -56096,12 +55317,12 @@ $export($export.S, 'Error', {
return cof(it) === 'Error';
}
});
-},{"./_cof":108,"./_export":122}],350:[function(require,module,exports){
+},{"./_cof":108,"./_export":122}],351:[function(require,module,exports){
// https://github.com/DavidBruant/Map-Set.prototype.toJSON
var $export = require('./_export');
$export($export.P + $export.R, 'Map', {toJSON: require('./_collection-to-json')('Map')});
-},{"./_collection-to-json":110,"./_export":122}],351:[function(require,module,exports){
+},{"./_collection-to-json":110,"./_export":122}],352:[function(require,module,exports){
// https://gist.github.com/BrendanEich/4294d5c212a6d2254703
var $export = require('./_export');
@@ -56113,7 +55334,7 @@ $export($export.S, 'Math', {
return $x1 + (y1 >>> 0) + (($x0 & $y0 | ($x0 | $y0) & ~($x0 + $y0 >>> 0)) >>> 31) | 0;
}
});
-},{"./_export":122}],352:[function(require,module,exports){
+},{"./_export":122}],353:[function(require,module,exports){
// https://gist.github.com/BrendanEich/4294d5c212a6d2254703
var $export = require('./_export');
@@ -56130,7 +55351,7 @@ $export($export.S, 'Math', {
return u1 * v1 + (t >> 16) + ((u0 * v1 >>> 0) + (t & UINT16) >> 16);
}
});
-},{"./_export":122}],353:[function(require,module,exports){
+},{"./_export":122}],354:[function(require,module,exports){
// https://gist.github.com/BrendanEich/4294d5c212a6d2254703
var $export = require('./_export');
@@ -56142,7 +55363,7 @@ $export($export.S, 'Math', {
return $x1 - (y1 >>> 0) - ((~$x0 & $y0 | ~($x0 ^ $y0) & $x0 - $y0 >>> 0) >>> 31) | 0;
}
});
-},{"./_export":122}],354:[function(require,module,exports){
+},{"./_export":122}],355:[function(require,module,exports){
// https://gist.github.com/BrendanEich/4294d5c212a6d2254703
var $export = require('./_export');
@@ -56159,33 +55380,33 @@ $export($export.S, 'Math', {
return u1 * v1 + (t >>> 16) + ((u0 * v1 >>> 0) + (t & UINT16) >>> 16);
}
});
-},{"./_export":122}],355:[function(require,module,exports){
-'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});
- }
-});
-},{"./_a-function":93,"./_descriptors":118,"./_export":122,"./_object-dp":157,"./_object-forced-pam":159,"./_to-object":199}],356:[function(require,module,exports){
-'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});
- }
+},{"./_export":122}],356:[function(require,module,exports){
+'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});
+ }
});
},{"./_a-function":93,"./_descriptors":118,"./_export":122,"./_object-dp":157,"./_object-forced-pam":159,"./_to-object":199}],357:[function(require,module,exports){
+'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});
+ }
+});
+},{"./_a-function":93,"./_descriptors":118,"./_export":122,"./_object-dp":157,"./_object-forced-pam":159,"./_to-object":199}],358:[function(require,module,exports){
// https://github.com/tc39/proposal-object-values-entries
var $export = require('./_export')
, $entries = require('./_object-to-array')(true);
@@ -56195,7 +55416,7 @@ $export($export.S, 'Object', {
return $entries(it);
}
});
-},{"./_export":122,"./_object-to-array":169}],358:[function(require,module,exports){
+},{"./_export":122,"./_object-to-array":169}],359:[function(require,module,exports){
// https://github.com/tc39/proposal-object-getownpropertydescriptors
var $export = require('./_export')
, ownKeys = require('./_own-keys')
@@ -56210,50 +55431,50 @@ $export($export.S, 'Object', {
, keys = ownKeys(O)
, result = {}
, i = 0
- , key;
+ , key, D;
while(keys.length > i)createProperty(result, key = keys[i++], getDesc(O, key));
return result;
}
});
-},{"./_create-property":114,"./_export":122,"./_object-gopd":160,"./_own-keys":170,"./_to-iobject":197}],359:[function(require,module,exports){
-'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));
- }
-});
-},{"./_descriptors":118,"./_export":122,"./_object-forced-pam":159,"./_object-gopd":160,"./_object-gpo":164,"./_to-object":199,"./_to-primitive":200}],360:[function(require,module,exports){
-'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));
- }
+},{"./_create-property":114,"./_export":122,"./_object-gopd":160,"./_own-keys":170,"./_to-iobject":197}],360:[function(require,module,exports){
+'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));
+ }
});
},{"./_descriptors":118,"./_export":122,"./_object-forced-pam":159,"./_object-gopd":160,"./_object-gpo":164,"./_to-object":199,"./_to-primitive":200}],361:[function(require,module,exports){
+'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));
+ }
+});
+},{"./_descriptors":118,"./_export":122,"./_object-forced-pam":159,"./_object-gopd":160,"./_object-gpo":164,"./_to-object":199,"./_to-primitive":200}],362:[function(require,module,exports){
// https://github.com/tc39/proposal-object-values-entries
var $export = require('./_export')
, $values = require('./_object-to-array')(false);
@@ -56263,207 +55484,207 @@ $export($export.S, 'Object', {
return $values(it);
}
});
-},{"./_export":122,"./_object-to-array":169}],362:[function(require,module,exports){
-'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});
-
+},{"./_export":122,"./_object-to-array":169}],363:[function(require,module,exports){
+'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');
-},{"./_a-function":93,"./_an-instance":96,"./_an-object":97,"./_core":113,"./_export":122,"./_for-of":127,"./_global":128,"./_hide":130,"./_microtask":154,"./_redefine-all":176,"./_set-species":181,"./_wks":207}],363:[function(require,module,exports){
+},{"./_a-function":93,"./_an-instance":96,"./_an-object":97,"./_core":113,"./_export":122,"./_for-of":127,"./_global":128,"./_hide":130,"./_microtask":154,"./_redefine-all":176,"./_set-species":181,"./_wks":207}],364:[function(require,module,exports){
var metadata = require('./_metadata')
, anObject = require('./_an-object')
, toMetaKey = metadata.key
@@ -56472,7 +55693,7 @@ var metadata = require('./_metadata')
metadata.exp({defineMetadata: function defineMetadata(metadataKey, metadataValue, target, targetKey){
ordinaryDefineOwnMetadata(metadataKey, metadataValue, anObject(target), toMetaKey(targetKey));
}});
-},{"./_an-object":97,"./_metadata":153}],364:[function(require,module,exports){
+},{"./_an-object":97,"./_metadata":153}],365:[function(require,module,exports){
var metadata = require('./_metadata')
, anObject = require('./_an-object')
, toMetaKey = metadata.key
@@ -56488,7 +55709,7 @@ metadata.exp({deleteMetadata: function deleteMetadata(metadataKey, target /*, ta
targetMetadata['delete'](targetKey);
return !!targetMetadata.size || store['delete'](target);
}});
-},{"./_an-object":97,"./_metadata":153}],365:[function(require,module,exports){
+},{"./_an-object":97,"./_metadata":153}],366:[function(require,module,exports){
var Set = require('./es6.set')
, from = require('./_array-from-iterable')
, metadata = require('./_metadata')
@@ -56508,7 +55729,7 @@ var ordinaryMetadataKeys = function(O, P){
metadata.exp({getMetadataKeys: function getMetadataKeys(target /*, targetKey */){
return ordinaryMetadataKeys(anObject(target), arguments.length < 2 ? undefined : toMetaKey(arguments[1]));
}});
-},{"./_an-object":97,"./_array-from-iterable":100,"./_metadata":153,"./_object-gpo":164,"./es6.set":310}],366:[function(require,module,exports){
+},{"./_an-object":97,"./_array-from-iterable":100,"./_metadata":153,"./_object-gpo":164,"./es6.set":311}],367:[function(require,module,exports){
var metadata = require('./_metadata')
, anObject = require('./_an-object')
, getPrototypeOf = require('./_object-gpo')
@@ -56526,7 +55747,7 @@ var ordinaryGetMetadata = function(MetadataKey, O, P){
metadata.exp({getMetadata: function getMetadata(metadataKey, target /*, targetKey */){
return ordinaryGetMetadata(metadataKey, anObject(target), arguments.length < 3 ? undefined : toMetaKey(arguments[2]));
}});
-},{"./_an-object":97,"./_metadata":153,"./_object-gpo":164}],367:[function(require,module,exports){
+},{"./_an-object":97,"./_metadata":153,"./_object-gpo":164}],368:[function(require,module,exports){
var metadata = require('./_metadata')
, anObject = require('./_an-object')
, ordinaryOwnMetadataKeys = metadata.keys
@@ -56535,7 +55756,7 @@ var metadata = require('./_metadata')
metadata.exp({getOwnMetadataKeys: function getOwnMetadataKeys(target /*, targetKey */){
return ordinaryOwnMetadataKeys(anObject(target), arguments.length < 2 ? undefined : toMetaKey(arguments[1]));
}});
-},{"./_an-object":97,"./_metadata":153}],368:[function(require,module,exports){
+},{"./_an-object":97,"./_metadata":153}],369:[function(require,module,exports){
var metadata = require('./_metadata')
, anObject = require('./_an-object')
, ordinaryGetOwnMetadata = metadata.get
@@ -56545,7 +55766,7 @@ metadata.exp({getOwnMetadata: function getOwnMetadata(metadataKey, target /*, ta
return ordinaryGetOwnMetadata(metadataKey, anObject(target)
, arguments.length < 3 ? undefined : toMetaKey(arguments[2]));
}});
-},{"./_an-object":97,"./_metadata":153}],369:[function(require,module,exports){
+},{"./_an-object":97,"./_metadata":153}],370:[function(require,module,exports){
var metadata = require('./_metadata')
, anObject = require('./_an-object')
, getPrototypeOf = require('./_object-gpo')
@@ -56562,7 +55783,7 @@ var ordinaryHasMetadata = function(MetadataKey, O, P){
metadata.exp({hasMetadata: function hasMetadata(metadataKey, target /*, targetKey */){
return ordinaryHasMetadata(metadataKey, anObject(target), arguments.length < 3 ? undefined : toMetaKey(arguments[2]));
}});
-},{"./_an-object":97,"./_metadata":153,"./_object-gpo":164}],370:[function(require,module,exports){
+},{"./_an-object":97,"./_metadata":153,"./_object-gpo":164}],371:[function(require,module,exports){
var metadata = require('./_metadata')
, anObject = require('./_an-object')
, ordinaryHasOwnMetadata = metadata.has
@@ -56572,7 +55793,7 @@ metadata.exp({hasOwnMetadata: function hasOwnMetadata(metadataKey, target /*, ta
return ordinaryHasOwnMetadata(metadataKey, anObject(target)
, arguments.length < 3 ? undefined : toMetaKey(arguments[2]));
}});
-},{"./_an-object":97,"./_metadata":153}],371:[function(require,module,exports){
+},{"./_an-object":97,"./_metadata":153}],372:[function(require,module,exports){
var metadata = require('./_metadata')
, anObject = require('./_an-object')
, aFunction = require('./_a-function')
@@ -56588,12 +55809,12 @@ metadata.exp({metadata: function metadata(metadataKey, metadataValue){
);
};
}});
-},{"./_a-function":93,"./_an-object":97,"./_metadata":153}],372:[function(require,module,exports){
+},{"./_a-function":93,"./_an-object":97,"./_metadata":153}],373:[function(require,module,exports){
// https://github.com/DavidBruant/Map-Set.prototype.toJSON
var $export = require('./_export');
$export($export.P + $export.R, 'Set', {toJSON: require('./_collection-to-json')('Set')});
-},{"./_collection-to-json":110,"./_export":122}],373:[function(require,module,exports){
+},{"./_collection-to-json":110,"./_export":122}],374:[function(require,module,exports){
'use strict';
// https://github.com/mathiasbynens/String.prototype.at
var $export = require('./_export')
@@ -56604,38 +55825,38 @@ $export($export.P, 'String', {
return $at(this, pos);
}
});
-},{"./_export":122,"./_string-at":187}],374:[function(require,module,exports){
-'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);
- }
+},{"./_export":122,"./_string-at":187}],375:[function(require,module,exports){
+'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);
+ }
});
-},{"./_defined":117,"./_export":122,"./_flags":126,"./_is-regexp":140,"./_iter-create":142,"./_to-length":198}],375:[function(require,module,exports){
+},{"./_defined":117,"./_export":122,"./_flags":126,"./_is-regexp":140,"./_iter-create":142,"./_to-length":198}],376:[function(require,module,exports){
'use strict';
// https://github.com/tc39/proposal-string-pad-start-end
var $export = require('./_export')
@@ -56646,7 +55867,7 @@ $export($export.P, 'String', {
return $pad(this, maxLength, arguments.length > 1 ? arguments[1] : undefined, false);
}
});
-},{"./_export":122,"./_string-pad":190}],376:[function(require,module,exports){
+},{"./_export":122,"./_string-pad":190}],377:[function(require,module,exports){
'use strict';
// https://github.com/tc39/proposal-string-pad-start-end
var $export = require('./_export')
@@ -56657,7 +55878,7 @@ $export($export.P, 'String', {
return $pad(this, maxLength, arguments.length > 1 ? arguments[1] : undefined, true);
}
});
-},{"./_export":122,"./_string-pad":190}],377:[function(require,module,exports){
+},{"./_export":122,"./_string-pad":190}],378:[function(require,module,exports){
'use strict';
// https://github.com/sebmarkbage/ecmascript-string-left-right-trim
require('./_string-trim')('trimLeft', function($trim){
@@ -56665,7 +55886,7 @@ require('./_string-trim')('trimLeft', function($trim){
return $trim(this, 1);
};
}, 'trimStart');
-},{"./_string-trim":192}],378:[function(require,module,exports){
+},{"./_string-trim":192}],379:[function(require,module,exports){
'use strict';
// https://github.com/sebmarkbage/ecmascript-string-left-right-trim
require('./_string-trim')('trimRight', function($trim){
@@ -56673,16 +55894,16 @@ require('./_string-trim')('trimRight', function($trim){
return $trim(this, 2);
};
}, 'trimEnd');
-},{"./_string-trim":192}],379:[function(require,module,exports){
+},{"./_string-trim":192}],380:[function(require,module,exports){
require('./_wks-define')('asyncIterator');
-},{"./_wks-define":205}],380:[function(require,module,exports){
-require('./_wks-define')('observable');
},{"./_wks-define":205}],381:[function(require,module,exports){
+require('./_wks-define')('observable');
+},{"./_wks-define":205}],382:[function(require,module,exports){
// https://github.com/ljharb/proposal-global
var $export = require('./_export');
$export($export.S, 'System', {global: require('./_global')});
-},{"./_export":122,"./_global":128}],382:[function(require,module,exports){
+},{"./_export":122,"./_global":128}],383:[function(require,module,exports){
var $iterators = require('./es6.array.iterator')
, redefine = require('./_redefine')
, global = require('./_global')
@@ -56705,14 +55926,14 @@ for(var collections = ['NodeList', 'DOMTokenList', 'MediaList', 'StyleSheetList'
for(key in $iterators)if(!proto[key])redefine(proto, key, $iterators[key], true);
}
}
-},{"./_global":128,"./_hide":130,"./_iterators":146,"./_redefine":177,"./_wks":207,"./es6.array.iterator":220}],383:[function(require,module,exports){
+},{"./_global":128,"./_hide":130,"./_iterators":146,"./_redefine":177,"./_wks":207,"./es6.array.iterator":221}],384:[function(require,module,exports){
var $export = require('./_export')
, $task = require('./_task');
$export($export.G + $export.B, {
setImmediate: $task.set,
clearImmediate: $task.clear
});
-},{"./_export":122,"./_task":194}],384:[function(require,module,exports){
+},{"./_export":122,"./_task":194}],385:[function(require,module,exports){
// ie9- setTimeout & setInterval additional parameters fix
var global = require('./_global')
, $export = require('./_export')
@@ -56733,7 +55954,7 @@ $export($export.G + $export.B + $export.F * MSIE, {
setTimeout: wrap(global.setTimeout),
setInterval: wrap(global.setInterval)
});
-},{"./_export":122,"./_global":128,"./_invoke":134,"./_partial":173}],385:[function(require,module,exports){
+},{"./_export":122,"./_global":128,"./_invoke":134,"./_partial":173}],386:[function(require,module,exports){
require('./modules/es6.symbol');
require('./modules/es6.object.create');
require('./modules/es6.object.define-property');
@@ -56910,7 +56131,7 @@ require('./modules/web.timers');
require('./modules/web.immediate');
require('./modules/web.dom.iterable');
module.exports = require('./modules/_core');
-},{"./modules/_core":113,"./modules/es6.array.copy-within":210,"./modules/es6.array.every":211,"./modules/es6.array.fill":212,"./modules/es6.array.filter":213,"./modules/es6.array.find":215,"./modules/es6.array.find-index":214,"./modules/es6.array.for-each":216,"./modules/es6.array.from":217,"./modules/es6.array.index-of":218,"./modules/es6.array.is-array":219,"./modules/es6.array.iterator":220,"./modules/es6.array.join":221,"./modules/es6.array.last-index-of":222,"./modules/es6.array.map":223,"./modules/es6.array.of":224,"./modules/es6.array.reduce":226,"./modules/es6.array.reduce-right":225,"./modules/es6.array.slice":227,"./modules/es6.array.some":228,"./modules/es6.array.sort":229,"./modules/es6.array.species":230,"./modules/es6.date.now":231,"./modules/es6.date.to-iso-string":232,"./modules/es6.date.to-json":233,"./modules/es6.date.to-primitive":234,"./modules/es6.date.to-string":235,"./modules/es6.function.bind":236,"./modules/es6.function.has-instance":237,"./modules/es6.function.name":238,"./modules/es6.map":239,"./modules/es6.math.acosh":240,"./modules/es6.math.asinh":241,"./modules/es6.math.atanh":242,"./modules/es6.math.cbrt":243,"./modules/es6.math.clz32":244,"./modules/es6.math.cosh":245,"./modules/es6.math.expm1":246,"./modules/es6.math.fround":247,"./modules/es6.math.hypot":248,"./modules/es6.math.imul":249,"./modules/es6.math.log10":250,"./modules/es6.math.log1p":251,"./modules/es6.math.log2":252,"./modules/es6.math.sign":253,"./modules/es6.math.sinh":254,"./modules/es6.math.tanh":255,"./modules/es6.math.trunc":256,"./modules/es6.number.constructor":257,"./modules/es6.number.epsilon":258,"./modules/es6.number.is-finite":259,"./modules/es6.number.is-integer":260,"./modules/es6.number.is-nan":261,"./modules/es6.number.is-safe-integer":262,"./modules/es6.number.max-safe-integer":263,"./modules/es6.number.min-safe-integer":264,"./modules/es6.number.parse-float":265,"./modules/es6.number.parse-int":266,"./modules/es6.number.to-fixed":267,"./modules/es6.number.to-precision":268,"./modules/es6.object.assign":269,"./modules/es6.object.create":270,"./modules/es6.object.define-properties":271,"./modules/es6.object.define-property":272,"./modules/es6.object.freeze":273,"./modules/es6.object.get-own-property-descriptor":274,"./modules/es6.object.get-own-property-names":275,"./modules/es6.object.get-prototype-of":276,"./modules/es6.object.is":280,"./modules/es6.object.is-extensible":277,"./modules/es6.object.is-frozen":278,"./modules/es6.object.is-sealed":279,"./modules/es6.object.keys":281,"./modules/es6.object.prevent-extensions":282,"./modules/es6.object.seal":283,"./modules/es6.object.set-prototype-of":284,"./modules/es6.object.to-string":285,"./modules/es6.parse-float":286,"./modules/es6.parse-int":287,"./modules/es6.promise":288,"./modules/es6.reflect.apply":289,"./modules/es6.reflect.construct":290,"./modules/es6.reflect.define-property":291,"./modules/es6.reflect.delete-property":292,"./modules/es6.reflect.enumerate":293,"./modules/es6.reflect.get":296,"./modules/es6.reflect.get-own-property-descriptor":294,"./modules/es6.reflect.get-prototype-of":295,"./modules/es6.reflect.has":297,"./modules/es6.reflect.is-extensible":298,"./modules/es6.reflect.own-keys":299,"./modules/es6.reflect.prevent-extensions":300,"./modules/es6.reflect.set":302,"./modules/es6.reflect.set-prototype-of":301,"./modules/es6.regexp.constructor":303,"./modules/es6.regexp.flags":304,"./modules/es6.regexp.match":305,"./modules/es6.regexp.replace":306,"./modules/es6.regexp.search":307,"./modules/es6.regexp.split":308,"./modules/es6.regexp.to-string":309,"./modules/es6.set":310,"./modules/es6.string.anchor":311,"./modules/es6.string.big":312,"./modules/es6.string.blink":313,"./modules/es6.string.bold":314,"./modules/es6.string.code-point-at":315,"./modules/es6.string.ends-with":316,"./modules/es6.string.fixed":317,"./modules/es6.string.fontcolor":318,"./modules/es6.string.fontsize":319,"./modules/es6.string.from-code-point":320,"./modules/es6.string.includes":321,"./modules/es6.string.italics":322,"./modules/es6.string.iterator":323,"./modules/es6.string.link":324,"./modules/es6.string.raw":325,"./modules/es6.string.repeat":326,"./modules/es6.string.small":327,"./modules/es6.string.starts-with":328,"./modules/es6.string.strike":329,"./modules/es6.string.sub":330,"./modules/es6.string.sup":331,"./modules/es6.string.trim":332,"./modules/es6.symbol":333,"./modules/es6.typed.array-buffer":334,"./modules/es6.typed.data-view":335,"./modules/es6.typed.float32-array":336,"./modules/es6.typed.float64-array":337,"./modules/es6.typed.int16-array":338,"./modules/es6.typed.int32-array":339,"./modules/es6.typed.int8-array":340,"./modules/es6.typed.uint16-array":341,"./modules/es6.typed.uint32-array":342,"./modules/es6.typed.uint8-array":343,"./modules/es6.typed.uint8-clamped-array":344,"./modules/es6.weak-map":345,"./modules/es6.weak-set":346,"./modules/es7.array.includes":347,"./modules/es7.asap":348,"./modules/es7.error.is-error":349,"./modules/es7.map.to-json":350,"./modules/es7.math.iaddh":351,"./modules/es7.math.imulh":352,"./modules/es7.math.isubh":353,"./modules/es7.math.umulh":354,"./modules/es7.object.define-getter":355,"./modules/es7.object.define-setter":356,"./modules/es7.object.entries":357,"./modules/es7.object.get-own-property-descriptors":358,"./modules/es7.object.lookup-getter":359,"./modules/es7.object.lookup-setter":360,"./modules/es7.object.values":361,"./modules/es7.observable":362,"./modules/es7.reflect.define-metadata":363,"./modules/es7.reflect.delete-metadata":364,"./modules/es7.reflect.get-metadata":366,"./modules/es7.reflect.get-metadata-keys":365,"./modules/es7.reflect.get-own-metadata":368,"./modules/es7.reflect.get-own-metadata-keys":367,"./modules/es7.reflect.has-metadata":369,"./modules/es7.reflect.has-own-metadata":370,"./modules/es7.reflect.metadata":371,"./modules/es7.set.to-json":372,"./modules/es7.string.at":373,"./modules/es7.string.match-all":374,"./modules/es7.string.pad-end":375,"./modules/es7.string.pad-start":376,"./modules/es7.string.trim-left":377,"./modules/es7.string.trim-right":378,"./modules/es7.symbol.async-iterator":379,"./modules/es7.symbol.observable":380,"./modules/es7.system.global":381,"./modules/web.dom.iterable":382,"./modules/web.immediate":383,"./modules/web.timers":384}],386:[function(require,module,exports){
+},{"./modules/_core":113,"./modules/es6.array.copy-within":211,"./modules/es6.array.every":212,"./modules/es6.array.fill":213,"./modules/es6.array.filter":214,"./modules/es6.array.find":216,"./modules/es6.array.find-index":215,"./modules/es6.array.for-each":217,"./modules/es6.array.from":218,"./modules/es6.array.index-of":219,"./modules/es6.array.is-array":220,"./modules/es6.array.iterator":221,"./modules/es6.array.join":222,"./modules/es6.array.last-index-of":223,"./modules/es6.array.map":224,"./modules/es6.array.of":225,"./modules/es6.array.reduce":227,"./modules/es6.array.reduce-right":226,"./modules/es6.array.slice":228,"./modules/es6.array.some":229,"./modules/es6.array.sort":230,"./modules/es6.array.species":231,"./modules/es6.date.now":232,"./modules/es6.date.to-iso-string":233,"./modules/es6.date.to-json":234,"./modules/es6.date.to-primitive":235,"./modules/es6.date.to-string":236,"./modules/es6.function.bind":237,"./modules/es6.function.has-instance":238,"./modules/es6.function.name":239,"./modules/es6.map":240,"./modules/es6.math.acosh":241,"./modules/es6.math.asinh":242,"./modules/es6.math.atanh":243,"./modules/es6.math.cbrt":244,"./modules/es6.math.clz32":245,"./modules/es6.math.cosh":246,"./modules/es6.math.expm1":247,"./modules/es6.math.fround":248,"./modules/es6.math.hypot":249,"./modules/es6.math.imul":250,"./modules/es6.math.log10":251,"./modules/es6.math.log1p":252,"./modules/es6.math.log2":253,"./modules/es6.math.sign":254,"./modules/es6.math.sinh":255,"./modules/es6.math.tanh":256,"./modules/es6.math.trunc":257,"./modules/es6.number.constructor":258,"./modules/es6.number.epsilon":259,"./modules/es6.number.is-finite":260,"./modules/es6.number.is-integer":261,"./modules/es6.number.is-nan":262,"./modules/es6.number.is-safe-integer":263,"./modules/es6.number.max-safe-integer":264,"./modules/es6.number.min-safe-integer":265,"./modules/es6.number.parse-float":266,"./modules/es6.number.parse-int":267,"./modules/es6.number.to-fixed":268,"./modules/es6.number.to-precision":269,"./modules/es6.object.assign":270,"./modules/es6.object.create":271,"./modules/es6.object.define-properties":272,"./modules/es6.object.define-property":273,"./modules/es6.object.freeze":274,"./modules/es6.object.get-own-property-descriptor":275,"./modules/es6.object.get-own-property-names":276,"./modules/es6.object.get-prototype-of":277,"./modules/es6.object.is":281,"./modules/es6.object.is-extensible":278,"./modules/es6.object.is-frozen":279,"./modules/es6.object.is-sealed":280,"./modules/es6.object.keys":282,"./modules/es6.object.prevent-extensions":283,"./modules/es6.object.seal":284,"./modules/es6.object.set-prototype-of":285,"./modules/es6.object.to-string":286,"./modules/es6.parse-float":287,"./modules/es6.parse-int":288,"./modules/es6.promise":289,"./modules/es6.reflect.apply":290,"./modules/es6.reflect.construct":291,"./modules/es6.reflect.define-property":292,"./modules/es6.reflect.delete-property":293,"./modules/es6.reflect.enumerate":294,"./modules/es6.reflect.get":297,"./modules/es6.reflect.get-own-property-descriptor":295,"./modules/es6.reflect.get-prototype-of":296,"./modules/es6.reflect.has":298,"./modules/es6.reflect.is-extensible":299,"./modules/es6.reflect.own-keys":300,"./modules/es6.reflect.prevent-extensions":301,"./modules/es6.reflect.set":303,"./modules/es6.reflect.set-prototype-of":302,"./modules/es6.regexp.constructor":304,"./modules/es6.regexp.flags":305,"./modules/es6.regexp.match":306,"./modules/es6.regexp.replace":307,"./modules/es6.regexp.search":308,"./modules/es6.regexp.split":309,"./modules/es6.regexp.to-string":310,"./modules/es6.set":311,"./modules/es6.string.anchor":312,"./modules/es6.string.big":313,"./modules/es6.string.blink":314,"./modules/es6.string.bold":315,"./modules/es6.string.code-point-at":316,"./modules/es6.string.ends-with":317,"./modules/es6.string.fixed":318,"./modules/es6.string.fontcolor":319,"./modules/es6.string.fontsize":320,"./modules/es6.string.from-code-point":321,"./modules/es6.string.includes":322,"./modules/es6.string.italics":323,"./modules/es6.string.iterator":324,"./modules/es6.string.link":325,"./modules/es6.string.raw":326,"./modules/es6.string.repeat":327,"./modules/es6.string.small":328,"./modules/es6.string.starts-with":329,"./modules/es6.string.strike":330,"./modules/es6.string.sub":331,"./modules/es6.string.sup":332,"./modules/es6.string.trim":333,"./modules/es6.symbol":334,"./modules/es6.typed.array-buffer":335,"./modules/es6.typed.data-view":336,"./modules/es6.typed.float32-array":337,"./modules/es6.typed.float64-array":338,"./modules/es6.typed.int16-array":339,"./modules/es6.typed.int32-array":340,"./modules/es6.typed.int8-array":341,"./modules/es6.typed.uint16-array":342,"./modules/es6.typed.uint32-array":343,"./modules/es6.typed.uint8-array":344,"./modules/es6.typed.uint8-clamped-array":345,"./modules/es6.weak-map":346,"./modules/es6.weak-set":347,"./modules/es7.array.includes":348,"./modules/es7.asap":349,"./modules/es7.error.is-error":350,"./modules/es7.map.to-json":351,"./modules/es7.math.iaddh":352,"./modules/es7.math.imulh":353,"./modules/es7.math.isubh":354,"./modules/es7.math.umulh":355,"./modules/es7.object.define-getter":356,"./modules/es7.object.define-setter":357,"./modules/es7.object.entries":358,"./modules/es7.object.get-own-property-descriptors":359,"./modules/es7.object.lookup-getter":360,"./modules/es7.object.lookup-setter":361,"./modules/es7.object.values":362,"./modules/es7.observable":363,"./modules/es7.reflect.define-metadata":364,"./modules/es7.reflect.delete-metadata":365,"./modules/es7.reflect.get-metadata":367,"./modules/es7.reflect.get-metadata-keys":366,"./modules/es7.reflect.get-own-metadata":369,"./modules/es7.reflect.get-own-metadata-keys":368,"./modules/es7.reflect.has-metadata":370,"./modules/es7.reflect.has-own-metadata":371,"./modules/es7.reflect.metadata":372,"./modules/es7.set.to-json":373,"./modules/es7.string.at":374,"./modules/es7.string.match-all":375,"./modules/es7.string.pad-end":376,"./modules/es7.string.pad-start":377,"./modules/es7.string.trim-left":378,"./modules/es7.string.trim-right":379,"./modules/es7.symbol.async-iterator":380,"./modules/es7.symbol.observable":381,"./modules/es7.system.global":382,"./modules/web.dom.iterable":383,"./modules/web.immediate":384,"./modules/web.timers":385}],387:[function(require,module,exports){
(function (Buffer){
// Copyright Joyent, Inc. and other Node contributors.
//
@@ -57021,7 +56242,7 @@ function objectToString(o) {
}
}).call(this,{"isBuffer":require("../../is-buffer/index.js")})
-},{"../../is-buffer/index.js":435}],387:[function(require,module,exports){
+},{"../../is-buffer/index.js":436}],388:[function(require,module,exports){
(function (Buffer){
var elliptic = require('elliptic');
var BN = require('bn.js');
@@ -57147,7 +56368,7 @@ function formatReturnValue(bn, enc, len) {
}
}).call(this,require("buffer").Buffer)
-},{"bn.js":60,"buffer":90,"elliptic":403}],388:[function(require,module,exports){
+},{"bn.js":60,"buffer":90,"elliptic":404}],389:[function(require,module,exports){
(function (Buffer){
'use strict';
var inherits = require('inherits')
@@ -57203,7 +56424,7 @@ module.exports = function createHash (alg) {
}
}).call(this,require("buffer").Buffer)
-},{"./md5":390,"buffer":90,"cipher-base":91,"inherits":434,"ripemd160":467,"sha.js":476}],389:[function(require,module,exports){
+},{"./md5":391,"buffer":90,"cipher-base":91,"inherits":435,"ripemd160":468,"sha.js":477}],390:[function(require,module,exports){
(function (Buffer){
'use strict';
var intSize = 4;
@@ -57240,7 +56461,7 @@ function hash(buf, fn, hashSize, bigEndian) {
}
exports.hash = hash;
}).call(this,require("buffer").Buffer)
-},{"buffer":90}],390:[function(require,module,exports){
+},{"buffer":90}],391:[function(require,module,exports){
'use strict';
/*
* A JavaScript implementation of the RSA Data Security, Inc. MD5 Message
@@ -57397,7 +56618,7 @@ function bit_rol(num, cnt)
module.exports = function md5(buf) {
return helpers.hash(buf, core_md5, 16);
};
-},{"./helpers":389}],391:[function(require,module,exports){
+},{"./helpers":390}],392:[function(require,module,exports){
(function (Buffer){
'use strict';
var createHash = require('create-hash/browser');
@@ -57469,7 +56690,7 @@ module.exports = function createHmac(alg, key) {
}
}).call(this,require("buffer").Buffer)
-},{"buffer":90,"create-hash/browser":388,"inherits":434,"stream":483}],392:[function(require,module,exports){
+},{"buffer":90,"create-hash/browser":389,"inherits":435,"stream":484}],393:[function(require,module,exports){
'use strict'
exports.randomBytes = exports.rng = exports.pseudoRandomBytes = exports.prng = require('randombytes')
@@ -57548,7 +56769,7 @@ var publicEncrypt = require('public-encrypt')
}
})
-},{"browserify-cipher":78,"browserify-sign":84,"browserify-sign/algos":83,"create-ecdh":387,"create-hash":388,"create-hmac":391,"diffie-hellman":399,"pbkdf2":446,"public-encrypt":449,"randombytes":455}],393:[function(require,module,exports){
+},{"browserify-cipher":78,"browserify-sign":84,"browserify-sign/algos":83,"create-ecdh":388,"create-hash":389,"create-hmac":392,"diffie-hellman":400,"pbkdf2":447,"public-encrypt":450,"randombytes":456}],394:[function(require,module,exports){
'use strict';
exports.utils = require('./des/utils');
@@ -57557,7 +56778,7 @@ exports.DES = require('./des/des');
exports.CBC = require('./des/cbc');
exports.EDE = require('./des/ede');
-},{"./des/cbc":394,"./des/cipher":395,"./des/des":396,"./des/ede":397,"./des/utils":398}],394:[function(require,module,exports){
+},{"./des/cbc":395,"./des/cipher":396,"./des/des":397,"./des/ede":398,"./des/utils":399}],395:[function(require,module,exports){
'use strict';
var assert = require('minimalistic-assert');
@@ -57624,7 +56845,7 @@ proto._update = function _update(inp, inOff, out, outOff) {
}
};
-},{"inherits":434,"minimalistic-assert":441}],395:[function(require,module,exports){
+},{"inherits":435,"minimalistic-assert":442}],396:[function(require,module,exports){
'use strict';
var assert = require('minimalistic-assert');
@@ -57767,7 +56988,7 @@ Cipher.prototype._finalDecrypt = function _finalDecrypt() {
return this._unpad(out);
};
-},{"minimalistic-assert":441}],396:[function(require,module,exports){
+},{"minimalistic-assert":442}],397:[function(require,module,exports){
'use strict';
var assert = require('minimalistic-assert');
@@ -57912,7 +57133,7 @@ DES.prototype._decrypt = function _decrypt(state, lStart, rStart, out, off) {
utils.rip(l, r, out, off);
};
-},{"../des":393,"inherits":434,"minimalistic-assert":441}],397:[function(require,module,exports){
+},{"../des":394,"inherits":435,"minimalistic-assert":442}],398:[function(require,module,exports){
'use strict';
var assert = require('minimalistic-assert');
@@ -57969,7 +57190,7 @@ EDE.prototype._update = function _update(inp, inOff, out, outOff) {
EDE.prototype._pad = DES.prototype._pad;
EDE.prototype._unpad = DES.prototype._unpad;
-},{"../des":393,"inherits":434,"minimalistic-assert":441}],398:[function(require,module,exports){
+},{"../des":394,"inherits":435,"minimalistic-assert":442}],399:[function(require,module,exports){
'use strict';
exports.readUInt32BE = function readUInt32BE(bytes, off) {
@@ -58227,7 +57448,7 @@ exports.padSplit = function padSplit(num, size, group) {
return out.join(' ');
};
-},{}],399:[function(require,module,exports){
+},{}],400:[function(require,module,exports){
(function (Buffer){
var generatePrime = require('./lib/generatePrime')
var primes = require('./lib/primes.json')
@@ -58273,7 +57494,7 @@ exports.DiffieHellmanGroup = exports.createDiffieHellmanGroup = exports.getDiffi
exports.createDiffieHellman = exports.DiffieHellman = createDiffieHellman
}).call(this,require("buffer").Buffer)
-},{"./lib/dh":400,"./lib/generatePrime":401,"./lib/primes.json":402,"buffer":90}],400:[function(require,module,exports){
+},{"./lib/dh":401,"./lib/generatePrime":402,"./lib/primes.json":403,"buffer":90}],401:[function(require,module,exports){
(function (Buffer){
var BN = require('bn.js');
var MillerRabin = require('miller-rabin');
@@ -58441,7 +57662,7 @@ function formatReturnValue(bn, enc) {
}
}).call(this,require("buffer").Buffer)
-},{"./generatePrime":401,"bn.js":60,"buffer":90,"miller-rabin":440,"randombytes":455}],401:[function(require,module,exports){
+},{"./generatePrime":402,"bn.js":60,"buffer":90,"miller-rabin":441,"randombytes":456}],402:[function(require,module,exports){
var randomBytes = require('randombytes');
module.exports = findPrime;
findPrime.simpleSieve = simpleSieve;
@@ -58548,7 +57769,7 @@ function findPrime(bits, gen) {
}
-},{"bn.js":60,"miller-rabin":440,"randombytes":455}],402:[function(require,module,exports){
+},{"bn.js":60,"miller-rabin":441,"randombytes":456}],403:[function(require,module,exports){
module.exports={
"modp1": {
"gen": "02",
@@ -58583,7 +57804,7 @@ module.exports={
"prime": "ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a92108011a723c12a787e6d788719a10bdba5b2699c327186af4e23c1a946834b6150bda2583e9ca2ad44ce8dbbbc2db04de8ef92e8efc141fbecaa6287c59474e6bc05d99b2964fa090c3a2233ba186515be7ed1f612970cee2d7afb81bdd762170481cd0069127d5b05aa993b4ea988d8fddc186ffb7dc90a6c08f4df435c93402849236c3fab4d27c7026c1d4dcb2602646dec9751e763dba37bdf8ff9406ad9e530ee5db382f413001aeb06a53ed9027d831179727b0865a8918da3edbebcf9b14ed44ce6cbaced4bb1bdb7f1447e6cc254b332051512bd7af426fb8f401378cd2bf5983ca01c64b92ecf032ea15d1721d03f482d7ce6e74fef6d55e702f46980c82b5a84031900b1c9e59e7c97fbec7e8f323a97a7e36cc88be0f1d45b7ff585ac54bd407b22b4154aacc8f6d7ebf48e1d814cc5ed20f8037e0a79715eef29be32806a1d58bb7c5da76f550aa3d8a1fbff0eb19ccb1a313d55cda56c9ec2ef29632387fe8d76e3c0468043e8f663f4860ee12bf2d5b0b7474d6e694f91e6dbe115974a3926f12fee5e438777cb6a932df8cd8bec4d073b931ba3bc832b68d9dd300741fa7bf8afc47ed2576f6936ba424663aab639c5ae4f5683423b4742bf1c978238f16cbe39d652de3fdb8befc848ad922222e04a4037c0713eb57a81a23f0c73473fc646cea306b4bcbc8862f8385ddfa9d4b7fa2c087e879683303ed5bdd3a062b3cf5b3a278a66d2a13f83f44f82ddf310ee074ab6a364597e899a0255dc164f31cc50846851df9ab48195ded7ea1b1d510bd7ee74d73faf36bc31ecfa268359046f4eb879f924009438b481c6cd7889a002ed5ee382bc9190da6fc026e479558e4475677e9aa9e3050e2765694dfc81f56e880b96e7160c980dd98edd3dfffffffffffffffff"
}
}
-},{}],403:[function(require,module,exports){
+},{}],404:[function(require,module,exports){
'use strict';
var elliptic = exports;
@@ -58599,7 +57820,7 @@ elliptic.curves = require('./elliptic/curves');
elliptic.ec = require('./elliptic/ec');
elliptic.eddsa = require('./elliptic/eddsa');
-},{"../package.json":419,"./elliptic/curve":406,"./elliptic/curves":409,"./elliptic/ec":410,"./elliptic/eddsa":413,"./elliptic/hmac-drbg":416,"./elliptic/utils":418,"brorand":61}],404:[function(require,module,exports){
+},{"../package.json":420,"./elliptic/curve":407,"./elliptic/curves":410,"./elliptic/ec":411,"./elliptic/eddsa":414,"./elliptic/hmac-drbg":417,"./elliptic/utils":419,"brorand":61}],405:[function(require,module,exports){
'use strict';
var BN = require('bn.js');
@@ -58630,15 +57851,6 @@ function BaseCurve(type, conf) {
this._wnafT2 = new Array(4);
this._wnafT3 = new Array(4);
this._wnafT4 = new Array(4);
-
- // Generalized Greg Maxwell's trick
- var adjustCount = this.n && this.p.div(this.n);
- if (!adjustCount || adjustCount.cmpn(100) > 0) {
- this.redN = null;
- } else {
- this._maxwellTrick = true;
- this.redN = this.n.toRed(this.red);
- }
}
module.exports = BaseCurve;
@@ -58727,8 +57939,7 @@ BaseCurve.prototype._wnafMul = function _wnafMul(p, k) {
BaseCurve.prototype._wnafMulAdd = function _wnafMulAdd(defW,
points,
coeffs,
- len,
- jacobianResult) {
+ len) {
var wndWidth = this._wnafT1;
var wnd = this._wnafT2;
var naf = this._wnafT3;
@@ -58841,11 +58052,7 @@ BaseCurve.prototype._wnafMulAdd = function _wnafMulAdd(defW,
// Zeroify references
for (var i = 0; i < len; i++)
wnd[i] = null;
-
- if (jacobianResult)
- return acc;
- else
- return acc.toP();
+ return acc.toP();
};
function BasePoint(curve, type) {
@@ -58976,7 +58183,7 @@ BasePoint.prototype.dblp = function dblp(k) {
return r;
};
-},{"../../elliptic":403,"bn.js":60}],405:[function(require,module,exports){
+},{"../../elliptic":404,"bn.js":60}],406:[function(require,module,exports){
'use strict';
var curve = require('../curve');
@@ -59343,11 +58550,7 @@ Point.prototype.mul = function mul(k) {
};
Point.prototype.mulAdd = function mulAdd(k1, p, k2) {
- return this.curve._wnafMulAdd(1, [ this, p ], [ k1, k2 ], 2, false);
-};
-
-Point.prototype.jmulAdd = function jmulAdd(k1, p, k2) {
- return this.curve._wnafMulAdd(1, [ this, p ], [ k1, k2 ], 2, true);
+ return this.curve._wnafMulAdd(1, [ this, p ], [ k1, k2 ], 2);
};
Point.prototype.normalize = function normalize() {
@@ -59388,30 +58591,11 @@ Point.prototype.eq = function eq(other) {
this.getY().cmp(other.getY()) === 0;
};
-Point.prototype.eqXToP = function eqXToP(x) {
- var rx = x.toRed(this.curve.red).redMul(this.z);
- if (this.x.cmp(rx) === 0)
- return true;
-
- var xc = x.clone();
- var t = this.curve.redN.redMul(this.z);
- for (;;) {
- xc.iadd(this.curve.n);
- if (xc.cmp(this.curve.p) >= 0)
- return false;
-
- rx.redIAdd(t);
- if (this.x.cmp(rx) === 0)
- return true;
- }
- return false;
-};
-
// Compatibility with BaseCurve
Point.prototype.toP = Point.prototype.normalize;
Point.prototype.mixedAdd = Point.prototype.add;
-},{"../../elliptic":403,"../curve":406,"bn.js":60,"inherits":434}],406:[function(require,module,exports){
+},{"../../elliptic":404,"../curve":407,"bn.js":60,"inherits":435}],407:[function(require,module,exports){
'use strict';
var curve = exports;
@@ -59421,7 +58605,7 @@ curve.short = require('./short');
curve.mont = require('./mont');
curve.edwards = require('./edwards');
-},{"./base":404,"./edwards":405,"./mont":407,"./short":408}],407:[function(require,module,exports){
+},{"./base":405,"./edwards":406,"./mont":408,"./short":409}],408:[function(require,module,exports){
'use strict';
var curve = require('../curve');
@@ -59582,10 +58766,6 @@ Point.prototype.mulAdd = function mulAdd() {
throw new Error('Not supported on Montgomery curve');
};
-Point.prototype.jumlAdd = function jumlAdd() {
- throw new Error('Not supported on Montgomery curve');
-};
-
Point.prototype.eq = function eq(other) {
return this.getX().cmp(other.getX()) === 0;
};
@@ -59603,7 +58783,7 @@ Point.prototype.getX = function getX() {
return this.x.fromRed();
};
-},{"../../elliptic":403,"../curve":406,"bn.js":60,"inherits":434}],408:[function(require,module,exports){
+},{"../../elliptic":404,"../curve":407,"bn.js":60,"inherits":435}],409:[function(require,module,exports){
'use strict';
var curve = require('../curve');
@@ -59823,7 +59003,7 @@ ShortCurve.prototype.validate = function validate(point) {
};
ShortCurve.prototype._endoWnafMulAdd =
- function _endoWnafMulAdd(points, coeffs, jacobianResult) {
+ function _endoWnafMulAdd(points, coeffs) {
var npoints = this._endoWnafT1;
var ncoeffs = this._endoWnafT2;
for (var i = 0; i < points.length; i++) {
@@ -59845,7 +59025,7 @@ ShortCurve.prototype._endoWnafMulAdd =
ncoeffs[i * 2] = split.k1;
ncoeffs[i * 2 + 1] = split.k2;
}
- var res = this._wnafMulAdd(1, npoints, ncoeffs, i * 2, jacobianResult);
+ var res = this._wnafMulAdd(1, npoints, ncoeffs, i * 2);
// Clean-up references to points and coefficients
for (var j = 0; j < i * 2; j++) {
@@ -60046,15 +59226,6 @@ Point.prototype.mulAdd = function mulAdd(k1, p2, k2) {
return this.curve._wnafMulAdd(1, points, coeffs, 2);
};
-Point.prototype.jmulAdd = function jmulAdd(k1, p2, k2) {
- var points = [ this, p2 ];
- var coeffs = [ k1, k2 ];
- if (this.curve.endo)
- return this.curve._endoWnafMulAdd(points, coeffs, true);
- else
- return this.curve._wnafMulAdd(1, points, coeffs, 2, true);
-};
-
Point.prototype.eq = function eq(p) {
return this === p ||
this.inf === p.inf &&
@@ -60510,26 +59681,6 @@ JPoint.prototype.eq = function eq(p) {
return this.y.redMul(pz3).redISub(p.y.redMul(z3)).cmpn(0) === 0;
};
-JPoint.prototype.eqXToP = function eqXToP(x) {
- var zs = this.z.redSqr();
- var rx = x.toRed(this.curve.red).redMul(zs);
- if (this.x.cmp(rx) === 0)
- return true;
-
- var xc = x.clone();
- var t = this.curve.redN.redMul(zs);
- for (;;) {
- xc.iadd(this.curve.n);
- if (xc.cmp(this.curve.p) >= 0)
- return false;
-
- rx.redIAdd(t);
- if (this.x.cmp(rx) === 0)
- return true;
- }
- return false;
-};
-
JPoint.prototype.inspect = function inspect() {
if (this.isInfinity())
return '';
@@ -60543,7 +59694,7 @@ JPoint.prototype.isInfinity = function isInfinity() {
return this.z.cmpn(0) === 0;
};
-},{"../../elliptic":403,"../curve":406,"bn.js":60,"inherits":434}],409:[function(require,module,exports){
+},{"../../elliptic":404,"../curve":407,"bn.js":60,"inherits":435}],410:[function(require,module,exports){
'use strict';
var curves = exports;
@@ -60750,7 +59901,7 @@ defineCurve('secp256k1', {
]
});
-},{"../elliptic":403,"./precomputed/secp256k1":417,"hash.js":426}],410:[function(require,module,exports){
+},{"../elliptic":404,"./precomputed/secp256k1":418,"hash.js":427}],411:[function(require,module,exports){
'use strict';
var BN = require('bn.js');
@@ -60919,25 +60070,11 @@ EC.prototype.verify = function verify(msg, signature, key, enc) {
var u1 = sinv.mul(msg).umod(this.n);
var u2 = sinv.mul(r).umod(this.n);
- if (!this.curve._maxwellTrick) {
- var p = this.g.mulAdd(u1, key.getPublic(), u2);
- if (p.isInfinity())
- return false;
-
- return p.getX().umod(this.n).cmp(r) === 0;
- }
-
- // NOTE: Greg Maxwell's trick, inspired by:
- // https://git.io/vad3K
-
- var p = this.g.jmulAdd(u1, key.getPublic(), u2);
+ var p = this.g.mulAdd(u1, key.getPublic(), u2);
if (p.isInfinity())
return false;
- // Compare `p.x` of Jacobian point with `r`,
- // this will do `p.x == r * p.z^2` instead of multiplying `p.x` by the
- // inverse of `p.z^2`
- return p.eqXToP(r);
+ return p.getX().umod(this.n).cmp(r) === 0;
};
EC.prototype.recoverPubKey = function(msg, signature, j, enc) {
@@ -60988,7 +60125,7 @@ EC.prototype.getKeyRecoveryParam = function(e, signature, Q, enc) {
throw new Error('Unable to find valid recovery factor');
};
-},{"../../elliptic":403,"./key":411,"./signature":412,"bn.js":60}],411:[function(require,module,exports){
+},{"../../elliptic":404,"./key":412,"./signature":413,"bn.js":60}],412:[function(require,module,exports){
'use strict';
var BN = require('bn.js');
@@ -61097,7 +60234,7 @@ KeyPair.prototype.inspect = function inspect() {
' pub: ' + (this.pub && this.pub.inspect()) + ' >';
};
-},{"bn.js":60}],412:[function(require,module,exports){
+},{"bn.js":60}],413:[function(require,module,exports){
'use strict';
var BN = require('bn.js');
@@ -61234,7 +60371,7 @@ Signature.prototype.toDER = function toDER(enc) {
return utils.encode(res, enc);
};
-},{"../../elliptic":403,"bn.js":60}],413:[function(require,module,exports){
+},{"../../elliptic":404,"bn.js":60}],414:[function(require,module,exports){
'use strict';
var hash = require('hash.js');
@@ -61354,7 +60491,7 @@ EDDSA.prototype.isPoint = function isPoint(val) {
return val instanceof this.pointClass;
};
-},{"../../elliptic":403,"./key":414,"./signature":415,"hash.js":426}],414:[function(require,module,exports){
+},{"../../elliptic":404,"./key":415,"./signature":416,"hash.js":427}],415:[function(require,module,exports){
'use strict';
var elliptic = require('../../elliptic');
@@ -61452,7 +60589,7 @@ KeyPair.prototype.getPublic = function getPublic(enc) {
module.exports = KeyPair;
-},{"../../elliptic":403}],415:[function(require,module,exports){
+},{"../../elliptic":404}],416:[function(require,module,exports){
'use strict';
var BN = require('bn.js');
@@ -61520,7 +60657,7 @@ Signature.prototype.toHex = function toHex() {
module.exports = Signature;
-},{"../../elliptic":403,"bn.js":60}],416:[function(require,module,exports){
+},{"../../elliptic":404,"bn.js":60}],417:[function(require,module,exports){
'use strict';
var hash = require('hash.js');
@@ -61636,7 +60773,7 @@ HmacDRBG.prototype.generate = function generate(len, enc, add, addEnc) {
return utils.encode(res, enc);
};
-},{"../elliptic":403,"hash.js":426}],417:[function(require,module,exports){
+},{"../elliptic":404,"hash.js":427}],418:[function(require,module,exports){
module.exports = {
doubles: {
step: 4,
@@ -62418,7 +61555,7 @@ module.exports = {
}
};
-},{}],418:[function(require,module,exports){
+},{}],419:[function(require,module,exports){
'use strict';
var utils = exports;
@@ -62592,23 +61729,23 @@ function intFromLE(bytes) {
utils.intFromLE = intFromLE;
-},{"bn.js":60}],419:[function(require,module,exports){
+},{"bn.js":60}],420:[function(require,module,exports){
module.exports={
"_args": [
[
"elliptic@^6.0.0",
- "C:\\Users\\Kosala\\Documents\\GitHub\\etherwallet\\node_modules\\browserify-sign"
+ "/Volumes/Macintosh HD/Users/TayTay/Documents/Dropbox/local-dev/etherwallet/node_modules/browserify-sign"
]
],
"_from": "elliptic@>=6.0.0 <7.0.0",
- "_id": "elliptic@6.3.1",
+ "_id": "elliptic@6.2.8",
"_inCache": true,
"_installable": true,
"_location": "/elliptic",
"_nodeVersion": "6.0.0",
"_npmOperationalInternal": {
- "host": "packages-16-east.internal.npmjs.com",
- "tmp": "tmp/elliptic-6.3.1.tgz_1465921413402_0.5202967382501811"
+ "host": "packages-12-west.internal.npmjs.com",
+ "tmp": "tmp/elliptic-6.2.8.tgz_1464746004719_0.6379144776146859"
},
"_npmUser": {
"email": "fedor@indutny.com",
@@ -62629,11 +61766,11 @@ module.exports={
"/create-ecdh",
"/secp256k1"
],
- "_resolved": "https://registry.npmjs.org/elliptic/-/elliptic-6.3.1.tgz",
- "_shasum": "17781f2109ab0ec686b146bdcff5d2e8c6aeceda",
+ "_resolved": "https://registry.npmjs.org/elliptic/-/elliptic-6.2.8.tgz",
+ "_shasum": "44a25b3d1550bebb74d0b6d22d89940206b51739",
"_shrinkwrap": null,
"_spec": "elliptic@^6.0.0",
- "_where": "C:\\Users\\Kosala\\Documents\\GitHub\\etherwallet\\node_modules\\browserify-sign",
+ "_where": "/Volumes/Macintosh HD/Users/TayTay/Documents/Dropbox/local-dev/etherwallet/node_modules/browserify-sign",
"author": {
"email": "fedor@indutny.com",
"name": "Fedor Indutny"
@@ -62642,7 +61779,7 @@ module.exports={
"url": "https://github.com/indutny/elliptic/issues"
},
"dependencies": {
- "bn.js": "^4.4.0",
+ "bn.js": "^4.0.0",
"brorand": "^1.0.1",
"hash.js": "^1.0.0",
"inherits": "^2.0.1"
@@ -62665,13 +61802,13 @@ module.exports={
},
"directories": {},
"dist": {
- "shasum": "17781f2109ab0ec686b146bdcff5d2e8c6aeceda",
- "tarball": "https://registry.npmjs.org/elliptic/-/elliptic-6.3.1.tgz"
+ "shasum": "44a25b3d1550bebb74d0b6d22d89940206b51739",
+ "tarball": "https://registry.npmjs.org/elliptic/-/elliptic-6.2.8.tgz"
},
"files": [
"lib"
],
- "gitHead": "c53f5cf3d832c0073eb4a4ed423a464cbce68f3e",
+ "gitHead": "236f37395bdf9e4af1dfc8e84f6353bce540b93e",
"homepage": "https://github.com/indutny/elliptic",
"keywords": [
"EC",
@@ -62702,10 +61839,10 @@ module.exports={
"unit": "istanbul test _mocha --reporter=spec test/index.js",
"version": "grunt dist && git add dist/"
},
- "version": "6.3.1"
+ "version": "6.2.8"
}
-},{}],420:[function(require,module,exports){
+},{}],421:[function(require,module,exports){
module.exports={
"genesisGasLimit": {
"v": 5000,
@@ -62938,12 +62075,11 @@ module.exports={
}
}
-},{}],421:[function(require,module,exports){
+},{}],422:[function(require,module,exports){
module.exports = require('./params.json')
-},{"./params.json":420}],422:[function(require,module,exports){
-(function (Buffer){
-'use strict'
+},{"./params.json":421}],423:[function(require,module,exports){
+(function (global,Buffer){
const ethUtil = require('ethereumjs-util')
const fees = require('ethereum-common/params')
const BN = ethUtil.BN
@@ -62951,6 +62087,10 @@ const BN = ethUtil.BN
// secp256k1n/2
const N_DIV_2 = new BN('7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a0', 16)
+// give browser access to Buffers
+global.Buffer = Buffer
+global.ethUtil = ethUtil
+
/**
* Creates a new transaction object
* @constructor
@@ -62979,7 +62119,7 @@ const N_DIV_2 = new BN('7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46
* @prop {Buffer} r EC signature parameter
* @prop {Buffer} s EC recovery ID
*/
-const Transaction = module.exports = function (data) {
+var Transaction = module.exports = function (data) {
// Define Properties
const fields = [{
name: 'nonce',
@@ -63064,7 +62204,7 @@ Transaction.prototype.toCreationAddress = function () {
* @return {Buffer}
*/
Transaction.prototype.hash = function (signature) {
- let toHash
+ var toHash
if (typeof signature === 'undefined') {
signature = true
@@ -63085,7 +62225,7 @@ Transaction.prototype.getSenderAddress = function () {
if (this._from) {
return this._from
}
- const pubkey = this.getSenderPublicKey()
+ var pubkey = this.getSenderPublicKey()
this._from = ethUtil.publicToAddress(pubkey)
return this._from
}
@@ -63109,7 +62249,7 @@ Transaction.prototype.getSenderPublicKey = function () {
* @return {Boolean}
*/
Transaction.prototype.verifySignature = function () {
- const msgHash = this.hash(false)
+ var msgHash = this.hash(false)
// All transaction signatures whose s-value is greater than secp256k1n/2 are considered invalid.
if (this._homestead && new BN(this.s).cmp(N_DIV_2) === 1) {
@@ -63131,8 +62271,8 @@ Transaction.prototype.verifySignature = function () {
* @param {Buffer} privateKey
*/
Transaction.prototype.sign = function (privateKey) {
- const msgHash = this.hash(false)
- const sig = ethUtil.ecsign(msgHash, privateKey)
+ var msgHash = this.hash(false)
+ var sig = ethUtil.ecsign(msgHash, privateKey)
Object.assign(this, sig)
}
@@ -63143,7 +62283,7 @@ Transaction.prototype.sign = function (privateKey) {
*/
Transaction.prototype.getDataFee = function () {
const data = this.raw[5]
- const cost = new BN(0)
+ var cost = new BN(0)
for (var i = 0; i < data.length; i++) {
data[i] === 0 ? cost.iaddn(fees.txDataZeroGas.v) : cost.iaddn(fees.txDataNonZeroGas.v)
}
@@ -63156,7 +62296,7 @@ Transaction.prototype.getDataFee = function () {
* @return {BN}
*/
Transaction.prototype.getBaseFee = function () {
- const fee = this.getDataFee().iaddn(fees.txGas.v)
+ var fee = this.getDataFee().iaddn(fees.txGas.v)
if (this._homestead && this.toCreationAddress()) {
fee.iaddn(fees.txCreation.v)
}
@@ -63181,13 +62321,13 @@ Transaction.prototype.getUpfrontCost = function () {
* @return {Boolean|String}
*/
Transaction.prototype.validate = function (stringError) {
- const errors = []
+ var errors = []
if (!this.verifySignature()) {
errors.push('Invalid Signature')
}
if (this.getBaseFee().cmp(new BN(this.gasLimit)) > 0) {
- errors.push([`gas limit is to low. Need at least ${this.getBaseFee()}`])
+ errors.push(['gas limit is to low. Need at least ' + this.getBaseFee()])
}
if (stringError === undefined || stringError === false) {
@@ -63197,8 +62337,8 @@ Transaction.prototype.validate = function (stringError) {
}
}
-}).call(this,require("buffer").Buffer)
-},{"buffer":90,"ethereum-common/params":421,"ethereumjs-util":423}],423:[function(require,module,exports){
+}).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {},require("buffer").Buffer)
+},{"buffer":90,"ethereum-common/params":422,"ethereumjs-util":424}],424:[function(require,module,exports){
(function (Buffer){
const SHA3 = require('keccakjs')
const secp256k1 = require('secp256k1')
@@ -63608,42 +62748,6 @@ exports.ecrecover = function (msgHash, v, r, s) {
return secp256k1.publicKeyConvert(senderPubKey, false).slice(1)
}
-/**
- * Convert signature parameters into the format of `eth_sign` RPC method
- * @method toRpcSig
- * @param {Number} v
- * @param {Buffer} r
- * @param {Buffer} s
- * @return {String} sig
- */
-exports.toRpcSig = function (v, r, s) {
- // geth (and the RPC eth_sign method) uses the 65 byte format used by Bitcoin
- // FIXME: this might change in the future - https://github.com/ethereum/go-ethereum/issues/2053
- return exports.bufferToHex(Buffer.concat([ r, s, exports.toBuffer(v - 27) ]))
-}
-
-/**
- * Convert signature format of the `eth_sign` RPC method to signature parameters
- * @method fromRpcSig
- * @param {String} sig
- * @return {Object}
- */
-exports.fromRpcSig = function (sig) {
- sig = exports.toBuffer(sig)
-
- var v = sig[64]
- // support both versions of `eth_sign` responses
- if (v < 27) {
- v += 27
- }
-
- return {
- v: v,
- r: sig.slice(0, 32),
- s: sig.slice(32, 64)
- }
-}
-
/**
* Returns the ethereum address of a given private key
* @method privateToAddress
@@ -63903,7 +63007,7 @@ exports.defineProperties = function (self, fields, data) {
}
}).call(this,require("buffer").Buffer)
-},{"assert":55,"bn.js":60,"buffer":90,"create-hash":388,"keccakjs":438,"rlp":468,"secp256k1":470}],424:[function(require,module,exports){
+},{"assert":55,"bn.js":60,"buffer":90,"create-hash":389,"keccakjs":439,"rlp":469,"secp256k1":471}],425:[function(require,module,exports){
// Copyright Joyent, Inc. and other Node contributors.
//
// Permission is hereby granted, free of charge, to any person obtaining a
@@ -63963,12 +63067,8 @@ EventEmitter.prototype.emit = function(type) {
er = arguments[1];
if (er instanceof Error) {
throw er; // Unhandled 'error' event
- } else {
- // At least give some kind of context to the user
- var err = new Error('Uncaught, unspecified "error" event. (' + er + ')');
- err.context = er;
- throw err;
}
+ throw TypeError('Uncaught, unspecified "error" event.');
}
}
@@ -64207,7 +63307,7 @@ function isUndefined(arg) {
return arg === void 0;
}
-},{}],425:[function(require,module,exports){
+},{}],426:[function(require,module,exports){
(function (Buffer){
var md5 = require('create-hash/md5')
module.exports = EVP_BytesToKey
@@ -64279,7 +63379,7 @@ function EVP_BytesToKey (password, salt, keyLen, ivLen) {
}
}).call(this,require("buffer").Buffer)
-},{"buffer":90,"create-hash/md5":390}],426:[function(require,module,exports){
+},{"buffer":90,"create-hash/md5":391}],427:[function(require,module,exports){
var hash = exports;
hash.utils = require('./hash/utils');
@@ -64296,7 +63396,7 @@ hash.sha384 = hash.sha.sha384;
hash.sha512 = hash.sha.sha512;
hash.ripemd160 = hash.ripemd.ripemd160;
-},{"./hash/common":427,"./hash/hmac":428,"./hash/ripemd":429,"./hash/sha":430,"./hash/utils":431}],427:[function(require,module,exports){
+},{"./hash/common":428,"./hash/hmac":429,"./hash/ripemd":430,"./hash/sha":431,"./hash/utils":432}],428:[function(require,module,exports){
var hash = require('../hash');
var utils = hash.utils;
var assert = utils.assert;
@@ -64389,7 +63489,7 @@ BlockHash.prototype._pad = function pad() {
return res;
};
-},{"../hash":426}],428:[function(require,module,exports){
+},{"../hash":427}],429:[function(require,module,exports){
var hmac = exports;
var hash = require('../hash');
@@ -64439,7 +63539,7 @@ Hmac.prototype.digest = function digest(enc) {
return this.outer.digest(enc);
};
-},{"../hash":426}],429:[function(require,module,exports){
+},{"../hash":427}],430:[function(require,module,exports){
var hash = require('../hash');
var utils = hash.utils;
@@ -64585,7 +63685,7 @@ var sh = [
8, 5, 12, 9, 12, 5, 14, 6, 8, 13, 6, 5, 15, 13, 11, 11
];
-},{"../hash":426}],430:[function(require,module,exports){
+},{"../hash":427}],431:[function(require,module,exports){
var hash = require('../hash');
var utils = hash.utils;
var assert = utils.assert;
@@ -65151,7 +64251,7 @@ function g1_512_lo(xh, xl) {
return r;
}
-},{"../hash":426}],431:[function(require,module,exports){
+},{"../hash":427}],432:[function(require,module,exports){
var utils = exports;
var inherits = require('inherits');
@@ -65410,7 +64510,7 @@ function shr64_lo(ah, al, num) {
};
exports.shr64_lo = shr64_lo;
-},{"inherits":434}],432:[function(require,module,exports){
+},{"inherits":435}],433:[function(require,module,exports){
exports.read = function (buffer, offset, isLE, mLen, nBytes) {
var e, m
var eLen = nBytes * 8 - mLen - 1
@@ -65496,7 +64596,7 @@ exports.write = function (buffer, value, offset, isLE, mLen, nBytes) {
buffer[offset + i - d] |= s * 128
}
-},{}],433:[function(require,module,exports){
+},{}],434:[function(require,module,exports){
var indexOf = [].indexOf;
@@ -65507,7 +64607,7 @@ module.exports = function(arr, obj){
}
return -1;
};
-},{}],434:[function(require,module,exports){
+},{}],435:[function(require,module,exports){
if (typeof Object.create === 'function') {
// implementation from standard node.js 'util' module
module.exports = function inherits(ctor, superCtor) {
@@ -65532,37 +64632,33 @@ if (typeof Object.create === 'function') {
}
}
-},{}],435:[function(require,module,exports){
-/*!
- * Determine if an object is a Buffer
+},{}],436:[function(require,module,exports){
+/**
+ * Determine if an object is Buffer
*
- * @author Feross Aboukhadijeh
- * @license MIT
+ * Author: Feross Aboukhadijeh
+ * License: MIT
+ *
+ * `npm install is-buffer`
*/
-// The _isBuffer check is for Safari 5-7 support, because it's missing
-// Object.prototype.constructor. Remove this eventually
module.exports = function (obj) {
- return obj != null && (isBuffer(obj) || isSlowBuffer(obj) || !!obj._isBuffer)
-}
-
-function isBuffer (obj) {
- return !!obj.constructor && typeof obj.constructor.isBuffer === 'function' && obj.constructor.isBuffer(obj)
+ return !!(obj != null &&
+ (obj._isBuffer || // For Safari 5-7 (missing Object.prototype.constructor)
+ (obj.constructor &&
+ typeof obj.constructor.isBuffer === 'function' &&
+ obj.constructor.isBuffer(obj))
+ ))
}
-// For Node v0.10 support. Remove this eventually.
-function isSlowBuffer (obj) {
- return typeof obj.readFloatLE === 'function' && typeof obj.slice === 'function' && isBuffer(obj.slice(0, 0))
-}
-
-},{}],436:[function(require,module,exports){
+},{}],437:[function(require,module,exports){
var toString = {}.toString;
module.exports = Array.isArray || function (arr) {
return toString.call(arr) == '[object Array]';
};
-},{}],437:[function(require,module,exports){
+},{}],438:[function(require,module,exports){
(function (global){
/*
* js-sha3 v0.3.1
@@ -65998,10 +65094,10 @@ module.exports = Array.isArray || function (arr) {
}(this));
}).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {})
-},{}],438:[function(require,module,exports){
+},{}],439:[function(require,module,exports){
module.exports = require('browserify-sha3').SHA3Hash
-},{"browserify-sha3":82}],439:[function(require,module,exports){
+},{"browserify-sha3":82}],440:[function(require,module,exports){
(function (global){
/**
* marked - a markdown parser
@@ -67099,8 +66195,7 @@ function escape(html, encode) {
}
function unescape(html) {
- // explicitly match decimal, hex, and named HTML entities
- return html.replace(/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/g, function(_, n) {
+ return html.replace(/&([#\w]+);/g, function(_, n) {
n = n.toLowerCase();
if (n === 'colon') return ':';
if (n.charAt(0) === '#') {
@@ -67291,7 +66386,7 @@ if (typeof module !== 'undefined' && typeof exports === 'object') {
}());
}).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {})
-},{}],440:[function(require,module,exports){
+},{}],441:[function(require,module,exports){
var bn = require('bn.js');
var brorand = require('brorand');
@@ -67406,7 +66501,7 @@ MillerRabin.prototype.getDivisor = function getDivisor(n, k) {
return false;
};
-},{"bn.js":60,"brorand":61}],441:[function(require,module,exports){
+},{"bn.js":60,"brorand":61}],442:[function(require,module,exports){
module.exports = assert;
function assert(val, msg) {
@@ -67419,7 +66514,7 @@ assert.equal = function assertEqual(l, r, msg) {
throw new Error(msg || ('Assertion failed: ' + l + ' != ' + r));
};
-},{}],442:[function(require,module,exports){
+},{}],443:[function(require,module,exports){
module.exports={"2.16.840.1.101.3.4.1.1": "aes-128-ecb",
"2.16.840.1.101.3.4.1.2": "aes-128-cbc",
"2.16.840.1.101.3.4.1.3": "aes-128-ofb",
@@ -67433,7 +66528,7 @@ module.exports={"2.16.840.1.101.3.4.1.1": "aes-128-ecb",
"2.16.840.1.101.3.4.1.43": "aes-256-ofb",
"2.16.840.1.101.3.4.1.44": "aes-256-cfb"
}
-},{}],443:[function(require,module,exports){
+},{}],444:[function(require,module,exports){
// from https://github.com/indutny/self-signed/blob/gh-pages/lib/asn1.js
// Fedor, you are amazing.
@@ -67552,7 +66647,7 @@ exports.signature = asn1.define('signature', function () {
)
})
-},{"asn1.js":41}],444:[function(require,module,exports){
+},{"asn1.js":41}],445:[function(require,module,exports){
(function (Buffer){
// adapted from https://github.com/apatil/pemstrip
var findProc = /Proc-Type: 4,ENCRYPTED\r?\nDEK-Info: AES-((?:128)|(?:192)|(?:256))-CBC,([0-9A-H]+)\r?\n\r?\n([0-9A-z\n\r\+\/\=]+)\r?\n/m
@@ -67586,7 +66681,7 @@ module.exports = function (okey, password) {
}
}).call(this,require("buffer").Buffer)
-},{"browserify-aes":65,"buffer":90,"evp_bytestokey":425}],445:[function(require,module,exports){
+},{"browserify-aes":65,"buffer":90,"evp_bytestokey":426}],446:[function(require,module,exports){
(function (Buffer){
var asn1 = require('./asn1')
var aesid = require('./aesid.json')
@@ -67691,7 +66786,7 @@ function decrypt (data, password) {
}
}).call(this,require("buffer").Buffer)
-},{"./aesid.json":442,"./asn1":443,"./fixProc":444,"browserify-aes":65,"buffer":90,"pbkdf2":446}],446:[function(require,module,exports){
+},{"./aesid.json":443,"./asn1":444,"./fixProc":445,"browserify-aes":65,"buffer":90,"pbkdf2":447}],447:[function(require,module,exports){
(function (Buffer){
var createHmac = require('create-hmac')
var MAX_ALLOC = Math.pow(2, 30) - 1 // default in iojs
@@ -67775,7 +66870,7 @@ function pbkdf2Sync (password, salt, iterations, keylen, digest) {
}
}).call(this,require("buffer").Buffer)
-},{"buffer":90,"create-hmac":391}],447:[function(require,module,exports){
+},{"buffer":90,"create-hmac":392}],448:[function(require,module,exports){
(function (process){
'use strict';
@@ -67822,48 +66917,15 @@ function nextTick(fn, arg1, arg2, arg3) {
}
}).call(this,require('_process'))
-},{"_process":448}],448:[function(require,module,exports){
+},{"_process":449}],449:[function(require,module,exports){
// shim for using process in browser
-var process = module.exports = {};
-// cached from whatever global is present so that test runners that stub it
-// don't break things. But we need to wrap it in a try catch in case it is
-// wrapped in strict mode code which doesn't define any globals. It's inside a
-// function because try/catches deoptimize in certain engines.
+var process = module.exports = {};
-var cachedSetTimeout;
-var cachedClearTimeout;
+// cached from whatever global is present so that test runners that stub it don't break things.
+var cachedSetTimeout = setTimeout;
+var cachedClearTimeout = clearTimeout;
-(function () {
- try {
- cachedSetTimeout = setTimeout;
- } catch (e) {
- cachedSetTimeout = function () {
- throw new Error('setTimeout is not defined');
- }
- }
- try {
- cachedClearTimeout = clearTimeout;
- } catch (e) {
- cachedClearTimeout = function () {
- throw new Error('clearTimeout is not defined');
- }
- }
-} ())
-function runTimeout(fun) {
- if (cachedSetTimeout === setTimeout) {
- return setTimeout(fun, 0);
- } else {
- return cachedSetTimeout.call(null, fun, 0);
- }
-}
-function runClearTimeout(marker) {
- if (cachedClearTimeout === clearTimeout) {
- clearTimeout(marker);
- } else {
- cachedClearTimeout.call(null, marker);
- }
-}
var queue = [];
var draining = false;
var currentQueue;
@@ -67888,7 +66950,7 @@ function drainQueue() {
if (draining) {
return;
}
- var timeout = runTimeout(cleanUpNextTick);
+ var timeout = cachedSetTimeout(cleanUpNextTick);
draining = true;
var len = queue.length;
@@ -67905,7 +66967,7 @@ function drainQueue() {
}
currentQueue = null;
draining = false;
- runClearTimeout(timeout);
+ cachedClearTimeout(timeout);
}
process.nextTick = function (fun) {
@@ -67917,7 +66979,7 @@ process.nextTick = function (fun) {
}
queue.push(new Item(fun, args));
if (queue.length === 1 && !draining) {
- runTimeout(drainQueue);
+ cachedSetTimeout(drainQueue, 0);
}
};
@@ -67956,7 +67018,7 @@ process.chdir = function (dir) {
};
process.umask = function() { return 0; };
-},{}],449:[function(require,module,exports){
+},{}],450:[function(require,module,exports){
exports.publicEncrypt = require('./publicEncrypt');
exports.privateDecrypt = require('./privateDecrypt');
@@ -67967,7 +67029,7 @@ exports.privateEncrypt = function privateEncrypt(key, buf) {
exports.publicDecrypt = function publicDecrypt(key, buf) {
return exports.privateDecrypt(key, buf, true);
};
-},{"./privateDecrypt":451,"./publicEncrypt":452}],450:[function(require,module,exports){
+},{"./privateDecrypt":452,"./publicEncrypt":453}],451:[function(require,module,exports){
(function (Buffer){
var createHash = require('create-hash');
module.exports = function (seed, len) {
@@ -67986,7 +67048,7 @@ function i2ops(c) {
return out;
}
}).call(this,require("buffer").Buffer)
-},{"buffer":90,"create-hash":388}],451:[function(require,module,exports){
+},{"buffer":90,"create-hash":389}],452:[function(require,module,exports){
(function (Buffer){
var parseKeys = require('parse-asn1');
var mgf = require('./mgf');
@@ -68097,7 +67159,7 @@ function compare(a, b){
return dif;
}
}).call(this,require("buffer").Buffer)
-},{"./mgf":450,"./withPublic":453,"./xor":454,"bn.js":60,"browserify-rsa":81,"buffer":90,"create-hash":388,"parse-asn1":445}],452:[function(require,module,exports){
+},{"./mgf":451,"./withPublic":454,"./xor":455,"bn.js":60,"browserify-rsa":81,"buffer":90,"create-hash":389,"parse-asn1":446}],453:[function(require,module,exports){
(function (Buffer){
var parseKeys = require('parse-asn1');
var randomBytes = require('randombytes');
@@ -68195,7 +67257,7 @@ function nonZero(len, crypto) {
return out;
}
}).call(this,require("buffer").Buffer)
-},{"./mgf":450,"./withPublic":453,"./xor":454,"bn.js":60,"browserify-rsa":81,"buffer":90,"create-hash":388,"parse-asn1":445,"randombytes":455}],453:[function(require,module,exports){
+},{"./mgf":451,"./withPublic":454,"./xor":455,"bn.js":60,"browserify-rsa":81,"buffer":90,"create-hash":389,"parse-asn1":446,"randombytes":456}],454:[function(require,module,exports){
(function (Buffer){
var bn = require('bn.js');
function withPublic(paddedMsg, key) {
@@ -68208,7 +67270,7 @@ function withPublic(paddedMsg, key) {
module.exports = withPublic;
}).call(this,require("buffer").Buffer)
-},{"bn.js":60,"buffer":90}],454:[function(require,module,exports){
+},{"bn.js":60,"buffer":90}],455:[function(require,module,exports){
module.exports = function xor(a, b) {
var len = a.length;
var i = -1;
@@ -68217,7 +67279,7 @@ module.exports = function xor(a, b) {
}
return a
};
-},{}],455:[function(require,module,exports){
+},{}],456:[function(require,module,exports){
(function (process,global,Buffer){
'use strict'
@@ -68257,10 +67319,10 @@ function randomBytes (size, cb) {
}
}).call(this,require('_process'),typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {},require("buffer").Buffer)
-},{"_process":448,"buffer":90}],456:[function(require,module,exports){
+},{"_process":449,"buffer":90}],457:[function(require,module,exports){
module.exports = require("./lib/_stream_duplex.js")
-},{"./lib/_stream_duplex.js":457}],457:[function(require,module,exports){
+},{"./lib/_stream_duplex.js":458}],458:[function(require,module,exports){
// a duplex stream is just a stream that is both readable and writable.
// Since JS doesn't have multiple prototypal inheritance, this class
// prototypally inherits from Readable, and then parasitically from
@@ -68336,7 +67398,7 @@ function forEach(xs, f) {
f(xs[i], i);
}
}
-},{"./_stream_readable":459,"./_stream_writable":461,"core-util-is":386,"inherits":434,"process-nextick-args":447}],458:[function(require,module,exports){
+},{"./_stream_readable":460,"./_stream_writable":462,"core-util-is":387,"inherits":435,"process-nextick-args":448}],459:[function(require,module,exports){
// a passthrough stream.
// basically just the most minimal sort of Transform stream.
// Every written chunk gets output as-is.
@@ -68363,7 +67425,7 @@ function PassThrough(options) {
PassThrough.prototype._transform = function (chunk, encoding, cb) {
cb(null, chunk);
};
-},{"./_stream_transform":460,"core-util-is":386,"inherits":434}],459:[function(require,module,exports){
+},{"./_stream_transform":461,"core-util-is":387,"inherits":435}],460:[function(require,module,exports){
(function (process){
'use strict';
@@ -69259,7 +68321,7 @@ function indexOf(xs, x) {
return -1;
}
}).call(this,require('_process'))
-},{"./_stream_duplex":457,"_process":448,"buffer":90,"buffer-shims":88,"core-util-is":386,"events":424,"inherits":434,"isarray":436,"process-nextick-args":447,"string_decoder/":484,"util":62}],460:[function(require,module,exports){
+},{"./_stream_duplex":458,"_process":449,"buffer":90,"buffer-shims":88,"core-util-is":387,"events":425,"inherits":435,"isarray":437,"process-nextick-args":448,"string_decoder/":485,"util":62}],461:[function(require,module,exports){
// a transform stream is a readable/writable stream where you do
// something with the data. Sometimes it's called a "filter",
// but that's not a great name for it, since that implies a thing where
@@ -69440,7 +68502,7 @@ function done(stream, er) {
return stream.push(null);
}
-},{"./_stream_duplex":457,"core-util-is":386,"inherits":434}],461:[function(require,module,exports){
+},{"./_stream_duplex":458,"core-util-is":387,"inherits":435}],462:[function(require,module,exports){
(function (process){
// A bit simpler than readable streams.
// Implement an async ._write(chunk, encoding, cb), and it'll handle all
@@ -69969,10 +69031,10 @@ function CorkedRequest(state) {
};
}
}).call(this,require('_process'))
-},{"./_stream_duplex":457,"_process":448,"buffer":90,"buffer-shims":88,"core-util-is":386,"events":424,"inherits":434,"process-nextick-args":447,"util-deprecate":485}],462:[function(require,module,exports){
+},{"./_stream_duplex":458,"_process":449,"buffer":90,"buffer-shims":88,"core-util-is":387,"events":425,"inherits":435,"process-nextick-args":448,"util-deprecate":486}],463:[function(require,module,exports){
module.exports = require("./lib/_stream_passthrough.js")
-},{"./lib/_stream_passthrough.js":458}],463:[function(require,module,exports){
+},{"./lib/_stream_passthrough.js":459}],464:[function(require,module,exports){
(function (process){
var Stream = (function (){
try {
@@ -69992,13 +69054,13 @@ if (!process.browser && process.env.READABLE_STREAM === 'disable' && Stream) {
}
}).call(this,require('_process'))
-},{"./lib/_stream_duplex.js":457,"./lib/_stream_passthrough.js":458,"./lib/_stream_readable.js":459,"./lib/_stream_transform.js":460,"./lib/_stream_writable.js":461,"_process":448}],464:[function(require,module,exports){
+},{"./lib/_stream_duplex.js":458,"./lib/_stream_passthrough.js":459,"./lib/_stream_readable.js":460,"./lib/_stream_transform.js":461,"./lib/_stream_writable.js":462,"_process":449}],465:[function(require,module,exports){
module.exports = require("./lib/_stream_transform.js")
-},{"./lib/_stream_transform.js":460}],465:[function(require,module,exports){
+},{"./lib/_stream_transform.js":461}],466:[function(require,module,exports){
module.exports = require("./lib/_stream_writable.js")
-},{"./lib/_stream_writable.js":461}],466:[function(require,module,exports){
+},{"./lib/_stream_writable.js":462}],467:[function(require,module,exports){
(function (process,global){
/**
* Copyright (c) 2014, Facebook, Inc.
@@ -70670,7 +69732,7 @@ module.exports = require("./lib/_stream_writable.js")
);
}).call(this,require('_process'),typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {})
-},{"_process":448}],467:[function(require,module,exports){
+},{"_process":449}],468:[function(require,module,exports){
(function (Buffer){
/*
CryptoJS v3.1.2
@@ -70884,7 +69946,7 @@ function ripemd160 (message) {
module.exports = ripemd160
}).call(this,require("buffer").Buffer)
-},{"buffer":90}],468:[function(require,module,exports){
+},{"buffer":90}],469:[function(require,module,exports){
(function (Buffer){
const assert = require('assert')
/**
@@ -71117,7 +70179,7 @@ function toBuffer (v) {
}
}).call(this,require("buffer").Buffer)
-},{"assert":55,"buffer":90}],469:[function(require,module,exports){
+},{"assert":55,"buffer":90}],470:[function(require,module,exports){
(function (Buffer){
var pbkdf2Sync = require('pbkdf2').pbkdf2Sync
@@ -71300,11 +70362,11 @@ function arraycopy (src, srcPos, dest, destPos, length) {
module.exports = scrypt
}).call(this,require("buffer").Buffer)
-},{"buffer":90,"pbkdf2":446}],470:[function(require,module,exports){
+},{"buffer":90,"pbkdf2":447}],471:[function(require,module,exports){
'use strict'
module.exports = require('./lib')(require('./lib/elliptic'))
-},{"./lib":473,"./lib/elliptic":472}],471:[function(require,module,exports){
+},{"./lib":474,"./lib/elliptic":473}],472:[function(require,module,exports){
(function (Buffer){
'use strict'
var toString = Object.prototype.toString
@@ -71352,7 +70414,7 @@ exports.isNumberInInterval = function (number, x, y, message) {
}
}).call(this,{"isBuffer":require("../../is-buffer/index.js")})
-},{"../../is-buffer/index.js":435}],472:[function(require,module,exports){
+},{"../../is-buffer/index.js":436}],473:[function(require,module,exports){
(function (Buffer){
'use strict'
var createHash = require('create-hash')
@@ -71603,7 +70665,7 @@ exports.ecdhUnsafe = function (publicKey, privateKey, compressed) {
}
}).call(this,require("buffer").Buffer)
-},{"../messages.json":474,"bn.js":60,"buffer":90,"create-hash":388,"elliptic":403}],473:[function(require,module,exports){
+},{"../messages.json":475,"bn.js":60,"buffer":90,"create-hash":389,"elliptic":404}],474:[function(require,module,exports){
(function (Buffer){
'use strict'
var bip66 = require('bip66')
@@ -71923,7 +70985,7 @@ module.exports = function (secp256k1) {
}
}).call(this,require("buffer").Buffer)
-},{"./assert":471,"./messages.json":474,"bip66":59,"buffer":90}],474:[function(require,module,exports){
+},{"./assert":472,"./messages.json":475,"bip66":59,"buffer":90}],475:[function(require,module,exports){
module.exports={
"COMPRESSED_TYPE_INVALID": "compressed should be a boolean",
"EC_PRIVATE_KEY_TYPE_INVALID": "private key should be a Buffer",
@@ -71961,7 +71023,7 @@ module.exports={
"TWEAK_LENGTH_INVALID": "tweak length is invalid"
}
-},{}],475:[function(require,module,exports){
+},{}],476:[function(require,module,exports){
(function (Buffer){
// prototype class for hash functions
function Hash (blockSize, finalSize) {
@@ -72034,7 +71096,7 @@ Hash.prototype._update = function () {
module.exports = Hash
}).call(this,require("buffer").Buffer)
-},{"buffer":90}],476:[function(require,module,exports){
+},{"buffer":90}],477:[function(require,module,exports){
var exports = module.exports = function SHA (algorithm) {
algorithm = algorithm.toLowerCase()
@@ -72051,7 +71113,7 @@ exports.sha256 = require('./sha256')
exports.sha384 = require('./sha384')
exports.sha512 = require('./sha512')
-},{"./sha":477,"./sha1":478,"./sha224":479,"./sha256":480,"./sha384":481,"./sha512":482}],477:[function(require,module,exports){
+},{"./sha":478,"./sha1":479,"./sha224":480,"./sha256":481,"./sha384":482,"./sha512":483}],478:[function(require,module,exports){
(function (Buffer){
/*
* A JavaScript implementation of the Secure Hash Algorithm, SHA-0, as defined
@@ -72148,7 +71210,7 @@ Sha.prototype._hash = function () {
module.exports = Sha
}).call(this,require("buffer").Buffer)
-},{"./hash":475,"buffer":90,"inherits":434}],478:[function(require,module,exports){
+},{"./hash":476,"buffer":90,"inherits":435}],479:[function(require,module,exports){
(function (Buffer){
/*
* A JavaScript implementation of the Secure Hash Algorithm, SHA-1, as defined
@@ -72250,7 +71312,7 @@ Sha1.prototype._hash = function () {
module.exports = Sha1
}).call(this,require("buffer").Buffer)
-},{"./hash":475,"buffer":90,"inherits":434}],479:[function(require,module,exports){
+},{"./hash":476,"buffer":90,"inherits":435}],480:[function(require,module,exports){
(function (Buffer){
/**
* A JavaScript implementation of the Secure Hash Algorithm, SHA-256, as defined
@@ -72306,7 +71368,7 @@ Sha224.prototype._hash = function () {
module.exports = Sha224
}).call(this,require("buffer").Buffer)
-},{"./hash":475,"./sha256":480,"buffer":90,"inherits":434}],480:[function(require,module,exports){
+},{"./hash":476,"./sha256":481,"buffer":90,"inherits":435}],481:[function(require,module,exports){
(function (Buffer){
/**
* A JavaScript implementation of the Secure Hash Algorithm, SHA-256, as defined
@@ -72444,7 +71506,7 @@ Sha256.prototype._hash = function () {
module.exports = Sha256
}).call(this,require("buffer").Buffer)
-},{"./hash":475,"buffer":90,"inherits":434}],481:[function(require,module,exports){
+},{"./hash":476,"buffer":90,"inherits":435}],482:[function(require,module,exports){
(function (Buffer){
var inherits = require('inherits')
var SHA512 = require('./sha512')
@@ -72504,7 +71566,7 @@ Sha384.prototype._hash = function () {
module.exports = Sha384
}).call(this,require("buffer").Buffer)
-},{"./hash":475,"./sha512":482,"buffer":90,"inherits":434}],482:[function(require,module,exports){
+},{"./hash":476,"./sha512":483,"buffer":90,"inherits":435}],483:[function(require,module,exports){
(function (Buffer){
var inherits = require('inherits')
var Hash = require('./hash')
@@ -72767,7 +71829,7 @@ Sha512.prototype._hash = function () {
module.exports = Sha512
}).call(this,require("buffer").Buffer)
-},{"./hash":475,"buffer":90,"inherits":434}],483:[function(require,module,exports){
+},{"./hash":476,"buffer":90,"inherits":435}],484:[function(require,module,exports){
// Copyright Joyent, Inc. and other Node contributors.
//
// Permission is hereby granted, free of charge, to any person obtaining a
@@ -72896,7 +71958,7 @@ Stream.prototype.pipe = function(dest, options) {
return dest;
};
-},{"events":424,"inherits":434,"readable-stream/duplex.js":456,"readable-stream/passthrough.js":462,"readable-stream/readable.js":463,"readable-stream/transform.js":464,"readable-stream/writable.js":465}],484:[function(require,module,exports){
+},{"events":425,"inherits":435,"readable-stream/duplex.js":457,"readable-stream/passthrough.js":463,"readable-stream/readable.js":464,"readable-stream/transform.js":465,"readable-stream/writable.js":466}],485:[function(require,module,exports){
// Copyright Joyent, Inc. and other Node contributors.
//
// Permission is hereby granted, free of charge, to any person obtaining a
@@ -73119,7 +72181,7 @@ function base64DetectIncompleteChar(buffer) {
this.charLength = this.charReceived ? 3 : 0;
}
-},{"buffer":90}],485:[function(require,module,exports){
+},{"buffer":90}],486:[function(require,module,exports){
(function (global){
/**
@@ -73190,14 +72252,14 @@ function config (name) {
}
}).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {})
-},{}],486:[function(require,module,exports){
+},{}],487:[function(require,module,exports){
module.exports = function isBuffer(arg) {
return arg && typeof arg === 'object'
&& typeof arg.copy === 'function'
&& typeof arg.fill === 'function'
&& typeof arg.readUInt8 === 'function';
}
-},{}],487:[function(require,module,exports){
+},{}],488:[function(require,module,exports){
(function (process,global){
// Copyright Joyent, Inc. and other Node contributors.
//
@@ -73787,7 +72849,7 @@ function hasOwnProperty(obj, prop) {
}
}).call(this,require('_process'),typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {})
-},{"./support/isBuffer":486,"_process":448,"inherits":434}],488:[function(require,module,exports){
+},{"./support/isBuffer":487,"_process":449,"inherits":435}],489:[function(require,module,exports){
(function (global){
var rng;
@@ -73822,7 +72884,7 @@ module.exports = rng;
}).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {})
-},{}],489:[function(require,module,exports){
+},{}],490:[function(require,module,exports){
// uuid.js
//
// Copyright (c) 2010-2012 Robert Kieffer
@@ -74007,7 +73069,7 @@ uuid.unparse = unparse;
module.exports = uuid;
-},{"./rng":488}],490:[function(require,module,exports){
+},{"./rng":489}],491:[function(require,module,exports){
var indexOf = require('indexof');
var Object_keys = function (obj) {
@@ -74147,4 +73209,4 @@ exports.createContext = Script.createContext = function (context) {
return copy;
};
-},{"indexof":433}]},{},[27]);
+},{"indexof":434}]},{},[27]);
diff --git a/dist/js/etherwallet-static.min.js b/dist/js/etherwallet-static.min.js
index a10e0b8439..fdb4eeffff 100644
--- a/dist/js/etherwallet-static.min.js
+++ b/dist/js/etherwallet-static.min.js
@@ -1 +1 @@
-!function(){function t(t){for(var e=0;e>19^t^t>>8,(a[3]>>>0)/(1<<31>>>0)}function o(){var t=Math.floor(360*e()),o=60*e()+40+"%",r=25*(e()+e()+e()+e())+"%",i="hsl("+t+","+o+","+r+")";return i}function r(t){for(var o=t,r=t,i=Math.ceil(o/2),n=o-i,a=[],s=0;sdocument.documentElement.clientHeight,this.scrollbarWidth=this.measureScrollbar()},this.setScrollbar=function(){var t=window.getComputedStyle(document.body),e=parseInt(t.paddingRight,10);this.bodyIsOverflowing&&(document.body.style.paddingRight=e+this.scrollbarWidth+"px")},this.resetScrollbar=function(){document.body.style.paddingRight=""},this.measureScrollbar=function(){var t=document.createElement("div");t.className="modal-scrollbar-measure",document.body.appendChild(t);var e=t.offsetWidth-t.clientWidth;return document.body.removeChild(t),e},this.addClass=function(t,e){t.classList?t.classList.add(e):t.className+=" "+e},this.removeClass=function(t,e){t.classList?t.classList.remove(e):t.className=t.className.replace(e,"").replace(/^\s+|\s+$/g,"")}}};var o=document.querySelectorAll(".modal"),r=o.length,i=0;for(i;io;o++){var i=this.data.charCodeAt(o);i>65536?(e[0]=240|(1835008&i)>>>18,e[1]=128|(258048&i)>>>12,e[2]=128|(4032&i)>>>6,e[3]=128|63&i):i>2048?(e[0]=224|(61440&i)>>>12,e[1]=128|(4032&i)>>>6,e[2]=128|63&i):i>128?(e[0]=192|(1984&i)>>>6,e[1]=128|63&i):e[0]=i,this.parsedData=this.parsedData.concat(e)}this.parsedData.length!=this.data.length&&(this.parsedData.unshift(191),this.parsedData.unshift(187),this.parsedData.unshift(239))}function e(t,e){this.typeNumber=t,this.errorCorrectLevel=e,this.modules=null,this.moduleCount=0,this.dataCache=null,this.dataList=[]}function o(t,e){if(void 0==t.length)throw new Error(t.length+"/"+e);for(var o=0;o=i;i++){var a=0;switch(e){case u.L:a=m[i][0];break;case u.M:a=m[i][1];break;case u.Q:a=m[i][2];break;case u.H:a=m[i][3]}if(a>=r)break;o++}if(o>m.length)throw new Error("Too long data");return o}function l(t){var e=encodeURI(t).toString().replace(/\%[0-9a-fA-F]{2}/g,"a");return e.length+(e.length!=t?3:0)}t.prototype={getLength:function(){return this.parsedData.length},write:function(t){for(var e=0,o=this.parsedData.length;o>e;e++)t.put(this.parsedData[e],8)}},e.prototype={addData:function(e){var o=new t(e);this.dataList.push(o),this.dataCache=null},isDark:function(t,e){if(0>t||this.moduleCount<=t||0>e||this.moduleCount<=e)throw new Error(t+","+e);return this.modules[t][e]},getModuleCount:function(){return this.moduleCount},make:function(){this.makeImpl(!1,this.getBestMaskPattern())},makeImpl:function(t,o){this.moduleCount=4*this.typeNumber+17,this.modules=new Array(this.moduleCount);for(var r=0;r=7&&this.setupTypeNumber(t),null==this.dataCache&&(this.dataCache=e.createData(this.typeNumber,this.errorCorrectLevel,this.dataList)),this.mapData(this.dataCache,o)},setupPositionProbePattern:function(t,e){for(var o=-1;7>=o;o++)if(!(-1>=t+o||this.moduleCount<=t+o))for(var r=-1;7>=r;r++)-1>=e+r||this.moduleCount<=e+r||(this.modules[t+o][e+r]=o>=0&&6>=o&&(0==r||6==r)||r>=0&&6>=r&&(0==o||6==o)||o>=2&&4>=o&&r>=2&&4>=r)},getBestMaskPattern:function(){for(var t=0,e=0,o=0;8>o;o++){this.makeImpl(!0,o);var r=c.getLostPoint(this);(0==o||t>r)&&(t=r,e=o)}return e},createMovieClip:function(t,e,o){var r=t.createEmptyMovieClip(e,o),i=1;this.make();for(var n=0;n=n;n++)for(var a=-2;2>=a;a++)this.modules[r+n][i+a]=-2==n||2==n||-2==a||2==a||0==n&&0==a}},setupTypeNumber:function(t){for(var e=c.getBCHTypeNumber(this.typeNumber),o=0;18>o;o++){var r=!t&&1==(1&e>>o);this.modules[Math.floor(o/3)][o%3+this.moduleCount-8-3]=r}for(var o=0;18>o;o++){var r=!t&&1==(1&e>>o);this.modules[o%3+this.moduleCount-8-3][Math.floor(o/3)]=r}},setupTypeInfo:function(t,e){for(var o=this.errorCorrectLevel<<3|e,r=c.getBCHTypeInfo(o),i=0;15>i;i++){var n=!t&&1==(1&r>>i);6>i?this.modules[i][8]=n:8>i?this.modules[i+1][8]=n:this.modules[this.moduleCount-15+i][8]=n}for(var i=0;15>i;i++){var n=!t&&1==(1&r>>i);8>i?this.modules[8][this.moduleCount-i-1]=n:9>i?this.modules[8][15-i-1+1]=n:this.modules[8][15-i-1]=n}this.modules[this.moduleCount-8][8]=!t},mapData:function(t,e){for(var o=-1,r=this.moduleCount-1,i=7,n=0,a=this.moduleCount-1;a>0;a-=2)for(6==a&&a--;;){for(var s=0;2>s;s++)if(null==this.modules[r][a-s]){var l=!1;n>>i));var h=c.getMask(e,r,a-s);h&&(l=!l),this.modules[r][a-s]=l,i--,-1==i&&(n++,i=7)}if(r+=o,0>r||this.moduleCount<=r){r-=o,o=-o;break}}}},e.PAD0=236,e.PAD1=17,e.createData=function(t,o,n){for(var a=r.getRSBlocks(t,o),s=new i,l=0;l8*u)throw new Error("code length overflow. ("+s.getLengthInBits()+">"+8*u+")");for(s.getLengthInBits()+4<=8*u&&s.put(0,4);0!=s.getLengthInBits()%8;)s.putBit(!1);for(;!(s.getLengthInBits()>=8*u)&&(s.put(e.PAD0,8),!(s.getLengthInBits()>=8*u));)s.put(e.PAD1,8);return e.createBytes(s,a)},e.createBytes=function(t,e){for(var r=0,i=0,n=0,a=new Array(e.length),s=new Array(e.length),l=0;l=0?m.get(p):0}}for(var v=0,d=0;dd;d++)for(var l=0;ld;d++)for(var l=0;l=0;)e^=c.G15<=0;)e^=c.G18<>>=1;return e},getPatternPosition:function(t){return c.PATTERN_POSITION_TABLE[t-1]},getMask:function(t,e,o){switch(t){case d.PATTERN000:return 0==(e+o)%2;case d.PATTERN001:return 0==e%2;case d.PATTERN010:return 0==o%3;case d.PATTERN011:return 0==(e+o)%3;case d.PATTERN100:return 0==(Math.floor(e/2)+Math.floor(o/3))%2;case d.PATTERN101:return 0==e*o%2+e*o%3;case d.PATTERN110:return 0==(e*o%2+e*o%3)%2;case d.PATTERN111:return 0==(e*o%3+(e+o)%2)%2;default:throw new Error("bad maskPattern:"+t)}},getErrorCorrectPolynomial:function(t){for(var e=new o([1],0),r=0;t>r;r++)e=e.multiply(new o([1,g.gexp(r)],0));return e},getLengthInBits:function(t,e){if(e>=1&&10>e)switch(t){case h.MODE_NUMBER:return 10;case h.MODE_ALPHA_NUM:return 9;case h.MODE_8BIT_BYTE:return 8;case h.MODE_KANJI:return 8;default:throw new Error("mode:"+t)}else if(27>e)switch(t){case h.MODE_NUMBER:return 12;case h.MODE_ALPHA_NUM:return 11;case h.MODE_8BIT_BYTE:return 16;case h.MODE_KANJI:return 10;default:throw new Error("mode:"+t)}else{if(!(41>e))throw new Error("type:"+e);switch(t){case h.MODE_NUMBER:return 14;case h.MODE_ALPHA_NUM:return 13;case h.MODE_8BIT_BYTE:return 16;case h.MODE_KANJI:return 12;default:throw new Error("mode:"+t)}}},getLostPoint:function(t){for(var e=t.getModuleCount(),o=0,r=0;e>r;r++)for(var i=0;e>i;i++){for(var n=0,a=t.isDark(r,i),s=-1;1>=s;s++)if(!(0>r+s||r+s>=e))for(var l=-1;1>=l;l++)0>i+l||i+l>=e||(0!=s||0!=l)&&a==t.isDark(r+s,i+l)&&n++;n>5&&(o+=3+n-5)}for(var r=0;e-1>r;r++)for(var i=0;e-1>i;i++){var h=0;t.isDark(r,i)&&h++,t.isDark(r+1,i)&&h++,t.isDark(r,i+1)&&h++,t.isDark(r+1,i+1)&&h++,(0==h||4==h)&&(o+=3)}for(var r=0;e>r;r++)for(var i=0;e-6>i;i++)t.isDark(r,i)&&!t.isDark(r,i+1)&&t.isDark(r,i+2)&&t.isDark(r,i+3)&&t.isDark(r,i+4)&&!t.isDark(r,i+5)&&t.isDark(r,i+6)&&(o+=40);for(var i=0;e>i;i++)for(var r=0;e-6>r;r++)t.isDark(r,i)&&!t.isDark(r+1,i)&&t.isDark(r+2,i)&&t.isDark(r+3,i)&&t.isDark(r+4,i)&&!t.isDark(r+5,i)&&t.isDark(r+6,i)&&(o+=40);for(var u=0,i=0;e>i;i++)for(var r=0;e>r;r++)t.isDark(r,i)&&u++;var d=Math.abs(100*u/e/e-50)/5;return o+=10*d}},g={glog:function(t){if(1>t)throw new Error("glog("+t+")");return g.LOG_TABLE[t]},gexp:function(t){for(;0>t;)t+=255;for(;t>=256;)t-=255;return g.EXP_TABLE[t]},EXP_TABLE:new Array(256),LOG_TABLE:new Array(256)},f=0;8>f;f++)g.EXP_TABLE[f]=1<f;f++)g.EXP_TABLE[f]=g.EXP_TABLE[f-4]^g.EXP_TABLE[f-5]^g.EXP_TABLE[f-6]^g.EXP_TABLE[f-8];for(var f=0;255>f;f++)g.LOG_TABLE[g.EXP_TABLE[f]]=f;o.prototype={get:function(t){return this.num[t]},getLength:function(){return this.num.length},multiply:function(t){for(var e=new Array(this.getLength()+t.getLength()-1),r=0;ra;a++)for(var s=o[3*a+0],l=o[3*a+1],h=o[3*a+2],u=0;s>u;u++)n.push(new r(l,h));return n},r.getRsBlockTable=function(t,e){switch(e){case u.L:return r.RS_BLOCK_TABLE[4*(t-1)+0];case u.M:return r.RS_BLOCK_TABLE[4*(t-1)+1];case u.Q:return r.RS_BLOCK_TABLE[4*(t-1)+2];case u.H:return r.RS_BLOCK_TABLE[4*(t-1)+3];default:return}},i.prototype={get:function(t){var e=Math.floor(t/8);return 1==(1&this.buffer[e]>>>7-t%8)},put:function(t,e){for(var o=0;e>o;o++)this.putBit(1==(1&t>>>e-o-1))},getLengthInBits:function(){return this.length},putBit:function(t){var e=Math.floor(this.length/8);this.buffer.length<=e&&this.buffer.push(0),t&&(this.buffer[e]|=128>>>this.length%8),this.length++}};var m=[[17,14,11,7],[32,26,20,14],[53,42,32,24],[78,62,46,34],[106,84,60,44],[134,106,74,58],[154,122,86,64],[192,152,108,84],[230,180,130,98],[271,213,151,119],[321,251,177,137],[367,287,203,155],[425,331,241,177],[458,362,258,194],[520,412,292,220],[586,450,322,250],[644,504,364,280],[718,560,394,310],[792,624,442,338],[858,666,482,382],[929,711,509,403],[1003,779,565,439],[1091,857,611,461],[1171,911,661,511],[1273,997,715,535],[1367,1059,751,593],[1465,1125,805,625],[1528,1190,868,658],[1628,1264,908,698],[1732,1370,982,742],[1840,1452,1030,790],[1952,1538,1112,842],[2068,1628,1168,898],[2188,1722,1228,958],[2303,1809,1283,983],[2431,1911,1351,1051],[2563,1989,1423,1093],[2699,2099,1499,1139],[2809,2213,1579,1219],[2953,2331,1663,1273]],p=function(){var t=function(t,e){this._el=t,this._htOption=e};return t.prototype.draw=function(t){function e(t,e){var o=document.createElementNS("http://www.w3.org/2000/svg",t);for(var r in e)e.hasOwnProperty(r)&&o.setAttribute(r,e[r]);return o}var o=this._htOption,r=this._el,i=t.getModuleCount();Math.floor(o.width/i),Math.floor(o.height/i),this.clear();var n=e("svg",{viewBox:"0 0 "+String(i)+" "+String(i),width:"100%",height:"100%",fill:o.colorLight});n.setAttributeNS("http://www.w3.org/2000/xmlns/","xmlns:xlink","http://www.w3.org/1999/xlink"),r.appendChild(n),n.appendChild(e("rect",{fill:o.colorDark,width:"1",height:"1",id:"template"}));for(var a=0;i>a;a++)for(var s=0;i>s;s++)if(t.isDark(a,s)){var l=e("use",{x:String(a),y:String(s)});l.setAttributeNS("http://www.w3.org/1999/xlink","href","#template"),n.appendChild(l)}},t.prototype.clear=function(){for(;this._el.hasChildNodes();)this._el.removeChild(this._el.lastChild)},t}(),v="svg"===document.documentElement.tagName.toLowerCase(),y=v?p:n()?function(){function t(){this._elImage.src=this._elCanvas.toDataURL("image/png"),this._elImage.style.display="block",this._elCanvas.style.display="none"}function e(t,e){var o=this;if(o._fFail=e,o._fSuccess=t,null===o._bSupportDataURI){var r=document.createElement("img"),i=function(){o._bSupportDataURI=!1,o._fFail&&_fFail.call(o)},n=function(){o._bSupportDataURI=!0,o._fSuccess&&o._fSuccess.call(o)};return r.onabort=i,r.onerror=i,r.onload=n,void(r.src="data:image/gif;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAHElEQVQI12P4//8/w38GIAXDIBKE0DHxgljNBAAO9TXL0Y4OHwAAAABJRU5ErkJggg==")}o._bSupportDataURI===!0&&o._fSuccess?o._fSuccess.call(o):o._bSupportDataURI===!1&&o._fFail&&o._fFail.call(o)}if(this._android&&this._android<=2.1){var o=1/window.devicePixelRatio,r=CanvasRenderingContext2D.prototype.drawImage;CanvasRenderingContext2D.prototype.drawImage=function(t,e,i,n,a,s,l,h){if("nodeName"in t&&/img/i.test(t.nodeName))for(var u=arguments.length-1;u>=1;u--)arguments[u]=arguments[u]*o;else"undefined"==typeof h&&(arguments[1]*=o,arguments[2]*=o,arguments[3]*=o,arguments[4]*=o);r.apply(this,arguments)}}var i=function(t,e){this._bIsPainted=!1,this._android=a(),this._htOption=e,this._elCanvas=document.createElement("canvas"),this._elCanvas.width=e.width,this._elCanvas.height=e.height,t.appendChild(this._elCanvas),this._el=t,this._oContext=this._elCanvas.getContext("2d"),this._bIsPainted=!1,this._elImage=document.createElement("img"),this._elImage.style.display="none",this._el.appendChild(this._elImage),this._bSupportDataURI=null};return i.prototype.draw=function(t){var e=this._elImage,o=this._oContext,r=this._htOption,i=t.getModuleCount(),n=r.width/i,a=r.height/i,s=Math.round(n),l=Math.round(a);e.style.display="none",this.clear();for(var h=0;i>h;h++)for(var u=0;i>u;u++){var d=t.isDark(h,u),c=u*n,g=h*a;o.strokeStyle=d?r.colorDark:r.colorLight,o.lineWidth=1,o.fillStyle=d?r.colorDark:r.colorLight,o.fillRect(c,g,n,a),o.strokeRect(Math.floor(c)+.5,Math.floor(g)+.5,s,l),o.strokeRect(Math.ceil(c)-.5,Math.ceil(g)-.5,s,l)}this._bIsPainted=!0},i.prototype.makeImage=function(){this._bIsPainted&&e.call(this,t)},i.prototype.isPainted=function(){return this._bIsPainted},i.prototype.clear=function(){this._oContext.clearRect(0,0,this._elCanvas.width,this._elCanvas.height),this._bIsPainted=!1},i.prototype.round=function(t){return t?Math.floor(1e3*t)/1e3:t},i}():function(){var t=function(t,e){this._el=t,this._htOption=e};return t.prototype.draw=function(t){for(var e=this._htOption,o=this._el,r=t.getModuleCount(),i=Math.floor(e.width/r),n=Math.floor(e.height/r),a=['
"),o.innerHTML=a.join("");var h=o.childNodes[0],u=(e.width-h.offsetWidth)/2,d=(e.height-h.offsetHeight)/2;u>0&&d>0&&(h.style.margin=d+"px "+u+"px")},t.prototype.clear=function(){this._el.innerHTML=""},t}();QRCode=function(t,e){if(this._htOption={width:256,height:256,typeNumber:4,colorDark:"#000000",colorLight:"#ffffff",correctLevel:u.H},"string"==typeof e&&(e={text:e}),e)for(var o in e)this._htOption[o]=e[o];"string"==typeof t&&(t=document.getElementById(t)),this._android=a(),this._el=t,this._oQRCode=null,this._oDrawing=new y(this._el,this._htOption),this._htOption.text&&this.makeCode(this._htOption.text)},QRCode.prototype.makeCode=function(t){this._oQRCode=new e(s(t,this._htOption.correctLevel),this._htOption.correctLevel),this._oQRCode.addData(t),this._oQRCode.make(),this._el.title=t,this._oDrawing.draw(this._oQRCode),this.makeImage()},QRCode.prototype.makeImage=function(){"function"==typeof this._oDrawing.makeImage&&(!this._android||this._android>=3)&&this._oDrawing.makeImage()},QRCode.prototype.clear=function(){this._oDrawing.clear()},QRCode.CorrectLevel=u}();
\ No newline at end of file