Lots of updates

This commit is contained in:
baldo 2016-05-16 13:33:49 +02:00
commit 39e7af6238
454 changed files with 221168 additions and 36622 deletions

14
app/bower_components/lodash/.bower.json vendored Normal file
View file

@ -0,0 +1,14 @@
{
"name": "lodash",
"homepage": "https://github.com/lodash/lodash",
"version": "4.12.0",
"_release": "4.12.0",
"_resolution": {
"type": "version",
"tag": "4.12.0",
"commit": "2b01132731a534fd4cccdbe8dc989cfb399ccb56"
},
"_source": "https://github.com/lodash/lodash.git",
"_target": "~4.12.0",
"_originalSource": "lodash"
}

View file

@ -0,0 +1,12 @@
# 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

View file

@ -0,0 +1 @@
* text=auto

View file

@ -0,0 +1,78 @@
# 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 theyll 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. 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. Dont
worry about regenerating the `dist/` or `doc/` files.
Before running the unit tests youll 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 Russells 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`.

View file

@ -0,0 +1,9 @@
.DS_Store
*.custom.*
*.log
*.map
lodash.compat.min.js
coverage
node_modules
.opt-in
.opt-out

97
app/bower_components/lodash/.jscsrc vendored Normal file
View file

@ -0,0 +1,97 @@
{
"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
}
}

View file

@ -0,0 +1,44 @@
var _ = require('./lodash.js');
function mockQuery() {
return {
'on': function(eventName, callback) {
callback();
}
};
}
mockQuery.each = _.each;
module.exports = {
'babel': false,
'globals': {
'_': _,
// Example mocks.
'asyncSave': _.noop,
'addContactToList': _.noop,
'batchLog': _.noop,
'calculateLayout': _.noop,
'createApplication': _.noop,
'data': { 'user': 'mock'},
'mainText': '',
'renewToken': _.noop,
'sendMail': _.noop,
'updatePosition': _.noop,
// DOM mocks.
'document': { 'body': { 'childNodes': [], 'nodeName': 'BODY' } },
'element': {},
'EventSource': _.noop,
'jQuery': mockQuery,
'window': {},
// Node.js mocks.
'Buffer': Buffer,
'fs': { 'writeFileSync': _.noop },
'path': require('path'),
'process': process,
'setImmediate': setImmediate
}
}

86
app/bower_components/lodash/.travis.yml vendored Normal file
View file

@ -0,0 +1,86 @@
language: node_js
sudo: false
node_js:
- "6"
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:
- "nvm use $TRAVIS_NODE_VERSION"
- "npm set loglevel error"
- "npm set progress false"
- "npm i -g npm@\"^2.0.0\""
- |
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
- "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 && 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\""

47
app/bower_components/lodash/LICENSE vendored Normal file
View file

@ -0,0 +1,47 @@
Copyright jQuery Foundation and other contributors <https://jquery.org/>
Based on Underscore.js, copyright 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
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.
====
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.

46
app/bower_components/lodash/README.md vendored Normal file
View file

@ -0,0 +1,46 @@
# lodash v4.12.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/4.12.0/.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.12.0/LICENSE) & supports [modern environments](#support).<br>
Review the [build differences](https://github.com/lodash/lodash/wiki/build-differences) & pick one thats right for you.
* [Core build](https://raw.githubusercontent.com/lodash/lodash/4.12.0/dist/lodash.core.js) ([~4 kB gzipped](https://raw.githubusercontent.com/lodash/lodash/4.12.0/dist/lodash.core.min.js))
* [Full build](https://raw.githubusercontent.com/lodash/lodash/4.12.0/dist/lodash.js) ([~22 kB gzipped](https://raw.githubusercontent.com/lodash/lodash/4.12.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. Lodashs 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-amd](https://www.npmjs.com/package/lodash-amd)
* [lodash-es](https://www.npmjs.com/package/lodash-es) & [babel-plugin-lodash](https://www.npmjs.com/package/babel-plugin-lodash)
* [lodash/fp](https://github.com/lodash/lodash/tree/4.12.0-npm/fp)

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,28 @@
/**
* @license
* lodash lodash.com/license | Underscore.js 1.8.3 underscorejs.org/LICENSE
*/
;(function(){function n(n,t){return n.push.apply(n,t),n}function t(n,t,r){var e;return r(n,function(n,r,u){return t(n,r,u)?(e=n,false):void 0}),e}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 O(t,function(t){return n[t]})}function u(n){return n&&n.Object===Object?n:null}function o(n){return gn[n]}function i(n){var t=false;if(null!=n&&typeof n.toString!="function")try{t=!!(n+"")}catch(r){}return t}function c(n){return n instanceof f?n:new f(n)}function f(n,t){
this.__wrapped__=n,this.__actions__=[],this.__chain__=!!t}function a(n,t,r,e){var u;return(u=n===pn)||(u=En[r],u=(n===u||n!==n&&u!==u)&&!kn.call(e,r)),u?t:n}function l(n){return nn(n)?Bn(n):{}}function p(n,t,r){if(typeof n!="function")throw new TypeError("Expected a function");return setTimeout(function(){n.apply(pn,r)},t)}function s(n,t){var r=true;return zn(n,function(n,e,u){return r=!!t(n,e,u)}),r}function h(n,t,r){for(var e=-1,u=n.length;++e<u;){var o=n[e],i=t(o);if(null!=i&&(c===pn?i===i:r(i,c)))var c=i,f=o;
}return f}function v(n,t){var r=[];return zn(n,function(n,e,u){t(n,e,u)&&r.push(n)}),r}function y(t,r,e,u,o){var i=-1,c=t.length;for(e||(e=G),o||(o=[]);++i<c;){var f=t[i];r>0&&e(f)?r>1?y(f,r-1,e,u,o):n(o,f):u||(o[o.length]=f)}return o}function g(n,t){return n&&Cn(n,t,on)}function b(n,t){return v(t,function(t){return Y(n[t])})}function _(n,t){return n>t}function d(n,t,r,e,u){return n===t?true:null==n||null==t||!nn(n)&&!tn(t)?n!==n&&t!==t:j(n,t,d,r,e,u)}function j(n,t,r,e,u,o){var c=Vn(n),f=Vn(t),a="[object Array]",l="[object Array]";
c||(a=Sn.call(n),a="[object Arguments]"==a?"[object Object]":a),f||(l=Sn.call(t),l="[object Arguments]"==l?"[object Object]":l);var p="[object Object]"==a&&!i(n),f="[object Object]"==l&&!i(t),l=a==l;o||(o=[]);var s=V(o,function(t){return t[0]===n});return s&&s[1]?s[1]==t:(o.push([n,t]),l&&!p?(r=c||isTypedArray(n)?$(n,t,r,e,u,o):q(n,t,a),o.pop(),r):2&u||(c=p&&kn.call(n,"__wrapped__"),a=f&&kn.call(t,"__wrapped__"),!c&&!a)?l?(r=z(n,t,r,e,u,o),o.pop(),r):false:(c=c?n.value():n,t=a?t.value():t,r=r(c,t,e,u,o),
o.pop(),r))}function m(n){return typeof n=="function"?n:null==n?an:(typeof n=="object"?A:k)(n)}function w(n){n=null==n?n:Object(n);var t,r=[];for(t in n)r.push(t);return r}function x(n,t){return t>n}function O(n,t){var r=-1,e=X(n)?Array(n.length):[];return zn(n,function(n,u,o){e[++r]=t(n,u,o)}),e}function A(n){var t=on(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&&d(n[u],r[u],pn,3)))return false}return true}}function E(n,t){return n=Object(n),K(t,function(t,r){
return r in n&&(t[r]=n[r]),t},{})}function k(n){return function(t){return null==t?pn:t[n]}}function N(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 S(n){return N(n,0,n.length)}function T(n,t){var r;return zn(n,function(n,e,u){return r=t(n,e,u),!r}),!!r}function F(t,r){return K(r,function(t,r){return r.func.apply(r.thisArg,n([t],r.args))},t)}function R(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):n[i],f=r,a=f[i];kn.call(f,i)&&(a===c||a!==a&&c!==c)&&(c!==pn||i in f)||(f[i]=c)}return r}function B(n){return Q(function(t,r){var e=-1,u=r.length,o=u>1?r[u-1]:pn,o=n.length>3&&typeof o=="function"?(u--,o):pn;for(t=Object(t);++e<u;){var i=r[e];i&&n(t,i,e,o)}return t})}function D(n){return function(){var t=arguments,r=l(n.prototype),t=n.apply(r,t);return nn(t)?t:r}}function I(n,t,r){function e(){for(var o=-1,i=arguments.length,c=-1,f=r.length,a=Array(f+i),l=this&&this!==On&&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=D(n);return e}function $(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?[]:pn;++c<i;){var l=n[c],p=t[c];if(void 0!==pn){f=false;break}if(a){if(!T(t,function(n,t){return U(a,t)||l!==n&&!r(l,n,e,u,o)?void 0:a.push(t)})){f=false;break}}else if(l!==p&&!r(l,p,e,u,o)){f=false;break}}return f}function q(n,t,r){switch(r){case"[object Boolean]":case"[object Date]":
return+n==+t;case"[object Error]":return n.name==t.name&&n.message==t.message;case"[object Number]":return n!=+n?t!=+t:n==+t;case"[object RegExp]":case"[object String]":return n==t+""}return false}function z(n,t,r,e,u,o){var i=2&u,c=on(n),f=c.length,a=on(t).length;if(f!=a&&!i)return false;for(var l=f;l--;){var p=c[l];if(!(i?p in t:kn.call(t,p)))return false}for(a=true;++l<f;){var p=c[l],s=n[p],h=t[p];if(void 0!==pn||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 C(n){var t=n?n.length:pn;if(Z(t)&&(Vn(n)||en(n)||W(n))){n=String;for(var r=-1,e=Array(t);++r<t;)e[r]=n(r);t=e}else t=null;return t}function G(n){return Vn(n)||W(n)}function J(n,t){return t=null==t?9007199254740991:t,!!t&&(typeof n=="number"||yn.test(n))&&n>-1&&0==n%1&&t>n}function M(n){var t=n&&n.constructor;return n===(typeof t=="function"&&t.prototype||En);
}function P(n){return n&&n.length?n[0]:pn}function U(n,t,r){var e=n?n.length:0;r=typeof r=="number"?0>r?qn(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 V(n,r){return t(n,m(r),zn)}function H(n,t){return zn(n,m(t))}function K(n,t,e){return r(n,m(t),e,3>arguments.length,zn)}function L(n,t){var r;if(typeof t!="function")throw new TypeError("Expected a function");return n=Hn(n),function(){return 0<--n&&(r=t.apply(this,arguments)),1>=n&&(t=pn),r}}
function Q(n){var t;if(typeof n!="function")throw new TypeError("Expected a function");return t=qn(t===pn?n.length-1:Hn(t),0),function(){for(var r=arguments,e=-1,u=qn(r.length-t,0),o=Array(u);++e<u;)o[e]=r[t+e];for(u=Array(t+1),e=-1;++e<t;)u[e]=r[e];return u[t]=o,n.apply(this,u)}}function W(n){return tn(n)&&X(n)&&kn.call(n,"callee")&&(!Dn.call(n,"callee")||"[object Arguments]"==Sn.call(n))}function X(n){return null!=n&&Z(Gn(n))&&!Y(n)}function Y(n){return n=nn(n)?Sn.call(n):"","[object Function]"==n||"[object GeneratorFunction]"==n;
}function Z(n){return typeof n=="number"&&n>-1&&0==n%1&&9007199254740991>=n}function nn(n){var t=typeof n;return!!n&&("object"==t||"function"==t)}function tn(n){return!!n&&typeof n=="object"}function rn(n){return typeof n=="number"||tn(n)&&"[object Number]"==Sn.call(n)}function en(n){return typeof n=="string"||!Vn(n)&&tn(n)&&"[object String]"==Sn.call(n)}function un(n){return typeof n=="string"?n:null==n?"":n+""}function on(n){var t=M(n);if(!t&&!X(n))return $n(Object(n));var r,e=C(n),u=!!e,e=e||[],o=e.length;
for(r in n)!kn.call(n,r)||u&&("length"==r||J(r,o))||t&&"constructor"==r||e.push(r);return e}function cn(n){for(var t=-1,r=M(n),e=w(n),u=e.length,o=C(n),i=!!o,o=o||[],c=o.length;++t<u;){var f=e[t];i&&("length"==f||J(f,c))||"constructor"==f&&(r||!kn.call(n,f))||o.push(f)}return o}function fn(n){return n?e(n,on(n)):[]}function an(n){return n}function ln(t,r,e){var u=on(r),o=b(r,u);null!=e||nn(r)&&(o.length||!u.length)||(e=r,r=t,t=this,o=b(r,on(r)));var i=!(nn(e)&&"chain"in e&&!e.chain),c=Y(t);return zn(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__=S(this.__actions__)).push({func:u,args:arguments,thisArg:t}),e.__chain__=r,e}return u.apply(t,n([this.value()],arguments))})}),t}var pn,sn=1/0,hn=/[&<>"'`]/g,vn=RegExp(hn.source),yn=/^(?:0|[1-9]\d*)$/,gn={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;","`":"&#96;"},bn={"function":true,object:true},_n=bn[typeof exports]&&exports&&!exports.nodeType?exports:pn,dn=bn[typeof module]&&module&&!module.nodeType?module:pn,jn=dn&&dn.exports===_n?_n:pn,mn=u(bn[typeof self]&&self),wn=u(bn[typeof window]&&window),xn=u(bn[typeof this]&&this),On=u(_n&&dn&&typeof global=="object"&&global)||wn!==(xn&&xn.window)&&wn||mn||xn||Function("return this")(),An=Array.prototype,En=Object.prototype,kn=En.hasOwnProperty,Nn=0,Sn=En.toString,Tn=On._,Fn=On.Reflect,Rn=Fn?Fn.a:pn,Bn=Object.create,Dn=En.propertyIsEnumerable,In=On.isFinite,$n=Object.keys,qn=Math.max;
f.prototype=l(c.prototype),f.prototype.constructor=f;var zn=function(n,t){return function(r,e){if(null==r)return r;if(!X(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}}(g),Cn=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}}();Rn&&!Dn.call({valueOf:1},"valueOf")&&(w=function(n){n=Rn(n);for(var t,r=[];!(t=n.next()).done;)r.push(t.value);return r});var Gn=k("length"),Jn=String,Mn=Q(function(n,t,r){
return I(n,t,r)}),Pn=Q(function(n,t){return p(n,1,t)}),Un=Q(function(n,t,r){return p(n,Kn(t)||0,r)}),Vn=Array.isArray,Hn=Number,Kn=Number,Ln=B(function(n,t){R(t,on(t),n)}),Qn=B(function(n,t){R(t,cn(t),n)}),Wn=B(function(n,t,r,e){R(t,cn(t),n,e)}),Xn=Q(function(n){return n.push(pn,a),Wn.apply(pn,n)}),Yn=Q(function(n,t){return null==n?{}:E(n,O(y(t,1),Jn))}),Zn=m;c.assignIn=Qn,c.before=L,c.bind=Mn,c.chain=function(n){return n=c(n),n.__chain__=true,n},c.compact=function(n){return v(n,Boolean)},c.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(Vn(e)?S(e):[e],y(r,1)):[]},c.create=function(n,t){var r=l(n);return t?Ln(r,t):r},c.defaults=Xn,c.defer=Pn,c.delay=Un,c.filter=function(n,t){return v(n,m(t))},c.flatten=function(n){return n&&n.length?y(n,1):[]},c.flattenDeep=function(n){return n&&n.length?y(n,sn):[]},c.iteratee=Zn,c.keys=on,c.map=function(n,t){return O(n,m(t))},c.matches=function(n){return A(Ln({},n))},c.mixin=ln,c.negate=function(n){
if(typeof n!="function")throw new TypeError("Expected a function");return function(){return!n.apply(this,arguments)}},c.once=function(n){return L(2,n)},c.pick=Yn,c.slice=function(n,t,r){var e=n?n.length:0;return r=r===pn?e:+r,e?N(n,null==t?0:+t,r):[]},c.sortBy=function(n,t){var r=0;return t=m(t),O(O(n,function(n,e,u){return{value:n,index:r++,criteria:t(n,e,u)}}).sort(function(n,t){var r;n:{r=n.criteria;var e=t.criteria;if(r!==e){var u=r!==pn,o=null===r,i=r===r,c=e!==pn,f=null===e,a=e===e;if(!f&&r>e||o&&c&&a||!u&&a||!i){
r=1;break n}if(!o&&e>r||f&&u&&i||!c&&i||!a){r=-1;break n}}r=0}return r||n.index-t.index}),k("value"))},c.tap=function(n,t){return t(n),n},c.thru=function(n,t){return t(n)},c.toArray=function(n){return X(n)?n.length?S(n):[]:fn(n)},c.values=fn,c.extend=Qn,ln(c,c),c.clone=function(n){return nn(n)?Vn(n)?S(n):R(n,on(n)):n},c.escape=function(n){return(n=un(n))&&vn.test(n)?n.replace(hn,o):n},c.every=function(n,t,r){return t=r?pn:t,s(n,m(t))},c.find=V,c.forEach=H,c.has=function(n,t){return null!=n&&kn.call(n,t);
},c.head=P,c.identity=an,c.indexOf=U,c.isArguments=W,c.isArray=Vn,c.isBoolean=function(n){return true===n||false===n||tn(n)&&"[object Boolean]"==Sn.call(n)},c.isDate=function(n){return tn(n)&&"[object Date]"==Sn.call(n)},c.isEmpty=function(n){return X(n)&&(Vn(n)||en(n)||Y(n.splice)||W(n))?!n.length:!on(n).length},c.isEqual=function(n,t){return d(n,t)},c.isFinite=function(n){return typeof n=="number"&&In(n)},c.isFunction=Y,c.isNaN=function(n){return rn(n)&&n!=+n},c.isNull=function(n){return null===n},c.isNumber=rn,
c.isObject=nn,c.isRegExp=function(n){return nn(n)&&"[object RegExp]"==Sn.call(n)},c.isString=en,c.isUndefined=function(n){return n===pn},c.last=function(n){var t=n?n.length:0;return t?n[t-1]:pn},c.max=function(n){return n&&n.length?h(n,an,_):pn},c.min=function(n){return n&&n.length?h(n,an,x):pn},c.noConflict=function(){return On._===this&&(On._=Tn),this},c.noop=function(){},c.reduce=K,c.result=function(n,t,r){return t=null==n?pn:n[t],t===pn&&(t=r),Y(t)?t.call(n):t},c.size=function(n){return null==n?0:(n=X(n)?n:on(n),
n.length)},c.some=function(n,t,r){return t=r?pn:t,T(n,m(t))},c.uniqueId=function(n){var t=++Nn;return un(n)+t},c.each=H,c.first=P,ln(c,function(){var n={};return g(c,function(t,r){kn.call(c.prototype,r)||(n[r]=t)}),n}(),{chain:false}),c.VERSION="4.12.0",zn("pop join replace reverse split push shift sort splice unshift".split(" "),function(n){var t=(/^(?:replace|split)$/.test(n)?String.prototype:An)[n],r=/^(?:push|sort|unshift)$/.test(n)?"tap":"thru",e=/^(?:pop|join|replace|shift)$/.test(n);c.prototype[n]=function(){
var n=arguments;if(e&&!this.__chain__){var u=this.value();return t.apply(Vn(u)?u:[],n)}return this[r](function(r){return t.apply(Vn(r)?r:[],n)})}}),c.prototype.toJSON=c.prototype.valueOf=c.prototype.value=function(){return F(this.__wrapped__,this.__actions__)},(wn||mn||{})._=c,typeof define=="function"&&typeof define.amd=="object"&&define.amd? define(function(){return c}):_n&&dn?(jn&&((dn.exports=c)._=c),_n._=c):On._=c}).call(this);

View file

@ -0,0 +1,860 @@
(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["fp"] = factory();
else
root["fp"] = 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, __webpack_require__) {
var baseConvert = __webpack_require__(1);
/**
* 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 */
/***/ function(module, exports, __webpack_require__) {
var mapping = __webpack_require__(2),
mutateMap = mapping.mutate,
fallbackHolder = __webpack_require__(3);
/**
* 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 immutWrap(func, cloner) {
return function() {
var length = arguments.length;
if (!length) {
return result;
}
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,
'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,
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;
};
},
'runInContext': function(runInContext) {
return function(context) {
return baseConvert(util, runInContext(context), options);
};
}
};
/*--------------------------------------------------------------------------*/
/**
* 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 passed
* thru `transform`.
*
* @private
* @param {Function} func The function to wrap.
* @param {...Function} transform The functions to transform the first argument.
* @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 = immutWrap(func, cloneArray);
}
else if (mutateMap.object[name]) {
wrapped = immutWrap(func, createCloner(func));
}
else if (mutateMap.set[name]) {
wrapped = immutWrap(func, cloneByPath);
}
}
each(aryMethodKeys, function(aryKey) {
each(mapping.aryMethod[aryKey], function(otherName) {
if (name == otherName) {
var aryN = !isLib && mapping.iterateeAry[name],
reargIndexes = mapping.iterateeRearg[name],
spreadStart = mapping.methodSpread[name];
result = wrapped;
if (config.fixed && (forceFixed || !mapping.skipFixed[name])) {
result = spreadStart === undefined
? ary(result, aryKey)
: spread(result, spreadStart);
}
if (config.rearg && aryKey > 1 && (forceRearg || !mapping.skipRearg[name])) {
result = rearg(result, mapping.methodRearg[name] || mapping.aryRearg[aryKey]);
}
if (config.cap) {
if (reargIndexes) {
result = iterateeRearg(result, reargIndexes);
} else if (aryN) {
result = iterateeAry(result, aryN);
}
}
if (forceCurry || (config.curry && aryKey > 1)) {
forceCurry && console.log(forceCurry, name);
result = curry(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;
/***/ },
/* 2 */
/***/ 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',
'extendWith': 'assignInWith',
'first': 'head',
// Ramda aliases.
'__': 'placeholder',
'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',
'equals': 'isEqual',
'identical': 'eq',
'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',
'unapply': 'rest',
'unnest': 'flatten',
'useWith': 'overArgs',
'whereEq': 'filter',
'zipObj': 'zipObject'
};
/** Used to map ary to method names. */
exports.aryMethod = {
'1': [
'attempt', 'castArray', 'ceil', 'create', 'curry', 'curryRight', 'floor',
'flow', 'flowRight', 'fromPairs', 'invert', 'iteratee', 'memoize', 'method',
'methodOf', 'mixin', 'over', 'overEvery', 'overSome', 'rest', 'reverse',
'round', 'runInContext', 'spread', 'template', 'trim', 'trimEnd', 'trimStart',
'uniqueId', 'words'
],
'2': [
'add', 'after', 'ary', 'assign', 'assignIn', 'at', 'before', 'bind', 'bindAll',
'bindKey', 'chunk', 'cloneDeepWith', 'cloneWith', 'concat', 'countBy', 'curryN',
'curryRightN', 'debounce', 'defaults', 'defaultsDeep', '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', 'minBy', 'multiply', 'nth',
'omit', 'omitBy', 'overArgs', 'pad', 'padEnd', 'padStart', 'parseInt',
'partial', 'partialRight', 'partition', 'pick', 'pickBy', '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',
'getOr', 'inRange', 'intersectionBy', 'intersectionWith', 'invokeArgs',
'invokeArgsMap', 'isEqualWith', 'isMatchWith', 'flatMapDepth', '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,
'findIndex': 1,
'findKey': 1,
'findLast': 1,
'findLastIndex': 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 = {
'assignInWith': [1, 2, 0],
'assignWith': [1, 2, 0],
'getOr': [2, 1, 0],
'isEqualWith': [1, 2, 0],
'isMatchWith': [2, 1, 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],
'updateWith': [3, 1, 2, 0],
'zipWith': [1, 2, 0]
};
/** Used to map method names to spread configs. */
exports.methodSpread = {
'invokeArgs': 2,
'invokeArgsMap': 2,
'partial': 1,
'partialRight': 1,
'without': 1
};
/** 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,
'assignIn': true,
'assignInWith': true,
'assignWith': true,
'defaults': true,
'defaultsDeep': true,
'merge': 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 = {
'curryN': 'curry',
'curryRightN': 'curryRight',
'getOr': 'get',
'invokeArgs': 'invoke',
'invokeArgsMap': 'invokeMap',
'padChars': 'pad',
'padCharsEnd': 'padEnd',
'padCharsStart': 'padStart',
'restFrom': 'rest',
'spreadFrom': 'spread',
'trimChars': 'trim',
'trimCharsEnd': 'trimEnd',
'trimCharsStart': 'trimStart'
};
/** Used to track methods that skip fixing their arity. */
exports.skipFixed = {
'castArray': true,
'flow': true,
'flowRight': true,
'iteratee': true,
'mixin': 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,
'random': true,
'range': true,
'rangeRight': true,
'subtract': true,
'without': true,
'zip': true,
'zipObject': true
};
/***/ },
/* 3 */
/***/ function(module, exports) {
/**
* The default argument placeholder value for methods.
*
* @type {Object}
*/
module.exports = {};
/***/ }
/******/ ])
});
;

View file

@ -0,0 +1,16 @@
!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)return i;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 u(t,e,r,d){function f(t,e){e=F(e);for(var r=-1,n=e.length,i=n-1,a=M(Object(t)),o=a;null!=o&&++r<n;){var s=e[r],u=o[s];null!=u&&(o[e[r]]=M(r==i?u:Object(u))),o=o[s]}return a}function h(t){return N.runInContext.convert(t)(void 0)}function y(t,e){var r=d;return function(n){var i=R?B:j,a=R?B[t]:e,o=w(w({},r),n);return u(i,t,a,o)}}function g(t,e){return v(t,function(t){return"function"==typeof t?i(t,e):t})}function m(t,e){return v(t,function(t){var r=e.length;return n(L(i(t,r),e),r)})}function v(t,e){
return function(){var r=arguments.length;if(!r)return t();for(var n=Array(r);r--;)n[r]=arguments[r];var i=I.rearg?0:r-1;return n[i]=e(n[i]),t.apply(void 0,n)}}function x(t,e){t=p.aliasToReal[t]||t;var r,n=e,i=_[t];return i?n=i(e):I.immutable&&(l.array[t]?n=s(e,a):l.object[t]?n=s(e,o(e)):l.set[t]&&(n=s(e,f))),P(T,function(e){return P(p.aryMethod[e],function(i){if(t==i){var a=!R&&p.iterateeAry[t],o=p.iterateeRearg[t],s=p.methodSpread[t];return r=n,!I.fixed||!k&&p.skipFixed[t]||(r=void 0===s?C(r,e):D(r,s)),
I.rearg&&e>1&&(E||!p.skipRearg[t])&&(r=L(r,p.methodRearg[t]||p.aryRearg[e])),I.cap&&(o?r=m(r,o):a&&(r=g(r,a))),(b||I.curry&&e>1)&&(b&&console.log(b,t),r=q(r,e)),!1}}),!r}),r||(r=n),r==e&&(r=b?q(r,1):function(){return e.apply(this,arguments)}),r.convert=y(t,e),p.placeholder[t]&&(W=!0,r.placeholder=e.placeholder=O),r}var W,R="function"==typeof e,A=e===Object(e);if(A&&(d=r,r=e,e=void 0),null==r)throw new TypeError;d||(d={});var I={cap:"cap"in d?d.cap:!0,curry:"curry"in d?d.curry:!0,fixed:"fixed"in d?d.fixed:!0,
immutable:"immutable"in d?d.immutable:!0,rearg:"rearg"in d?d.rearg:!0},b="curry"in d&&d.curry,k="fixed"in d&&d.fixed,E="rearg"in d&&d.rearg,O=R?r:c,B=R?r.runInContext():void 0,j=R?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,toPath:t.toPath},C=j.ary,w=j.assign,M=j.clone,q=j.curry,P=j.forEach,S=j.isArray,z=j.isFunction,K=j.keys,L=j.rearg,D=j.spread,F=j.toPath,T=K(p.aryMethod),_={
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 I.cap&&"number"==typeof r?(r=r>2?r-2:1,a&&r>=a?n:i(n,r)):n}},mixin:function(t){return function(e){var r=this;if(!z(r))return t(r,Object(e));var n=[];return P(K(e),function(t){z(e[t])&&n.push([t,r.prototype[t]])}),t(r,Object(e)),P(n,function(t){var e=t[1];z(e)?r.prototype[t[0]]=e:delete r.prototype[t[0]];
}),r}},runInContext:function(e){return function(r){return u(t,e(r),d)}}};if(!A)return x(e,r);var N=r,V=[];return P(T,function(t){P(p.aryMethod[t],function(t){var e=N[p.remap[t]||t];e&&V.push([t,x(t,e)])})}),P(K(N),function(t){var e=N[t];if("function"==typeof e){for(var r=V.length;r--;)if(V[r][0]==t)return;e.convert=y(t,e),V.push([t,e])}}),P(V,function(t){N[t[0]]=t[1]}),N.convert=h,W&&(N.placeholder=O),P(K(N),function(t){P(p.realToAlias[t]||[],function(e){N[e]=N[t]})}),N}var p=r(2),l=p.mutate,c=r(3);
t.exports=u},function(t,e){e.aliasToReal={each:"forEach",eachRight:"forEachRight",entries:"toPairs",entriesIn:"toPairsIn",extend:"assignIn",extendWith:"assignInWith",first:"head",__:"placeholder",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",equals:"isEqual",identical:"eq",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",unapply:"rest",unnest:"flatten",useWith:"overArgs",whereEq:"filter",zipObj:"zipObject"},e.aryMethod={1:["attempt","castArray","ceil","create","curry","curryRight","floor","flow","flowRight","fromPairs","invert","iteratee","memoize","method","methodOf","mixin","over","overEvery","overSome","rest","reverse","round","runInContext","spread","template","trim","trimEnd","trimStart","uniqueId","words"],
2:["add","after","ary","assign","assignIn","at","before","bind","bindAll","bindKey","chunk","cloneDeepWith","cloneWith","concat","countBy","curryN","curryRightN","debounce","defaults","defaultsDeep","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","minBy","multiply","nth","omit","omitBy","overArgs","pad","padEnd","padStart","parseInt","partial","partialRight","partition","pick","pickBy","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","getOr","inRange","intersectionBy","intersectionWith","invokeArgs","invokeArgsMap","isEqualWith","isMatchWith","flatMapDepth","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,findIndex:1,findKey:1,findLast:1,findLastIndex: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={assignInWith:[1,2,0],assignWith:[1,2,0],getOr:[2,1,0],isEqualWith:[1,2,0],
isMatchWith:[2,1,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],updateWith:[3,1,2,0],zipWith:[1,2,0]},e.methodSpread={invokeArgs:2,invokeArgsMap:2,partial:1,partialRight:1,without:1},e.mutate={array:{fill:!0,pull:!0,pullAll:!0,pullAllBy:!0,pullAllWith:!0,pullAt:!0,remove:!0,reverse:!0},object:{assign:!0,assignIn:!0,assignInWith:!0,assignWith:!0,defaults:!0,defaultsDeep:!0,
merge:!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={curryN:"curry",curryRightN:"curryRight",getOr:"get",invokeArgs:"invoke",invokeArgsMap:"invokeMap",padChars:"pad",padCharsEnd:"padEnd",padCharsStart:"padStart",restFrom:"rest",
spreadFrom:"spread",trimChars:"trim",trimCharsEnd:"trimEnd",trimCharsStart:"trimStart"},e.skipFixed={castArray:!0,flow:!0,flowRight:!0,iteratee:!0,mixin:!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,random:!0,range:!0,rangeRight:!0,subtract:!0,without:!0,zip:!0,zipObject:!0}},function(t,e){t.exports={}}])});

16242
app/bower_components/lodash/dist/lodash.js vendored Normal file

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,125 @@
/**
* @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.length;++u<o;){var i=t[u];n(e,i,r(i),t)}return e}function u(t,n){for(var r=-1,e=t.length;++r<e&&false!==n(t[r],r,t););return t}function o(t,n){for(var r=t.length;r--&&false!==n(t[r],r,t););return t}function i(t,n){
for(var r=-1,e=t.length;++r<e;)if(!n(t[r],r,t))return false;return true}function f(t,n){for(var r=-1,e=t.length,u=0,o=[];++r<e;){var i=t[r];n(i,r,t)&&(o[u++]=i)}return o}function c(t,n){return!!t.length&&-1<d(t,n,0)}function a(t,n,r){for(var e=-1,u=t.length;++e<u;)if(r(n,t[e]))return true;return false}function l(t,n){for(var r=-1,e=t.length,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.length;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.length;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.length;++r<e;)if(n(t[r],r,t))return true;return false}function v(t,n,r,e){var u;return r(t,function(t,r,o){return n(t,r,o)?(u=e?r:t,false):void 0}),u}function g(t,n,r){for(var e=t.length,u=r?e:-1;r?u--:++u<e;)if(n(t[u],u,t))return u;return-1}function d(t,n,r){if(n!==n)return M(t,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,n){var r=t?t.length:0;return r?w(t,n)/r:V}function x(t,n,r,e,u){return u(t,function(t,u,o){r=e?(e=false,t):n(r,t,u,o)}),r}function j(t,n){var r=t.length;for(t.sort(n);r--;)t[r]=t[r].c;return t}function w(t,n){for(var r,e=-1,u=t.length;++e<u;){var o=n(t[e]);o!==T&&(r=r===T?o:r+o)}return r}function m(t,n){for(var r=-1,e=Array(t);++r<t;)e[r]=n(r);return e}function A(t,n){return l(n,function(n){return[n,t[n]]})}function O(t){return function(n){return t(n)}}function k(t,n){return l(n,function(n){
return t[n]})}function E(t,n){return t.has(n)}function I(t,n){for(var r=-1,e=t.length;++r<e&&-1<d(n,t[r],0););return r}function S(t,n){for(var r=t.length;r--&&-1<d(n,t[r],0););return r}function R(t){return t&&t.Object===Object?t:null}function W(t){return zt[t]}function B(t){return Ut[t]}function L(t){return"\\"+$t[t]}function M(t,n,r){var e=t.length;for(n+=r?0:-1;r?n--:++n<e;){var u=t[n];if(u!==u)return n}return-1}function C(t){var n=false;if(null!=t&&typeof t.toString!="function")try{n=!!(t+"")}catch(r){}
return n}function z(t){for(var n,r=[];!(n=t.next()).done;)r.push(n.value);return r}function U(t){var n=-1,r=Array(t.size);return t.forEach(function(t,e){r[++n]=[e,t]}),r}function D(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 F(t){var n=-1,r=Array(t.size);return t.forEach(function(t){r[++n]=t}),r}function $(t){var n=-1,r=Array(t.size);return t.forEach(function(t){r[++n]=[t,t]}),r}function N(t){
if(!t||!Wt.test(t))return t.length;for(var n=St.lastIndex=0;St.test(t);)n++;return n}function P(t){return Dt[t]}function Z(R){function At(t){if(De(t)&&!ai(t)&&!(t instanceof zt)){if(t instanceof kt)return t;if(wu.call(t,"__wrapped__"))return ie(t)}return new kt(t)}function Ot(){}function kt(t,n){this.__wrapped__=t,this.__actions__=[],this.__chain__=!!n,this.__index__=0,this.__values__=T}function zt(t){this.__wrapped__=t,this.__actions__=[],this.__dir__=1,this.__filtered__=false,this.__iteratees__=[],
this.__takeCount__=4294967295,this.__views__=[]}function Ut(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 Dt(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 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 $t(t){var n=-1,r=t?t.length:0;for(this.__data__=new Ft;++n<r;)this.add(t[n])}function Zt(t){this.__data__=new Dt(t)}function Tt(t,n,r,e){return t===T||Se(t,bu[r])&&!wu.call(e,r)?n:t;
}function Vt(t,n,r){(r===T||Se(t[n],r))&&(typeof n!="number"||r!==T||n in t)||(t[n]=r)}function Kt(t,n,r){var e=t[n];wu.call(t,n)&&Se(e,r)&&(r!==T||n in t)||(t[n]=r)}function Gt(t,n){for(var r=t.length;r--;)if(Se(t[r][0],n))return r;return-1}function Ht(t,n,r,e){return go(t,function(t,u,o){n(e,t,r(t),o)}),e}function Qt(t,n){return t&&ar(n,nu(n),t)}function Xt(t,n){for(var r=-1,e=null==t,u=n.length,o=Array(u);++r<u;)o[r]=e?T:Xe(t,n[r]);return o}function tn(t,n,r){return t===t&&(r!==T&&(t=r>=t?t:r),
n!==T&&(t=t>=n?t:n)),t}function nn(t,n,r,e,o,i,f){var c;if(e&&(c=i?e(t,o,i,f):e(t)),c!==T)return c;if(!Ue(t))return t;if(o=ai(t)){if(c=Tr(t),!n)return cr(t,c)}else{var a=Pr(t),l="[object Function]"==a||"[object GeneratorFunction]"==a;if(li(t))return er(t,n);if("[object Object]"==a||"[object Arguments]"==a||l&&!i){if(C(t))return i?t:{};if(c=qr(l?{}:t),!n)return lr(t,Qt(c,t))}else{if(!Ct[a])return i?t:{};c=Vr(t,a,nn,n)}}if(f||(f=new Zt),i=f.get(t))return i;if(f.set(t,c),!o)var s=r?vn(t,nu,Nr):nu(t);
return u(s||t,function(u,o){s&&(o=u,u=t[o]),Kt(c,o,nn(u,n,r,e,o,t,f))}),c}function rn(t){var n=nu(t),r=n.length;return function(e){if(null==e)return!r;for(var u=r;u--;){var o=n[u],i=t[o],f=e[o];if(f===T&&!(o in Object(e))||!i(f))return false}return true}}function en(t){return Ue(t)?zu(t):{}}function un(t,n,r){if(typeof t!="function")throw new du("Expected a function");return Du(function(){t.apply(T,r)},n)}function on(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,O(r))),e?(o=a,
i=false):n.length>=200&&(o=E,i=false,n=new $t(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 fn(t,n){var r=true;return go(t,function(t,e,u){return r=!!n(t,e,u)}),r}function cn(t,n,r){for(var e=-1,u=t.length;++e<u;){var o=t[e],i=n(o);if(null!=i&&(f===T?i===i&&!Te(i):r(i,f)))var f=i,c=o}return c}function an(t,n){var r=[];return go(t,function(t,e,u){n(t,e,u)&&r.push(t)}),r}function ln(t,n,r,e,u){
var o=-1,i=t.length;for(r||(r=Gr),u||(u=[]);++o<i;){var f=t[o];n>0&&r(f)?n>1?ln(f,n-1,r,e,u):s(u,f):e||(u[u.length]=f)}return u}function sn(t,n){return t&&bo(t,n,nu)}function hn(t,n){return t&&xo(t,n,nu)}function pn(t,n){return f(n,function(n){return Me(t[n])})}function _n(t,n){n=Qr(n,t)?[n]:nr(n);for(var r=0,e=n.length;null!=t&&e>r;)t=t[ue(n[r++])];return r&&r==e?t:T}function vn(t,n,r){return n=n(t),ai(t)?n:s(n,r(t))}function gn(t,n){return t>n}function dn(t,n){return wu.call(t,n)||typeof t=="object"&&n in t&&null===Pu(Object(t));
}function yn(t,n){return n in Object(t)}function bn(t,n,r){for(var e=r?a:c,u=t[0].length,o=t.length,i=o,f=Array(o),s=1/0,h=[];i--;){var p=t[i];i&&n&&(p=l(p,O(n))),s=Ku(p.length,s),f[i]=!r&&(n||u>=120&&p.length>=120)?new $t(i&&p):T}var p=t[0],_=-1,v=f[0];t:for(;++_<u&&s>h.length;){var g=p[_],d=n?n(g):g,g=r||0!==g?g:0;if(v?!E(v,d):!e(h,d,r)){for(i=o;--i;){var y=f[i];if(y?!E(y,d):!e(t[i],d,r))continue t}v&&v.push(d),h.push(g)}}return h}function xn(t,n,r){var e={};return sn(t,function(t,u,o){n(e,r(t),u,o);
}),e}function jn(t,n,e){return Qr(n,t)||(n=nr(n),t=ee(t,n),n=le(n)),n=null==t?t:t[ue(n)],null==n?T:r(n,t,e)}function wn(t,n,r,e,u){if(t===n)n=true;else if(null==t||null==n||!Ue(t)&&!De(n))n=t!==t&&n!==n;else t:{var o=ai(t),i=ai(n),f="[object Array]",c="[object Array]";o||(f=Pr(t),f="[object Arguments]"==f?"[object Object]":f),i||(c=Pr(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 Zt),n=o||qe(t)?Lr(t,n,wn,r,e,u):Mr(t,n,f,wn,r,e,u);else{
if(!(2&e)&&(o=a&&wu.call(t,"__wrapped__"),f=i&&wu.call(n,"__wrapped__"),o||f)){t=o?t.value():t,n=f?n.value():n,u||(u=new Zt),n=wn(t,n,r,e,u);break t}if(c)n:if(u||(u=new Zt),o=2&e,f=nu(t),i=f.length,c=nu(n).length,i==c||o){for(a=i;a--;){var l=f[a];if(!(o?l in n:dn(n,l))){n=false;break n}}if(c=u.get(t))n=c==n;else{c=true,u.set(t,n);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(_===T?h!==p&&!wn(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),n=c}}else n=false;else n=false}}return n}function mn(t,n,r,e){var u=r.length,o=u,i=!e;if(null==t)return!o;for(t=Object(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===T&&!(c in t))return false}else{if(f=new Zt,e)var s=e(a,l,c,t,n,f);if(s===T?!wn(l,a,e,3,f):!s)return false;
}}return true}function An(t){return typeof t=="function"?t:null==t?cu:typeof t=="object"?ai(t)?Sn(t[0],t[1]):In(t):hu(t)}function On(t){t=null==t?t:Object(t);var n,r=[];for(n in t)r.push(n);return r}function kn(t,n){return n>t}function En(t,n){var r=-1,e=We(t)?Array(t.length):[];return go(t,function(t,u,o){e[++r]=n(t,u,o)}),e}function In(t){var n=Fr(t);return 1==n.length&&n[0][2]?ne(n[0][0],n[0][1]):function(r){return r===t||mn(r,t,n)}}function Sn(t,n){return Qr(t)&&n===n&&!Ue(n)?ne(ue(t),n):function(r){
var e=Xe(r,t);return e===T&&e===n?tu(r,t):wn(n,e,T,3)}}function Rn(t,n,r,e,o){if(t!==n){if(!ai(n)&&!qe(n))var i=ru(n);u(i||n,function(u,f){if(i&&(f=u,u=n[f]),Ue(u)){o||(o=new Zt);var c=f,a=o,l=t[c],s=n[c],h=a.get(s);if(h)Vt(t,c,h);else{var h=e?e(l,s,c+"",t,n,a):T,p=h===T;p&&(h=s,ai(s)||qe(s)?ai(l)?h=l:Be(l)?h=cr(l):(p=false,h=nn(s,true)):Ne(s)||Re(s)?Re(l)?h=He(l):!Ue(l)||r&&Me(l)?(p=false,h=nn(s,true)):h=l:p=false),a.set(s,h),p&&Rn(h,s,r,e,a),a["delete"](s),Vt(t,c,h)}}else c=e?e(t[f],u,f+"",t,n,o):T,c===T&&(c=u),
Vt(t,f,c)})}}function Wn(t,n){var r=t.length;return r?(n+=0>n?r:0,Yr(n,r)?t[n]:T):void 0}function Bn(t,n,r){var e=-1;return n=l(n.length?n:[cu],O(Ur())),t=En(t,function(t){return{a:l(n,function(n){return n(t)}),b:++e,c:t}}),j(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=or(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 Ln(t,n){return t=Object(t),h(n,function(n,r){return r in t&&(n[r]=t[r]),n},{})}function Mn(t,n){for(var r=-1,e=vn(t,ru,Oo),u=e.length,o={};++r<u;){
var i=e[r],f=t[i];n(f,i)&&(o[i]=f)}return o}function Cn(t){return function(n){return null==n?T:n[t]}}function zn(t){return function(n){return _n(n,t)}}function Un(t,n,r,e){var u=e?y:d,o=-1,i=n.length,f=t;for(r&&(f=l(t,O(r)));++o<i;)for(var c=0,a=n[o],a=r?r(a):a;-1<(c=u(f,a,c,e));)f!==t&&Fu.call(f,c,1),Fu.call(t,c,1);return t}function Dn(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(Yr(u))Fu.call(t,u,1);else if(Qr(u,t))delete t[ue(u)];else{var u=nr(u),i=ee(t,u);null!=i&&delete i[ue(le(u))];
}}}}function Fn(t,n){return t+Nu(Ju()*(n-t+1))}function $n(t,n){var r="";if(!t||1>n||n>9007199254740991)return r;do n%2&&(r+=t),(n=Nu(n/2))&&(t+=t);while(n);return r}function Nn(t,n,r,e){n=Qr(n,t)?[n]:nr(n);for(var u=-1,o=n.length,i=o-1,f=t;null!=f&&++u<o;){var c=ue(n[u]);if(Ue(f)){var a=r;if(u!=i){var l=f[c],a=e?e(l,c,f):T;a===T&&(a=null==l?Yr(n[u+1])?[]:{}:l)}Kt(f,c,a)}f=f[c]}return t}function Pn(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=Array(u);++e<u;)r[e]=t[e+n];
return r}function Zn(t,n){var r;return go(t,function(t,e,u){return r=n(t,e,u),!r}),!!r}function Tn(t,n,r){var e=0,u=t?t.length:e;if(typeof n=="number"&&n===n&&2147483647>=u){for(;u>e;){var o=e+u>>>1,i=t[o];null!==i&&!Te(i)&&(r?n>=i:n>i)?e=o+1:u=o}return u}return qn(t,n,cu,r)}function qn(t,n,r,e){n=r(n);for(var u=0,o=t?t.length:0,i=n!==n,f=null===n,c=Te(n),a=n===T;o>u;){var l=Nu((u+o)/2),s=r(t[l]),h=s!==T,p=null===s,_=s===s,v=Te(s);(i?e||_:a?_&&(e||h):f?_&&h&&(e||!p):c?_&&h&&!p&&(e||!v):p||v?0:e?n>=s:n>s)?u=l+1:o=l;
}return Ku(o,4294967294)}function Vn(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||!Se(f,c)){var c=f;o[u++]=0===i?0:i}}return o}function Kn(t){return typeof t=="number"?t:Te(t)?V:+t}function Gn(t){if(typeof t=="string")return t;if(Te(t))return vo?vo.call(t):"";var n=t+"";return"0"==n&&1/t==-q?"-0":n}function Jn(t,n,r){var e=-1,u=c,o=t.length,i=true,f=[],l=f;if(r)i=false,u=a;else if(o>=200){if(u=n?null:wo(t))return F(u);i=false,u=E,l=new $t}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 Yn(t,n,r,e){for(var u=t.length,o=e?u:-1;(e?o--:++o<u)&&n(t[o],o,t););return r?Pn(t,e?0:o,e?o+1:u):Pn(t,e?o+1:0,e?u:o)}function Hn(t,n){var r=t;return r instanceof zt&&(r=r.value()),h(n,function(t,n){return n.func.apply(n.thisArg,s([t],n.args))},r)}function Qn(t,n,r){for(var e=-1,u=t.length;++e<u;)var o=o?s(on(o,t[e],n,r),on(t[e],o,n,r)):t[e];return o&&o.length?Jn(o,n,r):[];
}function Xn(t,n,r){for(var e=-1,u=t.length,o=n.length,i={};++e<u;)r(i,t[e],o>e?n[e]:T);return i}function tr(t){return Be(t)?t:[]}function nr(t){return ai(t)?t:Eo(t)}function rr(t,n,r){var e=t.length;return r=r===T?e:r,!n&&r>=e?t:Pn(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 ur(t){var n=new t.constructor(t.byteLength);return new Wu(n).set(new Wu(t)),n}function or(t,n){if(t!==n){var r=t!==T,e=null===t,u=t===t,o=Te(t),i=n!==T,f=null===n,c=n===n,a=Te(n);
if(!f&&!a&&!o&&t>n||o&&i&&c&&!f&&!a||e&&i&&c||!r&&c||!u)return 1;if(!e&&!o&&!a&&n>t||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=Vu(o-i,0),l=Array(c+a);for(e=!e;++f<c;)l[f]=n[f];for(;++u<i;)(e||o>u)&&(l[r[u]]=t[u]);for(;a--;)l[f++]=t[u++];return l}function fr(t,n,r,e){var u=-1,o=t.length,i=-1,f=r.length,c=-1,a=n.length,l=Vu(o-f,0),s=Array(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||o>u)&&(s[l+r[i]]=t[u++]);
return s}function cr(t,n){var r=-1,e=t.length;for(n||(n=Array(e));++r<e;)n[r]=t[r];return n}function ar(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):t[i];Kt(r,i,f)}return r}function lr(t,n){return ar(t,Nr(t),n)}function sr(t,n){return function(r,u){var o=ai(r)?e:Ht,i=n?n():{};return o(r,t,Ur(u),i)}}function hr(t){return Ie(function(n,r){var e=-1,u=r.length,o=u>1?r[u-1]:T,i=u>2?r[2]:T,o=t.length>3&&typeof o=="function"?(u--,o):T;for(i&&Hr(r[0],r[1],i)&&(o=3>u?T:o,
u=1),n=Object(n);++e<u;)(i=r[e])&&t(n,i,e,o);return n})}function pr(t,n){return function(r,e){if(null==r)return r;if(!We(r))return t(r,e);for(var u=r.length,o=n?u:-1,i=Object(r);(n?o--:++o<u)&&false!==e(i[o],o,i););return r}}function _r(t){return function(n,r,e){var u=-1,o=Object(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 vr(t,n,r){function e(){return(this&&this!==Jt&&this instanceof e?o:t).apply(u?r:this,arguments)}var u=1&n,o=yr(t);return e}function gr(t){
return function(n){n=Qe(n);var r=Wt.test(n)?n.match(St):T,e=r?r[0]:n.charAt(0);return n=r?rr(r,1).join(""):n.slice(1),e[t]()+n}}function dr(t){return function(n){return h(iu(ou(n).replace(Et,"")),t,"")}}function yr(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=en(t.prototype),n=t.apply(r,n);return Ue(n)?n:r}}function br(t,n,e){function u(){for(var i=arguments.length,f=Array(i),c=i,a=zr(u);c--;)f[c]=arguments[c];return c=3>i&&f[0]!==a&&f[i-1]!==a?[]:D(f,a),i-=c.length,e>i?Sr(t,n,jr,u.placeholder,T,f,c,T,T,e-i):r(this&&this!==Jt&&this instanceof u?o:t,this,f)}var o=yr(t);return u}function xr(t){return Ie(function(n){n=ln(n,1);var r=n.length,e=r,u=kt.prototype.thru;for(t&&n.reverse();e--;){var o=n[e];
if(typeof o!="function")throw new du("Expected a function");if(u&&!i&&"wrapper"==Cr(o))var i=new kt([],true)}for(e=i?e:r;++e<r;)var o=n[e],u=Cr(o),f="wrapper"==u?mo(o):T,i=f&&Xr(f[0])&&424==f[1]&&!f[4].length&&1==f[9]?i[Cr(f[0])].apply(i,f[3]):1==o.length&&Xr(o)?i[u]():i.thru(o);return function(){var t=arguments,e=t[0];if(i&&1==t.length&&ai(e)&&e.length>=200)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 jr(t,n,r,e,u,o,i,f,c,a){function l(){
for(var d=arguments.length,y=Array(d),b=d;b--;)y[b]=arguments[b];if(_){var x,j=zr(l),b=y.length;for(x=0;b--;)y[b]===j&&x++}if(e&&(y=ir(y,e,u,_)),o&&(y=fr(y,o,i,_)),d-=x,_&&a>d)return j=D(y,j),Sr(t,n,jr,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=Ku(f.length,x),m=cr(y);w--;){var A=f[w];y[w]=Yr(A,x)?m[A]:T}}else v&&d>1&&y.reverse();return s&&d>c&&(y.length=c),this&&this!==Jt&&this instanceof l&&(b=g||yr(b)),b.apply(j,y)}var s=128&n,h=1&n,p=2&n,_=24&n,v=512&n,g=p?T:yr(t);
return l}function wr(t,n){return function(r,e){return xn(r,t,n(e))}}function mr(t){return function(n,r){var e;if(n===T&&r===T)return 0;if(n!==T&&(e=n),r!==T){if(e===T)return r;typeof n=="string"||typeof r=="string"?(n=Gn(n),r=Gn(r)):(n=Kn(n),r=Kn(r)),e=t(n,r)}return e}}function Ar(t){return Ie(function(n){return n=1==n.length&&ai(n[0])?l(n[0],O(Ur())):l(ln(n,1,Jr),O(Ur())),Ie(function(e){var u=this;return t(n,function(t){return r(t,u,e)})})})}function Or(t,n){n=n===T?" ":Gn(n);var r=n.length;return 2>r?r?$n(n,t):n:(r=$n(n,$u(t/N(n))),
Wt.test(n)?rr(r.match(St),0,t).join(""):r.slice(0,t))}function kr(t,n,e,u){function o(){for(var n=-1,c=arguments.length,a=-1,l=u.length,s=Array(l+c),h=this&&this!==Jt&&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=yr(t);return o}function Er(t){return function(n,r,e){e&&typeof e!="number"&&Hr(n,r,e)&&(r=e=T),n=Ye(n),n=n===n?n:0,r===T?(r=n,n=0):r=Ye(r)||0,e=e===T?r>n?1:-1:Ye(e)||0;var u=-1;r=Vu($u((r-n)/(e||1)),0);for(var o=Array(r);r--;)o[t?r:++u]=n,
n+=e;return o}}function Ir(t){return function(n,r){return typeof n=="string"&&typeof r=="string"||(n=Ye(n),r=Ye(r)),t(n,r)}}function Sr(t,n,r,e,u,o,i,f,c,a){var l=8&n,s=l?i:T;i=l?T:i;var h=l?o:T;return o=l?T:o,n=(n|(l?32:64))&~(l?64:32),4&n||(n&=-4),n=[t,n,u,h,s,o,i,f,c,a],r=r.apply(T,n),Xr(t)&&ko(r,n),r.placeholder=e,r}function Rr(t){var n=vu[t];return function(t,r){if(t=Ye(t),r=Ge(r)){var e=(Qe(t)+"e").split("e"),e=n(e[0]+"e"+(+e[1]+r)),e=(Qe(e)+"e").split("e");return+(e[0]+"e"+(+e[1]-r))}return n(t);
}}function Wr(t){return function(n){var r=Pr(n);return"[object Map]"==r?U(n):"[object Set]"==r?$(n):A(n,t(n))}}function Br(t,n,r,e,u,o,i,f){var c=2&n;if(!c&&typeof t!="function")throw new du("Expected a function");var a=e?e.length:0;if(a||(n&=-97,e=u=T),i=i===T?i:Vu(Ge(i),0),f=f===T?f:Ge(f),a-=u?u.length:0,64&n){var l=e,s=u;e=u=T}var h=c?T:mo(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&&h[8]>=o[7].length||384==t&&h[8]>=h[7].length&&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?D(o[3],"__lodash_placeholder__"):h[4]),(r=h[5])&&(e=o[5],o[5]=e?fr(e,r,h[6]):r,o[6]=e?D(o[5],"__lodash_placeholder__"):h[6]),(r=h[7])&&(o[7]=r),128&t&&(o[8]=null==o[8]?h[8]:Ku(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:Vu(o[9]-a,0),!f&&24&n&&(n&=-25),(h?jo:ko)(n&&1!=n?8==n||16==n?br(t,n,f):32!=n&&33!=n||u.length?jr.apply(T,o):kr(t,n,r,e):vr(t,n,r),o)}function Lr(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))return c==n;var c=-1,a=true,l=1&u?new $t:T;for(o.set(t,n);++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!==T){if(p)continue;a=false;break}if(l){if(!_(n,function(t,n){return l.has(n)||s!==t&&!r(s,t,e,u,o)?void 0:l.add(n)})){a=false;break}}else if(s!==h&&!r(s,h,e,u,o)){a=false;break}}return o["delete"](t),a}function Mr(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 Wu(t),new Wu(n)))break;return true;case"[object Boolean]":case"[object Date]":return+t==+n;case"[object Error]":return t.name==n.name&&t.message==n.message;case"[object Number]":return t!=+t?n!=+n:t==+n;case"[object RegExp]":case"[object String]":return t==n+"";case"[object Map]":var f=U;case"[object Set]":if(f||(f=F),t.size!=n.size&&!(2&o))break;return(r=i.get(t))?r==n:(o|=1,i.set(t,n),Lr(f(t),f(n),e,u,o,i));case"[object Symbol]":
if(_o)return _o.call(t)==_o.call(n)}return false}function Cr(t){for(var n=t.name+"",r=fo[n],e=wu.call(fo,n)?r.length:0;e--;){var u=r[e],o=u.func;if(null==o||o==t)return u.name}return n}function zr(t){return(wu.call(At,"placeholder")?At:t).placeholder}function Ur(){var t=At.iteratee||au,t=t===au?An:t;return arguments.length?t(arguments[0],arguments[1]):t}function Dr(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 Fr(t){t=Ei(t);for(var n=t.length;n--;){var r=t[n][1];t[n][2]=r===r&&!Ue(r)}return t}function $r(t,n){var r=t[n];return Fe(r)?r:T}function Nr(t){return Mu(Object(t))}function Pr(t){return Ou.call(t)}function Zr(t,n,r){n=Qr(n,t)?[n]:nr(n);for(var e,u=-1,o=n.length;++u<o;){var i=ue(n[u]);if(!(e=null!=t&&r(t,i)))break;t=t[i]}return e?e:(o=t?t.length:0,!!o&&ze(o)&&Yr(i,o)&&(ai(t)||Ze(t)||Re(t)))}function Tr(t){var n=t.length,r=t.constructor(n);return n&&"string"==typeof t[0]&&wu.call(t,"index")&&(r.index=t.index,
r.input=t.input),r}function qr(t){return typeof t.constructor!="function"||te(t)?{}:en(Pu(Object(t)))}function Vr(r,e,u,o){var i=r.constructor;switch(e){case"[object ArrayBuffer]":return ur(r);case"[object Boolean]":case"[object Date]":return new i(+r);case"[object DataView]":return e=o?ur(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?ur(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,_t.exec(r)),e.lastIndex=r.lastIndex,e;case"[object Set]":return e=o?u(F(r),true):F(r),h(e,n,new r.constructor);case"[object Symbol]":return _o?Object(_o.call(r)):{};
}}function Kr(t){var n=t?t.length:T;return ze(n)&&(ai(t)||Ze(t)||Re(t))?m(n,String):null}function Gr(t){return ai(t)||Re(t)}function Jr(t){return ai(t)&&!(2==t.length&&!Me(t[0]))}function Yr(t,n){return n=null==n?9007199254740991:n,!!n&&(typeof t=="number"||xt.test(t))&&t>-1&&0==t%1&&n>t}function Hr(t,n,r){if(!Ue(r))return false;var e=typeof n;return("number"==e?We(r)&&Yr(n,r.length):"string"==e&&n in r)?Se(r[n],t):false}function Qr(t,n){if(ai(t))return false;var r=typeof t;return"number"==r||"symbol"==r||"boolean"==r||null==t||Te(t)?true:ut.test(t)||!et.test(t)||null!=n&&t in Object(n);
}function Xr(t){var n=Cr(t),r=At[n];return typeof r=="function"&&n in zt.prototype?t===r?true:(n=mo(r),!!n&&t===n[0]):false}function te(t){var n=t&&t.constructor;return t===(typeof n=="function"&&n.prototype||bu)}function ne(t,n){return function(r){return null==r?false:r[t]===n&&(n!==T||t in Object(r))}}function re(t,n,r,e,u,o){return Ue(t)&&Ue(n)&&Rn(t,n,T,re,o.set(n,t)),t}function ee(t,n){return 1==n.length?t:_n(t,Pn(n,0,-1))}function ue(t){if(typeof t=="string"||Te(t))return t;var n=t+"";return"0"==n&&1/t==-q?"-0":n;
}function oe(t){if(null!=t){try{return ju.call(t)}catch(n){}return t+""}return""}function ie(t){if(t instanceof zt)return t.clone();var n=new kt(t.__wrapped__,t.__chain__);return n.__actions__=cr(t.__actions__),n.__index__=t.__index__,n.__values__=t.__values__,n}function fe(t,n,r){var e=t?t.length:0;return e?(n=r||n===T?1:Ge(n),Pn(t,0>n?0:n,e)):[]}function ce(t,n,r){var e=t?t.length:0;return e?(n=r||n===T?1:Ge(n),n=e-n,Pn(t,0,0>n?0:n)):[]}function ae(t){return t&&t.length?t[0]:T}function le(t){var n=t?t.length:0;
return n?t[n-1]:T}function se(t,n){return t&&t.length&&n&&n.length?Un(t,n):t}function he(t){return t?Hu.call(t):t}function pe(t){if(!t||!t.length)return[];var n=0;return t=f(t,function(t){return Be(t)?(n=Vu(t.length,n),true):void 0}),m(n,function(n){return l(t,Cn(n))})}function _e(t,n){if(!t||!t.length)return[];var e=pe(t);return null==n?e:l(e,function(t){return r(n,T,t)})}function ve(t){return t=At(t),t.__chain__=true,t}function ge(t,n){return n(t)}function de(){return this}function ye(t,n){return(ai(t)?u:go)(t,Ur(n,3));
}function be(t,n){return(ai(t)?o:yo)(t,Ur(n,3))}function xe(t,n){return(ai(t)?l:En)(t,Ur(n,3))}function je(t,n,r){var e=-1,u=Ve(t),o=u.length,i=o-1;for(n=(r?Hr(t,n,r):n===T)?1:tn(Ge(n),0,o);++e<n;)t=Fn(e,i),r=u[t],u[t]=u[e],u[e]=r;return u.length=n,u}function we(t,n,r){return n=r?T:n,n=t&&null==n?t.length:n,Br(t,128,T,T,T,T,n)}function me(t,n){var r;if(typeof n!="function")throw new du("Expected a function");return t=Ge(t),function(){return 0<--t&&(r=n.apply(this,arguments)),1>=t&&(n=T),r}}function Ae(t,n,r){
return n=r?T:n,t=Br(t,8,T,T,T,T,T,n),t.placeholder=Ae.placeholder,t}function Oe(t,n,r){return n=r?T:n,t=Br(t,16,T,T,T,T,T,n),t.placeholder=Oe.placeholder,t}function ke(t,n,r){function e(n){var r=c,e=a;return c=a=T,_=n,s=t.apply(e,r)}function u(t){var r=t-p;return t-=_,!p||r>=n||0>r||g&&t>=l}function o(){var t=Qo();if(u(t))return i(t);var r;r=t-_,t=n-(t-p),r=g?Ku(t,l-r):t,h=Du(o,r)}function i(t){return Bu(h),h=T,d&&c?e(t):(c=a=T,s)}function f(){var t=Qo(),r=u(t);if(c=arguments,a=this,p=t,r){if(h===T)return _=t=p,
h=Du(o,n),v?e(t):s;if(g)return Bu(h),h=Du(o,n),e(p)}return h===T&&(h=Du(o,n)),s}var c,a,l,s,h,p=0,_=0,v=false,g=false,d=true;if(typeof t!="function")throw new du("Expected a function");return n=Ye(n)||0,Ue(r)&&(v=!!r.leading,l=(g="maxWait"in r)?Vu(Ye(r.maxWait)||0,n):l,d="trailing"in r?!!r.trailing:d),f.cancel=function(){h!==T&&Bu(h),p=_=0,c=a=h=T},f.flush=function(){return h===T?s:i(Qo())},f}function Ee(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 du("Expected a function");return r.cache=new(Ee.Cache||Ft),r}function Ie(t,n){if(typeof t!="function")throw new du("Expected a function");return n=Vu(n===T?t.length-1:Ge(n),0),function(){for(var e=arguments,u=-1,o=Vu(e.length-n,0),i=Array(o);++u<o;)i[u]=e[n+u];switch(n){case 0:return t.call(this,i);case 1:return t.call(this,e[0],i);case 2:return t.call(this,e[0],e[1],i)}for(o=Array(n+1),u=-1;++u<n;)o[u]=e[u];return o[n]=i,
r(t,this,o)}}function Se(t,n){return t===n||t!==t&&n!==n}function Re(t){return Be(t)&&wu.call(t,"callee")&&(!Uu.call(t,"callee")||"[object Arguments]"==Ou.call(t))}function We(t){return null!=t&&ze(Ao(t))&&!Me(t)}function Be(t){return De(t)&&We(t)}function Le(t){return De(t)?"[object Error]"==Ou.call(t)||typeof t.message=="string"&&typeof t.name=="string":false}function Me(t){return t=Ue(t)?Ou.call(t):"","[object Function]"==t||"[object GeneratorFunction]"==t}function Ce(t){return typeof t=="number"&&t==Ge(t);
}function ze(t){return typeof t=="number"&&t>-1&&0==t%1&&9007199254740991>=t}function Ue(t){var n=typeof t;return!!t&&("object"==n||"function"==n)}function De(t){return!!t&&typeof t=="object"}function Fe(t){return Ue(t)?(Me(t)||C(t)?Eu:yt).test(oe(t)):false}function $e(t){return typeof t=="number"||De(t)&&"[object Number]"==Ou.call(t)}function Ne(t){return!De(t)||"[object Object]"!=Ou.call(t)||C(t)?false:(t=Pu(Object(t)),null===t?true:(t=wu.call(t,"constructor")&&t.constructor,typeof t=="function"&&t instanceof t&&ju.call(t)==Au));
}function Pe(t){return Ue(t)&&"[object RegExp]"==Ou.call(t)}function Ze(t){return typeof t=="string"||!ai(t)&&De(t)&&"[object String]"==Ou.call(t)}function Te(t){return typeof t=="symbol"||De(t)&&"[object Symbol]"==Ou.call(t)}function qe(t){return De(t)&&ze(t.length)&&!!Mt[Ou.call(t)]}function Ve(t){if(!t)return[];if(We(t))return Ze(t)?t.match(St):cr(t);if(Cu&&t[Cu])return z(t[Cu]());var n=Pr(t);return("[object Map]"==n?U:"[object Set]"==n?F:eu)(t)}function Ke(t){return t?(t=Ye(t),t===q||t===-q?1.7976931348623157e308*(0>t?-1:1):t===t?t:0):0===t?t:0;
}function Ge(t){t=Ke(t);var n=t%1;return t===t?n?t-n:t:0}function Je(t){return t?tn(Ge(t),0,4294967295):0}function Ye(t){if(typeof t=="number")return t;if(Te(t))return V;if(Ue(t)&&(t=Me(t.valueOf)?t.valueOf():t,t=Ue(t)?t+"":t),typeof t!="string")return 0===t?t:+t;t=t.replace(ct,"");var n=dt.test(t);return n||bt.test(t)?Pt(t.slice(2),n?2:8):gt.test(t)?V:+t}function He(t){return ar(t,ru(t))}function Qe(t){return null==t?"":Gn(t)}function Xe(t,n,r){return t=null==t?T:_n(t,n),t===T?r:t}function tu(t,n){
return null!=t&&Zr(t,n,yn)}function nu(t){var n=te(t);if(!n&&!We(t))return qu(Object(t));var r,e=Kr(t),u=!!e,e=e||[],o=e.length;for(r in t)!dn(t,r)||u&&("length"==r||Yr(r,o))||n&&"constructor"==r||e.push(r);return e}function ru(t){for(var n=-1,r=te(t),e=On(t),u=e.length,o=Kr(t),i=!!o,o=o||[],f=o.length;++n<u;){var c=e[n];i&&("length"==c||Yr(c,f))||"constructor"==c&&(r||!wu.call(t,c))||o.push(c)}return o}function eu(t){return t?k(t,nu(t)):[]}function uu(t){return zi(Qe(t).toLowerCase())}function ou(t){
return(t=Qe(t))&&t.replace(jt,W).replace(It,"")}function iu(t,n,r){return t=Qe(t),n=r?T:n,n===T&&(n=Bt.test(t)?Rt:st),t.match(n)||[]}function fu(t){return function(){return t}}function cu(t){return t}function au(t){return An(typeof t=="function"?t:nn(t,true))}function lu(t,n,r){var e=nu(n),o=pn(n,e);null!=r||Ue(n)&&(o.length||!e.length)||(r=n,n=t,t=this,o=pn(n,nu(n)));var i=!(Ue(r)&&"chain"in r&&!r.chain),f=Me(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__=cr(this.__actions__)).push({func:e,args:arguments,thisArg:t}),r.__chain__=n,r}return e.apply(t,s([this.value()],arguments))})}),t}function su(){}function hu(t){return Qr(t)?Cn(ue(t)):zn(t)}R=R?Yt.defaults({},R,Yt.pick(Jt,Lt)):Jt;var pu=R.Date,_u=R.Error,vu=R.Math,gu=R.RegExp,du=R.TypeError,yu=R.Array.prototype,bu=R.Object.prototype,xu=R.String.prototype,ju=R.Function.prototype.toString,wu=bu.hasOwnProperty,mu=0,Au=ju.call(Object),Ou=bu.toString,ku=Jt._,Eu=gu("^"+ju.call(wu).replace(it,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Iu=qt?R.Buffer:T,Su=R.Reflect,Ru=R.Symbol,Wu=R.Uint8Array,Bu=R.clearTimeout,Lu=Su?Su.f:T,Mu=Object.getOwnPropertySymbols,Cu=typeof(Cu=Ru&&Ru.iterator)=="symbol"?Cu:T,zu=Object.create,Uu=bu.propertyIsEnumerable,Du=R.setTimeout,Fu=yu.splice,$u=vu.ceil,Nu=vu.floor,Pu=Object.getPrototypeOf,Zu=R.isFinite,Tu=yu.join,qu=Object.keys,Vu=vu.max,Ku=vu.min,Gu=R.parseInt,Ju=vu.random,Yu=xu.replace,Hu=yu.reverse,Qu=xu.split,Xu=$r(R,"DataView"),to=$r(R,"Map"),no=$r(R,"Promise"),ro=$r(R,"Set"),eo=$r(R,"WeakMap"),uo=$r(Object,"create"),oo=eo&&new eo,io=!Uu.call({
valueOf:1},"valueOf"),fo={},co=oe(Xu),ao=oe(to),lo=oe(no),so=oe(ro),ho=oe(eo),po=Ru?Ru.prototype:T,_o=po?po.valueOf:T,vo=po?po.toString:T;At.templateSettings={escape:tt,evaluate:nt,interpolate:rt,variable:"",imports:{_:At}},At.prototype=Ot.prototype,At.prototype.constructor=At,kt.prototype=en(Ot.prototype),kt.prototype.constructor=kt,zt.prototype=en(Ot.prototype),zt.prototype.constructor=zt,Ut.prototype.clear=function(){this.__data__=uo?uo(null):{}},Ut.prototype["delete"]=function(t){return this.has(t)&&delete this.__data__[t];
},Ut.prototype.get=function(t){var n=this.__data__;return uo?(t=n[t],"__lodash_hash_undefined__"===t?T:t):wu.call(n,t)?n[t]:T},Ut.prototype.has=function(t){var n=this.__data__;return uo?n[t]!==T:wu.call(n,t)},Ut.prototype.set=function(t,n){return this.__data__[t]=uo&&n===T?"__lodash_hash_undefined__":n,this},Dt.prototype.clear=function(){this.__data__=[]},Dt.prototype["delete"]=function(t){var n=this.__data__;return t=Gt(n,t),0>t?false:(t==n.length-1?n.pop():Fu.call(n,t,1),true)},Dt.prototype.get=function(t){
var n=this.__data__;return t=Gt(n,t),0>t?T:n[t][1]},Dt.prototype.has=function(t){return-1<Gt(this.__data__,t)},Dt.prototype.set=function(t,n){var r=this.__data__,e=Gt(r,t);return 0>e?r.push([t,n]):r[e][1]=n,this},Ft.prototype.clear=function(){this.__data__={hash:new Ut,map:new(to||Dt),string:new Ut}},Ft.prototype["delete"]=function(t){return Dr(this,t)["delete"](t)},Ft.prototype.get=function(t){return Dr(this,t).get(t)},Ft.prototype.has=function(t){return Dr(this,t).has(t)},Ft.prototype.set=function(t,n){
return Dr(this,t).set(t,n),this},$t.prototype.add=$t.prototype.push=function(t){return this.__data__.set(t,"__lodash_hash_undefined__"),this},$t.prototype.has=function(t){return this.__data__.has(t)},Zt.prototype.clear=function(){this.__data__=new Dt},Zt.prototype["delete"]=function(t){return this.__data__["delete"](t)},Zt.prototype.get=function(t){return this.__data__.get(t)},Zt.prototype.has=function(t){return this.__data__.has(t)},Zt.prototype.set=function(t,n){var r=this.__data__;return r instanceof Dt&&200==r.__data__.length&&(r=this.__data__=new Ft(r.__data__)),
r.set(t,n),this};var go=pr(sn),yo=pr(hn,true),bo=_r(),xo=_r(true);Lu&&!Uu.call({valueOf:1},"valueOf")&&(On=function(t){return z(Lu(t))});var jo=oo?function(t,n){return oo.set(t,n),t}:cu,wo=ro&&1/F(new ro([,-0]))[1]==q?function(t){return new ro(t)}:su,mo=oo?function(t){return oo.get(t)}:su,Ao=Cn("length");Mu||(Nr=function(){return[]});var Oo=Mu?function(t){for(var n=[];t;)s(n,Nr(t)),t=Pu(Object(t));return n}:Nr;(Xu&&"[object DataView]"!=Pr(new Xu(new ArrayBuffer(1)))||to&&"[object Map]"!=Pr(new to)||no&&"[object Promise]"!=Pr(no.resolve())||ro&&"[object Set]"!=Pr(new ro)||eo&&"[object WeakMap]"!=Pr(new eo))&&(Pr=function(t){
var n=Ou.call(t);if(t=(t="[object Object]"==n?t.constructor:T)?oe(t):T)switch(t){case co:return"[object DataView]";case ao:return"[object Map]";case lo:return"[object Promise]";case so:return"[object Set]";case ho:return"[object WeakMap]"}return n});var ko=function(){var t=0,n=0;return function(r,e){var u=Qo(),o=16-(u-n);if(n=u,o>0){if(150<=++t)return r}else t=0;return jo(r,e)}}(),Eo=Ee(function(t){var n=[];return Qe(t).replace(ot,function(t,r,e,u){n.push(e?u.replace(ht,"$1"):r||t)}),n}),Io=Ie(function(t,n){
return Be(t)?on(t,ln(n,1,Be,true)):[]}),So=Ie(function(t,n){var r=le(n);return Be(r)&&(r=T),Be(t)?on(t,ln(n,1,Be,true),Ur(r)):[]}),Ro=Ie(function(t,n){var r=le(n);return Be(r)&&(r=T),Be(t)?on(t,ln(n,1,Be,true),T,r):[]}),Wo=Ie(function(t){var n=l(t,tr);return n.length&&n[0]===t[0]?bn(n):[]}),Bo=Ie(function(t){var n=le(t),r=l(t,tr);return n===le(r)?n=T:r.pop(),r.length&&r[0]===t[0]?bn(r,Ur(n)):[]}),Lo=Ie(function(t){var n=le(t),r=l(t,tr);return n===le(r)?n=T:r.pop(),r.length&&r[0]===t[0]?bn(r,T,n):[]}),Mo=Ie(se),Co=Ie(function(t,n){
n=ln(n,1);var r=t?t.length:0,e=Xt(t,n);return Dn(t,l(n,function(t){return Yr(t,r)?+t:t}).sort(or)),e}),zo=Ie(function(t){return Jn(ln(t,1,Be,true))}),Uo=Ie(function(t){var n=le(t);return Be(n)&&(n=T),Jn(ln(t,1,Be,true),Ur(n))}),Do=Ie(function(t){var n=le(t);return Be(n)&&(n=T),Jn(ln(t,1,Be,true),T,n)}),Fo=Ie(function(t,n){return Be(t)?on(t,n):[]}),$o=Ie(function(t){return Qn(f(t,Be))}),No=Ie(function(t){var n=le(t);return Be(n)&&(n=T),Qn(f(t,Be),Ur(n))}),Po=Ie(function(t){var n=le(t);return Be(n)&&(n=T),
Qn(f(t,Be),T,n)}),Zo=Ie(pe),To=Ie(function(t){var n=t.length,n=n>1?t[n-1]:T,n=typeof n=="function"?(t.pop(),n):T;return _e(t,n)}),qo=Ie(function(t){function n(n){return Xt(n,t)}t=ln(t,1);var r=t.length,e=r?t[0]:0,u=this.__wrapped__;return!(r>1||this.__actions__.length)&&u instanceof zt&&Yr(e)?(u=u.slice(e,+e+(r?1:0)),u.__actions__.push({func:ge,args:[n],thisArg:T}),new kt(u,this.__chain__).thru(function(t){return r&&!t.length&&t.push(T),t})):this.thru(n)}),Vo=sr(function(t,n,r){wu.call(t,r)?++t[r]:t[r]=1;
}),Ko=sr(function(t,n,r){wu.call(t,r)?t[r].push(n):t[r]=[n]}),Go=Ie(function(t,n,e){var u=-1,o=typeof n=="function",i=Qr(n),f=We(t)?Array(t.length):[];return go(t,function(t){var c=o?n:i&&null!=t?t[n]:T;f[++u]=c?r(c,t,e):jn(t,n,e)}),f}),Jo=sr(function(t,n,r){t[r]=n}),Yo=sr(function(t,n,r){t[r?0:1].push(n)},function(){return[[],[]]}),Ho=Ie(function(t,n){if(null==t)return[];var r=n.length;return r>1&&Hr(t,n[0],n[1])?n=[]:r>2&&Hr(n[0],n[1],n[2])&&(n=[n[0]]),n=1==n.length&&ai(n[0])?n[0]:ln(n,1,Jr),Bn(t,n,[]);
}),Qo=pu.now,Xo=Ie(function(t,n,r){var e=1;if(r.length)var u=D(r,zr(Xo)),e=32|e;return Br(t,e,n,r,u)}),ti=Ie(function(t,n,r){var e=3;if(r.length)var u=D(r,zr(ti)),e=32|e;return Br(n,e,t,r,u)}),ni=Ie(function(t,n){return un(t,1,n)}),ri=Ie(function(t,n,r){return un(t,Ye(n)||0,r)});Ee.Cache=Ft;var ei=Ie(function(t,n){n=1==n.length&&ai(n[0])?l(n[0],O(Ur())):l(ln(n,1,Jr),O(Ur()));var e=n.length;return Ie(function(u){for(var o=-1,i=Ku(u.length,e);++o<i;)u[o]=n[o].call(this,u[o]);return r(t,this,u)})}),ui=Ie(function(t,n){
var r=D(n,zr(ui));return Br(t,32,T,n,r)}),oi=Ie(function(t,n){var r=D(n,zr(oi));return Br(t,64,T,n,r)}),ii=Ie(function(t,n){return Br(t,256,T,T,T,ln(n,1))}),fi=Ir(gn),ci=Ir(function(t,n){return t>=n}),ai=Array.isArray,li=Iu?function(t){return t instanceof Iu}:fu(false),si=Ir(kn),hi=Ir(function(t,n){return n>=t}),pi=hr(function(t,n){if(io||te(n)||We(n))ar(n,nu(n),t);else for(var r in n)wu.call(n,r)&&Kt(t,r,n[r])}),_i=hr(function(t,n){if(io||te(n)||We(n))ar(n,ru(n),t);else for(var r in n)Kt(t,r,n[r])}),vi=hr(function(t,n,r,e){
ar(n,ru(n),t,e)}),gi=hr(function(t,n,r,e){ar(n,nu(n),t,e)}),di=Ie(function(t,n){return Xt(t,ln(n,1))}),yi=Ie(function(t){return t.push(T,Tt),r(vi,T,t)}),bi=Ie(function(t){return t.push(T,re),r(Ai,T,t)}),xi=wr(function(t,n,r){t[n]=r},fu(cu)),ji=wr(function(t,n,r){wu.call(t,n)?t[n].push(r):t[n]=[r]},Ur),wi=Ie(jn),mi=hr(function(t,n,r){Rn(t,n,r)}),Ai=hr(function(t,n,r,e){Rn(t,n,r,e)}),Oi=Ie(function(t,n){return null==t?{}:(n=l(ln(n,1),ue),Ln(t,on(vn(t,ru,Oo),n)))}),ki=Ie(function(t,n){return null==t?{}:Ln(t,l(ln(n,1),ue));
}),Ei=Wr(nu),Ii=Wr(ru),Si=dr(function(t,n,r){return n=n.toLowerCase(),t+(r?uu(n):n)}),Ri=dr(function(t,n,r){return t+(r?"-":"")+n.toLowerCase()}),Wi=dr(function(t,n,r){return t+(r?" ":"")+n.toLowerCase()}),Bi=gr("toLowerCase"),Li=dr(function(t,n,r){return t+(r?"_":"")+n.toLowerCase()}),Mi=dr(function(t,n,r){return t+(r?" ":"")+zi(n)}),Ci=dr(function(t,n,r){return t+(r?" ":"")+n.toUpperCase()}),zi=gr("toUpperCase"),Ui=Ie(function(t,n){try{return r(t,T,n)}catch(e){return Le(e)?e:new _u(e)}}),Di=Ie(function(t,n){
return u(ln(n,1),function(n){n=ue(n),t[n]=Xo(t[n],t)}),t}),Fi=xr(),$i=xr(true),Ni=Ie(function(t,n){return function(r){return jn(r,t,n)}}),Pi=Ie(function(t,n){return function(r){return jn(t,r,n)}}),Zi=Ar(l),Ti=Ar(i),qi=Ar(_),Vi=Er(),Ki=Er(true),Gi=mr(function(t,n){return t+n}),Ji=Rr("ceil"),Yi=mr(function(t,n){return t/n}),Hi=Rr("floor"),Qi=mr(function(t,n){return t*n}),Xi=Rr("round"),tf=mr(function(t,n){return t-n});return At.after=function(t,n){if(typeof n!="function")throw new du("Expected a function");
return t=Ge(t),function(){return 1>--t?n.apply(this,arguments):void 0}},At.ary=we,At.assign=pi,At.assignIn=_i,At.assignInWith=vi,At.assignWith=gi,At.at=di,At.before=me,At.bind=Xo,At.bindAll=Di,At.bindKey=ti,At.castArray=function(){if(!arguments.length)return[];var t=arguments[0];return ai(t)?t:[t]},At.chain=ve,At.chunk=function(t,n,r){if(n=(r?Hr(t,n,r):n===T)?1:Vu(Ge(n),0),r=t?t.length:0,!r||1>n)return[];for(var e=0,u=0,o=Array($u(r/n));r>e;)o[u++]=Pn(t,e,e+=n);return o},At.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},At.concat=function(){for(var t=arguments.length,n=Array(t?t-1:0),r=arguments[0],e=t;e--;)n[e-1]=arguments[e];return t?s(ai(r)?cr(r):[r],ln(n,1)):[]},At.cond=function(t){var n=t?t.length:0,e=Ur();return t=n?l(t,function(t){if("function"!=typeof t[1])throw new du("Expected a function");return[e(t[0]),t[1]]}):[],Ie(function(e){for(var u=-1;++u<n;){var o=t[u];if(r(o[0],this,e))return r(o[1],this,e)}})},At.conforms=function(t){return rn(nn(t,true))},At.constant=fu,At.countBy=Vo,
At.create=function(t,n){var r=en(t);return n?Qt(r,n):r},At.curry=Ae,At.curryRight=Oe,At.debounce=ke,At.defaults=yi,At.defaultsDeep=bi,At.defer=ni,At.delay=ri,At.difference=Io,At.differenceBy=So,At.differenceWith=Ro,At.drop=fe,At.dropRight=ce,At.dropRightWhile=function(t,n){return t&&t.length?Yn(t,Ur(n,3),true,true):[]},At.dropWhile=function(t,n){return t&&t.length?Yn(t,Ur(n,3),true):[]},At.fill=function(t,n,r,e){var u=t?t.length:0;if(!u)return[];for(r&&typeof r!="number"&&Hr(t,n,r)&&(r=0,e=u),u=t.length,
r=Ge(r),0>r&&(r=-r>u?0:u+r),e=e===T||e>u?u:Ge(e),0>e&&(e+=u),e=r>e?0:Je(e);e>r;)t[r++]=n;return t},At.filter=function(t,n){return(ai(t)?f:an)(t,Ur(n,3))},At.flatMap=function(t,n){return ln(xe(t,n),1)},At.flatMapDeep=function(t,n){return ln(xe(t,n),q)},At.flatMapDepth=function(t,n,r){return r=r===T?1:Ge(r),ln(xe(t,n),r)},At.flatten=function(t){return t&&t.length?ln(t,1):[]},At.flattenDeep=function(t){return t&&t.length?ln(t,q):[]},At.flattenDepth=function(t,n){return t&&t.length?(n=n===T?1:Ge(n),ln(t,n)):[];
},At.flip=function(t){return Br(t,512)},At.flow=Fi,At.flowRight=$i,At.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},At.functions=function(t){return null==t?[]:pn(t,nu(t))},At.functionsIn=function(t){return null==t?[]:pn(t,ru(t))},At.groupBy=Ko,At.initial=function(t){return ce(t,1)},At.intersection=Wo,At.intersectionBy=Bo,At.intersectionWith=Lo,At.invert=xi,At.invertBy=ji,At.invokeMap=Go,At.iteratee=au,At.keyBy=Jo,At.keys=nu,At.keysIn=ru,At.map=xe,
At.mapKeys=function(t,n){var r={};return n=Ur(n,3),sn(t,function(t,e,u){r[n(t,e,u)]=t}),r},At.mapValues=function(t,n){var r={};return n=Ur(n,3),sn(t,function(t,e,u){r[e]=n(t,e,u)}),r},At.matches=function(t){return In(nn(t,true))},At.matchesProperty=function(t,n){return Sn(t,nn(n,true))},At.memoize=Ee,At.merge=mi,At.mergeWith=Ai,At.method=Ni,At.methodOf=Pi,At.mixin=lu,At.negate=function(t){if(typeof t!="function")throw new du("Expected a function");return function(){return!t.apply(this,arguments)}},At.nthArg=function(t){
return t=Ge(t),Ie(function(n){return Wn(n,t)})},At.omit=Oi,At.omitBy=function(t,n){return n=Ur(n),Mn(t,function(t,r){return!n(t,r)})},At.once=function(t){return me(2,t)},At.orderBy=function(t,n,r,e){return null==t?[]:(ai(n)||(n=null==n?[]:[n]),r=e?T:r,ai(r)||(r=null==r?[]:[r]),Bn(t,n,r))},At.over=Zi,At.overArgs=ei,At.overEvery=Ti,At.overSome=qi,At.partial=ui,At.partialRight=oi,At.partition=Yo,At.pick=ki,At.pickBy=function(t,n){return null==t?{}:Mn(t,Ur(n))},At.property=hu,At.propertyOf=function(t){
return function(n){return null==t?T:_n(t,n)}},At.pull=Mo,At.pullAll=se,At.pullAllBy=function(t,n,r){return t&&t.length&&n&&n.length?Un(t,n,Ur(r)):t},At.pullAllWith=function(t,n,r){return t&&t.length&&n&&n.length?Un(t,n,T,r):t},At.pullAt=Co,At.range=Vi,At.rangeRight=Ki,At.rearg=ii,At.reject=function(t,n){var r=ai(t)?f:an;return n=Ur(n,3),r(t,function(t,r,e){return!n(t,r,e)})},At.remove=function(t,n){var r=[];if(!t||!t.length)return r;var e=-1,u=[],o=t.length;for(n=Ur(n,3);++e<o;){var i=t[e];n(i,e,t)&&(r.push(i),
u.push(e))}return Dn(t,u),r},At.rest=Ie,At.reverse=he,At.sampleSize=je,At.set=function(t,n,r){return null==t?t:Nn(t,n,r)},At.setWith=function(t,n,r,e){return e=typeof e=="function"?e:T,null==t?t:Nn(t,n,r,e)},At.shuffle=function(t){return je(t,4294967295)},At.slice=function(t,n,r){var e=t?t.length:0;return e?(r&&typeof r!="number"&&Hr(t,n,r)?(n=0,r=e):(n=null==n?0:Ge(n),r=r===T?e:Ge(r)),Pn(t,n,r)):[]},At.sortBy=Ho,At.sortedUniq=function(t){return t&&t.length?Vn(t):[]},At.sortedUniqBy=function(t,n){
return t&&t.length?Vn(t,Ur(n)):[]},At.split=function(t,n,r){return r&&typeof r!="number"&&Hr(t,n,r)&&(n=r=T),r=r===T?4294967295:r>>>0,r?(t=Qe(t))&&(typeof n=="string"||null!=n&&!Pe(n))&&(n=Gn(n),""==n&&Wt.test(t))?rr(t.match(St),0,r):Qu.call(t,n,r):[]},At.spread=function(t,n){if(typeof t!="function")throw new du("Expected a function");return n=n===T?0:Vu(Ge(n),0),Ie(function(e){var u=e[n];return e=rr(e,0,n),u&&s(e,u),r(t,this,e)})},At.tail=function(t){return fe(t,1)},At.take=function(t,n,r){return t&&t.length?(n=r||n===T?1:Ge(n),
Pn(t,0,0>n?0:n)):[]},At.takeRight=function(t,n,r){var e=t?t.length:0;return e?(n=r||n===T?1:Ge(n),n=e-n,Pn(t,0>n?0:n,e)):[]},At.takeRightWhile=function(t,n){return t&&t.length?Yn(t,Ur(n,3),false,true):[]},At.takeWhile=function(t,n){return t&&t.length?Yn(t,Ur(n,3)):[]},At.tap=function(t,n){return n(t),t},At.throttle=function(t,n,r){var e=true,u=true;if(typeof t!="function")throw new du("Expected a function");return Ue(r)&&(e="leading"in r?!!r.leading:e,u="trailing"in r?!!r.trailing:u),ke(t,n,{leading:e,maxWait:n,
trailing:u})},At.thru=ge,At.toArray=Ve,At.toPairs=Ei,At.toPairsIn=Ii,At.toPath=function(t){return ai(t)?l(t,ue):Te(t)?[t]:cr(Eo(t))},At.toPlainObject=He,At.transform=function(t,n,r){var e=ai(t)||qe(t);if(n=Ur(n,4),null==r)if(e||Ue(t)){var o=t.constructor;r=e?ai(t)?new o:[]:Me(o)?en(Pu(Object(t))):{}}else r={};return(e?u:sn)(t,function(t,e,u){return n(r,t,e,u)}),r},At.unary=function(t){return we(t,1)},At.union=zo,At.unionBy=Uo,At.unionWith=Do,At.uniq=function(t){return t&&t.length?Jn(t):[]},At.uniqBy=function(t,n){
return t&&t.length?Jn(t,Ur(n)):[]},At.uniqWith=function(t,n){return t&&t.length?Jn(t,T,n):[]},At.unset=function(t,n){var r;if(null==t)r=true;else{r=t;var e=n,e=Qr(e,r)?[e]:nr(e);r=ee(r,e),e=ue(le(e)),r=!(null!=r&&dn(r,e))||delete r[e]}return r},At.unzip=pe,At.unzipWith=_e,At.update=function(t,n,r){return null==t?t:Nn(t,n,(typeof r=="function"?r:cu)(_n(t,n)),void 0)},At.updateWith=function(t,n,r,e){return e=typeof e=="function"?e:T,null!=t&&(t=Nn(t,n,(typeof r=="function"?r:cu)(_n(t,n)),e)),t},At.values=eu,
At.valuesIn=function(t){return null==t?[]:k(t,ru(t))},At.without=Fo,At.words=iu,At.wrap=function(t,n){return n=null==n?cu:n,ui(n,t)},At.xor=$o,At.xorBy=No,At.xorWith=Po,At.zip=Zo,At.zipObject=function(t,n){return Xn(t||[],n||[],Kt)},At.zipObjectDeep=function(t,n){return Xn(t||[],n||[],Nn)},At.zipWith=To,At.entries=Ei,At.entriesIn=Ii,At.extend=_i,At.extendWith=vi,lu(At,At),At.add=Gi,At.attempt=Ui,At.camelCase=Si,At.capitalize=uu,At.ceil=Ji,At.clamp=function(t,n,r){return r===T&&(r=n,n=T),r!==T&&(r=Ye(r),
r=r===r?r:0),n!==T&&(n=Ye(n),n=n===n?n:0),tn(Ye(t),n,r)},At.clone=function(t){return nn(t,false,true)},At.cloneDeep=function(t){return nn(t,true,true)},At.cloneDeepWith=function(t,n){return nn(t,true,true,n)},At.cloneWith=function(t,n){return nn(t,false,true,n)},At.deburr=ou,At.divide=Yi,At.endsWith=function(t,n,r){t=Qe(t),n=Gn(n);var e=t.length;return r=r===T?e:tn(Ge(r),0,e),r-=n.length,r>=0&&t.indexOf(n,r)==r},At.eq=Se,At.escape=function(t){return(t=Qe(t))&&X.test(t)?t.replace(H,B):t},At.escapeRegExp=function(t){
return(t=Qe(t))&&ft.test(t)?t.replace(it,"\\$&"):t},At.every=function(t,n,r){var e=ai(t)?i:fn;return r&&Hr(t,n,r)&&(n=T),e(t,Ur(n,3))},At.find=function(t,n){if(n=Ur(n,3),ai(t)){var r=g(t,n);return r>-1?t[r]:T}return v(t,n,go)},At.findIndex=function(t,n){return t&&t.length?g(t,Ur(n,3)):-1},At.findKey=function(t,n){return v(t,Ur(n,3),sn,true)},At.findLast=function(t,n){if(n=Ur(n,3),ai(t)){var r=g(t,n,true);return r>-1?t[r]:T}return v(t,n,yo)},At.findLastIndex=function(t,n){return t&&t.length?g(t,Ur(n,3),true):-1;
},At.findLastKey=function(t,n){return v(t,Ur(n,3),hn,true)},At.floor=Hi,At.forEach=ye,At.forEachRight=be,At.forIn=function(t,n){return null==t?t:bo(t,Ur(n,3),ru)},At.forInRight=function(t,n){return null==t?t:xo(t,Ur(n,3),ru)},At.forOwn=function(t,n){return t&&sn(t,Ur(n,3))},At.forOwnRight=function(t,n){return t&&hn(t,Ur(n,3))},At.get=Xe,At.gt=fi,At.gte=ci,At.has=function(t,n){return null!=t&&Zr(t,n,dn)},At.hasIn=tu,At.head=ae,At.identity=cu,At.includes=function(t,n,r,e){return t=We(t)?t:eu(t),r=r&&!e?Ge(r):0,
e=t.length,0>r&&(r=Vu(e+r,0)),Ze(t)?e>=r&&-1<t.indexOf(n,r):!!e&&-1<d(t,n,r)},At.indexOf=function(t,n,r){var e=t?t.length:0;return e?(r=Ge(r),0>r&&(r=Vu(e+r,0)),d(t,n,r)):-1},At.inRange=function(t,n,r){return n=Ye(n)||0,r===T?(r=n,n=0):r=Ye(r)||0,t=Ye(t),t>=Ku(n,r)&&t<Vu(n,r)},At.invoke=wi,At.isArguments=Re,At.isArray=ai,At.isArrayBuffer=function(t){return De(t)&&"[object ArrayBuffer]"==Ou.call(t)},At.isArrayLike=We,At.isArrayLikeObject=Be,At.isBoolean=function(t){return true===t||false===t||De(t)&&"[object Boolean]"==Ou.call(t);
},At.isBuffer=li,At.isDate=function(t){return De(t)&&"[object Date]"==Ou.call(t)},At.isElement=function(t){return!!t&&1===t.nodeType&&De(t)&&!Ne(t)},At.isEmpty=function(t){if(We(t)&&(ai(t)||Ze(t)||Me(t.splice)||Re(t)||li(t)))return!t.length;if(De(t)){var n=Pr(t);if("[object Map]"==n||"[object Set]"==n)return!t.size}for(var r in t)if(wu.call(t,r))return false;return!(io&&nu(t).length)},At.isEqual=function(t,n){return wn(t,n)},At.isEqualWith=function(t,n,r){var e=(r=typeof r=="function"?r:T)?r(t,n):T;return e===T?wn(t,n,r):!!e;
},At.isError=Le,At.isFinite=function(t){return typeof t=="number"&&Zu(t)},At.isFunction=Me,At.isInteger=Ce,At.isLength=ze,At.isMap=function(t){return De(t)&&"[object Map]"==Pr(t)},At.isMatch=function(t,n){return t===n||mn(t,n,Fr(n))},At.isMatchWith=function(t,n,r){return r=typeof r=="function"?r:T,mn(t,n,Fr(n),r)},At.isNaN=function(t){return $e(t)&&t!=+t},At.isNative=Fe,At.isNil=function(t){return null==t},At.isNull=function(t){return null===t},At.isNumber=$e,At.isObject=Ue,At.isObjectLike=De,At.isPlainObject=Ne,
At.isRegExp=Pe,At.isSafeInteger=function(t){return Ce(t)&&t>=-9007199254740991&&9007199254740991>=t},At.isSet=function(t){return De(t)&&"[object Set]"==Pr(t)},At.isString=Ze,At.isSymbol=Te,At.isTypedArray=qe,At.isUndefined=function(t){return t===T},At.isWeakMap=function(t){return De(t)&&"[object WeakMap]"==Pr(t)},At.isWeakSet=function(t){return De(t)&&"[object WeakSet]"==Ou.call(t)},At.join=function(t,n){return t?Tu.call(t,n):""},At.kebabCase=Ri,At.last=le,At.lastIndexOf=function(t,n,r){var e=t?t.length:0;
if(!e)return-1;var u=e;if(r!==T&&(u=Ge(r),u=(0>u?Vu(e+u,0):Ku(u,e-1))+1),n!==n)return M(t,u,true);for(;u--;)if(t[u]===n)return u;return-1},At.lowerCase=Wi,At.lowerFirst=Bi,At.lt=si,At.lte=hi,At.max=function(t){return t&&t.length?cn(t,cu,gn):T},At.maxBy=function(t,n){return t&&t.length?cn(t,Ur(n),gn):T},At.mean=function(t){return b(t,cu)},At.meanBy=function(t,n){return b(t,Ur(n))},At.min=function(t){return t&&t.length?cn(t,cu,kn):T},At.minBy=function(t,n){return t&&t.length?cn(t,Ur(n),kn):T},At.multiply=Qi,
At.nth=function(t,n){return t&&t.length?Wn(t,Ge(n)):T},At.noConflict=function(){return Jt._===this&&(Jt._=ku),this},At.noop=su,At.now=Qo,At.pad=function(t,n,r){t=Qe(t);var e=(n=Ge(n))?N(t):0;return!n||e>=n?t:(n=(n-e)/2,Or(Nu(n),r)+t+Or($u(n),r))},At.padEnd=function(t,n,r){t=Qe(t);var e=(n=Ge(n))?N(t):0;return n&&n>e?t+Or(n-e,r):t},At.padStart=function(t,n,r){t=Qe(t);var e=(n=Ge(n))?N(t):0;return n&&n>e?Or(n-e,r)+t:t},At.parseInt=function(t,n,r){return r||null==n?n=0:n&&(n=+n),t=Qe(t).replace(ct,""),
Gu(t,n||(vt.test(t)?16:10))},At.random=function(t,n,r){if(r&&typeof r!="boolean"&&Hr(t,n,r)&&(n=r=T),r===T&&(typeof n=="boolean"?(r=n,n=T):typeof t=="boolean"&&(r=t,t=T)),t===T&&n===T?(t=0,n=1):(t=Ye(t)||0,n===T?(n=t,t=0):n=Ye(n)||0),t>n){var e=t;t=n,n=e}return r||t%1||n%1?(r=Ju(),Ku(t+r*(n-t+Nt("1e-"+((r+"").length-1))),n)):Fn(t,n)},At.reduce=function(t,n,r){var e=ai(t)?h:x,u=3>arguments.length;return e(t,Ur(n,4),r,u,go)},At.reduceRight=function(t,n,r){var e=ai(t)?p:x,u=3>arguments.length;return e(t,Ur(n,4),r,u,yo);
},At.repeat=function(t,n,r){return n=(r?Hr(t,n,r):n===T)?1:Ge(n),$n(Qe(t),n)},At.replace=function(){var t=arguments,n=Qe(t[0]);return 3>t.length?n:Yu.call(n,t[1],t[2])},At.result=function(t,n,r){n=Qr(n,t)?[n]:nr(n);var e=-1,u=n.length;for(u||(t=T,u=1);++e<u;){var o=null==t?T:t[ue(n[e])];o===T&&(e=u,o=r),t=Me(o)?o.call(t):o}return t},At.round=Xi,At.runInContext=Z,At.sample=function(t){t=We(t)?t:eu(t);var n=t.length;return n>0?t[Fn(0,n-1)]:T},At.size=function(t){if(null==t)return 0;if(We(t)){var n=t.length;
return n&&Ze(t)?N(t):n}return De(t)&&(n=Pr(t),"[object Map]"==n||"[object Set]"==n)?t.size:nu(t).length},At.snakeCase=Li,At.some=function(t,n,r){var e=ai(t)?_:Zn;return r&&Hr(t,n,r)&&(n=T),e(t,Ur(n,3))},At.sortedIndex=function(t,n){return Tn(t,n)},At.sortedIndexBy=function(t,n,r){return qn(t,n,Ur(r))},At.sortedIndexOf=function(t,n){var r=t?t.length:0;if(r){var e=Tn(t,n);if(r>e&&Se(t[e],n))return e}return-1},At.sortedLastIndex=function(t,n){return Tn(t,n,true)},At.sortedLastIndexBy=function(t,n,r){return qn(t,n,Ur(r),true);
},At.sortedLastIndexOf=function(t,n){if(t&&t.length){var r=Tn(t,n,true)-1;if(Se(t[r],n))return r}return-1},At.startCase=Mi,At.startsWith=function(t,n,r){return t=Qe(t),r=tn(Ge(r),0,t.length),t.lastIndexOf(Gn(n),r)==r},At.subtract=tf,At.sum=function(t){return t&&t.length?w(t,cu):0},At.sumBy=function(t,n){return t&&t.length?w(t,Ur(n)):0},At.template=function(t,n,r){var e=At.templateSettings;r&&Hr(t,n,r)&&(n=T),t=Qe(t),n=vi({},n,e,Tt),r=vi({},n.imports,e.imports,Tt);var u,o,i=nu(r),f=k(r,i),c=0;r=n.interpolate||wt;
var a="__p+='";r=gu((n.escape||wt).source+"|"+r.source+"|"+(r===rt?pt:wt).source+"|"+(n.evaluate||wt).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(mt,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=Ui(function(){return Function(i,l+"return "+a).apply(T,f)}),n.source=a,Le(n))throw n;return n},At.times=function(t,n){if(t=Ge(t),1>t||t>9007199254740991)return[];var r=4294967295,e=Ku(t,4294967295);for(n=Ur(n),t-=4294967295,e=m(e,n);++r<t;)n(r);return e},At.toFinite=Ke,At.toInteger=Ge,At.toLength=Je,At.toLower=function(t){return Qe(t).toLowerCase()},At.toNumber=Ye,At.toSafeInteger=function(t){return tn(Ge(t),-9007199254740991,9007199254740991)},At.toString=Qe,At.toUpper=function(t){return Qe(t).toUpperCase();
},At.trim=function(t,n,r){return(t=Qe(t))&&(r||n===T)?t.replace(ct,""):t&&(n=Gn(n))?(t=t.match(St),n=n.match(St),rr(t,I(t,n),S(t,n)+1).join("")):t},At.trimEnd=function(t,n,r){return(t=Qe(t))&&(r||n===T)?t.replace(lt,""):t&&(n=Gn(n))?(t=t.match(St),n=S(t,n.match(St))+1,rr(t,0,n).join("")):t},At.trimStart=function(t,n,r){return(t=Qe(t))&&(r||n===T)?t.replace(at,""):t&&(n=Gn(n))?(t=t.match(St),n=I(t,n.match(St)),rr(t,n).join("")):t},At.truncate=function(t,n){var r=30,e="...";if(Ue(n))var u="separator"in n?n.separator:u,r="length"in n?Ge(n.length):r,e="omission"in n?Gn(n.omission):e;
t=Qe(t);var o=t.length;if(Wt.test(t))var i=t.match(St),o=i.length;if(r>=o)return t;if(o=r-N(e),1>o)return e;if(r=i?rr(i,0,o).join(""):t.slice(0,o),u===T)return r+e;if(i&&(o+=r.length-o),Pe(u)){if(t.slice(o).search(u)){var f=r;for(u.global||(u=gu(u.source,Qe(_t.exec(u))+"g")),u.lastIndex=0;i=u.exec(f);)var c=i.index;r=r.slice(0,c===T?o:c)}}else t.indexOf(Gn(u),o)!=o&&(u=r.lastIndexOf(u),u>-1&&(r=r.slice(0,u)));return r+e},At.unescape=function(t){return(t=Qe(t))&&Q.test(t)?t.replace(Y,P):t},At.uniqueId=function(t){
var n=++mu;return Qe(t)+n},At.upperCase=Ci,At.upperFirst=zi,At.each=ye,At.eachRight=be,At.first=ae,lu(At,function(){var t={};return sn(At,function(n,r){wu.call(At.prototype,r)||(t[r]=n)}),t}(),{chain:false}),At.VERSION="4.12.0",u("bind bindKey curry curryRight partial partialRight".split(" "),function(t){At[t].placeholder=At}),u(["drop","take"],function(t,n){zt.prototype[t]=function(r){var e=this.__filtered__;if(e&&!n)return new zt(this);r=r===T?1:Vu(Ge(r),0);var u=this.clone();return e?u.__takeCount__=Ku(r,u.__takeCount__):u.__views__.push({
size:Ku(r,4294967295),type:t+(0>u.__dir__?"Right":"")}),u},zt.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;zt.prototype[t]=function(t){var n=this.clone();return n.__iteratees__.push({iteratee:Ur(t,3),type:r}),n.__filtered__=n.__filtered__||e,n}}),u(["head","last"],function(t,n){var r="take"+(n?"Right":"");zt.prototype[t]=function(){return this[r](1).value()[0]}}),u(["initial","tail"],function(t,n){var r="drop"+(n?"":"Right");
zt.prototype[t]=function(){return this.__filtered__?new zt(this):this[r](1)}}),zt.prototype.compact=function(){return this.filter(cu)},zt.prototype.find=function(t){return this.filter(t).head()},zt.prototype.findLast=function(t){return this.reverse().find(t)},zt.prototype.invokeMap=Ie(function(t,n){return typeof t=="function"?new zt(this):this.map(function(r){return jn(r,t,n)})}),zt.prototype.reject=function(t){return t=Ur(t,3),this.filter(function(n){return!t(n)})},zt.prototype.slice=function(t,n){
t=Ge(t);var r=this;return r.__filtered__&&(t>0||0>n)?new zt(r):(0>t?r=r.takeRight(-t):t&&(r=r.drop(t)),n!==T&&(n=Ge(n),r=0>n?r.dropRight(-n):r.take(n-t)),r)},zt.prototype.takeRightWhile=function(t){return this.reverse().takeWhile(t).reverse()},zt.prototype.toArray=function(){return this.take(4294967295)},sn(zt.prototype,function(t,n){var r=/^(?:filter|find|map|reject)|While$/.test(n),e=/^(?:head|last)$/.test(n),u=At[e?"take"+("last"==n?"Right":""):n],o=e||/^find/.test(n);u&&(At.prototype[n]=function(){
function n(t){return t=u.apply(At,s([t],f)),e&&h?t[0]:t}var i=this.__wrapped__,f=e?[1]:arguments,c=i instanceof zt,a=f[0],l=c||ai(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 zt(this),i=t.apply(i,f),i.__actions__.push({func:ge,args:[n],thisArg:T}),new kt(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=yu[t],r=/^(?:push|sort|unshift)$/.test(t)?"tap":"thru",e=/^(?:pop|shift)$/.test(t);
At.prototype[t]=function(){var t=arguments;if(e&&!this.__chain__){var u=this.value();return n.apply(ai(u)?u:[],t)}return this[r](function(r){return n.apply(ai(r)?r:[],t)})}}),sn(zt.prototype,function(t,n){var r=At[n];if(r){var e=r.name+"";(fo[e]||(fo[e]=[])).push({name:n,func:r})}}),fo[jr(T,2).name]=[{name:"wrapper",func:T}],zt.prototype.clone=function(){var t=new zt(this.__wrapped__);return t.__actions__=cr(this.__actions__),t.__dir__=this.__dir__,t.__filtered__=this.__filtered__,t.__iteratees__=cr(this.__iteratees__),
t.__takeCount__=this.__takeCount__,t.__views__=cr(this.__views__),t},zt.prototype.reverse=function(){if(this.__filtered__){var t=new zt(this);t.__dir__=-1,t.__filtered__=true}else t=this.clone(),t.__dir__*=-1;return t},zt.prototype.value=function(){var t,n=this.__wrapped__.value(),r=this.__dir__,e=ai(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=Ku(t,f+s);break;case"takeRight":
f=Vu(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=Ku(t,this.__takeCount__),!e||200>o||o==t&&a==t)return Hn(n,this.__actions__);e=[];t:for(;t--&&a>c;){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},At.prototype.at=qo,At.prototype.chain=function(){return ve(this)},At.prototype.commit=function(){return new kt(this.value(),this.__chain__)},At.prototype.next=function(){
this.__values__===T&&(this.__values__=Ve(this.value()));var t=this.__index__>=this.__values__.length,n=t?T:this.__values__[this.__index__++];return{done:t,value:n}},At.prototype.plant=function(t){for(var n,r=this;r instanceof Ot;){var e=ie(r);e.__index__=0,e.__values__=T,n?u.__wrapped__=e:n=e;var u=e,r=r.__wrapped__}return u.__wrapped__=t,n},At.prototype.reverse=function(){var t=this.__wrapped__;return t instanceof zt?(this.__actions__.length&&(t=new zt(this)),t=t.reverse(),t.__actions__.push({func:ge,
args:[he],thisArg:T}),new kt(t,this.__chain__)):this.thru(he)},At.prototype.toJSON=At.prototype.valueOf=At.prototype.value=function(){return Hn(this.__wrapped__,this.__actions__)},Cu&&(At.prototype[Cu]=de),At}var T,q=1/0,V=NaN,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=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]/g,it=/[\\^$.*+?()[\]{}|]/g,ft=RegExp(it.source),ct=/^\s+|\s+$/g,at=/^\s+/,lt=/\s+$/,st=/[a-zA-Z0-9]+/g,ht=/\\(\\)?/g,pt=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,_t=/\w*$/,vt=/^0x/i,gt=/^[-+]0x[0-9a-f]+$/i,dt=/^0b[01]+$/i,yt=/^\[object .+?Constructor\]$/,bt=/^0o[0-7]+$/i,xt=/^(?:0|[1-9]\d*)$/,jt=/[\xc0-\xd6\xd8-\xde\xdf-\xf6\xf8-\xff]/g,wt=/($^)/,mt=/['\n\r\u2028\u2029\\]/g,At="[\\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])?)*",Ot="(?:[\\u2700-\\u27bf]|(?:\\ud83c[\\udde6-\\uddff]){2}|[\\ud800-\\udbff][\\udc00-\\udfff])"+At,kt="(?:[^\\ud800-\\udfff][\\u0300-\\u036f\\ufe20-\\ufe23\\u20d0-\\u20f0]?|[\\u0300-\\u036f\\ufe20-\\ufe23\\u20d0-\\u20f0]|(?:\\ud83c[\\udde6-\\uddff]){2}|[\\ud800-\\udbff][\\udc00-\\udfff]|[\\ud800-\\udfff])",Et=RegExp("['\u2019]","g"),It=RegExp("[\\u0300-\\u036f\\ufe20-\\ufe23\\u20d0-\\u20f0]","g"),St=RegExp("\\ud83c[\\udffb-\\udfff](?=\\ud83c[\\udffb-\\udfff])|"+kt+At,"g"),Rt=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+",Ot].join("|"),"g"),Wt=RegExp("[\\u200d\\ud800-\\udfff\\u0300-\\u036f\\ufe20-\\ufe23\\u20d0-\\u20f0\\ufe0e\\ufe0f]"),Bt=/[a-z][A-Z]|[A-Z]{2,}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,Lt="Array Buffer DataView Date Error Float32Array Float64Array Function Int8Array Int16Array Int32Array Map Math Object Promise Reflect RegExp Set String Symbol TypeError Uint8Array Uint8ClampedArray Uint16Array Uint32Array WeakMap _ clearTimeout isFinite parseInt setTimeout".split(" "),Mt={};
Mt["[object Float32Array]"]=Mt["[object Float64Array]"]=Mt["[object Int8Array]"]=Mt["[object Int16Array]"]=Mt["[object Int32Array]"]=Mt["[object Uint8Array]"]=Mt["[object Uint8ClampedArray]"]=Mt["[object Uint16Array]"]=Mt["[object Uint32Array]"]=true,Mt["[object Arguments]"]=Mt["[object Array]"]=Mt["[object ArrayBuffer]"]=Mt["[object Boolean]"]=Mt["[object DataView]"]=Mt["[object Date]"]=Mt["[object Error]"]=Mt["[object Function]"]=Mt["[object Map]"]=Mt["[object Number]"]=Mt["[object Object]"]=Mt["[object RegExp]"]=Mt["[object Set]"]=Mt["[object String]"]=Mt["[object WeakMap]"]=false;
var Ct={};Ct["[object Arguments]"]=Ct["[object Array]"]=Ct["[object ArrayBuffer]"]=Ct["[object DataView]"]=Ct["[object Boolean]"]=Ct["[object Date]"]=Ct["[object Float32Array]"]=Ct["[object Float64Array]"]=Ct["[object Int8Array]"]=Ct["[object Int16Array]"]=Ct["[object Int32Array]"]=Ct["[object Map]"]=Ct["[object Number]"]=Ct["[object Object]"]=Ct["[object RegExp]"]=Ct["[object Set]"]=Ct["[object String]"]=Ct["[object Symbol]"]=Ct["[object Uint8Array]"]=Ct["[object Uint8ClampedArray]"]=Ct["[object Uint16Array]"]=Ct["[object Uint32Array]"]=true,
Ct["[object Error]"]=Ct["[object Function]"]=Ct["[object WeakMap]"]=false;var zt={"\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"},Ut={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;","`":"&#96;"},Dt={"&amp;":"&","&lt;":"<","&gt;":">","&quot;":'"',"&#39;":"'","&#96;":"`"},Ft={"function":true,object:true},$t={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"
},Nt=parseFloat,Pt=parseInt,Zt=Ft[typeof exports]&&exports&&!exports.nodeType?exports:T,Tt=Ft[typeof module]&&module&&!module.nodeType?module:T,qt=Tt&&Tt.exports===Zt?Zt:T,Vt=R(Ft[typeof self]&&self),Kt=R(Ft[typeof window]&&window),Gt=R(Ft[typeof this]&&this),Jt=R(Zt&&Tt&&typeof global=="object"&&global)||Kt!==(Gt&&Gt.window)&&Kt||Vt||Gt||Function("return this")(),Yt=Z();(Kt||Vt||{})._=Yt,typeof define=="function"&&typeof define.amd=="object"&&define.amd? define(function(){return Yt}):Zt&&Tt?(qt&&((Tt.exports=Yt)._=Yt),
Zt._=Yt):Jt._=Yt}).call(this);

