tech(lodash): upraded lodash to 4.15.0, closes #6021
|
|
@ -15,6 +15,7 @@
|
|||
|
||||
### Breaking changes
|
||||
* **SystemD**: Change systemd description, closes [#5971](https://github.com/grafana/grafana/pull/5971)
|
||||
* **lodash upgrade**: Upgraded lodash from 2.4.2 to 4.15.0, this contains a number of breaking changes that could effect plugins. closes [#6021](https://github.com/grafana/grafana/pull/6021)
|
||||
|
||||
### Bugfixes
|
||||
* **Table Panel**: Fixed problem when switching to Mixed datasource in metrics tab, fixes [#5999](https://github.com/grafana/grafana/pull/5999)
|
||||
|
|
|
|||
|
|
@ -14,7 +14,7 @@
|
|||
],
|
||||
"dependencies": {
|
||||
"jquery": "3.1.0",
|
||||
"lodash": "~4.15.0",
|
||||
"lodash": "3.10.1",
|
||||
"angular": "1.5.3",
|
||||
"angular-route": "1.5.3",
|
||||
"angular-mocks": "1.5.3",
|
||||
|
|
|
|||
|
|
@ -54,9 +54,9 @@ export class QueryPart {
|
|||
// handle optional parameters
|
||||
// if string contains ',' and next param is optional, split and update both
|
||||
if (this.hasMultipleParamsInString(strValue, index)) {
|
||||
_.each(strValue.split(','), function(partVal: string, idx) {
|
||||
_.each(strValue.split(','), (partVal, idx) => {
|
||||
this.updateParam(partVal.trim(), idx);
|
||||
}, this);
|
||||
});
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@ function () {
|
|||
return variable === value ? alt : value;
|
||||
},
|
||||
toggleInOut: function(array,value) {
|
||||
if(_.contains(array,value)) {
|
||||
if(_.includes(array,value)) {
|
||||
array = _.without(array,value);
|
||||
} else {
|
||||
array.push(value);
|
||||
|
|
|
|||
|
|
@ -13,6 +13,9 @@ define([
|
|||
module.service('timeSrv', function($rootScope, $timeout, $routeParams, timer) {
|
||||
var self = this;
|
||||
|
||||
// default time
|
||||
this.time = {from: '6h', to: 'now'};
|
||||
|
||||
$rootScope.$on('zoom-out', function(e, factor) { self.zoomOut(factor); });
|
||||
|
||||
this.init = function(dashboard) {
|
||||
|
|
|
|||
|
|
@ -47,7 +47,7 @@ function (_) {
|
|||
var start = self.datasource.convertToCloudWatchTime(from, false);
|
||||
var end = self.datasource.convertToCloudWatchTime(to, true);
|
||||
_.chain(alarms)
|
||||
.pluck('MetricAlarms')
|
||||
.map('MetricAlarms')
|
||||
.flatten()
|
||||
.each(function(alarm) {
|
||||
if (!alarm) {
|
||||
|
|
@ -70,7 +70,8 @@ function (_) {
|
|||
|
||||
d.resolve(eventList);
|
||||
});
|
||||
});
|
||||
})
|
||||
.value();
|
||||
});
|
||||
|
||||
return d.promise;
|
||||
|
|
@ -91,7 +92,7 @@ function (_) {
|
|||
if (!_.isEmpty(dimensions) && !isSameDimensions) {
|
||||
return false;
|
||||
}
|
||||
if (!_.isEmpty(statistics) && !_.contains(statistics, alarm.Statistic)) {
|
||||
if (!_.isEmpty(statistics) && !_.includes(statistics, alarm.Statistic)) {
|
||||
return false;
|
||||
}
|
||||
if (!_.isNaN(period) && alarm.Period !== period) {
|
||||
|
|
|
|||
|
|
@ -23,7 +23,7 @@ function (angular, _, moment, dateMath, CloudWatchAnnotationQuery) {
|
|||
|
||||
var queries = [];
|
||||
options = angular.copy(options);
|
||||
_.each(options.targets, _.bind(function(target) {
|
||||
_.each(options.targets, function(target) {
|
||||
if (target.hide || !target.namespace || !target.metricName || _.isEmpty(target.statistics)) {
|
||||
return;
|
||||
}
|
||||
|
|
@ -43,7 +43,7 @@ function (angular, _, moment, dateMath, CloudWatchAnnotationQuery) {
|
|||
target.period = query.period;
|
||||
|
||||
queries.push(query);
|
||||
}, this));
|
||||
}.bind(this));
|
||||
|
||||
// No valid targets, return the empty result to save a round trip.
|
||||
if (_.isEmpty(queries)) {
|
||||
|
|
@ -54,7 +54,7 @@ function (angular, _, moment, dateMath, CloudWatchAnnotationQuery) {
|
|||
|
||||
var allQueryPromise = _.map(queries, function(query) {
|
||||
return this.performTimeSeriesQuery(query, start, end);
|
||||
}, this);
|
||||
}.bind(this));
|
||||
|
||||
return $q.all(allQueryPromise).then(function(allResponse) {
|
||||
var result = [];
|
||||
|
|
@ -64,7 +64,7 @@ function (angular, _, moment, dateMath, CloudWatchAnnotationQuery) {
|
|||
result = result.concat(metrics);
|
||||
});
|
||||
|
||||
return { data: result };
|
||||
return {data: result};
|
||||
});
|
||||
};
|
||||
|
||||
|
|
@ -125,12 +125,12 @@ function (angular, _, moment, dateMath, CloudWatchAnnotationQuery) {
|
|||
|
||||
return this.awsRequest(request).then(function(result) {
|
||||
return _.chain(result.Metrics)
|
||||
.pluck('Dimensions')
|
||||
.map('Dimensions')
|
||||
.flatten()
|
||||
.filter(function(dimension) {
|
||||
return dimension !== null && dimension.Name === dimensionKey;
|
||||
})
|
||||
.pluck('Value')
|
||||
.map('Value')
|
||||
.uniq()
|
||||
.sortBy()
|
||||
.map(function(value) {
|
||||
|
|
@ -295,15 +295,19 @@ function (angular, _, moment, dateMath, CloudWatchAnnotationQuery) {
|
|||
namespace: templateSrv.replace(options.namespace, scopedVars),
|
||||
metric: templateSrv.replace(options.metricName, scopedVars),
|
||||
};
|
||||
|
||||
var aliasDimensions = {};
|
||||
|
||||
_.each(_.keys(options.dimensions), function(origKey) {
|
||||
var key = templateSrv.replace(origKey, scopedVars);
|
||||
var value = templateSrv.replace(options.dimensions[origKey], scopedVars);
|
||||
aliasDimensions[key] = value;
|
||||
});
|
||||
|
||||
_.extend(aliasData, aliasDimensions);
|
||||
|
||||
var periodMs = options.period * 1000;
|
||||
|
||||
return _.map(options.statistics, function(stat) {
|
||||
var dps = [];
|
||||
var lastTimestamp = null;
|
||||
|
|
@ -318,7 +322,8 @@ function (angular, _, moment, dateMath, CloudWatchAnnotationQuery) {
|
|||
}
|
||||
lastTimestamp = timestamp;
|
||||
dps.push([dp[stat], timestamp]);
|
||||
});
|
||||
})
|
||||
.value();
|
||||
|
||||
aliasData.stat = stat;
|
||||
var seriesName = aliasPattern.replace(aliasRegex, function(match, g1) {
|
||||
|
|
|
|||
|
|
@ -688,7 +688,7 @@ function (_, $) {
|
|||
|
||||
return "'" + value + "'";
|
||||
|
||||
}, this);
|
||||
}.bind(this));
|
||||
|
||||
if (metricExp) {
|
||||
parameters.unshift(metricExp);
|
||||
|
|
@ -711,7 +711,7 @@ function (_, $) {
|
|||
if (this._hasMultipleParamsInString(strValue, index)) {
|
||||
_.each(strValue.split(','), function(partVal, idx) {
|
||||
this.updateParam(partVal.trim(), idx);
|
||||
}, this);
|
||||
}.bind(this));
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -25,7 +25,7 @@ class MixedDatasource {
|
|||
});
|
||||
|
||||
return this.$q.all(promises).then(function(results) {
|
||||
return { data: _.flatten(_.pluck(results, 'data')) };
|
||||
return { data: _.flatten(_.map(results, 'data')) };
|
||||
});
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -58,7 +58,6 @@ export function PrometheusDatasource(instanceSettings, $q, backendSrv, templateS
|
|||
return escapedValues.join('|');
|
||||
};
|
||||
|
||||
var HTTP_REQUEST_ABORTED = -1;
|
||||
// Called once per panel (graph)
|
||||
this.query = function(options) {
|
||||
var self = this;
|
||||
|
|
@ -69,10 +68,12 @@ export function PrometheusDatasource(instanceSettings, $q, backendSrv, templateS
|
|||
var activeTargets = [];
|
||||
|
||||
options = _.clone(options);
|
||||
_.each(options.targets, _.bind(function(target) {
|
||||
|
||||
_.each(options.targets, target => {
|
||||
if (!target.expr || target.hide) {
|
||||
return;
|
||||
}
|
||||
|
||||
activeTargets.push(target);
|
||||
|
||||
var query: any = {};
|
||||
|
|
@ -90,7 +91,7 @@ export function PrometheusDatasource(instanceSettings, $q, backendSrv, templateS
|
|||
}
|
||||
|
||||
queries.push(query);
|
||||
}, this));
|
||||
});
|
||||
|
||||
// No valid targets, return the empty result to save a round trip.
|
||||
if (_.isEmpty(queries)) {
|
||||
|
|
@ -99,9 +100,9 @@ export function PrometheusDatasource(instanceSettings, $q, backendSrv, templateS
|
|||
return d.promise;
|
||||
}
|
||||
|
||||
var allQueryPromise = _.map(queries, _.bind(function(query) {
|
||||
var allQueryPromise = _.map(queries, query => {
|
||||
return this.performTimeSeriesQuery(query, start, end);
|
||||
}, this));
|
||||
});
|
||||
|
||||
return $q.all(allQueryPromise).then(function(allResponse) {
|
||||
var result = [];
|
||||
|
|
@ -183,7 +184,7 @@ export function PrometheusDatasource(instanceSettings, $q, backendSrv, templateS
|
|||
_.each(results.data.data.result, function(series) {
|
||||
var tags = _.chain(series.metric)
|
||||
.filter(function(v, k) {
|
||||
return _.contains(tagKeys, k);
|
||||
return _.includes(tagKeys, k);
|
||||
}).value();
|
||||
|
||||
_.each(series.values, function(value) {
|
||||
|
|
@ -273,7 +274,7 @@ export function PrometheusDatasource(instanceSettings, $q, backendSrv, templateS
|
|||
this.getOriginalMetricName = function(labelData) {
|
||||
var metricName = labelData.__name__ || '';
|
||||
delete labelData.__name__;
|
||||
var labelPart = _.map(_.pairs(labelData), function(label) {
|
||||
var labelPart = _.map(_.toPairs(labelData), function(label) {
|
||||
return label[0] + '="' + label[1] + '"';
|
||||
}).join(',');
|
||||
return metricName + '{' + labelPart + '}';
|
||||
|
|
|
|||
|
|
@ -1,14 +1,30 @@
|
|||
{
|
||||
"name": "lodash",
|
||||
"main": "lodash.js",
|
||||
"ignore": [
|
||||
".*",
|
||||
"*.custom.*",
|
||||
"*.log",
|
||||
"*.map",
|
||||
"*.md",
|
||||
"lodash.src.js",
|
||||
"component.json",
|
||||
"package.json",
|
||||
"doc",
|
||||
"node_modules",
|
||||
"perf",
|
||||
"test",
|
||||
"vendor"
|
||||
],
|
||||
"homepage": "https://github.com/lodash/lodash",
|
||||
"version": "4.15.0",
|
||||
"_release": "4.15.0",
|
||||
"version": "3.10.1",
|
||||
"_release": "3.10.1",
|
||||
"_resolution": {
|
||||
"type": "version",
|
||||
"tag": "4.15.0",
|
||||
"commit": "e538563f2cf208980f24cda75ba21fabf939a604"
|
||||
"tag": "3.10.1",
|
||||
"commit": "ef20b4290cc4fe7551c82a552ea7ffa76548eec8"
|
||||
},
|
||||
"_source": "https://github.com/lodash/lodash.git",
|
||||
"_target": "~4.15.0",
|
||||
"_target": "3.10.1",
|
||||
"_originalSource": "lodash"
|
||||
}
|
||||
|
|
@ -1,12 +0,0 @@
|
|||
# This file is for unifying the coding style for different editors and IDEs
|
||||
# editorconfig.org
|
||||
|
||||
root = true
|
||||
|
||||
[*]
|
||||
charset = utf-8
|
||||
end_of_line = lf
|
||||
indent_size = 2
|
||||
indent_style = space
|
||||
insert_final_newline = true
|
||||
trim_trailing_whitespace = true
|
||||
|
|
@ -1 +0,0 @@
|
|||
* text=auto
|
||||
|
|
@ -1,78 +0,0 @@
|
|||
# Contributing to Lodash
|
||||
|
||||
Contributions are always welcome. Before contributing please read the
|
||||
[code of conduct](https://jquery.org/conduct/) &
|
||||
[search the issue tracker](https://github.com/lodash/lodash/issues); your issue
|
||||
may have already been discussed or fixed in `master`. To contribute,
|
||||
[fork](https://help.github.com/articles/fork-a-repo/) Lodash, commit your changes,
|
||||
& [send a pull request](https://help.github.com/articles/using-pull-requests/).
|
||||
|
||||
## Feature Requests
|
||||
|
||||
Feature requests should be submitted in the
|
||||
[issue tracker](https://github.com/lodash/lodash/issues), with a description of
|
||||
the expected behavior & use case, where they’ll remain closed until sufficient interest,
|
||||
[e.g. :+1: reactions](https://help.github.com/articles/about-discussions-in-issues-and-pull-requests/),
|
||||
has been [shown by the community](https://github.com/lodash/lodash/issues?q=label%3A%22votes+needed%22+sort%3Areactions-%2B1-desc).
|
||||
Before submitting a request, please search for similar ones in the
|
||||
[closed issues](https://github.com/lodash/lodash/issues?q=is%3Aissue+is%3Aclosed+label%3Aenhancement).
|
||||
|
||||
## Pull Requests
|
||||
|
||||
For additions or bug fixes you should only need to modify `lodash.js`. Include
|
||||
updated unit tests in the `test` directory as part of your pull request. Don’t
|
||||
worry about regenerating the `dist/` or `doc/` files.
|
||||
|
||||
Before running the unit tests you’ll need to install, `npm i`,
|
||||
[development dependencies](https://docs.npmjs.com/files/package.json#devdependencies).
|
||||
Run unit tests from the command-line via `npm test`, or open `test/index.html` &
|
||||
`test/fp.html` in a web browser. The [Backbone](http://backbonejs.org/) &
|
||||
[Underscore](http://underscorejs.org/) test suites are included as well.
|
||||
|
||||
## Contributor License Agreement
|
||||
|
||||
Lodash is a member of the [jQuery Foundation](https://jquery.org/).
|
||||
As such, we request that all contributors sign the jQuery Foundation
|
||||
[contributor license agreement (CLA)](https://contribute.jquery.org/CLA/).
|
||||
|
||||
For more information about CLAs, please check out Alex Russell’s excellent post,
|
||||
[“Why Do I Need to Sign This?”](https://infrequently.org/2008/06/why-do-i-need-to-sign-this/).
|
||||
|
||||
## Coding Guidelines
|
||||
|
||||
In addition to the following guidelines, please follow the conventions already
|
||||
established in the code.
|
||||
|
||||
- **Spacing**:<br>
|
||||
Use two spaces for indentation. No tabs.
|
||||
|
||||
- **Naming**:<br>
|
||||
Keep variable & method names concise & descriptive.<br>
|
||||
Variable names `index`, `array`, & `iteratee` are preferable to
|
||||
`i`, `arr`, & `fn`.
|
||||
|
||||
- **Quotes**:<br>
|
||||
Single-quoted strings are preferred to double-quoted strings; however,
|
||||
please use a double-quoted string if the value contains a single-quote
|
||||
character to avoid unnecessary escaping.
|
||||
|
||||
- **Comments**:<br>
|
||||
Please use single-line comments to annotate significant additions, &
|
||||
[JSDoc-style](http://www.2ality.com/2011/08/jsdoc-intro.html) comments for
|
||||
functions.
|
||||
|
||||
Guidelines are enforced using [JSCS](https://www.npmjs.com/package/jscs):
|
||||
```bash
|
||||
$ npm run style
|
||||
```
|
||||
|
||||
## Tips
|
||||
|
||||
You can opt-in to a pre-push git hook by adding an `.opt-in` file to the root of
|
||||
the project containing:
|
||||
```txt
|
||||
pre-push
|
||||
```
|
||||
|
||||
With that, when you `git push`, the pre-push git hook will trigger and execute
|
||||
`npm run validate`.
|
||||
|
|
@ -1,4 +0,0 @@
|
|||
.DS_Store
|
||||
*.log
|
||||
doc/*.html
|
||||
node_modules
|
||||
|
|
@ -1,97 +0,0 @@
|
|||
{
|
||||
"maxErrors": "2000",
|
||||
"maximumLineLength": {
|
||||
"value": 180,
|
||||
"allExcept": ["comments", "functionSignature", "regex"]
|
||||
},
|
||||
"requireCurlyBraces": [
|
||||
"if",
|
||||
"else",
|
||||
"for",
|
||||
"while",
|
||||
"do",
|
||||
"try",
|
||||
"catch"
|
||||
],
|
||||
"requireOperatorBeforeLineBreak": [
|
||||
"=",
|
||||
"+",
|
||||
"-",
|
||||
"/",
|
||||
"*",
|
||||
"==",
|
||||
"===",
|
||||
"!=",
|
||||
"!==",
|
||||
">",
|
||||
">=",
|
||||
"<",
|
||||
"<="
|
||||
],
|
||||
"requireSpaceAfterKeywords": [
|
||||
"if",
|
||||
"else",
|
||||
"for",
|
||||
"while",
|
||||
"do",
|
||||
"switch",
|
||||
"return",
|
||||
"try",
|
||||
"catch"
|
||||
],
|
||||
"requireSpaceBeforeBinaryOperators": [
|
||||
"=", "+=", "-=", "*=", "/=", "%=", "<<=", ">>=", ">>>=",
|
||||
"&=", "|=", "^=", "+=",
|
||||
|
||||
"+", "-", "*", "/", "%", "<<", ">>", ">>>", "&",
|
||||
"|", "^", "&&", "||", "===", "==", ">=",
|
||||
"<=", "<", ">", "!=", "!=="
|
||||
],
|
||||
"requireSpacesInFunctionExpression": {
|
||||
"beforeOpeningCurlyBrace": true
|
||||
},
|
||||
"requireCamelCaseOrUpperCaseIdentifiers": true,
|
||||
"requireDotNotation": { "allExcept": ["keywords"] },
|
||||
"requireEarlyReturn": true,
|
||||
"requireLineFeedAtFileEnd": true,
|
||||
"requireSemicolons": true,
|
||||
"requireSpaceAfterBinaryOperators": true,
|
||||
"requireSpacesInConditionalExpression": true,
|
||||
"requireSpaceBeforeObjectValues": true,
|
||||
"requireSpaceBeforeBlockStatements": true,
|
||||
"requireSpacesInForStatement": true,
|
||||
|
||||
"validateIndentation": 2,
|
||||
"validateParameterSeparator": ", ",
|
||||
"validateQuoteMarks": { "mark": "'", "escape": true },
|
||||
|
||||
"disallowSpacesInAnonymousFunctionExpression": {
|
||||
"beforeOpeningRoundBrace": true
|
||||
},
|
||||
"disallowSpacesInFunctionDeclaration": {
|
||||
"beforeOpeningRoundBrace": true
|
||||
},
|
||||
"disallowSpacesInFunctionExpression": {
|
||||
"beforeOpeningRoundBrace": true
|
||||
},
|
||||
"disallowKeywords": ["with"],
|
||||
"disallowMixedSpacesAndTabs": true,
|
||||
"disallowMultipleLineBreaks": true,
|
||||
"disallowNewlineBeforeBlockStatements": true,
|
||||
"disallowSpaceAfterObjectKeys": true,
|
||||
"disallowSpaceAfterPrefixUnaryOperators": true,
|
||||
"disallowSpacesInCallExpression": true,
|
||||
"disallowSpacesInsideArrayBrackets": true,
|
||||
"disallowSpacesInsideParentheses": true,
|
||||
"disallowTrailingWhitespace": true,
|
||||
"disallowUnusedVariables": true,
|
||||
|
||||
"jsDoc": {
|
||||
"checkRedundantAccess": true,
|
||||
"checkTypes": true,
|
||||
"requireNewlineAfterDescription": true,
|
||||
"requireParamDescription": true,
|
||||
"requireParamTypes": true,
|
||||
"requireReturnTypes": true
|
||||
}
|
||||
}
|
||||
|
|
@ -1,11 +0,0 @@
|
|||
'use strict';
|
||||
|
||||
delete global['__core-js_shared__'];
|
||||
|
||||
var _ = require('./lodash.js'),
|
||||
globals = require('lodash-doc-globals');
|
||||
|
||||
module.exports = {
|
||||
'babel': false,
|
||||
'globals': _.assign({ '_': _ }, globals)
|
||||
};
|
||||
|
|
@ -1,105 +0,0 @@
|
|||
language: node_js
|
||||
sudo: false
|
||||
node_js:
|
||||
- "6"
|
||||
cache:
|
||||
directories:
|
||||
- $HOME/.npm
|
||||
- travis_phantomjs
|
||||
env:
|
||||
global:
|
||||
- BIN="node" ISTANBUL=false OPTION=""
|
||||
- SAUCE_LABS=false SAUCE_USERNAME="lodash"
|
||||
- secure: "tg1JFsIFnxzLaTboFPOnm+aJCuMm5+JdhLlESlqg9x3fwro++7KCnwHKLNovhchaPe4otC43ZMB/nfWhDnDm11dKbm/V6HlTkED+dadTsaLxVDg6J+7yK41QhokBPJOxLV78iDaNaAQVYEirAgZ0yn8kFubxmNKV+bpCGQNc9yU="
|
||||
matrix:
|
||||
-
|
||||
- BIN="phantomjs"
|
||||
- ISTANBUL=true
|
||||
- SAUCE_LABS=true
|
||||
matrix:
|
||||
include:
|
||||
- node_js: "0.10"
|
||||
env:
|
||||
- node_js: "0.12"
|
||||
env:
|
||||
- node_js: "4"
|
||||
env:
|
||||
- node_js: "5"
|
||||
env:
|
||||
git:
|
||||
depth: 10
|
||||
branches:
|
||||
only:
|
||||
- master
|
||||
notifications:
|
||||
webhooks:
|
||||
urls:
|
||||
- https://webhooks.gitter.im/e/4aab6358b0e9aed0b628
|
||||
on_success: change
|
||||
on_failure: always
|
||||
before_install:
|
||||
# Upgrade PhantomJS to v2.1.1.
|
||||
- "export PHANTOMJS_VERSION=2.1.1"
|
||||
- "export PATH=$PWD/travis_phantomjs/phantomjs-$PHANTOMJS_VERSION-linux-x86_64/bin:$PATH"
|
||||
- "if [ $(phantomjs --version) != $PHANTOMJS_VERSION ]; then rm -rf $PWD/travis_phantomjs; mkdir -p $PWD/travis_phantomjs; fi"
|
||||
- "if [ $(phantomjs --version) != $PHANTOMJS_VERSION ]; then wget https://github.com/Medium/phantomjs/releases/download/v$PHANTOMJS_VERSION/phantomjs-$PHANTOMJS_VERSION-linux-x86_64.tar.bz2 -O $PWD/travis_phantomjs/phantomjs-$PHANTOMJS_VERSION-linux-x86_64.tar.bz2; fi"
|
||||
- "if [ $(phantomjs --version) != $PHANTOMJS_VERSION ]; then tar -xvf $PWD/travis_phantomjs/phantomjs-$PHANTOMJS_VERSION-linux-x86_64.tar.bz2 -C $PWD/travis_phantomjs; fi"
|
||||
- "phantomjs --version"
|
||||
|
||||
# Use exact Node version.
|
||||
- "nvm use $TRAVIS_NODE_VERSION"
|
||||
|
||||
# Setup npm.
|
||||
- "npm set loglevel error"
|
||||
- "npm set progress false"
|
||||
- "npm i -g npm@\"^2.0.0\""
|
||||
|
||||
# Remove code skipped on the coverage run.
|
||||
- |
|
||||
PATTERN[0]="|\s*if\s*\(isHostObject\b[\s\S]+?\}(?=\n)|"
|
||||
PATTERN[1]="|\s*if\s*\(enumerate\b[\s\S]+?\};\s*\}|"
|
||||
PATTERN[2]="|\s*while\s*\([^)]+\)\s*\{\s*iteratee\(index\);\s*\}|"
|
||||
PATTERN[3]="|\s*else\s*\{\s*assocSet\(data\b[\s\S]+?\}|"
|
||||
PATTERN[4]="|\bcase\s+(?:dataView|promise|set|map|weakMap)CtorString:.+|g"
|
||||
PATTERN[5]="|\bindex,\s*iterable\)\s*===\s*false\)[^}]+?(break;)|"
|
||||
PATTERN[6]="|\s*if\s*\(\!lodashFunc\)\s*\{\s*return;\s*\}|"
|
||||
PATTERN[7]="|\s*define\([\s\S]+?\);|"
|
||||
PATTERN[8]="|\s*root\._\s*=\s*_;|"
|
||||
|
||||
if [ $ISTANBUL == true ]; then
|
||||
set -e
|
||||
for PTRN in ${PATTERN[@]}; do
|
||||
node ./test/remove.js "$PTRN" ./lodash.js
|
||||
done
|
||||
fi
|
||||
|
||||
# Use lodash-cli from GitHub.
|
||||
- "git clone --depth=10 --branch=master git://github.com/lodash/lodash-cli ./node_modules/lodash-cli"
|
||||
- "mkdir -p ./node_modules/lodash-cli/node_modules/lodash && cd $_ && cp ../../../../lodash.js ./lodash.js && cp ../../../../package.json ./package.json"
|
||||
- "cd ../../ && npm i --production && cd ../../"
|
||||
|
||||
script:
|
||||
# Detect code coverage.
|
||||
- "[ $ISTANBUL == false ] || istanbul cover -x \"**/vendor/**\" --report lcovonly ./test/test.js -- ./lodash.js"
|
||||
- "[ $ISTANBUL == false ] || [ $TRAVIS_SECURE_ENV_VARS == false ] || (cat ./coverage/lcov.info | coveralls) || true"
|
||||
- "[ $ISTANBUL == false ] || [ $TRAVIS_SECURE_ENV_VARS == false ] || (cat ./coverage/coverage.json | codecov) || true"
|
||||
|
||||
# Test in Node.js and PhantomJS.
|
||||
- "[ $ISTANBUL == true ] || node ./node_modules/lodash-cli/bin/lodash -o ./dist/lodash.js"
|
||||
- "[ $ISTANBUL == true ] || (node ./node_modules/lodash-cli/bin/lodash modularize exports=node -o ./ && node ./node_modules/lodash-cli/bin/lodash -d -o ./lodash.js)"
|
||||
- "[ $ISTANBUL == true ] || [ $SAUCE_LABS == true ] || cd ./test"
|
||||
- "[ $ISTANBUL == true ] || [ $SAUCE_LABS == true ] || $BIN $OPTION ./test.js ../lodash.js"
|
||||
- "[ $ISTANBUL == true ] || [ $SAUCE_LABS == true ] || [ $TRAVIS_SECURE_ENV_VARS == false ] || $BIN $OPTION ./test.js ../dist/lodash.min.js"
|
||||
|
||||
# Test in Sauce Labs.
|
||||
- "[ $SAUCE_LABS == false ] || node ./node_modules/lodash-cli/bin/lodash core -o ./dist/lodash.core.js"
|
||||
- "[ $SAUCE_LABS == false ] || npm run build"
|
||||
- "[ $SAUCE_LABS == false ] || $BIN ./test/saucelabs.js name=\"lodash tests\" runner=\"test/index.html?build=../dist/lodash.js&noglobals=true\" tags=\"development\""
|
||||
- "[ $SAUCE_LABS == false ] || $BIN ./test/saucelabs.js name=\"lodash tests\" runner=\"test/index.html?build=../dist/lodash.min.js&noglobals=true\" tags=\"production\""
|
||||
- "[ $SAUCE_LABS == false ] || $BIN ./test/saucelabs.js name=\"lodash-fp tests\" runner=\"test/fp.html?noglobals=true\" tags=\"development\""
|
||||
- "[ $SAUCE_LABS == false ] || $BIN ./test/saucelabs.js name=\"underscore tests\" runner=\"test/underscore.html?build=../dist/lodash.js\" tags=\"development,underscore\""
|
||||
- "[ $SAUCE_LABS == false ] || $BIN ./test/saucelabs.js name=\"underscore tests\" runner=\"test/underscore.html?build=../dist/lodash.min.js\" tags=\"production,underscore\""
|
||||
- "[ $SAUCE_LABS == false ] || $BIN ./test/saucelabs.js name=\"backbone tests\" runner=\"test/backbone.html?build=../dist/lodash.js\" tags=\"development,backbone\""
|
||||
- "[ $SAUCE_LABS == false ] || $BIN ./test/saucelabs.js name=\"backbone tests\" runner=\"test/backbone.html?build=../dist/lodash.min.js\" tags=\"production,backbone\""
|
||||
- "[ $SAUCE_LABS == false ] || $BIN ./test/saucelabs.js name=\"backbone tests\" runner=\"test/backbone.html?build=../dist/lodash.core.js\" tags=\"development,backbone\""
|
||||
- "[ $SAUCE_LABS == false ] || $BIN ./test/saucelabs.js name=\"backbone tests\" runner=\"test/backbone.html?build=../dist/lodash.core.min.js\" tags=\"production,backbone\""
|
||||
|
|
@ -1,17 +1,7 @@
|
|||
Copyright jQuery Foundation and other contributors <https://jquery.org/>
|
||||
|
||||
Based on Underscore.js, copyright Jeremy Ashkenas,
|
||||
Copyright 2012-2015 The Dojo Foundation <http://dojofoundation.org/>
|
||||
Based on Underscore.js, copyright 2009-2015 Jeremy Ashkenas,
|
||||
DocumentCloud and Investigative Reporters & Editors <http://underscorejs.org/>
|
||||
|
||||
This software consists of voluntary contributions made by many
|
||||
individuals. For exact contribution history, see the revision history
|
||||
available at https://github.com/lodash/lodash
|
||||
|
||||
The following license applies to all parts of this software except as
|
||||
documented below:
|
||||
|
||||
====
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining
|
||||
a copy of this software and associated documentation files (the
|
||||
"Software"), to deal in the Software without restriction, including
|
||||
|
|
@ -30,18 +20,3 @@ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
|||
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
|
||||
====
|
||||
|
||||
Copyright and related rights for sample code are waived via CC0. Sample
|
||||
code is defined as all source code displayed within the prose of the
|
||||
documentation.
|
||||
|
||||
CC0: http://creativecommons.org/publicdomain/zero/1.0/
|
||||
|
||||
====
|
||||
|
||||
Files located in the node_modules and vendor directories are externally
|
||||
maintained libraries used by this software which have their own
|
||||
licenses; we recommend you read them, as their terms may differ from the
|
||||
terms above.
|
||||
|
|
|
|||
|
|
@ -1,46 +0,0 @@
|
|||
# lodash v4.15.0
|
||||
|
||||
[Site](https://lodash.com/) |
|
||||
[Docs](https://lodash.com/docs) |
|
||||
[FP Guide](https://github.com/lodash/lodash/wiki/FP-Guide) |
|
||||
[Contributing](https://github.com/lodash/lodash/blob/master/.github/CONTRIBUTING.md) |
|
||||
[Wiki](https://github.com/lodash/lodash/wiki "Changelog, Roadmap, etc.") |
|
||||
[Code of Conduct](https://jquery.org/conduct/) |
|
||||
[Twitter](https://twitter.com/bestiejs) |
|
||||
[Chat](https://gitter.im/lodash/lodash)
|
||||
|
||||
The [Lodash](https://lodash.com/) library exported as a [UMD](https://github.com/umdjs/umd) module.
|
||||
|
||||
Generated using [lodash-cli](https://www.npmjs.com/package/lodash-cli):
|
||||
```bash
|
||||
$ npm run build
|
||||
$ lodash -o ./dist/lodash.js
|
||||
$ lodash core -o ./dist/lodash.core.js
|
||||
```
|
||||
|
||||
## Download
|
||||
|
||||
Lodash is released under the [MIT license](https://raw.githubusercontent.com/lodash/lodash/4.15.0/LICENSE) & supports [modern environments](#support).<br>
|
||||
Review the [build differences](https://github.com/lodash/lodash/wiki/build-differences) & pick one that’s right for you.
|
||||
|
||||
* [Core build](https://raw.githubusercontent.com/lodash/lodash/4.15.0/dist/lodash.core.js) ([~4 kB gzipped](https://raw.githubusercontent.com/lodash/lodash/4.15.0/dist/lodash.core.min.js))
|
||||
* [Full build](https://raw.githubusercontent.com/lodash/lodash/4.15.0/dist/lodash.js) ([~23 kB gzipped](https://raw.githubusercontent.com/lodash/lodash/4.15.0/dist/lodash.min.js))
|
||||
* [CDN copies](https://www.jsdelivr.com/projects/lodash)
|
||||
|
||||
## Why Lodash?
|
||||
|
||||
Lodash makes JavaScript easier by taking the hassle out of working with arrays,<br>
|
||||
numbers, objects, strings, etc. Lodash’s modular methods are great for:
|
||||
|
||||
* Iterating arrays, objects, & strings
|
||||
* Manipulating & testing values
|
||||
* Creating composite functions
|
||||
|
||||
## Module Formats
|
||||
|
||||
Lodash is available in a [variety of builds](https://lodash.com/custom-builds) & module formats.
|
||||
|
||||
* [lodash](https://www.npmjs.com/package/lodash) & [per method packages](https://www.npmjs.com/browse/keyword/lodash-modularized)
|
||||
* [lodash-es](https://www.npmjs.com/package/lodash-es), [babel-plugin-lodash](https://www.npmjs.com/package/babel-plugin-lodash), & [lodash-webpack-plugin](https://www.npmjs.com/package/lodash-webpack-plugin)
|
||||
* [lodash/fp](https://github.com/lodash/lodash/tree/npm/fp)
|
||||
* [lodash-amd](https://www.npmjs.com/package/lodash-amd)
|
||||
|
|
@ -0,0 +1,19 @@
|
|||
{
|
||||
"name": "lodash",
|
||||
"main": "lodash.js",
|
||||
"ignore": [
|
||||
".*",
|
||||
"*.custom.*",
|
||||
"*.log",
|
||||
"*.map",
|
||||
"*.md",
|
||||
"lodash.src.js",
|
||||
"component.json",
|
||||
"package.json",
|
||||
"doc",
|
||||
"node_modules",
|
||||
"perf",
|
||||
"test",
|
||||
"vendor"
|
||||
]
|
||||
}
|
||||
|
|
@ -1,28 +0,0 @@
|
|||
/**
|
||||
* @license
|
||||
* lodash (Custom Build) /license | Underscore.js 1.8.3 underscorejs.org/LICENSE
|
||||
* Build: `lodash core -o ./dist/lodash.core.js`
|
||||
*/
|
||||
;(function(){function n(n,t){return n.push.apply(n,t),n}function t(n){return function(t){return null==t?Z:t[n]}}function r(n,t,r,e,u){return u(n,function(n,u,o){r=e?(e=false,n):t(r,n,u,o)}),r}function e(n,t){return d(t,function(t){return n[t]})}function u(n){return n instanceof o?n:new o(n)}function o(n,t){this.__wrapped__=n,this.__actions__=[],this.__chain__=!!t}function i(n,t,r,e){return n===Z||J(n,an[r])&&!ln.call(e,r)?t:n}function c(n){return V(n)?vn(n):{}}function f(n,t,r){if(typeof n!="function")throw new TypeError("Expected a function");
|
||||
return setTimeout(function(){n.apply(Z,r)},t)}function a(n,t){var r=true;return jn(n,function(n,e,u){return r=!!t(n,e,u)}),r}function l(n,t,r){for(var e=-1,u=n.length;++e<u;){var o=n[e],i=t(o);if(null!=i&&(c===Z?i===i:r(i,c)))var c=i,f=o}return f}function p(n,t){var r=[];return jn(n,function(n,e,u){t(n,e,u)&&r.push(n)}),r}function s(t,r,e,u,o){var i=-1,c=t.length;for(e||(e=D),o||(o=[]);++i<c;){var f=t[i];0<r&&e(f)?1<r?s(f,r-1,e,u,o):n(o,f):u||(o[o.length]=f)}return o}function h(n,t){return n&&dn(n,t,Rn);
|
||||
}function v(n,t){return p(t,function(t){return U(n[t])})}function b(n,t){return n>t}function y(n,t,r,e,u){return n===t||(null==n||null==t||!V(n)&&!H(t)?n!==n&&t!==t:g(n,t,y,r,e,u))}function g(n,t,r,e,u,o){var i=wn(n),c=wn(t),f="[object Array]",a="[object Array]";i||(f=sn.call(n),f="[object Arguments]"==f?"[object Object]":f),c||(a=sn.call(t),a="[object Arguments]"==a?"[object Object]":a);var l="[object Object]"==f&&true,c="[object Object]"==a&&true,a=f==a;o||(o=[]);var p=On(o,function(t){return t[0]==n;
|
||||
}),s=On(o,function(n){return n[0]==t});if(p&&s)return p[1]==t;if(o.push([n,t]),o.push([t,n]),a&&!l){if(i)r=B(n,t,r,e,u,o);else n:{switch(f){case"[object Boolean]":case"[object Date]":case"[object Number]":r=J(+n,+t);break n;case"[object Error]":r=n.name==t.name&&n.message==t.message;break n;case"[object RegExp]":case"[object String]":r=n==t+"";break n}r=false}return o.pop(),r}return 2&u||(i=l&&ln.call(n,"__wrapped__"),f=c&&ln.call(t,"__wrapped__"),!i&&!f)?!!a&&(r=R(n,t,r,e,u,o),o.pop(),r):(i=i?n.value():n,
|
||||
f=f?t.value():t,r=r(i,f,e,u,o),o.pop(),r)}function _(n){return typeof n=="function"?n:null==n?X:(typeof n=="object"?m:t)(n)}function j(n,t){return n<t}function d(n,t){var r=-1,e=P(n)?Array(n.length):[];return jn(n,function(n,u,o){e[++r]=t(n,u,o)}),e}function m(n){var t=gn(n);return function(r){var e=t.length;if(null==r)return!e;for(r=Object(r);e--;){var u=t[e];if(!(u in r&&y(n[u],r[u],Z,3)))return false}return true}}function O(n,t){return n=Object(n),C(t,function(t,r){return r in n&&(t[r]=n[r]),t},{})}function x(n){
|
||||
var t;return t=_n(t===Z?n.length-1:t,0),function(){for(var r=arguments,e=-1,u=_n(r.length-t,0),o=Array(u);++e<u;)o[e]=r[t+e];for(e=-1,u=Array(t+1);++e<t;)u[e]=r[e];return u[t]=o,n.apply(this,u)}}function A(n,t,r){var e=-1,u=n.length;for(0>t&&(t=-t>u?0:u+t),r=r>u?u:r,0>r&&(r+=u),u=t>r?0:r-t>>>0,t>>>=0,r=Array(u);++e<u;)r[e]=n[e+t];return r}function E(n){return A(n,0,n.length)}function w(n,t){var r;return jn(n,function(n,e,u){return r=t(n,e,u),!r}),!!r}function k(t,r){return C(r,function(t,r){return r.func.apply(r.thisArg,n([t],r.args));
|
||||
},t)}function N(n,t,r,e){r||(r={});for(var u=-1,o=t.length;++u<o;){var i=t[u],c=e?e(r[i],n[i],i,r,n):Z,f=r,a=i,i=c===Z?n[i]:c,c=f[a];ln.call(f,a)&&J(c,i)&&(i!==Z||a in f)||(f[a]=i)}return r}function S(n){return x(function(t,r){var e=-1,u=r.length,o=1<u?r[u-1]:Z,o=3<n.length&&typeof o=="function"?(u--,o):Z;for(t=Object(t);++e<u;){var i=r[e];i&&n(t,i,e,o)}return t})}function T(n){return function(){var t=arguments,r=c(n.prototype),t=n.apply(r,t);return V(t)?t:r}}function F(n,t,r){function e(){for(var o=-1,i=arguments.length,c=-1,f=r.length,a=Array(f+i),l=this&&this!==un&&this instanceof e?u:n;++c<f;)a[c]=r[c];
|
||||
for(;i--;)a[c++]=arguments[++o];return l.apply(t,a)}if(typeof n!="function")throw new TypeError("Expected a function");var u=T(n);return e}function B(n,t,r,e,u,o){var i=n.length,c=t.length;if(i!=c&&!(2&u&&c>i))return false;for(var c=-1,f=true,a=1&u?[]:Z;++c<i;){var l=n[c],p=t[c];if(void 0!==Z){f=false;break}if(a){if(!w(t,function(n,t){if(!$(a,t)&&(l===n||r(l,n,e,u,o)))return a.push(t)})){f=false;break}}else if(l!==p&&!r(l,p,e,u,o)){f=false;break}}return f}function R(n,t,r,e,u,o){var i=2&u,c=Rn(n),f=c.length,a=Rn(t).length;
|
||||
if(f!=a&&!i)return false;for(var l=f;l--;){var p=c[l];if(!(i?p in t:ln.call(t,p)))return false}for(a=true;++l<f;){var p=c[l],s=n[p],h=t[p];if(void 0!==Z||s!==h&&!r(s,h,e,u,o)){a=false;break}i||(i="constructor"==p)}return a&&!i&&(r=n.constructor,e=t.constructor,r!=e&&"constructor"in n&&"constructor"in t&&!(typeof r=="function"&&r instanceof r&&typeof e=="function"&&e instanceof e)&&(a=false)),a}function D(n){return wn(n)||M(n)}function I(n){var t=[];if(null!=n)for(var r in Object(n))t.push(r);return t}function q(n){
|
||||
return n&&n.length?n[0]:Z}function $(n,t,r){var e=n?n.length:0;r=typeof r=="number"?0>r?_n(e+r,0):r:0,r=(r||0)-1;for(var u=t===t;++r<e;){var o=n[r];if(u?o===t:o!==o)return r}return-1}function z(n,t){return jn(n,_(t))}function C(n,t,e){return r(n,_(t),e,3>arguments.length,jn)}function G(n,t){var r;if(typeof t!="function")throw new TypeError("Expected a function");return n=kn(n),function(){return 0<--n&&(r=t.apply(this,arguments)),1>=n&&(t=Z),r}}function J(n,t){return n===t||n!==n&&t!==t}function M(n){
|
||||
return H(n)&&P(n)&&ln.call(n,"callee")&&(!bn.call(n,"callee")||"[object Arguments]"==sn.call(n))}function P(n){var t;return(t=null!=n)&&(t=n.length,t=typeof t=="number"&&-1<t&&0==t%1&&9007199254740991>=t),t&&!U(n)}function U(n){return n=V(n)?sn.call(n):"","[object Function]"==n||"[object GeneratorFunction]"==n}function V(n){var t=typeof n;return!!n&&("object"==t||"function"==t)}function H(n){return!!n&&typeof n=="object"}function K(n){return typeof n=="number"||H(n)&&"[object Number]"==sn.call(n)}
|
||||
function L(n){return typeof n=="string"||!wn(n)&&H(n)&&"[object String]"==sn.call(n)}function Q(n){return typeof n=="string"?n:null==n?"":n+""}function W(n){return n?e(n,Rn(n)):[]}function X(n){return n}function Y(t,r,e){var u=Rn(r),o=v(r,u);null!=e||V(r)&&(o.length||!u.length)||(e=r,r=t,t=this,o=v(r,Rn(r)));var i=!(V(e)&&"chain"in e&&!e.chain),c=U(t);return jn(o,function(e){var u=r[e];t[e]=u,c&&(t.prototype[e]=function(){var r=this.__chain__;if(i||r){var e=t(this.__wrapped__);return(e.__actions__=E(this.__actions__)).push({
|
||||
func:u,args:arguments,thisArg:t}),e.__chain__=r,e}return u.apply(t,n([this.value()],arguments))})}),t}var Z,nn=1/0,tn=/[&<>"'`]/g,rn=RegExp(tn.source),en=typeof self=="object"&&self&&self.Object===Object&&self,un=typeof global=="object"&&global&&global.Object===Object&&global||en||Function("return this")(),on=(en=typeof exports=="object"&&exports&&!exports.nodeType&&exports)&&typeof module=="object"&&module&&!module.nodeType&&module,cn=function(n){return function(t){return null==n?Z:n[t]}}({"&":"&",
|
||||
"<":"<",">":">",'"':""","'":"'","`":"`"}),fn=Array.prototype,an=Object.prototype,ln=an.hasOwnProperty,pn=0,sn=an.toString,hn=un._,vn=Object.create,bn=an.propertyIsEnumerable,yn=un.isFinite,gn=function(n,t){return function(r){return n(t(r))}}(Object.keys,Object),_n=Math.max;o.prototype=c(u.prototype),o.prototype.constructor=o;var jn=function(n,t){return function(r,e){if(null==r)return r;if(!P(r))return n(r,e);for(var u=r.length,o=t?u:-1,i=Object(r);(t?o--:++o<u)&&false!==e(i[o],o,i););
|
||||
return r}}(h),dn=function(n){return function(t,r,e){var u=-1,o=Object(t);e=e(t);for(var i=e.length;i--;){var c=e[n?i:++u];if(false===r(o[c],c,o))break}return t}}(),mn=String,On=function(n){return function(t,r,e){var u=Object(t);if(!P(t)){var o=_(r);t=Rn(t),r=function(n){return o(u[n],n,u)}}return r=n(t,r,e),-1<r?u[o?t[r]:r]:Z}}(function(n,t,r){var e=n?n.length:0;if(!e)return-1;r=null==r?0:kn(r),0>r&&(r=_n(e+r,0));n:{for(t=_(t),e=n.length,r+=-1;++r<e;)if(t(n[r],r,n)){n=r;break n}n=-1}return n}),xn=x(function(n,t,r){
|
||||
return F(n,t,r)}),An=x(function(n,t){return f(n,1,t)}),En=x(function(n,t,r){return f(n,Nn(t)||0,r)}),wn=Array.isArray,kn=Number,Nn=Number,Sn=S(function(n,t){N(t,gn(t),n)}),Tn=S(function(n,t){N(t,I(t),n)}),Fn=S(function(n,t,r,e){N(t,Dn(t),n,e)}),Bn=x(function(n){return n.push(Z,i),Fn.apply(Z,n)}),Rn=gn,Dn=I,In=x(function(n,t){return null==n?{}:O(n,d(s(t,1),mn))});u.assignIn=Tn,u.before=G,u.bind=xn,u.chain=function(n){return n=u(n),n.__chain__=true,n},u.compact=function(n){return p(n,Boolean)},u.concat=function(){
|
||||
for(var t=arguments.length,r=Array(t?t-1:0),e=arguments[0],u=t;u--;)r[u-1]=arguments[u];return t?n(wn(e)?E(e):[e],s(r,1)):[]},u.create=function(n,t){var r=c(n);return t?Sn(r,t):r},u.defaults=Bn,u.defer=An,u.delay=En,u.filter=function(n,t){return p(n,_(t))},u.flatten=function(n){return n&&n.length?s(n,1):[]},u.flattenDeep=function(n){return n&&n.length?s(n,nn):[]},u.iteratee=_,u.keys=Rn,u.map=function(n,t){return d(n,_(t))},u.matches=function(n){return m(Sn({},n))},u.mixin=Y,u.negate=function(n){if(typeof n!="function")throw new TypeError("Expected a function");
|
||||
return function(){return!n.apply(this,arguments)}},u.once=function(n){return G(2,n)},u.pick=In,u.slice=function(n,t,r){var e=n?n.length:0;return r=r===Z?e:+r,e?A(n,null==t?0:+t,r):[]},u.sortBy=function(n,r){var e=0;return r=_(r),d(d(n,function(n,t,u){return{value:n,index:e++,criteria:r(n,t,u)}}).sort(function(n,t){var r;n:{r=n.criteria;var e=t.criteria;if(r!==e){var u=r!==Z,o=null===r,i=r===r,c=e!==Z,f=null===e,a=e===e;if(!f&&r>e||o&&c&&a||!u&&a||!i){r=1;break n}if(!o&&r<e||f&&u&&i||!c&&i||!a){r=-1;
|
||||
break n}}r=0}return r||n.index-t.index}),t("value"))},u.tap=function(n,t){return t(n),n},u.thru=function(n,t){return t(n)},u.toArray=function(n){return P(n)?n.length?E(n):[]:W(n)},u.values=W,u.extend=Tn,Y(u,u),u.clone=function(n){return V(n)?wn(n)?E(n):N(n,gn(n)):n},u.escape=function(n){return(n=Q(n))&&rn.test(n)?n.replace(tn,cn):n},u.every=function(n,t,r){return t=r?Z:t,a(n,_(t))},u.find=On,u.forEach=z,u.has=function(n,t){return null!=n&&ln.call(n,t)},u.head=q,u.identity=X,u.indexOf=$,u.isArguments=M,
|
||||
u.isArray=wn,u.isBoolean=function(n){return true===n||false===n||H(n)&&"[object Boolean]"==sn.call(n)},u.isDate=function(n){return H(n)&&"[object Date]"==sn.call(n)},u.isEmpty=function(n){return P(n)&&(wn(n)||L(n)||U(n.splice)||M(n))?!n.length:!gn(n).length},u.isEqual=function(n,t){return y(n,t)},u.isFinite=function(n){return typeof n=="number"&&yn(n)},u.isFunction=U,u.isNaN=function(n){return K(n)&&n!=+n},u.isNull=function(n){return null===n},u.isNumber=K,u.isObject=V,u.isRegExp=function(n){return V(n)&&"[object RegExp]"==sn.call(n);
|
||||
},u.isString=L,u.isUndefined=function(n){return n===Z},u.last=function(n){var t=n?n.length:0;return t?n[t-1]:Z},u.max=function(n){return n&&n.length?l(n,X,b):Z},u.min=function(n){return n&&n.length?l(n,X,j):Z},u.noConflict=function(){return un._===this&&(un._=hn),this},u.noop=function(){},u.reduce=C,u.result=function(n,t,r){return t=null==n?Z:n[t],t===Z&&(t=r),U(t)?t.call(n):t},u.size=function(n){return null==n?0:(n=P(n)?n:gn(n),n.length)},u.some=function(n,t,r){return t=r?Z:t,w(n,_(t))},u.uniqueId=function(n){
|
||||
var t=++pn;return Q(n)+t},u.each=z,u.first=q,Y(u,function(){var n={};return h(u,function(t,r){ln.call(u.prototype,r)||(n[r]=t)}),n}(),{chain:false}),u.VERSION="4.15.0",jn("pop join replace reverse split push shift sort splice unshift".split(" "),function(n){var t=(/^(?:replace|split)$/.test(n)?String.prototype:fn)[n],r=/^(?:push|sort|unshift)$/.test(n)?"tap":"thru",e=/^(?:pop|join|replace|shift)$/.test(n);u.prototype[n]=function(){var n=arguments;if(e&&!this.__chain__){var u=this.value();return t.apply(wn(u)?u:[],n);
|
||||
}return this[r](function(r){return t.apply(wn(r)?r:[],n)})}}),u.prototype.toJSON=u.prototype.valueOf=u.prototype.value=function(){return k(this.__wrapped__,this.__actions__)},typeof define=="function"&&typeof define.amd=="object"&&define.amd?(un._=u, define(function(){return u})):on?((on.exports=u)._=u,en._=u):un._=u}).call(this);
|
||||
|
|
@ -1,20 +0,0 @@
|
|||
(function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.fp=e():t.fp=e()})(this,function(){return function(t){function e(n){if(r[n])return r[n].exports;var i=r[n]={exports:{},id:n,loaded:!1};return t[n].call(i.exports,i,i.exports,e),i.loaded=!0,i.exports}var r={};return e.m=t,e.c=r,e.p="",e(0)}([function(t,e,r){function n(t,e){return i(t,t,e)}var i=r(1);"function"==typeof _&&(_=n(_.runInContext())),
|
||||
t.exports=n},function(t,e,r){function n(t,e){return 2==e?function(e,r){return t.apply(void 0,arguments)}:function(e){return t.apply(void 0,arguments)}}function i(t,e){return 2==e?function(e,r){return t(e,r)}:function(e){return t(e)}}function a(t){for(var e=t?t.length:0,r=Array(e);e--;)r[e]=t[e];return r}function o(t){return function(e){return t({},e)}}function s(t,e){return function(){var r=arguments.length;if(r){for(var n=Array(r);r--;)n[r]=arguments[r];var i=n[0]=e.apply(void 0,n);return t.apply(void 0,n),
|
||||
i}}}function l(t,e,r,d){function c(t,e){if(B.cap){var r=u.iterateeRearg[t];if(r)return x(e,r);var n=!b&&u.iterateeAry[t];if(n)return W(e,n)}return e}function h(t,e,r){return E||B.curry&&r>1?q(e,r):e}function g(t,e,r){if(B.fixed&&(F||!u.skipFixed[t])){var n=u.methodSpread[t],i=n&&n.start;return void 0===i?M(e,r):N(e,i)}return e}function y(t,e,r){return B.rearg&&r>1&&(j||!u.skipRearg[t])?_(e,u.methodRearg[t]||u.aryRearg[r]):e}function m(t,e){e=U(e);for(var r=-1,n=e.length,i=n-1,a=z(Object(t)),o=a;null!=o&&++r<n;){
|
||||
var s=e[r],l=o[s];null!=l&&(o[e[r]]=z(r==i?l:Object(l))),o=o[s]}return a}function v(t){return J.runInContext.convert(t)(void 0)}function A(t,e){var r=d;return function(n){var i=b?C:w,a=b?C[t]:e,o=D(D({},r),n);return l(i,t,a,o)}}function W(t,e){return I(t,function(t){return"function"==typeof t?i(t,e):t})}function x(t,e){return I(t,function(t){var r=e.length;return n(_(i(t,r),e),r)})}function I(t,e){return function(){var r=arguments.length;if(!r)return t();for(var n=Array(r);r--;)n[r]=arguments[r];var i=B.rearg?0:r-1;
|
||||
return n[i]=e(n[i]),t.apply(void 0,n)}}function R(t,e){t=u.aliasToReal[t]||t;var r,n=e,i=H[t];return i?n=i(e):B.immutable&&(p.array[t]?n=s(e,a):p.object[t]?n=s(e,o(e)):p.set[t]&&(n=s(e,m))),P(G,function(e){return P(u.aryMethod[e],function(i){if(t==i){var a=u.methodSpread[t],o=a&&a.afterRearg;return r=o?g(t,y(t,n,e),e):y(t,g(t,n,e),e),r=c(t,r),r=h(t,r,e),!1}}),!r}),r||(r=n),r==e&&(r=E?q(r,1):function(){return e.apply(this,arguments)}),r.convert=A(t,e),u.placeholder[t]&&(O=!0,r.placeholder=e.placeholder=L),
|
||||
r}var O,b="function"==typeof e,k=e===Object(e);if(k&&(d=r,r=e,e=void 0),null==r)throw new TypeError;d||(d={});var B={cap:!("cap"in d)||d.cap,curry:!("curry"in d)||d.curry,fixed:!("fixed"in d)||d.fixed,immutable:!("immutable"in d)||d.immutable,rearg:!("rearg"in d)||d.rearg},E="curry"in d&&d.curry,F="fixed"in d&&d.fixed,j="rearg"in d&&d.rearg,L=b?r:f,C=b?r.runInContext():void 0,w=b?r:{ary:t.ary,assign:t.assign,clone:t.clone,curry:t.curry,forEach:t.forEach,isArray:t.isArray,isFunction:t.isFunction,iteratee:t.iteratee,
|
||||
keys:t.keys,rearg:t.rearg,spread:t.spread,toInteger:t.toInteger,toPath:t.toPath},M=w.ary,D=w.assign,z=w.clone,q=w.curry,P=w.forEach,S=w.isArray,T=w.isFunction,K=w.keys,_=w.rearg,N=w.spread,V=w.toInteger,U=w.toPath,G=K(u.aryMethod),H={castArray:function(t){return function(){var e=arguments[0];return S(e)?t(a(e)):t.apply(void 0,arguments)}},iteratee:function(t){return function(){var e=arguments[0],r=arguments[1],n=t(e,r),a=n.length;return B.cap&&"number"==typeof r?(r=r>2?r-2:1,a&&a<=r?n:i(n,r)):n}},
|
||||
mixin:function(t){return function(e){var r=this;if(!T(r))return t(r,Object(e));var n=[];return P(K(e),function(t){T(e[t])&&n.push([t,r.prototype[t]])}),t(r,Object(e)),P(n,function(t){var e=t[1];T(e)?r.prototype[t[0]]=e:delete r.prototype[t[0]]}),r}},nthArg:function(t){return function(e){var r=e<0?1:V(e)+1;return q(t(e),r)}},rearg:function(t){return function(e,r){var n=r?r.length:0;return q(t(e,r),n)}},runInContext:function(e){return function(r){return l(t,e(r),d)}}};if(!k)return R(e,r);var J=r,Q=[];
|
||||
return P(G,function(t){P(u.aryMethod[t],function(t){var e=J[u.remap[t]||t];e&&Q.push([t,R(t,e)])})}),P(K(J),function(t){var e=J[t];if("function"==typeof e){for(var r=Q.length;r--;)if(Q[r][0]==t)return;e.convert=A(t,e),Q.push([t,e])}}),P(Q,function(t){J[t[0]]=t[1]}),J.convert=v,O&&(J.placeholder=L),P(K(J),function(t){P(u.realToAlias[t]||[],function(e){J[e]=J[t]})}),J}var u=r(2),p=u.mutate,f=r(3);t.exports=l},function(t,e){e.aliasToReal={each:"forEach",eachRight:"forEachRight",entries:"toPairs",entriesIn:"toPairsIn",
|
||||
extend:"assignIn",extendAll:"assignInAll",extendAllWith:"assignInAllWith",extendWith:"assignInWith",first:"head",conforms:"conformsTo",matches:"isMatch",property:"get",__:"placeholder",F:"stubFalse",T:"stubTrue",all:"every",allPass:"overEvery",always:"constant",any:"some",anyPass:"overSome",apply:"spread",assoc:"set",assocPath:"set",complement:"negate",compose:"flowRight",contains:"includes",dissoc:"unset",dissocPath:"unset",dropLast:"dropRight",dropLastWhile:"dropRightWhile",equals:"isEqual",identical:"eq",
|
||||
indexBy:"keyBy",init:"initial",invertObj:"invert",juxt:"over",omitAll:"omit",nAry:"ary",path:"get",pathEq:"matchesProperty",pathOr:"getOr",paths:"at",pickAll:"pick",pipe:"flow",pluck:"map",prop:"get",propEq:"matchesProperty",propOr:"getOr",props:"at",symmetricDifference:"xor",symmetricDifferenceBy:"xorBy",symmetricDifferenceWith:"xorWith",takeLast:"takeRight",takeLastWhile:"takeRightWhile",unapply:"rest",unnest:"flatten",useWith:"overArgs",where:"conformsTo",whereEq:"isMatch",zipObj:"zipObject"},
|
||||
e.aryMethod={1:["assignAll","assignInAll","attempt","castArray","ceil","create","curry","curryRight","defaultsAll","defaultsDeepAll","floor","flow","flowRight","fromPairs","invert","iteratee","memoize","method","mergeAll","methodOf","mixin","nthArg","over","overEvery","overSome","rest","reverse","round","runInContext","spread","template","trim","trimEnd","trimStart","uniqueId","words","zipAll"],2:["add","after","ary","assign","assignAllWith","assignIn","assignInAllWith","at","before","bind","bindAll","bindKey","chunk","cloneDeepWith","cloneWith","concat","conformsTo","countBy","curryN","curryRightN","debounce","defaults","defaultsDeep","defaultTo","delay","difference","divide","drop","dropRight","dropRightWhile","dropWhile","endsWith","eq","every","filter","find","findIndex","findKey","findLast","findLastIndex","findLastKey","flatMap","flatMapDeep","flattenDepth","forEach","forEachRight","forIn","forInRight","forOwn","forOwnRight","get","groupBy","gt","gte","has","hasIn","includes","indexOf","intersection","invertBy","invoke","invokeMap","isEqual","isMatch","join","keyBy","lastIndexOf","lt","lte","map","mapKeys","mapValues","matchesProperty","maxBy","meanBy","merge","mergeAllWith","minBy","multiply","nth","omit","omitBy","overArgs","pad","padEnd","padStart","parseInt","partial","partialRight","partition","pick","pickBy","propertyOf","pull","pullAll","pullAt","random","range","rangeRight","rearg","reject","remove","repeat","restFrom","result","sampleSize","some","sortBy","sortedIndex","sortedIndexOf","sortedLastIndex","sortedLastIndexOf","sortedUniqBy","split","spreadFrom","startsWith","subtract","sumBy","take","takeRight","takeRightWhile","takeWhile","tap","throttle","thru","times","trimChars","trimCharsEnd","trimCharsStart","truncate","union","uniqBy","uniqWith","unset","unzipWith","without","wrap","xor","zip","zipObject","zipObjectDeep"],
|
||||
3:["assignInWith","assignWith","clamp","differenceBy","differenceWith","findFrom","findIndexFrom","findLastFrom","findLastIndexFrom","getOr","includesFrom","indexOfFrom","inRange","intersectionBy","intersectionWith","invokeArgs","invokeArgsMap","isEqualWith","isMatchWith","flatMapDepth","lastIndexOfFrom","mergeWith","orderBy","padChars","padCharsEnd","padCharsStart","pullAllBy","pullAllWith","reduce","reduceRight","replace","set","slice","sortedIndexBy","sortedLastIndexBy","transform","unionBy","unionWith","update","xorBy","xorWith","zipWith"],
|
||||
4:["fill","setWith","updateWith"]},e.aryRearg={2:[1,0],3:[2,0,1],4:[3,2,0,1]},e.iterateeAry={dropRightWhile:1,dropWhile:1,every:1,filter:1,find:1,findFrom:1,findIndex:1,findIndexFrom:1,findKey:1,findLast:1,findLastFrom:1,findLastIndex:1,findLastIndexFrom:1,findLastKey:1,flatMap:1,flatMapDeep:1,flatMapDepth:1,forEach:1,forEachRight:1,forIn:1,forInRight:1,forOwn:1,forOwnRight:1,map:1,mapKeys:1,mapValues:1,partition:1,reduce:2,reduceRight:2,reject:1,remove:1,some:1,takeRightWhile:1,takeWhile:1,times:1,
|
||||
transform:2},e.iterateeRearg={mapKeys:[1]},e.methodRearg={assignInAllWith:[1,2,0],assignInWith:[1,2,0],assignAllWith:[1,2,0],assignWith:[1,2,0],differenceBy:[1,2,0],differenceWith:[1,2,0],getOr:[2,1,0],intersectionBy:[1,2,0],intersectionWith:[1,2,0],isEqualWith:[1,2,0],isMatchWith:[2,1,0],mergeAllWith:[1,2,0],mergeWith:[1,2,0],padChars:[2,1,0],padCharsEnd:[2,1,0],padCharsStart:[2,1,0],pullAllBy:[2,1,0],pullAllWith:[2,1,0],setWith:[3,1,2,0],sortedIndexBy:[2,1,0],sortedLastIndexBy:[2,1,0],unionBy:[1,2,0],
|
||||
unionWith:[1,2,0],updateWith:[3,1,2,0],xorBy:[1,2,0],xorWith:[1,2,0],zipWith:[1,2,0]},e.methodSpread={assignAll:{start:0},assignAllWith:{afterRearg:!0,start:1},assignInAll:{start:0},assignInAllWith:{afterRearg:!0,start:1},defaultsAll:{start:0},defaultsDeepAll:{start:0},invokeArgs:{start:2},invokeArgsMap:{start:2},mergeAll:{start:0},mergeAllWith:{afterRearg:!0,start:1},partial:{start:1},partialRight:{start:1},without:{start:1},zipAll:{start:0}},e.mutate={array:{fill:!0,pull:!0,pullAll:!0,pullAllBy:!0,
|
||||
pullAllWith:!0,pullAt:!0,remove:!0,reverse:!0},object:{assign:!0,assignAll:!0,assignAllWith:!0,assignIn:!0,assignInAll:!0,assignInAllWith:!0,assignInWith:!0,assignWith:!0,defaults:!0,defaultsAll:!0,defaultsDeep:!0,defaultsDeepAll:!0,merge:!0,mergeAll:!0,mergeAllWith:!0,mergeWith:!0},set:{set:!0,setWith:!0,unset:!0,update:!0,updateWith:!0}},e.placeholder={bind:!0,bindKey:!0,curry:!0,curryRight:!0,partial:!0,partialRight:!0},e.realToAlias=function(){var t=Object.prototype.hasOwnProperty,r=e.aliasToReal,n={};
|
||||
for(var i in r){var a=r[i];t.call(n,a)?n[a].push(i):n[a]=[i]}return n}(),e.remap={assignAll:"assign",assignAllWith:"assignWith",assignInAll:"assignIn",assignInAllWith:"assignInWith",curryN:"curry",curryRightN:"curryRight",defaultsAll:"defaults",defaultsDeepAll:"defaultsDeep",findFrom:"find",findIndexFrom:"findIndex",findLastFrom:"findLast",findLastIndexFrom:"findLastIndex",getOr:"get",includesFrom:"includes",indexOfFrom:"indexOf",invokeArgs:"invoke",invokeArgsMap:"invokeMap",lastIndexOfFrom:"lastIndexOf",
|
||||
mergeAll:"merge",mergeAllWith:"mergeWith",padChars:"pad",padCharsEnd:"padEnd",padCharsStart:"padStart",propertyOf:"get",restFrom:"rest",spreadFrom:"spread",trimChars:"trim",trimCharsEnd:"trimEnd",trimCharsStart:"trimStart",zipAll:"zip"},e.skipFixed={castArray:!0,flow:!0,flowRight:!0,iteratee:!0,mixin:!0,rearg:!0,runInContext:!0},e.skipRearg={add:!0,assign:!0,assignIn:!0,bind:!0,bindKey:!0,concat:!0,difference:!0,divide:!0,eq:!0,gt:!0,gte:!0,isEqual:!0,lt:!0,lte:!0,matchesProperty:!0,merge:!0,multiply:!0,
|
||||
overArgs:!0,partial:!0,partialRight:!0,propertyOf:!0,random:!0,range:!0,rangeRight:!0,subtract:!0,zip:!0,zipObject:!0,zipObjectDeep:!0}},function(t,e){t.exports={}}])});
|
||||
|
|
@ -1,132 +0,0 @@
|
|||
/**
|
||||
* @license
|
||||
* lodash lodash.com/license | Underscore.js 1.8.3 underscorejs.org/LICENSE
|
||||
*/
|
||||
;(function(){function t(t,n){return t.set(n[0],n[1]),t}function n(t,n){return t.add(n),t}function r(t,n,r){switch(r.length){case 0:return t.call(n);case 1:return t.call(n,r[0]);case 2:return t.call(n,r[0],r[1]);case 3:return t.call(n,r[0],r[1],r[2])}return t.apply(n,r)}function e(t,n,r,e){for(var u=-1,o=t?t.length:0;++u<o;){var i=t[u];n(e,i,r(i),t)}return e}function u(t,n){for(var r=-1,e=t?t.length:0;++r<e&&false!==n(t[r],r,t););return t}function o(t,n){for(var r=t?t.length:0;r--&&false!==n(t[r],r,t););
|
||||
return t}function i(t,n){for(var r=-1,e=t?t.length:0;++r<e;)if(!n(t[r],r,t))return false;return true}function f(t,n){for(var r=-1,e=t?t.length:0,u=0,o=[];++r<e;){var i=t[r];n(i,r,t)&&(o[u++]=i)}return o}function c(t,n){return!(!t||!t.length)&&-1<d(t,n,0)}function a(t,n,r){for(var e=-1,u=t?t.length:0;++e<u;)if(r(n,t[e]))return true;return false}function l(t,n){for(var r=-1,e=t?t.length:0,u=Array(e);++r<e;)u[r]=n(t[r],r,t);return u}function s(t,n){for(var r=-1,e=n.length,u=t.length;++r<e;)t[u+r]=n[r];return t}function h(t,n,r,e){
|
||||
var u=-1,o=t?t.length:0;for(e&&o&&(r=t[++u]);++u<o;)r=n(r,t[u],u,t);return r}function p(t,n,r,e){var u=t?t.length:0;for(e&&u&&(r=t[--u]);u--;)r=n(r,t[u],u,t);return r}function _(t,n){for(var r=-1,e=t?t.length:0;++r<e;)if(n(t[r],r,t))return true;return false}function v(t,n,r){var e;return r(t,function(t,r,u){if(n(t,r,u))return e=r,false}),e}function g(t,n,r,e){var u=t.length;for(r+=e?1:-1;e?r--:++r<u;)if(n(t[r],r,t))return r;return-1}function d(t,n,r){if(n!==n)return g(t,b,r);--r;for(var e=t.length;++r<e;)if(t[r]===n)return r;
|
||||
return-1}function y(t,n,r,e){--r;for(var u=t.length;++r<u;)if(e(t[r],n))return r;return-1}function b(t){return t!==t}function x(t,n){var r=t?t.length:0;return r?k(t,n)/r:q}function j(t){return function(n){return null==n?P:n[t]}}function w(t){return function(n){return null==t?P:t[n]}}function m(t,n,r,e,u){return u(t,function(t,u,o){r=e?(e=false,t):n(r,t,u,o)}),r}function A(t,n){var r=t.length;for(t.sort(n);r--;)t[r]=t[r].c;return t}function k(t,n){for(var r,e=-1,u=t.length;++e<u;){var o=n(t[e]);o!==P&&(r=r===P?o:r+o);
|
||||
}return r}function E(t,n){for(var r=-1,e=Array(t);++r<t;)e[r]=n(r);return e}function O(t,n){return l(n,function(n){return[n,t[n]]})}function S(t){return function(n){return t(n)}}function I(t,n){return l(n,function(n){return t[n]})}function R(t,n){return t.has(n)}function W(t,n){for(var r=-1,e=t.length;++r<e&&-1<d(n,t[r],0););return r}function B(t,n){for(var r=t.length;r--&&-1<d(n,t[r],0););return r}function L(t){return"\\"+Ft[t]}function C(t){var n=false;if(null!=t&&typeof t.toString!="function")try{
|
||||
n=!!(t+"")}catch(t){}return n}function U(t){var n=-1,r=Array(t.size);return t.forEach(function(t,e){r[++n]=[e,t]}),r}function M(t,n){return function(r){return t(n(r))}}function z(t,n){for(var r=-1,e=t.length,u=0,o=[];++r<e;){var i=t[r];i!==n&&"__lodash_placeholder__"!==i||(t[r]="__lodash_placeholder__",o[u++]=r)}return o}function D(t){var n=-1,r=Array(t.size);return t.forEach(function(t){r[++n]=t}),r}function T(t){var n=-1,r=Array(t.size);return t.forEach(function(t){r[++n]=[t,t]}),r}function $(t){
|
||||
if(Ut.test(t)){for(var n=Lt.lastIndex=0;Lt.test(t);)n++;t=n}else t=en(t);return t}function F(t){return Ut.test(t)?t.match(Lt)||[]:t.split("")}function N(w){function St(t){return Hu.call(t)}function It(t){if(ou(t)&&!Fi(t)&&!(t instanceof $t)){if(t instanceof Lt)return t;if(Gu.call(t,"__wrapped__"))return Oe(t)}return new Lt(t)}function Rt(){}function Lt(t,n){this.__wrapped__=t,this.__actions__=[],this.__chain__=!!n,this.__index__=0,this.__values__=P}function $t(t){this.__wrapped__=t,this.__actions__=[],
|
||||
this.__dir__=1,this.__filtered__=false,this.__iteratees__=[],this.__takeCount__=4294967295,this.__views__=[]}function Ft(t){var n=-1,r=t?t.length:0;for(this.clear();++n<r;){var e=t[n];this.set(e[0],e[1])}}function Zt(t){var n=-1,r=t?t.length:0;for(this.clear();++n<r;){var e=t[n];this.set(e[0],e[1])}}function qt(t){var n=-1,r=t?t.length:0;for(this.clear();++n<r;){var e=t[n];this.set(e[0],e[1])}}function Kt(t){var n=-1,r=t?t.length:0;for(this.__data__=new qt;++n<r;)this.add(t[n])}function Gt(t){this.__data__=new Zt(t);
|
||||
}function Yt(t,n){var r,e=Fi(t)||He(t)?E(t.length,Fu):[],u=e.length,o=!!u;for(r in t)!n&&!Gu.call(t,r)||o&&("length"==r||ge(r,u))||e.push(r);return e}function en(t,n,r,e){return t===P||Ye(t,Zu[r])&&!Gu.call(e,r)?n:t}function an(t,n,r){(r===P||Ye(t[n],r))&&(typeof n!="number"||r!==P||n in t)||(t[n]=r)}function ln(t,n,r){var e=t[n];Gu.call(t,n)&&Ye(e,r)&&(r!==P||n in t)||(t[n]=r)}function sn(t,n){for(var r=t.length;r--;)if(Ye(t[r][0],n))return r;return-1}function hn(t,n,r,e){return Po(t,function(t,u,o){
|
||||
n(e,t,r(t),o)}),e}function pn(t,n){return t&&Br(n,bu(n),t)}function _n(t,n){for(var r=-1,e=null==t,u=n.length,o=Cu(u);++r<u;)o[r]=e?P:du(t,n[r]);return o}function vn(t,n,r){return t===t&&(r!==P&&(t=t<=r?t:r),n!==P&&(t=t>=n?t:n)),t}function gn(t,n,r,e,o,i,f){var c;if(e&&(c=i?e(t,o,i,f):e(t)),c!==P)return c;if(!uu(t))return t;if(o=Fi(t)){if(c=he(t),!n)return Wr(t,c)}else{var a=St(t),l="[object Function]"==a||"[object GeneratorFunction]"==a;if(Pi(t))return Er(t,n);if("[object Object]"==a||"[object Arguments]"==a||l&&!i){
|
||||
if(C(t))return i?t:{};if(c=pe(l?{}:t),!n)return Lr(t,pn(c,t))}else{if(!Tt[a])return i?t:{};c=_e(t,a,gn,n)}}if(f||(f=new Gt),i=f.get(t))return i;if(f.set(t,c),!o)var s=r?Rn(t,bu,Ho):bu(t);return u(s||t,function(u,o){s&&(o=u,u=t[o]),ln(c,o,gn(u,n,r,e,o,t,f))}),c}function dn(t){var n=bu(t);return function(r){return yn(r,t,n)}}function yn(t,n,r){var e=r.length;if(null==t)return!e;for(t=Tu(t);e--;){var u=r[e],o=n[u],i=t[u];if(i===P&&!(u in t)||!o(i))return false}return true}function bn(t){return uu(t)?oo(t):{};
|
||||
}function xn(t,n,r){if(typeof t!="function")throw new Nu("Expected a function");return ni(function(){t.apply(P,r)},n)}function jn(t,n,r,e){var u=-1,o=c,i=true,f=t.length,s=[],h=n.length;if(!f)return s;r&&(n=l(n,S(r))),e?(o=a,i=false):200<=n.length&&(o=R,i=false,n=new Kt(n));t:for(;++u<f;){var p=t[u],_=r?r(p):p,p=e||0!==p?p:0;if(i&&_===_){for(var v=h;v--;)if(n[v]===_)continue t;s.push(p)}else o(n,_,e)||s.push(p)}return s}function wn(t,n){var r=true;return Po(t,function(t,e,u){return r=!!n(t,e,u)}),r}function mn(t,n,r){
|
||||
for(var e=-1,u=t.length;++e<u;){var o=t[e],i=n(o);if(null!=i&&(f===P?i===i&&!au(i):r(i,f)))var f=i,c=o}return c}function An(t,n){var r=[];return Po(t,function(t,e,u){n(t,e,u)&&r.push(t)}),r}function kn(t,n,r,e,u){var o=-1,i=t.length;for(r||(r=ve),u||(u=[]);++o<i;){var f=t[o];0<n&&r(f)?1<n?kn(f,n-1,r,e,u):s(u,f):e||(u[u.length]=f)}return u}function En(t,n){return t&&qo(t,n,bu)}function On(t,n){return t&&Vo(t,n,bu)}function Sn(t,n){return f(n,function(n){return nu(t[n])})}function In(t,n){n=ye(n,t)?[n]:Ar(n);
|
||||
for(var r=0,e=n.length;null!=t&&r<e;)t=t[Ae(n[r++])];return r&&r==e?t:P}function Rn(t,n,r){return n=n(t),Fi(t)?n:s(n,r(t))}function Wn(t,n){return t>n}function Bn(t,n){return null!=t&&Gu.call(t,n)}function Ln(t,n){return null!=t&&n in Tu(t)}function Cn(t,n,r){for(var e=r?a:c,u=t[0].length,o=t.length,i=o,f=Cu(o),s=1/0,h=[];i--;){var p=t[i];i&&n&&(p=l(p,S(n))),s=jo(p.length,s),f[i]=!r&&(n||120<=u&&120<=p.length)?new Kt(i&&p):P}var p=t[0],_=-1,v=f[0];t:for(;++_<u&&h.length<s;){var g=p[_],d=n?n(g):g,g=r||0!==g?g:0;
|
||||
if(v?!R(v,d):!e(h,d,r)){for(i=o;--i;){var y=f[i];if(y?!R(y,d):!e(t[i],d,r))continue t}v&&v.push(d),h.push(g)}}return h}function Un(t,n,r){var e={};return En(t,function(t,u,o){n(e,r(t),u,o)}),e}function Mn(t,n,e){return ye(n,t)||(n=Ar(n),t=me(t,n),n=We(n)),n=null==t?t:t[Ae(n)],null==n?P:r(n,t,e)}function zn(t){return ou(t)&&"[object ArrayBuffer]"==Hu.call(t)}function Dn(t){return ou(t)&&"[object Date]"==Hu.call(t)}function Tn(t,n,r,e,u){if(t===n)n=true;else if(null==t||null==n||!uu(t)&&!ou(n))n=t!==t&&n!==n;else t:{
|
||||
var o=Fi(t),i=Fi(n),f="[object Array]",c="[object Array]";o||(f=St(t),f="[object Arguments]"==f?"[object Object]":f),i||(c=St(n),c="[object Arguments]"==c?"[object Object]":c);var a="[object Object]"==f&&!C(t),i="[object Object]"==c&&!C(n);if((c=f==c)&&!a)u||(u=new Gt),n=o||Gi(t)?ee(t,n,Tn,r,e,u):ue(t,n,f,Tn,r,e,u);else{if(!(2&e)&&(o=a&&Gu.call(t,"__wrapped__"),f=i&&Gu.call(n,"__wrapped__"),o||f)){t=o?t.value():t,n=f?n.value():n,u||(u=new Gt),n=Tn(t,n,r,e,u);break t}if(c)n:if(u||(u=new Gt),o=2&e,
|
||||
f=bu(t),i=f.length,c=bu(n).length,i==c||o){for(a=i;a--;){var l=f[a];if(!(o?l in n:Gu.call(n,l))){n=false;break n}}if((c=u.get(t))&&u.get(n))n=c==n;else{c=true,u.set(t,n),u.set(n,t);for(var s=o;++a<i;){var l=f[a],h=t[l],p=n[l];if(r)var _=o?r(p,h,l,n,t,u):r(h,p,l,t,n,u);if(_===P?h!==p&&!Tn(h,p,r,e,u):!_){c=false;break}s||(s="constructor"==l)}c&&!s&&(r=t.constructor,e=n.constructor,r!=e&&"constructor"in t&&"constructor"in n&&!(typeof r=="function"&&r instanceof r&&typeof e=="function"&&e instanceof e)&&(c=false)),
|
||||
u.delete(t),u.delete(n),n=c}}else n=false;else n=false}}return n}function $n(t){return ou(t)&&"[object Map]"==St(t)}function Fn(t,n,r,e){var u=r.length,o=u,i=!e;if(null==t)return!o;for(t=Tu(t);u--;){var f=r[u];if(i&&f[2]?f[1]!==t[f[0]]:!(f[0]in t))return false}for(;++u<o;){var f=r[u],c=f[0],a=t[c],l=f[1];if(i&&f[2]){if(a===P&&!(c in t))return false}else{if(f=new Gt,e)var s=e(a,l,c,t,n,f);if(s===P?!Tn(l,a,e,3,f):!s)return false}}return true}function Nn(t){return!(!uu(t)||Vu&&Vu in t)&&(nu(t)||C(t)?Xu:wt).test(ke(t))}function Pn(t){
|
||||
return uu(t)&&"[object RegExp]"==Hu.call(t)}function Zn(t){return ou(t)&&"[object Set]"==St(t)}function qn(t){return ou(t)&&eu(t.length)&&!!Dt[Hu.call(t)]}function Vn(t){return typeof t=="function"?t:null==t?Ou:typeof t=="object"?Fi(t)?Qn(t[0],t[1]):Hn(t):Wu(t)}function Kn(t){if(!xe(t))return bo(t);var n,r=[];for(n in Tu(t))Gu.call(t,n)&&"constructor"!=n&&r.push(n);return r}function Gn(t){if(!uu(t)){var n=[];if(null!=t)for(var r in Tu(t))n.push(r);return n}r=xe(t);var e=[];for(n in t)("constructor"!=n||!r&&Gu.call(t,n))&&e.push(n);
|
||||
return e}function Jn(t,n){return t<n}function Yn(t,n){var r=-1,e=Qe(t)?Cu(t.length):[];return Po(t,function(t,u,o){e[++r]=n(t,u,o)}),e}function Hn(t){var n=ae(t);return 1==n.length&&n[0][2]?je(n[0][0],n[0][1]):function(r){return r===t||Fn(r,t,n)}}function Qn(t,n){return ye(t)&&n===n&&!uu(n)?je(Ae(t),n):function(r){var e=du(r,t);return e===P&&e===n?yu(r,t):Tn(n,e,P,3)}}function Xn(t,n,r,e,o){if(t!==n){if(!Fi(n)&&!Gi(n))var i=Gn(n);u(i||n,function(u,f){if(i&&(f=u,u=n[f]),uu(u)){o||(o=new Gt);var c=f,a=o,l=t[c],s=n[c],h=a.get(s);
|
||||
if(h)an(t,c,h);else{var h=e?e(l,s,c+"",t,n,a):P,p=h===P;p&&(h=s,Fi(s)||Gi(s)?Fi(l)?h=l:Xe(l)?h=Wr(l):(p=false,h=gn(s,true)):fu(s)||He(s)?He(l)?h=vu(l):!uu(l)||r&&nu(l)?(p=false,h=gn(s,true)):h=l:p=false),p&&(a.set(s,h),Xn(h,s,r,e,a),a.delete(s)),an(t,c,h)}}else c=e?e(t[f],u,f+"",t,n,o):P,c===P&&(c=u),an(t,f,c)})}}function tr(t,n){var r=t.length;if(r)return n+=0>n?r:0,ge(n,r)?t[n]:P}function nr(t,n,r){var e=-1;return n=l(n.length?n:[Ou],S(fe())),t=Yn(t,function(t){return{a:l(n,function(n){return n(t)}),b:++e,c:t
|
||||
}}),A(t,function(t,n){var e;t:{e=-1;for(var u=t.a,o=n.a,i=u.length,f=r.length;++e<i;){var c=Sr(u[e],o[e]);if(c){e=e>=f?c:c*("desc"==r[e]?-1:1);break t}}e=t.b-n.b}return e})}function rr(t,n){return t=Tu(t),er(t,n,function(n,r){return r in t})}function er(t,n,r){for(var e=-1,u=n.length,o={};++e<u;){var i=n[e],f=t[i];r(f,i)&&(o[i]=f)}return o}function ur(t){return function(n){return In(n,t)}}function or(t,n,r,e){var u=e?y:d,o=-1,i=n.length,f=t;for(t===n&&(n=Wr(n)),r&&(f=l(t,S(r)));++o<i;)for(var c=0,a=n[o],a=r?r(a):a;-1<(c=u(f,a,c,e));)f!==t&&fo.call(f,c,1),
|
||||
fo.call(t,c,1);return t}function ir(t,n){for(var r=t?n.length:0,e=r-1;r--;){var u=n[r];if(r==e||u!==o){var o=u;if(ge(u))fo.call(t,u,1);else if(ye(u,t))delete t[Ae(u)];else{var u=Ar(u),i=me(t,u);null!=i&&delete i[Ae(We(u))]}}}}function fr(t,n){return t+po(mo()*(n-t+1))}function cr(t,n){var r="";if(!t||1>n||9007199254740991<n)return r;do n%2&&(r+=t),(n=po(n/2))&&(t+=t);while(n);return r}function ar(t,n){return n=xo(n===P?t.length-1:n,0),function(){for(var e=arguments,u=-1,o=xo(e.length-n,0),i=Cu(o);++u<o;)i[u]=e[n+u];
|
||||
for(u=-1,o=Cu(n+1);++u<n;)o[u]=e[u];return o[n]=i,r(t,this,o)}}function lr(t,n,r,e){if(!uu(t))return t;n=ye(n,t)?[n]:Ar(n);for(var u=-1,o=n.length,i=o-1,f=t;null!=f&&++u<o;){var c=Ae(n[u]),a=r;if(u!=i){var l=f[c],a=e?e(l,c,f):P;a===P&&(a=uu(l)?l:ge(n[u+1])?[]:{})}ln(f,c,a),f=f[c]}return t}function sr(t,n,r){var e=-1,u=t.length;for(0>n&&(n=-n>u?0:u+n),r=r>u?u:r,0>r&&(r+=u),u=n>r?0:r-n>>>0,n>>>=0,r=Cu(u);++e<u;)r[e]=t[e+n];return r}function hr(t,n){var r;return Po(t,function(t,e,u){return r=n(t,e,u),
|
||||
!r}),!!r}function pr(t,n,r){var e=0,u=t?t.length:e;if(typeof n=="number"&&n===n&&2147483647>=u){for(;e<u;){var o=e+u>>>1,i=t[o];null!==i&&!au(i)&&(r?i<=n:i<n)?e=o+1:u=o}return u}return _r(t,n,Ou,r)}function _r(t,n,r,e){n=r(n);for(var u=0,o=t?t.length:0,i=n!==n,f=null===n,c=au(n),a=n===P;u<o;){var l=po((u+o)/2),s=r(t[l]),h=s!==P,p=null===s,_=s===s,v=au(s);(i?e||_:a?_&&(e||h):f?_&&h&&(e||!p):c?_&&h&&!p&&(e||!v):p||v?0:e?s<=n:s<n)?u=l+1:o=l}return jo(o,4294967294)}function vr(t,n){for(var r=-1,e=t.length,u=0,o=[];++r<e;){
|
||||
var i=t[r],f=n?n(i):i;if(!r||!Ye(f,c)){var c=f;o[u++]=0===i?0:i}}return o}function gr(t){return typeof t=="number"?t:au(t)?q:+t}function dr(t){if(typeof t=="string")return t;if(au(t))return No?No.call(t):"";var n=t+"";return"0"==n&&1/t==-Z?"-0":n}function yr(t,n,r){var e=-1,u=c,o=t.length,i=true,f=[],l=f;if(r)i=false,u=a;else if(200<=o){if(u=n?null:Jo(t))return D(u);i=false,u=R,l=new Kt}else l=n?[]:f;t:for(;++e<o;){var s=t[e],h=n?n(s):s,s=r||0!==s?s:0;if(i&&h===h){for(var p=l.length;p--;)if(l[p]===h)continue t;
|
||||
n&&l.push(h),f.push(s)}else u(l,h,r)||(l!==f&&l.push(h),f.push(s))}return f}function br(t,n,r,e){for(var u=t.length,o=e?u:-1;(e?o--:++o<u)&&n(t[o],o,t););return r?sr(t,e?0:o,e?o+1:u):sr(t,e?o+1:0,e?u:o)}function xr(t,n){var r=t;return r instanceof $t&&(r=r.value()),h(n,function(t,n){return n.func.apply(n.thisArg,s([t],n.args))},r)}function jr(t,n,r){for(var e=-1,u=t.length;++e<u;)var o=o?s(jn(o,t[e],n,r),jn(t[e],o,n,r)):t[e];return o&&o.length?yr(o,n,r):[]}function wr(t,n,r){for(var e=-1,u=t.length,o=n.length,i={};++e<u;)r(i,t[e],e<o?n[e]:P);
|
||||
return i}function mr(t){return Xe(t)?t:[]}function Ar(t){return Fi(t)?t:ei(t)}function kr(t,n,r){var e=t.length;return r=r===P?e:r,!n&&r>=e?t:sr(t,n,r)}function Er(t,n){if(n)return t.slice();var r=new t.constructor(t.length);return t.copy(r),r}function Or(t){var n=new t.constructor(t.byteLength);return new ro(n).set(new ro(t)),n}function Sr(t,n){if(t!==n){var r=t!==P,e=null===t,u=t===t,o=au(t),i=n!==P,f=null===n,c=n===n,a=au(n);if(!f&&!a&&!o&&t>n||o&&i&&c&&!f&&!a||e&&i&&c||!r&&c||!u)return 1;if(!e&&!o&&!a&&t<n||a&&r&&u&&!e&&!o||f&&r&&u||!i&&u||!c)return-1;
|
||||
}return 0}function Ir(t,n,r,e){var u=-1,o=t.length,i=r.length,f=-1,c=n.length,a=xo(o-i,0),l=Cu(c+a);for(e=!e;++f<c;)l[f]=n[f];for(;++u<i;)(e||u<o)&&(l[r[u]]=t[u]);for(;a--;)l[f++]=t[u++];return l}function Rr(t,n,r,e){var u=-1,o=t.length,i=-1,f=r.length,c=-1,a=n.length,l=xo(o-f,0),s=Cu(l+a);for(e=!e;++u<l;)s[u]=t[u];for(l=u;++c<a;)s[l+c]=n[c];for(;++i<f;)(e||u<o)&&(s[l+r[i]]=t[u++]);return s}function Wr(t,n){var r=-1,e=t.length;for(n||(n=Cu(e));++r<e;)n[r]=t[r];return n}function Br(t,n,r,e){r||(r={});
|
||||
for(var u=-1,o=n.length;++u<o;){var i=n[u],f=e?e(r[i],t[i],i,r,t):P;ln(r,i,f===P?t[i]:f)}return r}function Lr(t,n){return Br(t,Ho(t),n)}function Cr(t,n){return function(r,u){var o=Fi(r)?e:hn,i=n?n():{};return o(r,t,fe(u,2),i)}}function Ur(t){return ar(function(n,r){var e=-1,u=r.length,o=1<u?r[u-1]:P,i=2<u?r[2]:P,o=3<t.length&&typeof o=="function"?(u--,o):P;for(i&&de(r[0],r[1],i)&&(o=3>u?P:o,u=1),n=Tu(n);++e<u;)(i=r[e])&&t(n,i,e,o);return n})}function Mr(t,n){return function(r,e){if(null==r)return r;
|
||||
if(!Qe(r))return t(r,e);for(var u=r.length,o=n?u:-1,i=Tu(r);(n?o--:++o<u)&&false!==e(i[o],o,i););return r}}function zr(t){return function(n,r,e){var u=-1,o=Tu(n);e=e(n);for(var i=e.length;i--;){var f=e[t?i:++u];if(false===r(o[f],f,o))break}return n}}function Dr(t,n,r){function e(){return(this&&this!==Vt&&this instanceof e?o:t).apply(u?r:this,arguments)}var u=1&n,o=Fr(t);return e}function Tr(t){return function(n){n=gu(n);var r=Ut.test(n)?F(n):P,e=r?r[0]:n.charAt(0);return n=r?kr(r,1).join(""):n.slice(1),
|
||||
e[t]()+n}}function $r(t){return function(n){return h(ku(Au(n).replace(Wt,"")),t,"")}}function Fr(t){return function(){var n=arguments;switch(n.length){case 0:return new t;case 1:return new t(n[0]);case 2:return new t(n[0],n[1]);case 3:return new t(n[0],n[1],n[2]);case 4:return new t(n[0],n[1],n[2],n[3]);case 5:return new t(n[0],n[1],n[2],n[3],n[4]);case 6:return new t(n[0],n[1],n[2],n[3],n[4],n[5]);case 7:return new t(n[0],n[1],n[2],n[3],n[4],n[5],n[6])}var r=bn(t.prototype),n=t.apply(r,n);return uu(n)?n:r;
|
||||
}}function Nr(t,n,e){function u(){for(var i=arguments.length,f=Cu(i),c=i,a=ie(u);c--;)f[c]=arguments[c];return c=3>i&&f[0]!==a&&f[i-1]!==a?[]:z(f,a),i-=c.length,i<e?Xr(t,n,qr,u.placeholder,P,f,c,P,P,e-i):r(this&&this!==Vt&&this instanceof u?o:t,this,f)}var o=Fr(t);return u}function Pr(t){return function(n,r,e){var u=Tu(n);if(!Qe(n)){var o=fe(r,3);n=bu(n),r=function(t){return o(u[t],t,u)}}return r=t(n,r,e),-1<r?u[o?n[r]:r]:P}}function Zr(t){return ar(function(n){n=kn(n,1);var r=n.length,e=r,u=Lt.prototype.thru;
|
||||
for(t&&n.reverse();e--;){var o=n[e];if(typeof o!="function")throw new Nu("Expected a function");if(u&&!i&&"wrapper"==oe(o))var i=new Lt([],(true))}for(e=i?e:r;++e<r;)var o=n[e],u=oe(o),f="wrapper"==u?Yo(o):P,i=f&&be(f[0])&&424==f[1]&&!f[4].length&&1==f[9]?i[oe(f[0])].apply(i,f[3]):1==o.length&&be(o)?i[u]():i.thru(o);return function(){var t=arguments,e=t[0];if(i&&1==t.length&&Fi(e)&&200<=e.length)return i.plant(e).value();for(var u=0,t=r?n[u].apply(this,t):e;++u<r;)t=n[u].call(this,t);return t}})}function qr(t,n,r,e,u,o,i,f,c,a){
|
||||
function l(){for(var d=arguments.length,y=Cu(d),b=d;b--;)y[b]=arguments[b];if(_){var x,j=ie(l),b=y.length;for(x=0;b--;)y[b]===j&&x++}if(e&&(y=Ir(y,e,u,_)),o&&(y=Rr(y,o,i,_)),d-=x,_&&d<a)return j=z(y,j),Xr(t,n,qr,l.placeholder,r,y,j,f,c,a-d);if(j=h?r:this,b=p?j[t]:t,d=y.length,f){x=y.length;for(var w=jo(f.length,x),m=Wr(y);w--;){var A=f[w];y[w]=ge(A,x)?m[A]:P}}else v&&1<d&&y.reverse();return s&&c<d&&(y.length=c),this&&this!==Vt&&this instanceof l&&(b=g||Fr(b)),b.apply(j,y)}var s=128&n,h=1&n,p=2&n,_=24&n,v=512&n,g=p?P:Fr(t);
|
||||
return l}function Vr(t,n){return function(r,e){return Un(r,t,n(e))}}function Kr(t,n){return function(r,e){var u;if(r===P&&e===P)return n;if(r!==P&&(u=r),e!==P){if(u===P)return e;typeof r=="string"||typeof e=="string"?(r=dr(r),e=dr(e)):(r=gr(r),e=gr(e)),u=t(r,e)}return u}}function Gr(t){return ar(function(n){return n=1==n.length&&Fi(n[0])?l(n[0],S(fe())):l(kn(n,1),S(fe())),ar(function(e){var u=this;return t(n,function(t){return r(t,u,e)})})})}function Jr(t,n){n=n===P?" ":dr(n);var r=n.length;return 2>r?r?cr(n,t):n:(r=cr(n,ho(t/$(n))),
|
||||
Ut.test(n)?kr(F(r),0,t).join(""):r.slice(0,t))}function Yr(t,n,e,u){function o(){for(var n=-1,c=arguments.length,a=-1,l=u.length,s=Cu(l+c),h=this&&this!==Vt&&this instanceof o?f:t;++a<l;)s[a]=u[a];for(;c--;)s[a++]=arguments[++n];return r(h,i?e:this,s)}var i=1&n,f=Fr(t);return o}function Hr(t){return function(n,r,e){e&&typeof e!="number"&&de(n,r,e)&&(r=e=P),n=su(n),r===P?(r=n,n=0):r=su(r),e=e===P?n<r?1:-1:su(e);var u=-1;r=xo(ho((r-n)/(e||1)),0);for(var o=Cu(r);r--;)o[t?r:++u]=n,n+=e;return o}}function Qr(t){
|
||||
return function(n,r){return typeof n=="string"&&typeof r=="string"||(n=_u(n),r=_u(r)),t(n,r)}}function Xr(t,n,r,e,u,o,i,f,c,a){var l=8&n,s=l?i:P;i=l?P:i;var h=l?o:P;return o=l?P:o,n=(n|(l?32:64))&~(l?64:32),4&n||(n&=-4),u=[t,n,u,h,s,o,i,f,c,a],r=r.apply(P,u),be(t)&&ti(r,u),r.placeholder=e,ri(r,t,n)}function te(t){var n=Du[t];return function(t,r){if(t=_u(t),r=jo(hu(r),292)){var e=(gu(t)+"e").split("e"),e=n(e[0]+"e"+(+e[1]+r)),e=(gu(e)+"e").split("e");return+(e[0]+"e"+(+e[1]-r))}return n(t)}}function ne(t){
|
||||
return function(n){var r=St(n);return"[object Map]"==r?U(n):"[object Set]"==r?T(n):O(n,t(n))}}function re(t,n,r,e,u,o,i,f){var c=2&n;if(!c&&typeof t!="function")throw new Nu("Expected a function");var a=e?e.length:0;if(a||(n&=-97,e=u=P),i=i===P?i:xo(hu(i),0),f=f===P?f:hu(f),a-=u?u.length:0,64&n){var l=e,s=u;e=u=P}var h=c?P:Yo(t);return o=[t,n,r,e,u,l,s,o,i,f],h&&(r=o[1],t=h[1],n=r|t,e=128==t&&8==r||128==t&&256==r&&o[7].length<=h[8]||384==t&&h[7].length<=h[8]&&8==r,131>n||e)&&(1&t&&(o[2]=h[2],n|=1&r?0:4),
|
||||
(r=h[3])&&(e=o[3],o[3]=e?Ir(e,r,h[4]):r,o[4]=e?z(o[3],"__lodash_placeholder__"):h[4]),(r=h[5])&&(e=o[5],o[5]=e?Rr(e,r,h[6]):r,o[6]=e?z(o[5],"__lodash_placeholder__"):h[6]),(r=h[7])&&(o[7]=r),128&t&&(o[8]=null==o[8]?h[8]:jo(o[8],h[8])),null==o[9]&&(o[9]=h[9]),o[0]=h[0],o[1]=n),t=o[0],n=o[1],r=o[2],e=o[3],u=o[4],f=o[9]=null==o[9]?c?0:t.length:xo(o[9]-a,0),!f&&24&n&&(n&=-25),ri((h?Ko:ti)(n&&1!=n?8==n||16==n?Nr(t,n,f):32!=n&&33!=n||u.length?qr.apply(P,o):Yr(t,n,r,e):Dr(t,n,r),o),t,n)}function ee(t,n,r,e,u,o){
|
||||
var i=2&u,f=t.length,c=n.length;if(f!=c&&!(i&&c>f))return false;if((c=o.get(t))&&o.get(n))return c==n;var c=-1,a=true,l=1&u?new Kt:P;for(o.set(t,n),o.set(n,t);++c<f;){var s=t[c],h=n[c];if(e)var p=i?e(h,s,c,n,t,o):e(s,h,c,t,n,o);if(p!==P){if(p)continue;a=false;break}if(l){if(!_(n,function(t,n){if(!l.has(n)&&(s===t||r(s,t,e,u,o)))return l.add(n)})){a=false;break}}else if(s!==h&&!r(s,h,e,u,o)){a=false;break}}return o.delete(t),o.delete(n),a}function ue(t,n,r,e,u,o,i){switch(r){case"[object DataView]":if(t.byteLength!=n.byteLength||t.byteOffset!=n.byteOffset)break;
|
||||
t=t.buffer,n=n.buffer;case"[object ArrayBuffer]":if(t.byteLength!=n.byteLength||!e(new ro(t),new ro(n)))break;return true;case"[object Boolean]":case"[object Date]":case"[object Number]":return Ye(+t,+n);case"[object Error]":return t.name==n.name&&t.message==n.message;case"[object RegExp]":case"[object String]":return t==n+"";case"[object Map]":var f=U;case"[object Set]":if(f||(f=D),t.size!=n.size&&!(2&o))break;return(r=i.get(t))?r==n:(o|=1,i.set(t,n),n=ee(f(t),f(n),e,u,o,i),i.delete(t),n);case"[object Symbol]":
|
||||
if(Fo)return Fo.call(t)==Fo.call(n)}return false}function oe(t){for(var n=t.name+"",r=Co[n],e=Gu.call(Co,n)?r.length:0;e--;){var u=r[e],o=u.func;if(null==o||o==t)return u.name}return n}function ie(t){return(Gu.call(It,"placeholder")?It:t).placeholder}function fe(){var t=It.iteratee||Su,t=t===Su?Vn:t;return arguments.length?t(arguments[0],arguments[1]):t}function ce(t,n){var r=t.__data__,e=typeof n;return("string"==e||"number"==e||"symbol"==e||"boolean"==e?"__proto__"!==n:null===n)?r[typeof n=="string"?"string":"hash"]:r.map;
|
||||
}function ae(t){for(var n=bu(t),r=n.length;r--;){var e=n[r],u=t[e];n[r]=[e,u,u===u&&!uu(u)]}return n}function le(t,n){var r=null==t?P:t[n];return Nn(r)?r:P}function se(t,n,r){n=ye(n,t)?[n]:Ar(n);for(var e,u=-1,o=n.length;++u<o;){var i=Ae(n[u]);if(!(e=null!=t&&r(t,i)))break;t=t[i]}return e?e:(o=t?t.length:0,!!o&&eu(o)&&ge(i,o)&&(Fi(t)||He(t)))}function he(t){var n=t.length,r=t.constructor(n);return n&&"string"==typeof t[0]&&Gu.call(t,"index")&&(r.index=t.index,r.input=t.input),r}function pe(t){return typeof t.constructor!="function"||xe(t)?{}:bn(eo(t));
|
||||
}function _e(r,e,u,o){var i=r.constructor;switch(e){case"[object ArrayBuffer]":return Or(r);case"[object Boolean]":case"[object Date]":return new i((+r));case"[object DataView]":return e=o?Or(r.buffer):r.buffer,new r.constructor(e,r.byteOffset,r.byteLength);case"[object Float32Array]":case"[object Float64Array]":case"[object Int8Array]":case"[object Int16Array]":case"[object Int32Array]":case"[object Uint8Array]":case"[object Uint8ClampedArray]":case"[object Uint16Array]":case"[object Uint32Array]":
|
||||
return e=o?Or(r.buffer):r.buffer,new r.constructor(e,r.byteOffset,r.length);case"[object Map]":return e=o?u(U(r),true):U(r),h(e,t,new r.constructor);case"[object Number]":case"[object String]":return new i(r);case"[object RegExp]":return e=new r.constructor(r.source,yt.exec(r)),e.lastIndex=r.lastIndex,e;case"[object Set]":return e=o?u(D(r),true):D(r),h(e,n,new r.constructor);case"[object Symbol]":return Fo?Tu(Fo.call(r)):{}}}function ve(t){return Fi(t)||He(t)||!!(co&&t&&t[co])}function ge(t,n){return n=null==n?9007199254740991:n,
|
||||
!!n&&(typeof t=="number"||At.test(t))&&-1<t&&0==t%1&&t<n}function de(t,n,r){if(!uu(r))return false;var e=typeof n;return!!("number"==e?Qe(r)&&ge(n,r.length):"string"==e&&n in r)&&Ye(r[n],t)}function ye(t,n){if(Fi(t))return false;var r=typeof t;return!("number"!=r&&"symbol"!=r&&"boolean"!=r&&null!=t&&!au(t))||(ut.test(t)||!et.test(t)||null!=n&&t in Tu(n))}function be(t){var n=oe(t),r=It[n];return typeof r=="function"&&n in $t.prototype&&(t===r||(n=Yo(r),!!n&&t===n[0]))}function xe(t){var n=t&&t.constructor;
|
||||
return t===(typeof n=="function"&&n.prototype||Zu)}function je(t,n){return function(r){return null!=r&&(r[t]===n&&(n!==P||t in Tu(r)))}}function we(t,n,r,e,u,o){return uu(t)&&uu(n)&&(o.set(n,t),Xn(t,n,P,we,o),o.delete(n)),t}function me(t,n){return 1==n.length?t:In(t,sr(n,0,-1))}function Ae(t){if(typeof t=="string"||au(t))return t;var n=t+"";return"0"==n&&1/t==-Z?"-0":n}function ke(t){if(null!=t){try{return Ku.call(t)}catch(t){}return t+""}return""}function Ee(t,n){return u(V,function(r){var e="_."+r[0];
|
||||
n&r[1]&&!c(t,e)&&t.push(e)}),t.sort()}function Oe(t){if(t instanceof $t)return t.clone();var n=new Lt(t.__wrapped__,t.__chain__);return n.__actions__=Wr(t.__actions__),n.__index__=t.__index__,n.__values__=t.__values__,n}function Se(t,n,r){var e=t?t.length:0;return e?(r=null==r?0:hu(r),0>r&&(r=xo(e+r,0)),g(t,fe(n,3),r)):-1}function Ie(t,n,r){var e=t?t.length:0;if(!e)return-1;var u=e-1;return r!==P&&(u=hu(r),u=0>r?xo(e+u,0):jo(u,e-1)),g(t,fe(n,3),u,true)}function Re(t){return t&&t.length?t[0]:P}function We(t){
|
||||
var n=t?t.length:0;return n?t[n-1]:P}function Be(t,n){return t&&t.length&&n&&n.length?or(t,n):t}function Le(t){return t?Ao.call(t):t}function Ce(t){if(!t||!t.length)return[];var n=0;return t=f(t,function(t){if(Xe(t))return n=xo(t.length,n),true}),E(n,function(n){return l(t,j(n))})}function Ue(t,n){if(!t||!t.length)return[];var e=Ce(t);return null==n?e:l(e,function(t){return r(n,P,t)})}function Me(t){return t=It(t),t.__chain__=true,t}function ze(t,n){return n(t)}function De(){return this}function Te(t,n){
|
||||
return(Fi(t)?u:Po)(t,fe(n,3))}function $e(t,n){return(Fi(t)?o:Zo)(t,fe(n,3))}function Fe(t,n){return(Fi(t)?l:Yn)(t,fe(n,3))}function Ne(t,n,r){var e=-1,u=lu(t),o=u.length,i=o-1;for(n=(r?de(t,n,r):n===P)?1:vn(hu(n),0,o);++e<n;)t=fr(e,i),r=u[t],u[t]=u[e],u[e]=r;return u.length=n,u}function Pe(t,n,r){return n=r?P:n,n=t&&null==n?t.length:n,re(t,128,P,P,P,P,n)}function Ze(t,n){var r;if(typeof n!="function")throw new Nu("Expected a function");return t=hu(t),function(){return 0<--t&&(r=n.apply(this,arguments)),
|
||||
1>=t&&(n=P),r}}function qe(t,n,r){return n=r?P:n,t=re(t,8,P,P,P,P,P,n),t.placeholder=qe.placeholder,t}function Ve(t,n,r){return n=r?P:n,t=re(t,16,P,P,P,P,P,n),t.placeholder=Ve.placeholder,t}function Ke(t,n,r){function e(n){var r=c,e=a;return c=a=P,_=n,s=t.apply(e,r)}function u(t){var r=t-p;return t-=_,p===P||r>=n||0>r||g&&t>=l}function o(){var t=Ri();if(u(t))return i(t);var r,e=ni;r=t-_,t=n-(t-p),r=g?jo(t,l-r):t,h=e(o,r)}function i(t){return h=P,d&&c?e(t):(c=a=P,s)}function f(){var t=Ri(),r=u(t);if(c=arguments,
|
||||
a=this,p=t,r){if(h===P)return _=t=p,h=ni(o,n),v?e(t):s;if(g)return h=ni(o,n),e(p)}return h===P&&(h=ni(o,n)),s}var c,a,l,s,h,p,_=0,v=false,g=false,d=true;if(typeof t!="function")throw new Nu("Expected a function");return n=_u(n)||0,uu(r)&&(v=!!r.leading,l=(g="maxWait"in r)?xo(_u(r.maxWait)||0,n):l,d="trailing"in r?!!r.trailing:d),f.cancel=function(){h!==P&&Go(h),_=0,c=p=a=h=P},f.flush=function(){return h===P?s:i(Ri())},f}function Ge(t,n){function r(){var e=arguments,u=n?n.apply(this,e):e[0],o=r.cache;return o.has(u)?o.get(u):(e=t.apply(this,e),
|
||||
r.cache=o.set(u,e),e)}if(typeof t!="function"||n&&typeof n!="function")throw new Nu("Expected a function");return r.cache=new(Ge.Cache||qt),r}function Je(t){if(typeof t!="function")throw new Nu("Expected a function");return function(){var n=arguments;switch(n.length){case 0:return!t.call(this);case 1:return!t.call(this,n[0]);case 2:return!t.call(this,n[0],n[1]);case 3:return!t.call(this,n[0],n[1],n[2])}return!t.apply(this,n)}}function Ye(t,n){return t===n||t!==t&&n!==n}function He(t){return Xe(t)&&Gu.call(t,"callee")&&(!io.call(t,"callee")||"[object Arguments]"==Hu.call(t));
|
||||
}function Qe(t){return null!=t&&eu(t.length)&&!nu(t)}function Xe(t){return ou(t)&&Qe(t)}function tu(t){return!!ou(t)&&("[object Error]"==Hu.call(t)||typeof t.message=="string"&&typeof t.name=="string")}function nu(t){return t=uu(t)?Hu.call(t):"","[object Function]"==t||"[object GeneratorFunction]"==t}function ru(t){return typeof t=="number"&&t==hu(t)}function eu(t){return typeof t=="number"&&-1<t&&0==t%1&&9007199254740991>=t}function uu(t){var n=typeof t;return!!t&&("object"==n||"function"==n)}function ou(t){
|
||||
return!!t&&typeof t=="object"}function iu(t){return typeof t=="number"||ou(t)&&"[object Number]"==Hu.call(t)}function fu(t){return!(!ou(t)||"[object Object]"!=Hu.call(t)||C(t))&&(t=eo(t),null===t||(t=Gu.call(t,"constructor")&&t.constructor,typeof t=="function"&&t instanceof t&&Ku.call(t)==Yu))}function cu(t){return typeof t=="string"||!Fi(t)&&ou(t)&&"[object String]"==Hu.call(t)}function au(t){return typeof t=="symbol"||ou(t)&&"[object Symbol]"==Hu.call(t)}function lu(t){if(!t)return[];if(Qe(t))return cu(t)?F(t):Wr(t);
|
||||
if(uo&&t[uo]){t=t[uo]();for(var n,r=[];!(n=t.next()).done;)r.push(n.value);return r}return n=St(t),("[object Map]"==n?U:"[object Set]"==n?D:wu)(t)}function su(t){return t?(t=_u(t),t===Z||t===-Z?1.7976931348623157e308*(0>t?-1:1):t===t?t:0):0===t?t:0}function hu(t){t=su(t);var n=t%1;return t===t?n?t-n:t:0}function pu(t){return t?vn(hu(t),0,4294967295):0}function _u(t){if(typeof t=="number")return t;if(au(t))return q;if(uu(t)&&(t=typeof t.valueOf=="function"?t.valueOf():t,t=uu(t)?t+"":t),typeof t!="string")return 0===t?t:+t;
|
||||
t=t.replace(at,"");var n=jt.test(t);return n||mt.test(t)?Pt(t.slice(2),n?2:8):xt.test(t)?q:+t}function vu(t){return Br(t,xu(t))}function gu(t){return null==t?"":dr(t)}function du(t,n,r){return t=null==t?P:In(t,n),t===P?r:t}function yu(t,n){return null!=t&&se(t,n,Ln)}function bu(t){return Qe(t)?Yt(t):Kn(t)}function xu(t){return Qe(t)?Yt(t,true):Gn(t)}function ju(t,n){return null==t?{}:er(t,Rn(t,xu,Qo),fe(n))}function wu(t){return t?I(t,bu(t)):[]}function mu(t){return jf(gu(t).toLowerCase())}function Au(t){
|
||||
return(t=gu(t))&&t.replace(kt,un).replace(Bt,"")}function ku(t,n,r){return t=gu(t),n=r?P:n,n===P?Mt.test(t)?t.match(Ct)||[]:t.match(vt)||[]:t.match(n)||[]}function Eu(t){return function(){return t}}function Ou(t){return t}function Su(t){return Vn(typeof t=="function"?t:gn(t,true))}function Iu(t,n,r){var e=bu(n),o=Sn(n,e);null!=r||uu(n)&&(o.length||!e.length)||(r=n,n=t,t=this,o=Sn(n,bu(n)));var i=!(uu(r)&&"chain"in r&&!r.chain),f=nu(t);return u(o,function(r){var e=n[r];t[r]=e,f&&(t.prototype[r]=function(){
|
||||
var n=this.__chain__;if(i||n){var r=t(this.__wrapped__);return(r.__actions__=Wr(this.__actions__)).push({func:e,args:arguments,thisArg:t}),r.__chain__=n,r}return e.apply(t,s([this.value()],arguments))})}),t}function Ru(){}function Wu(t){return ye(t)?j(Ae(t)):ur(t)}function Bu(){return[]}function Lu(){return false}w=w?cn.defaults(Vt.Object(),w,cn.pick(Vt,zt)):Vt;var Cu=w.Array,Uu=w.Date,Mu=w.Error,zu=w.Function,Du=w.Math,Tu=w.Object,$u=w.RegExp,Fu=w.String,Nu=w.TypeError,Pu=Cu.prototype,Zu=Tu.prototype,qu=w["__core-js_shared__"],Vu=function(){
|
||||
var t=/[^.]+$/.exec(qu&&qu.keys&&qu.keys.IE_PROTO||"");return t?"Symbol(src)_1."+t:""}(),Ku=zu.prototype.toString,Gu=Zu.hasOwnProperty,Ju=0,Yu=Ku.call(Tu),Hu=Zu.toString,Qu=Vt._,Xu=$u("^"+Ku.call(Gu).replace(ft,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),to=Jt?w.Buffer:P,no=w.Symbol,ro=w.Uint8Array,eo=M(Tu.getPrototypeOf,Tu),uo=no?no.iterator:P,oo=Tu.create,io=Zu.propertyIsEnumerable,fo=Pu.splice,co=no?no.isConcatSpreadable:P,ao=w.clearTimeout!==Vt.clearTimeout&&w.clearTimeout,lo=Uu&&Uu.now!==Vt.Date.now&&Uu.now,so=w.setTimeout!==Vt.setTimeout&&w.setTimeout,ho=Du.ceil,po=Du.floor,_o=Tu.getOwnPropertySymbols,vo=to?to.isBuffer:P,go=w.isFinite,yo=Pu.join,bo=M(Tu.keys,Tu),xo=Du.max,jo=Du.min,wo=w.parseInt,mo=Du.random,Ao=Pu.reverse,ko=le(w,"DataView"),Eo=le(w,"Map"),Oo=le(w,"Promise"),So=le(w,"Set"),Io=le(w,"WeakMap"),Ro=le(Tu,"create"),Wo=function(){
|
||||
var t=le(Tu,"defineProperty"),n=le.name;return n&&2<n.length?t:P}(),Bo=Io&&new Io,Lo=!io.call({valueOf:1},"valueOf"),Co={},Uo=ke(ko),Mo=ke(Eo),zo=ke(Oo),Do=ke(So),To=ke(Io),$o=no?no.prototype:P,Fo=$o?$o.valueOf:P,No=$o?$o.toString:P;It.templateSettings={escape:tt,evaluate:nt,interpolate:rt,variable:"",imports:{_:It}},It.prototype=Rt.prototype,It.prototype.constructor=It,Lt.prototype=bn(Rt.prototype),Lt.prototype.constructor=Lt,$t.prototype=bn(Rt.prototype),$t.prototype.constructor=$t,Ft.prototype.clear=function(){
|
||||
this.__data__=Ro?Ro(null):{}},Ft.prototype.delete=function(t){return this.has(t)&&delete this.__data__[t]},Ft.prototype.get=function(t){var n=this.__data__;return Ro?(t=n[t],"__lodash_hash_undefined__"===t?P:t):Gu.call(n,t)?n[t]:P},Ft.prototype.has=function(t){var n=this.__data__;return Ro?n[t]!==P:Gu.call(n,t)},Ft.prototype.set=function(t,n){return this.__data__[t]=Ro&&n===P?"__lodash_hash_undefined__":n,this},Zt.prototype.clear=function(){this.__data__=[]},Zt.prototype.delete=function(t){var n=this.__data__;
|
||||
return t=sn(n,t),!(0>t)&&(t==n.length-1?n.pop():fo.call(n,t,1),true)},Zt.prototype.get=function(t){var n=this.__data__;return t=sn(n,t),0>t?P:n[t][1]},Zt.prototype.has=function(t){return-1<sn(this.__data__,t)},Zt.prototype.set=function(t,n){var r=this.__data__,e=sn(r,t);return 0>e?r.push([t,n]):r[e][1]=n,this},qt.prototype.clear=function(){this.__data__={hash:new Ft,map:new(Eo||Zt),string:new Ft}},qt.prototype.delete=function(t){return ce(this,t).delete(t)},qt.prototype.get=function(t){return ce(this,t).get(t);
|
||||
},qt.prototype.has=function(t){return ce(this,t).has(t)},qt.prototype.set=function(t,n){return ce(this,t).set(t,n),this},Kt.prototype.add=Kt.prototype.push=function(t){return this.__data__.set(t,"__lodash_hash_undefined__"),this},Kt.prototype.has=function(t){return this.__data__.has(t)},Gt.prototype.clear=function(){this.__data__=new Zt},Gt.prototype.delete=function(t){return this.__data__.delete(t)},Gt.prototype.get=function(t){return this.__data__.get(t)},Gt.prototype.has=function(t){return this.__data__.has(t);
|
||||
},Gt.prototype.set=function(t,n){var r=this.__data__;if(r instanceof Zt){if(r=r.__data__,!Eo||199>r.length)return r.push([t,n]),this;r=this.__data__=new qt(r)}return r.set(t,n),this};var Po=Mr(En),Zo=Mr(On,true),qo=zr(),Vo=zr(true),Ko=Bo?function(t,n){return Bo.set(t,n),t}:Ou,Go=ao||function(t){return Vt.clearTimeout(t)},Jo=So&&1/D(new So([,-0]))[1]==Z?function(t){return new So(t)}:Ru,Yo=Bo?function(t){return Bo.get(t)}:Ru,Ho=_o?M(_o,Tu):Bu,Qo=_o?function(t){for(var n=[];t;)s(n,Ho(t)),t=eo(t);return n;
|
||||
}:Bu;(ko&&"[object DataView]"!=St(new ko(new ArrayBuffer(1)))||Eo&&"[object Map]"!=St(new Eo)||Oo&&"[object Promise]"!=St(Oo.resolve())||So&&"[object Set]"!=St(new So)||Io&&"[object WeakMap]"!=St(new Io))&&(St=function(t){var n=Hu.call(t);if(t=(t="[object Object]"==n?t.constructor:P)?ke(t):P)switch(t){case Uo:return"[object DataView]";case Mo:return"[object Map]";case zo:return"[object Promise]";case Do:return"[object Set]";case To:return"[object WeakMap]"}return n});var Xo=qu?nu:Lu,ti=function(){
|
||||
var t=0,n=0;return function(r,e){var u=Ri(),o=16-(u-n);if(n=u,0<o){if(150<=++t)return r}else t=0;return Ko(r,e)}}(),ni=so||function(t,n){return Vt.setTimeout(t,n)},ri=Wo?function(t,n,r){n+="";var e;e=(e=n.match(pt))?e[1].split(_t):[],r=Ee(e,r),e=r.length;var u=e-1;return r[u]=(1<e?"& ":"")+r[u],r=r.join(2<e?", ":" "),n=n.replace(ht,"{\n/* [wrapped with "+r+"] */\n"),Wo(t,"toString",{configurable:true,enumerable:false,value:Eu(n)})}:Ou,ei=Ge(function(t){t=gu(t);var n=[];return ot.test(t)&&n.push(""),t.replace(it,function(t,r,e,u){
|
||||
n.push(e?u.replace(gt,"$1"):r||t)}),n}),ui=ar(function(t,n){return Xe(t)?jn(t,kn(n,1,Xe,true)):[]}),oi=ar(function(t,n){var r=We(n);return Xe(r)&&(r=P),Xe(t)?jn(t,kn(n,1,Xe,true),fe(r,2)):[]}),ii=ar(function(t,n){var r=We(n);return Xe(r)&&(r=P),Xe(t)?jn(t,kn(n,1,Xe,true),P,r):[]}),fi=ar(function(t){var n=l(t,mr);return n.length&&n[0]===t[0]?Cn(n):[]}),ci=ar(function(t){var n=We(t),r=l(t,mr);return n===We(r)?n=P:r.pop(),r.length&&r[0]===t[0]?Cn(r,fe(n,2)):[]}),ai=ar(function(t){var n=We(t),r=l(t,mr);return n===We(r)?n=P:r.pop(),
|
||||
r.length&&r[0]===t[0]?Cn(r,P,n):[]}),li=ar(Be),si=ar(function(t,n){n=kn(n,1);var r=t?t.length:0,e=_n(t,n);return ir(t,l(n,function(t){return ge(t,r)?+t:t}).sort(Sr)),e}),hi=ar(function(t){return yr(kn(t,1,Xe,true))}),pi=ar(function(t){var n=We(t);return Xe(n)&&(n=P),yr(kn(t,1,Xe,true),fe(n,2))}),_i=ar(function(t){var n=We(t);return Xe(n)&&(n=P),yr(kn(t,1,Xe,true),P,n)}),vi=ar(function(t,n){return Xe(t)?jn(t,n):[]}),gi=ar(function(t){return jr(f(t,Xe))}),di=ar(function(t){var n=We(t);return Xe(n)&&(n=P),
|
||||
jr(f(t,Xe),fe(n,2))}),yi=ar(function(t){var n=We(t);return Xe(n)&&(n=P),jr(f(t,Xe),P,n)}),bi=ar(Ce),xi=ar(function(t){var n=t.length,n=1<n?t[n-1]:P,n=typeof n=="function"?(t.pop(),n):P;return Ue(t,n)}),ji=ar(function(t){function n(n){return _n(n,t)}t=kn(t,1);var r=t.length,e=r?t[0]:0,u=this.__wrapped__;return!(1<r||this.__actions__.length)&&u instanceof $t&&ge(e)?(u=u.slice(e,+e+(r?1:0)),u.__actions__.push({func:ze,args:[n],thisArg:P}),new Lt(u,this.__chain__).thru(function(t){return r&&!t.length&&t.push(P),
|
||||
t})):this.thru(n)}),wi=Cr(function(t,n,r){Gu.call(t,r)?++t[r]:t[r]=1}),mi=Pr(Se),Ai=Pr(Ie),ki=Cr(function(t,n,r){Gu.call(t,r)?t[r].push(n):t[r]=[n]}),Ei=ar(function(t,n,e){var u=-1,o=typeof n=="function",i=ye(n),f=Qe(t)?Cu(t.length):[];return Po(t,function(t){var c=o?n:i&&null!=t?t[n]:P;f[++u]=c?r(c,t,e):Mn(t,n,e)}),f}),Oi=Cr(function(t,n,r){t[r]=n}),Si=Cr(function(t,n,r){t[r?0:1].push(n)},function(){return[[],[]]}),Ii=ar(function(t,n){if(null==t)return[];var r=n.length;return 1<r&&de(t,n[0],n[1])?n=[]:2<r&&de(n[0],n[1],n[2])&&(n=[n[0]]),
|
||||
nr(t,kn(n,1),[])}),Ri=lo||function(){return Vt.Date.now()},Wi=ar(function(t,n,r){var e=1;if(r.length)var u=z(r,ie(Wi)),e=32|e;return re(t,e,n,r,u)}),Bi=ar(function(t,n,r){var e=3;if(r.length)var u=z(r,ie(Bi)),e=32|e;return re(n,e,t,r,u)}),Li=ar(function(t,n){return xn(t,1,n)}),Ci=ar(function(t,n,r){return xn(t,_u(n)||0,r)});Ge.Cache=qt;var Ui=ar(function(t,n){n=1==n.length&&Fi(n[0])?l(n[0],S(fe())):l(kn(n,1),S(fe()));var e=n.length;return ar(function(u){for(var o=-1,i=jo(u.length,e);++o<i;)u[o]=n[o].call(this,u[o]);
|
||||
return r(t,this,u)})}),Mi=ar(function(t,n){var r=z(n,ie(Mi));return re(t,32,P,n,r)}),zi=ar(function(t,n){var r=z(n,ie(zi));return re(t,64,P,n,r)}),Di=ar(function(t,n){return re(t,256,P,P,P,kn(n,1))}),Ti=Qr(Wn),$i=Qr(function(t,n){return t>=n}),Fi=Cu.isArray,Ni=Ht?S(Ht):zn,Pi=vo||Lu,Zi=Qt?S(Qt):Dn,qi=Xt?S(Xt):$n,Vi=tn?S(tn):Pn,Ki=nn?S(nn):Zn,Gi=rn?S(rn):qn,Ji=Qr(Jn),Yi=Qr(function(t,n){return t<=n}),Hi=Ur(function(t,n){if(Lo||xe(n)||Qe(n))Br(n,bu(n),t);else for(var r in n)Gu.call(n,r)&&ln(t,r,n[r]);
|
||||
}),Qi=Ur(function(t,n){Br(n,xu(n),t)}),Xi=Ur(function(t,n,r,e){Br(n,xu(n),t,e)}),tf=Ur(function(t,n,r,e){Br(n,bu(n),t,e)}),nf=ar(function(t,n){return _n(t,kn(n,1))}),rf=ar(function(t){return t.push(P,en),r(Xi,P,t)}),ef=ar(function(t){return t.push(P,we),r(af,P,t)}),uf=Vr(function(t,n,r){t[n]=r},Eu(Ou)),of=Vr(function(t,n,r){Gu.call(t,n)?t[n].push(r):t[n]=[r]},fe),ff=ar(Mn),cf=Ur(function(t,n,r){Xn(t,n,r)}),af=Ur(function(t,n,r,e){Xn(t,n,r,e)}),lf=ar(function(t,n){return null==t?{}:(n=l(kn(n,1),Ae),
|
||||
rr(t,jn(Rn(t,xu,Qo),n)))}),sf=ar(function(t,n){return null==t?{}:rr(t,l(kn(n,1),Ae))}),hf=ne(bu),pf=ne(xu),_f=$r(function(t,n,r){return n=n.toLowerCase(),t+(r?mu(n):n)}),vf=$r(function(t,n,r){return t+(r?"-":"")+n.toLowerCase()}),gf=$r(function(t,n,r){return t+(r?" ":"")+n.toLowerCase()}),df=Tr("toLowerCase"),yf=$r(function(t,n,r){return t+(r?"_":"")+n.toLowerCase()}),bf=$r(function(t,n,r){return t+(r?" ":"")+jf(n)}),xf=$r(function(t,n,r){return t+(r?" ":"")+n.toUpperCase()}),jf=Tr("toUpperCase"),wf=ar(function(t,n){
|
||||
try{return r(t,P,n)}catch(t){return tu(t)?t:new Mu(t)}}),mf=ar(function(t,n){return u(kn(n,1),function(n){n=Ae(n),t[n]=Wi(t[n],t)}),t}),Af=Zr(),kf=Zr(true),Ef=ar(function(t,n){return function(r){return Mn(r,t,n)}}),Of=ar(function(t,n){return function(r){return Mn(t,r,n)}}),Sf=Gr(l),If=Gr(i),Rf=Gr(_),Wf=Hr(),Bf=Hr(true),Lf=Kr(function(t,n){return t+n},0),Cf=te("ceil"),Uf=Kr(function(t,n){return t/n},1),Mf=te("floor"),zf=Kr(function(t,n){return t*n},1),Df=te("round"),Tf=Kr(function(t,n){return t-n},0);return It.after=function(t,n){
|
||||
if(typeof n!="function")throw new Nu("Expected a function");return t=hu(t),function(){if(1>--t)return n.apply(this,arguments)}},It.ary=Pe,It.assign=Hi,It.assignIn=Qi,It.assignInWith=Xi,It.assignWith=tf,It.at=nf,It.before=Ze,It.bind=Wi,It.bindAll=mf,It.bindKey=Bi,It.castArray=function(){if(!arguments.length)return[];var t=arguments[0];return Fi(t)?t:[t]},It.chain=Me,It.chunk=function(t,n,r){if(n=(r?de(t,n,r):n===P)?1:xo(hu(n),0),r=t?t.length:0,!r||1>n)return[];for(var e=0,u=0,o=Cu(ho(r/n));e<r;)o[u++]=sr(t,e,e+=n);
|
||||
return o},It.compact=function(t){for(var n=-1,r=t?t.length:0,e=0,u=[];++n<r;){var o=t[n];o&&(u[e++]=o)}return u},It.concat=function(){for(var t=arguments.length,n=Cu(t?t-1:0),r=arguments[0],e=t;e--;)n[e-1]=arguments[e];return t?s(Fi(r)?Wr(r):[r],kn(n,1)):[]},It.cond=function(t){var n=t?t.length:0,e=fe();return t=n?l(t,function(t){if("function"!=typeof t[1])throw new Nu("Expected a function");return[e(t[0]),t[1]]}):[],ar(function(e){for(var u=-1;++u<n;){var o=t[u];if(r(o[0],this,e))return r(o[1],this,e);
|
||||
}})},It.conforms=function(t){return dn(gn(t,true))},It.constant=Eu,It.countBy=wi,It.create=function(t,n){var r=bn(t);return n?pn(r,n):r},It.curry=qe,It.curryRight=Ve,It.debounce=Ke,It.defaults=rf,It.defaultsDeep=ef,It.defer=Li,It.delay=Ci,It.difference=ui,It.differenceBy=oi,It.differenceWith=ii,It.drop=function(t,n,r){var e=t?t.length:0;return e?(n=r||n===P?1:hu(n),sr(t,0>n?0:n,e)):[]},It.dropRight=function(t,n,r){var e=t?t.length:0;return e?(n=r||n===P?1:hu(n),n=e-n,sr(t,0,0>n?0:n)):[]},It.dropRightWhile=function(t,n){
|
||||
return t&&t.length?br(t,fe(n,3),true,true):[]},It.dropWhile=function(t,n){return t&&t.length?br(t,fe(n,3),true):[]},It.fill=function(t,n,r,e){var u=t?t.length:0;if(!u)return[];for(r&&typeof r!="number"&&de(t,n,r)&&(r=0,e=u),u=t.length,r=hu(r),0>r&&(r=-r>u?0:u+r),e=e===P||e>u?u:hu(e),0>e&&(e+=u),e=r>e?0:pu(e);r<e;)t[r++]=n;return t},It.filter=function(t,n){return(Fi(t)?f:An)(t,fe(n,3))},It.flatMap=function(t,n){return kn(Fe(t,n),1)},It.flatMapDeep=function(t,n){return kn(Fe(t,n),Z)},It.flatMapDepth=function(t,n,r){
|
||||
return r=r===P?1:hu(r),kn(Fe(t,n),r)},It.flatten=function(t){return t&&t.length?kn(t,1):[]},It.flattenDeep=function(t){return t&&t.length?kn(t,Z):[]},It.flattenDepth=function(t,n){return t&&t.length?(n=n===P?1:hu(n),kn(t,n)):[]},It.flip=function(t){return re(t,512)},It.flow=Af,It.flowRight=kf,It.fromPairs=function(t){for(var n=-1,r=t?t.length:0,e={};++n<r;){var u=t[n];e[u[0]]=u[1]}return e},It.functions=function(t){return null==t?[]:Sn(t,bu(t))},It.functionsIn=function(t){return null==t?[]:Sn(t,xu(t));
|
||||
},It.groupBy=ki,It.initial=function(t){return t&&t.length?sr(t,0,-1):[]},It.intersection=fi,It.intersectionBy=ci,It.intersectionWith=ai,It.invert=uf,It.invertBy=of,It.invokeMap=Ei,It.iteratee=Su,It.keyBy=Oi,It.keys=bu,It.keysIn=xu,It.map=Fe,It.mapKeys=function(t,n){var r={};return n=fe(n,3),En(t,function(t,e,u){r[n(t,e,u)]=t}),r},It.mapValues=function(t,n){var r={};return n=fe(n,3),En(t,function(t,e,u){r[e]=n(t,e,u)}),r},It.matches=function(t){return Hn(gn(t,true))},It.matchesProperty=function(t,n){
|
||||
return Qn(t,gn(n,true))},It.memoize=Ge,It.merge=cf,It.mergeWith=af,It.method=Ef,It.methodOf=Of,It.mixin=Iu,It.negate=Je,It.nthArg=function(t){return t=hu(t),ar(function(n){return tr(n,t)})},It.omit=lf,It.omitBy=function(t,n){return ju(t,Je(fe(n)))},It.once=function(t){return Ze(2,t)},It.orderBy=function(t,n,r,e){return null==t?[]:(Fi(n)||(n=null==n?[]:[n]),r=e?P:r,Fi(r)||(r=null==r?[]:[r]),nr(t,n,r))},It.over=Sf,It.overArgs=Ui,It.overEvery=If,It.overSome=Rf,It.partial=Mi,It.partialRight=zi,It.partition=Si,
|
||||
It.pick=sf,It.pickBy=ju,It.property=Wu,It.propertyOf=function(t){return function(n){return null==t?P:In(t,n)}},It.pull=li,It.pullAll=Be,It.pullAllBy=function(t,n,r){return t&&t.length&&n&&n.length?or(t,n,fe(r,2)):t},It.pullAllWith=function(t,n,r){return t&&t.length&&n&&n.length?or(t,n,P,r):t},It.pullAt=si,It.range=Wf,It.rangeRight=Bf,It.rearg=Di,It.reject=function(t,n){return(Fi(t)?f:An)(t,Je(fe(n,3)))},It.remove=function(t,n){var r=[];if(!t||!t.length)return r;var e=-1,u=[],o=t.length;for(n=fe(n,3);++e<o;){
|
||||
var i=t[e];n(i,e,t)&&(r.push(i),u.push(e))}return ir(t,u),r},It.rest=function(t,n){if(typeof t!="function")throw new Nu("Expected a function");return n=n===P?n:hu(n),ar(t,n)},It.reverse=Le,It.sampleSize=Ne,It.set=function(t,n,r){return null==t?t:lr(t,n,r)},It.setWith=function(t,n,r,e){return e=typeof e=="function"?e:P,null==t?t:lr(t,n,r,e)},It.shuffle=function(t){return Ne(t,4294967295)},It.slice=function(t,n,r){var e=t?t.length:0;return e?(r&&typeof r!="number"&&de(t,n,r)?(n=0,r=e):(n=null==n?0:hu(n),
|
||||
r=r===P?e:hu(r)),sr(t,n,r)):[]},It.sortBy=Ii,It.sortedUniq=function(t){return t&&t.length?vr(t):[]},It.sortedUniqBy=function(t,n){return t&&t.length?vr(t,fe(n,2)):[]},It.split=function(t,n,r){return r&&typeof r!="number"&&de(t,n,r)&&(n=r=P),r=r===P?4294967295:r>>>0,r?(t=gu(t))&&(typeof n=="string"||null!=n&&!Vi(n))&&(n=dr(n),!n&&Ut.test(t))?kr(F(t),0,r):t.split(n,r):[]},It.spread=function(t,n){if(typeof t!="function")throw new Nu("Expected a function");return n=n===P?0:xo(hu(n),0),ar(function(e){
|
||||
var u=e[n];return e=kr(e,0,n),u&&s(e,u),r(t,this,e)})},It.tail=function(t){var n=t?t.length:0;return n?sr(t,1,n):[]},It.take=function(t,n,r){return t&&t.length?(n=r||n===P?1:hu(n),sr(t,0,0>n?0:n)):[]},It.takeRight=function(t,n,r){var e=t?t.length:0;return e?(n=r||n===P?1:hu(n),n=e-n,sr(t,0>n?0:n,e)):[]},It.takeRightWhile=function(t,n){return t&&t.length?br(t,fe(n,3),false,true):[]},It.takeWhile=function(t,n){return t&&t.length?br(t,fe(n,3)):[]},It.tap=function(t,n){return n(t),t},It.throttle=function(t,n,r){
|
||||
var e=true,u=true;if(typeof t!="function")throw new Nu("Expected a function");return uu(r)&&(e="leading"in r?!!r.leading:e,u="trailing"in r?!!r.trailing:u),Ke(t,n,{leading:e,maxWait:n,trailing:u})},It.thru=ze,It.toArray=lu,It.toPairs=hf,It.toPairsIn=pf,It.toPath=function(t){return Fi(t)?l(t,Ae):au(t)?[t]:Wr(ei(t))},It.toPlainObject=vu,It.transform=function(t,n,r){var e=Fi(t)||Gi(t);if(n=fe(n,4),null==r)if(e||uu(t)){var o=t.constructor;r=e?Fi(t)?new o:[]:nu(o)?bn(eo(t)):{}}else r={};return(e?u:En)(t,function(t,e,u){
|
||||
return n(r,t,e,u)}),r},It.unary=function(t){return Pe(t,1)},It.union=hi,It.unionBy=pi,It.unionWith=_i,It.uniq=function(t){return t&&t.length?yr(t):[]},It.uniqBy=function(t,n){return t&&t.length?yr(t,fe(n,2)):[]},It.uniqWith=function(t,n){return t&&t.length?yr(t,P,n):[]},It.unset=function(t,n){var r;if(null==t)r=true;else{r=t;var e=n,e=ye(e,r)?[e]:Ar(e);r=me(r,e),e=Ae(We(e)),r=!(null!=r&&Gu.call(r,e))||delete r[e]}return r},It.unzip=Ce,It.unzipWith=Ue,It.update=function(t,n,r){return null==t?t:lr(t,n,(typeof r=="function"?r:Ou)(In(t,n)),void 0);
|
||||
},It.updateWith=function(t,n,r,e){return e=typeof e=="function"?e:P,null!=t&&(t=lr(t,n,(typeof r=="function"?r:Ou)(In(t,n)),e)),t},It.values=wu,It.valuesIn=function(t){return null==t?[]:I(t,xu(t))},It.without=vi,It.words=ku,It.wrap=function(t,n){return n=null==n?Ou:n,Mi(n,t)},It.xor=gi,It.xorBy=di,It.xorWith=yi,It.zip=bi,It.zipObject=function(t,n){return wr(t||[],n||[],ln)},It.zipObjectDeep=function(t,n){return wr(t||[],n||[],lr)},It.zipWith=xi,It.entries=hf,It.entriesIn=pf,It.extend=Qi,It.extendWith=Xi,
|
||||
Iu(It,It),It.add=Lf,It.attempt=wf,It.camelCase=_f,It.capitalize=mu,It.ceil=Cf,It.clamp=function(t,n,r){return r===P&&(r=n,n=P),r!==P&&(r=_u(r),r=r===r?r:0),n!==P&&(n=_u(n),n=n===n?n:0),vn(_u(t),n,r)},It.clone=function(t){return gn(t,false,true)},It.cloneDeep=function(t){return gn(t,true,true)},It.cloneDeepWith=function(t,n){return gn(t,true,true,n)},It.cloneWith=function(t,n){return gn(t,false,true,n)},It.conformsTo=function(t,n){return null==n||yn(t,n,bu(n))},It.deburr=Au,It.defaultTo=function(t,n){return null==t||t!==t?n:t;
|
||||
},It.divide=Uf,It.endsWith=function(t,n,r){t=gu(t),n=dr(n);var e=t.length,e=r=r===P?e:vn(hu(r),0,e);return r-=n.length,0<=r&&t.slice(r,e)==n},It.eq=Ye,It.escape=function(t){return(t=gu(t))&&X.test(t)?t.replace(H,on):t},It.escapeRegExp=function(t){return(t=gu(t))&&ct.test(t)?t.replace(ft,"\\$&"):t},It.every=function(t,n,r){var e=Fi(t)?i:wn;return r&&de(t,n,r)&&(n=P),e(t,fe(n,3))},It.find=mi,It.findIndex=Se,It.findKey=function(t,n){return v(t,fe(n,3),En)},It.findLast=Ai,It.findLastIndex=Ie,It.findLastKey=function(t,n){
|
||||
return v(t,fe(n,3),On)},It.floor=Mf,It.forEach=Te,It.forEachRight=$e,It.forIn=function(t,n){return null==t?t:qo(t,fe(n,3),xu)},It.forInRight=function(t,n){return null==t?t:Vo(t,fe(n,3),xu)},It.forOwn=function(t,n){return t&&En(t,fe(n,3))},It.forOwnRight=function(t,n){return t&&On(t,fe(n,3))},It.get=du,It.gt=Ti,It.gte=$i,It.has=function(t,n){return null!=t&&se(t,n,Bn)},It.hasIn=yu,It.head=Re,It.identity=Ou,It.includes=function(t,n,r,e){return t=Qe(t)?t:wu(t),r=r&&!e?hu(r):0,e=t.length,0>r&&(r=xo(e+r,0)),
|
||||
cu(t)?r<=e&&-1<t.indexOf(n,r):!!e&&-1<d(t,n,r)},It.indexOf=function(t,n,r){var e=t?t.length:0;return e?(r=null==r?0:hu(r),0>r&&(r=xo(e+r,0)),d(t,n,r)):-1},It.inRange=function(t,n,r){return n=su(n),r===P?(r=n,n=0):r=su(r),t=_u(t),t>=jo(n,r)&&t<xo(n,r)},It.invoke=ff,It.isArguments=He,It.isArray=Fi,It.isArrayBuffer=Ni,It.isArrayLike=Qe,It.isArrayLikeObject=Xe,It.isBoolean=function(t){return true===t||false===t||ou(t)&&"[object Boolean]"==Hu.call(t)},It.isBuffer=Pi,It.isDate=Zi,It.isElement=function(t){return!!t&&1===t.nodeType&&ou(t)&&!fu(t);
|
||||
},It.isEmpty=function(t){if(Qe(t)&&(Fi(t)||typeof t=="string"||typeof t.splice=="function"||Pi(t)||He(t)))return!t.length;var n=St(t);if("[object Map]"==n||"[object Set]"==n)return!t.size;if(Lo||xe(t))return!bo(t).length;for(var r in t)if(Gu.call(t,r))return false;return true},It.isEqual=function(t,n){return Tn(t,n)},It.isEqualWith=function(t,n,r){var e=(r=typeof r=="function"?r:P)?r(t,n):P;return e===P?Tn(t,n,r):!!e},It.isError=tu,It.isFinite=function(t){return typeof t=="number"&&go(t)},It.isFunction=nu,
|
||||
It.isInteger=ru,It.isLength=eu,It.isMap=qi,It.isMatch=function(t,n){return t===n||Fn(t,n,ae(n))},It.isMatchWith=function(t,n,r){return r=typeof r=="function"?r:P,Fn(t,n,ae(n),r)},It.isNaN=function(t){return iu(t)&&t!=+t},It.isNative=function(t){if(Xo(t))throw new Mu("This method is not supported with core-js. Try https://github.com/es-shims.");return Nn(t)},It.isNil=function(t){return null==t},It.isNull=function(t){return null===t},It.isNumber=iu,It.isObject=uu,It.isObjectLike=ou,It.isPlainObject=fu,
|
||||
It.isRegExp=Vi,It.isSafeInteger=function(t){return ru(t)&&-9007199254740991<=t&&9007199254740991>=t},It.isSet=Ki,It.isString=cu,It.isSymbol=au,It.isTypedArray=Gi,It.isUndefined=function(t){return t===P},It.isWeakMap=function(t){return ou(t)&&"[object WeakMap]"==St(t)},It.isWeakSet=function(t){return ou(t)&&"[object WeakSet]"==Hu.call(t)},It.join=function(t,n){return t?yo.call(t,n):""},It.kebabCase=vf,It.last=We,It.lastIndexOf=function(t,n,r){var e=t?t.length:0;if(!e)return-1;var u=e;if(r!==P&&(u=hu(r),
|
||||
u=(0>u?xo(e+u,0):jo(u,e-1))+1),n!==n)return g(t,b,u-1,true);for(;u--;)if(t[u]===n)return u;return-1},It.lowerCase=gf,It.lowerFirst=df,It.lt=Ji,It.lte=Yi,It.max=function(t){return t&&t.length?mn(t,Ou,Wn):P},It.maxBy=function(t,n){return t&&t.length?mn(t,fe(n,2),Wn):P},It.mean=function(t){return x(t,Ou)},It.meanBy=function(t,n){return x(t,fe(n,2))},It.min=function(t){return t&&t.length?mn(t,Ou,Jn):P},It.minBy=function(t,n){return t&&t.length?mn(t,fe(n,2),Jn):P},It.stubArray=Bu,It.stubFalse=Lu,It.stubObject=function(){
|
||||
return{}},It.stubString=function(){return""},It.stubTrue=function(){return true},It.multiply=zf,It.nth=function(t,n){return t&&t.length?tr(t,hu(n)):P},It.noConflict=function(){return Vt._===this&&(Vt._=Qu),this},It.noop=Ru,It.now=Ri,It.pad=function(t,n,r){t=gu(t);var e=(n=hu(n))?$(t):0;return!n||e>=n?t:(n=(n-e)/2,Jr(po(n),r)+t+Jr(ho(n),r))},It.padEnd=function(t,n,r){t=gu(t);var e=(n=hu(n))?$(t):0;return n&&e<n?t+Jr(n-e,r):t},It.padStart=function(t,n,r){t=gu(t);var e=(n=hu(n))?$(t):0;return n&&e<n?Jr(n-e,r)+t:t;
|
||||
},It.parseInt=function(t,n,r){return r||null==n?n=0:n&&(n=+n),t=gu(t).replace(at,""),wo(t,n||(bt.test(t)?16:10))},It.random=function(t,n,r){if(r&&typeof r!="boolean"&&de(t,n,r)&&(n=r=P),r===P&&(typeof n=="boolean"?(r=n,n=P):typeof t=="boolean"&&(r=t,t=P)),t===P&&n===P?(t=0,n=1):(t=su(t),n===P?(n=t,t=0):n=su(n)),t>n){var e=t;t=n,n=e}return r||t%1||n%1?(r=mo(),jo(t+r*(n-t+Nt("1e-"+((r+"").length-1))),n)):fr(t,n)},It.reduce=function(t,n,r){var e=Fi(t)?h:m,u=3>arguments.length;return e(t,fe(n,4),r,u,Po);
|
||||
},It.reduceRight=function(t,n,r){var e=Fi(t)?p:m,u=3>arguments.length;return e(t,fe(n,4),r,u,Zo)},It.repeat=function(t,n,r){return n=(r?de(t,n,r):n===P)?1:hu(n),cr(gu(t),n)},It.replace=function(){var t=arguments,n=gu(t[0]);return 3>t.length?n:n.replace(t[1],t[2])},It.result=function(t,n,r){n=ye(n,t)?[n]:Ar(n);var e=-1,u=n.length;for(u||(t=P,u=1);++e<u;){var o=null==t?P:t[Ae(n[e])];o===P&&(e=u,o=r),t=nu(o)?o.call(t):o}return t},It.round=Df,It.runInContext=N,It.sample=function(t){t=Qe(t)?t:wu(t);var n=t.length;
|
||||
return 0<n?t[fr(0,n-1)]:P},It.size=function(t){if(null==t)return 0;if(Qe(t))return cu(t)?$(t):t.length;var n=St(t);return"[object Map]"==n||"[object Set]"==n?t.size:Kn(t).length},It.snakeCase=yf,It.some=function(t,n,r){var e=Fi(t)?_:hr;return r&&de(t,n,r)&&(n=P),e(t,fe(n,3))},It.sortedIndex=function(t,n){return pr(t,n)},It.sortedIndexBy=function(t,n,r){return _r(t,n,fe(r,2))},It.sortedIndexOf=function(t,n){var r=t?t.length:0;if(r){var e=pr(t,n);if(e<r&&Ye(t[e],n))return e}return-1},It.sortedLastIndex=function(t,n){
|
||||
return pr(t,n,true)},It.sortedLastIndexBy=function(t,n,r){return _r(t,n,fe(r,2),true)},It.sortedLastIndexOf=function(t,n){if(t&&t.length){var r=pr(t,n,true)-1;if(Ye(t[r],n))return r}return-1},It.startCase=bf,It.startsWith=function(t,n,r){return t=gu(t),r=vn(hu(r),0,t.length),n=dr(n),t.slice(r,r+n.length)==n},It.subtract=Tf,It.sum=function(t){return t&&t.length?k(t,Ou):0},It.sumBy=function(t,n){return t&&t.length?k(t,fe(n,2)):0},It.template=function(t,n,r){var e=It.templateSettings;r&&de(t,n,r)&&(n=P),t=gu(t),
|
||||
n=Xi({},n,e,en),r=Xi({},n.imports,e.imports,en);var u,o,i=bu(r),f=I(r,i),c=0;r=n.interpolate||Et;var a="__p+='";r=$u((n.escape||Et).source+"|"+r.source+"|"+(r===rt?dt:Et).source+"|"+(n.evaluate||Et).source+"|$","g");var l="sourceURL"in n?"//# sourceURL="+n.sourceURL+"\n":"";if(t.replace(r,function(n,r,e,i,f,l){return e||(e=i),a+=t.slice(c,l).replace(Ot,L),r&&(u=true,a+="'+__e("+r+")+'"),f&&(o=true,a+="';"+f+";\n__p+='"),e&&(a+="'+((__t=("+e+"))==null?'':__t)+'"),c=l+n.length,n}),a+="';",(n=n.variable)||(a="with(obj){"+a+"}"),
|
||||
a=(o?a.replace(K,""):a).replace(G,"$1").replace(J,"$1;"),a="function("+(n||"obj")+"){"+(n?"":"obj||(obj={});")+"var __t,__p=''"+(u?",__e=_.escape":"")+(o?",__j=Array.prototype.join;function print(){__p+=__j.call(arguments,'')}":";")+a+"return __p}",n=wf(function(){return zu(i,l+"return "+a).apply(P,f)}),n.source=a,tu(n))throw n;return n},It.times=function(t,n){if(t=hu(t),1>t||9007199254740991<t)return[];var r=4294967295,e=jo(t,4294967295);for(n=fe(n),t-=4294967295,e=E(e,n);++r<t;)n(r);return e},It.toFinite=su,
|
||||
It.toInteger=hu,It.toLength=pu,It.toLower=function(t){return gu(t).toLowerCase()},It.toNumber=_u,It.toSafeInteger=function(t){return vn(hu(t),-9007199254740991,9007199254740991)},It.toString=gu,It.toUpper=function(t){return gu(t).toUpperCase()},It.trim=function(t,n,r){return(t=gu(t))&&(r||n===P)?t.replace(at,""):t&&(n=dr(n))?(t=F(t),r=F(n),n=W(t,r),r=B(t,r)+1,kr(t,n,r).join("")):t},It.trimEnd=function(t,n,r){return(t=gu(t))&&(r||n===P)?t.replace(st,""):t&&(n=dr(n))?(t=F(t),n=B(t,F(n))+1,kr(t,0,n).join("")):t;
|
||||
},It.trimStart=function(t,n,r){return(t=gu(t))&&(r||n===P)?t.replace(lt,""):t&&(n=dr(n))?(t=F(t),n=W(t,F(n)),kr(t,n).join("")):t},It.truncate=function(t,n){var r=30,e="...";if(uu(n))var u="separator"in n?n.separator:u,r="length"in n?hu(n.length):r,e="omission"in n?dr(n.omission):e;t=gu(t);var o=t.length;if(Ut.test(t))var i=F(t),o=i.length;if(r>=o)return t;if(o=r-$(e),1>o)return e;if(r=i?kr(i,0,o).join(""):t.slice(0,o),u===P)return r+e;if(i&&(o+=r.length-o),Vi(u)){if(t.slice(o).search(u)){var f=r;for(u.global||(u=$u(u.source,gu(yt.exec(u))+"g")),
|
||||
u.lastIndex=0;i=u.exec(f);)var c=i.index;r=r.slice(0,c===P?o:c)}}else t.indexOf(dr(u),o)!=o&&(u=r.lastIndexOf(u),-1<u&&(r=r.slice(0,u)));return r+e},It.unescape=function(t){return(t=gu(t))&&Q.test(t)?t.replace(Y,fn):t},It.uniqueId=function(t){var n=++Ju;return gu(t)+n},It.upperCase=xf,It.upperFirst=jf,It.each=Te,It.eachRight=$e,It.first=Re,Iu(It,function(){var t={};return En(It,function(n,r){Gu.call(It.prototype,r)||(t[r]=n)}),t}(),{chain:false}),It.VERSION="4.15.0",u("bind bindKey curry curryRight partial partialRight".split(" "),function(t){
|
||||
It[t].placeholder=It}),u(["drop","take"],function(t,n){$t.prototype[t]=function(r){var e=this.__filtered__;if(e&&!n)return new $t(this);r=r===P?1:xo(hu(r),0);var u=this.clone();return e?u.__takeCount__=jo(r,u.__takeCount__):u.__views__.push({size:jo(r,4294967295),type:t+(0>u.__dir__?"Right":"")}),u},$t.prototype[t+"Right"]=function(n){return this.reverse()[t](n).reverse()}}),u(["filter","map","takeWhile"],function(t,n){var r=n+1,e=1==r||3==r;$t.prototype[t]=function(t){var n=this.clone();return n.__iteratees__.push({
|
||||
iteratee:fe(t,3),type:r}),n.__filtered__=n.__filtered__||e,n}}),u(["head","last"],function(t,n){var r="take"+(n?"Right":"");$t.prototype[t]=function(){return this[r](1).value()[0]}}),u(["initial","tail"],function(t,n){var r="drop"+(n?"":"Right");$t.prototype[t]=function(){return this.__filtered__?new $t(this):this[r](1)}}),$t.prototype.compact=function(){return this.filter(Ou)},$t.prototype.find=function(t){return this.filter(t).head()},$t.prototype.findLast=function(t){return this.reverse().find(t);
|
||||
},$t.prototype.invokeMap=ar(function(t,n){return typeof t=="function"?new $t(this):this.map(function(r){return Mn(r,t,n)})}),$t.prototype.reject=function(t){return this.filter(Je(fe(t)))},$t.prototype.slice=function(t,n){t=hu(t);var r=this;return r.__filtered__&&(0<t||0>n)?new $t(r):(0>t?r=r.takeRight(-t):t&&(r=r.drop(t)),n!==P&&(n=hu(n),r=0>n?r.dropRight(-n):r.take(n-t)),r)},$t.prototype.takeRightWhile=function(t){return this.reverse().takeWhile(t).reverse()},$t.prototype.toArray=function(){return this.take(4294967295);
|
||||
},En($t.prototype,function(t,n){var r=/^(?:filter|find|map|reject)|While$/.test(n),e=/^(?:head|last)$/.test(n),u=It[e?"take"+("last"==n?"Right":""):n],o=e||/^find/.test(n);u&&(It.prototype[n]=function(){function n(t){return t=u.apply(It,s([t],f)),e&&h?t[0]:t}var i=this.__wrapped__,f=e?[1]:arguments,c=i instanceof $t,a=f[0],l=c||Fi(i);l&&r&&typeof a=="function"&&1!=a.length&&(c=l=false);var h=this.__chain__,p=!!this.__actions__.length,a=o&&!h,c=c&&!p;return!o&&l?(i=c?i:new $t(this),i=t.apply(i,f),i.__actions__.push({
|
||||
func:ze,args:[n],thisArg:P}),new Lt(i,h)):a&&c?t.apply(this,f):(i=this.thru(n),a?e?i.value()[0]:i.value():i)})}),u("pop push shift sort splice unshift".split(" "),function(t){var n=Pu[t],r=/^(?:push|sort|unshift)$/.test(t)?"tap":"thru",e=/^(?:pop|shift)$/.test(t);It.prototype[t]=function(){var t=arguments;if(e&&!this.__chain__){var u=this.value();return n.apply(Fi(u)?u:[],t)}return this[r](function(r){return n.apply(Fi(r)?r:[],t)})}}),En($t.prototype,function(t,n){var r=It[n];if(r){var e=r.name+"";
|
||||
(Co[e]||(Co[e]=[])).push({name:n,func:r})}}),Co[qr(P,2).name]=[{name:"wrapper",func:P}],$t.prototype.clone=function(){var t=new $t(this.__wrapped__);return t.__actions__=Wr(this.__actions__),t.__dir__=this.__dir__,t.__filtered__=this.__filtered__,t.__iteratees__=Wr(this.__iteratees__),t.__takeCount__=this.__takeCount__,t.__views__=Wr(this.__views__),t},$t.prototype.reverse=function(){if(this.__filtered__){var t=new $t(this);t.__dir__=-1,t.__filtered__=true}else t=this.clone(),t.__dir__*=-1;return t;
|
||||
},$t.prototype.value=function(){var t,n=this.__wrapped__.value(),r=this.__dir__,e=Fi(n),u=0>r,o=e?n.length:0;t=o;for(var i=this.__views__,f=0,c=-1,a=i.length;++c<a;){var l=i[c],s=l.size;switch(l.type){case"drop":f+=s;break;case"dropRight":t-=s;break;case"take":t=jo(t,f+s);break;case"takeRight":f=xo(f,t-s)}}if(t={start:f,end:t},i=t.start,f=t.end,t=f-i,u=u?f:i-1,i=this.__iteratees__,f=i.length,c=0,a=jo(t,this.__takeCount__),!e||200>o||o==t&&a==t)return xr(n,this.__actions__);e=[];t:for(;t--&&c<a;){
|
||||
for(u+=r,o=-1,l=n[u];++o<f;){var h=i[o],s=h.type,h=(0,h.iteratee)(l);if(2==s)l=h;else if(!h){if(1==s)continue t;break t}}e[c++]=l}return e},It.prototype.at=ji,It.prototype.chain=function(){return Me(this)},It.prototype.commit=function(){return new Lt(this.value(),this.__chain__)},It.prototype.next=function(){this.__values__===P&&(this.__values__=lu(this.value()));var t=this.__index__>=this.__values__.length,n=t?P:this.__values__[this.__index__++];return{done:t,value:n}},It.prototype.plant=function(t){
|
||||
for(var n,r=this;r instanceof Rt;){var e=Oe(r);e.__index__=0,e.__values__=P,n?u.__wrapped__=e:n=e;var u=e,r=r.__wrapped__}return u.__wrapped__=t,n},It.prototype.reverse=function(){var t=this.__wrapped__;return t instanceof $t?(this.__actions__.length&&(t=new $t(this)),t=t.reverse(),t.__actions__.push({func:ze,args:[Le],thisArg:P}),new Lt(t,this.__chain__)):this.thru(Le)},It.prototype.toJSON=It.prototype.valueOf=It.prototype.value=function(){return xr(this.__wrapped__,this.__actions__)},It.prototype.first=It.prototype.head,
|
||||
uo&&(It.prototype[uo]=De),It}var P,Z=1/0,q=NaN,V=[["ary",128],["bind",1],["bindKey",2],["curry",8],["curryRight",16],["flip",512],["partial",32],["partialRight",64],["rearg",256]],K=/\b__p\+='';/g,G=/\b(__p\+=)''\+/g,J=/(__e\(.*?\)|\b__t\))\+'';/g,Y=/&(?:amp|lt|gt|quot|#39|#96);/g,H=/[&<>"'`]/g,Q=RegExp(Y.source),X=RegExp(H.source),tt=/<%-([\s\S]+?)%>/g,nt=/<%([\s\S]+?)%>/g,rt=/<%=([\s\S]+?)%>/g,et=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,ut=/^\w*$/,ot=/^\./,it=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,ft=/[\\^$.*+?()[\]{}|]/g,ct=RegExp(ft.source),at=/^\s+|\s+$/g,lt=/^\s+/,st=/\s+$/,ht=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,pt=/\{\n\/\* \[wrapped with (.+)\] \*/,_t=/,? & /,vt=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,gt=/\\(\\)?/g,dt=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,yt=/\w*$/,bt=/^0x/i,xt=/^[-+]0x[0-9a-f]+$/i,jt=/^0b[01]+$/i,wt=/^\[object .+?Constructor\]$/,mt=/^0o[0-7]+$/i,At=/^(?:0|[1-9]\d*)$/,kt=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,Et=/($^)/,Ot=/['\n\r\u2028\u2029\\]/g,St="[\\ufe0e\\ufe0f]?(?:[\\u0300-\\u036f\\ufe20-\\ufe23\\u20d0-\\u20f0]|\\ud83c[\\udffb-\\udfff])?(?:\\u200d(?:[^\\ud800-\\udfff]|(?:\\ud83c[\\udde6-\\uddff]){2}|[\\ud800-\\udbff][\\udc00-\\udfff])[\\ufe0e\\ufe0f]?(?:[\\u0300-\\u036f\\ufe20-\\ufe23\\u20d0-\\u20f0]|\\ud83c[\\udffb-\\udfff])?)*",It="(?:[\\u2700-\\u27bf]|(?:\\ud83c[\\udde6-\\uddff]){2}|[\\ud800-\\udbff][\\udc00-\\udfff])"+St,Rt="(?:[^\\ud800-\\udfff][\\u0300-\\u036f\\ufe20-\\ufe23\\u20d0-\\u20f0]?|[\\u0300-\\u036f\\ufe20-\\ufe23\\u20d0-\\u20f0]|(?:\\ud83c[\\udde6-\\uddff]){2}|[\\ud800-\\udbff][\\udc00-\\udfff]|[\\ud800-\\udfff])",Wt=RegExp("['\u2019]","g"),Bt=RegExp("[\\u0300-\\u036f\\ufe20-\\ufe23\\u20d0-\\u20f0]","g"),Lt=RegExp("\\ud83c[\\udffb-\\udfff](?=\\ud83c[\\udffb-\\udfff])|"+Rt+St,"g"),Ct=RegExp(["[A-Z\\xc0-\\xd6\\xd8-\\xde]?[a-z\\xdf-\\xf6\\xf8-\\xff]+(?:['\u2019](?:d|ll|m|re|s|t|ve))?(?=[\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000]|[A-Z\\xc0-\\xd6\\xd8-\\xde]|$)|(?:[A-Z\\xc0-\\xd6\\xd8-\\xde]|[^\\ud800-\\udfff\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000\\d+\\u2700-\\u27bfa-z\\xdf-\\xf6\\xf8-\\xffA-Z\\xc0-\\xd6\\xd8-\\xde])+(?:['\u2019](?:D|LL|M|RE|S|T|VE))?(?=[\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000]|[A-Z\\xc0-\\xd6\\xd8-\\xde](?:[a-z\\xdf-\\xf6\\xf8-\\xff]|[^\\ud800-\\udfff\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000\\d+\\u2700-\\u27bfa-z\\xdf-\\xf6\\xf8-\\xffA-Z\\xc0-\\xd6\\xd8-\\xde])|$)|[A-Z\\xc0-\\xd6\\xd8-\\xde]?(?:[a-z\\xdf-\\xf6\\xf8-\\xff]|[^\\ud800-\\udfff\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000\\d+\\u2700-\\u27bfa-z\\xdf-\\xf6\\xf8-\\xffA-Z\\xc0-\\xd6\\xd8-\\xde])+(?:['\u2019](?:d|ll|m|re|s|t|ve))?|[A-Z\\xc0-\\xd6\\xd8-\\xde]+(?:['\u2019](?:D|LL|M|RE|S|T|VE))?|\\d+",It].join("|"),"g"),Ut=RegExp("[\\u200d\\ud800-\\udfff\\u0300-\\u036f\\ufe20-\\ufe23\\u20d0-\\u20f0\\ufe0e\\ufe0f]"),Mt=/[a-z][A-Z]|[A-Z]{2,}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,zt="Array Buffer DataView Date Error Float32Array Float64Array Function Int8Array Int16Array Int32Array Map Math Object Promise RegExp Set String Symbol TypeError Uint8Array Uint8ClampedArray Uint16Array Uint32Array WeakMap _ clearTimeout isFinite parseInt setTimeout".split(" "),Dt={};
|
||||
Dt["[object Float32Array]"]=Dt["[object Float64Array]"]=Dt["[object Int8Array]"]=Dt["[object Int16Array]"]=Dt["[object Int32Array]"]=Dt["[object Uint8Array]"]=Dt["[object Uint8ClampedArray]"]=Dt["[object Uint16Array]"]=Dt["[object Uint32Array]"]=true,Dt["[object Arguments]"]=Dt["[object Array]"]=Dt["[object ArrayBuffer]"]=Dt["[object Boolean]"]=Dt["[object DataView]"]=Dt["[object Date]"]=Dt["[object Error]"]=Dt["[object Function]"]=Dt["[object Map]"]=Dt["[object Number]"]=Dt["[object Object]"]=Dt["[object RegExp]"]=Dt["[object Set]"]=Dt["[object String]"]=Dt["[object WeakMap]"]=false;
|
||||
var Tt={};Tt["[object Arguments]"]=Tt["[object Array]"]=Tt["[object ArrayBuffer]"]=Tt["[object DataView]"]=Tt["[object Boolean]"]=Tt["[object Date]"]=Tt["[object Float32Array]"]=Tt["[object Float64Array]"]=Tt["[object Int8Array]"]=Tt["[object Int16Array]"]=Tt["[object Int32Array]"]=Tt["[object Map]"]=Tt["[object Number]"]=Tt["[object Object]"]=Tt["[object RegExp]"]=Tt["[object Set]"]=Tt["[object String]"]=Tt["[object Symbol]"]=Tt["[object Uint8Array]"]=Tt["[object Uint8ClampedArray]"]=Tt["[object Uint16Array]"]=Tt["[object Uint32Array]"]=true,
|
||||
Tt["[object Error]"]=Tt["[object Function]"]=Tt["[object WeakMap]"]=false;var $t,Ft={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},Nt=parseFloat,Pt=parseInt,Zt=typeof global=="object"&&global&&global.Object===Object&&global,qt=typeof self=="object"&&self&&self.Object===Object&&self,Vt=Zt||qt||Function("return this")(),Kt=typeof exports=="object"&&exports&&!exports.nodeType&&exports,Gt=Kt&&typeof module=="object"&&module&&!module.nodeType&&module,Jt=Gt&&Gt.exports===Kt,Yt=Jt&&Zt.g;
|
||||
t:{try{$t=Yt&&Yt.f("util");break t}catch(t){}$t=void 0}var Ht=$t&&$t.isArrayBuffer,Qt=$t&&$t.isDate,Xt=$t&&$t.isMap,tn=$t&&$t.isRegExp,nn=$t&&$t.isSet,rn=$t&&$t.isTypedArray,en=j("length"),un=w({"\xc0":"A","\xc1":"A","\xc2":"A","\xc3":"A","\xc4":"A","\xc5":"A","\xe0":"a","\xe1":"a","\xe2":"a","\xe3":"a","\xe4":"a","\xe5":"a","\xc7":"C","\xe7":"c","\xd0":"D","\xf0":"d","\xc8":"E","\xc9":"E","\xca":"E","\xcb":"E","\xe8":"e","\xe9":"e","\xea":"e","\xeb":"e","\xcc":"I","\xcd":"I","\xce":"I","\xcf":"I",
|
||||
"\xec":"i","\xed":"i","\xee":"i","\xef":"i","\xd1":"N","\xf1":"n","\xd2":"O","\xd3":"O","\xd4":"O","\xd5":"O","\xd6":"O","\xd8":"O","\xf2":"o","\xf3":"o","\xf4":"o","\xf5":"o","\xf6":"o","\xf8":"o","\xd9":"U","\xda":"U","\xdb":"U","\xdc":"U","\xf9":"u","\xfa":"u","\xfb":"u","\xfc":"u","\xdd":"Y","\xfd":"y","\xff":"y","\xc6":"Ae","\xe6":"ae","\xde":"Th","\xfe":"th","\xdf":"ss","\u0100":"A","\u0102":"A","\u0104":"A","\u0101":"a","\u0103":"a","\u0105":"a","\u0106":"C","\u0108":"C","\u010a":"C","\u010c":"C",
|
||||
"\u0107":"c","\u0109":"c","\u010b":"c","\u010d":"c","\u010e":"D","\u0110":"D","\u010f":"d","\u0111":"d","\u0112":"E","\u0114":"E","\u0116":"E","\u0118":"E","\u011a":"E","\u0113":"e","\u0115":"e","\u0117":"e","\u0119":"e","\u011b":"e","\u011c":"G","\u011e":"G","\u0120":"G","\u0122":"G","\u011d":"g","\u011f":"g","\u0121":"g","\u0123":"g","\u0124":"H","\u0126":"H","\u0125":"h","\u0127":"h","\u0128":"I","\u012a":"I","\u012c":"I","\u012e":"I","\u0130":"I","\u0129":"i","\u012b":"i","\u012d":"i","\u012f":"i",
|
||||
"\u0131":"i","\u0134":"J","\u0135":"j","\u0136":"K","\u0137":"k","\u0138":"k","\u0139":"L","\u013b":"L","\u013d":"L","\u013f":"L","\u0141":"L","\u013a":"l","\u013c":"l","\u013e":"l","\u0140":"l","\u0142":"l","\u0143":"N","\u0145":"N","\u0147":"N","\u014a":"N","\u0144":"n","\u0146":"n","\u0148":"n","\u014b":"n","\u014c":"O","\u014e":"O","\u0150":"O","\u014d":"o","\u014f":"o","\u0151":"o","\u0154":"R","\u0156":"R","\u0158":"R","\u0155":"r","\u0157":"r","\u0159":"r","\u015a":"S","\u015c":"S","\u015e":"S",
|
||||
"\u0160":"S","\u015b":"s","\u015d":"s","\u015f":"s","\u0161":"s","\u0162":"T","\u0164":"T","\u0166":"T","\u0163":"t","\u0165":"t","\u0167":"t","\u0168":"U","\u016a":"U","\u016c":"U","\u016e":"U","\u0170":"U","\u0172":"U","\u0169":"u","\u016b":"u","\u016d":"u","\u016f":"u","\u0171":"u","\u0173":"u","\u0174":"W","\u0175":"w","\u0176":"Y","\u0177":"y","\u0178":"Y","\u0179":"Z","\u017b":"Z","\u017d":"Z","\u017a":"z","\u017c":"z","\u017e":"z","\u0132":"IJ","\u0133":"ij","\u0152":"Oe","\u0153":"oe","\u0149":"'n",
|
||||
"\u017f":"ss"}),on=w({"&":"&","<":"<",">":">",'"':""","'":"'","`":"`"}),fn=w({"&":"&","<":"<",">":">",""":'"',"'":"'","`":"`"}),cn=N();typeof define=="function"&&typeof define.amd=="object"&&define.amd?(Vt._=cn, define(function(){return cn})):Gt?((Gt.exports=cn)._=cn,Kt._=cn):Vt._=cn}).call(this);
|
||||
|
|
@ -1,424 +0,0 @@
|
|||
(function webpackUniversalModuleDefinition(root, factory) {
|
||||
if(typeof exports === 'object' && typeof module === 'object')
|
||||
module.exports = factory();
|
||||
else if(typeof define === 'function' && define.amd)
|
||||
define([], factory);
|
||||
else if(typeof exports === 'object')
|
||||
exports["mapping"] = factory();
|
||||
else
|
||||
root["mapping"] = factory();
|
||||
})(this, function() {
|
||||
return /******/ (function(modules) { // webpackBootstrap
|
||||
/******/ // The module cache
|
||||
/******/ var installedModules = {};
|
||||
|
||||
/******/ // The require function
|
||||
/******/ function __webpack_require__(moduleId) {
|
||||
|
||||
/******/ // Check if module is in cache
|
||||
/******/ if(installedModules[moduleId])
|
||||
/******/ return installedModules[moduleId].exports;
|
||||
|
||||
/******/ // Create a new module (and put it into the cache)
|
||||
/******/ var module = installedModules[moduleId] = {
|
||||
/******/ exports: {},
|
||||
/******/ id: moduleId,
|
||||
/******/ loaded: false
|
||||
/******/ };
|
||||
|
||||
/******/ // Execute the module function
|
||||
/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
|
||||
|
||||
/******/ // Flag the module as loaded
|
||||
/******/ module.loaded = true;
|
||||
|
||||
/******/ // Return the exports of the module
|
||||
/******/ return module.exports;
|
||||
/******/ }
|
||||
|
||||
|
||||
/******/ // expose the modules object (__webpack_modules__)
|
||||
/******/ __webpack_require__.m = modules;
|
||||
|
||||
/******/ // expose the module cache
|
||||
/******/ __webpack_require__.c = installedModules;
|
||||
|
||||
/******/ // __webpack_public_path__
|
||||
/******/ __webpack_require__.p = "";
|
||||
|
||||
/******/ // Load entry module and return exports
|
||||
/******/ return __webpack_require__(0);
|
||||
/******/ })
|
||||
/************************************************************************/
|
||||
/******/ ([
|
||||
/* 0 */
|
||||
/***/ function(module, exports) {
|
||||
|
||||
/** Used to map aliases to their real names. */
|
||||
exports.aliasToReal = {
|
||||
|
||||
// Lodash aliases.
|
||||
'each': 'forEach',
|
||||
'eachRight': 'forEachRight',
|
||||
'entries': 'toPairs',
|
||||
'entriesIn': 'toPairsIn',
|
||||
'extend': 'assignIn',
|
||||
'extendAll': 'assignInAll',
|
||||
'extendAllWith': 'assignInAllWith',
|
||||
'extendWith': 'assignInWith',
|
||||
'first': 'head',
|
||||
|
||||
// Methods that are curried variants of others.
|
||||
'conforms': 'conformsTo',
|
||||
'matches': 'isMatch',
|
||||
'property': 'get',
|
||||
|
||||
// Ramda aliases.
|
||||
'__': 'placeholder',
|
||||
'F': 'stubFalse',
|
||||
'T': 'stubTrue',
|
||||
'all': 'every',
|
||||
'allPass': 'overEvery',
|
||||
'always': 'constant',
|
||||
'any': 'some',
|
||||
'anyPass': 'overSome',
|
||||
'apply': 'spread',
|
||||
'assoc': 'set',
|
||||
'assocPath': 'set',
|
||||
'complement': 'negate',
|
||||
'compose': 'flowRight',
|
||||
'contains': 'includes',
|
||||
'dissoc': 'unset',
|
||||
'dissocPath': 'unset',
|
||||
'dropLast': 'dropRight',
|
||||
'dropLastWhile': 'dropRightWhile',
|
||||
'equals': 'isEqual',
|
||||
'identical': 'eq',
|
||||
'indexBy': 'keyBy',
|
||||
'init': 'initial',
|
||||
'invertObj': 'invert',
|
||||
'juxt': 'over',
|
||||
'omitAll': 'omit',
|
||||
'nAry': 'ary',
|
||||
'path': 'get',
|
||||
'pathEq': 'matchesProperty',
|
||||
'pathOr': 'getOr',
|
||||
'paths': 'at',
|
||||
'pickAll': 'pick',
|
||||
'pipe': 'flow',
|
||||
'pluck': 'map',
|
||||
'prop': 'get',
|
||||
'propEq': 'matchesProperty',
|
||||
'propOr': 'getOr',
|
||||
'props': 'at',
|
||||
'symmetricDifference': 'xor',
|
||||
'symmetricDifferenceBy': 'xorBy',
|
||||
'symmetricDifferenceWith': 'xorWith',
|
||||
'takeLast': 'takeRight',
|
||||
'takeLastWhile': 'takeRightWhile',
|
||||
'unapply': 'rest',
|
||||
'unnest': 'flatten',
|
||||
'useWith': 'overArgs',
|
||||
'where': 'conformsTo',
|
||||
'whereEq': 'isMatch',
|
||||
'zipObj': 'zipObject'
|
||||
};
|
||||
|
||||
/** Used to map ary to method names. */
|
||||
exports.aryMethod = {
|
||||
'1': [
|
||||
'assignAll', 'assignInAll', 'attempt', 'castArray', 'ceil', 'create',
|
||||
'curry', 'curryRight', 'defaultsAll', 'defaultsDeepAll', 'floor', 'flow',
|
||||
'flowRight', 'fromPairs', 'invert', 'iteratee', 'memoize', 'method', 'mergeAll',
|
||||
'methodOf', 'mixin', 'nthArg', 'over', 'overEvery', 'overSome','rest', 'reverse',
|
||||
'round', 'runInContext', 'spread', 'template', 'trim', 'trimEnd', 'trimStart',
|
||||
'uniqueId', 'words', 'zipAll'
|
||||
],
|
||||
'2': [
|
||||
'add', 'after', 'ary', 'assign', 'assignAllWith', 'assignIn', 'assignInAllWith',
|
||||
'at', 'before', 'bind', 'bindAll', 'bindKey', 'chunk', 'cloneDeepWith',
|
||||
'cloneWith', 'concat', 'conformsTo', 'countBy', 'curryN', 'curryRightN',
|
||||
'debounce', 'defaults', 'defaultsDeep', 'defaultTo', 'delay', 'difference',
|
||||
'divide', 'drop', 'dropRight', 'dropRightWhile', 'dropWhile', 'endsWith', 'eq',
|
||||
'every', 'filter', 'find', 'findIndex', 'findKey', 'findLast', 'findLastIndex',
|
||||
'findLastKey', 'flatMap', 'flatMapDeep', 'flattenDepth', 'forEach',
|
||||
'forEachRight', 'forIn', 'forInRight', 'forOwn', 'forOwnRight', 'get',
|
||||
'groupBy', 'gt', 'gte', 'has', 'hasIn', 'includes', 'indexOf', 'intersection',
|
||||
'invertBy', 'invoke', 'invokeMap', 'isEqual', 'isMatch', 'join', 'keyBy',
|
||||
'lastIndexOf', 'lt', 'lte', 'map', 'mapKeys', 'mapValues', 'matchesProperty',
|
||||
'maxBy', 'meanBy', 'merge', 'mergeAllWith', 'minBy', 'multiply', 'nth', 'omit',
|
||||
'omitBy', 'overArgs', 'pad', 'padEnd', 'padStart', 'parseInt', 'partial',
|
||||
'partialRight', 'partition', 'pick', 'pickBy', 'propertyOf', 'pull', 'pullAll',
|
||||
'pullAt', 'random', 'range', 'rangeRight', 'rearg', 'reject', 'remove',
|
||||
'repeat', 'restFrom', 'result', 'sampleSize', 'some', 'sortBy', 'sortedIndex',
|
||||
'sortedIndexOf', 'sortedLastIndex', 'sortedLastIndexOf', 'sortedUniqBy',
|
||||
'split', 'spreadFrom', 'startsWith', 'subtract', 'sumBy', 'take', 'takeRight',
|
||||
'takeRightWhile', 'takeWhile', 'tap', 'throttle', 'thru', 'times', 'trimChars',
|
||||
'trimCharsEnd', 'trimCharsStart', 'truncate', 'union', 'uniqBy', 'uniqWith',
|
||||
'unset', 'unzipWith', 'without', 'wrap', 'xor', 'zip', 'zipObject',
|
||||
'zipObjectDeep'
|
||||
],
|
||||
'3': [
|
||||
'assignInWith', 'assignWith', 'clamp', 'differenceBy', 'differenceWith',
|
||||
'findFrom', 'findIndexFrom', 'findLastFrom', 'findLastIndexFrom', 'getOr',
|
||||
'includesFrom', 'indexOfFrom', 'inRange', 'intersectionBy', 'intersectionWith',
|
||||
'invokeArgs', 'invokeArgsMap', 'isEqualWith', 'isMatchWith', 'flatMapDepth',
|
||||
'lastIndexOfFrom', 'mergeWith', 'orderBy', 'padChars', 'padCharsEnd',
|
||||
'padCharsStart', 'pullAllBy', 'pullAllWith', 'reduce', 'reduceRight', 'replace',
|
||||
'set', 'slice', 'sortedIndexBy', 'sortedLastIndexBy', 'transform', 'unionBy',
|
||||
'unionWith', 'update', 'xorBy', 'xorWith', 'zipWith'
|
||||
],
|
||||
'4': [
|
||||
'fill', 'setWith', 'updateWith'
|
||||
]
|
||||
};
|
||||
|
||||
/** Used to map ary to rearg configs. */
|
||||
exports.aryRearg = {
|
||||
'2': [1, 0],
|
||||
'3': [2, 0, 1],
|
||||
'4': [3, 2, 0, 1]
|
||||
};
|
||||
|
||||
/** Used to map method names to their iteratee ary. */
|
||||
exports.iterateeAry = {
|
||||
'dropRightWhile': 1,
|
||||
'dropWhile': 1,
|
||||
'every': 1,
|
||||
'filter': 1,
|
||||
'find': 1,
|
||||
'findFrom': 1,
|
||||
'findIndex': 1,
|
||||
'findIndexFrom': 1,
|
||||
'findKey': 1,
|
||||
'findLast': 1,
|
||||
'findLastFrom': 1,
|
||||
'findLastIndex': 1,
|
||||
'findLastIndexFrom': 1,
|
||||
'findLastKey': 1,
|
||||
'flatMap': 1,
|
||||
'flatMapDeep': 1,
|
||||
'flatMapDepth': 1,
|
||||
'forEach': 1,
|
||||
'forEachRight': 1,
|
||||
'forIn': 1,
|
||||
'forInRight': 1,
|
||||
'forOwn': 1,
|
||||
'forOwnRight': 1,
|
||||
'map': 1,
|
||||
'mapKeys': 1,
|
||||
'mapValues': 1,
|
||||
'partition': 1,
|
||||
'reduce': 2,
|
||||
'reduceRight': 2,
|
||||
'reject': 1,
|
||||
'remove': 1,
|
||||
'some': 1,
|
||||
'takeRightWhile': 1,
|
||||
'takeWhile': 1,
|
||||
'times': 1,
|
||||
'transform': 2
|
||||
};
|
||||
|
||||
/** Used to map method names to iteratee rearg configs. */
|
||||
exports.iterateeRearg = {
|
||||
'mapKeys': [1]
|
||||
};
|
||||
|
||||
/** Used to map method names to rearg configs. */
|
||||
exports.methodRearg = {
|
||||
'assignInAllWith': [1, 2, 0],
|
||||
'assignInWith': [1, 2, 0],
|
||||
'assignAllWith': [1, 2, 0],
|
||||
'assignWith': [1, 2, 0],
|
||||
'differenceBy': [1, 2, 0],
|
||||
'differenceWith': [1, 2, 0],
|
||||
'getOr': [2, 1, 0],
|
||||
'intersectionBy': [1, 2, 0],
|
||||
'intersectionWith': [1, 2, 0],
|
||||
'isEqualWith': [1, 2, 0],
|
||||
'isMatchWith': [2, 1, 0],
|
||||
'mergeAllWith': [1, 2, 0],
|
||||
'mergeWith': [1, 2, 0],
|
||||
'padChars': [2, 1, 0],
|
||||
'padCharsEnd': [2, 1, 0],
|
||||
'padCharsStart': [2, 1, 0],
|
||||
'pullAllBy': [2, 1, 0],
|
||||
'pullAllWith': [2, 1, 0],
|
||||
'setWith': [3, 1, 2, 0],
|
||||
'sortedIndexBy': [2, 1, 0],
|
||||
'sortedLastIndexBy': [2, 1, 0],
|
||||
'unionBy': [1, 2, 0],
|
||||
'unionWith': [1, 2, 0],
|
||||
'updateWith': [3, 1, 2, 0],
|
||||
'xorBy': [1, 2, 0],
|
||||
'xorWith': [1, 2, 0],
|
||||
'zipWith': [1, 2, 0]
|
||||
};
|
||||
|
||||
/** Used to map method names to spread configs. */
|
||||
exports.methodSpread = {
|
||||
'assignAll': { 'start': 0 },
|
||||
'assignAllWith': { 'afterRearg': true, 'start': 1 },
|
||||
'assignInAll': { 'start': 0 },
|
||||
'assignInAllWith': { 'afterRearg': true, 'start': 1 },
|
||||
'defaultsAll': { 'start': 0 },
|
||||
'defaultsDeepAll': { 'start': 0 },
|
||||
'invokeArgs': { 'start': 2 },
|
||||
'invokeArgsMap': { 'start': 2 },
|
||||
'mergeAll': { 'start': 0 },
|
||||
'mergeAllWith': { 'afterRearg': true, 'start': 1 },
|
||||
'partial': { 'start': 1 },
|
||||
'partialRight': { 'start': 1 },
|
||||
'without': { 'start': 1 },
|
||||
'zipAll': { 'start': 0 }
|
||||
};
|
||||
|
||||
/** Used to identify methods which mutate arrays or objects. */
|
||||
exports.mutate = {
|
||||
'array': {
|
||||
'fill': true,
|
||||
'pull': true,
|
||||
'pullAll': true,
|
||||
'pullAllBy': true,
|
||||
'pullAllWith': true,
|
||||
'pullAt': true,
|
||||
'remove': true,
|
||||
'reverse': true
|
||||
},
|
||||
'object': {
|
||||
'assign': true,
|
||||
'assignAll': true,
|
||||
'assignAllWith': true,
|
||||
'assignIn': true,
|
||||
'assignInAll': true,
|
||||
'assignInAllWith': true,
|
||||
'assignInWith': true,
|
||||
'assignWith': true,
|
||||
'defaults': true,
|
||||
'defaultsAll': true,
|
||||
'defaultsDeep': true,
|
||||
'defaultsDeepAll': true,
|
||||
'merge': true,
|
||||
'mergeAll': true,
|
||||
'mergeAllWith': true,
|
||||
'mergeWith': true,
|
||||
},
|
||||
'set': {
|
||||
'set': true,
|
||||
'setWith': true,
|
||||
'unset': true,
|
||||
'update': true,
|
||||
'updateWith': true
|
||||
}
|
||||
};
|
||||
|
||||
/** Used to track methods with placeholder support */
|
||||
exports.placeholder = {
|
||||
'bind': true,
|
||||
'bindKey': true,
|
||||
'curry': true,
|
||||
'curryRight': true,
|
||||
'partial': true,
|
||||
'partialRight': true
|
||||
};
|
||||
|
||||
/** Used to map real names to their aliases. */
|
||||
exports.realToAlias = (function() {
|
||||
var hasOwnProperty = Object.prototype.hasOwnProperty,
|
||||
object = exports.aliasToReal,
|
||||
result = {};
|
||||
|
||||
for (var key in object) {
|
||||
var value = object[key];
|
||||
if (hasOwnProperty.call(result, value)) {
|
||||
result[value].push(key);
|
||||
} else {
|
||||
result[value] = [key];
|
||||
}
|
||||
}
|
||||
return result;
|
||||
}());
|
||||
|
||||
/** Used to map method names to other names. */
|
||||
exports.remap = {
|
||||
'assignAll': 'assign',
|
||||
'assignAllWith': 'assignWith',
|
||||
'assignInAll': 'assignIn',
|
||||
'assignInAllWith': 'assignInWith',
|
||||
'curryN': 'curry',
|
||||
'curryRightN': 'curryRight',
|
||||
'defaultsAll': 'defaults',
|
||||
'defaultsDeepAll': 'defaultsDeep',
|
||||
'findFrom': 'find',
|
||||
'findIndexFrom': 'findIndex',
|
||||
'findLastFrom': 'findLast',
|
||||
'findLastIndexFrom': 'findLastIndex',
|
||||
'getOr': 'get',
|
||||
'includesFrom': 'includes',
|
||||
'indexOfFrom': 'indexOf',
|
||||
'invokeArgs': 'invoke',
|
||||
'invokeArgsMap': 'invokeMap',
|
||||
'lastIndexOfFrom': 'lastIndexOf',
|
||||
'mergeAll': 'merge',
|
||||
'mergeAllWith': 'mergeWith',
|
||||
'padChars': 'pad',
|
||||
'padCharsEnd': 'padEnd',
|
||||
'padCharsStart': 'padStart',
|
||||
'propertyOf': 'get',
|
||||
'restFrom': 'rest',
|
||||
'spreadFrom': 'spread',
|
||||
'trimChars': 'trim',
|
||||
'trimCharsEnd': 'trimEnd',
|
||||
'trimCharsStart': 'trimStart',
|
||||
'zipAll': 'zip'
|
||||
};
|
||||
|
||||
/** Used to track methods that skip fixing their arity. */
|
||||
exports.skipFixed = {
|
||||
'castArray': true,
|
||||
'flow': true,
|
||||
'flowRight': true,
|
||||
'iteratee': true,
|
||||
'mixin': true,
|
||||
'rearg': true,
|
||||
'runInContext': true
|
||||
};
|
||||
|
||||
/** Used to track methods that skip rearranging arguments. */
|
||||
exports.skipRearg = {
|
||||
'add': true,
|
||||
'assign': true,
|
||||
'assignIn': true,
|
||||
'bind': true,
|
||||
'bindKey': true,
|
||||
'concat': true,
|
||||
'difference': true,
|
||||
'divide': true,
|
||||
'eq': true,
|
||||
'gt': true,
|
||||
'gte': true,
|
||||
'isEqual': true,
|
||||
'lt': true,
|
||||
'lte': true,
|
||||
'matchesProperty': true,
|
||||
'merge': true,
|
||||
'multiply': true,
|
||||
'overArgs': true,
|
||||
'partial': true,
|
||||
'partialRight': true,
|
||||
'propertyOf': true,
|
||||
'random': true,
|
||||
'range': true,
|
||||
'rangeRight': true,
|
||||
'subtract': true,
|
||||
'zip': true,
|
||||
'zipObject': true,
|
||||
'zipObjectDeep': true
|
||||
};
|
||||
|
||||
|
||||
/***/ }
|
||||
/******/ ])
|
||||
});
|
||||
;
|
||||
|
|
@ -1,535 +0,0 @@
|
|||
var mapping = require('./_mapping'),
|
||||
mutateMap = mapping.mutate,
|
||||
fallbackHolder = require('./placeholder');
|
||||
|
||||
/**
|
||||
* Creates a function, with an arity of `n`, that invokes `func` with the
|
||||
* arguments it receives.
|
||||
*
|
||||
* @private
|
||||
* @param {Function} func The function to wrap.
|
||||
* @param {number} n The arity of the new function.
|
||||
* @returns {Function} Returns the new function.
|
||||
*/
|
||||
function baseArity(func, n) {
|
||||
return n == 2
|
||||
? function(a, b) { return func.apply(undefined, arguments); }
|
||||
: function(a) { return func.apply(undefined, arguments); };
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a function that invokes `func`, with up to `n` arguments, ignoring
|
||||
* any additional arguments.
|
||||
*
|
||||
* @private
|
||||
* @param {Function} func The function to cap arguments for.
|
||||
* @param {number} n The arity cap.
|
||||
* @returns {Function} Returns the new function.
|
||||
*/
|
||||
function baseAry(func, n) {
|
||||
return n == 2
|
||||
? function(a, b) { return func(a, b); }
|
||||
: function(a) { return func(a); };
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a clone of `array`.
|
||||
*
|
||||
* @private
|
||||
* @param {Array} array The array to clone.
|
||||
* @returns {Array} Returns the cloned array.
|
||||
*/
|
||||
function cloneArray(array) {
|
||||
var length = array ? array.length : 0,
|
||||
result = Array(length);
|
||||
|
||||
while (length--) {
|
||||
result[length] = array[length];
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a function that clones a given object using the assignment `func`.
|
||||
*
|
||||
* @private
|
||||
* @param {Function} func The assignment function.
|
||||
* @returns {Function} Returns the new cloner function.
|
||||
*/
|
||||
function createCloner(func) {
|
||||
return function(object) {
|
||||
return func({}, object);
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a function that wraps `func` and uses `cloner` to clone the first
|
||||
* argument it receives.
|
||||
*
|
||||
* @private
|
||||
* @param {Function} func The function to wrap.
|
||||
* @param {Function} cloner The function to clone arguments.
|
||||
* @returns {Function} Returns the new immutable function.
|
||||
*/
|
||||
function wrapImmutable(func, cloner) {
|
||||
return function() {
|
||||
var length = arguments.length;
|
||||
if (!length) {
|
||||
return;
|
||||
}
|
||||
var args = Array(length);
|
||||
while (length--) {
|
||||
args[length] = arguments[length];
|
||||
}
|
||||
var result = args[0] = cloner.apply(undefined, args);
|
||||
func.apply(undefined, args);
|
||||
return result;
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* The base implementation of `convert` which accepts a `util` object of methods
|
||||
* required to perform conversions.
|
||||
*
|
||||
* @param {Object} util The util object.
|
||||
* @param {string} name The name of the function to convert.
|
||||
* @param {Function} func The function to convert.
|
||||
* @param {Object} [options] The options object.
|
||||
* @param {boolean} [options.cap=true] Specify capping iteratee arguments.
|
||||
* @param {boolean} [options.curry=true] Specify currying.
|
||||
* @param {boolean} [options.fixed=true] Specify fixed arity.
|
||||
* @param {boolean} [options.immutable=true] Specify immutable operations.
|
||||
* @param {boolean} [options.rearg=true] Specify rearranging arguments.
|
||||
* @returns {Function|Object} Returns the converted function or object.
|
||||
*/
|
||||
function baseConvert(util, name, func, options) {
|
||||
var setPlaceholder,
|
||||
isLib = typeof name == 'function',
|
||||
isObj = name === Object(name);
|
||||
|
||||
if (isObj) {
|
||||
options = func;
|
||||
func = name;
|
||||
name = undefined;
|
||||
}
|
||||
if (func == null) {
|
||||
throw new TypeError;
|
||||
}
|
||||
options || (options = {});
|
||||
|
||||
var config = {
|
||||
'cap': 'cap' in options ? options.cap : true,
|
||||
'curry': 'curry' in options ? options.curry : true,
|
||||
'fixed': 'fixed' in options ? options.fixed : true,
|
||||
'immutable': 'immutable' in options ? options.immutable : true,
|
||||
'rearg': 'rearg' in options ? options.rearg : true
|
||||
};
|
||||
|
||||
var forceCurry = ('curry' in options) && options.curry,
|
||||
forceFixed = ('fixed' in options) && options.fixed,
|
||||
forceRearg = ('rearg' in options) && options.rearg,
|
||||
placeholder = isLib ? func : fallbackHolder,
|
||||
pristine = isLib ? func.runInContext() : undefined;
|
||||
|
||||
var helpers = isLib ? func : {
|
||||
'ary': util.ary,
|
||||
'assign': util.assign,
|
||||
'clone': util.clone,
|
||||
'curry': util.curry,
|
||||
'forEach': util.forEach,
|
||||
'isArray': util.isArray,
|
||||
'isFunction': util.isFunction,
|
||||
'iteratee': util.iteratee,
|
||||
'keys': util.keys,
|
||||
'rearg': util.rearg,
|
||||
'spread': util.spread,
|
||||
'toInteger': util.toInteger,
|
||||
'toPath': util.toPath
|
||||
};
|
||||
|
||||
var ary = helpers.ary,
|
||||
assign = helpers.assign,
|
||||
clone = helpers.clone,
|
||||
curry = helpers.curry,
|
||||
each = helpers.forEach,
|
||||
isArray = helpers.isArray,
|
||||
isFunction = helpers.isFunction,
|
||||
keys = helpers.keys,
|
||||
rearg = helpers.rearg,
|
||||
spread = helpers.spread,
|
||||
toInteger = helpers.toInteger,
|
||||
toPath = helpers.toPath;
|
||||
|
||||
var aryMethodKeys = keys(mapping.aryMethod);
|
||||
|
||||
var wrappers = {
|
||||
'castArray': function(castArray) {
|
||||
return function() {
|
||||
var value = arguments[0];
|
||||
return isArray(value)
|
||||
? castArray(cloneArray(value))
|
||||
: castArray.apply(undefined, arguments);
|
||||
};
|
||||
},
|
||||
'iteratee': function(iteratee) {
|
||||
return function() {
|
||||
var func = arguments[0],
|
||||
arity = arguments[1],
|
||||
result = iteratee(func, arity),
|
||||
length = result.length;
|
||||
|
||||
if (config.cap && typeof arity == 'number') {
|
||||
arity = arity > 2 ? (arity - 2) : 1;
|
||||
return (length && length <= arity) ? result : baseAry(result, arity);
|
||||
}
|
||||
return result;
|
||||
};
|
||||
},
|
||||
'mixin': function(mixin) {
|
||||
return function(source) {
|
||||
var func = this;
|
||||
if (!isFunction(func)) {
|
||||
return mixin(func, Object(source));
|
||||
}
|
||||
var pairs = [];
|
||||
each(keys(source), function(key) {
|
||||
if (isFunction(source[key])) {
|
||||
pairs.push([key, func.prototype[key]]);
|
||||
}
|
||||
});
|
||||
|
||||
mixin(func, Object(source));
|
||||
|
||||
each(pairs, function(pair) {
|
||||
var value = pair[1];
|
||||
if (isFunction(value)) {
|
||||
func.prototype[pair[0]] = value;
|
||||
} else {
|
||||
delete func.prototype[pair[0]];
|
||||
}
|
||||
});
|
||||
return func;
|
||||
};
|
||||
},
|
||||
'nthArg': function(nthArg) {
|
||||
return function(n) {
|
||||
var arity = n < 0 ? 1 : (toInteger(n) + 1);
|
||||
return curry(nthArg(n), arity);
|
||||
};
|
||||
},
|
||||
'rearg': function(rearg) {
|
||||
return function(func, indexes) {
|
||||
var arity = indexes ? indexes.length : 0;
|
||||
return curry(rearg(func, indexes), arity);
|
||||
};
|
||||
},
|
||||
'runInContext': function(runInContext) {
|
||||
return function(context) {
|
||||
return baseConvert(util, runInContext(context), options);
|
||||
};
|
||||
}
|
||||
};
|
||||
|
||||
/*--------------------------------------------------------------------------*/
|
||||
|
||||
/**
|
||||
* Casts `func` to a function with an arity capped iteratee if needed.
|
||||
*
|
||||
* @private
|
||||
* @param {string} name The name of the function to inspect.
|
||||
* @param {Function} func The function to inspect.
|
||||
* @returns {Function} Returns the cast function.
|
||||
*/
|
||||
function castCap(name, func) {
|
||||
if (config.cap) {
|
||||
var indexes = mapping.iterateeRearg[name];
|
||||
if (indexes) {
|
||||
return iterateeRearg(func, indexes);
|
||||
}
|
||||
var n = !isLib && mapping.iterateeAry[name];
|
||||
if (n) {
|
||||
return iterateeAry(func, n);
|
||||
}
|
||||
}
|
||||
return func;
|
||||
}
|
||||
|
||||
/**
|
||||
* Casts `func` to a curried function if needed.
|
||||
*
|
||||
* @private
|
||||
* @param {string} name The name of the function to inspect.
|
||||
* @param {Function} func The function to inspect.
|
||||
* @param {number} n The arity of `func`.
|
||||
* @returns {Function} Returns the cast function.
|
||||
*/
|
||||
function castCurry(name, func, n) {
|
||||
return (forceCurry || (config.curry && n > 1))
|
||||
? curry(func, n)
|
||||
: func;
|
||||
}
|
||||
|
||||
/**
|
||||
* Casts `func` to a fixed arity function if needed.
|
||||
*
|
||||
* @private
|
||||
* @param {string} name The name of the function to inspect.
|
||||
* @param {Function} func The function to inspect.
|
||||
* @param {number} n The arity cap.
|
||||
* @returns {Function} Returns the cast function.
|
||||
*/
|
||||
function castFixed(name, func, n) {
|
||||
if (config.fixed && (forceFixed || !mapping.skipFixed[name])) {
|
||||
var data = mapping.methodSpread[name],
|
||||
start = data && data.start;
|
||||
|
||||
return start === undefined ? ary(func, n) : spread(func, start);
|
||||
}
|
||||
return func;
|
||||
}
|
||||
|
||||
/**
|
||||
* Casts `func` to an rearged function if needed.
|
||||
*
|
||||
* @private
|
||||
* @param {string} name The name of the function to inspect.
|
||||
* @param {Function} func The function to inspect.
|
||||
* @param {number} n The arity of `func`.
|
||||
* @returns {Function} Returns the cast function.
|
||||
*/
|
||||
function castRearg(name, func, n) {
|
||||
return (config.rearg && n > 1 && (forceRearg || !mapping.skipRearg[name]))
|
||||
? rearg(func, mapping.methodRearg[name] || mapping.aryRearg[n])
|
||||
: func;
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a clone of `object` by `path`.
|
||||
*
|
||||
* @private
|
||||
* @param {Object} object The object to clone.
|
||||
* @param {Array|string} path The path to clone by.
|
||||
* @returns {Object} Returns the cloned object.
|
||||
*/
|
||||
function cloneByPath(object, path) {
|
||||
path = toPath(path);
|
||||
|
||||
var index = -1,
|
||||
length = path.length,
|
||||
lastIndex = length - 1,
|
||||
result = clone(Object(object)),
|
||||
nested = result;
|
||||
|
||||
while (nested != null && ++index < length) {
|
||||
var key = path[index],
|
||||
value = nested[key];
|
||||
|
||||
if (value != null) {
|
||||
nested[path[index]] = clone(index == lastIndex ? value : Object(value));
|
||||
}
|
||||
nested = nested[key];
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* Converts `lodash` to an immutable auto-curried iteratee-first data-last
|
||||
* version with conversion `options` applied.
|
||||
*
|
||||
* @param {Object} [options] The options object. See `baseConvert` for more details.
|
||||
* @returns {Function} Returns the converted `lodash`.
|
||||
*/
|
||||
function convertLib(options) {
|
||||
return _.runInContext.convert(options)(undefined);
|
||||
}
|
||||
|
||||
/**
|
||||
* Create a converter function for `func` of `name`.
|
||||
*
|
||||
* @param {string} name The name of the function to convert.
|
||||
* @param {Function} func The function to convert.
|
||||
* @returns {Function} Returns the new converter function.
|
||||
*/
|
||||
function createConverter(name, func) {
|
||||
var oldOptions = options;
|
||||
return function(options) {
|
||||
var newUtil = isLib ? pristine : helpers,
|
||||
newFunc = isLib ? pristine[name] : func,
|
||||
newOptions = assign(assign({}, oldOptions), options);
|
||||
|
||||
return baseConvert(newUtil, name, newFunc, newOptions);
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a function that wraps `func` to invoke its iteratee, with up to `n`
|
||||
* arguments, ignoring any additional arguments.
|
||||
*
|
||||
* @private
|
||||
* @param {Function} func The function to cap iteratee arguments for.
|
||||
* @param {number} n The arity cap.
|
||||
* @returns {Function} Returns the new function.
|
||||
*/
|
||||
function iterateeAry(func, n) {
|
||||
return overArg(func, function(func) {
|
||||
return typeof func == 'function' ? baseAry(func, n) : func;
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a function that wraps `func` to invoke its iteratee with arguments
|
||||
* arranged according to the specified `indexes` where the argument value at
|
||||
* the first index is provided as the first argument, the argument value at
|
||||
* the second index is provided as the second argument, and so on.
|
||||
*
|
||||
* @private
|
||||
* @param {Function} func The function to rearrange iteratee arguments for.
|
||||
* @param {number[]} indexes The arranged argument indexes.
|
||||
* @returns {Function} Returns the new function.
|
||||
*/
|
||||
function iterateeRearg(func, indexes) {
|
||||
return overArg(func, function(func) {
|
||||
var n = indexes.length;
|
||||
return baseArity(rearg(baseAry(func, n), indexes), n);
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a function that invokes `func` with its first argument transformed.
|
||||
*
|
||||
* @private
|
||||
* @param {Function} func The function to wrap.
|
||||
* @param {Function} transform The argument transform.
|
||||
* @returns {Function} Returns the new function.
|
||||
*/
|
||||
function overArg(func, transform) {
|
||||
return function() {
|
||||
var length = arguments.length;
|
||||
if (!length) {
|
||||
return func();
|
||||
}
|
||||
var args = Array(length);
|
||||
while (length--) {
|
||||
args[length] = arguments[length];
|
||||
}
|
||||
var index = config.rearg ? 0 : (length - 1);
|
||||
args[index] = transform(args[index]);
|
||||
return func.apply(undefined, args);
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a function that wraps `func` and applys the conversions
|
||||
* rules by `name`.
|
||||
*
|
||||
* @private
|
||||
* @param {string} name The name of the function to wrap.
|
||||
* @param {Function} func The function to wrap.
|
||||
* @returns {Function} Returns the converted function.
|
||||
*/
|
||||
function wrap(name, func) {
|
||||
name = mapping.aliasToReal[name] || name;
|
||||
|
||||
var result,
|
||||
wrapped = func,
|
||||
wrapper = wrappers[name];
|
||||
|
||||
if (wrapper) {
|
||||
wrapped = wrapper(func);
|
||||
}
|
||||
else if (config.immutable) {
|
||||
if (mutateMap.array[name]) {
|
||||
wrapped = wrapImmutable(func, cloneArray);
|
||||
}
|
||||
else if (mutateMap.object[name]) {
|
||||
wrapped = wrapImmutable(func, createCloner(func));
|
||||
}
|
||||
else if (mutateMap.set[name]) {
|
||||
wrapped = wrapImmutable(func, cloneByPath);
|
||||
}
|
||||
}
|
||||
each(aryMethodKeys, function(aryKey) {
|
||||
each(mapping.aryMethod[aryKey], function(otherName) {
|
||||
if (name == otherName) {
|
||||
var spreadData = mapping.methodSpread[name],
|
||||
afterRearg = spreadData && spreadData.afterRearg;
|
||||
|
||||
result = afterRearg
|
||||
? castFixed(name, castRearg(name, wrapped, aryKey), aryKey)
|
||||
: castRearg(name, castFixed(name, wrapped, aryKey), aryKey);
|
||||
|
||||
result = castCap(name, result);
|
||||
result = castCurry(name, result, aryKey);
|
||||
return false;
|
||||
}
|
||||
});
|
||||
return !result;
|
||||
});
|
||||
|
||||
result || (result = wrapped);
|
||||
if (result == func) {
|
||||
result = forceCurry ? curry(result, 1) : function() {
|
||||
return func.apply(this, arguments);
|
||||
};
|
||||
}
|
||||
result.convert = createConverter(name, func);
|
||||
if (mapping.placeholder[name]) {
|
||||
setPlaceholder = true;
|
||||
result.placeholder = func.placeholder = placeholder;
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
/*--------------------------------------------------------------------------*/
|
||||
|
||||
if (!isObj) {
|
||||
return wrap(name, func);
|
||||
}
|
||||
var _ = func;
|
||||
|
||||
// Convert methods by ary cap.
|
||||
var pairs = [];
|
||||
each(aryMethodKeys, function(aryKey) {
|
||||
each(mapping.aryMethod[aryKey], function(key) {
|
||||
var func = _[mapping.remap[key] || key];
|
||||
if (func) {
|
||||
pairs.push([key, wrap(key, func)]);
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
// Convert remaining methods.
|
||||
each(keys(_), function(key) {
|
||||
var func = _[key];
|
||||
if (typeof func == 'function') {
|
||||
var length = pairs.length;
|
||||
while (length--) {
|
||||
if (pairs[length][0] == key) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
func.convert = createConverter(key, func);
|
||||
pairs.push([key, func]);
|
||||
}
|
||||
});
|
||||
|
||||
// Assign to `_` leaving `_.prototype` unchanged to allow chaining.
|
||||
each(pairs, function(pair) {
|
||||
_[pair[0]] = pair[1];
|
||||
});
|
||||
|
||||
_.convert = convertLib;
|
||||
if (setPlaceholder) {
|
||||
_.placeholder = placeholder;
|
||||
}
|
||||
// Assign aliases.
|
||||
each(keys(_), function(key) {
|
||||
each(mapping.realToAlias[key] || [], function(alias) {
|
||||
_[alias] = _[key];
|
||||
});
|
||||
});
|
||||
|
||||
return _;
|
||||
}
|
||||
|
||||
module.exports = baseConvert;
|
||||
|
|
@ -1,18 +0,0 @@
|
|||
var baseConvert = require('./_baseConvert');
|
||||
|
||||
/**
|
||||
* Converts `lodash` to an immutable auto-curried iteratee-first data-last
|
||||
* version with conversion `options` applied.
|
||||
*
|
||||
* @param {Function} lodash The lodash function to convert.
|
||||
* @param {Object} [options] The options object. See `baseConvert` for more details.
|
||||
* @returns {Function} Returns the converted `lodash`.
|
||||
*/
|
||||
function browserConvert(lodash, options) {
|
||||
return baseConvert(lodash, lodash, options);
|
||||
}
|
||||
|
||||
if (typeof _ == 'function') {
|
||||
_ = browserConvert(_.runInContext());
|
||||
}
|
||||
module.exports = browserConvert;
|
||||
|
|
@ -1,362 +0,0 @@
|
|||
/** Used to map aliases to their real names. */
|
||||
exports.aliasToReal = {
|
||||
|
||||
// Lodash aliases.
|
||||
'each': 'forEach',
|
||||
'eachRight': 'forEachRight',
|
||||
'entries': 'toPairs',
|
||||
'entriesIn': 'toPairsIn',
|
||||
'extend': 'assignIn',
|
||||
'extendAll': 'assignInAll',
|
||||
'extendAllWith': 'assignInAllWith',
|
||||
'extendWith': 'assignInWith',
|
||||
'first': 'head',
|
||||
|
||||
// Methods that are curried variants of others.
|
||||
'conforms': 'conformsTo',
|
||||
'matches': 'isMatch',
|
||||
'property': 'get',
|
||||
|
||||
// Ramda aliases.
|
||||
'__': 'placeholder',
|
||||
'F': 'stubFalse',
|
||||
'T': 'stubTrue',
|
||||
'all': 'every',
|
||||
'allPass': 'overEvery',
|
||||
'always': 'constant',
|
||||
'any': 'some',
|
||||
'anyPass': 'overSome',
|
||||
'apply': 'spread',
|
||||
'assoc': 'set',
|
||||
'assocPath': 'set',
|
||||
'complement': 'negate',
|
||||
'compose': 'flowRight',
|
||||
'contains': 'includes',
|
||||
'dissoc': 'unset',
|
||||
'dissocPath': 'unset',
|
||||
'dropLast': 'dropRight',
|
||||
'dropLastWhile': 'dropRightWhile',
|
||||
'equals': 'isEqual',
|
||||
'identical': 'eq',
|
||||
'indexBy': 'keyBy',
|
||||
'init': 'initial',
|
||||
'invertObj': 'invert',
|
||||
'juxt': 'over',
|
||||
'omitAll': 'omit',
|
||||
'nAry': 'ary',
|
||||
'path': 'get',
|
||||
'pathEq': 'matchesProperty',
|
||||
'pathOr': 'getOr',
|
||||
'paths': 'at',
|
||||
'pickAll': 'pick',
|
||||
'pipe': 'flow',
|
||||
'pluck': 'map',
|
||||
'prop': 'get',
|
||||
'propEq': 'matchesProperty',
|
||||
'propOr': 'getOr',
|
||||
'props': 'at',
|
||||
'symmetricDifference': 'xor',
|
||||
'symmetricDifferenceBy': 'xorBy',
|
||||
'symmetricDifferenceWith': 'xorWith',
|
||||
'takeLast': 'takeRight',
|
||||
'takeLastWhile': 'takeRightWhile',
|
||||
'unapply': 'rest',
|
||||
'unnest': 'flatten',
|
||||
'useWith': 'overArgs',
|
||||
'where': 'conformsTo',
|
||||
'whereEq': 'isMatch',
|
||||
'zipObj': 'zipObject'
|
||||
};
|
||||
|
||||
/** Used to map ary to method names. */
|
||||
exports.aryMethod = {
|
||||
'1': [
|
||||
'assignAll', 'assignInAll', 'attempt', 'castArray', 'ceil', 'create',
|
||||
'curry', 'curryRight', 'defaultsAll', 'defaultsDeepAll', 'floor', 'flow',
|
||||
'flowRight', 'fromPairs', 'invert', 'iteratee', 'memoize', 'method', 'mergeAll',
|
||||
'methodOf', 'mixin', 'nthArg', 'over', 'overEvery', 'overSome','rest', 'reverse',
|
||||
'round', 'runInContext', 'spread', 'template', 'trim', 'trimEnd', 'trimStart',
|
||||
'uniqueId', 'words', 'zipAll'
|
||||
],
|
||||
'2': [
|
||||
'add', 'after', 'ary', 'assign', 'assignAllWith', 'assignIn', 'assignInAllWith',
|
||||
'at', 'before', 'bind', 'bindAll', 'bindKey', 'chunk', 'cloneDeepWith',
|
||||
'cloneWith', 'concat', 'conformsTo', 'countBy', 'curryN', 'curryRightN',
|
||||
'debounce', 'defaults', 'defaultsDeep', 'defaultTo', 'delay', 'difference',
|
||||
'divide', 'drop', 'dropRight', 'dropRightWhile', 'dropWhile', 'endsWith', 'eq',
|
||||
'every', 'filter', 'find', 'findIndex', 'findKey', 'findLast', 'findLastIndex',
|
||||
'findLastKey', 'flatMap', 'flatMapDeep', 'flattenDepth', 'forEach',
|
||||
'forEachRight', 'forIn', 'forInRight', 'forOwn', 'forOwnRight', 'get',
|
||||
'groupBy', 'gt', 'gte', 'has', 'hasIn', 'includes', 'indexOf', 'intersection',
|
||||
'invertBy', 'invoke', 'invokeMap', 'isEqual', 'isMatch', 'join', 'keyBy',
|
||||
'lastIndexOf', 'lt', 'lte', 'map', 'mapKeys', 'mapValues', 'matchesProperty',
|
||||
'maxBy', 'meanBy', 'merge', 'mergeAllWith', 'minBy', 'multiply', 'nth', 'omit',
|
||||
'omitBy', 'overArgs', 'pad', 'padEnd', 'padStart', 'parseInt', 'partial',
|
||||
'partialRight', 'partition', 'pick', 'pickBy', 'propertyOf', 'pull', 'pullAll',
|
||||
'pullAt', 'random', 'range', 'rangeRight', 'rearg', 'reject', 'remove',
|
||||
'repeat', 'restFrom', 'result', 'sampleSize', 'some', 'sortBy', 'sortedIndex',
|
||||
'sortedIndexOf', 'sortedLastIndex', 'sortedLastIndexOf', 'sortedUniqBy',
|
||||
'split', 'spreadFrom', 'startsWith', 'subtract', 'sumBy', 'take', 'takeRight',
|
||||
'takeRightWhile', 'takeWhile', 'tap', 'throttle', 'thru', 'times', 'trimChars',
|
||||
'trimCharsEnd', 'trimCharsStart', 'truncate', 'union', 'uniqBy', 'uniqWith',
|
||||
'unset', 'unzipWith', 'without', 'wrap', 'xor', 'zip', 'zipObject',
|
||||
'zipObjectDeep'
|
||||
],
|
||||
'3': [
|
||||
'assignInWith', 'assignWith', 'clamp', 'differenceBy', 'differenceWith',
|
||||
'findFrom', 'findIndexFrom', 'findLastFrom', 'findLastIndexFrom', 'getOr',
|
||||
'includesFrom', 'indexOfFrom', 'inRange', 'intersectionBy', 'intersectionWith',
|
||||
'invokeArgs', 'invokeArgsMap', 'isEqualWith', 'isMatchWith', 'flatMapDepth',
|
||||
'lastIndexOfFrom', 'mergeWith', 'orderBy', 'padChars', 'padCharsEnd',
|
||||
'padCharsStart', 'pullAllBy', 'pullAllWith', 'reduce', 'reduceRight', 'replace',
|
||||
'set', 'slice', 'sortedIndexBy', 'sortedLastIndexBy', 'transform', 'unionBy',
|
||||
'unionWith', 'update', 'xorBy', 'xorWith', 'zipWith'
|
||||
],
|
||||
'4': [
|
||||
'fill', 'setWith', 'updateWith'
|
||||
]
|
||||
};
|
||||
|
||||
/** Used to map ary to rearg configs. */
|
||||
exports.aryRearg = {
|
||||
'2': [1, 0],
|
||||
'3': [2, 0, 1],
|
||||
'4': [3, 2, 0, 1]
|
||||
};
|
||||
|
||||
/** Used to map method names to their iteratee ary. */
|
||||
exports.iterateeAry = {
|
||||
'dropRightWhile': 1,
|
||||
'dropWhile': 1,
|
||||
'every': 1,
|
||||
'filter': 1,
|
||||
'find': 1,
|
||||
'findFrom': 1,
|
||||
'findIndex': 1,
|
||||
'findIndexFrom': 1,
|
||||
'findKey': 1,
|
||||
'findLast': 1,
|
||||
'findLastFrom': 1,
|
||||
'findLastIndex': 1,
|
||||
'findLastIndexFrom': 1,
|
||||
'findLastKey': 1,
|
||||
'flatMap': 1,
|
||||
'flatMapDeep': 1,
|
||||
'flatMapDepth': 1,
|
||||
'forEach': 1,
|
||||
'forEachRight': 1,
|
||||
'forIn': 1,
|
||||
'forInRight': 1,
|
||||
'forOwn': 1,
|
||||
'forOwnRight': 1,
|
||||
'map': 1,
|
||||
'mapKeys': 1,
|
||||
'mapValues': 1,
|
||||
'partition': 1,
|
||||
'reduce': 2,
|
||||
'reduceRight': 2,
|
||||
'reject': 1,
|
||||
'remove': 1,
|
||||
'some': 1,
|
||||
'takeRightWhile': 1,
|
||||
'takeWhile': 1,
|
||||
'times': 1,
|
||||
'transform': 2
|
||||
};
|
||||
|
||||
/** Used to map method names to iteratee rearg configs. */
|
||||
exports.iterateeRearg = {
|
||||
'mapKeys': [1]
|
||||
};
|
||||
|
||||
/** Used to map method names to rearg configs. */
|
||||
exports.methodRearg = {
|
||||
'assignInAllWith': [1, 2, 0],
|
||||
'assignInWith': [1, 2, 0],
|
||||
'assignAllWith': [1, 2, 0],
|
||||
'assignWith': [1, 2, 0],
|
||||
'differenceBy': [1, 2, 0],
|
||||
'differenceWith': [1, 2, 0],
|
||||
'getOr': [2, 1, 0],
|
||||
'intersectionBy': [1, 2, 0],
|
||||
'intersectionWith': [1, 2, 0],
|
||||
'isEqualWith': [1, 2, 0],
|
||||
'isMatchWith': [2, 1, 0],
|
||||
'mergeAllWith': [1, 2, 0],
|
||||
'mergeWith': [1, 2, 0],
|
||||
'padChars': [2, 1, 0],
|
||||
'padCharsEnd': [2, 1, 0],
|
||||
'padCharsStart': [2, 1, 0],
|
||||
'pullAllBy': [2, 1, 0],
|
||||
'pullAllWith': [2, 1, 0],
|
||||
'setWith': [3, 1, 2, 0],
|
||||
'sortedIndexBy': [2, 1, 0],
|
||||
'sortedLastIndexBy': [2, 1, 0],
|
||||
'unionBy': [1, 2, 0],
|
||||
'unionWith': [1, 2, 0],
|
||||
'updateWith': [3, 1, 2, 0],
|
||||
'xorBy': [1, 2, 0],
|
||||
'xorWith': [1, 2, 0],
|
||||
'zipWith': [1, 2, 0]
|
||||
};
|
||||
|
||||
/** Used to map method names to spread configs. */
|
||||
exports.methodSpread = {
|
||||
'assignAll': { 'start': 0 },
|
||||
'assignAllWith': { 'afterRearg': true, 'start': 1 },
|
||||
'assignInAll': { 'start': 0 },
|
||||
'assignInAllWith': { 'afterRearg': true, 'start': 1 },
|
||||
'defaultsAll': { 'start': 0 },
|
||||
'defaultsDeepAll': { 'start': 0 },
|
||||
'invokeArgs': { 'start': 2 },
|
||||
'invokeArgsMap': { 'start': 2 },
|
||||
'mergeAll': { 'start': 0 },
|
||||
'mergeAllWith': { 'afterRearg': true, 'start': 1 },
|
||||
'partial': { 'start': 1 },
|
||||
'partialRight': { 'start': 1 },
|
||||
'without': { 'start': 1 },
|
||||
'zipAll': { 'start': 0 }
|
||||
};
|
||||
|
||||
/** Used to identify methods which mutate arrays or objects. */
|
||||
exports.mutate = {
|
||||
'array': {
|
||||
'fill': true,
|
||||
'pull': true,
|
||||
'pullAll': true,
|
||||
'pullAllBy': true,
|
||||
'pullAllWith': true,
|
||||
'pullAt': true,
|
||||
'remove': true,
|
||||
'reverse': true
|
||||
},
|
||||
'object': {
|
||||
'assign': true,
|
||||
'assignAll': true,
|
||||
'assignAllWith': true,
|
||||
'assignIn': true,
|
||||
'assignInAll': true,
|
||||
'assignInAllWith': true,
|
||||
'assignInWith': true,
|
||||
'assignWith': true,
|
||||
'defaults': true,
|
||||
'defaultsAll': true,
|
||||
'defaultsDeep': true,
|
||||
'defaultsDeepAll': true,
|
||||
'merge': true,
|
||||
'mergeAll': true,
|
||||
'mergeAllWith': true,
|
||||
'mergeWith': true,
|
||||
},
|
||||
'set': {
|
||||
'set': true,
|
||||
'setWith': true,
|
||||
'unset': true,
|
||||
'update': true,
|
||||
'updateWith': true
|
||||
}
|
||||
};
|
||||
|
||||
/** Used to track methods with placeholder support */
|
||||
exports.placeholder = {
|
||||
'bind': true,
|
||||
'bindKey': true,
|
||||
'curry': true,
|
||||
'curryRight': true,
|
||||
'partial': true,
|
||||
'partialRight': true
|
||||
};
|
||||
|
||||
/** Used to map real names to their aliases. */
|
||||
exports.realToAlias = (function() {
|
||||
var hasOwnProperty = Object.prototype.hasOwnProperty,
|
||||
object = exports.aliasToReal,
|
||||
result = {};
|
||||
|
||||
for (var key in object) {
|
||||
var value = object[key];
|
||||
if (hasOwnProperty.call(result, value)) {
|
||||
result[value].push(key);
|
||||
} else {
|
||||
result[value] = [key];
|
||||
}
|
||||
}
|
||||
return result;
|
||||
}());
|
||||
|
||||
/** Used to map method names to other names. */
|
||||
exports.remap = {
|
||||
'assignAll': 'assign',
|
||||
'assignAllWith': 'assignWith',
|
||||
'assignInAll': 'assignIn',
|
||||
'assignInAllWith': 'assignInWith',
|
||||
'curryN': 'curry',
|
||||
'curryRightN': 'curryRight',
|
||||
'defaultsAll': 'defaults',
|
||||
'defaultsDeepAll': 'defaultsDeep',
|
||||
'findFrom': 'find',
|
||||
'findIndexFrom': 'findIndex',
|
||||
'findLastFrom': 'findLast',
|
||||
'findLastIndexFrom': 'findLastIndex',
|
||||
'getOr': 'get',
|
||||
'includesFrom': 'includes',
|
||||
'indexOfFrom': 'indexOf',
|
||||
'invokeArgs': 'invoke',
|
||||
'invokeArgsMap': 'invokeMap',
|
||||
'lastIndexOfFrom': 'lastIndexOf',
|
||||
'mergeAll': 'merge',
|
||||
'mergeAllWith': 'mergeWith',
|
||||
'padChars': 'pad',
|
||||
'padCharsEnd': 'padEnd',
|
||||
'padCharsStart': 'padStart',
|
||||
'propertyOf': 'get',
|
||||
'restFrom': 'rest',
|
||||
'spreadFrom': 'spread',
|
||||
'trimChars': 'trim',
|
||||
'trimCharsEnd': 'trimEnd',
|
||||
'trimCharsStart': 'trimStart',
|
||||
'zipAll': 'zip'
|
||||
};
|
||||
|
||||
/** Used to track methods that skip fixing their arity. */
|
||||
exports.skipFixed = {
|
||||
'castArray': true,
|
||||
'flow': true,
|
||||
'flowRight': true,
|
||||
'iteratee': true,
|
||||
'mixin': true,
|
||||
'rearg': true,
|
||||
'runInContext': true
|
||||
};
|
||||
|
||||
/** Used to track methods that skip rearranging arguments. */
|
||||
exports.skipRearg = {
|
||||
'add': true,
|
||||
'assign': true,
|
||||
'assignIn': true,
|
||||
'bind': true,
|
||||
'bindKey': true,
|
||||
'concat': true,
|
||||
'difference': true,
|
||||
'divide': true,
|
||||
'eq': true,
|
||||
'gt': true,
|
||||
'gte': true,
|
||||
'isEqual': true,
|
||||
'lt': true,
|
||||
'lte': true,
|
||||
'matchesProperty': true,
|
||||
'merge': true,
|
||||
'multiply': true,
|
||||
'overArgs': true,
|
||||
'partial': true,
|
||||
'partialRight': true,
|
||||
'propertyOf': true,
|
||||
'random': true,
|
||||
'range': true,
|
||||
'rangeRight': true,
|
||||
'subtract': true,
|
||||
'zip': true,
|
||||
'zipObject': true,
|
||||
'zipObjectDeep': true
|
||||
};
|
||||
|
|
@ -1,6 +0,0 @@
|
|||
/**
|
||||
* The default argument placeholder value for methods.
|
||||
*
|
||||
* @type {Object}
|
||||
*/
|
||||
module.exports = {};
|
||||
|
|
@ -1,71 +0,0 @@
|
|||
'use strict';
|
||||
|
||||
var _ = require('lodash'),
|
||||
fs = require('fs-extra'),
|
||||
glob = require('glob'),
|
||||
path = require('path');
|
||||
|
||||
var minify = require('../common/minify.js');
|
||||
|
||||
/*----------------------------------------------------------------------------*/
|
||||
|
||||
/**
|
||||
* Creates a [fs.copy](https://github.com/jprichardson/node-fs-extra#copy)
|
||||
* function with `srcPath` and `destPath` partially applied.
|
||||
*
|
||||
* @memberOf file
|
||||
* @param {string} srcPath The path of the file to copy.
|
||||
* @param {string} destPath The path to copy the file to.
|
||||
* @returns {Function} Returns the partially applied function.
|
||||
*/
|
||||
function copy(srcPath, destPath) {
|
||||
return _.partial(fs.copy, srcPath, destPath);
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates an object of base name and compiled template pairs that match `pattern`.
|
||||
*
|
||||
* @memberOf file
|
||||
* @param {string} pattern The glob pattern to be match.
|
||||
* @returns {Object} Returns the object of compiled templates.
|
||||
*/
|
||||
function globTemplate(pattern) {
|
||||
return _.transform(glob.sync(pattern), function(result, filePath) {
|
||||
var key = path.basename(filePath, path.extname(filePath));
|
||||
result[key] = _.template(fs.readFileSync(filePath, 'utf8'));
|
||||
}, {});
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a `minify` function with `srcPath` and `destPath` partially applied.
|
||||
*
|
||||
* @memberOf file
|
||||
* @param {string} srcPath The path of the file to minify.
|
||||
* @param {string} destPath The path to write the file to.
|
||||
* @returns {Function} Returns the partially applied function.
|
||||
*/
|
||||
function min(srcPath, destPath) {
|
||||
return _.partial(minify, srcPath, destPath);
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a [fs.writeFile](https://nodejs.org/api/fs.html#fs_fs_writefile_file_data_options_callback)
|
||||
* function with `filePath` and `data` partially applied.
|
||||
*
|
||||
* @memberOf file
|
||||
* @param {string} destPath The path to write the file to.
|
||||
* @param {string} data The data to write to the file.
|
||||
* @returns {Function} Returns the partially applied function.
|
||||
*/
|
||||
function write(destPath, data) {
|
||||
return _.partial(fs.writeFile, destPath, data);
|
||||
}
|
||||
|
||||
/*----------------------------------------------------------------------------*/
|
||||
|
||||
module.exports = {
|
||||
'copy': copy,
|
||||
'globTemplate': globTemplate,
|
||||
'min': min,
|
||||
'write': write
|
||||
};
|
||||
|
|
@ -1,9 +0,0 @@
|
|||
'use strict';
|
||||
|
||||
var _mapping = require('../../fp/_mapping'),
|
||||
util = require('./util'),
|
||||
Hash = util.Hash;
|
||||
|
||||
/*----------------------------------------------------------------------------*/
|
||||
|
||||
module.exports = new Hash(_mapping);
|
||||
|
|
@ -1,39 +0,0 @@
|
|||
'use strict';
|
||||
|
||||
var _ = require('lodash'),
|
||||
fs = require('fs-extra'),
|
||||
uglify = require('uglify-js');
|
||||
|
||||
var uglifyOptions = require('./uglify.options');
|
||||
|
||||
/*----------------------------------------------------------------------------*/
|
||||
|
||||
/**
|
||||
* Asynchronously minifies the file at `srcPath`, writes it to `destPath`, and
|
||||
* invokes `callback` upon completion. The callback is invoked with one argument:
|
||||
* (error).
|
||||
*
|
||||
* If unspecified, `destPath` is `srcPath` with an extension of `.min.js`.
|
||||
* (e.g. the `destPath` of `path/to/foo.js` would be `path/to/foo.min.js`)
|
||||
*
|
||||
* @param {string} srcPath The path of the file to minify.
|
||||
* @param {string} [destPath] The path to write the file to.
|
||||
* @param {Function} callback The function invoked upon completion.
|
||||
* @param {Object} [option] The UglifyJS options object.
|
||||
*/
|
||||
function minify(srcPath, destPath, callback, options) {
|
||||
if (_.isFunction(destPath)) {
|
||||
if (_.isObject(callback)) {
|
||||
options = callback;
|
||||
}
|
||||
callback = destPath;
|
||||
destPath = undefined;
|
||||
}
|
||||
if (!destPath) {
|
||||
destPath = srcPath.replace(/(?=\.js$)/, '.min');
|
||||
}
|
||||
var output = uglify.minify(srcPath, _.defaults(options || {}, uglifyOptions));
|
||||
fs.writeFile(destPath, output.code, 'utf-8', callback);
|
||||
}
|
||||
|
||||
module.exports = minify;
|
||||
|
|
@ -1,21 +0,0 @@
|
|||
'use strict';
|
||||
|
||||
/**
|
||||
* The UglifyJS options object for
|
||||
* [compress](https://github.com/mishoo/UglifyJS2#compressor-options),
|
||||
* [mangle](https://github.com/mishoo/UglifyJS2#mangler-options), and
|
||||
* [output](https://github.com/mishoo/UglifyJS2#beautifier-options) options.
|
||||
*/
|
||||
module.exports = {
|
||||
'compress': {
|
||||
'negate_iife': false,
|
||||
'pure_getters': true,
|
||||
'unsafe': true,
|
||||
'warnings': false
|
||||
},
|
||||
'output': {
|
||||
'ascii_only': true,
|
||||
'comments': /@license/,
|
||||
'max_line_len': 500
|
||||
}
|
||||
};
|
||||
|
|
@ -1,40 +0,0 @@
|
|||
'use strict';
|
||||
|
||||
var _ = require('lodash');
|
||||
|
||||
/*----------------------------------------------------------------------------*/
|
||||
|
||||
/**
|
||||
* Creates a hash object. If a `properties` object is provided, its own
|
||||
* enumerable properties are assigned to the created hash.
|
||||
*
|
||||
* @memberOf util
|
||||
* @param {Object} [properties] The properties to assign to the hash.
|
||||
* @returns {Object} Returns the new hash object.
|
||||
*/
|
||||
function Hash(properties) {
|
||||
return _.transform(properties, function(result, value, key) {
|
||||
result[key] = (_.isPlainObject(value) && !(value instanceof Hash))
|
||||
? new Hash(value)
|
||||
: value;
|
||||
}, this);
|
||||
}
|
||||
|
||||
Hash.prototype = Object.create(null);
|
||||
|
||||
/**
|
||||
* This method throws any error it receives.
|
||||
*
|
||||
* @memberOf util
|
||||
* @param {Object} [error] The error object.
|
||||
*/
|
||||
function pitch(error) {
|
||||
if (error != null) {
|
||||
throw error;
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = {
|
||||
'Hash': Hash,
|
||||
'pitch': pitch
|
||||
};
|
||||
|
|
@ -1,56 +0,0 @@
|
|||
'use strict';
|
||||
|
||||
var _ = require('lodash'),
|
||||
async = require('async'),
|
||||
path = require('path'),
|
||||
webpack = require('webpack');
|
||||
|
||||
var file = require('../common/file'),
|
||||
util = require('../common/util');
|
||||
|
||||
var basePath = path.join(__dirname, '..', '..'),
|
||||
distPath = path.join(basePath, 'dist'),
|
||||
fpPath = path.join(basePath, 'fp'),
|
||||
filename = 'lodash.fp.js';
|
||||
|
||||
var fpConfig = {
|
||||
'entry': path.join(fpPath, '_convertBrowser.js'),
|
||||
'output': {
|
||||
'path': distPath,
|
||||
'filename': filename,
|
||||
'library': 'fp',
|
||||
'libraryTarget': 'umd'
|
||||
},
|
||||
'plugins': [
|
||||
new webpack.optimize.OccurenceOrderPlugin,
|
||||
new webpack.optimize.DedupePlugin
|
||||
]
|
||||
};
|
||||
|
||||
var mappingConfig = {
|
||||
'entry': path.join(fpPath, '_mapping.js'),
|
||||
'output': {
|
||||
'path': distPath,
|
||||
'filename': 'mapping.fp.js',
|
||||
'library': 'mapping',
|
||||
'libraryTarget': 'umd'
|
||||
}
|
||||
};
|
||||
|
||||
/*----------------------------------------------------------------------------*/
|
||||
|
||||
/**
|
||||
* Creates browser builds of the FP converter and mappings at the `target` path.
|
||||
*
|
||||
* @private
|
||||
* @param {string} target The output directory path.
|
||||
*/
|
||||
function build() {
|
||||
async.series([
|
||||
_.partial(webpack, mappingConfig),
|
||||
_.partial(webpack, fpConfig),
|
||||
file.min(path.join(distPath, filename))
|
||||
], util.pitch);
|
||||
}
|
||||
|
||||
build();
|
||||
|
|
@ -1,81 +0,0 @@
|
|||
'use strict';
|
||||
|
||||
var _ = require('lodash'),
|
||||
fs = require('fs-extra'),
|
||||
path = require('path');
|
||||
|
||||
var file = require('../common/file'),
|
||||
mapping = require('../common/mapping'),
|
||||
util = require('../common/util');
|
||||
|
||||
var templatePath = path.join(__dirname, 'template/doc'),
|
||||
template = file.globTemplate(path.join(templatePath, '*.jst'));
|
||||
|
||||
var argNames = ['a', 'b', 'c', 'd'];
|
||||
|
||||
var templateData = {
|
||||
'mapping': mapping,
|
||||
'toArgOrder': toArgOrder,
|
||||
'toFuncList': toFuncList
|
||||
};
|
||||
|
||||
/**
|
||||
* Converts arranged argument `indexes` into a named argument string
|
||||
* representation of their order.
|
||||
*
|
||||
* @private
|
||||
* @param {number[]} indexes The arranged argument indexes.
|
||||
* @returns {string} Returns the named argument string.
|
||||
*/
|
||||
function toArgOrder(indexes) {
|
||||
var reordered = [];
|
||||
_.each(indexes, function(newIndex, index) {
|
||||
reordered[newIndex] = argNames[index];
|
||||
});
|
||||
return '`(' + reordered.join(', ') + ')`';
|
||||
}
|
||||
|
||||
/**
|
||||
* Converts `funcNames` into a chunked list string representation.
|
||||
*
|
||||
* @private
|
||||
* @param {string[]} funcNames The function names.
|
||||
* @returns {string} Returns the function list string.
|
||||
*/
|
||||
function toFuncList(funcNames) {
|
||||
var chunks = _.chunk(funcNames.slice().sort(), 5),
|
||||
lastChunk = _.last(chunks),
|
||||
last = lastChunk ? lastChunk.pop() : undefined;
|
||||
|
||||
chunks = _.reject(chunks, _.isEmpty);
|
||||
lastChunk = _.last(chunks);
|
||||
|
||||
var result = '`' + _.map(chunks, function(chunk) {
|
||||
return chunk.join('`, `') + '`';
|
||||
}).join(',\n`');
|
||||
|
||||
if (last == null) {
|
||||
return result;
|
||||
}
|
||||
if (_.size(chunks) > 1 || _.size(lastChunk) > 1) {
|
||||
result += ',';
|
||||
}
|
||||
result += ' &';
|
||||
result += _.size(lastChunk) < 5 ? ' ' : '\n';
|
||||
return result + '`' + last + '`';
|
||||
}
|
||||
|
||||
/*----------------------------------------------------------------------------*/
|
||||
|
||||
/**
|
||||
* Creates the FP-Guide wiki at the `target` path.
|
||||
*
|
||||
* @private
|
||||
* @param {string} target The output file path.
|
||||
*/
|
||||
function build(target) {
|
||||
target = path.resolve(target);
|
||||
fs.writeFile(target, template.wiki(templateData), util.pitch);
|
||||
}
|
||||
|
||||
build(_.last(process.argv));
|
||||
|
|
@ -1,150 +0,0 @@
|
|||
'use strict';
|
||||
|
||||
var _ = require('lodash'),
|
||||
async = require('async'),
|
||||
glob = require('glob'),
|
||||
path = require('path');
|
||||
|
||||
var file = require('../common/file'),
|
||||
mapping = require('../common/mapping'),
|
||||
util = require('../common/util');
|
||||
|
||||
var templatePath = path.join(__dirname, 'template/modules'),
|
||||
template = file.globTemplate(path.join(templatePath, '*.jst'));
|
||||
|
||||
var aryMethods = _.union(
|
||||
mapping.aryMethod[1],
|
||||
mapping.aryMethod[2],
|
||||
mapping.aryMethod[3],
|
||||
mapping.aryMethod[4]
|
||||
);
|
||||
|
||||
var categories = [
|
||||
'array',
|
||||
'collection',
|
||||
'date',
|
||||
'function',
|
||||
'lang',
|
||||
'math',
|
||||
'number',
|
||||
'object',
|
||||
'seq',
|
||||
'string',
|
||||
'util'
|
||||
];
|
||||
|
||||
var ignored = [
|
||||
'_*.js',
|
||||
'core.js',
|
||||
'core.min.js',
|
||||
'fp.js',
|
||||
'index.js',
|
||||
'lodash.js',
|
||||
'lodash.min.js'
|
||||
];
|
||||
|
||||
/**
|
||||
* Checks if `name` is a method alias.
|
||||
*
|
||||
* @private
|
||||
* @param {string} name The name to check.
|
||||
* @returns {boolean} Returns `true` if `name` is a method alias, else `false`.
|
||||
*/
|
||||
function isAlias(name) {
|
||||
return _.has(mapping.aliasToReal, name);
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks if `name` is a category name.
|
||||
*
|
||||
* @private
|
||||
* @param {string} name The name to check.
|
||||
* @returns {boolean} Returns `true` if `name` is a category name, else `false`.
|
||||
*/
|
||||
function isCategory(name) {
|
||||
return _.includes(categories, name);
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks if `name` belongs to a method that's passed thru and not wrapped.
|
||||
*
|
||||
* @private
|
||||
* @param {string} name The name to check.
|
||||
* @returns {boolean} Returns `true` if `name` is of a pass thru method,
|
||||
* else `false`.
|
||||
*/
|
||||
function isThru(name) {
|
||||
return !_.includes(aryMethods, name);
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets metadata for `func`.
|
||||
*
|
||||
* @private
|
||||
* @param {Function} func The function to query.
|
||||
* @returns {*} Returns the metadata for `func`.
|
||||
*/
|
||||
function getTemplate(moduleName) {
|
||||
var data = {
|
||||
'name': _.get(mapping.aliasToReal, moduleName, moduleName),
|
||||
'mapping': mapping
|
||||
};
|
||||
|
||||
if (isAlias(moduleName)) {
|
||||
return template.alias(data);
|
||||
}
|
||||
if (isCategory(moduleName)) {
|
||||
return template.category(data);
|
||||
}
|
||||
if (isThru(moduleName)) {
|
||||
return template.thru(data);
|
||||
}
|
||||
return template.module(data);
|
||||
}
|
||||
|
||||
/*----------------------------------------------------------------------------*/
|
||||
|
||||
/**
|
||||
* Creates FP modules at the `target` path.
|
||||
*
|
||||
* @private
|
||||
* @param {string} target The output directory path.
|
||||
*/
|
||||
function build(target) {
|
||||
target = path.resolve(target);
|
||||
|
||||
var fpPath = path.join(target, 'fp');
|
||||
|
||||
// Glob existing lodash module paths.
|
||||
var modulePaths = glob.sync(path.join(target, '*.js'), {
|
||||
'nodir': true,
|
||||
'ignore': ignored.map(function(filename) {
|
||||
return path.join(target, filename);
|
||||
})
|
||||
});
|
||||
|
||||
// Add FP alias and remapped module paths.
|
||||
_.each([mapping.aliasToReal, mapping.remap], function(data) {
|
||||
_.forOwn(data, function(realName, alias) {
|
||||
var modulePath = path.join(target, alias + '.js');
|
||||
if (!_.includes(modulePaths, modulePath)) {
|
||||
modulePaths.push(modulePath);
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
var actions = modulePaths.map(function(modulePath) {
|
||||
var moduleName = path.basename(modulePath, '.js');
|
||||
return file.write(path.join(fpPath, moduleName + '.js'), getTemplate(moduleName));
|
||||
});
|
||||
|
||||
actions.unshift(file.copy(path.join(__dirname, '../../fp'), fpPath));
|
||||
actions.push(file.write(path.join(fpPath, '_falseOptions.js'), template._falseOptions()));
|
||||
actions.push(file.write(path.join(fpPath, '_util.js'), template._util()));
|
||||
actions.push(file.write(path.join(target, 'fp.js'), template.fp()));
|
||||
actions.push(file.write(path.join(fpPath, 'convert.js'), template.convert()));
|
||||
|
||||
async.series(actions, util.pitch);
|
||||
}
|
||||
|
||||
build(_.last(process.argv));
|
||||
|
|
@ -1,227 +0,0 @@
|
|||
## lodash/fp
|
||||
|
||||
The `lodash/fp` module promotes a more
|
||||
[functional programming](https://en.wikipedia.org/wiki/Functional_programming)
|
||||
(FP) friendly style by exporting an instance of `lodash` with its methods wrapped
|
||||
to produce immutable auto-curried iteratee-first data-last methods.
|
||||
|
||||
## Installation
|
||||
|
||||
In a browser:
|
||||
```html
|
||||
<script src='path/to/lodash.js'></script>
|
||||
<script src='path/to/lodash.fp.js'></script>
|
||||
<script>
|
||||
// Loading `lodash.fp.js` converts `_` to its fp variant.
|
||||
_.defaults({ 'a': 2, 'b': 2 })({ 'a': 1 });
|
||||
// ➜ { 'a': 1, 'b': 2 }
|
||||
|
||||
// Use `noConflict` to restore the pre-fp variant.
|
||||
var fp = _.noConflict();
|
||||
|
||||
_.defaults({ 'a': 1 }, { 'a': 2, 'b': 2 });
|
||||
// ➜ { 'a': 1, 'b': 2 }
|
||||
fp.defaults({ 'a': 2, 'b': 2 })({ 'a': 1 });
|
||||
// ➜ { 'a': 1, 'b': 2 }
|
||||
</script>
|
||||
```
|
||||
|
||||
In Node.js:
|
||||
```js
|
||||
// Load the fp build.
|
||||
var fp = require('lodash/fp');
|
||||
|
||||
// Load a method category.
|
||||
var object = require('lodash/fp/object');
|
||||
|
||||
// Load a single method for smaller builds with browserify/rollup/webpack.
|
||||
var extend = require('lodash/fp/extend');
|
||||
```
|
||||
|
||||
## Mapping
|
||||
|
||||
Immutable auto-curried iteratee-first data-last methods sound great, but what
|
||||
does that really mean for each method? Below is a breakdown of the mapping used
|
||||
to convert each method.
|
||||
|
||||
#### Capped Iteratee Arguments
|
||||
|
||||
Iteratee arguments are capped to avoid gotchas with variadic iteratees.
|
||||
```js
|
||||
// The `lodash/map` iteratee receives three arguments:
|
||||
// (value, index|key, collection)
|
||||
_.map(['6', '8', '10'], parseInt);
|
||||
// ➜ [6, NaN, 2]
|
||||
|
||||
// The `lodash/fp/map` iteratee is capped at one argument:
|
||||
// (value)
|
||||
fp.map(parseInt)(['6', '8', '10']);
|
||||
// ➜ [6, 8, 10]
|
||||
```
|
||||
|
||||
Methods that cap iteratees to one argument:<br>
|
||||
<%= toFuncList(_.keys(_.pickBy(mapping.iterateeAry, _.partial(_.eq, _, 1)))) %>
|
||||
|
||||
Methods that cap iteratees to two arguments:<br>
|
||||
<%= toFuncList(_.keys(_.pickBy(mapping.iterateeAry, _.partial(_.eq, _, 2)))) %>
|
||||
|
||||
The iteratee of `mapKeys` is invoked with one argument: (key)
|
||||
|
||||
#### Fixed Arity
|
||||
|
||||
Methods have fixed arities to support auto-currying.
|
||||
```js
|
||||
// `lodash/padStart` accepts an optional `chars` param.
|
||||
_.padStart('a', 3, '-')
|
||||
// ➜ '--a'
|
||||
|
||||
// `lodash/fp/padStart` does not.
|
||||
fp.padStart(3)('a');
|
||||
// ➜ ' a'
|
||||
fp.padCharsStart('-')(3)('a');
|
||||
// ➜ '--a'
|
||||
```
|
||||
|
||||
Methods with a fixed arity of one:<br>
|
||||
<%= toFuncList(_.difference(mapping.aryMethod[1], _.keys(mapping.skipFixed))) %>
|
||||
|
||||
Methods with a fixed arity of two:<br>
|
||||
<%= toFuncList(_.difference(mapping.aryMethod[2], _.keys(mapping.skipFixed))) %>
|
||||
|
||||
Methods with a fixed arity of three:<br>
|
||||
<%= toFuncList(_.difference(mapping.aryMethod[3], _.keys(mapping.skipFixed))) %>
|
||||
|
||||
Methods with a fixed arity of four:<br>
|
||||
<%= toFuncList(_.difference(mapping.aryMethod[4], _.keys(mapping.skipFixed))) %>
|
||||
|
||||
#### Rearranged Arguments
|
||||
|
||||
Method arguments are rearranged to make composition easier.
|
||||
```js
|
||||
// `lodash/filter` is data-first iteratee-last:
|
||||
// (collection, iteratee)
|
||||
var compact = _.partial(_.filter, _, Boolean);
|
||||
compact(['a', null, 'c']);
|
||||
// ➜ ['a', 'c']
|
||||
|
||||
// `lodash/fp/filter` is iteratee-first data-last:
|
||||
// (iteratee, collection)
|
||||
var compact = fp.filter(Boolean);
|
||||
compact(['a', null, 'c']);
|
||||
// ➜ ['a', 'c']
|
||||
```
|
||||
|
||||
##### Most methods follow these rules
|
||||
|
||||
A fixed arity of two has an argument order of:<br>
|
||||
<%= toArgOrder(mapping.aryRearg[2]) %>
|
||||
|
||||
A fixed arity of three has an argument order of:<br>
|
||||
<%= toArgOrder(mapping.aryRearg[3]) %>
|
||||
|
||||
A fixed arity of four has an argument order of:<br>
|
||||
<%= toArgOrder(mapping.aryRearg[4]) %>
|
||||
|
||||
##### Exceptions to the rules
|
||||
|
||||
Methods that accept an array of arguments:<br>
|
||||
<%= toFuncList(_.keys(mapping.methodSpread)) %>
|
||||
|
||||
Methods with unchanged argument orders:<br>
|
||||
<%= toFuncList(_.keys(mapping.skipRearg)) %>
|
||||
|
||||
Methods with custom argument orders:<br>
|
||||
<%= _.map(_.keys(mapping.methodRearg), function(methodName) {
|
||||
var orders = mapping.methodRearg[methodName];
|
||||
return ' * `_.' + methodName + '` has an order of ' + toArgOrder(orders);
|
||||
}).join('\n') %>
|
||||
|
||||
#### New Methods
|
||||
|
||||
Not all variadic methods have corresponding new method variants. Feel free to
|
||||
[request](https://github.com/lodash/lodash/blob/master/.github/CONTRIBUTING.md#feature-requests)
|
||||
any additions.
|
||||
|
||||
Methods created to accommodate Lodash’s variadic methods:<br>
|
||||
<%= toFuncList(_.keys(mapping.remap)) %>
|
||||
|
||||
#### Aliases
|
||||
|
||||
There are <%= _.size(mapping.aliasToReal) %> method aliases:<br>
|
||||
<%= _.map(_.keys(mapping.aliasToReal).sort(), function(alias) {
|
||||
var realName = mapping.aliasToReal[alias];
|
||||
return ' * `_.' + alias + '` is an alias of `_.' + realName + '`';
|
||||
}).join('\n') %>
|
||||
|
||||
## Placeholders
|
||||
|
||||
The placeholder argument, which defaults to `_`, may be used to fill in method
|
||||
arguments in a different order. Placeholders are filled by the first available
|
||||
arguments of the curried returned function.
|
||||
```js
|
||||
// The equivalent of `2 > 5`.
|
||||
_.gt(2)(5);
|
||||
// ➜ false
|
||||
|
||||
// The equivalent of `_.gt(5, 2)` or `5 > 2`.
|
||||
_.gt(_, 2)(5);
|
||||
// ➜ true
|
||||
```
|
||||
|
||||
## Chaining
|
||||
|
||||
The `lodash/fp` module **does not** convert chain sequence methods. See
|
||||
[Izaak Schroeder’s article](https://medium.com/making-internets/why-using-chain-is-a-mistake-9bc1f80d51ba)
|
||||
on using functional composition as an alternative to method chaining.
|
||||
|
||||
## Convert
|
||||
|
||||
Although `lodash/fp` & its method modules come pre-converted, there are times
|
||||
when you may want to customize the conversion. That’s when the `convert` method
|
||||
comes in handy.
|
||||
```js
|
||||
// Every option is `true` by default.
|
||||
var _fp = fp.convert({
|
||||
// Specify capping iteratee arguments.
|
||||
'cap': true,
|
||||
// Specify currying.
|
||||
'curry': true,
|
||||
// Specify fixed arity.
|
||||
'fixed': true,
|
||||
// Specify immutable operations.
|
||||
'immutable': true,
|
||||
// Specify rearranging arguments.
|
||||
'rearg': true
|
||||
});
|
||||
|
||||
// The `convert` method is available on each method too.
|
||||
var mapValuesWithKey = fp.mapValues.convert({ 'cap': false });
|
||||
|
||||
// Here’s an example of disabling iteratee argument caps to access the `key` param.
|
||||
mapValuesWithKey(function(value, key) {
|
||||
return key == 'a' ? -1 : value;
|
||||
})({ 'a': 1, 'b': 1 });
|
||||
// => { 'a': -1, 'b': 1 }
|
||||
```
|
||||
|
||||
Manual conversions are also possible with the `convert` module.
|
||||
```js
|
||||
var convert = require('lodash/fp/convert');
|
||||
|
||||
// Convert by name.
|
||||
var assign = convert('assign', require('lodash.assign'));
|
||||
|
||||
// Convert by object.
|
||||
var fp = convert({
|
||||
'assign': require('lodash.assign'),
|
||||
'chunk': require('lodash.chunk')
|
||||
});
|
||||
|
||||
// Convert by `lodash` instance.
|
||||
var fp = convert(lodash.runInContext());
|
||||
```
|
||||
|
||||
## Tooling
|
||||
|
||||
Use [eslint-plugin-lodash-fp](https://www.npmjs.com/package/eslint-plugin-lodash-fp)
|
||||
to help use `lodash/fp` more efficiently.
|
||||
|
|
@ -1,7 +0,0 @@
|
|||
module.exports = {
|
||||
'cap': false,
|
||||
'curry': false,
|
||||
'fixed': false,
|
||||
'immutable': false,
|
||||
'rearg': false
|
||||
};
|
||||
|
|
@ -1,15 +0,0 @@
|
|||
module.exports = {
|
||||
'ary': require('../ary'),
|
||||
'assign': require('../_baseAssign'),
|
||||
'clone': require('../clone'),
|
||||
'curry': require('../curry'),
|
||||
'forEach': require('../_arrayEach'),
|
||||
'isArray': require('../isArray'),
|
||||
'isFunction': require('../isFunction'),
|
||||
'iteratee': require('../iteratee'),
|
||||
'keys': require('../_baseKeys'),
|
||||
'rearg': require('../rearg'),
|
||||
'spread': require('../spread'),
|
||||
'toInteger': require('../toInteger'),
|
||||
'toPath': require('../toPath')
|
||||
};
|
||||
|
|
@ -1 +0,0 @@
|
|||
module.exports = require('./<%= name %>');
|
||||
|
|
@ -1,2 +0,0 @@
|
|||
var convert = require('./convert');
|
||||
module.exports = convert(require('../<%= name %>'));
|
||||
|
|
@ -1,18 +0,0 @@
|
|||
var baseConvert = require('./_baseConvert'),
|
||||
util = require('./_util');
|
||||
|
||||
/**
|
||||
* Converts `func` of `name` to an immutable auto-curried iteratee-first data-last
|
||||
* version with conversion `options` applied. If `name` is an object its methods
|
||||
* will be converted.
|
||||
*
|
||||
* @param {string} name The name of the function to wrap.
|
||||
* @param {Function} [func] The function to wrap.
|
||||
* @param {Object} [options] The options object. See `baseConvert` for more details.
|
||||
* @returns {Function|Object} Returns the converted function or object.
|
||||
*/
|
||||
function convert(name, func, options) {
|
||||
return baseConvert(util, name, func, options);
|
||||
}
|
||||
|
||||
module.exports = convert;
|
||||
|
|
@ -1,2 +0,0 @@
|
|||
var _ = require('./lodash.min').runInContext();
|
||||
module.exports = require('./fp/_baseConvert')(_, _);
|
||||
|
|
@ -1,5 +0,0 @@
|
|||
var convert = require('./convert'),
|
||||
func = convert('<%= name %>', require('../<%= _.get(mapping.remap, name, name) %>'));
|
||||
|
||||
func.placeholder = require('./placeholder');
|
||||
module.exports = func;
|
||||
|
|
@ -1,5 +0,0 @@
|
|||
var convert = require('./convert'),
|
||||
func = convert('<%= name %>', require('../<%= _.get(mapping.remap, name, name) %>'), require('./_falseOptions'));
|
||||
|
||||
func.placeholder = require('./placeholder');
|
||||
module.exports = func;
|
||||
|
|
@ -1,31 +0,0 @@
|
|||
'use strict';
|
||||
|
||||
var async = require('async'),
|
||||
path = require('path');
|
||||
|
||||
var file = require('../common/file'),
|
||||
util = require('../common/util');
|
||||
|
||||
var basePath = path.join(__dirname, '..', '..'),
|
||||
distPath = path.join(basePath, 'dist'),
|
||||
filename = 'lodash.js';
|
||||
|
||||
var baseLodash = path.join(basePath, filename),
|
||||
distLodash = path.join(distPath, filename);
|
||||
|
||||
/*----------------------------------------------------------------------------*/
|
||||
|
||||
/**
|
||||
* Creates browser builds of Lodash at the `target` path.
|
||||
*
|
||||
* @private
|
||||
* @param {string} target The output directory path.
|
||||
*/
|
||||
function build() {
|
||||
async.series([
|
||||
file.copy(baseLodash, distLodash),
|
||||
file.min(distLodash)
|
||||
], util.pitch);
|
||||
}
|
||||
|
||||
build();
|
||||
|
|
@ -1,83 +0,0 @@
|
|||
'use strict';
|
||||
|
||||
var _ = require('lodash'),
|
||||
docdown = require('docdown'),
|
||||
fs = require('fs-extra'),
|
||||
path = require('path');
|
||||
|
||||
var util = require('../common/util');
|
||||
|
||||
var basePath = path.join(__dirname, '..', '..'),
|
||||
docPath = path.join(basePath, 'doc'),
|
||||
readmePath = path.join(docPath, 'README.md');
|
||||
|
||||
var pkg = require('../../package.json'),
|
||||
version = pkg.version;
|
||||
|
||||
var config = {
|
||||
'base': {
|
||||
'path': path.join(basePath, 'lodash.js'),
|
||||
'title': '<a href="https://lodash.com/">lodash</a> <span>v' + version + '</span>',
|
||||
'toc': 'categories',
|
||||
'url': 'https://github.com/lodash/lodash/blob/' + version + '/lodash.js'
|
||||
},
|
||||
'github': {
|
||||
'style': 'github',
|
||||
'sublinks': [npmLink('Ⓝ', 'See the npm package')]
|
||||
},
|
||||
'site': {
|
||||
'entryLink': '<a href="${entryHref}" class="fa fa-link"></a>',
|
||||
'sourceLink': '[source](${sourceHref})',
|
||||
'tocHref': '',
|
||||
'tocLink': '',
|
||||
'sublinks': [npmLink('npm package')]
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* Composes a npm link from `text` and optional `title`.
|
||||
*
|
||||
* @private
|
||||
* @param {string} text The link text.
|
||||
* @param {string} [title] The link title.
|
||||
* @returns {string} Returns the composed npm link.
|
||||
*/
|
||||
function npmLink(text, title) {
|
||||
return (
|
||||
'<% if (name == "templateSettings" || !/^(?:methods|properties|seq)$/i.test(category)) {' +
|
||||
'print(' +
|
||||
'"[' + text + '](https://www.npmjs.com/package/lodash." + name.toLowerCase() + ' +
|
||||
'"' + (title == null ? '' : ' \\"' + title + '\\"') + ')"' +
|
||||
');' +
|
||||
'} %>'
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Post-process `markdown` to make adjustments.
|
||||
*
|
||||
* @private
|
||||
* @param {string} markdown The markdown to process.
|
||||
* @returns {string} Returns the processed markdown.
|
||||
*/
|
||||
function postprocess(markdown) {
|
||||
// Wrap symbol property identifiers in brackets.
|
||||
return markdown.replace(/\.(Symbol\.(?:[a-z]+[A-Z]?)+)/g, '[$1]');
|
||||
}
|
||||
|
||||
/*----------------------------------------------------------------------------*/
|
||||
|
||||
/**
|
||||
* Creates the documentation markdown formatted for 'github' or 'site'.
|
||||
*
|
||||
* @private
|
||||
* @param {string} type The format type.
|
||||
*/
|
||||
function build(type) {
|
||||
var options = _.defaults({}, config.base, config[type]),
|
||||
markdown = docdown(options);
|
||||
|
||||
fs.writeFile(readmePath, postprocess(markdown), util.pitch);
|
||||
}
|
||||
|
||||
build(_.last(process.argv));
|
||||
|
|
@ -1,35 +0,0 @@
|
|||
'use strict';
|
||||
|
||||
var _ = require('lodash'),
|
||||
async = require('async'),
|
||||
path = require('path');
|
||||
|
||||
var file = require('../common/file'),
|
||||
util = require('../common/util');
|
||||
|
||||
var basePath = path.join(__dirname, '..', '..'),
|
||||
distPath = path.join(basePath, 'dist');
|
||||
|
||||
var filePairs = [
|
||||
[path.join(distPath, 'lodash.core.js'), 'core.js'],
|
||||
[path.join(distPath, 'lodash.core.min.js'), 'core.min.js'],
|
||||
[path.join(distPath, 'lodash.min.js'), 'lodash.min.js']
|
||||
];
|
||||
|
||||
/*----------------------------------------------------------------------------*/
|
||||
|
||||
/**
|
||||
* Creates supplementary Lodash modules at the `target` path.
|
||||
*
|
||||
* @private
|
||||
* @param {string} target The output directory path.
|
||||
*/
|
||||
function build(target) {
|
||||
var actions = _.map(filePairs, function(pair) {
|
||||
return file.copy(pair[0], path.join(target, pair[1]));
|
||||
});
|
||||
|
||||
async.series(actions, util.pitch);
|
||||
}
|
||||
|
||||
build(_.last(process.argv));
|
||||
|
|
@ -1,73 +0,0 @@
|
|||
'use strict';
|
||||
|
||||
var _ = require('lodash'),
|
||||
fs = require('fs'),
|
||||
marky = require('marky-markdown'),
|
||||
path = require('path'),
|
||||
util = require('../common/util');
|
||||
|
||||
var basePath = path.join(__dirname, '..', '..'),
|
||||
docPath = path.join(basePath, 'doc'),
|
||||
readmePath = path.join(docPath, 'README.md');
|
||||
|
||||
function build(type) {
|
||||
var markdown = fs
|
||||
// Load markdown.
|
||||
.readFileSync(readmePath, 'utf8')
|
||||
// Uncomment docdown HTML hints.
|
||||
.replace(/(<)!--\s*|\s*--(>)/g, '$1$2');
|
||||
|
||||
var $ = marky(markdown, { 'sanitize': false }),
|
||||
$header = $('h1').first().remove(),
|
||||
version = _.trim($header.find('span').first().text()).slice(1);
|
||||
|
||||
// Remove docdown horizontal rules.
|
||||
$('hr').remove();
|
||||
|
||||
// Remove marky-markdown additions.
|
||||
$('[id^="user-content-"]')
|
||||
.attr('class', null)
|
||||
.attr('id', null);
|
||||
|
||||
$(':header:not(h3) > a').each(function() {
|
||||
var $a = $(this);
|
||||
$a.replaceWith($a.html());
|
||||
});
|
||||
|
||||
// Fix marky-markdown wrapping around headers.
|
||||
$('p:empty + h3').prev().remove();
|
||||
|
||||
$('h3 ~ p:empty').each(function() {
|
||||
var $p = $(this),
|
||||
node = this.previousSibling;
|
||||
|
||||
while ((node = node.previousSibling) && node.name != 'h3' && node.name != 'p') {
|
||||
$p.prepend(node.nextSibling);
|
||||
}
|
||||
});
|
||||
|
||||
$('h3 code em').parent().each(function() {
|
||||
var $code = $(this);
|
||||
$code.html($code.html().replace(/<\/?em>/g, '_'));
|
||||
});
|
||||
|
||||
var html = [
|
||||
// Append YAML front matter.
|
||||
'---',
|
||||
'id: docs',
|
||||
'layout: docs',
|
||||
'title: Lodash Documentation',
|
||||
'version: ' + (version || null),
|
||||
'---',
|
||||
'',
|
||||
// Wrap in raw tags to avoid Liquid template tag processing.
|
||||
'{% raw %}',
|
||||
_.trim($.html()),
|
||||
'{% endraw %}',
|
||||
''
|
||||
].join('\n');
|
||||
|
||||
fs.writeFile(path.join(docPath, version + '.html'), html, util.pitch);
|
||||
}
|
||||
|
||||
build();
|
||||
|
|
@ -0,0 +1,98 @@
|
|||
/**
|
||||
* @license
|
||||
* lodash 3.10.1 (Custom Build) lodash.com/license | Underscore.js 1.8.3 underscorejs.org/LICENSE
|
||||
* Build: `lodash modern -o ./lodash.js`
|
||||
*/
|
||||
;(function(){function n(n,t){if(n!==t){var r=null===n,e=n===w,u=n===n,o=null===t,i=t===w,f=t===t;if(n>t&&!o||!u||r&&!i&&f||e&&f)return 1;if(n<t&&!r||!f||o&&!e&&u||i&&u)return-1}return 0}function t(n,t,r){for(var e=n.length,u=r?e:-1;r?u--:++u<e;)if(t(n[u],u,n))return u;return-1}function r(n,t,r){if(t!==t)return p(n,r);r-=1;for(var e=n.length;++r<e;)if(n[r]===t)return r;return-1}function e(n){return typeof n=="function"||false}function u(n){return null==n?"":n+""}function o(n,t){for(var r=-1,e=n.length;++r<e&&-1<t.indexOf(n.charAt(r)););
|
||||
return r}function i(n,t){for(var r=n.length;r--&&-1<t.indexOf(n.charAt(r)););return r}function f(t,r){return n(t.a,r.a)||t.b-r.b}function a(n){return Nn[n]}function c(n){return Tn[n]}function l(n,t,r){return t?n=Bn[n]:r&&(n=Dn[n]),"\\"+n}function s(n){return"\\"+Dn[n]}function p(n,t,r){var e=n.length;for(t+=r?0:-1;r?t--:++t<e;){var u=n[t];if(u!==u)return t}return-1}function h(n){return!!n&&typeof n=="object"}function _(n){return 160>=n&&9<=n&&13>=n||32==n||160==n||5760==n||6158==n||8192<=n&&(8202>=n||8232==n||8233==n||8239==n||8287==n||12288==n||65279==n);
|
||||
}function v(n,t){for(var r=-1,e=n.length,u=-1,o=[];++r<e;)n[r]===t&&(n[r]=z,o[++u]=r);return o}function g(n){for(var t=-1,r=n.length;++t<r&&_(n.charCodeAt(t)););return t}function y(n){for(var t=n.length;t--&&_(n.charCodeAt(t)););return t}function d(n){return Ln[n]}function m(_){function Nn(n){if(h(n)&&!(Oo(n)||n instanceof zn)){if(n instanceof Ln)return n;if(nu.call(n,"__chain__")&&nu.call(n,"__wrapped__"))return Mr(n)}return new Ln(n)}function Tn(){}function Ln(n,t,r){this.__wrapped__=n,this.__actions__=r||[],
|
||||
this.__chain__=!!t}function zn(n){this.__wrapped__=n,this.__actions__=[],this.__dir__=1,this.__filtered__=false,this.__iteratees__=[],this.__takeCount__=Ru,this.__views__=[]}function Bn(){this.__data__={}}function Dn(n){var t=n?n.length:0;for(this.data={hash:gu(null),set:new lu};t--;)this.push(n[t])}function Mn(n,t){var r=n.data;return(typeof t=="string"||ge(t)?r.set.has(t):r.hash[t])?0:-1}function qn(n,t){var r=-1,e=n.length;for(t||(t=Be(e));++r<e;)t[r]=n[r];return t}function Pn(n,t){for(var r=-1,e=n.length;++r<e&&false!==t(n[r],r,n););
|
||||
return n}function Kn(n,t){for(var r=-1,e=n.length;++r<e;)if(!t(n[r],r,n))return false;return true}function Vn(n,t){for(var r=-1,e=n.length,u=-1,o=[];++r<e;){var i=n[r];t(i,r,n)&&(o[++u]=i)}return o}function Gn(n,t){for(var r=-1,e=n.length,u=Be(e);++r<e;)u[r]=t(n[r],r,n);return u}function Jn(n,t){for(var r=-1,e=t.length,u=n.length;++r<e;)n[u+r]=t[r];return n}function Xn(n,t,r,e){var u=-1,o=n.length;for(e&&o&&(r=n[++u]);++u<o;)r=t(r,n[u],u,n);return r}function Hn(n,t){for(var r=-1,e=n.length;++r<e;)if(t(n[r],r,n))return true;
|
||||
return false}function Qn(n,t,r,e){return n!==w&&nu.call(e,r)?n:t}function nt(n,t,r){for(var e=-1,u=zo(t),o=u.length;++e<o;){var i=u[e],f=n[i],a=r(f,t[i],i,n,t);(a===a?a===f:f!==f)&&(f!==w||i in n)||(n[i]=a)}return n}function tt(n,t){return null==t?n:et(t,zo(t),n)}function rt(n,t){for(var r=-1,e=null==n,u=!e&&Er(n),o=u?n.length:0,i=t.length,f=Be(i);++r<i;){var a=t[r];f[r]=u?Cr(a,o)?n[a]:w:e?w:n[a]}return f}function et(n,t,r){r||(r={});for(var e=-1,u=t.length;++e<u;){var o=t[e];r[o]=n[o]}return r}function ut(n,t,r){
|
||||
var e=typeof n;return"function"==e?t===w?n:Bt(n,t,r):null==n?Fe:"object"==e?bt(n):t===w?ze(n):xt(n,t)}function ot(n,t,r,e,u,o,i){var f;if(r&&(f=u?r(n,e,u):r(n)),f!==w)return f;if(!ge(n))return n;if(e=Oo(n)){if(f=kr(n),!t)return qn(n,f)}else{var a=ru.call(n),c=a==K;if(a!=Z&&a!=B&&(!c||u))return Fn[a]?Rr(n,a,t):u?n:{};if(f=Ir(c?{}:n),!t)return tt(f,n)}for(o||(o=[]),i||(i=[]),u=o.length;u--;)if(o[u]==n)return i[u];return o.push(n),i.push(f),(e?Pn:_t)(n,function(e,u){f[u]=ot(e,t,r,u,n,o,i)}),f}function it(n,t,r){
|
||||
if(typeof n!="function")throw new Ge(L);return su(function(){n.apply(w,r)},t)}function ft(n,t){var e=n?n.length:0,u=[];if(!e)return u;var o=-1,i=xr(),f=i===r,a=f&&t.length>=F&&gu&&lu?new Dn(t):null,c=t.length;a&&(i=Mn,f=false,t=a);n:for(;++o<e;)if(a=n[o],f&&a===a){for(var l=c;l--;)if(t[l]===a)continue n;u.push(a)}else 0>i(t,a,0)&&u.push(a);return u}function at(n,t){var r=true;return Su(n,function(n,e,u){return r=!!t(n,e,u)}),r}function ct(n,t,r,e){var u=e,o=u;return Su(n,function(n,i,f){i=+t(n,i,f),(r(i,u)||i===e&&i===o)&&(u=i,
|
||||
o=n)}),o}function lt(n,t){var r=[];return Su(n,function(n,e,u){t(n,e,u)&&r.push(n)}),r}function st(n,t,r,e){var u;return r(n,function(n,r,o){return t(n,r,o)?(u=e?r:n,false):void 0}),u}function pt(n,t,r,e){e||(e=[]);for(var u=-1,o=n.length;++u<o;){var i=n[u];h(i)&&Er(i)&&(r||Oo(i)||pe(i))?t?pt(i,t,r,e):Jn(e,i):r||(e[e.length]=i)}return e}function ht(n,t){Nu(n,t,Re)}function _t(n,t){return Nu(n,t,zo)}function vt(n,t){return Tu(n,t,zo)}function gt(n,t){for(var r=-1,e=t.length,u=-1,o=[];++r<e;){var i=t[r];
|
||||
ve(n[i])&&(o[++u]=i)}return o}function yt(n,t,r){if(null!=n){r!==w&&r in Br(n)&&(t=[r]),r=0;for(var e=t.length;null!=n&&r<e;)n=n[t[r++]];return r&&r==e?n:w}}function dt(n,t,r,e,u,o){if(n===t)n=true;else if(null==n||null==t||!ge(n)&&!h(t))n=n!==n&&t!==t;else n:{var i=dt,f=Oo(n),a=Oo(t),c=D,l=D;f||(c=ru.call(n),c==B?c=Z:c!=Z&&(f=xe(n))),a||(l=ru.call(t),l==B?l=Z:l!=Z&&xe(t));var s=c==Z,a=l==Z,l=c==l;if(!l||f||s){if(!e&&(c=s&&nu.call(n,"__wrapped__"),a=a&&nu.call(t,"__wrapped__"),c||a)){n=i(c?n.value():n,a?t.value():t,r,e,u,o);
|
||||
break n}if(l){for(u||(u=[]),o||(o=[]),c=u.length;c--;)if(u[c]==n){n=o[c]==t;break n}u.push(n),o.push(t),n=(f?yr:mr)(n,t,i,r,e,u,o),u.pop(),o.pop()}else n=false}else n=dr(n,t,c)}return n}function mt(n,t,r){var e=t.length,u=e,o=!r;if(null==n)return!u;for(n=Br(n);e--;){var i=t[e];if(o&&i[2]?i[1]!==n[i[0]]:!(i[0]in n))return false}for(;++e<u;){var i=t[e],f=i[0],a=n[f],c=i[1];if(o&&i[2]){if(a===w&&!(f in n))return false}else if(i=r?r(a,c,f):w,i===w?!dt(c,a,r,true):!i)return false}return true}function wt(n,t){var r=-1,e=Er(n)?Be(n.length):[];
|
||||
return Su(n,function(n,u,o){e[++r]=t(n,u,o)}),e}function bt(n){var t=Ar(n);if(1==t.length&&t[0][2]){var r=t[0][0],e=t[0][1];return function(n){return null==n?false:n[r]===e&&(e!==w||r in Br(n))}}return function(n){return mt(n,t)}}function xt(n,t){var r=Oo(n),e=Wr(n)&&t===t&&!ge(t),u=n+"";return n=Dr(n),function(o){if(null==o)return false;var i=u;if(o=Br(o),!(!r&&e||i in o)){if(o=1==n.length?o:yt(o,Et(n,0,-1)),null==o)return false;i=Zr(n),o=Br(o)}return o[i]===t?t!==w||i in o:dt(t,o[i],w,true)}}function At(n,t,r,e,u){
|
||||
if(!ge(n))return n;var o=Er(t)&&(Oo(t)||xe(t)),i=o?w:zo(t);return Pn(i||t,function(f,a){if(i&&(a=f,f=t[a]),h(f)){e||(e=[]),u||(u=[]);n:{for(var c=a,l=e,s=u,p=l.length,_=t[c];p--;)if(l[p]==_){n[c]=s[p];break n}var p=n[c],v=r?r(p,_,c,n,t):w,g=v===w;g&&(v=_,Er(_)&&(Oo(_)||xe(_))?v=Oo(p)?p:Er(p)?qn(p):[]:me(_)||pe(_)?v=pe(p)?ke(p):me(p)?p:{}:g=false),l.push(_),s.push(v),g?n[c]=At(v,_,r,l,s):(v===v?v!==p:p===p)&&(n[c]=v)}}else c=n[a],l=r?r(c,f,a,n,t):w,(s=l===w)&&(l=f),l===w&&(!o||a in n)||!s&&(l===l?l===c:c!==c)||(n[a]=l);
|
||||
}),n}function jt(n){return function(t){return null==t?w:t[n]}}function kt(n){var t=n+"";return n=Dr(n),function(r){return yt(r,n,t)}}function It(n,t){for(var r=n?t.length:0;r--;){var e=t[r];if(e!=u&&Cr(e)){var u=e;pu.call(n,e,1)}}}function Rt(n,t){return n+yu(ku()*(t-n+1))}function Ot(n,t,r,e,u){return u(n,function(n,u,o){r=e?(e=false,n):t(r,n,u,o)}),r}function Et(n,t,r){var e=-1,u=n.length;for(t=null==t?0:+t||0,0>t&&(t=-t>u?0:u+t),r=r===w||r>u?u:+r||0,0>r&&(r+=u),u=t>r?0:r-t>>>0,t>>>=0,r=Be(u);++e<u;)r[e]=n[e+t];
|
||||
return r}function Ct(n,t){var r;return Su(n,function(n,e,u){return r=t(n,e,u),!r}),!!r}function Ut(n,t){var r=n.length;for(n.sort(t);r--;)n[r]=n[r].c;return n}function Wt(t,r,e){var u=wr(),o=-1;return r=Gn(r,function(n){return u(n)}),t=wt(t,function(n){return{a:Gn(r,function(t){return t(n)}),b:++o,c:n}}),Ut(t,function(t,r){var u;n:{for(var o=-1,i=t.a,f=r.a,a=i.length,c=e.length;++o<a;)if(u=n(i[o],f[o])){if(o>=c)break n;o=e[o],u*="asc"===o||true===o?1:-1;break n}u=t.b-r.b}return u})}function $t(n,t){
|
||||
var r=0;return Su(n,function(n,e,u){r+=+t(n,e,u)||0}),r}function St(n,t){var e=-1,u=xr(),o=n.length,i=u===r,f=i&&o>=F,a=f&&gu&&lu?new Dn(void 0):null,c=[];a?(u=Mn,i=false):(f=false,a=t?[]:c);n:for(;++e<o;){var l=n[e],s=t?t(l,e,n):l;if(i&&l===l){for(var p=a.length;p--;)if(a[p]===s)continue n;t&&a.push(s),c.push(l)}else 0>u(a,s,0)&&((t||f)&&a.push(s),c.push(l))}return c}function Ft(n,t){for(var r=-1,e=t.length,u=Be(e);++r<e;)u[r]=n[t[r]];return u}function Nt(n,t,r,e){for(var u=n.length,o=e?u:-1;(e?o--:++o<u)&&t(n[o],o,n););
|
||||
return r?Et(n,e?0:o,e?o+1:u):Et(n,e?o+1:0,e?u:o)}function Tt(n,t){var r=n;r instanceof zn&&(r=r.value());for(var e=-1,u=t.length;++e<u;)var o=t[e],r=o.func.apply(o.thisArg,Jn([r],o.args));return r}function Lt(n,t,r){var e=0,u=n?n.length:e;if(typeof t=="number"&&t===t&&u<=Eu){for(;e<u;){var o=e+u>>>1,i=n[o];(r?i<=t:i<t)&&null!==i?e=o+1:u=o}return u}return zt(n,t,Fe,r)}function zt(n,t,r,e){t=r(t);for(var u=0,o=n?n.length:0,i=t!==t,f=null===t,a=t===w;u<o;){var c=yu((u+o)/2),l=r(n[c]),s=l!==w,p=l===l;
|
||||
(i?p||e:f?p&&s&&(e||null!=l):a?p&&(e||s):null==l?0:e?l<=t:l<t)?u=c+1:o=c}return xu(o,Ou)}function Bt(n,t,r){if(typeof n!="function")return Fe;if(t===w)return n;switch(r){case 1:return function(r){return n.call(t,r)};case 3:return function(r,e,u){return n.call(t,r,e,u)};case 4:return function(r,e,u,o){return n.call(t,r,e,u,o)};case 5:return function(r,e,u,o,i){return n.call(t,r,e,u,o,i)}}return function(){return n.apply(t,arguments)}}function Dt(n){var t=new ou(n.byteLength);return new hu(t).set(new hu(n)),
|
||||
t}function Mt(n,t,r){for(var e=r.length,u=-1,o=bu(n.length-e,0),i=-1,f=t.length,a=Be(f+o);++i<f;)a[i]=t[i];for(;++u<e;)a[r[u]]=n[u];for(;o--;)a[i++]=n[u++];return a}function qt(n,t,r){for(var e=-1,u=r.length,o=-1,i=bu(n.length-u,0),f=-1,a=t.length,c=Be(i+a);++o<i;)c[o]=n[o];for(i=o;++f<a;)c[i+f]=t[f];for(;++e<u;)c[i+r[e]]=n[o++];return c}function Pt(n,t){return function(r,e,u){var o=t?t():{};if(e=wr(e,u,3),Oo(r)){u=-1;for(var i=r.length;++u<i;){var f=r[u];n(o,f,e(f,u,r),r)}}else Su(r,function(t,r,u){
|
||||
n(o,t,e(t,r,u),u)});return o}}function Kt(n){return le(function(t,r){var e=-1,u=null==t?0:r.length,o=2<u?r[u-2]:w,i=2<u?r[2]:w,f=1<u?r[u-1]:w;for(typeof o=="function"?(o=Bt(o,f,5),u-=2):(o=typeof f=="function"?f:w,u-=o?1:0),i&&Ur(r[0],r[1],i)&&(o=3>u?w:o,u=1);++e<u;)(i=r[e])&&n(t,i,o);return t})}function Vt(n,t){return function(r,e){var u=r?Bu(r):0;if(!Sr(u))return n(r,e);for(var o=t?u:-1,i=Br(r);(t?o--:++o<u)&&false!==e(i[o],o,i););return r}}function Zt(n){return function(t,r,e){var u=Br(t);e=e(t);for(var o=e.length,i=n?o:-1;n?i--:++i<o;){
|
||||
var f=e[i];if(false===r(u[f],f,u))break}return t}}function Yt(n,t){function r(){return(this&&this!==Zn&&this instanceof r?e:n).apply(t,arguments)}var e=Jt(n);return r}function Gt(n){return function(t){var r=-1;t=$e(Ce(t));for(var e=t.length,u="";++r<e;)u=n(u,t[r],r);return u}}function Jt(n){return function(){var t=arguments;switch(t.length){case 0:return new n;case 1:return new n(t[0]);case 2:return new n(t[0],t[1]);case 3:return new n(t[0],t[1],t[2]);case 4:return new n(t[0],t[1],t[2],t[3]);case 5:
|
||||
return new n(t[0],t[1],t[2],t[3],t[4]);case 6:return new n(t[0],t[1],t[2],t[3],t[4],t[5]);case 7:return new n(t[0],t[1],t[2],t[3],t[4],t[5],t[6])}var r=$u(n.prototype),t=n.apply(r,t);return ge(t)?t:r}}function Xt(n){function t(r,e,u){return u&&Ur(r,e,u)&&(e=w),r=gr(r,n,w,w,w,w,w,e),r.placeholder=t.placeholder,r}return t}function Ht(n,t){return le(function(r){var e=r[0];return null==e?e:(r.push(t),n.apply(w,r))})}function Qt(n,t){return function(r,e,u){if(u&&Ur(r,e,u)&&(e=w),e=wr(e,u,3),1==e.length){
|
||||
u=r=Oo(r)?r:zr(r);for(var o=e,i=-1,f=u.length,a=t,c=a;++i<f;){var l=u[i],s=+o(l);n(s,a)&&(a=s,c=l)}if(u=c,!r.length||u!==t)return u}return ct(r,e,n,t)}}function nr(n,r){return function(e,u,o){return u=wr(u,o,3),Oo(e)?(u=t(e,u,r),-1<u?e[u]:w):st(e,u,n)}}function tr(n){return function(r,e,u){return r&&r.length?(e=wr(e,u,3),t(r,e,n)):-1}}function rr(n){return function(t,r,e){return r=wr(r,e,3),st(t,r,n,true)}}function er(n){return function(){for(var t,r=arguments.length,e=n?r:-1,u=0,o=Be(r);n?e--:++e<r;){
|
||||
var i=o[u++]=arguments[e];if(typeof i!="function")throw new Ge(L);!t&&Ln.prototype.thru&&"wrapper"==br(i)&&(t=new Ln([],true))}for(e=t?-1:r;++e<r;){var i=o[e],u=br(i),f="wrapper"==u?zu(i):w;t=f&&$r(f[0])&&f[1]==(E|k|R|C)&&!f[4].length&&1==f[9]?t[br(f[0])].apply(t,f[3]):1==i.length&&$r(i)?t[u]():t.thru(i)}return function(){var n=arguments,e=n[0];if(t&&1==n.length&&Oo(e)&&e.length>=F)return t.plant(e).value();for(var u=0,n=r?o[u].apply(this,n):e;++u<r;)n=o[u].call(this,n);return n}}}function ur(n,t){
|
||||
return function(r,e,u){return typeof e=="function"&&u===w&&Oo(r)?n(r,e):t(r,Bt(e,u,3))}}function or(n){return function(t,r,e){return(typeof r!="function"||e!==w)&&(r=Bt(r,e,3)),n(t,r,Re)}}function ir(n){return function(t,r,e){return(typeof r!="function"||e!==w)&&(r=Bt(r,e,3)),n(t,r)}}function fr(n){return function(t,r,e){var u={};return r=wr(r,e,3),_t(t,function(t,e,o){o=r(t,e,o),e=n?o:e,t=n?t:o,u[e]=t}),u}}function ar(n){return function(t,r,e){return t=u(t),(n?t:"")+pr(t,r,e)+(n?"":t)}}function cr(n){
|
||||
var t=le(function(r,e){var u=v(e,t.placeholder);return gr(r,n,w,e,u)});return t}function lr(n,t){return function(r,e,u,o){var i=3>arguments.length;return typeof e=="function"&&o===w&&Oo(r)?n(r,e,u,i):Ot(r,wr(e,o,4),u,i,t)}}function sr(n,t,r,e,u,o,i,f,a,c){function l(){for(var m=arguments.length,b=m,j=Be(m);b--;)j[b]=arguments[b];if(e&&(j=Mt(j,e,u)),o&&(j=qt(j,o,i)),_||y){var b=l.placeholder,k=v(j,b),m=m-k.length;if(m<c){var I=f?qn(f):w,m=bu(c-m,0),E=_?k:w,k=_?w:k,C=_?j:w,j=_?w:j;return t|=_?R:O,t&=~(_?O:R),
|
||||
g||(t&=~(x|A)),j=[n,t,r,C,E,j,k,I,a,m],I=sr.apply(w,j),$r(n)&&Du(I,j),I.placeholder=b,I}}if(b=p?r:this,I=h?b[n]:n,f)for(m=j.length,E=xu(f.length,m),k=qn(j);E--;)C=f[E],j[E]=Cr(C,m)?k[C]:w;return s&&a<j.length&&(j.length=a),this&&this!==Zn&&this instanceof l&&(I=d||Jt(n)),I.apply(b,j)}var s=t&E,p=t&x,h=t&A,_=t&k,g=t&j,y=t&I,d=h?w:Jt(n);return l}function pr(n,t,r){return n=n.length,t=+t,n<t&&mu(t)?(t-=n,r=null==r?" ":r+"",Ue(r,vu(t/r.length)).slice(0,t)):""}function hr(n,t,r,e){function u(){for(var t=-1,f=arguments.length,a=-1,c=e.length,l=Be(c+f);++a<c;)l[a]=e[a];
|
||||
for(;f--;)l[a++]=arguments[++t];return(this&&this!==Zn&&this instanceof u?i:n).apply(o?r:this,l)}var o=t&x,i=Jt(n);return u}function _r(n){var t=Pe[n];return function(n,r){return(r=r===w?0:+r||0)?(r=au(10,r),t(n*r)/r):t(n)}}function vr(n){return function(t,r,e,u){var o=wr(e);return null==e&&o===ut?Lt(t,r,n):zt(t,r,o(e,u,1),n)}}function gr(n,t,r,e,u,o,i,f){var a=t&A;if(!a&&typeof n!="function")throw new Ge(L);var c=e?e.length:0;if(c||(t&=~(R|O),e=u=w),c-=u?u.length:0,t&O){var l=e,s=u;e=u=w}var p=a?w:zu(n);
|
||||
return r=[n,t,r,e,u,l,s,o,i,f],p&&(e=r[1],t=p[1],f=e|t,u=t==E&&e==k||t==E&&e==C&&r[7].length<=p[8]||t==(E|C)&&e==k,(f<E||u)&&(t&x&&(r[2]=p[2],f|=e&x?0:j),(e=p[3])&&(u=r[3],r[3]=u?Mt(u,e,p[4]):qn(e),r[4]=u?v(r[3],z):qn(p[4])),(e=p[5])&&(u=r[5],r[5]=u?qt(u,e,p[6]):qn(e),r[6]=u?v(r[5],z):qn(p[6])),(e=p[7])&&(r[7]=qn(e)),t&E&&(r[8]=null==r[8]?p[8]:xu(r[8],p[8])),null==r[9]&&(r[9]=p[9]),r[0]=p[0],r[1]=f),t=r[1],f=r[9]),r[9]=null==f?a?0:n.length:bu(f-c,0)||0,(p?Lu:Du)(t==x?Yt(r[0],r[2]):t!=R&&t!=(x|R)||r[4].length?sr.apply(w,r):hr.apply(w,r),r);
|
||||
}function yr(n,t,r,e,u,o,i){var f=-1,a=n.length,c=t.length;if(a!=c&&(!u||c<=a))return false;for(;++f<a;){var l=n[f],c=t[f],s=e?e(u?c:l,u?l:c,f):w;if(s!==w){if(s)continue;return false}if(u){if(!Hn(t,function(n){return l===n||r(l,n,e,u,o,i)}))return false}else if(l!==c&&!r(l,c,e,u,o,i))return false}return true}function dr(n,t,r){switch(r){case M:case q:return+n==+t;case P:return n.name==t.name&&n.message==t.message;case V:return n!=+n?t!=+t:n==+t;case Y:case G:return n==t+""}return false}function mr(n,t,r,e,u,o,i){var f=zo(n),a=f.length,c=zo(t).length;
|
||||
if(a!=c&&!u)return false;for(c=a;c--;){var l=f[c];if(!(u?l in t:nu.call(t,l)))return false}for(var s=u;++c<a;){var l=f[c],p=n[l],h=t[l],_=e?e(u?h:p,u?p:h,l):w;if(_===w?!r(p,h,e,u,o,i):!_)return false;s||(s="constructor"==l)}return s||(r=n.constructor,e=t.constructor,!(r!=e&&"constructor"in n&&"constructor"in t)||typeof r=="function"&&r instanceof r&&typeof e=="function"&&e instanceof e)?true:false}function wr(n,t,r){var e=Nn.callback||Se,e=e===Se?ut:e;return r?e(n,t,r):e}function br(n){for(var t=n.name+"",r=Wu[t],e=r?r.length:0;e--;){
|
||||
var u=r[e],o=u.func;if(null==o||o==n)return u.name}return t}function xr(n,t,e){var u=Nn.indexOf||Vr,u=u===Vr?r:u;return n?u(n,t,e):u}function Ar(n){n=Oe(n);for(var t=n.length;t--;){var r=n[t][1];n[t][2]=r===r&&!ge(r)}return n}function jr(n,t){var r=null==n?w:n[t];return ye(r)?r:w}function kr(n){var t=n.length,r=new n.constructor(t);return t&&"string"==typeof n[0]&&nu.call(n,"index")&&(r.index=n.index,r.input=n.input),r}function Ir(n){return n=n.constructor,typeof n=="function"&&n instanceof n||(n=Ve),
|
||||
new n}function Rr(n,t,r){var e=n.constructor;switch(t){case J:return Dt(n);case M:case q:return new e(+n);case X:case H:case Q:case nn:case tn:case rn:case en:case un:case on:return t=n.buffer,new e(r?Dt(t):t,n.byteOffset,n.length);case V:case G:return new e(n);case Y:var u=new e(n.source,kn.exec(n));u.lastIndex=n.lastIndex}return u}function Or(n,t,r){return null==n||Wr(t,n)||(t=Dr(t),n=1==t.length?n:yt(n,Et(t,0,-1)),t=Zr(t)),t=null==n?n:n[t],null==t?w:t.apply(n,r)}function Er(n){return null!=n&&Sr(Bu(n));
|
||||
}function Cr(n,t){return n=typeof n=="number"||On.test(n)?+n:-1,t=null==t?Cu:t,-1<n&&0==n%1&&n<t}function Ur(n,t,r){if(!ge(r))return false;var e=typeof t;return("number"==e?Er(r)&&Cr(t,r.length):"string"==e&&t in r)?(t=r[t],n===n?n===t:t!==t):false}function Wr(n,t){var r=typeof n;return"string"==r&&dn.test(n)||"number"==r?true:Oo(n)?false:!yn.test(n)||null!=t&&n in Br(t)}function $r(n){var t=br(n),r=Nn[t];return typeof r=="function"&&t in zn.prototype?n===r?true:(t=zu(r),!!t&&n===t[0]):false}function Sr(n){return typeof n=="number"&&-1<n&&0==n%1&&n<=Cu;
|
||||
}function Fr(n,t){return n===w?t:Eo(n,t,Fr)}function Nr(n,t){n=Br(n);for(var r=-1,e=t.length,u={};++r<e;){var o=t[r];o in n&&(u[o]=n[o])}return u}function Tr(n,t){var r={};return ht(n,function(n,e,u){t(n,e,u)&&(r[e]=n)}),r}function Lr(n){for(var t=Re(n),r=t.length,e=r&&n.length,u=!!e&&Sr(e)&&(Oo(n)||pe(n)),o=-1,i=[];++o<r;){var f=t[o];(u&&Cr(f,e)||nu.call(n,f))&&i.push(f)}return i}function zr(n){return null==n?[]:Er(n)?ge(n)?n:Ve(n):Ee(n)}function Br(n){return ge(n)?n:Ve(n)}function Dr(n){if(Oo(n))return n;
|
||||
var t=[];return u(n).replace(mn,function(n,r,e,u){t.push(e?u.replace(An,"$1"):r||n)}),t}function Mr(n){return n instanceof zn?n.clone():new Ln(n.__wrapped__,n.__chain__,qn(n.__actions__))}function qr(n,t,r){return n&&n.length?((r?Ur(n,t,r):null==t)&&(t=1),Et(n,0>t?0:t)):[]}function Pr(n,t,r){var e=n?n.length:0;return e?((r?Ur(n,t,r):null==t)&&(t=1),t=e-(+t||0),Et(n,0,0>t?0:t)):[]}function Kr(n){return n?n[0]:w}function Vr(n,t,e){var u=n?n.length:0;if(!u)return-1;if(typeof e=="number")e=0>e?bu(u+e,0):e;else if(e)return e=Lt(n,t),
|
||||
e<u&&(t===t?t===n[e]:n[e]!==n[e])?e:-1;return r(n,t,e||0)}function Zr(n){var t=n?n.length:0;return t?n[t-1]:w}function Yr(n){return qr(n,1)}function Gr(n,t,e,u){if(!n||!n.length)return[];null!=t&&typeof t!="boolean"&&(u=e,e=Ur(n,t,u)?w:t,t=false);var o=wr();if((null!=e||o!==ut)&&(e=o(e,u,3)),t&&xr()===r){t=e;var i;e=-1,u=n.length;for(var o=-1,f=[];++e<u;){var a=n[e],c=t?t(a,e,n):a;e&&i===c||(i=c,f[++o]=a)}n=f}else n=St(n,e);return n}function Jr(n){if(!n||!n.length)return[];var t=-1,r=0;n=Vn(n,function(n){
|
||||
return Er(n)?(r=bu(n.length,r),true):void 0});for(var e=Be(r);++t<r;)e[t]=Gn(n,jt(t));return e}function Xr(n,t,r){return n&&n.length?(n=Jr(n),null==t?n:(t=Bt(t,r,4),Gn(n,function(n){return Xn(n,t,w,true)}))):[]}function Hr(n,t){var r=-1,e=n?n.length:0,u={};for(!e||t||Oo(n[0])||(t=[]);++r<e;){var o=n[r];t?u[o]=t[r]:o&&(u[o[0]]=o[1])}return u}function Qr(n){return n=Nn(n),n.__chain__=true,n}function ne(n,t,r){return t.call(r,n)}function te(n,t,r){var e=Oo(n)?Kn:at;return r&&Ur(n,t,r)&&(t=w),(typeof t!="function"||r!==w)&&(t=wr(t,r,3)),
|
||||
e(n,t)}function re(n,t,r){var e=Oo(n)?Vn:lt;return t=wr(t,r,3),e(n,t)}function ee(n,t,r,e){var u=n?Bu(n):0;return Sr(u)||(n=Ee(n),u=n.length),r=typeof r!="number"||e&&Ur(t,r,e)?0:0>r?bu(u+r,0):r||0,typeof n=="string"||!Oo(n)&&be(n)?r<=u&&-1<n.indexOf(t,r):!!u&&-1<xr(n,t,r)}function ue(n,t,r){var e=Oo(n)?Gn:wt;return t=wr(t,r,3),e(n,t)}function oe(n,t,r){if(r?Ur(n,t,r):null==t){n=zr(n);var e=n.length;return 0<e?n[Rt(0,e-1)]:w}r=-1,n=je(n);var e=n.length,u=e-1;for(t=xu(0>t?0:+t||0,e);++r<t;){var e=Rt(r,u),o=n[e];
|
||||
n[e]=n[r],n[r]=o}return n.length=t,n}function ie(n,t,r){var e=Oo(n)?Hn:Ct;return r&&Ur(n,t,r)&&(t=w),(typeof t!="function"||r!==w)&&(t=wr(t,r,3)),e(n,t)}function fe(n,t){var r;if(typeof t!="function"){if(typeof n!="function")throw new Ge(L);var e=n;n=t,t=e}return function(){return 0<--n&&(r=t.apply(this,arguments)),1>=n&&(t=w),r}}function ae(n,t,r){function e(t,r){r&&iu(r),a=p=h=w,t&&(_=ho(),c=n.apply(s,f),p||a||(f=s=w))}function u(){var n=t-(ho()-l);0>=n||n>t?e(h,a):p=su(u,n)}function o(){e(g,p);
|
||||
}function i(){if(f=arguments,l=ho(),s=this,h=g&&(p||!y),false===v)var r=y&&!p;else{a||y||(_=l);var e=v-(l-_),i=0>=e||e>v;i?(a&&(a=iu(a)),_=l,c=n.apply(s,f)):a||(a=su(o,e))}return i&&p?p=iu(p):p||t===v||(p=su(u,t)),r&&(i=true,c=n.apply(s,f)),!i||p||a||(f=s=w),c}var f,a,c,l,s,p,h,_=0,v=false,g=true;if(typeof n!="function")throw new Ge(L);if(t=0>t?0:+t||0,true===r)var y=true,g=false;else ge(r)&&(y=!!r.leading,v="maxWait"in r&&bu(+r.maxWait||0,t),g="trailing"in r?!!r.trailing:g);return i.cancel=function(){p&&iu(p),a&&iu(a),
|
||||
_=0,a=p=h=w},i}function ce(n,t){function r(){var e=arguments,u=t?t.apply(this,e):e[0],o=r.cache;return o.has(u)?o.get(u):(e=n.apply(this,e),r.cache=o.set(u,e),e)}if(typeof n!="function"||t&&typeof t!="function")throw new Ge(L);return r.cache=new ce.Cache,r}function le(n,t){if(typeof n!="function")throw new Ge(L);return t=bu(t===w?n.length-1:+t||0,0),function(){for(var r=arguments,e=-1,u=bu(r.length-t,0),o=Be(u);++e<u;)o[e]=r[t+e];switch(t){case 0:return n.call(this,o);case 1:return n.call(this,r[0],o);
|
||||
case 2:return n.call(this,r[0],r[1],o)}for(u=Be(t+1),e=-1;++e<t;)u[e]=r[e];return u[t]=o,n.apply(this,u)}}function se(n,t){return n>t}function pe(n){return h(n)&&Er(n)&&nu.call(n,"callee")&&!cu.call(n,"callee")}function he(n,t,r,e){return e=(r=typeof r=="function"?Bt(r,e,3):w)?r(n,t):w,e===w?dt(n,t,r):!!e}function _e(n){return h(n)&&typeof n.message=="string"&&ru.call(n)==P}function ve(n){return ge(n)&&ru.call(n)==K}function ge(n){var t=typeof n;return!!n&&("object"==t||"function"==t)}function ye(n){
|
||||
return null==n?false:ve(n)?uu.test(Qe.call(n)):h(n)&&Rn.test(n)}function de(n){return typeof n=="number"||h(n)&&ru.call(n)==V}function me(n){var t;if(!h(n)||ru.call(n)!=Z||pe(n)||!(nu.call(n,"constructor")||(t=n.constructor,typeof t!="function"||t instanceof t)))return false;var r;return ht(n,function(n,t){r=t}),r===w||nu.call(n,r)}function we(n){return ge(n)&&ru.call(n)==Y}function be(n){return typeof n=="string"||h(n)&&ru.call(n)==G}function xe(n){return h(n)&&Sr(n.length)&&!!Sn[ru.call(n)]}function Ae(n,t){
|
||||
return n<t}function je(n){var t=n?Bu(n):0;return Sr(t)?t?qn(n):[]:Ee(n)}function ke(n){return et(n,Re(n))}function Ie(n){return gt(n,Re(n))}function Re(n){if(null==n)return[];ge(n)||(n=Ve(n));for(var t=n.length,t=t&&Sr(t)&&(Oo(n)||pe(n))&&t||0,r=n.constructor,e=-1,r=typeof r=="function"&&r.prototype===n,u=Be(t),o=0<t;++e<t;)u[e]=e+"";for(var i in n)o&&Cr(i,t)||"constructor"==i&&(r||!nu.call(n,i))||u.push(i);return u}function Oe(n){n=Br(n);for(var t=-1,r=zo(n),e=r.length,u=Be(e);++t<e;){var o=r[t];
|
||||
u[t]=[o,n[o]]}return u}function Ee(n){return Ft(n,zo(n))}function Ce(n){return(n=u(n))&&n.replace(En,a).replace(xn,"")}function Ue(n,t){var r="";if(n=u(n),t=+t,1>t||!n||!mu(t))return r;do t%2&&(r+=n),t=yu(t/2),n+=n;while(t);return r}function We(n,t,r){var e=n;return(n=u(n))?(r?Ur(e,t,r):null==t)?n.slice(g(n),y(n)+1):(t+="",n.slice(o(n,t),i(n,t)+1)):n}function $e(n,t,r){return r&&Ur(n,t,r)&&(t=w),n=u(n),n.match(t||Wn)||[]}function Se(n,t,r){return r&&Ur(n,t,r)&&(t=w),h(n)?Ne(n):ut(n,t)}function Fe(n){
|
||||
return n}function Ne(n){return bt(ot(n,true))}function Te(n,t,r){if(null==r){var e=ge(t),u=e?zo(t):w;((u=u&&u.length?gt(t,u):w)?u.length:e)||(u=false,r=t,t=n,n=this)}u||(u=gt(t,zo(t)));var o=true,e=-1,i=ve(n),f=u.length;false===r?o=false:ge(r)&&"chain"in r&&(o=r.chain);for(;++e<f;){r=u[e];var a=t[r];n[r]=a,i&&(n.prototype[r]=function(t){return function(){var r=this.__chain__;if(o||r){var e=n(this.__wrapped__);return(e.__actions__=qn(this.__actions__)).push({func:t,args:arguments,thisArg:n}),e.__chain__=r,e}return t.apply(n,Jn([this.value()],arguments));
|
||||
}}(a))}return n}function Le(){}function ze(n){return Wr(n)?jt(n):kt(n)}_=_?Yn.defaults(Zn.Object(),_,Yn.pick(Zn,$n)):Zn;var Be=_.Array,De=_.Date,Me=_.Error,qe=_.Function,Pe=_.Math,Ke=_.Number,Ve=_.Object,Ze=_.RegExp,Ye=_.String,Ge=_.TypeError,Je=Be.prototype,Xe=Ve.prototype,He=Ye.prototype,Qe=qe.prototype.toString,nu=Xe.hasOwnProperty,tu=0,ru=Xe.toString,eu=Zn._,uu=Ze("^"+Qe.call(nu).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),ou=_.ArrayBuffer,iu=_.clearTimeout,fu=_.parseFloat,au=Pe.pow,cu=Xe.propertyIsEnumerable,lu=jr(_,"Set"),su=_.setTimeout,pu=Je.splice,hu=_.Uint8Array,_u=jr(_,"WeakMap"),vu=Pe.ceil,gu=jr(Ve,"create"),yu=Pe.floor,du=jr(Be,"isArray"),mu=_.isFinite,wu=jr(Ve,"keys"),bu=Pe.max,xu=Pe.min,Au=jr(De,"now"),ju=_.parseInt,ku=Pe.random,Iu=Ke.NEGATIVE_INFINITY,Ru=Ke.POSITIVE_INFINITY,Ou=4294967294,Eu=2147483647,Cu=9007199254740991,Uu=_u&&new _u,Wu={};
|
||||
Nn.support={},Nn.templateSettings={escape:_n,evaluate:vn,interpolate:gn,variable:"",imports:{_:Nn}};var $u=function(){function n(){}return function(t){if(ge(t)){n.prototype=t;var r=new n;n.prototype=w}return r||{}}}(),Su=Vt(_t),Fu=Vt(vt,true),Nu=Zt(),Tu=Zt(true),Lu=Uu?function(n,t){return Uu.set(n,t),n}:Fe,zu=Uu?function(n){return Uu.get(n)}:Le,Bu=jt("length"),Du=function(){var n=0,t=0;return function(r,e){var u=ho(),o=S-(u-t);if(t=u,0<o){if(++n>=$)return r}else n=0;return Lu(r,e)}}(),Mu=le(function(n,t){
|
||||
return h(n)&&Er(n)?ft(n,pt(t,false,true)):[]}),qu=tr(),Pu=tr(true),Ku=le(function(n){for(var t=n.length,e=t,u=Be(l),o=xr(),i=o===r,f=[];e--;){var a=n[e]=Er(a=n[e])?a:[];u[e]=i&&120<=a.length&&gu&&lu?new Dn(e&&a):null}var i=n[0],c=-1,l=i?i.length:0,s=u[0];n:for(;++c<l;)if(a=i[c],0>(s?Mn(s,a):o(f,a,0))){for(e=t;--e;){var p=u[e];if(0>(p?Mn(p,a):o(n[e],a,0)))continue n}s&&s.push(a),f.push(a)}return f}),Vu=le(function(t,r){r=pt(r);var e=rt(t,r);return It(t,r.sort(n)),e}),Zu=vr(),Yu=vr(true),Gu=le(function(n){return St(pt(n,false,true));
|
||||
}),Ju=le(function(n,t){return Er(n)?ft(n,t):[]}),Xu=le(Jr),Hu=le(function(n){var t=n.length,r=2<t?n[t-2]:w,e=1<t?n[t-1]:w;return 2<t&&typeof r=="function"?t-=2:(r=1<t&&typeof e=="function"?(--t,e):w,e=w),n.length=t,Xr(n,r,e)}),Qu=le(function(n){return n=pt(n),this.thru(function(t){t=Oo(t)?t:[Br(t)];for(var r=n,e=-1,u=t.length,o=-1,i=r.length,f=Be(u+i);++e<u;)f[e]=t[e];for(;++o<i;)f[e++]=r[o];return f})}),no=le(function(n,t){return rt(n,pt(t))}),to=Pt(function(n,t,r){nu.call(n,r)?++n[r]:n[r]=1}),ro=nr(Su),eo=nr(Fu,true),uo=ur(Pn,Su),oo=ur(function(n,t){
|
||||
for(var r=n.length;r--&&false!==t(n[r],r,n););return n},Fu),io=Pt(function(n,t,r){nu.call(n,r)?n[r].push(t):n[r]=[t]}),fo=Pt(function(n,t,r){n[r]=t}),ao=le(function(n,t,r){var e=-1,u=typeof t=="function",o=Wr(t),i=Er(n)?Be(n.length):[];return Su(n,function(n){var f=u?t:o&&null!=n?n[t]:w;i[++e]=f?f.apply(n,r):Or(n,t,r)}),i}),co=Pt(function(n,t,r){n[r?0:1].push(t)},function(){return[[],[]]}),lo=lr(Xn,Su),so=lr(function(n,t,r,e){var u=n.length;for(e&&u&&(r=n[--u]);u--;)r=t(r,n[u],u,n);return r},Fu),po=le(function(n,t){
|
||||
if(null==n)return[];var r=t[2];return r&&Ur(t[0],t[1],r)&&(t.length=1),Wt(n,pt(t),[])}),ho=Au||function(){return(new De).getTime()},_o=le(function(n,t,r){var e=x;if(r.length)var u=v(r,_o.placeholder),e=e|R;return gr(n,e,t,r,u)}),vo=le(function(n,t){t=t.length?pt(t):Ie(n);for(var r=-1,e=t.length;++r<e;){var u=t[r];n[u]=gr(n[u],x,n)}return n}),go=le(function(n,t,r){var e=x|A;if(r.length)var u=v(r,go.placeholder),e=e|R;return gr(t,e,n,r,u)}),yo=Xt(k),mo=Xt(I),wo=le(function(n,t){return it(n,1,t)}),bo=le(function(n,t,r){
|
||||
return it(n,t,r)}),xo=er(),Ao=er(true),jo=le(function(n,t){if(t=pt(t),typeof n!="function"||!Kn(t,e))throw new Ge(L);var r=t.length;return le(function(e){for(var u=xu(e.length,r);u--;)e[u]=t[u](e[u]);return n.apply(this,e)})}),ko=cr(R),Io=cr(O),Ro=le(function(n,t){return gr(n,C,w,w,w,pt(t))}),Oo=du||function(n){return h(n)&&Sr(n.length)&&ru.call(n)==D},Eo=Kt(At),Co=Kt(function(n,t,r){return r?nt(n,t,r):tt(n,t)}),Uo=Ht(Co,function(n,t){return n===w?t:n}),Wo=Ht(Eo,Fr),$o=rr(_t),So=rr(vt),Fo=or(Nu),No=or(Tu),To=ir(_t),Lo=ir(vt),zo=wu?function(n){
|
||||
var t=null==n?w:n.constructor;return typeof t=="function"&&t.prototype===n||typeof n!="function"&&Er(n)?Lr(n):ge(n)?wu(n):[]}:Lr,Bo=fr(true),Do=fr(),Mo=le(function(n,t){if(null==n)return{};if("function"!=typeof t[0])return t=Gn(pt(t),Ye),Nr(n,ft(Re(n),t));var r=Bt(t[0],t[1],3);return Tr(n,function(n,t,e){return!r(n,t,e)})}),qo=le(function(n,t){return null==n?{}:"function"==typeof t[0]?Tr(n,Bt(t[0],t[1],3)):Nr(n,pt(t))}),Po=Gt(function(n,t,r){return t=t.toLowerCase(),n+(r?t.charAt(0).toUpperCase()+t.slice(1):t);
|
||||
}),Ko=Gt(function(n,t,r){return n+(r?"-":"")+t.toLowerCase()}),Vo=ar(),Zo=ar(true),Yo=Gt(function(n,t,r){return n+(r?"_":"")+t.toLowerCase()}),Go=Gt(function(n,t,r){return n+(r?" ":"")+(t.charAt(0).toUpperCase()+t.slice(1))}),Jo=le(function(n,t){try{return n.apply(w,t)}catch(r){return _e(r)?r:new Me(r)}}),Xo=le(function(n,t){return function(r){return Or(r,n,t)}}),Ho=le(function(n,t){return function(r){return Or(n,r,t)}}),Qo=_r("ceil"),ni=_r("floor"),ti=Qt(se,Iu),ri=Qt(Ae,Ru),ei=_r("round");return Nn.prototype=Tn.prototype,
|
||||
Ln.prototype=$u(Tn.prototype),Ln.prototype.constructor=Ln,zn.prototype=$u(Tn.prototype),zn.prototype.constructor=zn,Bn.prototype["delete"]=function(n){return this.has(n)&&delete this.__data__[n]},Bn.prototype.get=function(n){return"__proto__"==n?w:this.__data__[n]},Bn.prototype.has=function(n){return"__proto__"!=n&&nu.call(this.__data__,n)},Bn.prototype.set=function(n,t){return"__proto__"!=n&&(this.__data__[n]=t),this},Dn.prototype.push=function(n){var t=this.data;typeof n=="string"||ge(n)?t.set.add(n):t.hash[n]=true;
|
||||
},ce.Cache=Bn,Nn.after=function(n,t){if(typeof t!="function"){if(typeof n!="function")throw new Ge(L);var r=n;n=t,t=r}return n=mu(n=+n)?n:0,function(){return 1>--n?t.apply(this,arguments):void 0}},Nn.ary=function(n,t,r){return r&&Ur(n,t,r)&&(t=w),t=n&&null==t?n.length:bu(+t||0,0),gr(n,E,w,w,w,w,t)},Nn.assign=Co,Nn.at=no,Nn.before=fe,Nn.bind=_o,Nn.bindAll=vo,Nn.bindKey=go,Nn.callback=Se,Nn.chain=Qr,Nn.chunk=function(n,t,r){t=(r?Ur(n,t,r):null==t)?1:bu(yu(t)||1,1),r=0;for(var e=n?n.length:0,u=-1,o=Be(vu(e/t));r<e;)o[++u]=Et(n,r,r+=t);
|
||||
return o},Nn.compact=function(n){for(var t=-1,r=n?n.length:0,e=-1,u=[];++t<r;){var o=n[t];o&&(u[++e]=o)}return u},Nn.constant=function(n){return function(){return n}},Nn.countBy=to,Nn.create=function(n,t,r){var e=$u(n);return r&&Ur(n,t,r)&&(t=w),t?tt(e,t):e},Nn.curry=yo,Nn.curryRight=mo,Nn.debounce=ae,Nn.defaults=Uo,Nn.defaultsDeep=Wo,Nn.defer=wo,Nn.delay=bo,Nn.difference=Mu,Nn.drop=qr,Nn.dropRight=Pr,Nn.dropRightWhile=function(n,t,r){return n&&n.length?Nt(n,wr(t,r,3),true,true):[]},Nn.dropWhile=function(n,t,r){
|
||||
return n&&n.length?Nt(n,wr(t,r,3),true):[]},Nn.fill=function(n,t,r,e){var u=n?n.length:0;if(!u)return[];for(r&&typeof r!="number"&&Ur(n,t,r)&&(r=0,e=u),u=n.length,r=null==r?0:+r||0,0>r&&(r=-r>u?0:u+r),e=e===w||e>u?u:+e||0,0>e&&(e+=u),u=r>e?0:e>>>0,r>>>=0;r<u;)n[r++]=t;return n},Nn.filter=re,Nn.flatten=function(n,t,r){var e=n?n.length:0;return r&&Ur(n,t,r)&&(t=false),e?pt(n,t):[]},Nn.flattenDeep=function(n){return n&&n.length?pt(n,true):[]},Nn.flow=xo,Nn.flowRight=Ao,Nn.forEach=uo,Nn.forEachRight=oo,Nn.forIn=Fo,
|
||||
Nn.forInRight=No,Nn.forOwn=To,Nn.forOwnRight=Lo,Nn.functions=Ie,Nn.groupBy=io,Nn.indexBy=fo,Nn.initial=function(n){return Pr(n,1)},Nn.intersection=Ku,Nn.invert=function(n,t,r){r&&Ur(n,t,r)&&(t=w),r=-1;for(var e=zo(n),u=e.length,o={};++r<u;){var i=e[r],f=n[i];t?nu.call(o,f)?o[f].push(i):o[f]=[i]:o[f]=i}return o},Nn.invoke=ao,Nn.keys=zo,Nn.keysIn=Re,Nn.map=ue,Nn.mapKeys=Bo,Nn.mapValues=Do,Nn.matches=Ne,Nn.matchesProperty=function(n,t){return xt(n,ot(t,true))},Nn.memoize=ce,Nn.merge=Eo,Nn.method=Xo,Nn.methodOf=Ho,
|
||||
Nn.mixin=Te,Nn.modArgs=jo,Nn.negate=function(n){if(typeof n!="function")throw new Ge(L);return function(){return!n.apply(this,arguments)}},Nn.omit=Mo,Nn.once=function(n){return fe(2,n)},Nn.pairs=Oe,Nn.partial=ko,Nn.partialRight=Io,Nn.partition=co,Nn.pick=qo,Nn.pluck=function(n,t){return ue(n,ze(t))},Nn.property=ze,Nn.propertyOf=function(n){return function(t){return yt(n,Dr(t),t+"")}},Nn.pull=function(){var n=arguments,t=n[0];if(!t||!t.length)return t;for(var r=0,e=xr(),u=n.length;++r<u;)for(var o=0,i=n[r];-1<(o=e(t,i,o));)pu.call(t,o,1);
|
||||
return t},Nn.pullAt=Vu,Nn.range=function(n,t,r){r&&Ur(n,t,r)&&(t=r=w),n=+n||0,r=null==r?1:+r||0,null==t?(t=n,n=0):t=+t||0;var e=-1;t=bu(vu((t-n)/(r||1)),0);for(var u=Be(t);++e<t;)u[e]=n,n+=r;return u},Nn.rearg=Ro,Nn.reject=function(n,t,r){var e=Oo(n)?Vn:lt;return t=wr(t,r,3),e(n,function(n,r,e){return!t(n,r,e)})},Nn.remove=function(n,t,r){var e=[];if(!n||!n.length)return e;var u=-1,o=[],i=n.length;for(t=wr(t,r,3);++u<i;)r=n[u],t(r,u,n)&&(e.push(r),o.push(u));return It(n,o),e},Nn.rest=Yr,Nn.restParam=le,
|
||||
Nn.set=function(n,t,r){if(null==n)return n;var e=t+"";t=null!=n[e]||Wr(t,n)?[e]:Dr(t);for(var e=-1,u=t.length,o=u-1,i=n;null!=i&&++e<u;){var f=t[e];ge(i)&&(e==o?i[f]=r:null==i[f]&&(i[f]=Cr(t[e+1])?[]:{})),i=i[f]}return n},Nn.shuffle=function(n){return oe(n,Ru)},Nn.slice=function(n,t,r){var e=n?n.length:0;return e?(r&&typeof r!="number"&&Ur(n,t,r)&&(t=0,r=e),Et(n,t,r)):[]},Nn.sortBy=function(n,t,r){if(null==n)return[];r&&Ur(n,t,r)&&(t=w);var e=-1;return t=wr(t,r,3),n=wt(n,function(n,r,u){return{a:t(n,r,u),
|
||||
b:++e,c:n}}),Ut(n,f)},Nn.sortByAll=po,Nn.sortByOrder=function(n,t,r,e){return null==n?[]:(e&&Ur(t,r,e)&&(r=w),Oo(t)||(t=null==t?[]:[t]),Oo(r)||(r=null==r?[]:[r]),Wt(n,t,r))},Nn.spread=function(n){if(typeof n!="function")throw new Ge(L);return function(t){return n.apply(this,t)}},Nn.take=function(n,t,r){return n&&n.length?((r?Ur(n,t,r):null==t)&&(t=1),Et(n,0,0>t?0:t)):[]},Nn.takeRight=function(n,t,r){var e=n?n.length:0;return e?((r?Ur(n,t,r):null==t)&&(t=1),t=e-(+t||0),Et(n,0>t?0:t)):[]},Nn.takeRightWhile=function(n,t,r){
|
||||
return n&&n.length?Nt(n,wr(t,r,3),false,true):[]},Nn.takeWhile=function(n,t,r){return n&&n.length?Nt(n,wr(t,r,3)):[]},Nn.tap=function(n,t,r){return t.call(r,n),n},Nn.throttle=function(n,t,r){var e=true,u=true;if(typeof n!="function")throw new Ge(L);return false===r?e=false:ge(r)&&(e="leading"in r?!!r.leading:e,u="trailing"in r?!!r.trailing:u),ae(n,t,{leading:e,maxWait:+t,trailing:u})},Nn.thru=ne,Nn.times=function(n,t,r){if(n=yu(n),1>n||!mu(n))return[];var e=-1,u=Be(xu(n,4294967295));for(t=Bt(t,r,1);++e<n;)4294967295>e?u[e]=t(e):t(e);
|
||||
return u},Nn.toArray=je,Nn.toPlainObject=ke,Nn.transform=function(n,t,r,e){var u=Oo(n)||xe(n);return t=wr(t,e,4),null==r&&(u||ge(n)?(e=n.constructor,r=u?Oo(n)?new e:[]:$u(ve(e)?e.prototype:w)):r={}),(u?Pn:_t)(n,function(n,e,u){return t(r,n,e,u)}),r},Nn.union=Gu,Nn.uniq=Gr,Nn.unzip=Jr,Nn.unzipWith=Xr,Nn.values=Ee,Nn.valuesIn=function(n){return Ft(n,Re(n))},Nn.where=function(n,t){return re(n,bt(t))},Nn.without=Ju,Nn.wrap=function(n,t){return t=null==t?Fe:t,gr(t,R,w,[n],[])},Nn.xor=function(){for(var n=-1,t=arguments.length;++n<t;){
|
||||
var r=arguments[n];if(Er(r))var e=e?Jn(ft(e,r),ft(r,e)):r}return e?St(e):[]},Nn.zip=Xu,Nn.zipObject=Hr,Nn.zipWith=Hu,Nn.backflow=Ao,Nn.collect=ue,Nn.compose=Ao,Nn.each=uo,Nn.eachRight=oo,Nn.extend=Co,Nn.iteratee=Se,Nn.methods=Ie,Nn.object=Hr,Nn.select=re,Nn.tail=Yr,Nn.unique=Gr,Te(Nn,Nn),Nn.add=function(n,t){return(+n||0)+(+t||0)},Nn.attempt=Jo,Nn.camelCase=Po,Nn.capitalize=function(n){return(n=u(n))&&n.charAt(0).toUpperCase()+n.slice(1)},Nn.ceil=Qo,Nn.clone=function(n,t,r,e){return t&&typeof t!="boolean"&&Ur(n,t,r)?t=false:typeof t=="function"&&(e=r,
|
||||
r=t,t=false),typeof r=="function"?ot(n,t,Bt(r,e,3)):ot(n,t)},Nn.cloneDeep=function(n,t,r){return typeof t=="function"?ot(n,true,Bt(t,r,3)):ot(n,true)},Nn.deburr=Ce,Nn.endsWith=function(n,t,r){n=u(n),t+="";var e=n.length;return r=r===w?e:xu(0>r?0:+r||0,e),r-=t.length,0<=r&&n.indexOf(t,r)==r},Nn.escape=function(n){return(n=u(n))&&hn.test(n)?n.replace(sn,c):n},Nn.escapeRegExp=function(n){return(n=u(n))&&bn.test(n)?n.replace(wn,l):n||"(?:)"},Nn.every=te,Nn.find=ro,Nn.findIndex=qu,Nn.findKey=$o,Nn.findLast=eo,
|
||||
Nn.findLastIndex=Pu,Nn.findLastKey=So,Nn.findWhere=function(n,t){return ro(n,bt(t))},Nn.first=Kr,Nn.floor=ni,Nn.get=function(n,t,r){return n=null==n?w:yt(n,Dr(t),t+""),n===w?r:n},Nn.gt=se,Nn.gte=function(n,t){return n>=t},Nn.has=function(n,t){if(null==n)return false;var r=nu.call(n,t);if(!r&&!Wr(t)){if(t=Dr(t),n=1==t.length?n:yt(n,Et(t,0,-1)),null==n)return false;t=Zr(t),r=nu.call(n,t)}return r||Sr(n.length)&&Cr(t,n.length)&&(Oo(n)||pe(n))},Nn.identity=Fe,Nn.includes=ee,Nn.indexOf=Vr,Nn.inRange=function(n,t,r){
|
||||
return t=+t||0,r===w?(r=t,t=0):r=+r||0,n>=xu(t,r)&&n<bu(t,r)},Nn.isArguments=pe,Nn.isArray=Oo,Nn.isBoolean=function(n){return true===n||false===n||h(n)&&ru.call(n)==M},Nn.isDate=function(n){return h(n)&&ru.call(n)==q},Nn.isElement=function(n){return!!n&&1===n.nodeType&&h(n)&&!me(n)},Nn.isEmpty=function(n){return null==n?true:Er(n)&&(Oo(n)||be(n)||pe(n)||h(n)&&ve(n.splice))?!n.length:!zo(n).length},Nn.isEqual=he,Nn.isError=_e,Nn.isFinite=function(n){return typeof n=="number"&&mu(n)},Nn.isFunction=ve,Nn.isMatch=function(n,t,r,e){
|
||||
return r=typeof r=="function"?Bt(r,e,3):w,mt(n,Ar(t),r)},Nn.isNaN=function(n){return de(n)&&n!=+n},Nn.isNative=ye,Nn.isNull=function(n){return null===n},Nn.isNumber=de,Nn.isObject=ge,Nn.isPlainObject=me,Nn.isRegExp=we,Nn.isString=be,Nn.isTypedArray=xe,Nn.isUndefined=function(n){return n===w},Nn.kebabCase=Ko,Nn.last=Zr,Nn.lastIndexOf=function(n,t,r){var e=n?n.length:0;if(!e)return-1;var u=e;if(typeof r=="number")u=(0>r?bu(e+r,0):xu(r||0,e-1))+1;else if(r)return u=Lt(n,t,true)-1,n=n[u],(t===t?t===n:n!==n)?u:-1;
|
||||
if(t!==t)return p(n,u,true);for(;u--;)if(n[u]===t)return u;return-1},Nn.lt=Ae,Nn.lte=function(n,t){return n<=t},Nn.max=ti,Nn.min=ri,Nn.noConflict=function(){return Zn._=eu,this},Nn.noop=Le,Nn.now=ho,Nn.pad=function(n,t,r){n=u(n),t=+t;var e=n.length;return e<t&&mu(t)?(e=(t-e)/2,t=yu(e),e=vu(e),r=pr("",e,r),r.slice(0,t)+n+r):n},Nn.padLeft=Vo,Nn.padRight=Zo,Nn.parseInt=function(n,t,r){return(r?Ur(n,t,r):null==t)?t=0:t&&(t=+t),n=We(n),ju(n,t||(In.test(n)?16:10))},Nn.random=function(n,t,r){r&&Ur(n,t,r)&&(t=r=w);
|
||||
var e=null==n,u=null==t;return null==r&&(u&&typeof n=="boolean"?(r=n,n=1):typeof t=="boolean"&&(r=t,u=true)),e&&u&&(t=1,u=false),n=+n||0,u?(t=n,n=0):t=+t||0,r||n%1||t%1?(r=ku(),xu(n+r*(t-n+fu("1e-"+((r+"").length-1))),t)):Rt(n,t)},Nn.reduce=lo,Nn.reduceRight=so,Nn.repeat=Ue,Nn.result=function(n,t,r){var e=null==n?w:n[t];return e===w&&(null==n||Wr(t,n)||(t=Dr(t),n=1==t.length?n:yt(n,Et(t,0,-1)),e=null==n?w:n[Zr(t)]),e=e===w?r:e),ve(e)?e.call(n):e},Nn.round=ei,Nn.runInContext=m,Nn.size=function(n){var t=n?Bu(n):0;
|
||||
return Sr(t)?t:zo(n).length},Nn.snakeCase=Yo,Nn.some=ie,Nn.sortedIndex=Zu,Nn.sortedLastIndex=Yu,Nn.startCase=Go,Nn.startsWith=function(n,t,r){return n=u(n),r=null==r?0:xu(0>r?0:+r||0,n.length),n.lastIndexOf(t,r)==r},Nn.sum=function(n,t,r){if(r&&Ur(n,t,r)&&(t=w),t=wr(t,r,3),1==t.length){n=Oo(n)?n:zr(n),r=n.length;for(var e=0;r--;)e+=+t(n[r])||0;n=e}else n=$t(n,t);return n},Nn.template=function(n,t,r){var e=Nn.templateSettings;r&&Ur(n,t,r)&&(t=r=w),n=u(n),t=nt(tt({},r||t),e,Qn),r=nt(tt({},t.imports),e.imports,Qn);
|
||||
var o,i,f=zo(r),a=Ft(r,f),c=0;r=t.interpolate||Cn;var l="__p+='";r=Ze((t.escape||Cn).source+"|"+r.source+"|"+(r===gn?jn:Cn).source+"|"+(t.evaluate||Cn).source+"|$","g");var p="sourceURL"in t?"//# sourceURL="+t.sourceURL+"\n":"";if(n.replace(r,function(t,r,e,u,f,a){return e||(e=u),l+=n.slice(c,a).replace(Un,s),r&&(o=true,l+="'+__e("+r+")+'"),f&&(i=true,l+="';"+f+";\n__p+='"),e&&(l+="'+((__t=("+e+"))==null?'':__t)+'"),c=a+t.length,t}),l+="';",(t=t.variable)||(l="with(obj){"+l+"}"),l=(i?l.replace(fn,""):l).replace(an,"$1").replace(cn,"$1;"),
|
||||
l="function("+(t||"obj")+"){"+(t?"":"obj||(obj={});")+"var __t,__p=''"+(o?",__e=_.escape":"")+(i?",__j=Array.prototype.join;function print(){__p+=__j.call(arguments,'')}":";")+l+"return __p}",t=Jo(function(){return qe(f,p+"return "+l).apply(w,a)}),t.source=l,_e(t))throw t;return t},Nn.trim=We,Nn.trimLeft=function(n,t,r){var e=n;return(n=u(n))?n.slice((r?Ur(e,t,r):null==t)?g(n):o(n,t+"")):n},Nn.trimRight=function(n,t,r){var e=n;return(n=u(n))?(r?Ur(e,t,r):null==t)?n.slice(0,y(n)+1):n.slice(0,i(n,t+"")+1):n;
|
||||
},Nn.trunc=function(n,t,r){r&&Ur(n,t,r)&&(t=w);var e=U;if(r=W,null!=t)if(ge(t)){var o="separator"in t?t.separator:o,e="length"in t?+t.length||0:e;r="omission"in t?u(t.omission):r}else e=+t||0;if(n=u(n),e>=n.length)return n;if(e-=r.length,1>e)return r;if(t=n.slice(0,e),null==o)return t+r;if(we(o)){if(n.slice(e).search(o)){var i,f=n.slice(0,e);for(o.global||(o=Ze(o.source,(kn.exec(o)||"")+"g")),o.lastIndex=0;n=o.exec(f);)i=n.index;t=t.slice(0,null==i?e:i)}}else n.indexOf(o,e)!=e&&(o=t.lastIndexOf(o),
|
||||
-1<o&&(t=t.slice(0,o)));return t+r},Nn.unescape=function(n){return(n=u(n))&&pn.test(n)?n.replace(ln,d):n},Nn.uniqueId=function(n){var t=++tu;return u(n)+t},Nn.words=$e,Nn.all=te,Nn.any=ie,Nn.contains=ee,Nn.eq=he,Nn.detect=ro,Nn.foldl=lo,Nn.foldr=so,Nn.head=Kr,Nn.include=ee,Nn.inject=lo,Te(Nn,function(){var n={};return _t(Nn,function(t,r){Nn.prototype[r]||(n[r]=t)}),n}(),false),Nn.sample=oe,Nn.prototype.sample=function(n){return this.__chain__||null!=n?this.thru(function(t){return oe(t,n)}):oe(this.value());
|
||||
},Nn.VERSION=b,Pn("bind bindKey curry curryRight partial partialRight".split(" "),function(n){Nn[n].placeholder=Nn}),Pn(["drop","take"],function(n,t){zn.prototype[n]=function(r){var e=this.__filtered__;if(e&&!t)return new zn(this);r=null==r?1:bu(yu(r)||0,0);var u=this.clone();return e?u.__takeCount__=xu(u.__takeCount__,r):u.__views__.push({size:r,type:n+(0>u.__dir__?"Right":"")}),u},zn.prototype[n+"Right"]=function(t){return this.reverse()[n](t).reverse()}}),Pn(["filter","map","takeWhile"],function(n,t){
|
||||
var r=t+1,e=r!=T;zn.prototype[n]=function(n,t){var u=this.clone();return u.__iteratees__.push({iteratee:wr(n,t,1),type:r}),u.__filtered__=u.__filtered__||e,u}}),Pn(["first","last"],function(n,t){var r="take"+(t?"Right":"");zn.prototype[n]=function(){return this[r](1).value()[0]}}),Pn(["initial","rest"],function(n,t){var r="drop"+(t?"":"Right");zn.prototype[n]=function(){return this.__filtered__?new zn(this):this[r](1)}}),Pn(["pluck","where"],function(n,t){var r=t?"filter":"map",e=t?bt:ze;zn.prototype[n]=function(n){
|
||||
return this[r](e(n))}}),zn.prototype.compact=function(){return this.filter(Fe)},zn.prototype.reject=function(n,t){return n=wr(n,t,1),this.filter(function(t){return!n(t)})},zn.prototype.slice=function(n,t){n=null==n?0:+n||0;var r=this;return r.__filtered__&&(0<n||0>t)?new zn(r):(0>n?r=r.takeRight(-n):n&&(r=r.drop(n)),t!==w&&(t=+t||0,r=0>t?r.dropRight(-t):r.take(t-n)),r)},zn.prototype.takeRightWhile=function(n,t){return this.reverse().takeWhile(n,t).reverse()},zn.prototype.toArray=function(){return this.take(Ru);
|
||||
},_t(zn.prototype,function(n,t){var r=/^(?:filter|map|reject)|While$/.test(t),e=/^(?:first|last)$/.test(t),u=Nn[e?"take"+("last"==t?"Right":""):t];u&&(Nn.prototype[t]=function(){function t(n){return e&&i?u(n,1)[0]:u.apply(w,Jn([n],o))}var o=e?[1]:arguments,i=this.__chain__,f=this.__wrapped__,a=!!this.__actions__.length,c=f instanceof zn,l=o[0],s=c||Oo(f);return s&&r&&typeof l=="function"&&1!=l.length&&(c=s=false),l={func:ne,args:[t],thisArg:w},a=c&&!a,e&&!i?a?(f=f.clone(),f.__actions__.push(l),n.call(f)):u.call(w,this.value())[0]:!e&&s?(f=a?f:new zn(this),
|
||||
f=n.apply(f,o),f.__actions__.push(l),new Ln(f,i)):this.thru(t)})}),Pn("join pop push replace shift sort splice split unshift".split(" "),function(n){var t=(/^(?:replace|split)$/.test(n)?He:Je)[n],r=/^(?:push|sort|unshift)$/.test(n)?"tap":"thru",e=/^(?:join|pop|replace|shift)$/.test(n);Nn.prototype[n]=function(){var n=arguments;return e&&!this.__chain__?t.apply(this.value(),n):this[r](function(r){return t.apply(r,n)})}}),_t(zn.prototype,function(n,t){var r=Nn[t];if(r){var e=r.name+"";(Wu[e]||(Wu[e]=[])).push({
|
||||
name:t,func:r})}}),Wu[sr(w,A).name]=[{name:"wrapper",func:w}],zn.prototype.clone=function(){var n=new zn(this.__wrapped__);return n.__actions__=qn(this.__actions__),n.__dir__=this.__dir__,n.__filtered__=this.__filtered__,n.__iteratees__=qn(this.__iteratees__),n.__takeCount__=this.__takeCount__,n.__views__=qn(this.__views__),n},zn.prototype.reverse=function(){if(this.__filtered__){var n=new zn(this);n.__dir__=-1,n.__filtered__=true}else n=this.clone(),n.__dir__*=-1;return n},zn.prototype.value=function(){
|
||||
var n,t=this.__wrapped__.value(),r=this.__dir__,e=Oo(t),u=0>r,o=e?t.length:0;n=o;for(var i=this.__views__,f=0,a=-1,c=i.length;++a<c;){var l=i[a],s=l.size;switch(l.type){case"drop":f+=s;break;case"dropRight":n-=s;break;case"take":n=xu(n,f+s);break;case"takeRight":f=bu(f,n-s)}}if(n={start:f,end:n},i=n.start,f=n.end,n=f-i,u=u?f:i-1,i=this.__iteratees__,f=i.length,a=0,c=xu(n,this.__takeCount__),!e||o<F||o==n&&c==n)return Tt(t,this.__actions__);e=[];n:for(;n--&&a<c;){for(u+=r,o=-1,l=t[u];++o<f;){var p=i[o],s=p.type,p=p.iteratee(l);
|
||||
if(s==T)l=p;else if(!p){if(s==N)continue n;break n}}e[a++]=l}return e},Nn.prototype.chain=function(){return Qr(this)},Nn.prototype.commit=function(){return new Ln(this.value(),this.__chain__)},Nn.prototype.concat=Qu,Nn.prototype.plant=function(n){for(var t,r=this;r instanceof Tn;){var e=Mr(r);t?u.__wrapped__=e:t=e;var u=e,r=r.__wrapped__}return u.__wrapped__=n,t},Nn.prototype.reverse=function(){function n(n){return n.reverse()}var t=this.__wrapped__;return t instanceof zn?(this.__actions__.length&&(t=new zn(this)),
|
||||
t=t.reverse(),t.__actions__.push({func:ne,args:[n],thisArg:w}),new Ln(t,this.__chain__)):this.thru(n)},Nn.prototype.toString=function(){return this.value()+""},Nn.prototype.run=Nn.prototype.toJSON=Nn.prototype.valueOf=Nn.prototype.value=function(){return Tt(this.__wrapped__,this.__actions__)},Nn.prototype.collect=Nn.prototype.map,Nn.prototype.head=Nn.prototype.first,Nn.prototype.select=Nn.prototype.filter,Nn.prototype.tail=Nn.prototype.rest,Nn}var w,b="3.10.1",x=1,A=2,j=4,k=8,I=16,R=32,O=64,E=128,C=256,U=30,W="...",$=150,S=16,F=200,N=1,T=2,L="Expected a function",z="__lodash_placeholder__",B="[object Arguments]",D="[object Array]",M="[object Boolean]",q="[object Date]",P="[object Error]",K="[object Function]",V="[object Number]",Z="[object Object]",Y="[object RegExp]",G="[object String]",J="[object ArrayBuffer]",X="[object Float32Array]",H="[object Float64Array]",Q="[object Int8Array]",nn="[object Int16Array]",tn="[object Int32Array]",rn="[object Uint8Array]",en="[object Uint8ClampedArray]",un="[object Uint16Array]",on="[object Uint32Array]",fn=/\b__p\+='';/g,an=/\b(__p\+=)''\+/g,cn=/(__e\(.*?\)|\b__t\))\+'';/g,ln=/&(?:amp|lt|gt|quot|#39|#96);/g,sn=/[&<>"'`]/g,pn=RegExp(ln.source),hn=RegExp(sn.source),_n=/<%-([\s\S]+?)%>/g,vn=/<%([\s\S]+?)%>/g,gn=/<%=([\s\S]+?)%>/g,yn=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\n\\]|\\.)*?\1)\]/,dn=/^\w*$/,mn=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\n\\]|\\.)*?)\2)\]/g,wn=/^[:!,]|[\\^$.*+?()[\]{}|\/]|(^[0-9a-fA-Fnrtuvx])|([\n\r\u2028\u2029])/g,bn=RegExp(wn.source),xn=/[\u0300-\u036f\ufe20-\ufe23]/g,An=/\\(\\)?/g,jn=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,kn=/\w*$/,In=/^0[xX]/,Rn=/^\[object .+?Constructor\]$/,On=/^\d+$/,En=/[\xc0-\xd6\xd8-\xde\xdf-\xf6\xf8-\xff]/g,Cn=/($^)/,Un=/['\n\r\u2028\u2029\\]/g,Wn=RegExp("[A-Z\\xc0-\\xd6\\xd8-\\xde]+(?=[A-Z\\xc0-\\xd6\\xd8-\\xde][a-z\\xdf-\\xf6\\xf8-\\xff]+)|[A-Z\\xc0-\\xd6\\xd8-\\xde]?[a-z\\xdf-\\xf6\\xf8-\\xff]+|[A-Z\\xc0-\\xd6\\xd8-\\xde]+|[0-9]+","g"),$n="Array ArrayBuffer Date Error Float32Array Float64Array Function Int8Array Int16Array Int32Array Math Number Object RegExp Set String _ clearTimeout isFinite parseFloat parseInt setTimeout TypeError Uint8Array Uint8ClampedArray Uint16Array Uint32Array WeakMap".split(" "),Sn={};
|
||||
Sn[X]=Sn[H]=Sn[Q]=Sn[nn]=Sn[tn]=Sn[rn]=Sn[en]=Sn[un]=Sn[on]=true,Sn[B]=Sn[D]=Sn[J]=Sn[M]=Sn[q]=Sn[P]=Sn[K]=Sn["[object Map]"]=Sn[V]=Sn[Z]=Sn[Y]=Sn["[object Set]"]=Sn[G]=Sn["[object WeakMap]"]=false;var Fn={};Fn[B]=Fn[D]=Fn[J]=Fn[M]=Fn[q]=Fn[X]=Fn[H]=Fn[Q]=Fn[nn]=Fn[tn]=Fn[V]=Fn[Z]=Fn[Y]=Fn[G]=Fn[rn]=Fn[en]=Fn[un]=Fn[on]=true,Fn[P]=Fn[K]=Fn["[object Map]"]=Fn["[object Set]"]=Fn["[object WeakMap]"]=false;var Nn={"\xc0":"A","\xc1":"A","\xc2":"A","\xc3":"A","\xc4":"A","\xc5":"A","\xe0":"a","\xe1":"a","\xe2":"a",
|
||||
"\xe3":"a","\xe4":"a","\xe5":"a","\xc7":"C","\xe7":"c","\xd0":"D","\xf0":"d","\xc8":"E","\xc9":"E","\xca":"E","\xcb":"E","\xe8":"e","\xe9":"e","\xea":"e","\xeb":"e","\xcc":"I","\xcd":"I","\xce":"I","\xcf":"I","\xec":"i","\xed":"i","\xee":"i","\xef":"i","\xd1":"N","\xf1":"n","\xd2":"O","\xd3":"O","\xd4":"O","\xd5":"O","\xd6":"O","\xd8":"O","\xf2":"o","\xf3":"o","\xf4":"o","\xf5":"o","\xf6":"o","\xf8":"o","\xd9":"U","\xda":"U","\xdb":"U","\xdc":"U","\xf9":"u","\xfa":"u","\xfb":"u","\xfc":"u","\xdd":"Y",
|
||||
"\xfd":"y","\xff":"y","\xc6":"Ae","\xe6":"ae","\xde":"Th","\xfe":"th","\xdf":"ss"},Tn={"&":"&","<":"<",">":">",'"':""","'":"'","`":"`"},Ln={"&":"&","<":"<",">":">",""":'"',"'":"'","`":"`"},zn={"function":true,object:true},Bn={0:"x30",1:"x31",2:"x32",3:"x33",4:"x34",5:"x35",6:"x36",7:"x37",8:"x38",9:"x39",A:"x41",B:"x42",C:"x43",D:"x44",E:"x45",F:"x46",a:"x61",b:"x62",c:"x63",d:"x64",e:"x65",f:"x66",n:"x6e",r:"x72",t:"x74",u:"x75",v:"x76",x:"x78"},Dn={"\\":"\\",
|
||||
"'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},Mn=zn[typeof exports]&&exports&&!exports.nodeType&&exports,qn=zn[typeof module]&&module&&!module.nodeType&&module,Pn=zn[typeof self]&&self&&self.Object&&self,Kn=zn[typeof window]&&window&&window.Object&&window,Vn=qn&&qn.exports===Mn&&Mn,Zn=Mn&&qn&&typeof global=="object"&&global&&global.Object&&global||Kn!==(this&&this.window)&&Kn||Pn||this,Yn=m();typeof define=="function"&&typeof define.amd=="object"&&define.amd?(Zn._=Yn, define(function(){
|
||||
return Yn})):Mn&&qn?Vn?(qn.exports=Yn)._=Yn:Mn._=Yn:Zn._=Yn}).call(this);
|
||||
|
|
@ -1,57 +0,0 @@
|
|||
{
|
||||
"name": "lodash",
|
||||
"version": "4.15.0",
|
||||
"license": "MIT",
|
||||
"private": true,
|
||||
"main": "lodash.js",
|
||||
"scripts": {
|
||||
"build": "npm run build:main && npm run build:fp",
|
||||
"build:fp": "node lib/fp/build-dist.js",
|
||||
"build:fp-modules": "node lib/fp/build-modules.js",
|
||||
"build:main": "node lib/main/build-dist.js",
|
||||
"build:main-modules": "node lib/main/build-modules.js",
|
||||
"doc": "node lib/main/build-doc github && npm run test:doc",
|
||||
"doc:fp": "node lib/fp/build-doc",
|
||||
"doc:site": "node lib/main/build-doc site",
|
||||
"doc:sitehtml": "optional-dev-dependency marky-markdown@^8.0.0 && npm run doc:site && node lib/main/build-site",
|
||||
"pretest": "npm run build",
|
||||
"style": "npm run style:main && npm run style:fp && npm run style:perf && npm run style:test",
|
||||
"style:fp": "jscs fp/*.js lib/**/*.js",
|
||||
"style:main": "jscs lodash.js",
|
||||
"style:perf": "jscs perf/*.js perf/**/*.js",
|
||||
"style:test": "jscs test/*.js test/**/*.js",
|
||||
"test": "npm run test:main && npm run test:fp",
|
||||
"test:doc": "markdown-doctest",
|
||||
"test:fp": "node test/test-fp",
|
||||
"test:main": "node test/test",
|
||||
"validate": "npm run style && npm run test"
|
||||
},
|
||||
"devDependencies": {
|
||||
"async": "^2.0.1",
|
||||
"benchmark": "^2.1.1",
|
||||
"chalk": "^1.1.3",
|
||||
"codecov.io": "~0.1.6",
|
||||
"coveralls": "^2.11.12",
|
||||
"curl-amd": "~0.8.12",
|
||||
"docdown": "~0.7.1",
|
||||
"dojo": "^1.11.2",
|
||||
"ecstatic": "^2.1.0",
|
||||
"fs-extra": "~0.30.0",
|
||||
"glob": "^7.0.5",
|
||||
"istanbul": "0.4.4",
|
||||
"jquery": "^3.1.0",
|
||||
"jscs": "^3.0.7",
|
||||
"lodash": "4.14.2",
|
||||
"lodash-doc-globals": "^0.1.1",
|
||||
"markdown-doctest": "^0.8.1",
|
||||
"optional-dev-dependency": "^1.3.0",
|
||||
"platform": "^1.3.1",
|
||||
"qunit-extras": "^2.1.0",
|
||||
"qunitjs": "^2.0.1",
|
||||
"request": "^2.74.0",
|
||||
"requirejs": "^2.2.0",
|
||||
"sauce-tunnel": "^2.5.0",
|
||||
"uglify-js": "2.7.0",
|
||||
"webpack": "^1.13.1"
|
||||
}
|
||||
}
|
||||
|
|
@ -1,112 +0,0 @@
|
|||
;(function(window) {
|
||||
'use strict';
|
||||
|
||||
/** The base path of the lodash builds. */
|
||||
var basePath = '../';
|
||||
|
||||
/** The lodash build to load. */
|
||||
var build = (build = /build=([^&]+)/.exec(location.search)) && decodeURIComponent(build[1]);
|
||||
|
||||
/** The other library to load. */
|
||||
var other = (other = /other=([^&]+)/.exec(location.search)) && decodeURIComponent(other[1]);
|
||||
|
||||
/** The `ui` object. */
|
||||
var ui = {};
|
||||
|
||||
/*--------------------------------------------------------------------------*/
|
||||
|
||||
// Initialize controls.
|
||||
addEventListener('load', function() {
|
||||
function eventHandler(event) {
|
||||
var buildIndex = buildList.selectedIndex,
|
||||
otherIndex = otherList.selectedIndex,
|
||||
search = location.search.replace(/^\?|&?(?:build|other)=[^&]*&?/g, '');
|
||||
|
||||
if (event.stopPropagation) {
|
||||
event.stopPropagation();
|
||||
} else {
|
||||
event.cancelBubble = true;
|
||||
}
|
||||
location.href =
|
||||
location.href.split('?')[0] + '?' +
|
||||
(search ? search + '&' : '') +
|
||||
'build=' + (buildIndex < 0 ? build : buildList[buildIndex].value) + '&' +
|
||||
'other=' + (otherIndex < 0 ? other : otherList[otherIndex].value);
|
||||
}
|
||||
|
||||
var span1 = document.createElement('span');
|
||||
span1.style.cssText = 'float:right';
|
||||
span1.innerHTML =
|
||||
'<label for="perf-build">Build: </label>' +
|
||||
'<select id="perf-build">' +
|
||||
'<option value="lodash">lodash</option>' +
|
||||
'</select>';
|
||||
|
||||
var span2 = document.createElement('span');
|
||||
span2.style.cssText = 'float:right';
|
||||
span2.innerHTML =
|
||||
'<label for="perf-other">Other Library: </label>' +
|
||||
'<select id="perf-other">' +
|
||||
'<option value="underscore-dev">Underscore (development)</option>' +
|
||||
'<option value="underscore">Underscore (production)</option>' +
|
||||
'<option value="lodash">lodash</option>' +
|
||||
'</select>';
|
||||
|
||||
var buildList = span1.lastChild,
|
||||
otherList = span2.lastChild,
|
||||
toolbar = document.getElementById('perf-toolbar');
|
||||
|
||||
toolbar.appendChild(span2);
|
||||
toolbar.appendChild(span1);
|
||||
|
||||
buildList.selectedIndex = (function() {
|
||||
switch (build) {
|
||||
case 'lodash':
|
||||
case null: return 0;
|
||||
}
|
||||
return -1;
|
||||
}());
|
||||
|
||||
otherList.selectedIndex = (function() {
|
||||
switch (other) {
|
||||
case 'underscore-dev': return 0;
|
||||
case 'lodash': return 2;
|
||||
case 'underscore':
|
||||
case null: return 1;
|
||||
}
|
||||
return -1;
|
||||
}());
|
||||
|
||||
buildList.addEventListener('change', eventHandler);
|
||||
otherList.addEventListener('change', eventHandler);
|
||||
});
|
||||
|
||||
// The lodash build file path.
|
||||
ui.buildPath = (function() {
|
||||
var result;
|
||||
switch (build) {
|
||||
case null: build = 'lodash';
|
||||
case 'lodash': result = 'dist/lodash.min.js'; break;
|
||||
default: return build;
|
||||
}
|
||||
return basePath + result;
|
||||
}());
|
||||
|
||||
// The other library file path.
|
||||
ui.otherPath = (function() {
|
||||
var result;
|
||||
switch (other) {
|
||||
case 'lodash': result = 'dist/lodash.min.js'; break;
|
||||
case 'underscore-dev': result = 'vendor/underscore/underscore.js'; break;
|
||||
case null: other = 'underscore';
|
||||
case 'underscore': result = 'vendor/underscore/underscore-min.js'; break;
|
||||
default: return other;
|
||||
}
|
||||
return basePath + result;
|
||||
}());
|
||||
|
||||
ui.urlParams = { 'build': build, 'other': other };
|
||||
|
||||
window.ui = ui;
|
||||
|
||||
}(this));
|
||||
|
|
@ -1,80 +0,0 @@
|
|||
<!doctype html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>lodash Performance Suite</title>
|
||||
<style>
|
||||
html, body {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
height: 100%;
|
||||
}
|
||||
#FirebugUI {
|
||||
top: 2.5em;
|
||||
}
|
||||
#perf-toolbar {
|
||||
background-color: #EEE;
|
||||
color: #5E740B;
|
||||
font-family: "Helvetica Neue Light", "HelveticaNeue-Light", "Helvetica Neue", Calibri, Helvetica, Arial, sans-serif;
|
||||
font-size: small;
|
||||
padding: 0.5em 1em 0.5em 1em;
|
||||
overflow: hidden;
|
||||
}
|
||||
#perf-toolbar label {
|
||||
display: inline-block;
|
||||
margin-right: 0.5em;
|
||||
}
|
||||
#perf-toolbar span {
|
||||
display: inline-block;
|
||||
float: right;
|
||||
line-height: 2.1em;
|
||||
margin-left: 1em;
|
||||
margin-top: 0;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div id="perf-toolbar"></div>
|
||||
<script src="../lodash.js"></script>
|
||||
<script src="../node_modules/platform/platform.js"></script>
|
||||
<script src="../node_modules/benchmark/benchmark.js"></script>
|
||||
<script src="../vendor/firebug-lite/src/firebug-lite-debug.js"></script>
|
||||
<script src="./asset/perf-ui.js"></script>
|
||||
<script>
|
||||
document.write('<script src="' + ui.buildPath + '"><\/script>');
|
||||
</script>
|
||||
<script>
|
||||
var lodash = _.noConflict();
|
||||
</script>
|
||||
<script>
|
||||
document.write('<script src="' + ui.otherPath + '"><\/script>');
|
||||
</script>
|
||||
<script src="perf.js"></script>
|
||||
<script>
|
||||
(function() {
|
||||
var measured,
|
||||
perfNow,
|
||||
begin = new Date;
|
||||
|
||||
function init() {
|
||||
var fbUI = document.getElementById('FirebugUI'),
|
||||
fbDoc = fbUI && (fbDoc = fbUI.contentWindow || fbUI.contentDocument).document || fbDoc,
|
||||
fbCommandLine = fbDoc && fbDoc.getElementById('fbCommandLine');
|
||||
|
||||
if (!fbCommandLine) {
|
||||
return setTimeout(init, 15);
|
||||
}
|
||||
fbUI.style.height = (
|
||||
Math.max(document.documentElement.clientHeight, document.body.clientHeight) -
|
||||
document.getElementById('perf-toolbar').clientHeight
|
||||
) + 'px';
|
||||
|
||||
fbDoc.body.style.height = fbDoc.documentElement.style.height = '100%';
|
||||
setTimeout(run, 15);
|
||||
}
|
||||
|
||||
window.onload = init;
|
||||
}());
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
|
|
@ -1,155 +0,0 @@
|
|||
;(function(window) {
|
||||
'use strict';
|
||||
|
||||
/** The base path of the lodash builds. */
|
||||
var basePath = '../';
|
||||
|
||||
/** The lodash build to load. */
|
||||
var build = (build = /build=([^&]+)/.exec(location.search)) && decodeURIComponent(build[1]);
|
||||
|
||||
/** The module loader to use. */
|
||||
var loader = (loader = /loader=([^&]+)/.exec(location.search)) && decodeURIComponent(loader[1]);
|
||||
|
||||
/** The `ui` object. */
|
||||
var ui = {};
|
||||
|
||||
/*--------------------------------------------------------------------------*/
|
||||
|
||||
// Initialize controls.
|
||||
addEventListener('load', function() {
|
||||
function eventHandler(event) {
|
||||
var buildIndex = buildList.selectedIndex,
|
||||
loaderIndex = loaderList.selectedIndex,
|
||||
search = location.search.replace(/^\?|&?(?:build|loader)=[^&]*&?/g, '');
|
||||
|
||||
if (event.stopPropagation) {
|
||||
event.stopPropagation();
|
||||
} else {
|
||||
event.cancelBubble = true;
|
||||
}
|
||||
location.href =
|
||||
location.href.split('?')[0] + '?' +
|
||||
(search ? search + '&' : '') +
|
||||
'build=' + (buildIndex < 0 ? build : buildList[buildIndex].value) + '&' +
|
||||
'loader=' + (loaderIndex < 0 ? loader : loaderList[loaderIndex].value);
|
||||
}
|
||||
|
||||
function init() {
|
||||
var toolbar = document.getElementById('qunit-testrunner-toolbar');
|
||||
if (!toolbar) {
|
||||
setTimeout(init, 15);
|
||||
return;
|
||||
}
|
||||
toolbar.insertBefore(span2, toolbar.lastChild);
|
||||
toolbar.insertBefore(span1, span2);
|
||||
|
||||
buildList.selectedIndex = (function() {
|
||||
switch (build) {
|
||||
case 'lodash': return 1;
|
||||
case 'lodash-core-dev': return 2;
|
||||
case 'lodash-core': return 3;
|
||||
case 'lodash-dev':
|
||||
case null: return 0;
|
||||
}
|
||||
return -1;
|
||||
}());
|
||||
|
||||
loaderList.selectedIndex = (function() {
|
||||
switch (loader) {
|
||||
case 'curl': return 1;
|
||||
case 'dojo': return 2;
|
||||
case 'requirejs': return 3;
|
||||
case 'none':
|
||||
case null: return 0;
|
||||
}
|
||||
return -1;
|
||||
}());
|
||||
|
||||
buildList.addEventListener('change', eventHandler);
|
||||
loaderList.addEventListener('change', eventHandler);
|
||||
}
|
||||
|
||||
var span1 = document.createElement('span');
|
||||
span1.innerHTML =
|
||||
'<label for="qunit-build">Build: </label>' +
|
||||
'<select id="qunit-build">' +
|
||||
'<option value="lodash-dev">lodash (development)</option>' +
|
||||
'<option value="lodash">lodash (production)</option>' +
|
||||
'<option value="lodash-core-dev">lodash-core (development)</option>' +
|
||||
'<option value="lodash-core">lodash-core (production)</option>' +
|
||||
'</select>';
|
||||
|
||||
var span2 = document.createElement('span');
|
||||
span2.innerHTML =
|
||||
'<label for="qunit-loader">Loader: </label>' +
|
||||
'<select id="qunit-loader">' +
|
||||
'<option value="none">None</option>' +
|
||||
'<option value="curl">Curl</option>' +
|
||||
'<option value="dojo">Dojo</option>' +
|
||||
'<option value="requirejs">RequireJS</option>' +
|
||||
'</select>';
|
||||
|
||||
span1.style.cssText =
|
||||
span2.style.cssText = 'display:inline-block;float:right;line-height:2.1em;margin-left:1em;margin-top:0;';
|
||||
|
||||
span1.firstChild.style.cssText =
|
||||
span2.firstChild.style.cssText = 'display:inline-block;margin-right:.5em;';
|
||||
|
||||
var buildList = span1.lastChild,
|
||||
loaderList = span2.lastChild;
|
||||
|
||||
setTimeout(function() {
|
||||
ui.timing.loadEventEnd = +new Date;
|
||||
}, 1);
|
||||
|
||||
init();
|
||||
});
|
||||
|
||||
// The lodash build file path.
|
||||
ui.buildPath = (function() {
|
||||
var result;
|
||||
switch (build) {
|
||||
case 'lodash': result = 'dist/lodash.min.js'; break;
|
||||
case 'lodash-core-dev': result = 'dist/lodash.core.js'; break;
|
||||
case 'lodash-core': result = 'dist/lodash.core.min.js'; break;
|
||||
case null: build = 'lodash-dev';
|
||||
case 'lodash-dev': result = 'lodash.js'; break;
|
||||
default: return build;
|
||||
}
|
||||
return basePath + result;
|
||||
}());
|
||||
|
||||
// The module loader file path.
|
||||
ui.loaderPath = (function() {
|
||||
var result;
|
||||
switch (loader) {
|
||||
case 'curl': result = 'node_modules/curl-amd/dist/curl-kitchen-sink/curl.js'; break;
|
||||
case 'dojo': result = 'node_modules/dojo/dojo.js'; break;
|
||||
case 'requirejs': result = 'node_modules/requirejs/require.js'; break;
|
||||
case null: loader = 'none'; return '';
|
||||
default: return loader;
|
||||
}
|
||||
return basePath + result;
|
||||
}());
|
||||
|
||||
// Used to indicate testing a core build.
|
||||
ui.isCore = /\bcore(\.min)?\.js\b/.test(ui.buildPath);
|
||||
|
||||
// Used to indicate testing a foreign file.
|
||||
ui.isForeign = RegExp('^(\\w+:)?//').test(build);
|
||||
|
||||
// Used to indicate testing a modularized build.
|
||||
ui.isModularize = /\b(?:amd|commonjs|es|node|npm|(index|main)\.js)\b/.test([location.pathname, location.search]);
|
||||
|
||||
// Used to indicate testing in Sauce Labs' automated test cloud.
|
||||
ui.isSauceLabs = location.port == '9001';
|
||||
|
||||
// Used to indicate that lodash is in strict mode.
|
||||
ui.isStrict = /\bes\b/.test([location.pathname, location.search]);
|
||||
|
||||
ui.urlParams = { 'build': build, 'loader': loader };
|
||||
ui.timing = { 'loadEventEnd': 0 };
|
||||
|
||||
window.ui = ui;
|
||||
|
||||
}(this));
|
||||
|
|
@ -1,17 +0,0 @@
|
|||
'use strict';
|
||||
|
||||
self.console || (self.console = { 'log': function() {} });
|
||||
|
||||
addEventListener('message', function(e) {
|
||||
if (e.data) {
|
||||
try {
|
||||
importScripts('../' + e.data);
|
||||
} catch (e) {
|
||||
var lineNumber = e.lineNumber,
|
||||
message = (lineNumber == null ? '' : (lineNumber + ': ')) + e.message;
|
||||
|
||||
self._ = { 'VERSION': message };
|
||||
}
|
||||
postMessage(_.VERSION);
|
||||
}
|
||||
}, false);
|
||||
|
|
@ -1,170 +0,0 @@
|
|||
<!doctype html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>Backbone Test Suite</title>
|
||||
<link rel="stylesheet" href="../node_modules/qunitjs/qunit/qunit.css">
|
||||
</head>
|
||||
<body>
|
||||
<script>
|
||||
// Avoid reporting tests to Sauce Labs when script errors occur.
|
||||
if (location.port == '9001') {
|
||||
window.onerror = function(message) {
|
||||
if (window.QUnit) {
|
||||
QUnit.config.done.length = 0;
|
||||
}
|
||||
global_test_results = { 'message': message };
|
||||
};
|
||||
}
|
||||
</script>
|
||||
<script src="../node_modules/qunitjs/qunit/qunit.js"></script>
|
||||
<script src="../node_modules/qunit-extras/qunit-extras.js"></script>
|
||||
<script src="../vendor/json-js/json2.js"></script>
|
||||
<script src="../node_modules/platform/platform.js"></script>
|
||||
<script src="./asset/test-ui.js"></script>
|
||||
<script src="../lodash.js"></script>
|
||||
<script>
|
||||
QUnit.config.asyncRetries = 10;
|
||||
QUnit.config.hidepassed = true;
|
||||
|
||||
var mixinPrereqs = (function() {
|
||||
var aliasToReal = {
|
||||
'indexBy': 'keyBy',
|
||||
'invoke': 'invokeMap'
|
||||
};
|
||||
|
||||
var keyMap = {
|
||||
'rest': 'tail'
|
||||
};
|
||||
|
||||
var lodash = _.noConflict();
|
||||
|
||||
return function(_) {
|
||||
lodash.defaultsDeep(_, { 'templateSettings': lodash.templateSettings });
|
||||
lodash.mixin(_, lodash.pick(lodash, lodash.difference([
|
||||
'countBy',
|
||||
'debounce',
|
||||
'difference',
|
||||
'find',
|
||||
'findIndex',
|
||||
'findLastIndex',
|
||||
'groupBy',
|
||||
'includes',
|
||||
'invert',
|
||||
'invokeMap',
|
||||
'keyBy',
|
||||
'omit',
|
||||
'partition',
|
||||
'reduceRight',
|
||||
'reject',
|
||||
'sample',
|
||||
'without'
|
||||
], lodash.functions(_))));
|
||||
|
||||
lodash.forOwn(keyMap, function(realName, otherName) {
|
||||
_[otherName] = lodash[realName];
|
||||
_.prototype[otherName] = lodash.prototype[realName];
|
||||
});
|
||||
|
||||
lodash.forOwn(aliasToReal, function(realName, alias) {
|
||||
_[alias] = _[realName];
|
||||
_.prototype[alias] = _.prototype[realName];
|
||||
});
|
||||
};
|
||||
}());
|
||||
|
||||
// Load prerequisite scripts.
|
||||
document.write(ui.urlParams.loader == 'none'
|
||||
? '<script src="' + ui.buildPath + '"><\/script>'
|
||||
: '<script data-dojo-config="async:1" src="' + ui.loaderPath + '"><\/script>'
|
||||
);
|
||||
</script>
|
||||
<script>
|
||||
if (ui.urlParams.loader == 'none') {
|
||||
mixinPrereqs(_);
|
||||
document.write([
|
||||
'<script src="../node_modules/jquery/dist/jquery.js"><\/script>',
|
||||
'<script src="../vendor/backbone/backbone.js"><\/script>',
|
||||
'<script src="../vendor/backbone/test/setup/dom-setup.js"><\/script>',
|
||||
'<script src="../vendor/backbone/test/setup/environment.js"><\/script>',
|
||||
'<script src="../vendor/backbone/test/noconflict.js"><\/script>',
|
||||
'<script src="../vendor/backbone/test/events.js"><\/script>',
|
||||
'<script src="../vendor/backbone/test/model.js"><\/script>',
|
||||
'<script src="../vendor/backbone/test/collection.js"><\/script>',
|
||||
'<script src="../vendor/backbone/test/router.js"><\/script>',
|
||||
'<script src="../vendor/backbone/test/view.js"><\/script>',
|
||||
'<script src="../vendor/backbone/test/sync.js"><\/script>'
|
||||
].join('\n'));
|
||||
}
|
||||
</script>
|
||||
<script>
|
||||
(function() {
|
||||
if (window.curl) {
|
||||
curl.config({ 'apiName': 'require' });
|
||||
}
|
||||
if (!window.require) {
|
||||
return;
|
||||
}
|
||||
var reBasename = /[\w.-]+$/,
|
||||
basePath = ('//' + location.host + location.pathname.replace(reBasename, '')).replace(/\btest\/$/, ''),
|
||||
modulePath = ui.buildPath.replace(/\.js$/, ''),
|
||||
locationPath = modulePath.replace(reBasename, '').replace(/^\/|\/$/g, ''),
|
||||
moduleMain = modulePath.match(reBasename)[0],
|
||||
uid = +new Date;
|
||||
|
||||
function getConfig() {
|
||||
var result = {
|
||||
'baseUrl': './',
|
||||
'urlArgs': 't=' + uid++,
|
||||
'waitSeconds': 0,
|
||||
'paths': {
|
||||
'backbone': '../vendor/backbone/backbone',
|
||||
'jquery': '../node_modules/jquery/dist/jquery'
|
||||
},
|
||||
'packages': [{
|
||||
'name': 'test',
|
||||
'location': '../vendor/backbone/test',
|
||||
'config': {
|
||||
// Work around no global being exported.
|
||||
'exports': 'QUnit',
|
||||
'loader': 'curl/loader/legacy'
|
||||
}
|
||||
}]
|
||||
};
|
||||
|
||||
if (ui.isModularize) {
|
||||
result.packages.push({
|
||||
'name': 'underscore',
|
||||
'location': locationPath,
|
||||
'main': moduleMain
|
||||
});
|
||||
} else {
|
||||
result.paths.underscore = modulePath;
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
QUnit.config.autostart = false;
|
||||
|
||||
require(getConfig(), ['underscore'], function(lodash) {
|
||||
mixinPrereqs(lodash);
|
||||
require(getConfig(), ['backbone'], function() {
|
||||
require(getConfig(), [
|
||||
'test/setup/dom-setup',
|
||||
'test/setup/environment',
|
||||
'test/noconflict',
|
||||
'test/events',
|
||||
'test/model',
|
||||
'test/collection',
|
||||
'test/router',
|
||||
'test/view',
|
||||
'test/sync'
|
||||
], function() {
|
||||
QUnit.start();
|
||||
});
|
||||
});
|
||||
});
|
||||
}());
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
|
|
@ -1,41 +0,0 @@
|
|||
<!doctype html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>lodash-fp Test Suite</title>
|
||||
<link rel="stylesheet" href="../node_modules/qunitjs/qunit/qunit.css">
|
||||
</head>
|
||||
<body>
|
||||
<script>
|
||||
// Avoid reporting tests to Sauce Labs when script errors occur.
|
||||
if (location.port == '9001') {
|
||||
window.onerror = function(message) {
|
||||
if (window.QUnit) {
|
||||
QUnit.config.done.length = 0;
|
||||
}
|
||||
global_test_results = { 'message': message };
|
||||
};
|
||||
}
|
||||
</script>
|
||||
<script src="../lodash.js"></script>
|
||||
<script src="../dist/lodash.fp.js"></script>
|
||||
<script src="../dist/mapping.fp.js"></script>
|
||||
<script src="../node_modules/qunitjs/qunit/qunit.js"></script>
|
||||
<script src="../node_modules/qunit-extras/qunit-extras.js"></script>
|
||||
<script src="../node_modules/platform/platform.js"></script>
|
||||
<script src="./test-fp.js"></script>
|
||||
<div id="qunit"></div>
|
||||
<script>
|
||||
// Set a more readable browser name.
|
||||
window.onload = function() {
|
||||
var timeoutId = setInterval(function() {
|
||||
var ua = document.getElementById('qunit-userAgent');
|
||||
if (ua) {
|
||||
ua.innerHTML = platform;
|
||||
clearInterval(timeoutId);
|
||||
}
|
||||
}, 16);
|
||||
};
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
|
|
@ -1,351 +0,0 @@
|
|||
<!doctype html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>lodash Test Suite</title>
|
||||
<link rel="stylesheet" href="../node_modules/qunitjs/qunit/qunit.css">
|
||||
<style>
|
||||
#exports, #module {
|
||||
display: none;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<script>
|
||||
// Avoid reporting tests to Sauce Labs when script errors occur.
|
||||
if (location.port == '9001') {
|
||||
window.onerror = function(message) {
|
||||
if (window.QUnit) {
|
||||
QUnit.config.done.length = 0;
|
||||
}
|
||||
global_test_results = { 'message': message };
|
||||
};
|
||||
}
|
||||
</script>
|
||||
<script src="../node_modules/lodash/lodash.js"></script>
|
||||
<script>var lodashStable = _.noConflict();</script>
|
||||
<script src="../node_modules/qunitjs/qunit/qunit.js"></script>
|
||||
<script src="../node_modules/qunit-extras/qunit-extras.js"></script>
|
||||
<script src="../node_modules/platform/platform.js"></script>
|
||||
<script src="./asset/test-ui.js"></script>
|
||||
<div id="qunit"></div>
|
||||
<div id="exports"></div>
|
||||
<div id="module"></div>
|
||||
<script>
|
||||
function setProperty(object, key, value) {
|
||||
try {
|
||||
Object.defineProperty(object, key, {
|
||||
'configurable': true,
|
||||
'enumerable': false,
|
||||
'writable': true,
|
||||
'value': value
|
||||
});
|
||||
} catch (e) {
|
||||
object[key] = value;
|
||||
}
|
||||
return object;
|
||||
}
|
||||
|
||||
function addBizarroMethods() {
|
||||
var funcProto = Function.prototype,
|
||||
objectProto = Object.prototype;
|
||||
|
||||
var hasOwnProperty = objectProto.hasOwnProperty,
|
||||
fnToString = funcProto.toString,
|
||||
nativeString = fnToString.call(objectProto.toString),
|
||||
noop = function() {},
|
||||
propertyIsEnumerable = objectProto.propertyIsEnumerable,
|
||||
reToString = /toString/g;
|
||||
|
||||
function constant(value) {
|
||||
return function() {
|
||||
return value;
|
||||
};
|
||||
}
|
||||
|
||||
function createToString(funcName) {
|
||||
return constant(nativeString.replace(reToString, funcName));
|
||||
}
|
||||
|
||||
// Allow bypassing native checks.
|
||||
setProperty(funcProto, 'toString', (function() {
|
||||
function wrapper() {
|
||||
setProperty(funcProto, 'toString', fnToString);
|
||||
var result = hasOwnProperty.call(this, 'toString') ? this.toString() : fnToString.call(this);
|
||||
setProperty(funcProto, 'toString', wrapper);
|
||||
return result;
|
||||
}
|
||||
return wrapper;
|
||||
}()));
|
||||
|
||||
// Add prototype extensions.
|
||||
funcProto._method = noop;
|
||||
|
||||
// Set bad shims.
|
||||
setProperty(Object, '_create', Object.create);
|
||||
setProperty(Object, 'create', (function() {
|
||||
function object() {}
|
||||
return function(prototype) {
|
||||
if (prototype === Object(prototype)) {
|
||||
object.prototype = prototype;
|
||||
var result = new object;
|
||||
object.prototype = undefined;
|
||||
}
|
||||
return result || {};
|
||||
};
|
||||
}()));
|
||||
|
||||
setProperty(Object, '_getOwnPropertySymbols', Object.getOwnPropertySymbols);
|
||||
setProperty(Object, 'getOwnPropertySymbols', undefined);
|
||||
|
||||
setProperty(objectProto, '_propertyIsEnumerable', propertyIsEnumerable);
|
||||
setProperty(objectProto, 'propertyIsEnumerable', function(key) {
|
||||
return !(key == 'valueOf' && this && this.valueOf === 1) && _propertyIsEnumerable.call(this, key);
|
||||
});
|
||||
|
||||
setProperty(window, '_Map', window.Map);
|
||||
if (_Map) {
|
||||
setProperty(window, 'Map', (function(Map) {
|
||||
var count = 0;
|
||||
return function() {
|
||||
if (count++) {
|
||||
return new Map;
|
||||
}
|
||||
var result = {};
|
||||
setProperty(window, 'Map', Map);
|
||||
return result;
|
||||
};
|
||||
}(_Map)));
|
||||
|
||||
setProperty(Map, 'toString', createToString('Map'));
|
||||
}
|
||||
setProperty(window, '_Promise', window.Promise);
|
||||
setProperty(window, 'Promise', noop);
|
||||
|
||||
setProperty(window, '_Set', window.Set);
|
||||
setProperty(window, 'Set', noop);
|
||||
|
||||
setProperty(window, '_Symbol', window.Symbol);
|
||||
setProperty(window, 'Symbol', undefined);
|
||||
|
||||
setProperty(window, '_WeakMap', window.WeakMap);
|
||||
setProperty(window, 'WeakMap', noop);
|
||||
|
||||
// Fake `WinRTError`.
|
||||
setProperty(window, 'WinRTError', Error);
|
||||
|
||||
// Fake free variable `global`.
|
||||
setProperty(window, 'exports', window);
|
||||
setProperty(window, 'global', window);
|
||||
setProperty(window, 'module', {});
|
||||
}
|
||||
|
||||
function removeBizarroMethods() {
|
||||
var funcProto = Function.prototype,
|
||||
objectProto = Object.prototype;
|
||||
|
||||
setProperty(objectProto, 'propertyIsEnumerable', objectProto._propertyIsEnumerable);
|
||||
|
||||
if (Object._create) {
|
||||
Object.create = Object._create;
|
||||
} else {
|
||||
delete Object.create;
|
||||
}
|
||||
if (Object._getOwnPropertySymbols) {
|
||||
Object.getOwnPropertySymbols = Object._getOwnPropertySymbols;
|
||||
} else {
|
||||
delete Object.getOwnPropertySymbols;
|
||||
}
|
||||
if (_Map) {
|
||||
Map = _Map;
|
||||
} else {
|
||||
setProperty(window, 'Map', undefined);
|
||||
}
|
||||
if (_Promise) {
|
||||
Promise = _Promise;
|
||||
} else {
|
||||
setProperty(window, 'Promise', undefined);
|
||||
}
|
||||
if (_Set) {
|
||||
Set = _Set;
|
||||
} else {
|
||||
setProperty(window, 'Set', undefined);
|
||||
}
|
||||
if (_Symbol) {
|
||||
Symbol = _Symbol;
|
||||
}
|
||||
if (_WeakMap) {
|
||||
WeakMap = _WeakMap;
|
||||
} else {
|
||||
setProperty(window, 'WeakMap', undefined);
|
||||
}
|
||||
setProperty(window, '_Map', undefined);
|
||||
setProperty(window, '_Promise', undefined);
|
||||
setProperty(window, '_Set', undefined);
|
||||
setProperty(window, '_Symbol', undefined);
|
||||
setProperty(window, '_WeakMap', undefined);
|
||||
|
||||
setProperty(window, 'WinRTError', undefined);
|
||||
|
||||
setProperty(window, 'exports', document.getElementById('exports'));
|
||||
setProperty(window, 'global', undefined);
|
||||
setProperty(window, 'module', document.getElementById('module'));
|
||||
|
||||
delete funcProto._method;
|
||||
delete Object._create;
|
||||
delete Object._getOwnPropertySymbols;
|
||||
delete objectProto._propertyIsEnumerable;
|
||||
}
|
||||
|
||||
// Load lodash to expose it to the bad extensions/shims.
|
||||
if (!ui.isModularize) {
|
||||
addBizarroMethods();
|
||||
document.write('<script src="' + ui.buildPath + '"><\/script>');
|
||||
}
|
||||
</script>
|
||||
<script>
|
||||
// Store lodash to test for bad extensions/shims.
|
||||
if (!ui.isModularize) {
|
||||
var lodashBizarro = window._;
|
||||
window._ = undefined;
|
||||
removeBizarroMethods();
|
||||
}
|
||||
// Load test scripts.
|
||||
document.write((ui.isForeign || ui.urlParams.loader == 'none')
|
||||
? '<script src="' + ui.buildPath + '"><\/script><script src="test.js"><\/script>'
|
||||
: '<script data-dojo-config="async:1" src="' + ui.loaderPath + '"><\/script>'
|
||||
);
|
||||
</script>
|
||||
<script>
|
||||
var lodashModule,
|
||||
shimmedModule,
|
||||
underscoreModule;
|
||||
|
||||
(function() {
|
||||
if (window.curl) {
|
||||
curl.config({ 'apiName': 'require' });
|
||||
}
|
||||
if (ui.isForeign || !window.require) {
|
||||
return;
|
||||
}
|
||||
var reBasename = /[\w.-]+$/,
|
||||
basePath = ('//' + location.host + location.pathname.replace(reBasename, '')).replace(/\btest\/$/, ''),
|
||||
modulePath = ui.buildPath.replace(/\.js$/, ''),
|
||||
moduleMain = modulePath.match(reBasename)[0],
|
||||
locationPath = modulePath.replace(reBasename, '').replace(/^\/|\/$/g, ''),
|
||||
shimmedLocationPath = './abc/../' + locationPath,
|
||||
underscoreLocationPath = './xyz/../' + locationPath,
|
||||
uid = +new Date;
|
||||
|
||||
function getConfig() {
|
||||
var result = {
|
||||
'baseUrl': './',
|
||||
'urlArgs': 't=' + uid++,
|
||||
'waitSeconds': 0,
|
||||
'paths': {},
|
||||
'packages': [{
|
||||
'name': 'test',
|
||||
'location': basePath + 'test',
|
||||
'main': 'test',
|
||||
'config': {
|
||||
// Work around no global being exported.
|
||||
'exports': 'QUnit',
|
||||
'loader': 'curl/loader/legacy'
|
||||
}
|
||||
}],
|
||||
'shim': {
|
||||
'shimmed': {
|
||||
'exports': '_'
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
if (ui.isModularize) {
|
||||
result.packages.push({
|
||||
'name': 'lodash',
|
||||
'location': locationPath,
|
||||
'main': moduleMain
|
||||
}, {
|
||||
'name': 'shimmed',
|
||||
'location': shimmedLocationPath,
|
||||
'main': moduleMain
|
||||
}, {
|
||||
'name': 'underscore',
|
||||
'location': underscoreLocationPath,
|
||||
'main': moduleMain
|
||||
});
|
||||
} else {
|
||||
result.paths.lodash = modulePath;
|
||||
result.paths.shimmed = shimmedLocationPath + '/' + moduleMain;
|
||||
result.paths.underscore = underscoreLocationPath + '/' + moduleMain;
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
function loadTests() {
|
||||
require(getConfig(), ['test'], function() {
|
||||
QUnit.start();
|
||||
});
|
||||
}
|
||||
|
||||
function loadModulesAndTests() {
|
||||
require(getConfig(), ['lodash', 'shimmed', 'underscore'], function(lodash, shimmed, underscore) {
|
||||
lodashModule = lodash;
|
||||
lodashModule.moduleName = 'lodash';
|
||||
|
||||
if (shimmed) {
|
||||
shimmedModule = shimmed.result(shimmed, 'noConflict') || shimmed;
|
||||
shimmedModule.moduleName = 'shimmed';
|
||||
}
|
||||
if (underscore) {
|
||||
underscoreModule = underscore.result(underscore, 'noConflict') || underscore;
|
||||
underscoreModule.moduleName = 'underscore';
|
||||
}
|
||||
window._ = lodash;
|
||||
|
||||
if (ui.isModularize) {
|
||||
require(getConfig(), [
|
||||
'lodash/_baseEach',
|
||||
'lodash/_isIndex',
|
||||
'lodash/_isIterateeCall'
|
||||
], function(baseEach, isIndex, isIterateeCall) {
|
||||
lodash._baseEach = baseEach;
|
||||
lodash._isIndex = isIndex;
|
||||
lodash._isIterateeCall = isIterateeCall;
|
||||
loadTests();
|
||||
});
|
||||
} else {
|
||||
loadTests();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
QUnit.config.autostart = false;
|
||||
|
||||
if (window.requirejs) {
|
||||
addBizarroMethods();
|
||||
require(getConfig(), ['lodash'], function(lodash) {
|
||||
lodashBizarro = lodash.result(lodash, 'noConflict') || lodash;
|
||||
delete requirejs.s.contexts._;
|
||||
|
||||
removeBizarroMethods();
|
||||
loadModulesAndTests();
|
||||
});
|
||||
} else {
|
||||
loadModulesAndTests();
|
||||
}
|
||||
}());
|
||||
|
||||
// Set a more readable browser name.
|
||||
window.onload = function() {
|
||||
var timeoutId = setInterval(function() {
|
||||
var ua = document.getElementById('qunit-userAgent');
|
||||
if (ua) {
|
||||
ua.innerHTML = platform;
|
||||
clearInterval(timeoutId);
|
||||
}
|
||||
}, 16);
|
||||
};
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
|
|
@ -1,27 +0,0 @@
|
|||
#!/usr/bin/env node
|
||||
'use strict';
|
||||
|
||||
var _ = require('../lodash'),
|
||||
fs = require('fs'),
|
||||
path = require('path');
|
||||
|
||||
var args = (args = process.argv)
|
||||
.slice((args[0] === process.execPath || args[0] === 'node') ? 2 : 0);
|
||||
|
||||
var filePath = path.resolve(args[1]),
|
||||
reLine = /.*/gm;
|
||||
|
||||
var pattern = (function() {
|
||||
var result = args[0],
|
||||
delimiter = result.charAt(0),
|
||||
lastIndex = result.lastIndexOf(delimiter);
|
||||
|
||||
return RegExp(result.slice(1, lastIndex), result.slice(lastIndex + 1));
|
||||
}());
|
||||
|
||||
/*----------------------------------------------------------------------------*/
|
||||
|
||||
fs.writeFileSync(filePath, fs.readFileSync(filePath, 'utf8').replace(pattern, function(match) {
|
||||
var snippet = _.slice(arguments, -3, -2)[0];
|
||||
return match.replace(snippet, snippet.replace(reLine, ''));
|
||||
}));
|
||||
|
|
@ -1,914 +0,0 @@
|
|||
#!/usr/bin/env node
|
||||
'use strict';
|
||||
|
||||
/** Environment shortcut. */
|
||||
var env = process.env;
|
||||
|
||||
if (env.TRAVIS_SECURE_ENV_VARS == 'false') {
|
||||
console.log('Skipping Sauce Labs jobs; secure environment variables are unavailable');
|
||||
process.exit(0);
|
||||
}
|
||||
|
||||
/** Load Node.js modules. */
|
||||
var EventEmitter = require('events').EventEmitter,
|
||||
http = require('http'),
|
||||
path = require('path'),
|
||||
url = require('url'),
|
||||
util = require('util');
|
||||
|
||||
/** Load other modules. */
|
||||
var _ = require('../lodash.js'),
|
||||
chalk = require('chalk'),
|
||||
ecstatic = require('ecstatic'),
|
||||
request = require('request'),
|
||||
SauceTunnel = require('sauce-tunnel');
|
||||
|
||||
/** Used for Sauce Labs credentials. */
|
||||
var accessKey = env.SAUCE_ACCESS_KEY,
|
||||
username = env.SAUCE_USERNAME;
|
||||
|
||||
/** Used as the default maximum number of times to retry a job and tunnel. */
|
||||
var maxJobRetries = 3,
|
||||
maxTunnelRetries = 3;
|
||||
|
||||
/** Used as the static file server middleware. */
|
||||
var mount = ecstatic({
|
||||
'cache': 'no-cache',
|
||||
'root': process.cwd()
|
||||
});
|
||||
|
||||
/** Used as the list of ports supported by Sauce Connect. */
|
||||
var ports = [
|
||||
80, 443, 888, 2000, 2001, 2020, 2109, 2222, 2310, 3000, 3001, 3030, 3210,
|
||||
3333, 4000, 4001, 4040, 4321, 4502, 4503, 4567, 5000, 5001, 5050, 5555, 5432,
|
||||
6000, 6001, 6060, 6666, 6543, 7000, 7070, 7774, 7777, 8000, 8001, 8003, 8031,
|
||||
8080, 8081, 8765, 8777, 8888, 9000, 9001, 9080, 9090, 9876, 9877, 9999, 49221,
|
||||
55001
|
||||
];
|
||||
|
||||
/** Used by `logInline` to clear previously logged messages. */
|
||||
var prevLine = '';
|
||||
|
||||
/** Method shortcut. */
|
||||
var push = Array.prototype.push;
|
||||
|
||||
/** Used to detect error messages. */
|
||||
var reError = /(?:\be|E)rror\b/;
|
||||
|
||||
/** Used to detect valid job ids. */
|
||||
var reJobId = /^[a-z0-9]{32}$/;
|
||||
|
||||
/** Used to display the wait throbber. */
|
||||
var throbberDelay = 500,
|
||||
waitCount = -1;
|
||||
|
||||
/**
|
||||
* Used as Sauce Labs config values.
|
||||
* See the [Sauce Labs documentation](https://docs.saucelabs.com/reference/test-configuration/)
|
||||
* for more details.
|
||||
*/
|
||||
var advisor = getOption('advisor', false),
|
||||
build = getOption('build', (env.TRAVIS_COMMIT || '').slice(0, 10)),
|
||||
commandTimeout = getOption('commandTimeout', 90),
|
||||
compatMode = getOption('compatMode', null),
|
||||
customData = Function('return {' + getOption('customData', '').replace(/^\{|}$/g, '') + '}')(),
|
||||
deviceOrientation = getOption('deviceOrientation', 'portrait'),
|
||||
framework = getOption('framework', 'qunit'),
|
||||
idleTimeout = getOption('idleTimeout', 60),
|
||||
jobName = getOption('name', 'unit tests'),
|
||||
maxDuration = getOption('maxDuration', 180),
|
||||
port = ports[Math.min(_.sortedIndex(ports, getOption('port', 9001)), ports.length - 1)],
|
||||
publicAccess = getOption('public', true),
|
||||
queueTimeout = getOption('queueTimeout', 240),
|
||||
recordVideo = getOption('recordVideo', true),
|
||||
recordScreenshots = getOption('recordScreenshots', false),
|
||||
runner = getOption('runner', 'test/index.html').replace(/^\W+/, ''),
|
||||
runnerUrl = getOption('runnerUrl', 'http://localhost:' + port + '/' + runner),
|
||||
statusInterval = getOption('statusInterval', 5),
|
||||
tags = getOption('tags', []),
|
||||
throttled = getOption('throttled', 10),
|
||||
tunneled = getOption('tunneled', true),
|
||||
tunnelId = getOption('tunnelId', 'tunnel_' + (env.TRAVIS_JOB_ID || 0)),
|
||||
tunnelTimeout = getOption('tunnelTimeout', 120),
|
||||
videoUploadOnPass = getOption('videoUploadOnPass', false);
|
||||
|
||||
/** Used to convert Sauce Labs browser identifiers to their formal names. */
|
||||
var browserNameMap = {
|
||||
'googlechrome': 'Chrome',
|
||||
'iehta': 'Internet Explorer',
|
||||
'ipad': 'iPad',
|
||||
'iphone': 'iPhone',
|
||||
'microsoftedge': 'Edge'
|
||||
};
|
||||
|
||||
/** List of platforms to load the runner on. */
|
||||
var platforms = [
|
||||
['Linux', 'android', '5.1'],
|
||||
['Windows 10', 'chrome', '51'],
|
||||
['Windows 10', 'chrome', '50'],
|
||||
['Windows 10', 'firefox', '47'],
|
||||
['Windows 10', 'firefox', '46'],
|
||||
['Windows 10', 'microsoftedge', '13'],
|
||||
['Windows 10', 'internet explorer', '11'],
|
||||
['Windows 8', 'internet explorer', '10'],
|
||||
['Windows 7', 'internet explorer', '9'],
|
||||
// ['OS X 10.10', 'ipad', '9.1'],
|
||||
['OS X 10.11', 'safari', '9'],
|
||||
['OS X 10.10', 'safari', '8']
|
||||
];
|
||||
|
||||
/** Used to tailor the `platforms` array. */
|
||||
var isAMD = _.includes(tags, 'amd'),
|
||||
isBackbone = _.includes(tags, 'backbone'),
|
||||
isModern = _.includes(tags, 'modern');
|
||||
|
||||
// The platforms to test IE compatibility modes.
|
||||
if (compatMode) {
|
||||
platforms = [
|
||||
['Windows 10', 'internet explorer', '11'],
|
||||
['Windows 8', 'internet explorer', '10'],
|
||||
['Windows 7', 'internet explorer', '9'],
|
||||
['Windows 7', 'internet explorer', '8']
|
||||
];
|
||||
}
|
||||
// The platforms for AMD tests.
|
||||
if (isAMD) {
|
||||
platforms = _.filter(platforms, function(platform) {
|
||||
var browser = browserName(platform[1]),
|
||||
version = +platform[2];
|
||||
|
||||
switch (browser) {
|
||||
case 'Android': return version >= 4.4;
|
||||
case 'Opera': return version >= 10;
|
||||
}
|
||||
return true;
|
||||
});
|
||||
}
|
||||
// The platforms for Backbone tests.
|
||||
if (isBackbone) {
|
||||
platforms = _.filter(platforms, function(platform) {
|
||||
var browser = browserName(platform[1]),
|
||||
version = +platform[2];
|
||||
|
||||
switch (browser) {
|
||||
case 'Firefox': return version >= 4;
|
||||
case 'Internet Explorer': return version >= 7;
|
||||
case 'iPad': return version >= 5;
|
||||
case 'Opera': return version >= 12;
|
||||
}
|
||||
return true;
|
||||
});
|
||||
}
|
||||
// The platforms for modern builds.
|
||||
if (isModern) {
|
||||
platforms = _.filter(platforms, function(platform) {
|
||||
var browser = browserName(platform[1]),
|
||||
version = +platform[2];
|
||||
|
||||
switch (browser) {
|
||||
case 'Android': return version >= 4.1;
|
||||
case 'Firefox': return version >= 10;
|
||||
case 'Internet Explorer': return version >= 9;
|
||||
case 'iPad': return version >= 6;
|
||||
case 'Opera': return version >= 12;
|
||||
case 'Safari': return version >= 6;
|
||||
}
|
||||
return true;
|
||||
});
|
||||
}
|
||||
|
||||
/** Used as the default `Job` options object. */
|
||||
var jobOptions = {
|
||||
'build': build,
|
||||
'command-timeout': commandTimeout,
|
||||
'custom-data': customData,
|
||||
'device-orientation': deviceOrientation,
|
||||
'framework': framework,
|
||||
'idle-timeout': idleTimeout,
|
||||
'max-duration': maxDuration,
|
||||
'name': jobName,
|
||||
'public': publicAccess,
|
||||
'platforms': platforms,
|
||||
'record-screenshots': recordScreenshots,
|
||||
'record-video': recordVideo,
|
||||
'sauce-advisor': advisor,
|
||||
'tags': tags,
|
||||
'url': runnerUrl,
|
||||
'video-upload-on-pass': videoUploadOnPass
|
||||
};
|
||||
|
||||
if (publicAccess === true) {
|
||||
jobOptions['public'] = 'public';
|
||||
}
|
||||
if (tunneled) {
|
||||
jobOptions['tunnel-identifier'] = tunnelId;
|
||||
}
|
||||
|
||||
/*----------------------------------------------------------------------------*/
|
||||
|
||||
/**
|
||||
* Resolves the formal browser name for a given Sauce Labs browser identifier.
|
||||
*
|
||||
* @private
|
||||
* @param {string} identifier The browser identifier.
|
||||
* @returns {string} Returns the formal browser name.
|
||||
*/
|
||||
function browserName(identifier) {
|
||||
return browserNameMap[identifier] || _.startCase(identifier);
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the value for the given option name. If no value is available the
|
||||
* `defaultValue` is returned.
|
||||
*
|
||||
* @private
|
||||
* @param {string} name The name of the option.
|
||||
* @param {*} defaultValue The default option value.
|
||||
* @returns {*} Returns the option value.
|
||||
*/
|
||||
function getOption(name, defaultValue) {
|
||||
var isArr = _.isArray(defaultValue);
|
||||
return _.reduce(process.argv, function(result, value) {
|
||||
if (isArr) {
|
||||
value = optionToArray(name, value);
|
||||
return _.isEmpty(value) ? result : value;
|
||||
}
|
||||
value = optionToValue(name, value);
|
||||
|
||||
return value == null ? result : value;
|
||||
}, defaultValue);
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks if `value` is a job ID.
|
||||
*
|
||||
* @private
|
||||
* @param {*} value The value to check.
|
||||
* @returns {boolean} Returns `true` if `value` is a job ID, else `false`.
|
||||
*/
|
||||
function isJobId(value) {
|
||||
return reJobId.test(value);
|
||||
}
|
||||
|
||||
/**
|
||||
* Writes an inline message to standard output.
|
||||
*
|
||||
* @private
|
||||
* @param {string} [text=''] The text to log.
|
||||
*/
|
||||
function logInline(text) {
|
||||
var blankLine = _.repeat(' ', _.size(prevLine));
|
||||
prevLine = text = _.truncate(text, { 'length': 40 });
|
||||
process.stdout.write(text + blankLine.slice(text.length) + '\r');
|
||||
}
|
||||
|
||||
/**
|
||||
* Writes the wait throbber to standard output.
|
||||
*
|
||||
* @private
|
||||
*/
|
||||
function logThrobber() {
|
||||
logInline('Please wait' + _.repeat('.', (++waitCount % 3) + 1));
|
||||
}
|
||||
|
||||
/**
|
||||
* Converts a comma separated option value into an array.
|
||||
*
|
||||
* @private
|
||||
* @param {string} name The name of the option to inspect.
|
||||
* @param {string} string The options string.
|
||||
* @returns {Array} Returns the new converted array.
|
||||
*/
|
||||
function optionToArray(name, string) {
|
||||
return _.compact(_.invokeMap((optionToValue(name, string) || '').split(/, */), 'trim'));
|
||||
}
|
||||
|
||||
/**
|
||||
* Extracts the option value from an option string.
|
||||
*
|
||||
* @private
|
||||
* @param {string} name The name of the option to inspect.
|
||||
* @param {string} string The options string.
|
||||
* @returns {string|undefined} Returns the option value, else `undefined`.
|
||||
*/
|
||||
function optionToValue(name, string) {
|
||||
var result = string.match(RegExp('^' + name + '(?:=([\\s\\S]+))?$'));
|
||||
if (result) {
|
||||
result = _.get(result, 1);
|
||||
result = result ? _.trim(result) : true;
|
||||
}
|
||||
if (result === 'false') {
|
||||
return false;
|
||||
}
|
||||
return result || undefined;
|
||||
}
|
||||
|
||||
/*----------------------------------------------------------------------------*/
|
||||
|
||||
/**
|
||||
* The `Job#remove` and `Tunnel#stop` callback used by `Jobs#restart`
|
||||
* and `Tunnel#restart` respectively.
|
||||
*
|
||||
* @private
|
||||
*/
|
||||
function onGenericRestart() {
|
||||
this.restarting = false;
|
||||
this.emit('restart');
|
||||
this.start();
|
||||
}
|
||||
|
||||
/**
|
||||
* The `request.put` and `SauceTunnel#stop` callback used by `Jobs#stop`
|
||||
* and `Tunnel#stop` respectively.
|
||||
*
|
||||
* @private
|
||||
* @param {Object} [error] The error object.
|
||||
*/
|
||||
function onGenericStop(error) {
|
||||
this.running = this.stopping = false;
|
||||
this.emit('stop', error);
|
||||
}
|
||||
|
||||
/**
|
||||
* The `request.del` callback used by `Jobs#remove`.
|
||||
*
|
||||
* @private
|
||||
*/
|
||||
function onJobRemove(error, res, body) {
|
||||
this.id = this.taskId = this.url = null;
|
||||
this.removing = false;
|
||||
this.emit('remove');
|
||||
}
|
||||
|
||||
/**
|
||||
* The `Job#remove` callback used by `Jobs#reset`.
|
||||
*
|
||||
* @private
|
||||
*/
|
||||
function onJobReset() {
|
||||
this.attempts = 0;
|
||||
this.failed = this.resetting = false;
|
||||
this._pollerId = this.id = this.result = this.taskId = this.url = null;
|
||||
this.emit('reset');
|
||||
}
|
||||
|
||||
/**
|
||||
* The `request.post` callback used by `Jobs#start`.
|
||||
*
|
||||
* @private
|
||||
* @param {Object} [error] The error object.
|
||||
* @param {Object} res The response data object.
|
||||
* @param {Object} body The response body JSON object.
|
||||
*/
|
||||
function onJobStart(error, res, body) {
|
||||
this.starting = false;
|
||||
|
||||
if (this.stopping) {
|
||||
return;
|
||||
}
|
||||
var statusCode = _.get(res, 'statusCode'),
|
||||
taskId = _.first(_.get(body, 'js tests'));
|
||||
|
||||
if (error || !taskId || statusCode != 200) {
|
||||
if (this.attempts < this.retries) {
|
||||
this.restart();
|
||||
return;
|
||||
}
|
||||
var na = 'unavailable',
|
||||
bodyStr = _.isObject(body) ? '\n' + JSON.stringify(body) : na,
|
||||
statusStr = _.isFinite(statusCode) ? statusCode : na;
|
||||
|
||||
logInline();
|
||||
console.error('Failed to start job; status: %s, body: %s', statusStr, bodyStr);
|
||||
if (error) {
|
||||
console.error(error);
|
||||
}
|
||||
this.failed = true;
|
||||
this.emit('complete');
|
||||
return;
|
||||
}
|
||||
this.running = true;
|
||||
this.taskId = taskId;
|
||||
this.timestamp = _.now();
|
||||
this.emit('start');
|
||||
this.status();
|
||||
}
|
||||
|
||||
/**
|
||||
* The `request.post` callback used by `Job#status`.
|
||||
*
|
||||
* @private
|
||||
* @param {Object} [error] The error object.
|
||||
* @param {Object} res The response data object.
|
||||
* @param {Object} body The response body JSON object.
|
||||
*/
|
||||
function onJobStatus(error, res, body) {
|
||||
this.checking = false;
|
||||
|
||||
if (!this.running || this.stopping) {
|
||||
return;
|
||||
}
|
||||
var completed = _.get(body, 'completed', false),
|
||||
data = _.first(_.get(body, 'js tests')),
|
||||
elapsed = (_.now() - this.timestamp) / 1000,
|
||||
jobId = _.get(data, 'job_id', null),
|
||||
jobResult = _.get(data, 'result', null),
|
||||
jobStatus = _.get(data, 'status', ''),
|
||||
jobUrl = _.get(data, 'url', null),
|
||||
expired = (elapsed >= queueTimeout && !_.includes(jobStatus, 'in progress')),
|
||||
options = this.options,
|
||||
platform = options.platforms[0];
|
||||
|
||||
if (_.isObject(jobResult)) {
|
||||
var message = _.get(jobResult, 'message');
|
||||
} else {
|
||||
if (typeof jobResult == 'string') {
|
||||
message = jobResult;
|
||||
}
|
||||
jobResult = null;
|
||||
}
|
||||
if (isJobId(jobId)) {
|
||||
this.id = jobId;
|
||||
this.result = jobResult;
|
||||
this.url = jobUrl;
|
||||
} else {
|
||||
completed = false;
|
||||
}
|
||||
this.emit('status', jobStatus);
|
||||
|
||||
if (!completed && !expired) {
|
||||
this._pollerId = _.delay(_.bind(this.status, this), this.statusInterval * 1000);
|
||||
return;
|
||||
}
|
||||
var description = browserName(platform[1]) + ' ' + platform[2] + ' on ' + _.startCase(platform[0]),
|
||||
errored = !jobResult || !jobResult.passed || reError.test(message) || reError.test(jobStatus),
|
||||
failures = _.get(jobResult, 'failed'),
|
||||
label = options.name + ':',
|
||||
tunnel = this.tunnel;
|
||||
|
||||
if (errored || failures) {
|
||||
if (errored && this.attempts < this.retries) {
|
||||
this.restart();
|
||||
return;
|
||||
}
|
||||
var details = 'See ' + jobUrl + ' for details.';
|
||||
this.failed = true;
|
||||
|
||||
logInline();
|
||||
if (failures) {
|
||||
console.error(label + ' %s ' + chalk.red('failed') + ' %d test' + (failures > 1 ? 's' : '') + '. %s', description, failures, details);
|
||||
}
|
||||
else if (tunnel.attempts < tunnel.retries) {
|
||||
tunnel.restart();
|
||||
return;
|
||||
}
|
||||
else {
|
||||
if (message === undefined) {
|
||||
message = 'Results are unavailable. ' + details;
|
||||
}
|
||||
console.error(label, description, chalk.red('failed') + ';', message);
|
||||
}
|
||||
}
|
||||
else {
|
||||
logInline();
|
||||
console.log(label, description, chalk.green('passed'));
|
||||
}
|
||||
this.running = false;
|
||||
this.emit('complete');
|
||||
}
|
||||
|
||||
/**
|
||||
* The `SauceTunnel#start` callback used by `Tunnel#start`.
|
||||
*
|
||||
* @private
|
||||
* @param {boolean} success The connection success indicator.
|
||||
*/
|
||||
function onTunnelStart(success) {
|
||||
this.starting = false;
|
||||
|
||||
if (this._timeoutId) {
|
||||
clearTimeout(this._timeoutId);
|
||||
this._timeoutId = null;
|
||||
}
|
||||
if (!success) {
|
||||
if (this.attempts < this.retries) {
|
||||
this.restart();
|
||||
return;
|
||||
}
|
||||
logInline();
|
||||
console.error('Failed to open Sauce Connect tunnel');
|
||||
process.exit(2);
|
||||
}
|
||||
logInline();
|
||||
console.log('Sauce Connect tunnel opened');
|
||||
|
||||
var jobs = this.jobs;
|
||||
push.apply(jobs.queue, jobs.all);
|
||||
|
||||
this.running = true;
|
||||
this.emit('start');
|
||||
|
||||
console.log('Starting jobs...');
|
||||
this.dequeue();
|
||||
}
|
||||
|
||||
/*----------------------------------------------------------------------------*/
|
||||
|
||||
/**
|
||||
* The Job constructor.
|
||||
*
|
||||
* @private
|
||||
* @param {Object} [properties] The properties to initialize a job with.
|
||||
*/
|
||||
function Job(properties) {
|
||||
EventEmitter.call(this);
|
||||
|
||||
this.options = {};
|
||||
_.merge(this, properties);
|
||||
_.defaults(this.options, _.cloneDeep(jobOptions));
|
||||
|
||||
this.attempts = 0;
|
||||
this.checking = this.failed = this.removing = this.resetting = this.restarting = this.running = this.starting = this.stopping = false;
|
||||
this._pollerId = this.id = this.result = this.taskId = this.url = null;
|
||||
}
|
||||
|
||||
util.inherits(Job, EventEmitter);
|
||||
|
||||
/**
|
||||
* Removes the job.
|
||||
*
|
||||
* @memberOf Job
|
||||
* @param {Function} callback The function called once the job is removed.
|
||||
* @param {Object} Returns the job instance.
|
||||
*/
|
||||
Job.prototype.remove = function(callback) {
|
||||
this.once('remove', _.iteratee(callback));
|
||||
if (this.removing) {
|
||||
return this;
|
||||
}
|
||||
this.removing = true;
|
||||
return this.stop(function() {
|
||||
var onRemove = _.bind(onJobRemove, this);
|
||||
if (!this.id) {
|
||||
_.defer(onRemove);
|
||||
return;
|
||||
}
|
||||
request.del(_.template('https://saucelabs.com/rest/v1/${user}/jobs/${id}')(this), {
|
||||
'auth': { 'user': this.user, 'pass': this.pass }
|
||||
}, onRemove);
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* Resets the job.
|
||||
*
|
||||
* @memberOf Job
|
||||
* @param {Function} callback The function called once the job is reset.
|
||||
* @param {Object} Returns the job instance.
|
||||
*/
|
||||
Job.prototype.reset = function(callback) {
|
||||
this.once('reset', _.iteratee(callback));
|
||||
if (this.resetting) {
|
||||
return this;
|
||||
}
|
||||
this.resetting = true;
|
||||
return this.remove(onJobReset);
|
||||
};
|
||||
|
||||
/**
|
||||
* Restarts the job.
|
||||
*
|
||||
* @memberOf Job
|
||||
* @param {Function} callback The function called once the job is restarted.
|
||||
* @param {Object} Returns the job instance.
|
||||
*/
|
||||
Job.prototype.restart = function(callback) {
|
||||
this.once('restart', _.iteratee(callback));
|
||||
if (this.restarting) {
|
||||
return this;
|
||||
}
|
||||
this.restarting = true;
|
||||
|
||||
var options = this.options,
|
||||
platform = options.platforms[0],
|
||||
description = browserName(platform[1]) + ' ' + platform[2] + ' on ' + _.startCase(platform[0]),
|
||||
label = options.name + ':';
|
||||
|
||||
logInline();
|
||||
console.log('%s %s restart %d of %d', label, description, ++this.attempts, this.retries);
|
||||
|
||||
return this.remove(onGenericRestart);
|
||||
};
|
||||
|
||||
/**
|
||||
* Starts the job.
|
||||
*
|
||||
* @memberOf Job
|
||||
* @param {Function} callback The function called once the job is started.
|
||||
* @param {Object} Returns the job instance.
|
||||
*/
|
||||
Job.prototype.start = function(callback) {
|
||||
this.once('start', _.iteratee(callback));
|
||||
if (this.starting || this.running) {
|
||||
return this;
|
||||
}
|
||||
this.starting = true;
|
||||
request.post(_.template('https://saucelabs.com/rest/v1/${user}/js-tests')(this), {
|
||||
'auth': { 'user': this.user, 'pass': this.pass },
|
||||
'json': this.options
|
||||
}, _.bind(onJobStart, this));
|
||||
|
||||
return this;
|
||||
};
|
||||
|
||||
/**
|
||||
* Checks the status of a job.
|
||||
*
|
||||
* @memberOf Job
|
||||
* @param {Function} callback The function called once the status is resolved.
|
||||
* @param {Object} Returns the job instance.
|
||||
*/
|
||||
Job.prototype.status = function(callback) {
|
||||
this.once('status', _.iteratee(callback));
|
||||
if (this.checking || this.removing || this.resetting || this.restarting || this.starting || this.stopping) {
|
||||
return this;
|
||||
}
|
||||
this._pollerId = null;
|
||||
this.checking = true;
|
||||
request.post(_.template('https://saucelabs.com/rest/v1/${user}/js-tests/status')(this), {
|
||||
'auth': { 'user': this.user, 'pass': this.pass },
|
||||
'json': { 'js tests': [this.taskId] }
|
||||
}, _.bind(onJobStatus, this));
|
||||
|
||||
return this;
|
||||
};
|
||||
|
||||
/**
|
||||
* Stops the job.
|
||||
*
|
||||
* @memberOf Job
|
||||
* @param {Function} callback The function called once the job is stopped.
|
||||
* @param {Object} Returns the job instance.
|
||||
*/
|
||||
Job.prototype.stop = function(callback) {
|
||||
this.once('stop', _.iteratee(callback));
|
||||
if (this.stopping) {
|
||||
return this;
|
||||
}
|
||||
this.stopping = true;
|
||||
if (this._pollerId) {
|
||||
clearTimeout(this._pollerId);
|
||||
this._pollerId = null;
|
||||
this.checking = false;
|
||||
}
|
||||
var onStop = _.bind(onGenericStop, this);
|
||||
if (!this.running || !this.id) {
|
||||
_.defer(onStop);
|
||||
return this;
|
||||
}
|
||||
request.put(_.template('https://saucelabs.com/rest/v1/${user}/jobs/${id}/stop')(this), {
|
||||
'auth': { 'user': this.user, 'pass': this.pass }
|
||||
}, onStop);
|
||||
|
||||
return this;
|
||||
};
|
||||
|
||||
/*----------------------------------------------------------------------------*/
|
||||
|
||||
/**
|
||||
* The Tunnel constructor.
|
||||
*
|
||||
* @private
|
||||
* @param {Object} [properties] The properties to initialize the tunnel with.
|
||||
*/
|
||||
function Tunnel(properties) {
|
||||
EventEmitter.call(this);
|
||||
|
||||
_.merge(this, properties);
|
||||
|
||||
var active = [],
|
||||
queue = [];
|
||||
|
||||
var all = _.map(this.platforms, _.bind(function(platform) {
|
||||
return new Job(_.merge({
|
||||
'user': this.user,
|
||||
'pass': this.pass,
|
||||
'tunnel': this,
|
||||
'options': { 'platforms': [platform] }
|
||||
}, this.job));
|
||||
}, this));
|
||||
|
||||
var completed = 0,
|
||||
restarted = [],
|
||||
success = true,
|
||||
total = all.length,
|
||||
tunnel = this;
|
||||
|
||||
_.invokeMap(all, 'on', 'complete', function() {
|
||||
_.pull(active, this);
|
||||
if (success) {
|
||||
success = !this.failed;
|
||||
}
|
||||
if (++completed == total) {
|
||||
tunnel.stop(_.partial(tunnel.emit, 'complete', success));
|
||||
return;
|
||||
}
|
||||
tunnel.dequeue();
|
||||
});
|
||||
|
||||
_.invokeMap(all, 'on', 'restart', function() {
|
||||
if (!_.includes(restarted, this)) {
|
||||
restarted.push(this);
|
||||
}
|
||||
// Restart tunnel if all active jobs have restarted.
|
||||
var threshold = Math.min(all.length, _.isFinite(throttled) ? throttled : 3);
|
||||
if (tunnel.attempts < tunnel.retries &&
|
||||
active.length >= threshold && _.isEmpty(_.difference(active, restarted))) {
|
||||
tunnel.restart();
|
||||
}
|
||||
});
|
||||
|
||||
this.on('restart', function() {
|
||||
completed = 0;
|
||||
success = true;
|
||||
restarted.length = 0;
|
||||
});
|
||||
|
||||
this._timeoutId = null;
|
||||
this.attempts = 0;
|
||||
this.restarting = this.running = this.starting = this.stopping = false;
|
||||
this.jobs = { 'active': active, 'all': all, 'queue': queue };
|
||||
this.connection = new SauceTunnel(this.user, this.pass, this.id, this.tunneled, ['-P', '0']);
|
||||
}
|
||||
|
||||
util.inherits(Tunnel, EventEmitter);
|
||||
|
||||
/**
|
||||
* Restarts the tunnel.
|
||||
*
|
||||
* @memberOf Tunnel
|
||||
* @param {Function} callback The function called once the tunnel is restarted.
|
||||
*/
|
||||
Tunnel.prototype.restart = function(callback) {
|
||||
this.once('restart', _.iteratee(callback));
|
||||
if (this.restarting) {
|
||||
return this;
|
||||
}
|
||||
this.restarting = true;
|
||||
|
||||
logInline();
|
||||
console.log('Tunnel %s: restart %d of %d', this.id, ++this.attempts, this.retries);
|
||||
|
||||
var jobs = this.jobs,
|
||||
active = jobs.active,
|
||||
all = jobs.all;
|
||||
|
||||
var reset = _.after(all.length, _.bind(this.stop, this, onGenericRestart)),
|
||||
stop = _.after(active.length, _.partial(_.invokeMap, all, 'reset', reset));
|
||||
|
||||
if (_.isEmpty(active)) {
|
||||
_.defer(stop);
|
||||
}
|
||||
if (_.isEmpty(all)) {
|
||||
_.defer(reset);
|
||||
}
|
||||
_.invokeMap(active, 'stop', function() {
|
||||
_.pull(active, this);
|
||||
stop();
|
||||
});
|
||||
|
||||
if (this._timeoutId) {
|
||||
clearTimeout(this._timeoutId);
|
||||
this._timeoutId = null;
|
||||
}
|
||||
return this;
|
||||
};
|
||||
|
||||
/**
|
||||
* Starts the tunnel.
|
||||
*
|
||||
* @memberOf Tunnel
|
||||
* @param {Function} callback The function called once the tunnel is started.
|
||||
* @param {Object} Returns the tunnel instance.
|
||||
*/
|
||||
Tunnel.prototype.start = function(callback) {
|
||||
this.once('start', _.iteratee(callback));
|
||||
if (this.starting || this.running) {
|
||||
return this;
|
||||
}
|
||||
this.starting = true;
|
||||
|
||||
logInline();
|
||||
console.log('Opening Sauce Connect tunnel...');
|
||||
|
||||
var onStart = _.bind(onTunnelStart, this);
|
||||
if (this.timeout) {
|
||||
this._timeoutId = _.delay(onStart, this.timeout * 1000, false);
|
||||
}
|
||||
this.connection.start(onStart);
|
||||
return this;
|
||||
};
|
||||
|
||||
/**
|
||||
* Removes jobs from the queue and starts them.
|
||||
*
|
||||
* @memberOf Tunnel
|
||||
* @param {Object} Returns the tunnel instance.
|
||||
*/
|
||||
Tunnel.prototype.dequeue = function() {
|
||||
var count = 0,
|
||||
jobs = this.jobs,
|
||||
active = jobs.active,
|
||||
queue = jobs.queue,
|
||||
throttled = this.throttled;
|
||||
|
||||
while (queue.length && (active.length < throttled)) {
|
||||
var job = queue.shift();
|
||||
active.push(job);
|
||||
_.delay(_.bind(job.start, job), ++count * 1000);
|
||||
}
|
||||
return this;
|
||||
};
|
||||
|
||||
/**
|
||||
* Stops the tunnel.
|
||||
*
|
||||
* @memberOf Tunnel
|
||||
* @param {Function} callback The function called once the tunnel is stopped.
|
||||
* @param {Object} Returns the tunnel instance.
|
||||
*/
|
||||
Tunnel.prototype.stop = function(callback) {
|
||||
this.once('stop', _.iteratee(callback));
|
||||
if (this.stopping) {
|
||||
return this;
|
||||
}
|
||||
this.stopping = true;
|
||||
|
||||
logInline();
|
||||
console.log('Shutting down Sauce Connect tunnel...');
|
||||
|
||||
var jobs = this.jobs,
|
||||
active = jobs.active;
|
||||
|
||||
var stop = _.after(active.length, _.bind(function() {
|
||||
var onStop = _.bind(onGenericStop, this);
|
||||
if (this.running) {
|
||||
this.connection.stop(onStop);
|
||||
} else {
|
||||
onStop();
|
||||
}
|
||||
}, this));
|
||||
|
||||
jobs.queue.length = 0;
|
||||
if (_.isEmpty(active)) {
|
||||
_.defer(stop);
|
||||
}
|
||||
_.invokeMap(active, 'stop', function() {
|
||||
_.pull(active, this);
|
||||
stop();
|
||||
});
|
||||
|
||||
if (this._timeoutId) {
|
||||
clearTimeout(this._timeoutId);
|
||||
this._timeoutId = null;
|
||||
}
|
||||
return this;
|
||||
};
|
||||
|
||||
/*----------------------------------------------------------------------------*/
|
||||
|
||||
// Cleanup any inline logs when exited via `ctrl+c`.
|
||||
process.on('SIGINT', function() {
|
||||
logInline();
|
||||
process.exit();
|
||||
});
|
||||
|
||||
// Create a web server for the current working directory.
|
||||
http.createServer(function(req, res) {
|
||||
// See http://msdn.microsoft.com/en-us/library/ff955275(v=vs.85).aspx.
|
||||
if (compatMode && path.extname(url.parse(req.url).pathname) == '.html') {
|
||||
res.setHeader('X-UA-Compatible', 'IE=' + compatMode);
|
||||
}
|
||||
mount(req, res);
|
||||
}).listen(port);
|
||||
|
||||
// Setup Sauce Connect so we can use this server from Sauce Labs.
|
||||
var tunnel = new Tunnel({
|
||||
'user': username,
|
||||
'pass': accessKey,
|
||||
'id': tunnelId,
|
||||
'job': { 'retries': maxJobRetries, 'statusInterval': statusInterval },
|
||||
'platforms': platforms,
|
||||
'retries': maxTunnelRetries,
|
||||
'throttled': throttled,
|
||||
'tunneled': tunneled,
|
||||
'timeout': tunnelTimeout
|
||||
});
|
||||
|
||||
tunnel.on('complete', function(success) {
|
||||
process.exit(success ? 0 : 1);
|
||||
});
|
||||
|
||||
tunnel.start();
|
||||
|
||||
setInterval(logThrobber, throbberDelay);
|
||||
|
|
@ -1,460 +0,0 @@
|
|||
<!doctype html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>Underscore Test Suite</title>
|
||||
<link rel="stylesheet" href="../node_modules/qunitjs/qunit/qunit.css">
|
||||
</head>
|
||||
<body>
|
||||
<div id="qunit"></div>
|
||||
<script>
|
||||
// Avoid reporting tests to Sauce Labs when script errors occur.
|
||||
if (location.port == '9001') {
|
||||
window.onerror = function(message) {
|
||||
if (window.QUnit) {
|
||||
QUnit.config.done.length = 0;
|
||||
}
|
||||
global_test_results = { 'message': message };
|
||||
};
|
||||
}
|
||||
</script>
|
||||
<script src="../node_modules/qunitjs/qunit/qunit.js"></script>
|
||||
<script src="../node_modules/qunit-extras/qunit-extras.js"></script>
|
||||
<script src="../node_modules/jquery/dist/jquery.js"></script>
|
||||
<script src="../node_modules/platform/platform.js"></script>
|
||||
<script src="./asset/test-ui.js"></script>
|
||||
<script src="../lodash.js"></script>
|
||||
<script>
|
||||
QUnit.config.asyncRetries = 10;
|
||||
QUnit.config.hidepassed = true;
|
||||
QUnit.config.excused = {
|
||||
'Arrays': {
|
||||
'chunk': [
|
||||
'defaults to empty array (chunk size 0)'
|
||||
],
|
||||
'difference': [
|
||||
'can perform an OO-style difference'
|
||||
],
|
||||
'drop': [
|
||||
'is an alias for rest'
|
||||
],
|
||||
'first': [
|
||||
'returns an empty array when n <= 0 (0 case)',
|
||||
'returns an empty array when n <= 0 (negative case)',
|
||||
'can fetch the first n elements',
|
||||
'returns the whole array if n > length'
|
||||
],
|
||||
'findIndex': [
|
||||
'called with context'
|
||||
],
|
||||
'findLastIndex': [
|
||||
'called with context'
|
||||
],
|
||||
'flatten': [
|
||||
'supports empty arrays',
|
||||
'can flatten nested arrays',
|
||||
'works on an arguments object',
|
||||
'can handle very deep arrays'
|
||||
],
|
||||
'indexOf': [
|
||||
"sorted indexOf doesn't uses binary search",
|
||||
'0'
|
||||
],
|
||||
'initial': [
|
||||
'returns all but the last n elements',
|
||||
'returns an empty array when n > length',
|
||||
'works on an arguments object'
|
||||
],
|
||||
'intersection': [
|
||||
'can perform an OO-style intersection'
|
||||
],
|
||||
'last': [
|
||||
'returns an empty array when n <= 0 (0 case)',
|
||||
'returns an empty array when n <= 0 (negative case)',
|
||||
'can fetch the last n elements',
|
||||
'returns the whole array if n > length'
|
||||
],
|
||||
'lastIndexOf': [
|
||||
'should treat falsey `fromIndex` values, except `0` and `NaN`, as `array.length`',
|
||||
'should treat non-number `fromIndex` values as `array.length`',
|
||||
'[0,-1,-1]'
|
||||
],
|
||||
'object': [
|
||||
'an array of pairs zipped together into an object',
|
||||
'an object converted to pairs and back to an object'
|
||||
],
|
||||
'rest': [
|
||||
'returns the whole array when index is 0',
|
||||
'returns elements starting at the given index',
|
||||
'works on an arguments object'
|
||||
],
|
||||
'sortedIndex': [
|
||||
'2',
|
||||
'3'
|
||||
],
|
||||
'tail': [
|
||||
'is an alias for rest'
|
||||
],
|
||||
'take': [
|
||||
'is an alias for first'
|
||||
],
|
||||
'uniq': [
|
||||
'uses the result of `iterator` for uniqueness comparisons (unsorted case)',
|
||||
'`sorted` argument defaults to false when omitted',
|
||||
'when `iterator` is a string, uses that key for comparisons (unsorted case)',
|
||||
'uses the result of `iterator` for uniqueness comparisons (sorted case)',
|
||||
'when `iterator` is a string, uses that key for comparisons (sorted case)',
|
||||
'can use falsey pluck like iterator'
|
||||
],
|
||||
'union': [
|
||||
'can perform an OO-style union'
|
||||
]
|
||||
},
|
||||
'Chaining': {
|
||||
'pop': true,
|
||||
'shift': true,
|
||||
'splice': true,
|
||||
'reverse/concat/unshift/pop/map': [
|
||||
'can chain together array functions.'
|
||||
]
|
||||
},
|
||||
'Collections': {
|
||||
'lookupIterator with contexts': true,
|
||||
'Iterating objects with sketchy length properties': true,
|
||||
'Resistant to collection length and properties changing while iterating': true,
|
||||
'countBy': [
|
||||
'{}',
|
||||
'[{}]'
|
||||
],
|
||||
'each': [
|
||||
'context object property accessed'
|
||||
],
|
||||
'every': [
|
||||
'Can be called with object',
|
||||
'Died on test #15',
|
||||
'context works'
|
||||
],
|
||||
'filter': [
|
||||
'given context',
|
||||
'OO-filter'
|
||||
],
|
||||
'find': [
|
||||
'called with context'
|
||||
],
|
||||
'findWhere': [
|
||||
'checks properties given function'
|
||||
],
|
||||
'groupBy': [
|
||||
'{}',
|
||||
'[{}]'
|
||||
],
|
||||
'includes': [
|
||||
"doesn't delegate to binary search"
|
||||
],
|
||||
'invoke': [
|
||||
'handles null & undefined'
|
||||
],
|
||||
'map': [
|
||||
'tripled numbers with context',
|
||||
'OO-style doubled numbers'
|
||||
],
|
||||
'max': [
|
||||
'can handle null/undefined',
|
||||
'can perform a computation-based max',
|
||||
'Maximum value of an empty object',
|
||||
'Maximum value of an empty array',
|
||||
'Maximum value of a non-numeric collection',
|
||||
'Finds correct max in array starting with num and containing a NaN',
|
||||
'Finds correct max in array starting with NaN',
|
||||
'Respects iterator return value of -Infinity',
|
||||
'String keys use property iterator',
|
||||
'Iterator context',
|
||||
'Lookup falsy iterator'
|
||||
],
|
||||
'min': [
|
||||
'can handle null/undefined',
|
||||
'can perform a computation-based min',
|
||||
'Minimum value of an empty object',
|
||||
'Minimum value of an empty array',
|
||||
'Minimum value of a non-numeric collection',
|
||||
'Finds correct min in array starting with NaN',
|
||||
'Respects iterator return value of Infinity',
|
||||
'String keys use property iterator',
|
||||
'Iterator context',
|
||||
'Lookup falsy iterator'
|
||||
],
|
||||
'partition': [
|
||||
'can reference the array index',
|
||||
'Died on test #8',
|
||||
'partition takes a context argument'
|
||||
],
|
||||
'pluck': [
|
||||
'[1]'
|
||||
],
|
||||
'reduce': [
|
||||
'can reduce with a context object'
|
||||
],
|
||||
'reject': [
|
||||
'Returns empty list given empty array'
|
||||
],
|
||||
'sample': [
|
||||
'behaves correctly on negative n',
|
||||
'Died on test #3'
|
||||
],
|
||||
'some': [
|
||||
'Can be called with object',
|
||||
'Died on test #17',
|
||||
'context works'
|
||||
],
|
||||
'where': [
|
||||
'checks properties given function'
|
||||
],
|
||||
'Can use various collection methods on NodeLists': [
|
||||
'<span id="id2"></span>'
|
||||
]
|
||||
},
|
||||
'Functions': {
|
||||
'debounce asap': true,
|
||||
'debounce asap cancel': true,
|
||||
'debounce asap recursively': true,
|
||||
'debounce after system time is set backwards': true,
|
||||
'debounce re-entrant': true,
|
||||
'throttle repeatedly with results': true,
|
||||
'more throttle does not trigger leading call when leading is set to false': true,
|
||||
'throttle does not trigger trailing call when trailing is set to false': true,
|
||||
'before': [
|
||||
'stores a memo to the last value',
|
||||
'provides context'
|
||||
],
|
||||
'bind': [
|
||||
'Died on test #2'
|
||||
],
|
||||
'bindAll': [
|
||||
'throws an error for bindAll with no functions named'
|
||||
],
|
||||
'debounce': [
|
||||
'incr was debounced'
|
||||
],
|
||||
'iteratee': [
|
||||
'"bbiz"',
|
||||
'"foo"',
|
||||
'1'
|
||||
],
|
||||
'memoize': [
|
||||
'{"bar":"BAR","foo":"FOO"}',
|
||||
'Died on test #8'
|
||||
]
|
||||
},
|
||||
'Objects': {
|
||||
'#1929 Typed Array constructors are functions': true,
|
||||
'allKeys': [
|
||||
'is not fooled by sparse arrays; see issue #95',
|
||||
'is not fooled by sparse arrays with additional properties',
|
||||
'[]'
|
||||
],
|
||||
'extend': [
|
||||
'extending null results in null',
|
||||
'extending undefined results in undefined'
|
||||
],
|
||||
'extendOwn': [
|
||||
'extending non-objects results in returning the non-object value',
|
||||
'extending undefined results in undefined'
|
||||
],
|
||||
'functions': [
|
||||
'also looks up functions on the prototype'
|
||||
],
|
||||
'isEqual': [
|
||||
'`0` is not equal to `-0`',
|
||||
'Commutative equality is implemented for `0` and `-0`',
|
||||
'`new Number(0)` and `-0` are not equal',
|
||||
'Commutative equality is implemented for `new Number(0)` and `-0`',
|
||||
'Invalid dates are not equal',
|
||||
'false'
|
||||
],
|
||||
'isFinite': [
|
||||
'Numeric strings are numbers',
|
||||
'Number instances can be finite'
|
||||
],
|
||||
'isSet': [
|
||||
'Died on test #9'
|
||||
],
|
||||
'findKey': [
|
||||
'called with context'
|
||||
],
|
||||
'keys': [
|
||||
'is not fooled by sparse arrays; see issue #95',
|
||||
'[]'
|
||||
],
|
||||
'mapObject': [
|
||||
'keep context',
|
||||
'called with context',
|
||||
'mapValue identity'
|
||||
],
|
||||
'omit': [
|
||||
'can accept a predicate',
|
||||
'function is given context'
|
||||
],
|
||||
'pick': [
|
||||
'can accept a predicate and context',
|
||||
'function is given context'
|
||||
]
|
||||
},
|
||||
'Utility': {
|
||||
'now': [
|
||||
'Produces the correct time in milliseconds'
|
||||
],
|
||||
'times': [
|
||||
'works as a wrapper'
|
||||
]
|
||||
}
|
||||
};
|
||||
|
||||
var mixinPrereqs = (function() {
|
||||
var aliasToReal = {
|
||||
'all': 'every',
|
||||
'allKeys': 'keysIn',
|
||||
'any': 'some',
|
||||
'collect': 'map',
|
||||
'compose': 'flowRight',
|
||||
'contains': 'includes',
|
||||
'detect': 'find',
|
||||
'extendOwn': 'assign',
|
||||
'findWhere': 'find',
|
||||
'foldl': 'reduce',
|
||||
'foldr': 'reduceRight',
|
||||
'include': 'includes',
|
||||
'indexBy': 'keyBy',
|
||||
'inject': 'reduce',
|
||||
'invoke': 'invokeMap',
|
||||
'mapObject': 'mapValues',
|
||||
'matcher': 'matches',
|
||||
'methods': 'functions',
|
||||
'object': 'zipObject',
|
||||
'pairs': 'toPairs',
|
||||
'pluck': 'map',
|
||||
'restParam': 'restArgs',
|
||||
'select': 'filter',
|
||||
'unique': 'uniq',
|
||||
'where': 'filter'
|
||||
};
|
||||
|
||||
var keyMap = {
|
||||
'rest': 'tail',
|
||||
'restArgs': 'rest'
|
||||
};
|
||||
|
||||
var lodash = _.noConflict();
|
||||
|
||||
return function(_) {
|
||||
lodash.defaultsDeep(_, { 'templateSettings': lodash.templateSettings });
|
||||
lodash.mixin(_, lodash.pick(lodash, lodash.difference(lodash.functions(lodash), lodash.functions(_))));
|
||||
|
||||
lodash.forOwn(keyMap, function(realName, otherName) {
|
||||
_[otherName] = lodash[realName];
|
||||
_.prototype[otherName] = lodash.prototype[realName];
|
||||
});
|
||||
|
||||
lodash.forOwn(aliasToReal, function(realName, alias) {
|
||||
_[alias] = _[realName];
|
||||
_.prototype[alias] = _.prototype[realName];
|
||||
});
|
||||
};
|
||||
}());
|
||||
|
||||
// Only excuse in Sauce Labs.
|
||||
if (!ui.isSauceLabs) {
|
||||
delete QUnit.config.excused.Functions['throttle does not trigger trailing call when trailing is set to false'];
|
||||
delete QUnit.config.excused.Utility.now;
|
||||
}
|
||||
// Load prerequisite scripts.
|
||||
document.write(ui.urlParams.loader == 'none'
|
||||
? '<script src="' + ui.buildPath + '"><\/script>'
|
||||
: '<script data-dojo-config="async:1" src="' + ui.loaderPath + '"><\/script>'
|
||||
);
|
||||
</script>
|
||||
<script>
|
||||
if (ui.urlParams.loader == 'none') {
|
||||
mixinPrereqs(_);
|
||||
document.write([
|
||||
'<script src="../vendor/underscore/test/collections.js"><\/script>',
|
||||
'<script src="../vendor/underscore/test/arrays.js"><\/script>',
|
||||
'<script src="../vendor/underscore/test/functions.js"><\/script>',
|
||||
'<script src="../vendor/underscore/test/objects.js"><\/script>',
|
||||
'<script src="../vendor/underscore/test/cross-document.js"><\/script>',
|
||||
'<script src="../vendor/underscore/test/utility.js"><\/script>',
|
||||
'<script src="../vendor/underscore/test/chaining.js"><\/script>'
|
||||
].join('\n'));
|
||||
}
|
||||
</script>
|
||||
<script>
|
||||
(function() {
|
||||
if (window.curl) {
|
||||
curl.config({ 'apiName': 'require' });
|
||||
}
|
||||
if (!window.require) {
|
||||
return;
|
||||
}
|
||||
// Wrap to work around tests assuming Node `require` use.
|
||||
require = (function(func) {
|
||||
return function() {
|
||||
return arguments[0] === '..' ? window._ : func.apply(null, arguments);
|
||||
};
|
||||
}(require));
|
||||
|
||||
var reBasename = /[\w.-]+$/,
|
||||
basePath = ('//' + location.host + location.pathname.replace(reBasename, '')).replace(/\btest\/$/, ''),
|
||||
modulePath = ui.buildPath.replace(/\.js$/, ''),
|
||||
locationPath = modulePath.replace(reBasename, '').replace(/^\/|\/$/g, ''),
|
||||
moduleId = /\bunderscore\b/i.test(ui.buildPath) ? 'underscore' : 'lodash',
|
||||
moduleMain = modulePath.match(reBasename)[0],
|
||||
uid = +new Date;
|
||||
|
||||
function getConfig() {
|
||||
var result = {
|
||||
'baseUrl': './',
|
||||
'urlArgs': 't=' + uid++,
|
||||
'waitSeconds': 0,
|
||||
'paths': {},
|
||||
'packages': [{
|
||||
'name': 'test',
|
||||
'location': '../vendor/underscore/test',
|
||||
'config': {
|
||||
// Work around no global being exported.
|
||||
'exports': 'QUnit',
|
||||
'loader': 'curl/loader/legacy'
|
||||
}
|
||||
}]
|
||||
};
|
||||
|
||||
if (ui.isModularize) {
|
||||
result.packages.push({
|
||||
'name': moduleId,
|
||||
'location': locationPath,
|
||||
'main': moduleMain
|
||||
});
|
||||
} else {
|
||||
result.paths[moduleId] = modulePath;
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
QUnit.config.autostart = false;
|
||||
|
||||
require(getConfig(), [moduleId], function(lodash) {
|
||||
mixinPrereqs(lodash);
|
||||
require(getConfig(), [
|
||||
'test/collections',
|
||||
'test/arrays',
|
||||
'test/functions',
|
||||
'test/objects',
|
||||
'test/cross-document',
|
||||
'test/utility',
|
||||
'test/chaining'
|
||||
], function() {
|
||||
QUnit.start();
|
||||
});
|
||||
});
|
||||
}());
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
|
|
@ -1,22 +0,0 @@
|
|||
Copyright (c) 2010-2016 Jeremy Ashkenas, DocumentCloud
|
||||
|
||||
Permission is hereby granted, free of charge, to any person
|
||||
obtaining a copy of this software and associated documentation
|
||||
files (the "Software"), to deal in the Software without
|
||||
restriction, including without limitation the rights to use,
|
||||
copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the
|
||||
Software is furnished to do so, subject to the following
|
||||
conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be
|
||||
included in all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
|
||||
OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
|
||||
HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
||||
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
||||
OTHER DEALINGS IN THE SOFTWARE.
|
||||
|
|
@ -1,706 +0,0 @@
|
|||
(function(QUnit) {
|
||||
|
||||
QUnit.module('Backbone.Events');
|
||||
|
||||
QUnit.test('on and trigger', function(assert) {
|
||||
assert.expect(2);
|
||||
var obj = {counter: 0};
|
||||
_.extend(obj, Backbone.Events);
|
||||
obj.on('event', function() { obj.counter += 1; });
|
||||
obj.trigger('event');
|
||||
assert.equal(obj.counter, 1, 'counter should be incremented.');
|
||||
obj.trigger('event');
|
||||
obj.trigger('event');
|
||||
obj.trigger('event');
|
||||
obj.trigger('event');
|
||||
assert.equal(obj.counter, 5, 'counter should be incremented five times.');
|
||||
});
|
||||
|
||||
QUnit.test('binding and triggering multiple events', function(assert) {
|
||||
assert.expect(4);
|
||||
var obj = {counter: 0};
|
||||
_.extend(obj, Backbone.Events);
|
||||
|
||||
obj.on('a b c', function() { obj.counter += 1; });
|
||||
|
||||
obj.trigger('a');
|
||||
assert.equal(obj.counter, 1);
|
||||
|
||||
obj.trigger('a b');
|
||||
assert.equal(obj.counter, 3);
|
||||
|
||||
obj.trigger('c');
|
||||
assert.equal(obj.counter, 4);
|
||||
|
||||
obj.off('a c');
|
||||
obj.trigger('a b c');
|
||||
assert.equal(obj.counter, 5);
|
||||
});
|
||||
|
||||
QUnit.test('binding and triggering with event maps', function(assert) {
|
||||
var obj = {counter: 0};
|
||||
_.extend(obj, Backbone.Events);
|
||||
|
||||
var increment = function() {
|
||||
this.counter += 1;
|
||||
};
|
||||
|
||||
obj.on({
|
||||
a: increment,
|
||||
b: increment,
|
||||
c: increment
|
||||
}, obj);
|
||||
|
||||
obj.trigger('a');
|
||||
assert.equal(obj.counter, 1);
|
||||
|
||||
obj.trigger('a b');
|
||||
assert.equal(obj.counter, 3);
|
||||
|
||||
obj.trigger('c');
|
||||
assert.equal(obj.counter, 4);
|
||||
|
||||
obj.off({
|
||||
a: increment,
|
||||
c: increment
|
||||
}, obj);
|
||||
obj.trigger('a b c');
|
||||
assert.equal(obj.counter, 5);
|
||||
});
|
||||
|
||||
QUnit.test('binding and triggering multiple event names with event maps', function(assert) {
|
||||
var obj = {counter: 0};
|
||||
_.extend(obj, Backbone.Events);
|
||||
|
||||
var increment = function() {
|
||||
this.counter += 1;
|
||||
};
|
||||
|
||||
obj.on({
|
||||
'a b c': increment
|
||||
});
|
||||
|
||||
obj.trigger('a');
|
||||
assert.equal(obj.counter, 1);
|
||||
|
||||
obj.trigger('a b');
|
||||
assert.equal(obj.counter, 3);
|
||||
|
||||
obj.trigger('c');
|
||||
assert.equal(obj.counter, 4);
|
||||
|
||||
obj.off({
|
||||
'a c': increment
|
||||
});
|
||||
obj.trigger('a b c');
|
||||
assert.equal(obj.counter, 5);
|
||||
});
|
||||
|
||||
QUnit.test('binding and trigger with event maps context', function(assert) {
|
||||
assert.expect(2);
|
||||
var obj = {counter: 0};
|
||||
var context = {};
|
||||
_.extend(obj, Backbone.Events);
|
||||
|
||||
obj.on({
|
||||
a: function() {
|
||||
assert.strictEqual(this, context, 'defaults `context` to `callback` param');
|
||||
}
|
||||
}, context).trigger('a');
|
||||
|
||||
obj.off().on({
|
||||
a: function() {
|
||||
assert.strictEqual(this, context, 'will not override explicit `context` param');
|
||||
}
|
||||
}, this, context).trigger('a');
|
||||
});
|
||||
|
||||
QUnit.test('listenTo and stopListening', function(assert) {
|
||||
assert.expect(1);
|
||||
var a = _.extend({}, Backbone.Events);
|
||||
var b = _.extend({}, Backbone.Events);
|
||||
a.listenTo(b, 'all', function(){ assert.ok(true); });
|
||||
b.trigger('anything');
|
||||
a.listenTo(b, 'all', function(){ assert.ok(false); });
|
||||
a.stopListening();
|
||||
b.trigger('anything');
|
||||
});
|
||||
|
||||
QUnit.test('listenTo and stopListening with event maps', function(assert) {
|
||||
assert.expect(4);
|
||||
var a = _.extend({}, Backbone.Events);
|
||||
var b = _.extend({}, Backbone.Events);
|
||||
var cb = function(){ assert.ok(true); };
|
||||
a.listenTo(b, {event: cb});
|
||||
b.trigger('event');
|
||||
a.listenTo(b, {event2: cb});
|
||||
b.on('event2', cb);
|
||||
a.stopListening(b, {event2: cb});
|
||||
b.trigger('event event2');
|
||||
a.stopListening();
|
||||
b.trigger('event event2');
|
||||
});
|
||||
|
||||
QUnit.test('stopListening with omitted args', function(assert) {
|
||||
assert.expect(2);
|
||||
var a = _.extend({}, Backbone.Events);
|
||||
var b = _.extend({}, Backbone.Events);
|
||||
var cb = function() { assert.ok(true); };
|
||||
a.listenTo(b, 'event', cb);
|
||||
b.on('event', cb);
|
||||
a.listenTo(b, 'event2', cb);
|
||||
a.stopListening(null, {event: cb});
|
||||
b.trigger('event event2');
|
||||
b.off();
|
||||
a.listenTo(b, 'event event2', cb);
|
||||
a.stopListening(null, 'event');
|
||||
a.stopListening();
|
||||
b.trigger('event2');
|
||||
});
|
||||
|
||||
QUnit.test('listenToOnce', function(assert) {
|
||||
assert.expect(2);
|
||||
// Same as the previous test, but we use once rather than having to explicitly unbind
|
||||
var obj = {counterA: 0, counterB: 0};
|
||||
_.extend(obj, Backbone.Events);
|
||||
var incrA = function(){ obj.counterA += 1; obj.trigger('event'); };
|
||||
var incrB = function(){ obj.counterB += 1; };
|
||||
obj.listenToOnce(obj, 'event', incrA);
|
||||
obj.listenToOnce(obj, 'event', incrB);
|
||||
obj.trigger('event');
|
||||
assert.equal(obj.counterA, 1, 'counterA should have only been incremented once.');
|
||||
assert.equal(obj.counterB, 1, 'counterB should have only been incremented once.');
|
||||
});
|
||||
|
||||
QUnit.test('listenToOnce and stopListening', function(assert) {
|
||||
assert.expect(1);
|
||||
var a = _.extend({}, Backbone.Events);
|
||||
var b = _.extend({}, Backbone.Events);
|
||||
a.listenToOnce(b, 'all', function() { assert.ok(true); });
|
||||
b.trigger('anything');
|
||||
b.trigger('anything');
|
||||
a.listenToOnce(b, 'all', function() { assert.ok(false); });
|
||||
a.stopListening();
|
||||
b.trigger('anything');
|
||||
});
|
||||
|
||||
QUnit.test('listenTo, listenToOnce and stopListening', function(assert) {
|
||||
assert.expect(1);
|
||||
var a = _.extend({}, Backbone.Events);
|
||||
var b = _.extend({}, Backbone.Events);
|
||||
a.listenToOnce(b, 'all', function() { assert.ok(true); });
|
||||
b.trigger('anything');
|
||||
b.trigger('anything');
|
||||
a.listenTo(b, 'all', function() { assert.ok(false); });
|
||||
a.stopListening();
|
||||
b.trigger('anything');
|
||||
});
|
||||
|
||||
QUnit.test('listenTo and stopListening with event maps', function(assert) {
|
||||
assert.expect(1);
|
||||
var a = _.extend({}, Backbone.Events);
|
||||
var b = _.extend({}, Backbone.Events);
|
||||
a.listenTo(b, {change: function(){ assert.ok(true); }});
|
||||
b.trigger('change');
|
||||
a.listenTo(b, {change: function(){ assert.ok(false); }});
|
||||
a.stopListening();
|
||||
b.trigger('change');
|
||||
});
|
||||
|
||||
QUnit.test('listenTo yourself', function(assert) {
|
||||
assert.expect(1);
|
||||
var e = _.extend({}, Backbone.Events);
|
||||
e.listenTo(e, 'foo', function(){ assert.ok(true); });
|
||||
e.trigger('foo');
|
||||
});
|
||||
|
||||
QUnit.test('listenTo yourself cleans yourself up with stopListening', function(assert) {
|
||||
assert.expect(1);
|
||||
var e = _.extend({}, Backbone.Events);
|
||||
e.listenTo(e, 'foo', function(){ assert.ok(true); });
|
||||
e.trigger('foo');
|
||||
e.stopListening();
|
||||
e.trigger('foo');
|
||||
});
|
||||
|
||||
QUnit.test('stopListening cleans up references', function(assert) {
|
||||
assert.expect(12);
|
||||
var a = _.extend({}, Backbone.Events);
|
||||
var b = _.extend({}, Backbone.Events);
|
||||
var fn = function() {};
|
||||
b.on('event', fn);
|
||||
a.listenTo(b, 'event', fn).stopListening();
|
||||
assert.equal(_.size(a._listeningTo), 0);
|
||||
assert.equal(_.size(b._events.event), 1);
|
||||
assert.equal(_.size(b._listeners), 0);
|
||||
a.listenTo(b, 'event', fn).stopListening(b);
|
||||
assert.equal(_.size(a._listeningTo), 0);
|
||||
assert.equal(_.size(b._events.event), 1);
|
||||
assert.equal(_.size(b._listeners), 0);
|
||||
a.listenTo(b, 'event', fn).stopListening(b, 'event');
|
||||
assert.equal(_.size(a._listeningTo), 0);
|
||||
assert.equal(_.size(b._events.event), 1);
|
||||
assert.equal(_.size(b._listeners), 0);
|
||||
a.listenTo(b, 'event', fn).stopListening(b, 'event', fn);
|
||||
assert.equal(_.size(a._listeningTo), 0);
|
||||
assert.equal(_.size(b._events.event), 1);
|
||||
assert.equal(_.size(b._listeners), 0);
|
||||
});
|
||||
|
||||
QUnit.test('stopListening cleans up references from listenToOnce', function(assert) {
|
||||
assert.expect(12);
|
||||
var a = _.extend({}, Backbone.Events);
|
||||
var b = _.extend({}, Backbone.Events);
|
||||
var fn = function() {};
|
||||
b.on('event', fn);
|
||||
a.listenToOnce(b, 'event', fn).stopListening();
|
||||
assert.equal(_.size(a._listeningTo), 0);
|
||||
assert.equal(_.size(b._events.event), 1);
|
||||
assert.equal(_.size(b._listeners), 0);
|
||||
a.listenToOnce(b, 'event', fn).stopListening(b);
|
||||
assert.equal(_.size(a._listeningTo), 0);
|
||||
assert.equal(_.size(b._events.event), 1);
|
||||
assert.equal(_.size(b._listeners), 0);
|
||||
a.listenToOnce(b, 'event', fn).stopListening(b, 'event');
|
||||
assert.equal(_.size(a._listeningTo), 0);
|
||||
assert.equal(_.size(b._events.event), 1);
|
||||
assert.equal(_.size(b._listeners), 0);
|
||||
a.listenToOnce(b, 'event', fn).stopListening(b, 'event', fn);
|
||||
assert.equal(_.size(a._listeningTo), 0);
|
||||
assert.equal(_.size(b._events.event), 1);
|
||||
assert.equal(_.size(b._listeners), 0);
|
||||
});
|
||||
|
||||
QUnit.test('listenTo and off cleaning up references', function(assert) {
|
||||
assert.expect(8);
|
||||
var a = _.extend({}, Backbone.Events);
|
||||
var b = _.extend({}, Backbone.Events);
|
||||
var fn = function() {};
|
||||
a.listenTo(b, 'event', fn);
|
||||
b.off();
|
||||
assert.equal(_.size(a._listeningTo), 0);
|
||||
assert.equal(_.size(b._listeners), 0);
|
||||
a.listenTo(b, 'event', fn);
|
||||
b.off('event');
|
||||
assert.equal(_.size(a._listeningTo), 0);
|
||||
assert.equal(_.size(b._listeners), 0);
|
||||
a.listenTo(b, 'event', fn);
|
||||
b.off(null, fn);
|
||||
assert.equal(_.size(a._listeningTo), 0);
|
||||
assert.equal(_.size(b._listeners), 0);
|
||||
a.listenTo(b, 'event', fn);
|
||||
b.off(null, null, a);
|
||||
assert.equal(_.size(a._listeningTo), 0);
|
||||
assert.equal(_.size(b._listeners), 0);
|
||||
});
|
||||
|
||||
QUnit.test('listenTo and stopListening cleaning up references', function(assert) {
|
||||
assert.expect(2);
|
||||
var a = _.extend({}, Backbone.Events);
|
||||
var b = _.extend({}, Backbone.Events);
|
||||
a.listenTo(b, 'all', function(){ assert.ok(true); });
|
||||
b.trigger('anything');
|
||||
a.listenTo(b, 'other', function(){ assert.ok(false); });
|
||||
a.stopListening(b, 'other');
|
||||
a.stopListening(b, 'all');
|
||||
assert.equal(_.size(a._listeningTo), 0);
|
||||
});
|
||||
|
||||
QUnit.test('listenToOnce without context cleans up references after the event has fired', function(assert) {
|
||||
assert.expect(2);
|
||||
var a = _.extend({}, Backbone.Events);
|
||||
var b = _.extend({}, Backbone.Events);
|
||||
a.listenToOnce(b, 'all', function(){ assert.ok(true); });
|
||||
b.trigger('anything');
|
||||
assert.equal(_.size(a._listeningTo), 0);
|
||||
});
|
||||
|
||||
QUnit.test('listenToOnce with event maps cleans up references', function(assert) {
|
||||
assert.expect(2);
|
||||
var a = _.extend({}, Backbone.Events);
|
||||
var b = _.extend({}, Backbone.Events);
|
||||
a.listenToOnce(b, {
|
||||
one: function() { assert.ok(true); },
|
||||
two: function() { assert.ok(false); }
|
||||
});
|
||||
b.trigger('one');
|
||||
assert.equal(_.size(a._listeningTo), 1);
|
||||
});
|
||||
|
||||
QUnit.test('listenToOnce with event maps binds the correct `this`', function(assert) {
|
||||
assert.expect(1);
|
||||
var a = _.extend({}, Backbone.Events);
|
||||
var b = _.extend({}, Backbone.Events);
|
||||
a.listenToOnce(b, {
|
||||
one: function() { assert.ok(this === a); },
|
||||
two: function() { assert.ok(false); }
|
||||
});
|
||||
b.trigger('one');
|
||||
});
|
||||
|
||||
QUnit.test("listenTo with empty callback doesn't throw an error", function(assert) {
|
||||
assert.expect(1);
|
||||
var e = _.extend({}, Backbone.Events);
|
||||
e.listenTo(e, 'foo', null);
|
||||
e.trigger('foo');
|
||||
assert.ok(true);
|
||||
});
|
||||
|
||||
QUnit.test('trigger all for each event', function(assert) {
|
||||
assert.expect(3);
|
||||
var a, b, obj = {counter: 0};
|
||||
_.extend(obj, Backbone.Events);
|
||||
obj.on('all', function(event) {
|
||||
obj.counter++;
|
||||
if (event === 'a') a = true;
|
||||
if (event === 'b') b = true;
|
||||
})
|
||||
.trigger('a b');
|
||||
assert.ok(a);
|
||||
assert.ok(b);
|
||||
assert.equal(obj.counter, 2);
|
||||
});
|
||||
|
||||
QUnit.test('on, then unbind all functions', function(assert) {
|
||||
assert.expect(1);
|
||||
var obj = {counter: 0};
|
||||
_.extend(obj, Backbone.Events);
|
||||
var callback = function() { obj.counter += 1; };
|
||||
obj.on('event', callback);
|
||||
obj.trigger('event');
|
||||
obj.off('event');
|
||||
obj.trigger('event');
|
||||
assert.equal(obj.counter, 1, 'counter should have only been incremented once.');
|
||||
});
|
||||
|
||||
QUnit.test('bind two callbacks, unbind only one', function(assert) {
|
||||
assert.expect(2);
|
||||
var obj = {counterA: 0, counterB: 0};
|
||||
_.extend(obj, Backbone.Events);
|
||||
var callback = function() { obj.counterA += 1; };
|
||||
obj.on('event', callback);
|
||||
obj.on('event', function() { obj.counterB += 1; });
|
||||
obj.trigger('event');
|
||||
obj.off('event', callback);
|
||||
obj.trigger('event');
|
||||
assert.equal(obj.counterA, 1, 'counterA should have only been incremented once.');
|
||||
assert.equal(obj.counterB, 2, 'counterB should have been incremented twice.');
|
||||
});
|
||||
|
||||
QUnit.test('unbind a callback in the midst of it firing', function(assert) {
|
||||
assert.expect(1);
|
||||
var obj = {counter: 0};
|
||||
_.extend(obj, Backbone.Events);
|
||||
var callback = function() {
|
||||
obj.counter += 1;
|
||||
obj.off('event', callback);
|
||||
};
|
||||
obj.on('event', callback);
|
||||
obj.trigger('event');
|
||||
obj.trigger('event');
|
||||
obj.trigger('event');
|
||||
assert.equal(obj.counter, 1, 'the callback should have been unbound.');
|
||||
});
|
||||
|
||||
QUnit.test('two binds that unbind themeselves', function(assert) {
|
||||
assert.expect(2);
|
||||
var obj = {counterA: 0, counterB: 0};
|
||||
_.extend(obj, Backbone.Events);
|
||||
var incrA = function(){ obj.counterA += 1; obj.off('event', incrA); };
|
||||
var incrB = function(){ obj.counterB += 1; obj.off('event', incrB); };
|
||||
obj.on('event', incrA);
|
||||
obj.on('event', incrB);
|
||||
obj.trigger('event');
|
||||
obj.trigger('event');
|
||||
obj.trigger('event');
|
||||
assert.equal(obj.counterA, 1, 'counterA should have only been incremented once.');
|
||||
assert.equal(obj.counterB, 1, 'counterB should have only been incremented once.');
|
||||
});
|
||||
|
||||
QUnit.test('bind a callback with a default context when none supplied', function(assert) {
|
||||
assert.expect(1);
|
||||
var obj = _.extend({
|
||||
assertTrue: function() {
|
||||
assert.equal(this, obj, '`this` was bound to the callback');
|
||||
}
|
||||
}, Backbone.Events);
|
||||
|
||||
obj.once('event', obj.assertTrue);
|
||||
obj.trigger('event');
|
||||
});
|
||||
|
||||
QUnit.test('bind a callback with a supplied context', function(assert) {
|
||||
assert.expect(1);
|
||||
var TestClass = function() {
|
||||
return this;
|
||||
};
|
||||
TestClass.prototype.assertTrue = function() {
|
||||
assert.ok(true, '`this` was bound to the callback');
|
||||
};
|
||||
|
||||
var obj = _.extend({}, Backbone.Events);
|
||||
obj.on('event', function() { this.assertTrue(); }, new TestClass);
|
||||
obj.trigger('event');
|
||||
});
|
||||
|
||||
QUnit.test('nested trigger with unbind', function(assert) {
|
||||
assert.expect(1);
|
||||
var obj = {counter: 0};
|
||||
_.extend(obj, Backbone.Events);
|
||||
var incr1 = function(){ obj.counter += 1; obj.off('event', incr1); obj.trigger('event'); };
|
||||
var incr2 = function(){ obj.counter += 1; };
|
||||
obj.on('event', incr1);
|
||||
obj.on('event', incr2);
|
||||
obj.trigger('event');
|
||||
assert.equal(obj.counter, 3, 'counter should have been incremented three times');
|
||||
});
|
||||
|
||||
QUnit.test('callback list is not altered during trigger', function(assert) {
|
||||
assert.expect(2);
|
||||
var counter = 0, obj = _.extend({}, Backbone.Events);
|
||||
var incr = function(){ counter++; };
|
||||
var incrOn = function(){ obj.on('event all', incr); };
|
||||
var incrOff = function(){ obj.off('event all', incr); };
|
||||
|
||||
obj.on('event all', incrOn).trigger('event');
|
||||
assert.equal(counter, 0, 'on does not alter callback list');
|
||||
|
||||
obj.off().on('event', incrOff).on('event all', incr).trigger('event');
|
||||
assert.equal(counter, 2, 'off does not alter callback list');
|
||||
});
|
||||
|
||||
QUnit.test("#1282 - 'all' callback list is retrieved after each event.", function(assert) {
|
||||
assert.expect(1);
|
||||
var counter = 0;
|
||||
var obj = _.extend({}, Backbone.Events);
|
||||
var incr = function(){ counter++; };
|
||||
obj.on('x', function() {
|
||||
obj.on('y', incr).on('all', incr);
|
||||
})
|
||||
.trigger('x y');
|
||||
assert.strictEqual(counter, 2);
|
||||
});
|
||||
|
||||
QUnit.test('if no callback is provided, `on` is a noop', function(assert) {
|
||||
assert.expect(0);
|
||||
_.extend({}, Backbone.Events).on('test').trigger('test');
|
||||
});
|
||||
|
||||
QUnit.test('if callback is truthy but not a function, `on` should throw an error just like jQuery', function(assert) {
|
||||
assert.expect(1);
|
||||
var view = _.extend({}, Backbone.Events).on('test', 'noop');
|
||||
assert.raises(function() {
|
||||
view.trigger('test');
|
||||
});
|
||||
});
|
||||
|
||||
QUnit.test('remove all events for a specific context', function(assert) {
|
||||
assert.expect(4);
|
||||
var obj = _.extend({}, Backbone.Events);
|
||||
obj.on('x y all', function() { assert.ok(true); });
|
||||
obj.on('x y all', function() { assert.ok(false); }, obj);
|
||||
obj.off(null, null, obj);
|
||||
obj.trigger('x y');
|
||||
});
|
||||
|
||||
QUnit.test('remove all events for a specific callback', function(assert) {
|
||||
assert.expect(4);
|
||||
var obj = _.extend({}, Backbone.Events);
|
||||
var success = function() { assert.ok(true); };
|
||||
var fail = function() { assert.ok(false); };
|
||||
obj.on('x y all', success);
|
||||
obj.on('x y all', fail);
|
||||
obj.off(null, fail);
|
||||
obj.trigger('x y');
|
||||
});
|
||||
|
||||
QUnit.test('#1310 - off does not skip consecutive events', function(assert) {
|
||||
assert.expect(0);
|
||||
var obj = _.extend({}, Backbone.Events);
|
||||
obj.on('event', function() { assert.ok(false); }, obj);
|
||||
obj.on('event', function() { assert.ok(false); }, obj);
|
||||
obj.off(null, null, obj);
|
||||
obj.trigger('event');
|
||||
});
|
||||
|
||||
QUnit.test('once', function(assert) {
|
||||
assert.expect(2);
|
||||
// Same as the previous test, but we use once rather than having to explicitly unbind
|
||||
var obj = {counterA: 0, counterB: 0};
|
||||
_.extend(obj, Backbone.Events);
|
||||
var incrA = function(){ obj.counterA += 1; obj.trigger('event'); };
|
||||
var incrB = function(){ obj.counterB += 1; };
|
||||
obj.once('event', incrA);
|
||||
obj.once('event', incrB);
|
||||
obj.trigger('event');
|
||||
assert.equal(obj.counterA, 1, 'counterA should have only been incremented once.');
|
||||
assert.equal(obj.counterB, 1, 'counterB should have only been incremented once.');
|
||||
});
|
||||
|
||||
QUnit.test('once variant one', function(assert) {
|
||||
assert.expect(3);
|
||||
var f = function(){ assert.ok(true); };
|
||||
|
||||
var a = _.extend({}, Backbone.Events).once('event', f);
|
||||
var b = _.extend({}, Backbone.Events).on('event', f);
|
||||
|
||||
a.trigger('event');
|
||||
|
||||
b.trigger('event');
|
||||
b.trigger('event');
|
||||
});
|
||||
|
||||
QUnit.test('once variant two', function(assert) {
|
||||
assert.expect(3);
|
||||
var f = function(){ assert.ok(true); };
|
||||
var obj = _.extend({}, Backbone.Events);
|
||||
|
||||
obj
|
||||
.once('event', f)
|
||||
.on('event', f)
|
||||
.trigger('event')
|
||||
.trigger('event');
|
||||
});
|
||||
|
||||
QUnit.test('once with off', function(assert) {
|
||||
assert.expect(0);
|
||||
var f = function(){ assert.ok(true); };
|
||||
var obj = _.extend({}, Backbone.Events);
|
||||
|
||||
obj.once('event', f);
|
||||
obj.off('event', f);
|
||||
obj.trigger('event');
|
||||
});
|
||||
|
||||
QUnit.test('once with event maps', function(assert) {
|
||||
var obj = {counter: 0};
|
||||
_.extend(obj, Backbone.Events);
|
||||
|
||||
var increment = function() {
|
||||
this.counter += 1;
|
||||
};
|
||||
|
||||
obj.once({
|
||||
a: increment,
|
||||
b: increment,
|
||||
c: increment
|
||||
}, obj);
|
||||
|
||||
obj.trigger('a');
|
||||
assert.equal(obj.counter, 1);
|
||||
|
||||
obj.trigger('a b');
|
||||
assert.equal(obj.counter, 2);
|
||||
|
||||
obj.trigger('c');
|
||||
assert.equal(obj.counter, 3);
|
||||
|
||||
obj.trigger('a b c');
|
||||
assert.equal(obj.counter, 3);
|
||||
});
|
||||
|
||||
QUnit.test('bind a callback with a supplied context using once with object notation', function(assert) {
|
||||
assert.expect(1);
|
||||
var obj = {counter: 0};
|
||||
var context = {};
|
||||
_.extend(obj, Backbone.Events);
|
||||
|
||||
obj.once({
|
||||
a: function() {
|
||||
assert.strictEqual(this, context, 'defaults `context` to `callback` param');
|
||||
}
|
||||
}, context).trigger('a');
|
||||
});
|
||||
|
||||
QUnit.test('once with off only by context', function(assert) {
|
||||
assert.expect(0);
|
||||
var context = {};
|
||||
var obj = _.extend({}, Backbone.Events);
|
||||
obj.once('event', function(){ assert.ok(false); }, context);
|
||||
obj.off(null, null, context);
|
||||
obj.trigger('event');
|
||||
});
|
||||
|
||||
QUnit.test('Backbone object inherits Events', function(assert) {
|
||||
assert.ok(Backbone.on === Backbone.Events.on);
|
||||
});
|
||||
|
||||
QUnit.test('once with asynchronous events', function(assert) {
|
||||
var done = assert.async();
|
||||
assert.expect(1);
|
||||
var func = _.debounce(function() { assert.ok(true); done(); }, 50);
|
||||
var obj = _.extend({}, Backbone.Events).once('async', func);
|
||||
|
||||
obj.trigger('async');
|
||||
obj.trigger('async');
|
||||
});
|
||||
|
||||
QUnit.test('once with multiple events.', function(assert) {
|
||||
assert.expect(2);
|
||||
var obj = _.extend({}, Backbone.Events);
|
||||
obj.once('x y', function() { assert.ok(true); });
|
||||
obj.trigger('x y');
|
||||
});
|
||||
|
||||
QUnit.test('Off during iteration with once.', function(assert) {
|
||||
assert.expect(2);
|
||||
var obj = _.extend({}, Backbone.Events);
|
||||
var f = function(){ this.off('event', f); };
|
||||
obj.on('event', f);
|
||||
obj.once('event', function(){});
|
||||
obj.on('event', function(){ assert.ok(true); });
|
||||
|
||||
obj.trigger('event');
|
||||
obj.trigger('event');
|
||||
});
|
||||
|
||||
QUnit.test('`once` on `all` should work as expected', function(assert) {
|
||||
assert.expect(1);
|
||||
Backbone.once('all', function() {
|
||||
assert.ok(true);
|
||||
Backbone.trigger('all');
|
||||
});
|
||||
Backbone.trigger('all');
|
||||
});
|
||||
|
||||
QUnit.test('once without a callback is a noop', function(assert) {
|
||||
assert.expect(0);
|
||||
_.extend({}, Backbone.Events).once('event').trigger('event');
|
||||
});
|
||||
|
||||
QUnit.test('listenToOnce without a callback is a noop', function(assert) {
|
||||
assert.expect(0);
|
||||
var obj = _.extend({}, Backbone.Events);
|
||||
obj.listenToOnce(obj, 'event').trigger('event');
|
||||
});
|
||||
|
||||
QUnit.test('event functions are chainable', function(assert) {
|
||||
var obj = _.extend({}, Backbone.Events);
|
||||
var obj2 = _.extend({}, Backbone.Events);
|
||||
var fn = function() {};
|
||||
assert.equal(obj, obj.trigger('noeventssetyet'));
|
||||
assert.equal(obj, obj.off('noeventssetyet'));
|
||||
assert.equal(obj, obj.stopListening('noeventssetyet'));
|
||||
assert.equal(obj, obj.on('a', fn));
|
||||
assert.equal(obj, obj.once('c', fn));
|
||||
assert.equal(obj, obj.trigger('a'));
|
||||
assert.equal(obj, obj.listenTo(obj2, 'a', fn));
|
||||
assert.equal(obj, obj.listenToOnce(obj2, 'b', fn));
|
||||
assert.equal(obj, obj.off('a c'));
|
||||
assert.equal(obj, obj.stopListening(obj2, 'a'));
|
||||
assert.equal(obj, obj.stopListening());
|
||||
});
|
||||
|
||||
QUnit.test('#3448 - listenToOnce with space-separated events', function(assert) {
|
||||
assert.expect(2);
|
||||
var one = _.extend({}, Backbone.Events);
|
||||
var two = _.extend({}, Backbone.Events);
|
||||
var count = 1;
|
||||
one.listenToOnce(two, 'x y', function(n) { assert.ok(n === count++); });
|
||||
two.trigger('x', 1);
|
||||
two.trigger('x', 1);
|
||||
two.trigger('y', 2);
|
||||
two.trigger('y', 2);
|
||||
});
|
||||
|
||||
})(QUnit);
|
||||
|
|
@ -1,13 +0,0 @@
|
|||
(function(QUnit) {
|
||||
|
||||
QUnit.module('Backbone.noConflict');
|
||||
|
||||
QUnit.test('noConflict', function(assert) {
|
||||
assert.expect(2);
|
||||
var noconflictBackbone = Backbone.noConflict();
|
||||
assert.equal(window.Backbone, undefined, 'Returned window.Backbone');
|
||||
window.Backbone = noconflictBackbone;
|
||||
assert.equal(window.Backbone, noconflictBackbone, 'Backbone is still pointing to the original Backbone');
|
||||
});
|
||||
|
||||
})(QUnit);
|
||||
|
|
@ -1,4 +0,0 @@
|
|||
$('body').append(
|
||||
'<div id="qunit"></div>' +
|
||||
'<div id="qunit-fixture"></div>'
|
||||
);
|
||||
|
|
@ -1,45 +0,0 @@
|
|||
(function(QUnit) {
|
||||
|
||||
var sync = Backbone.sync;
|
||||
var ajax = Backbone.ajax;
|
||||
var emulateHTTP = Backbone.emulateHTTP;
|
||||
var emulateJSON = Backbone.emulateJSON;
|
||||
var history = window.history;
|
||||
var pushState = history.pushState;
|
||||
var replaceState = history.replaceState;
|
||||
|
||||
QUnit.config.noglobals = true;
|
||||
|
||||
QUnit.testStart(function() {
|
||||
var env = QUnit.config.current.testEnvironment;
|
||||
|
||||
// We never want to actually call these during tests.
|
||||
history.pushState = history.replaceState = function() {};
|
||||
|
||||
// Capture ajax settings for comparison.
|
||||
Backbone.ajax = function(settings) {
|
||||
env.ajaxSettings = settings;
|
||||
};
|
||||
|
||||
// Capture the arguments to Backbone.sync for comparison.
|
||||
Backbone.sync = function(method, model, options) {
|
||||
env.syncArgs = {
|
||||
method: method,
|
||||
model: model,
|
||||
options: options
|
||||
};
|
||||
sync.apply(this, arguments);
|
||||
};
|
||||
|
||||
});
|
||||
|
||||
QUnit.testDone(function() {
|
||||
Backbone.sync = sync;
|
||||
Backbone.ajax = ajax;
|
||||
Backbone.emulateHTTP = emulateHTTP;
|
||||
Backbone.emulateJSON = emulateJSON;
|
||||
history.pushState = pushState;
|
||||
history.replaceState = replaceState;
|
||||
});
|
||||
|
||||
})(QUnit);
|
||||
|
|
@ -1,239 +0,0 @@
|
|||
(function(QUnit) {
|
||||
|
||||
var Library = Backbone.Collection.extend({
|
||||
url: function() { return '/library'; }
|
||||
});
|
||||
var library;
|
||||
|
||||
var attrs = {
|
||||
title: 'The Tempest',
|
||||
author: 'Bill Shakespeare',
|
||||
length: 123
|
||||
};
|
||||
|
||||
QUnit.module('Backbone.sync', {
|
||||
|
||||
beforeEach: function(assert) {
|
||||
library = new Library;
|
||||
library.create(attrs, {wait: false});
|
||||
},
|
||||
|
||||
afterEach: function(assert) {
|
||||
Backbone.emulateHTTP = false;
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
QUnit.test('read', function(assert) {
|
||||
assert.expect(4);
|
||||
library.fetch();
|
||||
assert.equal(this.ajaxSettings.url, '/library');
|
||||
assert.equal(this.ajaxSettings.type, 'GET');
|
||||
assert.equal(this.ajaxSettings.dataType, 'json');
|
||||
assert.ok(_.isEmpty(this.ajaxSettings.data));
|
||||
});
|
||||
|
||||
QUnit.test('passing data', function(assert) {
|
||||
assert.expect(3);
|
||||
library.fetch({data: {a: 'a', one: 1}});
|
||||
assert.equal(this.ajaxSettings.url, '/library');
|
||||
assert.equal(this.ajaxSettings.data.a, 'a');
|
||||
assert.equal(this.ajaxSettings.data.one, 1);
|
||||
});
|
||||
|
||||
QUnit.test('create', function(assert) {
|
||||
assert.expect(6);
|
||||
assert.equal(this.ajaxSettings.url, '/library');
|
||||
assert.equal(this.ajaxSettings.type, 'POST');
|
||||
assert.equal(this.ajaxSettings.dataType, 'json');
|
||||
var data = JSON.parse(this.ajaxSettings.data);
|
||||
assert.equal(data.title, 'The Tempest');
|
||||
assert.equal(data.author, 'Bill Shakespeare');
|
||||
assert.equal(data.length, 123);
|
||||
});
|
||||
|
||||
QUnit.test('update', function(assert) {
|
||||
assert.expect(7);
|
||||
library.first().save({id: '1-the-tempest', author: 'William Shakespeare'});
|
||||
assert.equal(this.ajaxSettings.url, '/library/1-the-tempest');
|
||||
assert.equal(this.ajaxSettings.type, 'PUT');
|
||||
assert.equal(this.ajaxSettings.dataType, 'json');
|
||||
var data = JSON.parse(this.ajaxSettings.data);
|
||||
assert.equal(data.id, '1-the-tempest');
|
||||
assert.equal(data.title, 'The Tempest');
|
||||
assert.equal(data.author, 'William Shakespeare');
|
||||
assert.equal(data.length, 123);
|
||||
});
|
||||
|
||||
QUnit.test('update with emulateHTTP and emulateJSON', function(assert) {
|
||||
assert.expect(7);
|
||||
library.first().save({id: '2-the-tempest', author: 'Tim Shakespeare'}, {
|
||||
emulateHTTP: true,
|
||||
emulateJSON: true
|
||||
});
|
||||
assert.equal(this.ajaxSettings.url, '/library/2-the-tempest');
|
||||
assert.equal(this.ajaxSettings.type, 'POST');
|
||||
assert.equal(this.ajaxSettings.dataType, 'json');
|
||||
assert.equal(this.ajaxSettings.data._method, 'PUT');
|
||||
var data = JSON.parse(this.ajaxSettings.data.model);
|
||||
assert.equal(data.id, '2-the-tempest');
|
||||
assert.equal(data.author, 'Tim Shakespeare');
|
||||
assert.equal(data.length, 123);
|
||||
});
|
||||
|
||||
QUnit.test('update with just emulateHTTP', function(assert) {
|
||||
assert.expect(6);
|
||||
library.first().save({id: '2-the-tempest', author: 'Tim Shakespeare'}, {
|
||||
emulateHTTP: true
|
||||
});
|
||||
assert.equal(this.ajaxSettings.url, '/library/2-the-tempest');
|
||||
assert.equal(this.ajaxSettings.type, 'POST');
|
||||
assert.equal(this.ajaxSettings.contentType, 'application/json');
|
||||
var data = JSON.parse(this.ajaxSettings.data);
|
||||
assert.equal(data.id, '2-the-tempest');
|
||||
assert.equal(data.author, 'Tim Shakespeare');
|
||||
assert.equal(data.length, 123);
|
||||
});
|
||||
|
||||
QUnit.test('update with just emulateJSON', function(assert) {
|
||||
assert.expect(6);
|
||||
library.first().save({id: '2-the-tempest', author: 'Tim Shakespeare'}, {
|
||||
emulateJSON: true
|
||||
});
|
||||
assert.equal(this.ajaxSettings.url, '/library/2-the-tempest');
|
||||
assert.equal(this.ajaxSettings.type, 'PUT');
|
||||
assert.equal(this.ajaxSettings.contentType, 'application/x-www-form-urlencoded');
|
||||
var data = JSON.parse(this.ajaxSettings.data.model);
|
||||
assert.equal(data.id, '2-the-tempest');
|
||||
assert.equal(data.author, 'Tim Shakespeare');
|
||||
assert.equal(data.length, 123);
|
||||
});
|
||||
|
||||
QUnit.test('read model', function(assert) {
|
||||
assert.expect(3);
|
||||
library.first().save({id: '2-the-tempest', author: 'Tim Shakespeare'});
|
||||
library.first().fetch();
|
||||
assert.equal(this.ajaxSettings.url, '/library/2-the-tempest');
|
||||
assert.equal(this.ajaxSettings.type, 'GET');
|
||||
assert.ok(_.isEmpty(this.ajaxSettings.data));
|
||||
});
|
||||
|
||||
QUnit.test('destroy', function(assert) {
|
||||
assert.expect(3);
|
||||
library.first().save({id: '2-the-tempest', author: 'Tim Shakespeare'});
|
||||
library.first().destroy({wait: true});
|
||||
assert.equal(this.ajaxSettings.url, '/library/2-the-tempest');
|
||||
assert.equal(this.ajaxSettings.type, 'DELETE');
|
||||
assert.equal(this.ajaxSettings.data, null);
|
||||
});
|
||||
|
||||
QUnit.test('destroy with emulateHTTP', function(assert) {
|
||||
assert.expect(3);
|
||||
library.first().save({id: '2-the-tempest', author: 'Tim Shakespeare'});
|
||||
library.first().destroy({
|
||||
emulateHTTP: true,
|
||||
emulateJSON: true
|
||||
});
|
||||
assert.equal(this.ajaxSettings.url, '/library/2-the-tempest');
|
||||
assert.equal(this.ajaxSettings.type, 'POST');
|
||||
assert.equal(JSON.stringify(this.ajaxSettings.data), '{"_method":"DELETE"}');
|
||||
});
|
||||
|
||||
QUnit.test('urlError', function(assert) {
|
||||
assert.expect(2);
|
||||
var model = new Backbone.Model();
|
||||
assert.raises(function() {
|
||||
model.fetch();
|
||||
});
|
||||
model.fetch({url: '/one/two'});
|
||||
assert.equal(this.ajaxSettings.url, '/one/two');
|
||||
});
|
||||
|
||||
QUnit.test('#1052 - `options` is optional.', function(assert) {
|
||||
assert.expect(0);
|
||||
var model = new Backbone.Model();
|
||||
model.url = '/test';
|
||||
Backbone.sync('create', model);
|
||||
});
|
||||
|
||||
QUnit.test('Backbone.ajax', function(assert) {
|
||||
assert.expect(1);
|
||||
Backbone.ajax = function(settings) {
|
||||
assert.strictEqual(settings.url, '/test');
|
||||
};
|
||||
var model = new Backbone.Model();
|
||||
model.url = '/test';
|
||||
Backbone.sync('create', model);
|
||||
});
|
||||
|
||||
QUnit.test('Call provided error callback on error.', function(assert) {
|
||||
assert.expect(1);
|
||||
var model = new Backbone.Model;
|
||||
model.url = '/test';
|
||||
Backbone.sync('read', model, {
|
||||
error: function() { assert.ok(true); }
|
||||
});
|
||||
this.ajaxSettings.error();
|
||||
});
|
||||
|
||||
QUnit.test('Use Backbone.emulateHTTP as default.', function(assert) {
|
||||
assert.expect(2);
|
||||
var model = new Backbone.Model;
|
||||
model.url = '/test';
|
||||
|
||||
Backbone.emulateHTTP = true;
|
||||
model.sync('create', model);
|
||||
assert.strictEqual(this.ajaxSettings.emulateHTTP, true);
|
||||
|
||||
Backbone.emulateHTTP = false;
|
||||
model.sync('create', model);
|
||||
assert.strictEqual(this.ajaxSettings.emulateHTTP, false);
|
||||
});
|
||||
|
||||
QUnit.test('Use Backbone.emulateJSON as default.', function(assert) {
|
||||
assert.expect(2);
|
||||
var model = new Backbone.Model;
|
||||
model.url = '/test';
|
||||
|
||||
Backbone.emulateJSON = true;
|
||||
model.sync('create', model);
|
||||
assert.strictEqual(this.ajaxSettings.emulateJSON, true);
|
||||
|
||||
Backbone.emulateJSON = false;
|
||||
model.sync('create', model);
|
||||
assert.strictEqual(this.ajaxSettings.emulateJSON, false);
|
||||
});
|
||||
|
||||
QUnit.test('#1756 - Call user provided beforeSend function.', function(assert) {
|
||||
assert.expect(4);
|
||||
Backbone.emulateHTTP = true;
|
||||
var model = new Backbone.Model;
|
||||
model.url = '/test';
|
||||
var xhr = {
|
||||
setRequestHeader: function(header, value) {
|
||||
assert.strictEqual(header, 'X-HTTP-Method-Override');
|
||||
assert.strictEqual(value, 'DELETE');
|
||||
}
|
||||
};
|
||||
model.sync('delete', model, {
|
||||
beforeSend: function(_xhr) {
|
||||
assert.ok(_xhr === xhr);
|
||||
return false;
|
||||
}
|
||||
});
|
||||
assert.strictEqual(this.ajaxSettings.beforeSend(xhr), false);
|
||||
});
|
||||
|
||||
QUnit.test('#2928 - Pass along `textStatus` and `errorThrown`.', function(assert) {
|
||||
assert.expect(2);
|
||||
var model = new Backbone.Model;
|
||||
model.url = '/test';
|
||||
model.on('error', function(m, xhr, options) {
|
||||
assert.strictEqual(options.textStatus, 'textStatus');
|
||||
assert.strictEqual(options.errorThrown, 'errorThrown');
|
||||
});
|
||||
model.fetch();
|
||||
this.ajaxSettings.error({}, 'textStatus', 'errorThrown');
|
||||
});
|
||||
|
||||
})(QUnit);
|
||||
|
|
@ -1,516 +0,0 @@
|
|||
(function(QUnit) {
|
||||
|
||||
var view;
|
||||
|
||||
QUnit.module('Backbone.View', {
|
||||
|
||||
beforeEach: function() {
|
||||
$('#qunit-fixture').append(
|
||||
'<div id="testElement"><h1>Test</h1></div>'
|
||||
);
|
||||
|
||||
view = new Backbone.View({
|
||||
id: 'test-view',
|
||||
className: 'test-view',
|
||||
other: 'non-special-option'
|
||||
});
|
||||
},
|
||||
|
||||
afterEach: function() {
|
||||
$('#testElement').remove();
|
||||
$('#test-view').remove();
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
QUnit.test('constructor', function(assert) {
|
||||
assert.expect(3);
|
||||
assert.equal(view.el.id, 'test-view');
|
||||
assert.equal(view.el.className, 'test-view');
|
||||
assert.equal(view.el.other, void 0);
|
||||
});
|
||||
|
||||
QUnit.test('$', function(assert) {
|
||||
assert.expect(2);
|
||||
var myView = new Backbone.View;
|
||||
myView.setElement('<p><a><b>test</b></a></p>');
|
||||
var result = myView.$('a b');
|
||||
|
||||
assert.strictEqual(result[0].innerHTML, 'test');
|
||||
assert.ok(result.length === +result.length);
|
||||
});
|
||||
|
||||
QUnit.test('$el', function(assert) {
|
||||
assert.expect(3);
|
||||
var myView = new Backbone.View;
|
||||
myView.setElement('<p><a><b>test</b></a></p>');
|
||||
assert.strictEqual(myView.el.nodeType, 1);
|
||||
|
||||
assert.ok(myView.$el instanceof Backbone.$);
|
||||
assert.strictEqual(myView.$el[0], myView.el);
|
||||
});
|
||||
|
||||
QUnit.test('initialize', function(assert) {
|
||||
assert.expect(1);
|
||||
var View = Backbone.View.extend({
|
||||
initialize: function() {
|
||||
this.one = 1;
|
||||
}
|
||||
});
|
||||
|
||||
assert.strictEqual(new View().one, 1);
|
||||
});
|
||||
|
||||
QUnit.test('preinitialize', function(assert) {
|
||||
assert.expect(1);
|
||||
var View = Backbone.View.extend({
|
||||
preinitialize: function() {
|
||||
this.one = 1;
|
||||
}
|
||||
});
|
||||
|
||||
assert.strictEqual(new View().one, 1);
|
||||
});
|
||||
|
||||
QUnit.test('preinitialize occurs before the view is set up', function(assert) {
|
||||
assert.expect(2);
|
||||
var View = Backbone.View.extend({
|
||||
preinitialize: function() {
|
||||
assert.equal(this.el, undefined);
|
||||
}
|
||||
});
|
||||
var _view = new View({});
|
||||
assert.notEqual(_view.el, undefined);
|
||||
});
|
||||
|
||||
QUnit.test('render', function(assert) {
|
||||
assert.expect(1);
|
||||
var myView = new Backbone.View;
|
||||
assert.equal(myView.render(), myView, '#render returns the view instance');
|
||||
});
|
||||
|
||||
QUnit.test('delegateEvents', function(assert) {
|
||||
assert.expect(6);
|
||||
var counter1 = 0, counter2 = 0;
|
||||
|
||||
var myView = new Backbone.View({el: '#testElement'});
|
||||
myView.increment = function() { counter1++; };
|
||||
myView.$el.on('click', function() { counter2++; });
|
||||
|
||||
var events = {'click h1': 'increment'};
|
||||
|
||||
myView.delegateEvents(events);
|
||||
myView.$('h1').trigger('click');
|
||||
assert.equal(counter1, 1);
|
||||
assert.equal(counter2, 1);
|
||||
|
||||
myView.$('h1').trigger('click');
|
||||
assert.equal(counter1, 2);
|
||||
assert.equal(counter2, 2);
|
||||
|
||||
myView.delegateEvents(events);
|
||||
myView.$('h1').trigger('click');
|
||||
assert.equal(counter1, 3);
|
||||
assert.equal(counter2, 3);
|
||||
});
|
||||
|
||||
QUnit.test('delegate', function(assert) {
|
||||
assert.expect(3);
|
||||
var myView = new Backbone.View({el: '#testElement'});
|
||||
myView.delegate('click', 'h1', function() {
|
||||
assert.ok(true);
|
||||
});
|
||||
myView.delegate('click', function() {
|
||||
assert.ok(true);
|
||||
});
|
||||
myView.$('h1').trigger('click');
|
||||
|
||||
assert.equal(myView.delegate(), myView, '#delegate returns the view instance');
|
||||
});
|
||||
|
||||
QUnit.test('delegateEvents allows functions for callbacks', function(assert) {
|
||||
assert.expect(3);
|
||||
var myView = new Backbone.View({el: '<p></p>'});
|
||||
myView.counter = 0;
|
||||
|
||||
var events = {
|
||||
click: function() {
|
||||
this.counter++;
|
||||
}
|
||||
};
|
||||
|
||||
myView.delegateEvents(events);
|
||||
myView.$el.trigger('click');
|
||||
assert.equal(myView.counter, 1);
|
||||
|
||||
myView.$el.trigger('click');
|
||||
assert.equal(myView.counter, 2);
|
||||
|
||||
myView.delegateEvents(events);
|
||||
myView.$el.trigger('click');
|
||||
assert.equal(myView.counter, 3);
|
||||
});
|
||||
|
||||
QUnit.test('delegateEvents ignore undefined methods', function(assert) {
|
||||
assert.expect(0);
|
||||
var myView = new Backbone.View({el: '<p></p>'});
|
||||
myView.delegateEvents({click: 'undefinedMethod'});
|
||||
myView.$el.trigger('click');
|
||||
});
|
||||
|
||||
QUnit.test('undelegateEvents', function(assert) {
|
||||
assert.expect(7);
|
||||
var counter1 = 0, counter2 = 0;
|
||||
|
||||
var myView = new Backbone.View({el: '#testElement'});
|
||||
myView.increment = function() { counter1++; };
|
||||
myView.$el.on('click', function() { counter2++; });
|
||||
|
||||
var events = {'click h1': 'increment'};
|
||||
|
||||
myView.delegateEvents(events);
|
||||
myView.$('h1').trigger('click');
|
||||
assert.equal(counter1, 1);
|
||||
assert.equal(counter2, 1);
|
||||
|
||||
myView.undelegateEvents();
|
||||
myView.$('h1').trigger('click');
|
||||
assert.equal(counter1, 1);
|
||||
assert.equal(counter2, 2);
|
||||
|
||||
myView.delegateEvents(events);
|
||||
myView.$('h1').trigger('click');
|
||||
assert.equal(counter1, 2);
|
||||
assert.equal(counter2, 3);
|
||||
|
||||
assert.equal(myView.undelegateEvents(), myView, '#undelegateEvents returns the view instance');
|
||||
});
|
||||
|
||||
QUnit.test('undelegate', function(assert) {
|
||||
assert.expect(1);
|
||||
var myView = new Backbone.View({el: '#testElement'});
|
||||
myView.delegate('click', function() { assert.ok(false); });
|
||||
myView.delegate('click', 'h1', function() { assert.ok(false); });
|
||||
|
||||
myView.undelegate('click');
|
||||
|
||||
myView.$('h1').trigger('click');
|
||||
myView.$el.trigger('click');
|
||||
|
||||
assert.equal(myView.undelegate(), myView, '#undelegate returns the view instance');
|
||||
});
|
||||
|
||||
QUnit.test('undelegate with passed handler', function(assert) {
|
||||
assert.expect(1);
|
||||
var myView = new Backbone.View({el: '#testElement'});
|
||||
var listener = function() { assert.ok(false); };
|
||||
myView.delegate('click', listener);
|
||||
myView.delegate('click', function() { assert.ok(true); });
|
||||
myView.undelegate('click', listener);
|
||||
myView.$el.trigger('click');
|
||||
});
|
||||
|
||||
QUnit.test('undelegate with selector', function(assert) {
|
||||
assert.expect(2);
|
||||
var myView = new Backbone.View({el: '#testElement'});
|
||||
myView.delegate('click', function() { assert.ok(true); });
|
||||
myView.delegate('click', 'h1', function() { assert.ok(false); });
|
||||
myView.undelegate('click', 'h1');
|
||||
myView.$('h1').trigger('click');
|
||||
myView.$el.trigger('click');
|
||||
});
|
||||
|
||||
QUnit.test('undelegate with handler and selector', function(assert) {
|
||||
assert.expect(2);
|
||||
var myView = new Backbone.View({el: '#testElement'});
|
||||
myView.delegate('click', function() { assert.ok(true); });
|
||||
var handler = function() { assert.ok(false); };
|
||||
myView.delegate('click', 'h1', handler);
|
||||
myView.undelegate('click', 'h1', handler);
|
||||
myView.$('h1').trigger('click');
|
||||
myView.$el.trigger('click');
|
||||
});
|
||||
|
||||
QUnit.test('tagName can be provided as a string', function(assert) {
|
||||
assert.expect(1);
|
||||
var View = Backbone.View.extend({
|
||||
tagName: 'span'
|
||||
});
|
||||
|
||||
assert.equal(new View().el.tagName, 'SPAN');
|
||||
});
|
||||
|
||||
QUnit.test('tagName can be provided as a function', function(assert) {
|
||||
assert.expect(1);
|
||||
var View = Backbone.View.extend({
|
||||
tagName: function() {
|
||||
return 'p';
|
||||
}
|
||||
});
|
||||
|
||||
assert.ok(new View().$el.is('p'));
|
||||
});
|
||||
|
||||
QUnit.test('_ensureElement with DOM node el', function(assert) {
|
||||
assert.expect(1);
|
||||
var View = Backbone.View.extend({
|
||||
el: document.body
|
||||
});
|
||||
|
||||
assert.equal(new View().el, document.body);
|
||||
});
|
||||
|
||||
QUnit.test('_ensureElement with string el', function(assert) {
|
||||
assert.expect(3);
|
||||
var View = Backbone.View.extend({
|
||||
el: 'body'
|
||||
});
|
||||
assert.strictEqual(new View().el, document.body);
|
||||
|
||||
View = Backbone.View.extend({
|
||||
el: '#testElement > h1'
|
||||
});
|
||||
assert.strictEqual(new View().el, $('#testElement > h1').get(0));
|
||||
|
||||
View = Backbone.View.extend({
|
||||
el: '#nonexistent'
|
||||
});
|
||||
assert.ok(!new View().el);
|
||||
});
|
||||
|
||||
QUnit.test('with className and id functions', function(assert) {
|
||||
assert.expect(2);
|
||||
var View = Backbone.View.extend({
|
||||
className: function() {
|
||||
return 'className';
|
||||
},
|
||||
id: function() {
|
||||
return 'id';
|
||||
}
|
||||
});
|
||||
|
||||
assert.strictEqual(new View().el.className, 'className');
|
||||
assert.strictEqual(new View().el.id, 'id');
|
||||
});
|
||||
|
||||
QUnit.test('with attributes', function(assert) {
|
||||
assert.expect(2);
|
||||
var View = Backbone.View.extend({
|
||||
attributes: {
|
||||
'id': 'id',
|
||||
'class': 'class'
|
||||
}
|
||||
});
|
||||
|
||||
assert.strictEqual(new View().el.className, 'class');
|
||||
assert.strictEqual(new View().el.id, 'id');
|
||||
});
|
||||
|
||||
QUnit.test('with attributes as a function', function(assert) {
|
||||
assert.expect(1);
|
||||
var View = Backbone.View.extend({
|
||||
attributes: function() {
|
||||
return {'class': 'dynamic'};
|
||||
}
|
||||
});
|
||||
|
||||
assert.strictEqual(new View().el.className, 'dynamic');
|
||||
});
|
||||
|
||||
QUnit.test('should default to className/id properties', function(assert) {
|
||||
assert.expect(4);
|
||||
var View = Backbone.View.extend({
|
||||
className: 'backboneClass',
|
||||
id: 'backboneId',
|
||||
attributes: {
|
||||
'class': 'attributeClass',
|
||||
'id': 'attributeId'
|
||||
}
|
||||
});
|
||||
|
||||
var myView = new View;
|
||||
assert.strictEqual(myView.el.className, 'backboneClass');
|
||||
assert.strictEqual(myView.el.id, 'backboneId');
|
||||
assert.strictEqual(myView.$el.attr('class'), 'backboneClass');
|
||||
assert.strictEqual(myView.$el.attr('id'), 'backboneId');
|
||||
});
|
||||
|
||||
QUnit.test('multiple views per element', function(assert) {
|
||||
assert.expect(3);
|
||||
var count = 0;
|
||||
var $el = $('<p></p>');
|
||||
|
||||
var View = Backbone.View.extend({
|
||||
el: $el,
|
||||
events: {
|
||||
click: function() {
|
||||
count++;
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
var view1 = new View;
|
||||
$el.trigger('click');
|
||||
assert.equal(1, count);
|
||||
|
||||
var view2 = new View;
|
||||
$el.trigger('click');
|
||||
assert.equal(3, count);
|
||||
|
||||
view1.delegateEvents();
|
||||
$el.trigger('click');
|
||||
assert.equal(5, count);
|
||||
});
|
||||
|
||||
QUnit.test('custom events', function(assert) {
|
||||
assert.expect(2);
|
||||
var View = Backbone.View.extend({
|
||||
el: $('body'),
|
||||
events: {
|
||||
fake$event: function() { assert.ok(true); }
|
||||
}
|
||||
});
|
||||
|
||||
var myView = new View;
|
||||
$('body').trigger('fake$event').trigger('fake$event');
|
||||
|
||||
$('body').off('fake$event');
|
||||
$('body').trigger('fake$event');
|
||||
});
|
||||
|
||||
QUnit.test('#1048 - setElement uses provided object.', function(assert) {
|
||||
assert.expect(2);
|
||||
var $el = $('body');
|
||||
|
||||
var myView = new Backbone.View({el: $el});
|
||||
assert.ok(myView.$el === $el);
|
||||
|
||||
myView.setElement($el = $($el));
|
||||
assert.ok(myView.$el === $el);
|
||||
});
|
||||
|
||||
QUnit.test('#986 - Undelegate before changing element.', function(assert) {
|
||||
assert.expect(1);
|
||||
var button1 = $('<button></button>');
|
||||
var button2 = $('<button></button>');
|
||||
|
||||
var View = Backbone.View.extend({
|
||||
events: {
|
||||
click: function(e) {
|
||||
assert.ok(myView.el === e.target);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
var myView = new View({el: button1});
|
||||
myView.setElement(button2);
|
||||
|
||||
button1.trigger('click');
|
||||
button2.trigger('click');
|
||||
});
|
||||
|
||||
QUnit.test('#1172 - Clone attributes object', function(assert) {
|
||||
assert.expect(2);
|
||||
var View = Backbone.View.extend({
|
||||
attributes: {foo: 'bar'}
|
||||
});
|
||||
|
||||
var view1 = new View({id: 'foo'});
|
||||
assert.strictEqual(view1.el.id, 'foo');
|
||||
|
||||
var view2 = new View();
|
||||
assert.ok(!view2.el.id);
|
||||
});
|
||||
|
||||
QUnit.test('views stopListening', function(assert) {
|
||||
assert.expect(0);
|
||||
var View = Backbone.View.extend({
|
||||
initialize: function() {
|
||||
this.listenTo(this.model, 'all x', function() { assert.ok(false); });
|
||||
this.listenTo(this.collection, 'all x', function() { assert.ok(false); });
|
||||
}
|
||||
});
|
||||
|
||||
var myView = new View({
|
||||
model: new Backbone.Model,
|
||||
collection: new Backbone.Collection
|
||||
});
|
||||
|
||||
myView.stopListening();
|
||||
myView.model.trigger('x');
|
||||
myView.collection.trigger('x');
|
||||
});
|
||||
|
||||
QUnit.test('Provide function for el.', function(assert) {
|
||||
assert.expect(2);
|
||||
var View = Backbone.View.extend({
|
||||
el: function() {
|
||||
return '<p><a></a></p>';
|
||||
}
|
||||
});
|
||||
|
||||
var myView = new View;
|
||||
assert.ok(myView.$el.is('p'));
|
||||
assert.ok(myView.$el.has('a'));
|
||||
});
|
||||
|
||||
QUnit.test('events passed in options', function(assert) {
|
||||
assert.expect(1);
|
||||
var counter = 0;
|
||||
|
||||
var View = Backbone.View.extend({
|
||||
el: '#testElement',
|
||||
increment: function() {
|
||||
counter++;
|
||||
}
|
||||
});
|
||||
|
||||
var myView = new View({
|
||||
events: {
|
||||
'click h1': 'increment'
|
||||
}
|
||||
});
|
||||
|
||||
myView.$('h1').trigger('click').trigger('click');
|
||||
assert.equal(counter, 2);
|
||||
});
|
||||
|
||||
QUnit.test('remove', function(assert) {
|
||||
assert.expect(2);
|
||||
var myView = new Backbone.View;
|
||||
document.body.appendChild(view.el);
|
||||
|
||||
myView.delegate('click', function() { assert.ok(false); });
|
||||
myView.listenTo(myView, 'all x', function() { assert.ok(false); });
|
||||
|
||||
assert.equal(myView.remove(), myView, '#remove returns the view instance');
|
||||
myView.$el.trigger('click');
|
||||
myView.trigger('x');
|
||||
|
||||
// In IE8 and below, parentNode still exists but is not document.body.
|
||||
assert.notEqual(myView.el.parentNode, document.body);
|
||||
});
|
||||
|
||||
QUnit.test('setElement', function(assert) {
|
||||
assert.expect(3);
|
||||
var myView = new Backbone.View({
|
||||
events: {
|
||||
click: function() { assert.ok(false); }
|
||||
}
|
||||
});
|
||||
myView.events = {
|
||||
click: function() { assert.ok(true); }
|
||||
};
|
||||
var oldEl = myView.el;
|
||||
var $oldEl = myView.$el;
|
||||
|
||||
myView.setElement(document.createElement('div'));
|
||||
|
||||
$oldEl.click();
|
||||
myView.$el.click();
|
||||
|
||||
assert.notEqual(oldEl, myView.el);
|
||||
assert.notEqual($oldEl, myView.$el);
|
||||
});
|
||||
|
||||
})(QUnit);
|
||||
|
|
@ -1,30 +0,0 @@
|
|||
Software License Agreement (BSD License)
|
||||
|
||||
Copyright (c) 2007, Parakey Inc.
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use of this software in source and binary forms, with or without modification,
|
||||
are permitted provided that the following conditions are met:
|
||||
|
||||
* Redistributions of source code must retain the above
|
||||
copyright notice, this list of conditions and the
|
||||
following disclaimer.
|
||||
|
||||
* Redistributions in binary form must reproduce the above
|
||||
copyright notice, this list of conditions and the
|
||||
following disclaimer in the documentation and/or other
|
||||
materials provided with the distribution.
|
||||
|
||||
* Neither the name of Parakey Inc. nor the names of its
|
||||
contributors may be used to endorse or promote products
|
||||
derived from this software without specific prior
|
||||
written permission of Parakey Inc.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
|
||||
IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
|
||||
FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
|
||||
CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER
|
||||
IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
|
||||
OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
Before Width: | Height: | Size: 43 B |
|
Before Width: | Height: | Size: 167 B |
|
Before Width: | Height: | Size: 171 B |
|
|
@ -1,331 +0,0 @@
|
|||
/* See license.txt for terms of usage */
|
||||
|
||||
.panelNode-script {
|
||||
overflow: hidden;
|
||||
font-family: monospace;
|
||||
}
|
||||
|
||||
/************************************************************************************************/
|
||||
|
||||
.scriptTooltip {
|
||||
position: fixed;
|
||||
z-index: 2147483647;
|
||||
padding: 2px 3px;
|
||||
border: 1px solid #CBE087;
|
||||
background: LightYellow;
|
||||
font-family: monospace;
|
||||
color: #000000;
|
||||
}
|
||||
|
||||
/************************************************************************************************/
|
||||
|
||||
.sourceBox {
|
||||
/* TODO: xxxpedro problem with sourceBox and scrolling elements */
|
||||
/*overflow: scroll; /* see issue 1479 */
|
||||
position: absolute;
|
||||
left: 0;
|
||||
top: 0;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.sourceRow {
|
||||
white-space: nowrap;
|
||||
-moz-user-select: text;
|
||||
}
|
||||
|
||||
.sourceRow.hovered {
|
||||
background-color: #EEEEEE;
|
||||
}
|
||||
|
||||
/************************************************************************************************/
|
||||
|
||||
.sourceLine {
|
||||
-moz-user-select: none;
|
||||
margin-right: 10px;
|
||||
border-right: 1px solid #CCCCCC;
|
||||
padding: 0px 4px 0 20px;
|
||||
background: #EEEEEE no-repeat 2px 0px;
|
||||
color: #888888;
|
||||
white-space: pre;
|
||||
font-family: monospace; /* see issue 2953 */
|
||||
}
|
||||
|
||||
.noteInToolTip { /* below sourceLine, so it overrides it */
|
||||
background-color: #FFD472;
|
||||
}
|
||||
|
||||
.useA11y .sourceBox .sourceViewport:focus .sourceLine {
|
||||
background-color: #FFFFC0;
|
||||
color: navy;
|
||||
border-right: 1px solid black;
|
||||
}
|
||||
|
||||
.useA11y .sourceBox .sourceViewport:focus {
|
||||
outline: none;
|
||||
}
|
||||
|
||||
.a11y1emSize {
|
||||
width: 1em;
|
||||
height: 1em;
|
||||
position: absolute;
|
||||
}
|
||||
|
||||
.useA11y .panelStatusLabel:focus {
|
||||
outline-offset: -2px !important;
|
||||
}
|
||||
|
||||
.sourceBox > .sourceRow > .sourceLine {
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.sourceLine:hover {
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
.sourceRowText {
|
||||
white-space: pre;
|
||||
}
|
||||
|
||||
.sourceRow[exe_line="true"] {
|
||||
outline: 1px solid #D9D9B6;
|
||||
margin-right: 1px;
|
||||
background-color: lightgoldenrodyellow;
|
||||
}
|
||||
|
||||
.sourceRow[executable="true"] > .sourceLine {
|
||||
content: "-";
|
||||
color: #4AA02C; /* Spring Green */
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.sourceRow[exe_line="true"] > .sourceLine {
|
||||
background-image: url(chrome://firebug/skin/exe.png);
|
||||
color: #000000;
|
||||
}
|
||||
|
||||
.sourceRow[breakpoint="true"] > .sourceLine {
|
||||
background-image: url(chrome://firebug/skin/breakpoint.png);
|
||||
}
|
||||
|
||||
.sourceRow[breakpoint="true"][condition="true"] > .sourceLine {
|
||||
background-image: url(chrome://firebug/skin/breakpointCondition.png);
|
||||
}
|
||||
|
||||
.sourceRow[breakpoint="true"][disabledBreakpoint="true"] > .sourceLine {
|
||||
background-image: url(chrome://firebug/skin/breakpointDisabled.png);
|
||||
}
|
||||
|
||||
.sourceRow[breakpoint="true"][exe_line="true"] > .sourceLine {
|
||||
background-image: url(chrome://firebug/skin/breakpointExe.png);
|
||||
}
|
||||
|
||||
.sourceRow[breakpoint="true"][exe_line="true"][disabledBreakpoint="true"] > .sourceLine {
|
||||
background-image: url(chrome://firebug/skin/breakpointDisabledExe.png);
|
||||
}
|
||||
|
||||
.sourceLine.editing {
|
||||
background-image: url(chrome://firebug/skin/breakpoint.png);
|
||||
}
|
||||
|
||||
/************************************************************************************************/
|
||||
|
||||
.conditionEditor {
|
||||
z-index: 2147483647;
|
||||
position: absolute;
|
||||
margin-top: 0;
|
||||
left: 2px;
|
||||
width: 90%;
|
||||
}
|
||||
|
||||
.conditionEditorInner {
|
||||
position: relative;
|
||||
top: -26px;
|
||||
height: 0;
|
||||
}
|
||||
|
||||
.conditionCaption {
|
||||
margin-bottom: 2px;
|
||||
font-family: Lucida Grande, sans-serif;
|
||||
font-weight: bold;
|
||||
font-size: 11px;
|
||||
color: #226679;
|
||||
}
|
||||
|
||||
.conditionInput {
|
||||
width: 100%;
|
||||
border: 1px solid #0096C0;
|
||||
font-family: monospace;
|
||||
font-size: inherit;
|
||||
}
|
||||
|
||||
.conditionEditorInner1 {
|
||||
padding-left: 37px;
|
||||
background: url(condBorders.png) repeat-y;
|
||||
}
|
||||
|
||||
.conditionEditorInner2 {
|
||||
padding-right: 25px;
|
||||
background: url(condBorders.png) repeat-y 100% 0;
|
||||
}
|
||||
|
||||
.conditionEditorTop1 {
|
||||
background: url(condCorners.png) no-repeat 100% 0;
|
||||
margin-left: 37px;
|
||||
height: 35px;
|
||||
}
|
||||
|
||||
.conditionEditorTop2 {
|
||||
position: relative;
|
||||
left: -37px;
|
||||
width: 37px;
|
||||
height: 35px;
|
||||
background: url(condCorners.png) no-repeat;
|
||||
}
|
||||
|
||||
.conditionEditorBottom1 {
|
||||
background: url(condCorners.png) no-repeat 100% 100%;
|
||||
margin-left: 37px;
|
||||
height: 33px;
|
||||
}
|
||||
|
||||
.conditionEditorBottom2 {
|
||||
position: relative; left: -37px;
|
||||
width: 37px;
|
||||
height: 33px;
|
||||
background: url(condCorners.png) no-repeat 0 100%;
|
||||
}
|
||||
|
||||
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
|
||||
|
||||
.upsideDown {
|
||||
margin-top: 2px;
|
||||
}
|
||||
|
||||
.upsideDown .conditionEditorInner {
|
||||
top: -8px;
|
||||
}
|
||||
|
||||
.upsideDown .conditionEditorInner1 {
|
||||
padding-left: 33px;
|
||||
background: url(condBordersUps.png) repeat-y;
|
||||
}
|
||||
|
||||
.upsideDown .conditionEditorInner2 {
|
||||
padding-right: 25px;
|
||||
background: url(condBordersUps.png) repeat-y 100% 0;
|
||||
}
|
||||
|
||||
.upsideDown .conditionEditorTop1 {
|
||||
background: url(condCornersUps.png) no-repeat 100% 0;
|
||||
margin-left: 33px;
|
||||
height: 25px;
|
||||
}
|
||||
|
||||
.upsideDown .conditionEditorTop2 {
|
||||
position: relative;
|
||||
left: -33px;
|
||||
width: 33px;
|
||||
height: 25px;
|
||||
background: url(condCornersUps.png) no-repeat;
|
||||
}
|
||||
|
||||
.upsideDown .conditionEditorBottom1 {
|
||||
background: url(condCornersUps.png) no-repeat 100% 100%;
|
||||
margin-left: 33px;
|
||||
height: 43px;
|
||||
}
|
||||
|
||||
.upsideDown .conditionEditorBottom2 {
|
||||
position: relative;
|
||||
left: -33px;
|
||||
width: 33px;
|
||||
height: 43px;
|
||||
background: url(condCornersUps.png) no-repeat 0 100%;
|
||||
}
|
||||
|
||||
/************************************************************************************************/
|
||||
|
||||
.breakpointsGroupListBox {
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.breakpointBlockHead {
|
||||
position: relative;
|
||||
padding-top: 4px;
|
||||
}
|
||||
|
||||
.breakpointBlockHead > .checkbox {
|
||||
margin-right: 4px;
|
||||
}
|
||||
|
||||
.breakpointBlockHead > .objectLink-sourceLink {
|
||||
top: 4px;
|
||||
right: 20px;
|
||||
background-color: #FFFFFF; /* issue 3308 */
|
||||
}
|
||||
|
||||
.breakpointBlockHead > .closeButton {
|
||||
position: absolute;
|
||||
top: 2px;
|
||||
right: 2px;
|
||||
}
|
||||
|
||||
.breakpointCheckbox {
|
||||
margin-top: 0;
|
||||
vertical-align: top;
|
||||
}
|
||||
|
||||
.breakpointName {
|
||||
margin-left: 4px;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.breakpointRow[aria-checked="false"] > .breakpointBlockHead > *,
|
||||
.breakpointRow[aria-checked="false"] > .breakpointCode {
|
||||
opacity: 0.5;
|
||||
}
|
||||
|
||||
.breakpointRow[aria-checked="false"] .breakpointCheckbox,
|
||||
.breakpointRow[aria-checked="false"] .objectLink-sourceLink,
|
||||
.breakpointRow[aria-checked="false"] .closeButton,
|
||||
.breakpointRow[aria-checked="false"] .breakpointMutationType {
|
||||
opacity: 1.0 !important;
|
||||
}
|
||||
|
||||
.breakpointCode {
|
||||
overflow: hidden;
|
||||
white-space: nowrap;
|
||||
padding-left: 24px;
|
||||
padding-bottom: 2px;
|
||||
border-bottom: 1px solid #D7D7D7;
|
||||
font-family: monospace;
|
||||
color: DarkGreen;
|
||||
}
|
||||
|
||||
.breakpointCondition {
|
||||
white-space: nowrap;
|
||||
padding-left: 24px;
|
||||
padding-bottom: 2px;
|
||||
border-bottom: 1px solid #D7D7D7;
|
||||
font-family: monospace;
|
||||
color: Gray;
|
||||
}
|
||||
|
||||
.breakpointBlock-breakpoints > .groupHeader {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.breakpointBlock-monitors > .breakpointCode {
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
.breakpointBlock-errorBreakpoints .breakpointCheckbox,
|
||||
.breakpointBlock-monitors .breakpointCheckbox {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.breakpointHeader {
|
||||
margin: 0 !important;
|
||||
border-top: none !important;
|
||||
}
|
||||
|
Before Width: | Height: | Size: 655 B |
|
Before Width: | Height: | Size: 586 B |
|
Before Width: | Height: | Size: 340 B |
|
Before Width: | Height: | Size: 543 B |
|
Before Width: | Height: | Size: 344 B |
|
Before Width: | Height: | Size: 512 B |
|
Before Width: | Height: | Size: 637 B |
|
Before Width: | Height: | Size: 543 B |
|
Before Width: | Height: | Size: 526 B |
|
Before Width: | Height: | Size: 447 B |
|
Before Width: | Height: | Size: 365 B |
|
Before Width: | Height: | Size: 457 B |
|
|
@ -1,817 +0,0 @@
|
|||
.fbBtnPressed {
|
||||
background: #ECEBE3;
|
||||
padding: 3px 6px 2px 7px !important;
|
||||
margin: 1px 0 0 1px;
|
||||
_margin: 1px -1px 0 1px;
|
||||
border: 1px solid #ACA899 !important;
|
||||
border-color: #ACA899 #ECEBE3 #ECEBE3 #ACA899 !important;
|
||||
}
|
||||
|
||||
.fbToolbarButtons {
|
||||
display: none;
|
||||
}
|
||||
|
||||
#fbStatusBarBox {
|
||||
display: none;
|
||||
}
|
||||
|
||||
/************************************************************************************************
|
||||
Error Popup
|
||||
*************************************************************************************************/
|
||||
#fbErrorPopup {
|
||||
position: absolute;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
height: 19px;
|
||||
width: 75px;
|
||||
background: url(sprite.png) #f1f2ee 0 0;
|
||||
z-index: 999;
|
||||
}
|
||||
|
||||
#fbErrorPopupContent {
|
||||
position: absolute;
|
||||
right: 0;
|
||||
top: 1px;
|
||||
height: 18px;
|
||||
width: 75px;
|
||||
_width: 74px;
|
||||
border-left: 1px solid #aca899;
|
||||
}
|
||||
|
||||
#fbErrorIndicator {
|
||||
position: absolute;
|
||||
top: 2px;
|
||||
right: 5px;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
.fbBtnInspectActive {
|
||||
background: #aaa;
|
||||
color: #fff !important;
|
||||
}
|
||||
|
||||
/************************************************************************************************
|
||||
General
|
||||
*************************************************************************************************/
|
||||
html, body {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
body {
|
||||
font-family: Lucida Grande, Tahoma, sans-serif;
|
||||
font-size: 11px;
|
||||
background: #fff;
|
||||
}
|
||||
|
||||
.clear {
|
||||
clear: both;
|
||||
}
|
||||
|
||||
/************************************************************************************************
|
||||
Mini Chrome
|
||||
*************************************************************************************************/
|
||||
#fbMiniChrome {
|
||||
display: none;
|
||||
right: 0;
|
||||
height: 27px;
|
||||
background: url(sprite.png) #f1f2ee 0 0;
|
||||
margin-left: 1px;
|
||||
}
|
||||
|
||||
#fbMiniContent {
|
||||
display: block;
|
||||
position: relative;
|
||||
left: -1px;
|
||||
right: 0;
|
||||
top: 1px;
|
||||
height: 25px;
|
||||
border-left: 1px solid #aca899;
|
||||
}
|
||||
|
||||
#fbToolbarSearch {
|
||||
float: right;
|
||||
border: 1px solid #ccc;
|
||||
margin: 0 5px 0 0;
|
||||
background: #fff url(search.png) no-repeat 4px 2px;
|
||||
padding-left: 20px;
|
||||
font-size: 11px;
|
||||
}
|
||||
|
||||
#fbToolbarErrors {
|
||||
float: right;
|
||||
margin: 1px 4px 0 0;
|
||||
font-size: 11px;
|
||||
}
|
||||
|
||||
#fbLeftToolbarErrors {
|
||||
float: left;
|
||||
margin: 7px 0px 0 5px;
|
||||
font-size: 11px;
|
||||
}
|
||||
|
||||
.fbErrors {
|
||||
padding-left: 20px;
|
||||
height: 14px;
|
||||
background: url(errorIcon.png) no-repeat;
|
||||
color: #f00;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
#fbMiniErrors {
|
||||
display: inline;
|
||||
display: none;
|
||||
float: right;
|
||||
margin: 5px 2px 0 5px;
|
||||
}
|
||||
|
||||
#fbMiniIcon {
|
||||
float: right;
|
||||
margin: 3px 4px 0;
|
||||
height: 20px;
|
||||
width: 20px;
|
||||
float: right;
|
||||
background: url(sprite.png) 0 -135px;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
|
||||
/************************************************************************************************
|
||||
Master Layout
|
||||
*************************************************************************************************/
|
||||
#fbChrome {
|
||||
position: fixed;
|
||||
overflow: hidden;
|
||||
height: 100%;
|
||||
width: 100%;
|
||||
border-collapse: collapse;
|
||||
background: #fff;
|
||||
}
|
||||
|
||||
#fbTop {
|
||||
height: 49px;
|
||||
}
|
||||
|
||||
#fbToolbar {
|
||||
position: absolute;
|
||||
z-index: 5;
|
||||
width: 100%;
|
||||
top: 0;
|
||||
background: url(sprite.png) #f1f2ee 0 0;
|
||||
height: 27px;
|
||||
font-size: 11px;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
#fbPanelBarBox {
|
||||
top: 27px;
|
||||
position: absolute;
|
||||
z-index: 8;
|
||||
width: 100%;
|
||||
background: url(sprite.png) #dbd9c9 0 -27px;
|
||||
height: 22px;
|
||||
}
|
||||
|
||||
#fbContent {
|
||||
height: 100%;
|
||||
vertical-align: top;
|
||||
}
|
||||
|
||||
#fbBottom {
|
||||
height: 18px;
|
||||
background: #fff;
|
||||
}
|
||||
|
||||
/************************************************************************************************
|
||||
Sub-Layout
|
||||
*************************************************************************************************/
|
||||
|
||||
/* fbToolbar
|
||||
*************************************************************************************************/
|
||||
#fbToolbarIcon {
|
||||
float: left;
|
||||
padding: 4px 5px 0;
|
||||
}
|
||||
|
||||
#fbToolbarIcon a {
|
||||
display: block;
|
||||
height: 20px;
|
||||
width: 20px;
|
||||
background: url(sprite.png) 0 -135px;
|
||||
text-decoration: none;
|
||||
cursor: default;
|
||||
}
|
||||
|
||||
#fbToolbarButtons {
|
||||
float: left;
|
||||
padding: 4px 2px 0 5px;
|
||||
}
|
||||
|
||||
#fbToolbarButtons a {
|
||||
text-decoration: none;
|
||||
display: block;
|
||||
float: left;
|
||||
color: #000;
|
||||
padding: 4px 8px 4px;
|
||||
cursor: default;
|
||||
}
|
||||
|
||||
#fbToolbarButtons a:hover {
|
||||
color: #333;
|
||||
padding: 3px 7px 3px;
|
||||
border: 1px solid #fff;
|
||||
border-bottom: 1px solid #bbb;
|
||||
border-right: 1px solid #bbb;
|
||||
}
|
||||
|
||||
#fbStatusBarBox {
|
||||
position: relative;
|
||||
top: 5px;
|
||||
line-height: 19px;
|
||||
cursor: default;
|
||||
}
|
||||
|
||||
.fbToolbarSeparator{
|
||||
overflow: hidden;
|
||||
border: 1px solid;
|
||||
border-color: transparent #fff transparent #777;
|
||||
_border-color: #eee #fff #eee #777;
|
||||
height: 7px;
|
||||
margin: 10px 6px 0 0;
|
||||
float: left;
|
||||
}
|
||||
|
||||
.fbStatusBar span {
|
||||
color: #808080;
|
||||
padding: 0 4px 0 0;
|
||||
}
|
||||
|
||||
.fbStatusBar span a {
|
||||
text-decoration: none;
|
||||
color: black;
|
||||
}
|
||||
|
||||
.fbStatusBar span a:hover {
|
||||
color: blue;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
|
||||
#fbWindowButtons {
|
||||
position: absolute;
|
||||
white-space: nowrap;
|
||||
right: 0;
|
||||
top: 0;
|
||||
height: 17px;
|
||||
_width: 50px;
|
||||
padding: 5px 0 5px 5px;
|
||||
z-index: 6;
|
||||
background: url(sprite.png) #f1f2ee 0 0;
|
||||
}
|
||||
|
||||
/* fbPanelBarBox
|
||||
*************************************************************************************************/
|
||||
|
||||
#fbPanelBar1 {
|
||||
width: 255px; /* fixed width to avoid tabs breaking line */
|
||||
z-index: 8;
|
||||
left: 0;
|
||||
white-space: nowrap;
|
||||
background: url(sprite.png) #dbd9c9 0 -27px;
|
||||
position: absolute;
|
||||
left: 4px;
|
||||
}
|
||||
|
||||
#fbPanelBar2Box {
|
||||
background: url(sprite.png) #dbd9c9 0 -27px;
|
||||
position: absolute;
|
||||
height: 22px;
|
||||
width: 300px; /* fixed width to avoid tabs breaking line */
|
||||
z-index: 9;
|
||||
right: 0;
|
||||
}
|
||||
|
||||
#fbPanelBar2 {
|
||||
position: absolute;
|
||||
width: 290px; /* fixed width to avoid tabs breaking line */
|
||||
height: 22px;
|
||||
padding-left: 10px;
|
||||
}
|
||||
|
||||
/* body
|
||||
*************************************************************************************************/
|
||||
.fbPanel {
|
||||
display: none;
|
||||
}
|
||||
|
||||
#fbPanelBox1, #fbPanelBox2 {
|
||||
max-height: inherit;
|
||||
height: 100%;
|
||||
font-size: 11px;
|
||||
}
|
||||
|
||||
#fbPanelBox2 {
|
||||
background: #fff;
|
||||
}
|
||||
|
||||
#fbPanelBox2 {
|
||||
width: 300px;
|
||||
background: #fff;
|
||||
}
|
||||
|
||||
#fbPanel2 {
|
||||
padding-left: 6px;
|
||||
background: #fff;
|
||||
}
|
||||
|
||||
.hide {
|
||||
overflow: hidden !important;
|
||||
position: fixed !important;
|
||||
display: none !important;
|
||||
visibility: hidden !important;
|
||||
}
|
||||
|
||||
/* fbBottom
|
||||
*************************************************************************************************/
|
||||
|
||||
#fbCommand {
|
||||
height: 18px;
|
||||
}
|
||||
|
||||
#fbCommandBox {
|
||||
position: absolute;
|
||||
width: 100%;
|
||||
height: 18px;
|
||||
bottom: 0;
|
||||
overflow: hidden;
|
||||
z-index: 9;
|
||||
background: #fff;
|
||||
border: 0;
|
||||
border-top: 1px solid #ccc;
|
||||
}
|
||||
|
||||
#fbCommandIcon {
|
||||
position: absolute;
|
||||
color: #00f;
|
||||
top: 2px;
|
||||
left: 7px;
|
||||
display: inline;
|
||||
font: 11px Monaco, monospace;
|
||||
z-index: 10;
|
||||
}
|
||||
|
||||
#fbCommandLine {
|
||||
position: absolute;
|
||||
width: 100%;
|
||||
top: 0;
|
||||
left: 0;
|
||||
border: 0;
|
||||
margin: 0;
|
||||
padding: 2px 0 2px 32px;
|
||||
font: 11px Monaco, monospace;
|
||||
z-index: 9;
|
||||
}
|
||||
|
||||
div.fbFitHeight {
|
||||
overflow: auto;
|
||||
_position: absolute;
|
||||
}
|
||||
|
||||
|
||||
/************************************************************************************************
|
||||
Layout Controls
|
||||
*************************************************************************************************/
|
||||
|
||||
/* fbToolbar buttons
|
||||
*************************************************************************************************/
|
||||
#fbWindowButtons a {
|
||||
font-size: 1px;
|
||||
width: 16px;
|
||||
height: 16px;
|
||||
display: block;
|
||||
float: right;
|
||||
margin-right: 4px;
|
||||
text-decoration: none;
|
||||
cursor: default;
|
||||
}
|
||||
|
||||
#fbWindow_btClose {
|
||||
background: url(sprite.png) 0 -119px;
|
||||
}
|
||||
|
||||
#fbWindow_btClose:hover {
|
||||
background: url(sprite.png) -16px -119px;
|
||||
}
|
||||
|
||||
#fbWindow_btDetach {
|
||||
background: url(sprite.png) -32px -119px;
|
||||
}
|
||||
|
||||
#fbWindow_btDetach:hover {
|
||||
background: url(sprite.png) -48px -119px;
|
||||
}
|
||||
|
||||
/* fbPanelBarBox tabs
|
||||
*************************************************************************************************/
|
||||
.fbTab {
|
||||
text-decoration: none;
|
||||
display: none;
|
||||
float: left;
|
||||
width: auto;
|
||||
float: left;
|
||||
cursor: default;
|
||||
font-family: Lucida Grande, Tahoma, sans-serif;
|
||||
font-size: 11px;
|
||||
font-weight: bold;
|
||||
height: 22px;
|
||||
color: #565656;
|
||||
}
|
||||
|
||||
.fbPanelBar span {
|
||||
display: block;
|
||||
float: left;
|
||||
}
|
||||
|
||||
.fbPanelBar .fbTabL,.fbPanelBar .fbTabR {
|
||||
height: 22px;
|
||||
width: 8px;
|
||||
}
|
||||
|
||||
.fbPanelBar .fbTabText {
|
||||
padding: 4px 1px 0;
|
||||
}
|
||||
|
||||
a.fbTab:hover {
|
||||
background: url(sprite.png) 0 -73px;
|
||||
}
|
||||
|
||||
a.fbTab:hover .fbTabL {
|
||||
background: url(sprite.png) -16px -96px;
|
||||
}
|
||||
|
||||
a.fbTab:hover .fbTabR {
|
||||
background: url(sprite.png) -24px -96px;
|
||||
}
|
||||
|
||||
.fbSelectedTab {
|
||||
background: url(sprite.png) #f1f2ee 0 -50px !important;
|
||||
color: #000;
|
||||
}
|
||||
|
||||
.fbSelectedTab .fbTabL {
|
||||
background: url(sprite.png) 0 -96px !important;
|
||||
}
|
||||
|
||||
.fbSelectedTab .fbTabR {
|
||||
background: url(sprite.png) -8px -96px !important;
|
||||
}
|
||||
|
||||
/* splitters
|
||||
*************************************************************************************************/
|
||||
#fbHSplitter {
|
||||
position: absolute;
|
||||
left: 0;
|
||||
top: 0;
|
||||
width: 100%;
|
||||
height: 5px;
|
||||
overflow: hidden;
|
||||
cursor: n-resize !important;
|
||||
background: url(pixel_transparent.gif);
|
||||
z-index: 9;
|
||||
}
|
||||
|
||||
#fbHSplitter.fbOnMovingHSplitter {
|
||||
height: 100%;
|
||||
z-index: 100;
|
||||
}
|
||||
|
||||
.fbVSplitter {
|
||||
background: #ece9d8;
|
||||
color: #000;
|
||||
border: 1px solid #716f64;
|
||||
border-width: 0 1px;
|
||||
border-left-color: #aca899;
|
||||
width: 4px;
|
||||
cursor: e-resize;
|
||||
overflow: hidden;
|
||||
right: 294px;
|
||||
text-decoration: none;
|
||||
z-index: 9;
|
||||
position: absolute;
|
||||
height: 100%;
|
||||
top: 27px;
|
||||
_width: 6px;
|
||||
}
|
||||
|
||||
/************************************************************************************************/
|
||||
div.lineNo {
|
||||
font: 11px Monaco, monospace;
|
||||
float: left;
|
||||
display: inline;
|
||||
position: relative;
|
||||
margin: 0;
|
||||
padding: 0 5px 0 20px;
|
||||
background: #eee;
|
||||
color: #888;
|
||||
border-right: 1px solid #ccc;
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
pre.nodeCode {
|
||||
font: 11px Monaco, monospace;
|
||||
margin: 0;
|
||||
padding-left: 10px;
|
||||
overflow: hidden;
|
||||
/*
|
||||
_width: 100%;
|
||||
/**/
|
||||
}
|
||||
|
||||
/************************************************************************************************/
|
||||
.nodeControl {
|
||||
margin-top: 3px;
|
||||
margin-left: -14px;
|
||||
float: left;
|
||||
width: 9px;
|
||||
height: 9px;
|
||||
overflow: hidden;
|
||||
cursor: default;
|
||||
background: url(tree_open.gif);
|
||||
_float: none;
|
||||
_display: inline;
|
||||
_position: absolute;
|
||||
}
|
||||
|
||||
div.nodeMaximized {
|
||||
background: url(tree_close.gif);
|
||||
}
|
||||
|
||||
div.objectBox-element {
|
||||
padding: 1px 3px;
|
||||
}
|
||||
.objectBox-selector{
|
||||
cursor: default;
|
||||
}
|
||||
|
||||
.selectedElement{
|
||||
background: highlight;
|
||||
/* background: url(roundCorner.svg); Opera */
|
||||
color: #fff !important;
|
||||
}
|
||||
.selectedElement span{
|
||||
color: #fff !important;
|
||||
}
|
||||
|
||||
/* Webkit CSS Hack - bug in "highlight" named color */
|
||||
@media screen and (-webkit-min-device-pixel-ratio:0) {
|
||||
.selectedElement{
|
||||
background: #316AC5;
|
||||
color: #fff !important;
|
||||
}
|
||||
}
|
||||
|
||||
/************************************************************************************************/
|
||||
/************************************************************************************************/
|
||||
.logRow * {
|
||||
font-size: 11px;
|
||||
}
|
||||
|
||||
.logRow {
|
||||
position: relative;
|
||||
border-bottom: 1px solid #D7D7D7;
|
||||
padding: 2px 4px 1px 6px;
|
||||
background-color: #FFFFFF;
|
||||
}
|
||||
|
||||
.logRow-command {
|
||||
font-family: Monaco, monospace;
|
||||
color: blue;
|
||||
}
|
||||
|
||||
.objectBox-string,
|
||||
.objectBox-text,
|
||||
.objectBox-number,
|
||||
.objectBox-function,
|
||||
.objectLink-element,
|
||||
.objectLink-textNode,
|
||||
.objectLink-function,
|
||||
.objectBox-stackTrace,
|
||||
.objectLink-profile {
|
||||
font-family: Monaco, monospace;
|
||||
}
|
||||
|
||||
.objectBox-null {
|
||||
padding: 0 2px;
|
||||
border: 1px solid #666666;
|
||||
background-color: #888888;
|
||||
color: #FFFFFF;
|
||||
}
|
||||
|
||||
.objectBox-string {
|
||||
color: red;
|
||||
white-space: pre;
|
||||
}
|
||||
|
||||
.objectBox-number {
|
||||
color: #000088;
|
||||
}
|
||||
|
||||
.objectBox-function {
|
||||
color: DarkGreen;
|
||||
}
|
||||
|
||||
.objectBox-object {
|
||||
color: DarkGreen;
|
||||
font-weight: bold;
|
||||
font-family: Lucida Grande, sans-serif;
|
||||
}
|
||||
|
||||
.objectBox-array {
|
||||
color: #000;
|
||||
}
|
||||
|
||||
/************************************************************************************************/
|
||||
.logRow-info,.logRow-error,.logRow-warning {
|
||||
background: #fff no-repeat 2px 2px;
|
||||
padding-left: 20px;
|
||||
padding-bottom: 3px;
|
||||
}
|
||||
|
||||
.logRow-info {
|
||||
background-image: url(infoIcon.png);
|
||||
}
|
||||
|
||||
.logRow-warning {
|
||||
background-color: cyan;
|
||||
background-image: url(warningIcon.png);
|
||||
}
|
||||
|
||||
.logRow-error {
|
||||
background-color: LightYellow;
|
||||
background-image: url(errorIcon.png);
|
||||
color: #f00;
|
||||
}
|
||||
|
||||
.errorMessage {
|
||||
vertical-align: top;
|
||||
color: #f00;
|
||||
}
|
||||
|
||||
.objectBox-sourceLink {
|
||||
position: absolute;
|
||||
right: 4px;
|
||||
top: 2px;
|
||||
padding-left: 8px;
|
||||
font-family: Lucida Grande, sans-serif;
|
||||
font-weight: bold;
|
||||
color: #0000FF;
|
||||
}
|
||||
|
||||
/************************************************************************************************/
|
||||
.logRow-group {
|
||||
background: #EEEEEE;
|
||||
border-bottom: none;
|
||||
}
|
||||
|
||||
.logGroup {
|
||||
background: #EEEEEE;
|
||||
}
|
||||
|
||||
.logGroupBox {
|
||||
margin-left: 24px;
|
||||
border-top: 1px solid #D7D7D7;
|
||||
border-left: 1px solid #D7D7D7;
|
||||
}
|
||||
|
||||
/************************************************************************************************/
|
||||
.selectorTag,.selectorId,.selectorClass {
|
||||
font-family: Monaco, monospace;
|
||||
font-weight: normal;
|
||||
}
|
||||
|
||||
.selectorTag {
|
||||
color: #0000FF;
|
||||
}
|
||||
|
||||
.selectorId {
|
||||
color: DarkBlue;
|
||||
}
|
||||
|
||||
.selectorClass {
|
||||
color: red;
|
||||
}
|
||||
|
||||
/************************************************************************************************/
|
||||
.objectBox-element {
|
||||
font-family: Monaco, monospace;
|
||||
color: #000088;
|
||||
}
|
||||
|
||||
.nodeChildren {
|
||||
padding-left: 26px;
|
||||
}
|
||||
|
||||
.nodeTag {
|
||||
color: blue;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.nodeValue {
|
||||
color: #FF0000;
|
||||
font-weight: normal;
|
||||
}
|
||||
|
||||
.nodeText,.nodeComment {
|
||||
margin: 0 2px;
|
||||
vertical-align: top;
|
||||
}
|
||||
|
||||
.nodeText {
|
||||
color: #333333;
|
||||
font-family: Monaco, monospace;
|
||||
}
|
||||
|
||||
.nodeComment {
|
||||
color: DarkGreen;
|
||||
}
|
||||
|
||||
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
|
||||
|
||||
.nodeHidden, .nodeHidden * {
|
||||
color: #888888;
|
||||
}
|
||||
|
||||
.nodeHidden .nodeTag {
|
||||
color: #5F82D9;
|
||||
}
|
||||
|
||||
.nodeHidden .nodeValue {
|
||||
color: #D86060;
|
||||
}
|
||||
|
||||
.selectedElement .nodeHidden, .selectedElement .nodeHidden * {
|
||||
color: SkyBlue !important;
|
||||
}
|
||||
|
||||
|
||||
/************************************************************************************************/
|
||||
.log-object {
|
||||
/*
|
||||
_position: relative;
|
||||
_height: 100%;
|
||||
/**/
|
||||
}
|
||||
|
||||
.property {
|
||||
position: relative;
|
||||
clear: both;
|
||||
height: 15px;
|
||||
}
|
||||
|
||||
.propertyNameCell {
|
||||
vertical-align: top;
|
||||
float: left;
|
||||
width: 28%;
|
||||
position: absolute;
|
||||
left: 0;
|
||||
z-index: 0;
|
||||
}
|
||||
|
||||
.propertyValueCell {
|
||||
float: right;
|
||||
width: 68%;
|
||||
background: #fff;
|
||||
position: absolute;
|
||||
padding-left: 5px;
|
||||
display: table-cell;
|
||||
right: 0;
|
||||
z-index: 1;
|
||||
/*
|
||||
_position: relative;
|
||||
/**/
|
||||
}
|
||||
|
||||
.propertyName {
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.FirebugPopup {
|
||||
height: 100% !important;
|
||||
}
|
||||
|
||||
.FirebugPopup #fbWindowButtons {
|
||||
display: none !important;
|
||||
}
|
||||
|
||||
.FirebugPopup #fbHSplitter {
|
||||
display: none !important;
|
||||
}
|
||||
|
|
@ -1,20 +0,0 @@
|
|||
/************************************************************************************************/
|
||||
#fbToolbarSearch {
|
||||
background-image: url(search.gif) !important;
|
||||
}
|
||||
/************************************************************************************************/
|
||||
.fbErrors {
|
||||
background-image: url(errorIcon.gif) !important;
|
||||
}
|
||||
/************************************************************************************************/
|
||||
.logRow-info {
|
||||
background-image: url(infoIcon.gif) !important;
|
||||
}
|
||||
|
||||
.logRow-warning {
|
||||
background-image: url(warningIcon.gif) !important;
|
||||
}
|
||||
|
||||
.logRow-error {
|
||||
background-image: url(errorIcon.gif) !important;
|
||||
}
|
||||