View file

@ -0,0 +1,352 @@
(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',
'extendWith': 'assignInWith',
'first': 'head',
// Ramda aliases.
'__': 'placeholder',
'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',
'equals': 'isEqual',
'identical': 'eq',
'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',
'unapply': 'rest',
'unnest': 'flatten',
'useWith': 'overArgs',
'whereEq': 'filter',
'zipObj': 'zipObject'
};
/** Used to map ary to method names. */
exports.aryMethod = {
'1': [
'attempt', 'castArray', 'ceil', 'create', 'curry', 'curryRight', 'floor',
'flow', 'flowRight', 'fromPairs', 'invert', 'iteratee', 'memoize', 'method',
'methodOf', 'mixin', 'over', 'overEvery', 'overSome', 'rest', 'reverse',
'round', 'runInContext', 'spread', 'template', 'trim', 'trimEnd', 'trimStart',
'uniqueId', 'words'
],
'2': [
'add', 'after', 'ary', 'assign', 'assignIn', 'at', 'before', 'bind', 'bindAll',
'bindKey', 'chunk', 'cloneDeepWith', 'cloneWith', 'concat', 'countBy', 'curryN',
'curryRightN', 'debounce', 'defaults', 'defaultsDeep', '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', 'minBy', 'multiply', 'nth',
'omit', 'omitBy', 'overArgs', 'pad', 'padEnd', 'padStart', 'parseInt',
'partial', 'partialRight', 'partition', 'pick', 'pickBy', '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',
'getOr', 'inRange', 'intersectionBy', 'intersectionWith', 'invokeArgs',
'invokeArgsMap', 'isEqualWith', 'isMatchWith', 'flatMapDepth', '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,
'findIndex': 1,
'findKey': 1,
'findLast': 1,
'findLastIndex': 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 = {
'assignInWith': [1, 2, 0],
'assignWith': [1, 2, 0],
'getOr': [2, 1, 0],
'isEqualWith': [1, 2, 0],
'isMatchWith': [2, 1, 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],
'updateWith': [3, 1, 2, 0],
'zipWith': [1, 2, 0]
};
/** Used to map method names to spread configs. */
exports.methodSpread = {
'invokeArgs': 2,
'invokeArgsMap': 2,
'partial': 1,
'partialRight': 1,
'without': 1
};
/** 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,
'assignIn': true,
'assignInWith': true,
'assignWith': true,
'defaults': true,
'defaultsDeep': true,
'merge': 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 = {
'curryN': 'curry',
'curryRightN': 'curryRight',
'getOr': 'get',
'invokeArgs': 'invoke',
'invokeArgsMap': 'invokeMap',
'padChars': 'pad',
'padCharsEnd': 'padEnd',
'padCharsStart': 'padStart',
'restFrom': 'rest',
'spreadFrom': 'spread',
'trimChars': 'trim',
'trimCharsEnd': 'trimEnd',
'trimCharsStart': 'trimStart'
};
/** Used to track methods that skip fixing their arity. */
exports.skipFixed = {
'castArray': true,
'flow': true,
'flowRight': true,
'iteratee': true,
'mixin': 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,
'random': true,
'range': true,
'rangeRight': true,
'subtract': true,
'without': true,
'zip': true,
'zipObject': true
};
/***/ }
/******/ ])
});
;

10774
app/bower_components/lodash/doc/README.md vendored Normal file

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,466 @@
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 immutWrap(func, cloner) {
return function() {
var length = arguments.length;
if (!length) {
return result;
}
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,
'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,
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;
};
},
'runInContext': function(runInContext) {
return function(context) {
return baseConvert(util, runInContext(context), options);
};
}
};
/*--------------------------------------------------------------------------*/
/**
* 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 passed
* thru `transform`.
*
* @private
* @param {Function} func The function to wrap.
* @param {...Function} transform The functions to transform the first argument.
* @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 = immutWrap(func, cloneArray);
}
else if (mutateMap.object[name]) {
wrapped = immutWrap(func, createCloner(func));
}
else if (mutateMap.set[name]) {
wrapped = immutWrap(func, cloneByPath);
}
}
each(aryMethodKeys, function(aryKey) {
each(mapping.aryMethod[aryKey], function(otherName) {
if (name == otherName) {
var aryN = !isLib && mapping.iterateeAry[name],
reargIndexes = mapping.iterateeRearg[name],
spreadStart = mapping.methodSpread[name];
result = wrapped;
if (config.fixed && (forceFixed || !mapping.skipFixed[name])) {
result = spreadStart === undefined
? ary(result, aryKey)
: spread(result, spreadStart);
}
if (config.rearg && aryKey > 1 && (forceRearg || !mapping.skipRearg[name])) {
result = rearg(result, mapping.methodRearg[name] || mapping.aryRearg[aryKey]);
}
if (config.cap) {
if (reargIndexes) {
result = iterateeRearg(result, reargIndexes);
} else if (aryN) {
result = iterateeAry(result, aryN);
}
}
if (forceCurry || (config.curry && aryKey > 1)) {
forceCurry && console.log(forceCurry, name);
result = curry(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;

View file

@ -0,0 +1,18 @@
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;

View file

@ -0,0 +1,290 @@
/** Used to map aliases to their real names. */
exports.aliasToReal = {
// Lodash aliases.
'each': 'forEach',
'eachRight': 'forEachRight',
'entries': 'toPairs',
'entriesIn': 'toPairsIn',
'extend': 'assignIn',
'extendWith': 'assignInWith',
'first': 'head',
// Ramda aliases.
'__': 'placeholder',
'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',
'equals': 'isEqual',
'identical': 'eq',
'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',
'unapply': 'rest',
'unnest': 'flatten',
'useWith': 'overArgs',
'whereEq': 'filter',
'zipObj': 'zipObject'
};
/** Used to map ary to method names. */
exports.aryMethod = {
'1': [
'attempt', 'castArray', 'ceil', 'create', 'curry', 'curryRight', 'floor',
'flow', 'flowRight', 'fromPairs', 'invert', 'iteratee', 'memoize', 'method',
'methodOf', 'mixin', 'over', 'overEvery', 'overSome', 'rest', 'reverse',
'round', 'runInContext', 'spread', 'template', 'trim', 'trimEnd', 'trimStart',
'uniqueId', 'words'
],
'2': [
'add', 'after', 'ary', 'assign', 'assignIn', 'at', 'before', 'bind', 'bindAll',
'bindKey', 'chunk', 'cloneDeepWith', 'cloneWith', 'concat', 'countBy', 'curryN',
'curryRightN', 'debounce', 'defaults', 'defaultsDeep', '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', 'minBy', 'multiply', 'nth',
'omit', 'omitBy', 'overArgs', 'pad', 'padEnd', 'padStart', 'parseInt',
'partial', 'partialRight', 'partition', 'pick', 'pickBy', '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',
'getOr', 'inRange', 'intersectionBy', 'intersectionWith', 'invokeArgs',
'invokeArgsMap', 'isEqualWith', 'isMatchWith', 'flatMapDepth', '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,
'findIndex': 1,
'findKey': 1,
'findLast': 1,
'findLastIndex': 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 = {
'assignInWith': [1, 2, 0],
'assignWith': [1, 2, 0],
'getOr': [2, 1, 0],
'isEqualWith': [1, 2, 0],
'isMatchWith': [2, 1, 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],
'updateWith': [3, 1, 2, 0],
'zipWith': [1, 2, 0]
};
/** Used to map method names to spread configs. */
exports.methodSpread = {
'invokeArgs': 2,
'invokeArgsMap': 2,
'partial': 1,
'partialRight': 1,
'without': 1
};
/** 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,
'assignIn': true,
'assignInWith': true,
'assignWith': true,
'defaults': true,
'defaultsDeep': true,
'merge': 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 = {
'curryN': 'curry',
'curryRightN': 'curryRight',
'getOr': 'get',
'invokeArgs': 'invoke',
'invokeArgsMap': 'invokeMap',
'padChars': 'pad',
'padCharsEnd': 'padEnd',
'padCharsStart': 'padStart',
'restFrom': 'rest',
'spreadFrom': 'spread',
'trimChars': 'trim',
'trimCharsEnd': 'trimEnd',
'trimCharsStart': 'trimStart'
};
/** Used to track methods that skip fixing their arity. */
exports.skipFixed = {
'castArray': true,
'flow': true,
'flowRight': true,
'iteratee': true,
'mixin': 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,
'random': true,
'range': true,
'rangeRight': true,
'subtract': true,
'without': true,
'zip': true,
'zipObject': true
};

View file

@ -0,0 +1,6 @@
/**
* The default argument placeholder value for methods.
*
* @type {Object}
*/
module.exports = {};

View file

@ -0,0 +1,71 @@
'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 compiled template and base name 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
};

View file

@ -0,0 +1,9 @@
'use strict';
var _mapping = require('../../fp/_mapping'),
util = require('./util'),
Hash = util.Hash;
/*----------------------------------------------------------------------------*/
module.exports = new Hash(_mapping);

View file

@ -0,0 +1,39 @@
'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`. For
* example, a `srcPath` of `path/to/foo.js` would have a `destPath` of `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;

View file

@ -0,0 +1,23 @@
'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': {
'pure_getters': true,
'unsafe': true,
'warnings': false
},
'mangle': {
'except': ['define']
},
'output': {
'ascii_only': true,
'comments': /^!|@cc_on|@license|@preserve/i,
'max_line_len': 500
}
};

View file

@ -0,0 +1,27 @@
'use strict';
var _ = require('lodash');
/*----------------------------------------------------------------------------*/
/**
* Creates a hash object. If a `properties` object is provided, its own
* enumerable properties are assigned to the created object.
*
* @memberOf util
* @param {Object} [properties] The properties to assign to the object.
* @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);
module.exports = {
'Hash': Hash
};

View file

@ -0,0 +1,55 @@
'use strict';
var _ = require('lodash'),
async = require('async'),
path = require('path'),
webpack = require('webpack');
var file = require('../common/file');
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'
}
};
/*----------------------------------------------------------------------------*/
function onComplete(error) {
if (error) {
throw error;
}
}
function build() {
async.series([
_.partial(webpack, mappingConfig),
_.partial(webpack, fpConfig),
file.min(path.join(distPath, filename))
], onComplete);
}
build();

View file

@ -0,0 +1,65 @@
'use strict';
var _ = require('lodash'),
fs = require('fs-extra'),
path = require('path');
var file = require('../common/file'),
mapping = require('../common/mapping');
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
};
function toArgOrder(array) {
var reordered = [];
_.each(array, function(newIndex, index) {
reordered[newIndex] = argNames[index];
});
return '`(' + reordered.join(', ') + ')`';
}
function toFuncList(array) {
var chunks = _.chunk(array.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 + '`';
}
/*----------------------------------------------------------------------------*/
function onComplete(error) {
if (error) {
throw error;
}
}
function build(target) {
target = path.resolve(target);
fs.writeFile(target, template.wiki(templateData), onComplete);
}
build(_.last(process.argv));

View file

@ -0,0 +1,120 @@
'use strict';
var _ = require('lodash'),
async = require('async'),
glob = require('glob'),
path = require('path');
var file = require('../common/file'),
mapping = require('../common/mapping');
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'
];
function isAlias(funcName) {
return _.has(mapping.aliasToReal, funcName);
}
function isCategory(funcName) {
return _.includes(categories, funcName);
}
function isThru(funcName) {
return !_.includes(aryMethods, funcName);
}
function getTemplate(moduleName) {
var data = {
'name': _.result(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);
}
/*----------------------------------------------------------------------------*/
function onComplete(error) {
if (error) {
throw error;
}
}
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, onComplete);
}
build(_.last(process.argv));

View file

@ -0,0 +1,227 @@
## 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 as their second parameter:<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 Lodashs 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 Schroeders 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. Thats 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 });
// Heres 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.

View file

@ -0,0 +1,7 @@
module.exports = {
'cap': false,
'curry': false,
'fixed': false,
'immutable': false,
'rearg': false
};

View file

@ -0,0 +1,14 @@
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'),
'toPath': require('../toPath')
};

View file

@ -0,0 +1 @@
module.exports = require('./<%= name %>');

View file

@ -0,0 +1,2 @@
var convert = require('./convert');
module.exports = convert(require('../<%= name %>'));

View file

@ -0,0 +1,18 @@
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;

View file

@ -0,0 +1,2 @@
var _ = require('./lodash.min').runInContext();
module.exports = require('./fp/_baseConvert')(_, _);

View file

@ -0,0 +1,5 @@
var convert = require('./convert'),
func = convert('<%= name %>', require('../<%= _.result(mapping.remap, name, name) %>'));
func.placeholder = require('./placeholder');
module.exports = func;

View file

@ -0,0 +1,5 @@
var convert = require('./convert'),
func = convert('<%= name %>', require('../<%= _.result(mapping.remap, name, name) %>'), require('./_falseOptions'));
func.placeholder = require('./placeholder');
module.exports = func;

View file

@ -0,0 +1,30 @@
'use strict';
var async = require('async'),
path = require('path');
var file = require('../common/file');
var basePath = path.join(__dirname, '..', '..'),
distPath = path.join(basePath, 'dist'),
filename = 'lodash.js';
var baseLodash = path.join(basePath, filename),
distLodash = path.join(distPath, filename);
/*----------------------------------------------------------------------------*/
function onComplete(error) {
if (error) {
throw error;
}
}
function build() {
async.series([
file.copy(baseLodash, distLodash),
file.min(distLodash)
], onComplete);
}
build();

View file

@ -0,0 +1,60 @@
'use strict';
var _ = require('lodash'),
docdown = require('docdown'),
fs = require('fs-extra'),
path = require('path');
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': {
'entryLinks': [
'<% if (name == "templateSettings" || !/^(?:methods|properties|seq)$/i.test(category)) {' +
'print("[&#x24C3;](https://www.npmjs.com/package/lodash." + name.toLowerCase() + " \\"See the npm package\\")")' +
'} %>'
],
'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': {
'hash': 'github'
},
'site': {
'tocLink': '#docs'
}
};
function postprocess(string) {
// Fix docdown bugs.
return string
// Repair the default value of `chars`.
// See https://github.com/eslint/doctrine/issues/157 for more details.
.replace(/\bchars=''/g, "chars=' '")
// Wrap symbol property identifiers in brackets.
.replace(/\.(Symbol\.(?:[a-z]+[A-Z]?)+)/g, '[$1]');
}
/*----------------------------------------------------------------------------*/
function onComplete(error) {
if (error) {
throw error;
}
}
function build(type) {
var options = _.defaults({}, config.base, config[type]),
markdown = docdown(options);
fs.writeFile(readmePath, postprocess(markdown), onComplete);
}
build(_.last(process.argv));

View file

@ -0,0 +1,34 @@
'use strict';
var _ = require('lodash'),
async = require('async'),
path = require('path');
var file = require('../common/file');
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']
];
/*----------------------------------------------------------------------------*/
function onComplete(error) {
if (error) {
throw error;
}
}
function build(target) {
var actions = _.map(filePairs, function(pair) {
return file.copy(pair[0], path.join(target, pair[1]));
});
async.series(actions, onComplete);
}
build(_.last(process.argv));

16242
app/bower_components/lodash/lodash.js vendored Normal file

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,54 @@
{
"name": "lodash",
"version": "4.12.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",
"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": "^1.5.2",
"benchmark": "^2.1.0",
"chalk": "^1.1.3",
"codecov.io": "~0.1.6",
"coveralls": "^2.11.9",
"curl-amd": "~0.8.12",
"docdown": "~0.5.1",
"dojo": "^1.11.1",
"ecstatic": "^1.4.0",
"fs-extra": "~0.30.0",
"glob": "^7.0.3",
"istanbul": "0.4.3",
"jquery": "^2.2.3",
"jscs": "^3.0.1",
"lodash": "4.11.2",
"markdown-doctest": "^0.4.0",
"platform": "^1.3.1",
"qunit-extras": "^2.0.0",
"qunitjs": "~1.23.1",
"request": "^2.69.0",
"requirejs": "^2.2.0",
"sauce-tunnel": "^2.4.0",
"uglify-js": "2.6.2",
"webpack": "^1.12.15"
}
}

View file

@ -0,0 +1,131 @@
;(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 = {};
/*--------------------------------------------------------------------------*/
/**
* Registers an event listener on an element.
*
* @private
* @param {Element} element The element.
* @param {string} eventName The name of the event.
* @param {Function} handler The event handler.
* @returns {Element} The element.
*/
function addListener(element, eventName, handler) {
if (typeof element.addEventListener != 'undefined') {
element.addEventListener(eventName, handler, false);
} else if (typeof element.attachEvent != 'undefined') {
element.attachEvent('on' + eventName, handler);
}
}
/*--------------------------------------------------------------------------*/
// Initialize controls.
addListener(window, '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;
}());
addListener(buildList, 'change', eventHandler);
addListener(otherList, '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));

View file

@ -0,0 +1,69 @@
<!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: 2em;
}
#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 0 0.5em 2em;
overflow: hidden;
}
</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>

1977
app/bower_components/lodash/perf/perf.js vendored Normal file

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,170 @@
;(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 = {};
/*--------------------------------------------------------------------------*/
/**
* Registers an event listener on an element.
*
* @private
* @param {Element} element The element.
* @param {string} eventName The name of the event.
* @param {Function} handler The event handler.
* @returns {Element} The element.
*/
function addListener(element, eventName, handler) {
if (typeof element.addEventListener != 'undefined') {
element.addEventListener(eventName, handler, false);
} else if (typeof element.attachEvent != 'undefined') {
element.attachEvent('on' + eventName, handler);
}
}
/*--------------------------------------------------------------------------*/
// Initialize controls.
addListener(window, '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.appendChild(span1);
toolbar.appendChild(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;
}());
addListener(buildList, 'change', eventHandler);
addListener(loaderList, 'change', eventHandler);
}
var span1 = document.createElement('span');
span1.style.cssText = 'float:right';
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.style.cssText = 'float:right';
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>';
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));

View file

@ -0,0 +1,15 @@
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);

View file

@ -0,0 +1,170 @@
<!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>

View file

@ -0,0 +1,41 @@
<!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>

View file

@ -0,0 +1,351 @@
<!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>

View file

@ -0,0 +1,27 @@
#!/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, ''));
}));

View file

@ -0,0 +1,914 @@
#!/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', '50'],
['Windows 10', 'chrome', '49'],
['Windows 10', 'firefox', '46'],
['Windows 10', 'firefox', '45'],
['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 = _.result(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 = _.result(res, 'statusCode'),
taskId = _.first(_.result(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 = _.result(body, 'completed', false),
data = _.first(_.result(body, 'js tests')),
elapsed = (_.now() - this.timestamp) / 1000,
jobId = _.result(data, 'job_id', null),
jobResult = _.result(data, 'result', null),
jobStatus = _.result(data, 'status', ''),
jobUrl = _.result(data, 'url', null),
expired = (elapsed >= queueTimeout && !_.includes(jobStatus, 'in progress')),
options = this.options,
platform = options.platforms[0];
if (_.isObject(jobResult)) {
var message = _.result(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 = _.result(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 (typeof 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);

File diff suppressed because it is too large Load diff

26351
app/bower_components/lodash/test/test.js vendored Normal file

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,484 @@
<!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'
],
'head': [
'is an alias for first'
],
'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'
],
'range': [
'range with two arguments a &amp; b, b&lt;a generates an empty array'
],
'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': [
'true'
],
'each': [
'context object property accessed'
],
'every': [
'Can be called with object',
'Died on test #15',
'context works'
],
'filter': [
'given context',
'[{"a":1,"b":2},{"a":1,"b":3},{"a":1,"b":4}]',
'[{"a":1,"b":2},{"a":2,"b":2}]',
'Empty object accepts all items',
'OO-filter'
],
'find': [
'{"a":1,"b":4}',
'undefined when not found',
'undefined when searching empty list',
'works on objects',
'undefined',
'called with context'
],
'findWhere': [
'checks properties given function'
],
'groupBy': [
'true'
],
'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',
'function(a){[code]}'
],
'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>',
'<span id="id1"></span>'
]
},
'Functions': {
'debounce asap': true,
'debounce asap cancel': true,
'debounce after system time is set backwards': true,
'debounce asap recursively': 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'
],
'memoize': [
'{"bar":"BAR","foo":"FOO"}',
'Died on test #8'
],
'partial':[
'can partially apply with placeholders',
'accepts more arguments than the number of placeholders',
'accepts fewer arguments than the number of placeholders',
'unfilled placeholders are undefined',
'keeps prototype',
'allows the placeholder to be swapped out'
]
},
'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',
'[]'
],
'defaults': [
'defaults skips nulls',
'defaults skips undefined'
],
'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`',
'false'
],
'isFinite': [
'Numeric strings are numbers',
'Number instances can be finite'
],
'isMatch': [
'doesnt falsey match constructor on undefined/null'
],
'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'
],
'matcher': [
'null matches null',
'treats primitives as empty'
],
'omit': [
'can accept a predicate',
'function is given context'
],
'pick': [
'can accept a predicate and context',
'function is given context'
]
},
'Utility': {
'noConflict (node vm)': true,
'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>

View file

@ -0,0 +1,22 @@
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.

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,706 @@
(function() {
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);
});
})();

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,13 @@
(function() {
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');
});
})();

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,4 @@
$('body').append(
'<div id="qunit"></div>' +
'<div id="qunit-fixture"></div>'
);

View file

@ -0,0 +1,45 @@
(function() {
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;
});
})();

View file

@ -0,0 +1,239 @@
(function() {
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');
});
})();

View file

@ -0,0 +1,495 @@
(function() {
var view;
QUnit.module('Backbone.View', {
beforeEach: function(assert) {
$('#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('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);
});
})();

View file

@ -0,0 +1,30 @@
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.

Binary file not shown.

After

Width:  |  Height:  |  Size: 43 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 167 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 171 B

View file

@ -0,0 +1,331 @@
/* 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;
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 655 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 586 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 340 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 543 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 344 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 512 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 637 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 543 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 526 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 447 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 365 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 457 B

View file

@ -0,0 +1,817 @@
.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;
}

View file

@ -0,0 +1,20 @@
/************************************************************************************************/
#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;
}

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,215 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/DTD/strict.dtd">
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<title>Firebug Lite</title>
<!-- An empty script to avoid FOUC when loading the stylesheet -->
<script type="text/javascript"></script>
<style type="text/css" media="screen">@import "firebug.css";</style>
<style>html,body{margin:0;padding:0;overflow:hidden;}</style>
</head>
<body class="fbBody">
<table id="fbChrome" cellpadding="0" cellspacing="0" border="0">
<tbody>
<tr>
<!-- Interface - Top Area -->
<td id="fbTop" colspan="2">
<!--
<div>
--><!-- <span id="fbToolbarErrors" class="fbErrors">2 errors</span> --><!--
<input type="text" id="fbToolbarSearch" />
</div>
-->
<!-- Window Buttons -->
<div id="fbWindowButtons">
<a id="fbWindow_btDeactivate" class="fbSmallButton fbHover" title="Deactivate Firebug for this web page">&nbsp;</a>
<a id="fbWindow_btDetach" class="fbSmallButton fbHover" title="Open Firebug in popup window">&nbsp;</a>
<a id="fbWindow_btClose" class="fbSmallButton fbHover" title="Minimize Firebug">&nbsp;</a>
</div>
<!-- Toolbar buttons and Status Bar -->
<div id="fbToolbar">
<div id="fbToolbarContent">
<!-- Firebug Button -->
<span id="fbToolbarIcon">
<a id="fbFirebugButton" class="fbIconButton" class="fbHover" target="_blank">&nbsp;</a>
</span>
<!--
<span id="fbLeftToolbarErrors" class="fbErrors">2 errors</span>
-->
<!-- Toolbar Buttons -->
<span id="fbToolbarButtons">
<!-- Fixed Toolbar Buttons -->
<span id="fbFixedButtons">
<a id="fbChrome_btInspect" class="fbButton fbHover" title="Click an element in the page to inspect">Inspect</a>
</span>
<!-- Console Panel Toolbar Buttons -->
<span id="fbConsoleButtons" class="fbToolbarButtons">
<a id="fbConsole_btClear" class="fbButton fbHover" title="Clear the console">Clear</a>
</span>
<!-- HTML Panel Toolbar Buttons -->
<!--
<span id="fbHTMLButtons" class="fbToolbarButtons">
<a id="fbHTML_btEdit" class="fbHover" title="Edit this HTML">Edit</a>
</span>
-->
</span>
<!-- Status Bar -->
<span id="fbStatusBarBox">
<span class="fbToolbarSeparator"></span>
<!-- HTML Panel Status Bar -->
<!--
<span id="fbHTMLStatusBar" class="fbStatusBar fbToolbarButtons">
</span>
-->
</span>
</div>
</div>
<!-- PanelBars -->
<div id="fbPanelBarBox">
<!-- Main PanelBar -->
<div id="fbPanelBar1" class="fbPanelBar">
<a id="fbConsoleTab" class="fbTab fbHover">
<span class="fbTabL"></span>
<span class="fbTabText">Console</span>
<span class="fbTabMenuTarget"></span>
<span class="fbTabR"></span>
</a>
<a id="fbHTMLTab" class="fbTab fbHover">
<span class="fbTabL"></span>
<span class="fbTabText">HTML</span>
<span class="fbTabR"></span>
</a>
<a class="fbTab fbHover">
<span class="fbTabL"></span>
<span class="fbTabText">CSS</span>
<span class="fbTabR"></span>
</a>
<a class="fbTab fbHover">
<span class="fbTabL"></span>
<span class="fbTabText">Script</span>
<span class="fbTabR"></span>
</a>
<a class="fbTab fbHover">
<span class="fbTabL"></span>
<span class="fbTabText">DOM</span>
<span class="fbTabR"></span>
</a>
</div>
<!-- Side PanelBars -->
<div id="fbPanelBar2Box" class="hide">
<div id="fbPanelBar2" class="fbPanelBar">
<!--
<a class="fbTab fbHover">
<span class="fbTabL"></span>
<span class="fbTabText">Style</span>
<span class="fbTabR"></span>
</a>
<a class="fbTab fbHover">
<span class="fbTabL"></span>
<span class="fbTabText">Layout</span>
<span class="fbTabR"></span>
</a>
<a class="fbTab fbHover">
<span class="fbTabL"></span>
<span class="fbTabText">DOM</span>
<span class="fbTabR"></span>
</a>
-->
</div>
</div>
</div>
<!-- Horizontal Splitter -->
<div id="fbHSplitter">&nbsp;</div>
</td>
</tr>
<!-- Interface - Main Area -->
<tr id="fbContent">
<!-- Panels -->
<td id="fbPanelBox1">
<div id="fbPanel1" class="fbFitHeight">
<div id="fbConsole" class="fbPanel"></div>
<div id="fbHTML" class="fbPanel"></div>
</div>
</td>
<!-- Side Panel Box -->
<td id="fbPanelBox2" class="hide">
<!-- VerticalSplitter -->
<div id="fbVSplitter" class="fbVSplitter">&nbsp;</div>
<!-- Side Panels -->
<div id="fbPanel2" class="fbFitHeight">
<!-- HTML Side Panels -->
<div id="fbHTML_Style" class="fbPanel"></div>
<div id="fbHTML_Layout" class="fbPanel"></div>
<div id="fbHTML_DOM" class="fbPanel"></div>
</div>
<!-- Large Command Line -->
<textarea id="fbLargeCommandLine" class="fbFitHeight"></textarea>
<!-- Large Command Line Buttons -->
<div id="fbLargeCommandButtons">
<a id="fbCommand_btRun" class="fbButton fbHover">Run</a>
<a id="fbCommand_btClear" class="fbButton fbHover">Clear</a>
<a id="fbSmallCommandLineIcon" class="fbSmallButton fbHover"></a>
</div>
</td>
</tr>
<!-- Interface - Bottom Area -->
<tr id="fbBottom" class="hide">
<!-- Command Line -->
<td id="fbCommand" colspan="2">
<div id="fbCommandBox">
<div id="fbCommandIcon">&gt;&gt;&gt;</div>
<input id="fbCommandLine" name="fbCommandLine" type="text" />
<a id="fbLargeCommandLineIcon" class="fbSmallButton fbHover"></a>
</div>
</td>
</tr>
</tbody>
</table>
<span id="fbMiniChrome">
<span id="fbMiniContent">
<span id="fbMiniIcon" title="Open Firebug Lite"></span>
<span id="fbMiniErrors" class="fbErrors"><!-- 2 errors --></span>
</span>
</span>
<!--
<div id="fbErrorPopup">
<div id="fbErrorPopupContent">
<div id="fbErrorIndicator" class="fbErrors">2 errors</div>
</div>
</div>
-->
</body>
</html>

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 158 B

View file

@ -0,0 +1,272 @@
/* See license.txt for terms of usage */
.panelNode-html {
-moz-box-sizing: padding-box;
padding: 4px 0 0 2px;
}
.nodeBox {
position: relative;
font-family: Monaco, monospace;
padding-left: 13px;
-moz-user-select: -moz-none;
}
.nodeBox.search-selection {
-moz-user-select: text;
}
.twisty {
position: absolute;
left: 0px;
top: 0px;
width: 14px;
height: 14px;
}
.nodeChildBox {
margin-left: 12px;
display: none;
}
.nodeLabel,
.nodeCloseLabel {
margin: -2px 2px 0 2px;
border: 2px solid transparent;
-moz-border-radius: 3px;
padding: 0 2px;
color: #000088;
}
.nodeCloseLabel {
display: none;
}
.nodeTag {
cursor: pointer;
color: blue;
}
.nodeValue {
color: #FF0000;
font-weight: normal;
}
.nodeText,
.nodeComment {
margin: 0 2px;
vertical-align: top;
}
.nodeText {
color: #333333;
}
.nodeWhiteSpace {
border: 1px solid LightGray;
white-space: pre; /* otherwise the border will be collapsed around zero pixels */
margin-left: 1px;
color: gray;
}
.nodeWhiteSpace_Space {
border: 1px solid #ddd;
}
.nodeTextEntity {
border: 1px solid gray;
white-space: pre; /* otherwise the border will be collapsed around zero pixels */
margin-left: 1px;
}
.nodeComment {
color: DarkGreen;
}
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
.nodeBox.highlightOpen > .nodeLabel {
background-color: #EEEEEE;
}
.nodeBox.highlightOpen > .nodeCloseLabel,
.nodeBox.highlightOpen > .nodeChildBox,
.nodeBox.open > .nodeCloseLabel,
.nodeBox.open > .nodeChildBox {
display: block;
}
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
.nodeBox.selected > .nodeLabel > .nodeLabelBox,
.nodeBox.selected > .nodeLabel {
border-color: Highlight;
background-color: Highlight;
color: HighlightText !important;
}
.nodeBox.selected > .nodeLabel > .nodeLabelBox,
.nodeBox.selected > .nodeLabel > .nodeLabelBox > .nodeTag,
.nodeBox.selected > .nodeLabel > .nodeLabelBox > .nodeAttr > .nodeValue,
.nodeBox.selected > .nodeLabel > .nodeLabelBox > .nodeText {
color: inherit !important;
}
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
.nodeBox.highlighted > .nodeLabel {
border-color: Highlight !important;
background-color: cyan !important;
color: #000000 !important;
}
.nodeBox.highlighted > .nodeLabel > .nodeLabelBox,
.nodeBox.highlighted > .nodeLabel > .nodeLabelBox > .nodeTag,
.nodeBox.highlighted > .nodeLabel > .nodeLabelBox > .nodeAttr > .nodeValue,
.nodeBox.highlighted > .nodeLabel > .nodeLabelBox > .nodeText {
color: #000000 !important;
}
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
.nodeBox.nodeHidden .nodeLabel > .nodeLabelBox,
.nodeBox.nodeHidden .nodeCloseLabel,
.nodeBox.nodeHidden .nodeLabel > .nodeLabelBox > .nodeText,
.nodeBox.nodeHidden .nodeText {
color: #888888;
}
.nodeBox.nodeHidden .nodeLabel > .nodeLabelBox > .nodeTag,
.nodeBox.nodeHidden .nodeCloseLabel > .nodeCloseLabelBox > .nodeTag {
color: #5F82D9;
}
.nodeBox.nodeHidden .nodeLabel > .nodeLabelBox > .nodeAttr > .nodeValue {
color: #D86060;
}
.nodeBox.nodeHidden.selected > .nodeLabel > .nodeLabelBox,
.nodeBox.nodeHidden.selected > .nodeLabel > .nodeLabelBox > .nodeTag,
.nodeBox.nodeHidden.selected > .nodeLabel > .nodeLabelBox > .nodeAttr > .nodeValue,
.nodeBox.nodeHidden.selected > .nodeLabel > .nodeLabelBox > .nodeText {
color: SkyBlue !important;
}
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
.nodeBox.mutated > .nodeLabel,
.nodeAttr.mutated,
.nodeValue.mutated,
.nodeText.mutated,
.nodeBox.mutated > .nodeText {
background-color: #EFFF79;
color: #FF0000 !important;
}
.nodeBox.selected.mutated > .nodeLabel,
.nodeBox.selected.mutated > .nodeLabel > .nodeLabelBox,
.nodeBox.selected > .nodeLabel > .nodeLabelBox > .nodeAttr.mutated > .nodeValue,
.nodeBox.selected > .nodeLabel > .nodeLabelBox > .nodeAttr > .nodeValue.mutated,
.nodeBox.selected > .nodeLabel > .nodeLabelBox > .nodeText.mutated {
background-color: #EFFF79;
border-color: #EFFF79;
color: #FF0000 !important;
}
/************************************************************************************************/
.logRow-dirxml {
padding-left: 0;
}
.soloElement > .nodeBox {
padding-left: 0;
}
.useA11y .nodeLabel.focused {
outline: 2px solid #FF9933;
-moz-outline-radius: 3px;
outline-offset: -2px;
}
.useA11y .nodeLabelBox:focus {
outline: none;
}
/************************************************************************************************/
.breakpointCode .twisty {
display: none;
}
.breakpointCode .nodeBox.containerNodeBox,
.breakpointCode .nodeLabel {
padding-left: 0px;
margin-left: 0px;
font-family: Monaco, monospace !important;
}
.breakpointCode .nodeTag,
.breakpointCode .nodeAttr,
.breakpointCode .nodeText,
.breakpointCode .nodeValue,
.breakpointCode .nodeLabel {
color: DarkGreen !important;
}
.breakpointMutationType {
position: absolute;
top: 4px;
right: 20px;
color: gray;
}
/************************************************************************************************/
/************************************************************************************************/
/************************************************************************************************/
/************************************************************************************************/
/************************************************************************************************/
/************************************************************************************************/
/************************************************************************************************/
/************************************************************************************************/
/************************************************************************************************/
/************************************************************************************************/
/************************************************************************************************/
/* Twisties */
.twisty,
.logRow-errorMessage > .hasTwisty > .errorTitle,
.logRow-log > .objectBox-array.hasTwisty,
.logRow-spy .spyHead .spyTitle,
.logGroup > .logRow,
.memberRow.hasChildren > .memberLabelCell > .memberLabel,
.hasHeaders .netHrefLabel,
.netPageRow > .netCol > .netPageTitle {
background-image: url(twistyClosed.png);
background-repeat: no-repeat;
background-position: 2px 2px;
min-height: 12px;
}
.logRow-errorMessage > .hasTwisty.opened > .errorTitle,
.logRow-log > .objectBox-array.hasTwisty.opened,
.logRow-spy.opened .spyHead .spyTitle,
.logGroup.opened > .logRow,
.memberRow.hasChildren.opened > .memberLabelCell > .memberLabel,
.nodeBox.highlightOpen > .nodeLabel > .twisty,
.nodeBox.open > .nodeLabel > .twisty,
.netRow.opened > .netCol > .netHrefLabel,
.netPageRow.opened > .netCol > .netPageTitle {
background-image: url(twistyOpen.png);
}
.twisty {
background-position: 4px 4px;
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 359 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 524 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 552 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 485 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 742 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 680 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 43 B

Some files were not shown because too many files have changed in this diff Show more