mirror of
https://github.com/elastic/kibana.git
synced 2025-04-23 17:28:26 -04:00
including the bower_components in the repo
This commit is contained in:
parent
a6742be90a
commit
fc30f87883
702 changed files with 178067 additions and 2 deletions
3
.gitignore
vendored
3
.gitignore
vendored
|
@ -1,2 +1 @@
|
|||
node_modules/
|
||||
bower_components
|
||||
node_modules
|
17
src/bower_components/angular/.bower.json
vendored
Normal file
17
src/bower_components/angular/.bower.json
vendored
Normal file
|
@ -0,0 +1,17 @@
|
|||
{
|
||||
"name": "angular",
|
||||
"version": "1.2.10",
|
||||
"main": "./angular.js",
|
||||
"dependencies": {},
|
||||
"homepage": "https://github.com/angular/bower-angular",
|
||||
"_release": "1.2.10",
|
||||
"_resolution": {
|
||||
"type": "version",
|
||||
"tag": "v1.2.10",
|
||||
"commit": "e46b582e3004c1f9e6eaa3ece1ba63300e967579"
|
||||
},
|
||||
"_source": "git://github.com/angular/bower-angular.git",
|
||||
"_target": "~1.2.10",
|
||||
"_originalSource": "angular",
|
||||
"_direct": true
|
||||
}
|
48
src/bower_components/angular/README.md
vendored
Normal file
48
src/bower_components/angular/README.md
vendored
Normal file
|
@ -0,0 +1,48 @@
|
|||
# bower-angular
|
||||
|
||||
This repo is for distribution on `bower`. The source for this module is in the
|
||||
[main AngularJS repo](https://github.com/angular/angular.js).
|
||||
Please file issues and pull requests against that repo.
|
||||
|
||||
## Install
|
||||
|
||||
Install with `bower`:
|
||||
|
||||
```shell
|
||||
bower install angular
|
||||
```
|
||||
|
||||
Add a `<script>` to your `index.html`:
|
||||
|
||||
```html
|
||||
<script src="/bower_components/angular/angular.js"></script>
|
||||
```
|
||||
|
||||
## Documentation
|
||||
|
||||
Documentation is available on the
|
||||
[AngularJS docs site](http://docs.angularjs.org/).
|
||||
|
||||
## License
|
||||
|
||||
The MIT License
|
||||
|
||||
Copyright (c) 2010-2012 Google, Inc. http://angularjs.org
|
||||
|
||||
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.
|
13
src/bower_components/angular/angular-csp.css
vendored
Normal file
13
src/bower_components/angular/angular-csp.css
vendored
Normal file
|
@ -0,0 +1,13 @@
|
|||
/* Include this file in your html if you are using the CSP mode. */
|
||||
|
||||
@charset "UTF-8";
|
||||
|
||||
[ng\:cloak], [ng-cloak], [data-ng-cloak], [x-ng-cloak],
|
||||
.ng-cloak, .x-ng-cloak,
|
||||
.ng-hide {
|
||||
display: none !important;
|
||||
}
|
||||
|
||||
ng\:form {
|
||||
display: block;
|
||||
}
|
20594
src/bower_components/angular/angular.js
vendored
Normal file
20594
src/bower_components/angular/angular.js
vendored
Normal file
File diff suppressed because it is too large
Load diff
202
src/bower_components/angular/angular.min.js
vendored
Normal file
202
src/bower_components/angular/angular.min.js
vendored
Normal file
|
@ -0,0 +1,202 @@
|
|||
/*
|
||||
AngularJS v1.2.10
|
||||
(c) 2010-2014 Google, Inc. http://angularjs.org
|
||||
License: MIT
|
||||
*/
|
||||
(function(Z,Q,r){'use strict';function F(b){return function(){var a=arguments[0],c,a="["+(b?b+":":"")+a+"] http://errors.angularjs.org/1.2.10/"+(b?b+"/":"")+a;for(c=1;c<arguments.length;c++)a=a+(1==c?"?":"&")+"p"+(c-1)+"="+encodeURIComponent("function"==typeof arguments[c]?arguments[c].toString().replace(/ \{[\s\S]*$/,""):"undefined"==typeof arguments[c]?"undefined":"string"!=typeof arguments[c]?JSON.stringify(arguments[c]):arguments[c]);return Error(a)}}function rb(b){if(null==b||Aa(b))return!1;
|
||||
var a=b.length;return 1===b.nodeType&&a?!0:D(b)||K(b)||0===a||"number"===typeof a&&0<a&&a-1 in b}function q(b,a,c){var d;if(b)if(L(b))for(d in b)"prototype"==d||("length"==d||"name"==d||b.hasOwnProperty&&!b.hasOwnProperty(d))||a.call(c,b[d],d);else if(b.forEach&&b.forEach!==q)b.forEach(a,c);else if(rb(b))for(d=0;d<b.length;d++)a.call(c,b[d],d);else for(d in b)b.hasOwnProperty(d)&&a.call(c,b[d],d);return b}function Pb(b){var a=[],c;for(c in b)b.hasOwnProperty(c)&&a.push(c);return a.sort()}function Pc(b,
|
||||
a,c){for(var d=Pb(b),e=0;e<d.length;e++)a.call(c,b[d[e]],d[e]);return d}function Qb(b){return function(a,c){b(c,a)}}function $a(){for(var b=ka.length,a;b;){b--;a=ka[b].charCodeAt(0);if(57==a)return ka[b]="A",ka.join("");if(90==a)ka[b]="0";else return ka[b]=String.fromCharCode(a+1),ka.join("")}ka.unshift("0");return ka.join("")}function Rb(b,a){a?b.$$hashKey=a:delete b.$$hashKey}function t(b){var a=b.$$hashKey;q(arguments,function(a){a!==b&&q(a,function(a,c){b[c]=a})});Rb(b,a);return b}function S(b){return parseInt(b,
|
||||
10)}function Sb(b,a){return t(new (t(function(){},{prototype:b})),a)}function w(){}function Ba(b){return b}function $(b){return function(){return b}}function z(b){return"undefined"===typeof b}function B(b){return"undefined"!==typeof b}function X(b){return null!=b&&"object"===typeof b}function D(b){return"string"===typeof b}function sb(b){return"number"===typeof b}function La(b){return"[object Date]"===Ma.call(b)}function K(b){return"[object Array]"===Ma.call(b)}function L(b){return"function"===typeof b}
|
||||
function ab(b){return"[object RegExp]"===Ma.call(b)}function Aa(b){return b&&b.document&&b.location&&b.alert&&b.setInterval}function Qc(b){return!(!b||!(b.nodeName||b.on&&b.find))}function Rc(b,a,c){var d=[];q(b,function(b,g,f){d.push(a.call(c,b,g,f))});return d}function bb(b,a){if(b.indexOf)return b.indexOf(a);for(var c=0;c<b.length;c++)if(a===b[c])return c;return-1}function Na(b,a){var c=bb(b,a);0<=c&&b.splice(c,1);return a}function aa(b,a){if(Aa(b)||b&&b.$evalAsync&&b.$watch)throw Oa("cpws");if(a){if(b===
|
||||
a)throw Oa("cpi");if(K(b))for(var c=a.length=0;c<b.length;c++)a.push(aa(b[c]));else{c=a.$$hashKey;q(a,function(b,c){delete a[c]});for(var d in b)a[d]=aa(b[d]);Rb(a,c)}}else(a=b)&&(K(b)?a=aa(b,[]):La(b)?a=new Date(b.getTime()):ab(b)?a=RegExp(b.source):X(b)&&(a=aa(b,{})));return a}function Tb(b,a){a=a||{};for(var c in b)b.hasOwnProperty(c)&&("$"!==c.charAt(0)&&"$"!==c.charAt(1))&&(a[c]=b[c]);return a}function ua(b,a){if(b===a)return!0;if(null===b||null===a)return!1;if(b!==b&&a!==a)return!0;var c=typeof b,
|
||||
d;if(c==typeof a&&"object"==c)if(K(b)){if(!K(a))return!1;if((c=b.length)==a.length){for(d=0;d<c;d++)if(!ua(b[d],a[d]))return!1;return!0}}else{if(La(b))return La(a)&&b.getTime()==a.getTime();if(ab(b)&&ab(a))return b.toString()==a.toString();if(b&&b.$evalAsync&&b.$watch||a&&a.$evalAsync&&a.$watch||Aa(b)||Aa(a)||K(a))return!1;c={};for(d in b)if("$"!==d.charAt(0)&&!L(b[d])){if(!ua(b[d],a[d]))return!1;c[d]=!0}for(d in a)if(!c.hasOwnProperty(d)&&"$"!==d.charAt(0)&&a[d]!==r&&!L(a[d]))return!1;return!0}return!1}
|
||||
function Ub(){return Q.securityPolicy&&Q.securityPolicy.isActive||Q.querySelector&&!(!Q.querySelector("[ng-csp]")&&!Q.querySelector("[data-ng-csp]"))}function cb(b,a){var c=2<arguments.length?va.call(arguments,2):[];return!L(a)||a instanceof RegExp?a:c.length?function(){return arguments.length?a.apply(b,c.concat(va.call(arguments,0))):a.apply(b,c)}:function(){return arguments.length?a.apply(b,arguments):a.call(b)}}function Sc(b,a){var c=a;"string"===typeof b&&"$"===b.charAt(0)?c=r:Aa(a)?c="$WINDOW":
|
||||
a&&Q===a?c="$DOCUMENT":a&&(a.$evalAsync&&a.$watch)&&(c="$SCOPE");return c}function qa(b,a){return"undefined"===typeof b?r:JSON.stringify(b,Sc,a?" ":null)}function Vb(b){return D(b)?JSON.parse(b):b}function Pa(b){"function"===typeof b?b=!0:b&&0!==b.length?(b=x(""+b),b=!("f"==b||"0"==b||"false"==b||"no"==b||"n"==b||"[]"==b)):b=!1;return b}function ga(b){b=A(b).clone();try{b.empty()}catch(a){}var c=A("<div>").append(b).html();try{return 3===b[0].nodeType?x(c):c.match(/^(<[^>]+>)/)[1].replace(/^<([\w\-]+)/,
|
||||
function(a,b){return"<"+x(b)})}catch(d){return x(c)}}function Wb(b){try{return decodeURIComponent(b)}catch(a){}}function Xb(b){var a={},c,d;q((b||"").split("&"),function(b){b&&(c=b.split("="),d=Wb(c[0]),B(d)&&(b=B(c[1])?Wb(c[1]):!0,a[d]?K(a[d])?a[d].push(b):a[d]=[a[d],b]:a[d]=b))});return a}function Yb(b){var a=[];q(b,function(b,d){K(b)?q(b,function(b){a.push(wa(d,!0)+(!0===b?"":"="+wa(b,!0)))}):a.push(wa(d,!0)+(!0===b?"":"="+wa(b,!0)))});return a.length?a.join("&"):""}function tb(b){return wa(b,
|
||||
!0).replace(/%26/gi,"&").replace(/%3D/gi,"=").replace(/%2B/gi,"+")}function wa(b,a){return encodeURIComponent(b).replace(/%40/gi,"@").replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,a?"%20":"+")}function Tc(b,a){function c(a){a&&d.push(a)}var d=[b],e,g,f=["ng:app","ng-app","x-ng-app","data-ng-app"],h=/\sng[:\-]app(:\s*([\w\d_]+);?)?\s/;q(f,function(a){f[a]=!0;c(Q.getElementById(a));a=a.replace(":","\\:");b.querySelectorAll&&(q(b.querySelectorAll("."+a),c),q(b.querySelectorAll("."+
|
||||
a+"\\:"),c),q(b.querySelectorAll("["+a+"]"),c))});q(d,function(a){if(!e){var b=h.exec(" "+a.className+" ");b?(e=a,g=(b[2]||"").replace(/\s+/g,",")):q(a.attributes,function(b){!e&&f[b.name]&&(e=a,g=b.value)})}});e&&a(e,g?[g]:[])}function Zb(b,a){var c=function(){b=A(b);if(b.injector()){var c=b[0]===Q?"document":ga(b);throw Oa("btstrpd",c);}a=a||[];a.unshift(["$provide",function(a){a.value("$rootElement",b)}]);a.unshift("ng");c=$b(a);c.invoke(["$rootScope","$rootElement","$compile","$injector","$animate",
|
||||
function(a,b,c,d,e){a.$apply(function(){b.data("$injector",d);c(b)(a)})}]);return c},d=/^NG_DEFER_BOOTSTRAP!/;if(Z&&!d.test(Z.name))return c();Z.name=Z.name.replace(d,"");Ca.resumeBootstrap=function(b){q(b,function(b){a.push(b)});c()}}function db(b,a){a=a||"_";return b.replace(Uc,function(b,d){return(d?a:"")+b.toLowerCase()})}function ub(b,a,c){if(!b)throw Oa("areq",a||"?",c||"required");return b}function Qa(b,a,c){c&&K(b)&&(b=b[b.length-1]);ub(L(b),a,"not a function, got "+(b&&"object"==typeof b?
|
||||
b.constructor.name||"Object":typeof b));return b}function xa(b,a){if("hasOwnProperty"===b)throw Oa("badname",a);}function vb(b,a,c){if(!a)return b;a=a.split(".");for(var d,e=b,g=a.length,f=0;f<g;f++)d=a[f],b&&(b=(e=b)[d]);return!c&&L(b)?cb(e,b):b}function wb(b){var a=b[0];b=b[b.length-1];if(a===b)return A(a);var c=[a];do{a=a.nextSibling;if(!a)break;c.push(a)}while(a!==b);return A(c)}function Vc(b){var a=F("$injector"),c=F("ng");b=b.angular||(b.angular={});b.$$minErr=b.$$minErr||F;return b.module||
|
||||
(b.module=function(){var b={};return function(e,g,f){if("hasOwnProperty"===e)throw c("badname","module");g&&b.hasOwnProperty(e)&&(b[e]=null);return b[e]||(b[e]=function(){function b(a,d,e){return function(){c[e||"push"]([a,d,arguments]);return n}}if(!g)throw a("nomod",e);var c=[],d=[],l=b("$injector","invoke"),n={_invokeQueue:c,_runBlocks:d,requires:g,name:e,provider:b("$provide","provider"),factory:b("$provide","factory"),service:b("$provide","service"),value:b("$provide","value"),constant:b("$provide",
|
||||
"constant","unshift"),animation:b("$animateProvider","register"),filter:b("$filterProvider","register"),controller:b("$controllerProvider","register"),directive:b("$compileProvider","directive"),config:l,run:function(a){d.push(a);return this}};f&&l(f);return n}())}}())}function Ra(b){return b.replace(Wc,function(a,b,d,e){return e?d.toUpperCase():d}).replace(Xc,"Moz$1")}function xb(b,a,c,d){function e(b){var e=c&&b?[this.filter(b)]:[this],m=a,k,l,n,p,s,C;if(!d||null!=b)for(;e.length;)for(k=e.shift(),
|
||||
l=0,n=k.length;l<n;l++)for(p=A(k[l]),m?p.triggerHandler("$destroy"):m=!m,s=0,p=(C=p.children()).length;s<p;s++)e.push(Da(C[s]));return g.apply(this,arguments)}var g=Da.fn[b],g=g.$original||g;e.$original=g;Da.fn[b]=e}function O(b){if(b instanceof O)return b;if(!(this instanceof O)){if(D(b)&&"<"!=b.charAt(0))throw yb("nosel");return new O(b)}if(D(b)){var a=Q.createElement("div");a.innerHTML="<div> </div>"+b;a.removeChild(a.firstChild);zb(this,a.childNodes);A(Q.createDocumentFragment()).append(this)}else zb(this,
|
||||
b)}function Ab(b){return b.cloneNode(!0)}function Ea(b){ac(b);var a=0;for(b=b.childNodes||[];a<b.length;a++)Ea(b[a])}function bc(b,a,c,d){if(B(d))throw yb("offargs");var e=la(b,"events");la(b,"handle")&&(z(a)?q(e,function(a,c){Bb(b,c,a);delete e[c]}):q(a.split(" "),function(a){z(c)?(Bb(b,a,e[a]),delete e[a]):Na(e[a]||[],c)}))}function ac(b,a){var c=b[eb],d=Sa[c];d&&(a?delete Sa[c].data[a]:(d.handle&&(d.events.$destroy&&d.handle({},"$destroy"),bc(b)),delete Sa[c],b[eb]=r))}function la(b,a,c){var d=
|
||||
b[eb],d=Sa[d||-1];if(B(c))d||(b[eb]=d=++Yc,d=Sa[d]={}),d[a]=c;else return d&&d[a]}function cc(b,a,c){var d=la(b,"data"),e=B(c),g=!e&&B(a),f=g&&!X(a);d||f||la(b,"data",d={});if(e)d[a]=c;else if(g){if(f)return d&&d[a];t(d,a)}else return d}function Cb(b,a){return b.getAttribute?-1<(" "+(b.getAttribute("class")||"")+" ").replace(/[\n\t]/g," ").indexOf(" "+a+" "):!1}function Db(b,a){a&&b.setAttribute&&q(a.split(" "),function(a){b.setAttribute("class",ba((" "+(b.getAttribute("class")||"")+" ").replace(/[\n\t]/g,
|
||||
" ").replace(" "+ba(a)+" "," ")))})}function Eb(b,a){if(a&&b.setAttribute){var c=(" "+(b.getAttribute("class")||"")+" ").replace(/[\n\t]/g," ");q(a.split(" "),function(a){a=ba(a);-1===c.indexOf(" "+a+" ")&&(c+=a+" ")});b.setAttribute("class",ba(c))}}function zb(b,a){if(a){a=a.nodeName||!B(a.length)||Aa(a)?[a]:a;for(var c=0;c<a.length;c++)b.push(a[c])}}function dc(b,a){return fb(b,"$"+(a||"ngController")+"Controller")}function fb(b,a,c){b=A(b);9==b[0].nodeType&&(b=b.find("html"));for(a=K(a)?a:[a];b.length;){for(var d=
|
||||
0,e=a.length;d<e;d++)if((c=b.data(a[d]))!==r)return c;b=b.parent()}}function ec(b){for(var a=0,c=b.childNodes;a<c.length;a++)Ea(c[a]);for(;b.firstChild;)b.removeChild(b.firstChild)}function fc(b,a){var c=gb[a.toLowerCase()];return c&&gc[b.nodeName]&&c}function Zc(b,a){var c=function(c,e){c.preventDefault||(c.preventDefault=function(){c.returnValue=!1});c.stopPropagation||(c.stopPropagation=function(){c.cancelBubble=!0});c.target||(c.target=c.srcElement||Q);if(z(c.defaultPrevented)){var g=c.preventDefault;
|
||||
c.preventDefault=function(){c.defaultPrevented=!0;g.call(c)};c.defaultPrevented=!1}c.isDefaultPrevented=function(){return c.defaultPrevented||!1===c.returnValue};var f=Tb(a[e||c.type]||[]);q(f,function(a){a.call(b,c)});8>=M?(c.preventDefault=null,c.stopPropagation=null,c.isDefaultPrevented=null):(delete c.preventDefault,delete c.stopPropagation,delete c.isDefaultPrevented)};c.elem=b;return c}function Fa(b){var a=typeof b,c;"object"==a&&null!==b?"function"==typeof(c=b.$$hashKey)?c=b.$$hashKey():c===
|
||||
r&&(c=b.$$hashKey=$a()):c=b;return a+":"+c}function Ta(b){q(b,this.put,this)}function hc(b){var a,c;"function"==typeof b?(a=b.$inject)||(a=[],b.length&&(c=b.toString().replace($c,""),c=c.match(ad),q(c[1].split(bd),function(b){b.replace(cd,function(b,c,d){a.push(d)})})),b.$inject=a):K(b)?(c=b.length-1,Qa(b[c],"fn"),a=b.slice(0,c)):Qa(b,"fn",!0);return a}function $b(b){function a(a){return function(b,c){if(X(b))q(b,Qb(a));else return a(b,c)}}function c(a,b){xa(a,"service");if(L(b)||K(b))b=n.instantiate(b);
|
||||
if(!b.$get)throw Ua("pget",a);return l[a+h]=b}function d(a,b){return c(a,{$get:b})}function e(a){var b=[],c,d,g,h;q(a,function(a){if(!k.get(a)){k.put(a,!0);try{if(D(a))for(c=Va(a),b=b.concat(e(c.requires)).concat(c._runBlocks),d=c._invokeQueue,g=0,h=d.length;g<h;g++){var f=d[g],m=n.get(f[0]);m[f[1]].apply(m,f[2])}else L(a)?b.push(n.invoke(a)):K(a)?b.push(n.invoke(a)):Qa(a,"module")}catch(s){throw K(a)&&(a=a[a.length-1]),s.message&&(s.stack&&-1==s.stack.indexOf(s.message))&&(s=s.message+"\n"+s.stack),
|
||||
Ua("modulerr",a,s.stack||s.message||s);}}});return b}function g(a,b){function c(d){if(a.hasOwnProperty(d)){if(a[d]===f)throw Ua("cdep",m.join(" <- "));return a[d]}try{return m.unshift(d),a[d]=f,a[d]=b(d)}catch(e){throw a[d]===f&&delete a[d],e;}finally{m.shift()}}function d(a,b,e){var g=[],h=hc(a),f,k,m;k=0;for(f=h.length;k<f;k++){m=h[k];if("string"!==typeof m)throw Ua("itkn",m);g.push(e&&e.hasOwnProperty(m)?e[m]:c(m))}a.$inject||(a=a[f]);return a.apply(b,g)}return{invoke:d,instantiate:function(a,
|
||||
b){var c=function(){},e;c.prototype=(K(a)?a[a.length-1]:a).prototype;c=new c;e=d(a,c,b);return X(e)||L(e)?e:c},get:c,annotate:hc,has:function(b){return l.hasOwnProperty(b+h)||a.hasOwnProperty(b)}}}var f={},h="Provider",m=[],k=new Ta,l={$provide:{provider:a(c),factory:a(d),service:a(function(a,b){return d(a,["$injector",function(a){return a.instantiate(b)}])}),value:a(function(a,b){return d(a,$(b))}),constant:a(function(a,b){xa(a,"constant");l[a]=b;p[a]=b}),decorator:function(a,b){var c=n.get(a+h),
|
||||
d=c.$get;c.$get=function(){var a=s.invoke(d,c);return s.invoke(b,null,{$delegate:a})}}}},n=l.$injector=g(l,function(){throw Ua("unpr",m.join(" <- "));}),p={},s=p.$injector=g(p,function(a){a=n.get(a+h);return s.invoke(a.$get,a)});q(e(b),function(a){s.invoke(a||w)});return s}function dd(){var b=!0;this.disableAutoScrolling=function(){b=!1};this.$get=["$window","$location","$rootScope",function(a,c,d){function e(a){var b=null;q(a,function(a){b||"a"!==x(a.nodeName)||(b=a)});return b}function g(){var b=
|
||||
c.hash(),d;b?(d=f.getElementById(b))?d.scrollIntoView():(d=e(f.getElementsByName(b)))?d.scrollIntoView():"top"===b&&a.scrollTo(0,0):a.scrollTo(0,0)}var f=a.document;b&&d.$watch(function(){return c.hash()},function(){d.$evalAsync(g)});return g}]}function ed(b,a,c,d){function e(a){try{a.apply(null,va.call(arguments,1))}finally{if(C--,0===C)for(;y.length;)try{y.pop()()}catch(b){c.error(b)}}}function g(a,b){(function T(){q(E,function(a){a()});u=b(T,a)})()}function f(){v=null;R!=h.url()&&(R=h.url(),q(ha,
|
||||
function(a){a(h.url())}))}var h=this,m=a[0],k=b.location,l=b.history,n=b.setTimeout,p=b.clearTimeout,s={};h.isMock=!1;var C=0,y=[];h.$$completeOutstandingRequest=e;h.$$incOutstandingRequestCount=function(){C++};h.notifyWhenNoOutstandingRequests=function(a){q(E,function(a){a()});0===C?a():y.push(a)};var E=[],u;h.addPollFn=function(a){z(u)&&g(100,n);E.push(a);return a};var R=k.href,H=a.find("base"),v=null;h.url=function(a,c){k!==b.location&&(k=b.location);l!==b.history&&(l=b.history);if(a){if(R!=a)return R=
|
||||
a,d.history?c?l.replaceState(null,"",a):(l.pushState(null,"",a),H.attr("href",H.attr("href"))):(v=a,c?k.replace(a):k.href=a),h}else return v||k.href.replace(/%27/g,"'")};var ha=[],N=!1;h.onUrlChange=function(a){if(!N){if(d.history)A(b).on("popstate",f);if(d.hashchange)A(b).on("hashchange",f);else h.addPollFn(f);N=!0}ha.push(a);return a};h.baseHref=function(){var a=H.attr("href");return a?a.replace(/^(https?\:)?\/\/[^\/]*/,""):""};var V={},J="",ca=h.baseHref();h.cookies=function(a,b){var d,e,g,h;if(a)b===
|
||||
r?m.cookie=escape(a)+"=;path="+ca+";expires=Thu, 01 Jan 1970 00:00:00 GMT":D(b)&&(d=(m.cookie=escape(a)+"="+escape(b)+";path="+ca).length+1,4096<d&&c.warn("Cookie '"+a+"' possibly not set or overflowed because it was too large ("+d+" > 4096 bytes)!"));else{if(m.cookie!==J)for(J=m.cookie,d=J.split("; "),V={},g=0;g<d.length;g++)e=d[g],h=e.indexOf("="),0<h&&(a=unescape(e.substring(0,h)),V[a]===r&&(V[a]=unescape(e.substring(h+1))));return V}};h.defer=function(a,b){var c;C++;c=n(function(){delete s[c];
|
||||
e(a)},b||0);s[c]=!0;return c};h.defer.cancel=function(a){return s[a]?(delete s[a],p(a),e(w),!0):!1}}function fd(){this.$get=["$window","$log","$sniffer","$document",function(b,a,c,d){return new ed(b,d,a,c)}]}function gd(){this.$get=function(){function b(b,d){function e(a){a!=n&&(p?p==a&&(p=a.n):p=a,g(a.n,a.p),g(a,n),n=a,n.n=null)}function g(a,b){a!=b&&(a&&(a.p=b),b&&(b.n=a))}if(b in a)throw F("$cacheFactory")("iid",b);var f=0,h=t({},d,{id:b}),m={},k=d&&d.capacity||Number.MAX_VALUE,l={},n=null,p=null;
|
||||
return a[b]={put:function(a,b){var c=l[a]||(l[a]={key:a});e(c);if(!z(b))return a in m||f++,m[a]=b,f>k&&this.remove(p.key),b},get:function(a){var b=l[a];if(b)return e(b),m[a]},remove:function(a){var b=l[a];b&&(b==n&&(n=b.p),b==p&&(p=b.n),g(b.n,b.p),delete l[a],delete m[a],f--)},removeAll:function(){m={};f=0;l={};n=p=null},destroy:function(){l=h=m=null;delete a[b]},info:function(){return t({},h,{size:f})}}}var a={};b.info=function(){var b={};q(a,function(a,e){b[e]=a.info()});return b};b.get=function(b){return a[b]};
|
||||
return b}}function hd(){this.$get=["$cacheFactory",function(b){return b("templates")}]}function jc(b,a){var c={},d="Directive",e=/^\s*directive\:\s*([\d\w\-_]+)\s+(.*)$/,g=/(([\d\w\-_]+)(?:\:([^;]+))?;?)/,f=/^(on[a-z]+|formaction)$/;this.directive=function m(a,e){xa(a,"directive");D(a)?(ub(e,"directiveFactory"),c.hasOwnProperty(a)||(c[a]=[],b.factory(a+d,["$injector","$exceptionHandler",function(b,d){var e=[];q(c[a],function(c,g){try{var f=b.invoke(c);L(f)?f={compile:$(f)}:!f.compile&&f.link&&(f.compile=
|
||||
$(f.link));f.priority=f.priority||0;f.index=g;f.name=f.name||a;f.require=f.require||f.controller&&f.name;f.restrict=f.restrict||"A";e.push(f)}catch(m){d(m)}});return e}])),c[a].push(e)):q(a,Qb(m));return this};this.aHrefSanitizationWhitelist=function(b){return B(b)?(a.aHrefSanitizationWhitelist(b),this):a.aHrefSanitizationWhitelist()};this.imgSrcSanitizationWhitelist=function(b){return B(b)?(a.imgSrcSanitizationWhitelist(b),this):a.imgSrcSanitizationWhitelist()};this.$get=["$injector","$interpolate",
|
||||
"$exceptionHandler","$http","$templateCache","$parse","$controller","$rootScope","$document","$sce","$animate","$$sanitizeUri",function(a,b,l,n,p,s,C,y,E,u,R,H){function v(a,b,c,d,e){a instanceof A||(a=A(a));q(a,function(b,c){3==b.nodeType&&b.nodeValue.match(/\S+/)&&(a[c]=A(b).wrap("<span></span>").parent()[0])});var g=N(a,b,a,c,d,e);ha(a,"ng-scope");return function(b,c,d){ub(b,"scope");var e=c?Ga.clone.call(a):a;q(d,function(a,b){e.data("$"+b+"Controller",a)});d=0;for(var f=e.length;d<f;d++){var m=
|
||||
e[d].nodeType;1!==m&&9!==m||e.eq(d).data("$scope",b)}c&&c(e,b);g&&g(b,e,e);return e}}function ha(a,b){try{a.addClass(b)}catch(c){}}function N(a,b,c,d,e,g){function f(a,c,d,e){var g,k,s,l,n,p,I;g=c.length;var C=Array(g);for(n=0;n<g;n++)C[n]=c[n];I=n=0;for(p=m.length;n<p;I++)k=C[I],c=m[n++],g=m[n++],s=A(k),c?(c.scope?(l=a.$new(),s.data("$scope",l)):l=a,(s=c.transclude)||!e&&b?c(g,l,k,d,V(a,s||b)):c(g,l,k,d,e)):g&&g(a,k.childNodes,r,e)}for(var m=[],k,s,l,n,p=0;p<a.length;p++)k=new Fb,s=J(a[p],[],k,0===
|
||||
p?d:r,e),(g=s.length?ia(s,a[p],k,b,c,null,[],[],g):null)&&g.scope&&ha(A(a[p]),"ng-scope"),k=g&&g.terminal||!(l=a[p].childNodes)||!l.length?null:N(l,g?g.transclude:b),m.push(g,k),n=n||g||k,g=null;return n?f:null}function V(a,b){return function(c,d,e){var g=!1;c||(c=a.$new(),g=c.$$transcluded=!0);d=b(c,d,e);if(g)d.on("$destroy",cb(c,c.$destroy));return d}}function J(a,b,c,d,f){var k=c.$attr,m;switch(a.nodeType){case 1:T(b,ma(Ha(a).toLowerCase()),"E",d,f);var s,l,n;m=a.attributes;for(var p=0,C=m&&m.length;p<
|
||||
C;p++){var y=!1,R=!1;s=m[p];if(!M||8<=M||s.specified){l=s.name;n=ma(l);W.test(n)&&(l=db(n.substr(6),"-"));var v=n.replace(/(Start|End)$/,"");n===v+"Start"&&(y=l,R=l.substr(0,l.length-5)+"end",l=l.substr(0,l.length-6));n=ma(l.toLowerCase());k[n]=l;c[n]=s=ba(s.value);fc(a,n)&&(c[n]=!0);S(a,b,s,n);T(b,n,"A",d,f,y,R)}}a=a.className;if(D(a)&&""!==a)for(;m=g.exec(a);)n=ma(m[2]),T(b,n,"C",d,f)&&(c[n]=ba(m[3])),a=a.substr(m.index+m[0].length);break;case 3:F(b,a.nodeValue);break;case 8:try{if(m=e.exec(a.nodeValue))n=
|
||||
ma(m[1]),T(b,n,"M",d,f)&&(c[n]=ba(m[2]))}catch(E){}}b.sort(z);return b}function ca(a,b,c){var d=[],e=0;if(b&&a.hasAttribute&&a.hasAttribute(b)){do{if(!a)throw ja("uterdir",b,c);1==a.nodeType&&(a.hasAttribute(b)&&e++,a.hasAttribute(c)&&e--);d.push(a);a=a.nextSibling}while(0<e)}else d.push(a);return A(d)}function P(a,b,c){return function(d,e,g,f,m){e=ca(e[0],b,c);return a(d,e,g,f,m)}}function ia(a,c,d,e,g,f,m,n,p){function y(a,b,c,d){if(a){c&&(a=P(a,c,d));a.require=G.require;if(H===G||G.$$isolateScope)a=
|
||||
kc(a,{isolateScope:!0});m.push(a)}if(b){c&&(b=P(b,c,d));b.require=G.require;if(H===G||G.$$isolateScope)b=kc(b,{isolateScope:!0});n.push(b)}}function R(a,b,c){var d,e="data",g=!1;if(D(a)){for(;"^"==(d=a.charAt(0))||"?"==d;)a=a.substr(1),"^"==d&&(e="inheritedData"),g=g||"?"==d;d=null;c&&"data"===e&&(d=c[a]);d=d||b[e]("$"+a+"Controller");if(!d&&!g)throw ja("ctreq",a,da);}else K(a)&&(d=[],q(a,function(a){d.push(R(a,b,c))}));return d}function E(a,e,g,f,p){function y(a,b){var c;2>arguments.length&&(b=a,
|
||||
a=r);z&&(c=ca);return p(a,b,c)}var I,v,N,u,P,J,ca={},hb;I=c===g?d:Tb(d,new Fb(A(g),d.$attr));v=I.$$element;if(H){var T=/^\s*([@=&])(\??)\s*(\w*)\s*$/;f=A(g);J=e.$new(!0);ia&&ia===H.$$originalDirective?f.data("$isolateScope",J):f.data("$isolateScopeNoTemplate",J);ha(f,"ng-isolate-scope");q(H.scope,function(a,c){var d=a.match(T)||[],g=d[3]||c,f="?"==d[2],d=d[1],m,l,n,p;J.$$isolateBindings[c]=d+g;switch(d){case "@":I.$observe(g,function(a){J[c]=a});I.$$observers[g].$$scope=e;I[g]&&(J[c]=b(I[g])(e));
|
||||
break;case "=":if(f&&!I[g])break;l=s(I[g]);p=l.literal?ua:function(a,b){return a===b};n=l.assign||function(){m=J[c]=l(e);throw ja("nonassign",I[g],H.name);};m=J[c]=l(e);J.$watch(function(){var a=l(e);p(a,J[c])||(p(a,m)?n(e,a=J[c]):J[c]=a);return m=a},null,l.literal);break;case "&":l=s(I[g]);J[c]=function(a){return l(e,a)};break;default:throw ja("iscp",H.name,c,a);}})}hb=p&&y;V&&q(V,function(a){var b={$scope:a===H||a.$$isolateScope?J:e,$element:v,$attrs:I,$transclude:hb},c;P=a.controller;"@"==P&&(P=
|
||||
I[a.name]);c=C(P,b);ca[a.name]=c;z||v.data("$"+a.name+"Controller",c);a.controllerAs&&(b.$scope[a.controllerAs]=c)});f=0;for(N=m.length;f<N;f++)try{u=m[f],u(u.isolateScope?J:e,v,I,u.require&&R(u.require,v,ca),hb)}catch(G){l(G,ga(v))}f=e;H&&(H.template||null===H.templateUrl)&&(f=J);a&&a(f,g.childNodes,r,p);for(f=n.length-1;0<=f;f--)try{u=n[f],u(u.isolateScope?J:e,v,I,u.require&&R(u.require,v,ca),hb)}catch(B){l(B,ga(v))}}p=p||{};var N=-Number.MAX_VALUE,u,V=p.controllerDirectives,H=p.newIsolateScopeDirective,
|
||||
ia=p.templateDirective;p=p.nonTlbTranscludeDirective;for(var T=!1,z=!1,t=d.$$element=A(c),G,da,U,F=e,O,M=0,na=a.length;M<na;M++){G=a[M];var Wa=G.$$start,S=G.$$end;Wa&&(t=ca(c,Wa,S));U=r;if(N>G.priority)break;if(U=G.scope)u=u||G,G.templateUrl||(x("new/isolated scope",H,G,t),X(U)&&(H=G));da=G.name;!G.templateUrl&&G.controller&&(U=G.controller,V=V||{},x("'"+da+"' controller",V[da],G,t),V[da]=G);if(U=G.transclude)T=!0,G.$$tlb||(x("transclusion",p,G,t),p=G),"element"==U?(z=!0,N=G.priority,U=ca(c,Wa,S),
|
||||
t=d.$$element=A(Q.createComment(" "+da+": "+d[da]+" ")),c=t[0],ib(g,A(va.call(U,0)),c),F=v(U,e,N,f&&f.name,{nonTlbTranscludeDirective:p})):(U=A(Ab(c)).contents(),t.empty(),F=v(U,e));if(G.template)if(x("template",ia,G,t),ia=G,U=L(G.template)?G.template(t,d):G.template,U=Y(U),G.replace){f=G;U=A("<div>"+ba(U)+"</div>").contents();c=U[0];if(1!=U.length||1!==c.nodeType)throw ja("tplrt",da,"");ib(g,t,c);na={$attr:{}};U=J(c,[],na);var W=a.splice(M+1,a.length-(M+1));H&&ic(U);a=a.concat(U).concat(W);B(d,na);
|
||||
na=a.length}else t.html(U);if(G.templateUrl)x("template",ia,G,t),ia=G,G.replace&&(f=G),E=w(a.splice(M,a.length-M),t,d,g,F,m,n,{controllerDirectives:V,newIsolateScopeDirective:H,templateDirective:ia,nonTlbTranscludeDirective:p}),na=a.length;else if(G.compile)try{O=G.compile(t,d,F),L(O)?y(null,O,Wa,S):O&&y(O.pre,O.post,Wa,S)}catch(Z){l(Z,ga(t))}G.terminal&&(E.terminal=!0,N=Math.max(N,G.priority))}E.scope=u&&!0===u.scope;E.transclude=T&&F;return E}function ic(a){for(var b=0,c=a.length;b<c;b++)a[b]=Sb(a[b],
|
||||
{$$isolateScope:!0})}function T(b,e,g,f,k,s,n){if(e===k)return null;k=null;if(c.hasOwnProperty(e)){var p;e=a.get(e+d);for(var C=0,y=e.length;C<y;C++)try{p=e[C],(f===r||f>p.priority)&&-1!=p.restrict.indexOf(g)&&(s&&(p=Sb(p,{$$start:s,$$end:n})),b.push(p),k=p)}catch(v){l(v)}}return k}function B(a,b){var c=b.$attr,d=a.$attr,e=a.$$element;q(a,function(d,e){"$"!=e.charAt(0)&&(b[e]&&(d+=("style"===e?";":" ")+b[e]),a.$set(e,d,!0,c[e]))});q(b,function(b,g){"class"==g?(ha(e,b),a["class"]=(a["class"]?a["class"]+
|
||||
" ":"")+b):"style"==g?(e.attr("style",e.attr("style")+";"+b),a.style=(a.style?a.style+";":"")+b):"$"==g.charAt(0)||a.hasOwnProperty(g)||(a[g]=b,d[g]=c[g])})}function w(a,b,c,d,e,g,f,m){var k=[],s,l,C=b[0],y=a.shift(),v=t({},y,{templateUrl:null,transclude:null,replace:null,$$originalDirective:y}),R=L(y.templateUrl)?y.templateUrl(b,c):y.templateUrl;b.empty();n.get(u.getTrustedResourceUrl(R),{cache:p}).success(function(n){var p,E;n=Y(n);if(y.replace){n=A("<div>"+ba(n)+"</div>").contents();p=n[0];if(1!=
|
||||
n.length||1!==p.nodeType)throw ja("tplrt",y.name,R);n={$attr:{}};ib(d,b,p);var u=J(p,[],n);X(y.scope)&&ic(u);a=u.concat(a);B(c,n)}else p=C,b.html(n);a.unshift(v);s=ia(a,p,c,e,b,y,g,f,m);q(d,function(a,c){a==p&&(d[c]=b[0])});for(l=N(b[0].childNodes,e);k.length;){n=k.shift();E=k.shift();var H=k.shift(),ha=k.shift(),u=b[0];E!==C&&(u=Ab(p),ib(H,A(E),u));E=s.transclude?V(n,s.transclude):ha;s(l,n,u,d,E)}k=null}).error(function(a,b,c,d){throw ja("tpload",d.url);});return function(a,b,c,d,e){k?(k.push(b),
|
||||
k.push(c),k.push(d),k.push(e)):s(l,b,c,d,e)}}function z(a,b){var c=b.priority-a.priority;return 0!==c?c:a.name!==b.name?a.name<b.name?-1:1:a.index-b.index}function x(a,b,c,d){if(b)throw ja("multidir",b.name,c.name,a,ga(d));}function F(a,c){var d=b(c,!0);d&&a.push({priority:0,compile:$(function(a,b){var c=b.parent(),e=c.data("$binding")||[];e.push(d);ha(c.data("$binding",e),"ng-binding");a.$watch(d,function(a){b[0].nodeValue=a})})})}function O(a,b){if("srcdoc"==b)return u.HTML;var c=Ha(a);if("xlinkHref"==
|
||||
b||"FORM"==c&&"action"==b||"IMG"!=c&&("src"==b||"ngSrc"==b))return u.RESOURCE_URL}function S(a,c,d,e){var g=b(d,!0);if(g){if("multiple"===e&&"SELECT"===Ha(a))throw ja("selmulti",ga(a));c.push({priority:100,compile:function(){return{pre:function(c,d,m){d=m.$$observers||(m.$$observers={});if(f.test(e))throw ja("nodomevents");if(g=b(m[e],!0,O(a,e)))m[e]=g(c),(d[e]||(d[e]=[])).$$inter=!0,(m.$$observers&&m.$$observers[e].$$scope||c).$watch(g,function(a,b){"class"===e&&a!=b?m.$updateClass(a,b):m.$set(e,
|
||||
a)})}}}})}}function ib(a,b,c){var d=b[0],e=b.length,g=d.parentNode,f,m;if(a)for(f=0,m=a.length;f<m;f++)if(a[f]==d){a[f++]=c;m=f+e-1;for(var k=a.length;f<k;f++,m++)m<k?a[f]=a[m]:delete a[f];a.length-=e-1;break}g&&g.replaceChild(c,d);a=Q.createDocumentFragment();a.appendChild(d);c[A.expando]=d[A.expando];d=1;for(e=b.length;d<e;d++)g=b[d],A(g).remove(),a.appendChild(g),delete b[d];b[0]=c;b.length=1}function kc(a,b){return t(function(){return a.apply(null,arguments)},a,b)}var Fb=function(a,b){this.$$element=
|
||||
a;this.$attr=b||{}};Fb.prototype={$normalize:ma,$addClass:function(a){a&&0<a.length&&R.addClass(this.$$element,a)},$removeClass:function(a){a&&0<a.length&&R.removeClass(this.$$element,a)},$updateClass:function(a,b){this.$removeClass(lc(b,a));this.$addClass(lc(a,b))},$set:function(a,b,c,d){var e=fc(this.$$element[0],a);e&&(this.$$element.prop(a,b),d=e);this[a]=b;d?this.$attr[a]=d:(d=this.$attr[a])||(this.$attr[a]=d=db(a,"-"));e=Ha(this.$$element);if("A"===e&&"href"===a||"IMG"===e&&"src"===a)this[a]=
|
||||
b=H(b,"src"===a);!1!==c&&(null===b||b===r?this.$$element.removeAttr(d):this.$$element.attr(d,b));(c=this.$$observers)&&q(c[a],function(a){try{a(b)}catch(c){l(c)}})},$observe:function(a,b){var c=this,d=c.$$observers||(c.$$observers={}),e=d[a]||(d[a]=[]);e.push(b);y.$evalAsync(function(){e.$$inter||b(c[a])});return b}};var da=b.startSymbol(),na=b.endSymbol(),Y="{{"==da||"}}"==na?Ba:function(a){return a.replace(/\{\{/g,da).replace(/}}/g,na)},W=/^ngAttr[A-Z]/;return v}]}function ma(b){return Ra(b.replace(id,
|
||||
""))}function lc(b,a){var c="",d=b.split(/\s+/),e=a.split(/\s+/),g=0;a:for(;g<d.length;g++){for(var f=d[g],h=0;h<e.length;h++)if(f==e[h])continue a;c+=(0<c.length?" ":"")+f}return c}function jd(){var b={},a=/^(\S+)(\s+as\s+(\w+))?$/;this.register=function(a,d){xa(a,"controller");X(a)?t(b,a):b[a]=d};this.$get=["$injector","$window",function(c,d){return function(e,g){var f,h,m;D(e)&&(f=e.match(a),h=f[1],m=f[3],e=b.hasOwnProperty(h)?b[h]:vb(g.$scope,h,!0)||vb(d,h,!0),Qa(e,h,!0));f=c.instantiate(e,g);
|
||||
if(m){if(!g||"object"!=typeof g.$scope)throw F("$controller")("noscp",h||e.name,m);g.$scope[m]=f}return f}}]}function kd(){this.$get=["$window",function(b){return A(b.document)}]}function ld(){this.$get=["$log",function(b){return function(a,c){b.error.apply(b,arguments)}}]}function mc(b){var a={},c,d,e;if(!b)return a;q(b.split("\n"),function(b){e=b.indexOf(":");c=x(ba(b.substr(0,e)));d=ba(b.substr(e+1));c&&(a[c]=a[c]?a[c]+(", "+d):d)});return a}function nc(b){var a=X(b)?b:r;return function(c){a||
|
||||
(a=mc(b));return c?a[x(c)]||null:a}}function oc(b,a,c){if(L(c))return c(b,a);q(c,function(c){b=c(b,a)});return b}function md(){var b=/^\s*(\[|\{[^\{])/,a=/[\}\]]\s*$/,c=/^\)\]\}',?\n/,d={"Content-Type":"application/json;charset=utf-8"},e=this.defaults={transformResponse:[function(d){D(d)&&(d=d.replace(c,""),b.test(d)&&a.test(d)&&(d=Vb(d)));return d}],transformRequest:[function(a){return X(a)&&"[object File]"!==Ma.call(a)?qa(a):a}],headers:{common:{Accept:"application/json, text/plain, */*"},post:aa(d),
|
||||
put:aa(d),patch:aa(d)},xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN"},g=this.interceptors=[],f=this.responseInterceptors=[];this.$get=["$httpBackend","$browser","$cacheFactory","$rootScope","$q","$injector",function(a,b,c,d,n,p){function s(a){function c(a){var b=t({},a,{data:oc(a.data,a.headers,d.transformResponse)});return 200<=a.status&&300>a.status?b:n.reject(b)}var d={transformRequest:e.transformRequest,transformResponse:e.transformResponse},g=function(a){function b(a){var c;q(a,function(b,
|
||||
d){L(b)&&(c=b(),null!=c?a[d]=c:delete a[d])})}var c=e.headers,d=t({},a.headers),g,f,c=t({},c.common,c[x(a.method)]);b(c);b(d);a:for(g in c){a=x(g);for(f in d)if(x(f)===a)continue a;d[g]=c[g]}return d}(a);t(d,a);d.headers=g;d.method=Ia(d.method);(a=Gb(d.url)?b.cookies()[d.xsrfCookieName||e.xsrfCookieName]:r)&&(g[d.xsrfHeaderName||e.xsrfHeaderName]=a);var f=[function(a){g=a.headers;var b=oc(a.data,nc(g),a.transformRequest);z(a.data)&&q(g,function(a,b){"content-type"===x(b)&&delete g[b]});z(a.withCredentials)&&
|
||||
!z(e.withCredentials)&&(a.withCredentials=e.withCredentials);return C(a,b,g).then(c,c)},r],h=n.when(d);for(q(u,function(a){(a.request||a.requestError)&&f.unshift(a.request,a.requestError);(a.response||a.responseError)&&f.push(a.response,a.responseError)});f.length;){a=f.shift();var k=f.shift(),h=h.then(a,k)}h.success=function(a){h.then(function(b){a(b.data,b.status,b.headers,d)});return h};h.error=function(a){h.then(null,function(b){a(b.data,b.status,b.headers,d)});return h};return h}function C(b,
|
||||
c,g){function f(a,b,c){u&&(200<=a&&300>a?u.put(r,[a,b,mc(c)]):u.remove(r));m(b,a,c);d.$$phase||d.$apply()}function m(a,c,d){c=Math.max(c,0);(200<=c&&300>c?p.resolve:p.reject)({data:a,status:c,headers:nc(d),config:b})}function k(){var a=bb(s.pendingRequests,b);-1!==a&&s.pendingRequests.splice(a,1)}var p=n.defer(),C=p.promise,u,q,r=y(b.url,b.params);s.pendingRequests.push(b);C.then(k,k);(b.cache||e.cache)&&(!1!==b.cache&&"GET"==b.method)&&(u=X(b.cache)?b.cache:X(e.cache)?e.cache:E);if(u)if(q=u.get(r),
|
||||
B(q)){if(q.then)return q.then(k,k),q;K(q)?m(q[1],q[0],aa(q[2])):m(q,200,{})}else u.put(r,C);z(q)&&a(b.method,r,c,f,g,b.timeout,b.withCredentials,b.responseType);return C}function y(a,b){if(!b)return a;var c=[];Pc(b,function(a,b){null===a||z(a)||(K(a)||(a=[a]),q(a,function(a){X(a)&&(a=qa(a));c.push(wa(b)+"="+wa(a))}))});return a+(-1==a.indexOf("?")?"?":"&")+c.join("&")}var E=c("$http"),u=[];q(g,function(a){u.unshift(D(a)?p.get(a):p.invoke(a))});q(f,function(a,b){var c=D(a)?p.get(a):p.invoke(a);u.splice(b,
|
||||
0,{response:function(a){return c(n.when(a))},responseError:function(a){return c(n.reject(a))}})});s.pendingRequests=[];(function(a){q(arguments,function(a){s[a]=function(b,c){return s(t(c||{},{method:a,url:b}))}})})("get","delete","head","jsonp");(function(a){q(arguments,function(a){s[a]=function(b,c,d){return s(t(d||{},{method:a,url:b,data:c}))}})})("post","put");s.defaults=e;return s}]}function nd(b){return 8>=M&&"patch"===x(b)?new ActiveXObject("Microsoft.XMLHTTP"):new Z.XMLHttpRequest}function od(){this.$get=
|
||||
["$browser","$window","$document",function(b,a,c){return pd(b,nd,b.defer,a.angular.callbacks,c[0])}]}function pd(b,a,c,d,e){function g(a,b){var c=e.createElement("script"),d=function(){c.onreadystatechange=c.onload=c.onerror=null;e.body.removeChild(c);b&&b()};c.type="text/javascript";c.src=a;M&&8>=M?c.onreadystatechange=function(){/loaded|complete/.test(c.readyState)&&d()}:c.onload=c.onerror=function(){d()};e.body.appendChild(c);return d}var f=-1;return function(e,m,k,l,n,p,s,C){function y(){u=f;
|
||||
H&&H();v&&v.abort()}function E(a,d,e,g){r&&c.cancel(r);H=v=null;d=0===d?e?200:404:d;a(1223==d?204:d,e,g);b.$$completeOutstandingRequest(w)}var u;b.$$incOutstandingRequestCount();m=m||b.url();if("jsonp"==x(e)){var R="_"+(d.counter++).toString(36);d[R]=function(a){d[R].data=a};var H=g(m.replace("JSON_CALLBACK","angular.callbacks."+R),function(){d[R].data?E(l,200,d[R].data):E(l,u||-2);d[R]=Ca.noop})}else{var v=a(e);v.open(e,m,!0);q(n,function(a,b){B(a)&&v.setRequestHeader(b,a)});v.onreadystatechange=
|
||||
function(){if(v&&4==v.readyState){var a=null,b=null;u!==f&&(a=v.getAllResponseHeaders(),b="response"in v?v.response:v.responseText);E(l,u||v.status,b,a)}};s&&(v.withCredentials=!0);C&&(v.responseType=C);v.send(k||null)}if(0<p)var r=c(y,p);else p&&p.then&&p.then(y)}}function qd(){var b="{{",a="}}";this.startSymbol=function(a){return a?(b=a,this):b};this.endSymbol=function(b){return b?(a=b,this):a};this.$get=["$parse","$exceptionHandler","$sce",function(c,d,e){function g(g,k,l){for(var n,p,s=0,C=[],
|
||||
y=g.length,E=!1,u=[];s<y;)-1!=(n=g.indexOf(b,s))&&-1!=(p=g.indexOf(a,n+f))?(s!=n&&C.push(g.substring(s,n)),C.push(s=c(E=g.substring(n+f,p))),s.exp=E,s=p+h,E=!0):(s!=y&&C.push(g.substring(s)),s=y);(y=C.length)||(C.push(""),y=1);if(l&&1<C.length)throw pc("noconcat",g);if(!k||E)return u.length=y,s=function(a){try{for(var b=0,c=y,f;b<c;b++)"function"==typeof(f=C[b])&&(f=f(a),f=l?e.getTrusted(l,f):e.valueOf(f),null===f||z(f)?f="":"string"!=typeof f&&(f=qa(f))),u[b]=f;return u.join("")}catch(h){a=pc("interr",
|
||||
g,h.toString()),d(a)}},s.exp=g,s.parts=C,s}var f=b.length,h=a.length;g.startSymbol=function(){return b};g.endSymbol=function(){return a};return g}]}function rd(){this.$get=["$rootScope","$window","$q",function(b,a,c){function d(d,f,h,m){var k=a.setInterval,l=a.clearInterval,n=c.defer(),p=n.promise,s=0,C=B(m)&&!m;h=B(h)?h:0;p.then(null,null,d);p.$$intervalId=k(function(){n.notify(s++);0<h&&s>=h&&(n.resolve(s),l(p.$$intervalId),delete e[p.$$intervalId]);C||b.$apply()},f);e[p.$$intervalId]=n;return p}
|
||||
var e={};d.cancel=function(a){return a&&a.$$intervalId in e?(e[a.$$intervalId].reject("canceled"),clearInterval(a.$$intervalId),delete e[a.$$intervalId],!0):!1};return d}]}function sd(){this.$get=function(){return{id:"en-us",NUMBER_FORMATS:{DECIMAL_SEP:".",GROUP_SEP:",",PATTERNS:[{minInt:1,minFrac:0,maxFrac:3,posPre:"",posSuf:"",negPre:"-",negSuf:"",gSize:3,lgSize:3},{minInt:1,minFrac:2,maxFrac:2,posPre:"\u00a4",posSuf:"",negPre:"(\u00a4",negSuf:")",gSize:3,lgSize:3}],CURRENCY_SYM:"$"},DATETIME_FORMATS:{MONTH:"January February March April May June July August September October November December".split(" "),
|
||||
SHORTMONTH:"Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec".split(" "),DAY:"Sunday Monday Tuesday Wednesday Thursday Friday Saturday".split(" "),SHORTDAY:"Sun Mon Tue Wed Thu Fri Sat".split(" "),AMPMS:["AM","PM"],medium:"MMM d, y h:mm:ss a","short":"M/d/yy h:mm a",fullDate:"EEEE, MMMM d, y",longDate:"MMMM d, y",mediumDate:"MMM d, y",shortDate:"M/d/yy",mediumTime:"h:mm:ss a",shortTime:"h:mm a"},pluralCat:function(b){return 1===b?"one":"other"}}}}function qc(b){b=b.split("/");for(var a=b.length;a--;)b[a]=
|
||||
tb(b[a]);return b.join("/")}function rc(b,a,c){b=ya(b,c);a.$$protocol=b.protocol;a.$$host=b.hostname;a.$$port=S(b.port)||td[b.protocol]||null}function sc(b,a,c){var d="/"!==b.charAt(0);d&&(b="/"+b);b=ya(b,c);a.$$path=decodeURIComponent(d&&"/"===b.pathname.charAt(0)?b.pathname.substring(1):b.pathname);a.$$search=Xb(b.search);a.$$hash=decodeURIComponent(b.hash);a.$$path&&"/"!=a.$$path.charAt(0)&&(a.$$path="/"+a.$$path)}function oa(b,a){if(0===a.indexOf(b))return a.substr(b.length)}function Xa(b){var a=
|
||||
b.indexOf("#");return-1==a?b:b.substr(0,a)}function Hb(b){return b.substr(0,Xa(b).lastIndexOf("/")+1)}function tc(b,a){this.$$html5=!0;a=a||"";var c=Hb(b);rc(b,this,b);this.$$parse=function(a){var e=oa(c,a);if(!D(e))throw Ib("ipthprfx",a,c);sc(e,this,b);this.$$path||(this.$$path="/");this.$$compose()};this.$$compose=function(){var a=Yb(this.$$search),b=this.$$hash?"#"+tb(this.$$hash):"";this.$$url=qc(this.$$path)+(a?"?"+a:"")+b;this.$$absUrl=c+this.$$url.substr(1)};this.$$rewrite=function(d){var e;
|
||||
if((e=oa(b,d))!==r)return d=e,(e=oa(a,e))!==r?c+(oa("/",e)||e):b+d;if((e=oa(c,d))!==r)return c+e;if(c==d+"/")return c}}function Jb(b,a){var c=Hb(b);rc(b,this,b);this.$$parse=function(d){var e=oa(b,d)||oa(c,d),e="#"==e.charAt(0)?oa(a,e):this.$$html5?e:"";if(!D(e))throw Ib("ihshprfx",d,a);sc(e,this,b);d=this.$$path;var g=/^\/?.*?:(\/.*)/;0===e.indexOf(b)&&(e=e.replace(b,""));g.exec(e)||(d=(e=g.exec(d))?e[1]:d);this.$$path=d;this.$$compose()};this.$$compose=function(){var c=Yb(this.$$search),e=this.$$hash?
|
||||
"#"+tb(this.$$hash):"";this.$$url=qc(this.$$path)+(c?"?"+c:"")+e;this.$$absUrl=b+(this.$$url?a+this.$$url:"")};this.$$rewrite=function(a){if(Xa(b)==Xa(a))return a}}function uc(b,a){this.$$html5=!0;Jb.apply(this,arguments);var c=Hb(b);this.$$rewrite=function(d){var e;if(b==Xa(d))return d;if(e=oa(c,d))return b+a+e;if(c===d+"/")return c}}function jb(b){return function(){return this[b]}}function vc(b,a){return function(c){if(z(c))return this[b];this[b]=a(c);this.$$compose();return this}}function ud(){var b=
|
||||
"",a=!1;this.hashPrefix=function(a){return B(a)?(b=a,this):b};this.html5Mode=function(b){return B(b)?(a=b,this):a};this.$get=["$rootScope","$browser","$sniffer","$rootElement",function(c,d,e,g){function f(a){c.$broadcast("$locationChangeSuccess",h.absUrl(),a)}var h,m=d.baseHref(),k=d.url();a?(m=k.substring(0,k.indexOf("/",k.indexOf("//")+2))+(m||"/"),e=e.history?tc:uc):(m=Xa(k),e=Jb);h=new e(m,"#"+b);h.$$parse(h.$$rewrite(k));g.on("click",function(a){if(!a.ctrlKey&&!a.metaKey&&2!=a.which){for(var b=
|
||||
A(a.target);"a"!==x(b[0].nodeName);)if(b[0]===g[0]||!(b=b.parent())[0])return;var e=b.prop("href");X(e)&&"[object SVGAnimatedString]"===e.toString()&&(e=ya(e.animVal).href);var f=h.$$rewrite(e);e&&(!b.attr("target")&&f&&!a.isDefaultPrevented())&&(a.preventDefault(),f!=d.url()&&(h.$$parse(f),c.$apply(),Z.angular["ff-684208-preventDefault"]=!0))}});h.absUrl()!=k&&d.url(h.absUrl(),!0);d.onUrlChange(function(a){h.absUrl()!=a&&(c.$evalAsync(function(){var b=h.absUrl();h.$$parse(a);c.$broadcast("$locationChangeStart",
|
||||
a,b).defaultPrevented?(h.$$parse(b),d.url(b)):f(b)}),c.$$phase||c.$digest())});var l=0;c.$watch(function(){var a=d.url(),b=h.$$replace;l&&a==h.absUrl()||(l++,c.$evalAsync(function(){c.$broadcast("$locationChangeStart",h.absUrl(),a).defaultPrevented?h.$$parse(a):(d.url(h.absUrl(),b),f(a))}));h.$$replace=!1;return l});return h}]}function vd(){var b=!0,a=this;this.debugEnabled=function(a){return B(a)?(b=a,this):b};this.$get=["$window",function(c){function d(a){a instanceof Error&&(a.stack?a=a.message&&
|
||||
-1===a.stack.indexOf(a.message)?"Error: "+a.message+"\n"+a.stack:a.stack:a.sourceURL&&(a=a.message+"\n"+a.sourceURL+":"+a.line));return a}function e(a){var b=c.console||{},e=b[a]||b.log||w;a=!1;try{a=!!e.apply}catch(m){}return a?function(){var a=[];q(arguments,function(b){a.push(d(b))});return e.apply(b,a)}:function(a,b){e(a,null==b?"":b)}}return{log:e("log"),info:e("info"),warn:e("warn"),error:e("error"),debug:function(){var c=e("debug");return function(){b&&c.apply(a,arguments)}}()}}]}function ea(b,
|
||||
a){if("constructor"===b)throw za("isecfld",a);return b}function Ya(b,a){if(b){if(b.constructor===b)throw za("isecfn",a);if(b.document&&b.location&&b.alert&&b.setInterval)throw za("isecwindow",a);if(b.children&&(b.nodeName||b.on&&b.find))throw za("isecdom",a);}return b}function kb(b,a,c,d,e){e=e||{};a=a.split(".");for(var g,f=0;1<a.length;f++){g=ea(a.shift(),d);var h=b[g];h||(h={},b[g]=h);b=h;b.then&&e.unwrapPromises&&(ra(d),"$$v"in b||function(a){a.then(function(b){a.$$v=b})}(b),b.$$v===r&&(b.$$v=
|
||||
{}),b=b.$$v)}g=ea(a.shift(),d);return b[g]=c}function wc(b,a,c,d,e,g,f){ea(b,g);ea(a,g);ea(c,g);ea(d,g);ea(e,g);return f.unwrapPromises?function(f,m){var k=m&&m.hasOwnProperty(b)?m:f,l;if(null==k)return k;(k=k[b])&&k.then&&(ra(g),"$$v"in k||(l=k,l.$$v=r,l.then(function(a){l.$$v=a})),k=k.$$v);if(!a)return k;if(null==k)return r;(k=k[a])&&k.then&&(ra(g),"$$v"in k||(l=k,l.$$v=r,l.then(function(a){l.$$v=a})),k=k.$$v);if(!c)return k;if(null==k)return r;(k=k[c])&&k.then&&(ra(g),"$$v"in k||(l=k,l.$$v=r,l.then(function(a){l.$$v=
|
||||
a})),k=k.$$v);if(!d)return k;if(null==k)return r;(k=k[d])&&k.then&&(ra(g),"$$v"in k||(l=k,l.$$v=r,l.then(function(a){l.$$v=a})),k=k.$$v);if(!e)return k;if(null==k)return r;(k=k[e])&&k.then&&(ra(g),"$$v"in k||(l=k,l.$$v=r,l.then(function(a){l.$$v=a})),k=k.$$v);return k}:function(g,f){var k=f&&f.hasOwnProperty(b)?f:g;if(null==k)return k;k=k[b];if(!a)return k;if(null==k)return r;k=k[a];if(!c)return k;if(null==k)return r;k=k[c];if(!d)return k;if(null==k)return r;k=k[d];return e?null==k?r:k=k[e]:k}}function wd(b,
|
||||
a){ea(b,a);return function(a,d){return null==a?r:(d&&d.hasOwnProperty(b)?d:a)[b]}}function xd(b,a,c){ea(b,c);ea(a,c);return function(c,e){if(null==c)return r;c=(e&&e.hasOwnProperty(b)?e:c)[b];return null==c?r:c[a]}}function xc(b,a,c){if(Kb.hasOwnProperty(b))return Kb[b];var d=b.split("."),e=d.length,g;if(a.unwrapPromises||1!==e)if(a.unwrapPromises||2!==e)if(a.csp)g=6>e?wc(d[0],d[1],d[2],d[3],d[4],c,a):function(b,g){var f=0,h;do h=wc(d[f++],d[f++],d[f++],d[f++],d[f++],c,a)(b,g),g=r,b=h;while(f<e);
|
||||
return h};else{var f="var p;\n";q(d,function(b,d){ea(b,c);f+="if(s == null) return undefined;\ns="+(d?"s":'((k&&k.hasOwnProperty("'+b+'"))?k:s)')+'["'+b+'"];\n'+(a.unwrapPromises?'if (s && s.then) {\n pw("'+c.replace(/(["\r\n])/g,"\\$1")+'");\n if (!("$$v" in s)) {\n p=s;\n p.$$v = undefined;\n p.then(function(v) {p.$$v=v;});\n}\n s=s.$$v\n}\n':"")});var f=f+"return s;",h=new Function("s","k","pw",f);h.toString=$(f);g=a.unwrapPromises?function(a,b){return h(a,b,ra)}:h}else g=xd(d[0],d[1],c);else g=
|
||||
wd(d[0],c);"hasOwnProperty"!==b&&(Kb[b]=g);return g}function yd(){var b={},a={csp:!1,unwrapPromises:!1,logPromiseWarnings:!0};this.unwrapPromises=function(b){return B(b)?(a.unwrapPromises=!!b,this):a.unwrapPromises};this.logPromiseWarnings=function(b){return B(b)?(a.logPromiseWarnings=b,this):a.logPromiseWarnings};this.$get=["$filter","$sniffer","$log",function(c,d,e){a.csp=d.csp;ra=function(b){a.logPromiseWarnings&&!yc.hasOwnProperty(b)&&(yc[b]=!0,e.warn("[$parse] Promise found in the expression `"+
|
||||
b+"`. Automatic unwrapping of promises in Angular expressions is deprecated."))};return function(d){var e;switch(typeof d){case "string":if(b.hasOwnProperty(d))return b[d];e=new Lb(a);e=(new Za(e,c,a)).parse(d,!1);"hasOwnProperty"!==d&&(b[d]=e);return e;case "function":return d;default:return w}}}]}function zd(){this.$get=["$rootScope","$exceptionHandler",function(b,a){return Ad(function(a){b.$evalAsync(a)},a)}]}function Ad(b,a){function c(a){return a}function d(a){return f(a)}var e=function(){var h=
|
||||
[],m,k;return k={resolve:function(a){if(h){var c=h;h=r;m=g(a);c.length&&b(function(){for(var a,b=0,d=c.length;b<d;b++)a=c[b],m.then(a[0],a[1],a[2])})}},reject:function(a){k.resolve(f(a))},notify:function(a){if(h){var c=h;h.length&&b(function(){for(var b,d=0,e=c.length;d<e;d++)b=c[d],b[2](a)})}},promise:{then:function(b,g,f){var k=e(),C=function(d){try{k.resolve((L(b)?b:c)(d))}catch(e){k.reject(e),a(e)}},y=function(b){try{k.resolve((L(g)?g:d)(b))}catch(c){k.reject(c),a(c)}},E=function(b){try{k.notify((L(f)?
|
||||
f:c)(b))}catch(d){a(d)}};h?h.push([C,y,E]):m.then(C,y,E);return k.promise},"catch":function(a){return this.then(null,a)},"finally":function(a){function b(a,c){var d=e();c?d.resolve(a):d.reject(a);return d.promise}function d(e,g){var f=null;try{f=(a||c)()}catch(h){return b(h,!1)}return f&&L(f.then)?f.then(function(){return b(e,g)},function(a){return b(a,!1)}):b(e,g)}return this.then(function(a){return d(a,!0)},function(a){return d(a,!1)})}}}},g=function(a){return a&&L(a.then)?a:{then:function(c){var d=
|
||||
e();b(function(){d.resolve(c(a))});return d.promise}}},f=function(c){return{then:function(g,f){var l=e();b(function(){try{l.resolve((L(f)?f:d)(c))}catch(b){l.reject(b),a(b)}});return l.promise}}};return{defer:e,reject:f,when:function(h,m,k,l){var n=e(),p,s=function(b){try{return(L(m)?m:c)(b)}catch(d){return a(d),f(d)}},C=function(b){try{return(L(k)?k:d)(b)}catch(c){return a(c),f(c)}},y=function(b){try{return(L(l)?l:c)(b)}catch(d){a(d)}};b(function(){g(h).then(function(a){p||(p=!0,n.resolve(g(a).then(s,
|
||||
C,y)))},function(a){p||(p=!0,n.resolve(C(a)))},function(a){p||n.notify(y(a))})});return n.promise},all:function(a){var b=e(),c=0,d=K(a)?[]:{};q(a,function(a,e){c++;g(a).then(function(a){d.hasOwnProperty(e)||(d[e]=a,--c||b.resolve(d))},function(a){d.hasOwnProperty(e)||b.reject(a)})});0===c&&b.resolve(d);return b.promise}}}function Bd(){var b=10,a=F("$rootScope"),c=null;this.digestTtl=function(a){arguments.length&&(b=a);return b};this.$get=["$injector","$exceptionHandler","$parse","$browser",function(d,
|
||||
e,g,f){function h(){this.$id=$a();this.$$phase=this.$parent=this.$$watchers=this.$$nextSibling=this.$$prevSibling=this.$$childHead=this.$$childTail=null;this["this"]=this.$root=this;this.$$destroyed=!1;this.$$asyncQueue=[];this.$$postDigestQueue=[];this.$$listeners={};this.$$listenerCount={};this.$$isolateBindings={}}function m(b){if(p.$$phase)throw a("inprog",p.$$phase);p.$$phase=b}function k(a,b){var c=g(a);Qa(c,b);return c}function l(a,b,c){do a.$$listenerCount[c]-=b,0===a.$$listenerCount[c]&&
|
||||
delete a.$$listenerCount[c];while(a=a.$parent)}function n(){}h.prototype={constructor:h,$new:function(a){a?(a=new h,a.$root=this.$root,a.$$asyncQueue=this.$$asyncQueue,a.$$postDigestQueue=this.$$postDigestQueue):(a=function(){},a.prototype=this,a=new a,a.$id=$a());a["this"]=a;a.$$listeners={};a.$$listenerCount={};a.$parent=this;a.$$watchers=a.$$nextSibling=a.$$childHead=a.$$childTail=null;a.$$prevSibling=this.$$childTail;this.$$childHead?this.$$childTail=this.$$childTail.$$nextSibling=a:this.$$childHead=
|
||||
this.$$childTail=a;return a},$watch:function(a,b,d){var e=k(a,"watch"),g=this.$$watchers,f={fn:b,last:n,get:e,exp:a,eq:!!d};c=null;if(!L(b)){var h=k(b||w,"listener");f.fn=function(a,b,c){h(c)}}if("string"==typeof a&&e.constant){var m=f.fn;f.fn=function(a,b,c){m.call(this,a,b,c);Na(g,f)}}g||(g=this.$$watchers=[]);g.unshift(f);return function(){Na(g,f);c=null}},$watchCollection:function(a,b){var c=this,d,e,f=0,h=g(a),m=[],k={},l=0;return this.$watch(function(){e=h(c);var a,b;if(X(e))if(rb(e))for(d!==
|
||||
m&&(d=m,l=d.length=0,f++),a=e.length,l!==a&&(f++,d.length=l=a),b=0;b<a;b++)d[b]!==e[b]&&(f++,d[b]=e[b]);else{d!==k&&(d=k={},l=0,f++);a=0;for(b in e)e.hasOwnProperty(b)&&(a++,d.hasOwnProperty(b)?d[b]!==e[b]&&(f++,d[b]=e[b]):(l++,d[b]=e[b],f++));if(l>a)for(b in f++,d)d.hasOwnProperty(b)&&!e.hasOwnProperty(b)&&(l--,delete d[b])}else d!==e&&(d=e,f++);return f},function(){b(e,d,c)})},$digest:function(){var d,f,g,h,k=this.$$asyncQueue,l=this.$$postDigestQueue,q,v,r=b,N,V=[],J,A,P;m("$digest");c=null;do{v=
|
||||
!1;for(N=this;k.length;){try{P=k.shift(),P.scope.$eval(P.expression)}catch(B){p.$$phase=null,e(B)}c=null}a:do{if(h=N.$$watchers)for(q=h.length;q--;)try{if(d=h[q])if((f=d.get(N))!==(g=d.last)&&!(d.eq?ua(f,g):"number"==typeof f&&"number"==typeof g&&isNaN(f)&&isNaN(g)))v=!0,c=d,d.last=d.eq?aa(f):f,d.fn(f,g===n?f:g,N),5>r&&(J=4-r,V[J]||(V[J]=[]),A=L(d.exp)?"fn: "+(d.exp.name||d.exp.toString()):d.exp,A+="; newVal: "+qa(f)+"; oldVal: "+qa(g),V[J].push(A));else if(d===c){v=!1;break a}}catch(t){p.$$phase=
|
||||
null,e(t)}if(!(h=N.$$childHead||N!==this&&N.$$nextSibling))for(;N!==this&&!(h=N.$$nextSibling);)N=N.$parent}while(N=h);if((v||k.length)&&!r--)throw p.$$phase=null,a("infdig",b,qa(V));}while(v||k.length);for(p.$$phase=null;l.length;)try{l.shift()()}catch(z){e(z)}},$destroy:function(){if(!this.$$destroyed){var a=this.$parent;this.$broadcast("$destroy");this.$$destroyed=!0;this!==p&&(q(this.$$listenerCount,cb(null,l,this)),a.$$childHead==this&&(a.$$childHead=this.$$nextSibling),a.$$childTail==this&&
|
||||
(a.$$childTail=this.$$prevSibling),this.$$prevSibling&&(this.$$prevSibling.$$nextSibling=this.$$nextSibling),this.$$nextSibling&&(this.$$nextSibling.$$prevSibling=this.$$prevSibling),this.$parent=this.$$nextSibling=this.$$prevSibling=this.$$childHead=this.$$childTail=null)}},$eval:function(a,b){return g(a)(this,b)},$evalAsync:function(a){p.$$phase||p.$$asyncQueue.length||f.defer(function(){p.$$asyncQueue.length&&p.$digest()});this.$$asyncQueue.push({scope:this,expression:a})},$$postDigest:function(a){this.$$postDigestQueue.push(a)},
|
||||
$apply:function(a){try{return m("$apply"),this.$eval(a)}catch(b){e(b)}finally{p.$$phase=null;try{p.$digest()}catch(c){throw e(c),c;}}},$on:function(a,b){var c=this.$$listeners[a];c||(this.$$listeners[a]=c=[]);c.push(b);var d=this;do d.$$listenerCount[a]||(d.$$listenerCount[a]=0),d.$$listenerCount[a]++;while(d=d.$parent);var e=this;return function(){c[bb(c,b)]=null;l(e,1,a)}},$emit:function(a,b){var c=[],d,f=this,g=!1,h={name:a,targetScope:f,stopPropagation:function(){g=!0},preventDefault:function(){h.defaultPrevented=
|
||||
!0},defaultPrevented:!1},m=[h].concat(va.call(arguments,1)),k,l;do{d=f.$$listeners[a]||c;h.currentScope=f;k=0;for(l=d.length;k<l;k++)if(d[k])try{d[k].apply(null,m)}catch(p){e(p)}else d.splice(k,1),k--,l--;if(g)break;f=f.$parent}while(f);return h},$broadcast:function(a,b){for(var c=this,d=this,f={name:a,targetScope:this,preventDefault:function(){f.defaultPrevented=!0},defaultPrevented:!1},g=[f].concat(va.call(arguments,1)),h,k;c=d;){f.currentScope=c;d=c.$$listeners[a]||[];h=0;for(k=d.length;h<k;h++)if(d[h])try{d[h].apply(null,
|
||||
g)}catch(m){e(m)}else d.splice(h,1),h--,k--;if(!(d=c.$$listenerCount[a]&&c.$$childHead||c!==this&&c.$$nextSibling))for(;c!==this&&!(d=c.$$nextSibling);)c=c.$parent}return f}};var p=new h;return p}]}function Cd(){var b=/^\s*(https?|ftp|mailto|tel|file):/,a=/^\s*(https?|ftp|file):|data:image\//;this.aHrefSanitizationWhitelist=function(a){return B(a)?(b=a,this):b};this.imgSrcSanitizationWhitelist=function(b){return B(b)?(a=b,this):a};this.$get=function(){return function(c,d){var e=d?a:b,g;if(!M||8<=
|
||||
M)if(g=ya(c).href,""!==g&&!g.match(e))return"unsafe:"+g;return c}}}function Dd(b){if("self"===b)return b;if(D(b)){if(-1<b.indexOf("***"))throw sa("iwcard",b);b=b.replace(/([-()\[\]{}+?*.$\^|,:#<!\\])/g,"\\$1").replace(/\x08/g,"\\x08").replace("\\*\\*",".*").replace("\\*","[^:/.?&;]*");return RegExp("^"+b+"$")}if(ab(b))return RegExp("^"+b.source+"$");throw sa("imatcher");}function zc(b){var a=[];B(b)&&q(b,function(b){a.push(Dd(b))});return a}function Ed(){this.SCE_CONTEXTS=fa;var b=["self"],a=[];this.resourceUrlWhitelist=
|
||||
function(a){arguments.length&&(b=zc(a));return b};this.resourceUrlBlacklist=function(b){arguments.length&&(a=zc(b));return a};this.$get=["$injector",function(c){function d(a){var b=function(a){this.$$unwrapTrustedValue=function(){return a}};a&&(b.prototype=new a);b.prototype.valueOf=function(){return this.$$unwrapTrustedValue()};b.prototype.toString=function(){return this.$$unwrapTrustedValue().toString()};return b}var e=function(a){throw sa("unsafe");};c.has("$sanitize")&&(e=c.get("$sanitize"));
|
||||
var g=d(),f={};f[fa.HTML]=d(g);f[fa.CSS]=d(g);f[fa.URL]=d(g);f[fa.JS]=d(g);f[fa.RESOURCE_URL]=d(f[fa.URL]);return{trustAs:function(a,b){var c=f.hasOwnProperty(a)?f[a]:null;if(!c)throw sa("icontext",a,b);if(null===b||b===r||""===b)return b;if("string"!==typeof b)throw sa("itype",a);return new c(b)},getTrusted:function(c,d){if(null===d||d===r||""===d)return d;var g=f.hasOwnProperty(c)?f[c]:null;if(g&&d instanceof g)return d.$$unwrapTrustedValue();if(c===fa.RESOURCE_URL){var g=ya(d.toString()),l,n,p=
|
||||
!1;l=0;for(n=b.length;l<n;l++)if("self"===b[l]?Gb(g):b[l].exec(g.href)){p=!0;break}if(p)for(l=0,n=a.length;l<n;l++)if("self"===a[l]?Gb(g):a[l].exec(g.href)){p=!1;break}if(p)return d;throw sa("insecurl",d.toString());}if(c===fa.HTML)return e(d);throw sa("unsafe");},valueOf:function(a){return a instanceof g?a.$$unwrapTrustedValue():a}}}]}function Fd(){var b=!0;this.enabled=function(a){arguments.length&&(b=!!a);return b};this.$get=["$parse","$sniffer","$sceDelegate",function(a,c,d){if(b&&c.msie&&8>c.msieDocumentMode)throw sa("iequirks");
|
||||
var e=aa(fa);e.isEnabled=function(){return b};e.trustAs=d.trustAs;e.getTrusted=d.getTrusted;e.valueOf=d.valueOf;b||(e.trustAs=e.getTrusted=function(a,b){return b},e.valueOf=Ba);e.parseAs=function(b,c){var d=a(c);return d.literal&&d.constant?d:function(a,c){return e.getTrusted(b,d(a,c))}};var g=e.parseAs,f=e.getTrusted,h=e.trustAs;q(fa,function(a,b){var c=x(b);e[Ra("parse_as_"+c)]=function(b){return g(a,b)};e[Ra("get_trusted_"+c)]=function(b){return f(a,b)};e[Ra("trust_as_"+c)]=function(b){return h(a,
|
||||
b)}});return e}]}function Gd(){this.$get=["$window","$document",function(b,a){var c={},d=S((/android (\d+)/.exec(x((b.navigator||{}).userAgent))||[])[1]),e=/Boxee/i.test((b.navigator||{}).userAgent),g=a[0]||{},f=g.documentMode,h,m=/^(Moz|webkit|O|ms)(?=[A-Z])/,k=g.body&&g.body.style,l=!1,n=!1;if(k){for(var p in k)if(l=m.exec(p)){h=l[0];h=h.substr(0,1).toUpperCase()+h.substr(1);break}h||(h="WebkitOpacity"in k&&"webkit");l=!!("transition"in k||h+"Transition"in k);n=!!("animation"in k||h+"Animation"in
|
||||
k);!d||l&&n||(l=D(g.body.style.webkitTransition),n=D(g.body.style.webkitAnimation))}return{history:!(!b.history||!b.history.pushState||4>d||e),hashchange:"onhashchange"in b&&(!f||7<f),hasEvent:function(a){if("input"==a&&9==M)return!1;if(z(c[a])){var b=g.createElement("div");c[a]="on"+a in b}return c[a]},csp:Ub(),vendorPrefix:h,transitions:l,animations:n,android:d,msie:M,msieDocumentMode:f}}]}function Hd(){this.$get=["$rootScope","$browser","$q","$exceptionHandler",function(b,a,c,d){function e(e,h,
|
||||
m){var k=c.defer(),l=k.promise,n=B(m)&&!m;h=a.defer(function(){try{k.resolve(e())}catch(a){k.reject(a),d(a)}finally{delete g[l.$$timeoutId]}n||b.$apply()},h);l.$$timeoutId=h;g[h]=k;return l}var g={};e.cancel=function(b){return b&&b.$$timeoutId in g?(g[b.$$timeoutId].reject("canceled"),delete g[b.$$timeoutId],a.defer.cancel(b.$$timeoutId)):!1};return e}]}function ya(b,a){var c=b;M&&(Y.setAttribute("href",c),c=Y.href);Y.setAttribute("href",c);return{href:Y.href,protocol:Y.protocol?Y.protocol.replace(/:$/,
|
||||
""):"",host:Y.host,search:Y.search?Y.search.replace(/^\?/,""):"",hash:Y.hash?Y.hash.replace(/^#/,""):"",hostname:Y.hostname,port:Y.port,pathname:"/"===Y.pathname.charAt(0)?Y.pathname:"/"+Y.pathname}}function Gb(b){b=D(b)?ya(b):b;return b.protocol===Ac.protocol&&b.host===Ac.host}function Id(){this.$get=$(Z)}function Bc(b){function a(d,e){if(X(d)){var g={};q(d,function(b,c){g[c]=a(c,b)});return g}return b.factory(d+c,e)}var c="Filter";this.register=a;this.$get=["$injector",function(a){return function(b){return a.get(b+
|
||||
c)}}];a("currency",Cc);a("date",Dc);a("filter",Jd);a("json",Kd);a("limitTo",Ld);a("lowercase",Md);a("number",Ec);a("orderBy",Fc);a("uppercase",Nd)}function Jd(){return function(b,a,c){if(!K(b))return b;var d=typeof c,e=[];e.check=function(a){for(var b=0;b<e.length;b++)if(!e[b](a))return!1;return!0};"function"!==d&&(c="boolean"===d&&c?function(a,b){return Ca.equals(a,b)}:function(a,b){b=(""+b).toLowerCase();return-1<(""+a).toLowerCase().indexOf(b)});var g=function(a,b){if("string"==typeof b&&"!"===
|
||||
b.charAt(0))return!g(a,b.substr(1));switch(typeof a){case "boolean":case "number":case "string":return c(a,b);case "object":switch(typeof b){case "object":return c(a,b);default:for(var d in a)if("$"!==d.charAt(0)&&g(a[d],b))return!0}return!1;case "array":for(d=0;d<a.length;d++)if(g(a[d],b))return!0;return!1;default:return!1}};switch(typeof a){case "boolean":case "number":case "string":a={$:a};case "object":for(var f in a)(function(b){"undefined"!=typeof a[b]&&e.push(function(c){return g("$"==b?c:
|
||||
vb(c,b),a[b])})})(f);break;case "function":e.push(a);break;default:return b}d=[];for(f=0;f<b.length;f++){var h=b[f];e.check(h)&&d.push(h)}return d}}function Cc(b){var a=b.NUMBER_FORMATS;return function(b,d){z(d)&&(d=a.CURRENCY_SYM);return Gc(b,a.PATTERNS[1],a.GROUP_SEP,a.DECIMAL_SEP,2).replace(/\u00A4/g,d)}}function Ec(b){var a=b.NUMBER_FORMATS;return function(b,d){return Gc(b,a.PATTERNS[0],a.GROUP_SEP,a.DECIMAL_SEP,d)}}function Gc(b,a,c,d,e){if(isNaN(b)||!isFinite(b))return"";var g=0>b;b=Math.abs(b);
|
||||
var f=b+"",h="",m=[],k=!1;if(-1!==f.indexOf("e")){var l=f.match(/([\d\.]+)e(-?)(\d+)/);l&&"-"==l[2]&&l[3]>e+1?f="0":(h=f,k=!0)}if(k)0<e&&(-1<b&&1>b)&&(h=b.toFixed(e));else{f=(f.split(Hc)[1]||"").length;z(e)&&(e=Math.min(Math.max(a.minFrac,f),a.maxFrac));f=Math.pow(10,e);b=Math.round(b*f)/f;b=(""+b).split(Hc);f=b[0];b=b[1]||"";var l=0,n=a.lgSize,p=a.gSize;if(f.length>=n+p)for(l=f.length-n,k=0;k<l;k++)0===(l-k)%p&&0!==k&&(h+=c),h+=f.charAt(k);for(k=l;k<f.length;k++)0===(f.length-k)%n&&0!==k&&(h+=c),
|
||||
h+=f.charAt(k);for(;b.length<e;)b+="0";e&&"0"!==e&&(h+=d+b.substr(0,e))}m.push(g?a.negPre:a.posPre);m.push(h);m.push(g?a.negSuf:a.posSuf);return m.join("")}function Mb(b,a,c){var d="";0>b&&(d="-",b=-b);for(b=""+b;b.length<a;)b="0"+b;c&&(b=b.substr(b.length-a));return d+b}function W(b,a,c,d){c=c||0;return function(e){e=e["get"+b]();if(0<c||e>-c)e+=c;0===e&&-12==c&&(e=12);return Mb(e,a,d)}}function lb(b,a){return function(c,d){var e=c["get"+b](),g=Ia(a?"SHORT"+b:b);return d[g][e]}}function Dc(b){function a(a){var b;
|
||||
if(b=a.match(c)){a=new Date(0);var g=0,f=0,h=b[8]?a.setUTCFullYear:a.setFullYear,m=b[8]?a.setUTCHours:a.setHours;b[9]&&(g=S(b[9]+b[10]),f=S(b[9]+b[11]));h.call(a,S(b[1]),S(b[2])-1,S(b[3]));g=S(b[4]||0)-g;f=S(b[5]||0)-f;h=S(b[6]||0);b=Math.round(1E3*parseFloat("0."+(b[7]||0)));m.call(a,g,f,h,b)}return a}var c=/^(\d{4})-?(\d\d)-?(\d\d)(?:T(\d\d)(?::?(\d\d)(?::?(\d\d)(?:\.(\d+))?)?)?(Z|([+-])(\d\d):?(\d\d))?)?$/;return function(c,e){var g="",f=[],h,m;e=e||"mediumDate";e=b.DATETIME_FORMATS[e]||e;D(c)&&
|
||||
(c=Od.test(c)?S(c):a(c));sb(c)&&(c=new Date(c));if(!La(c))return c;for(;e;)(m=Pd.exec(e))?(f=f.concat(va.call(m,1)),e=f.pop()):(f.push(e),e=null);q(f,function(a){h=Qd[a];g+=h?h(c,b.DATETIME_FORMATS):a.replace(/(^'|'$)/g,"").replace(/''/g,"'")});return g}}function Kd(){return function(b){return qa(b,!0)}}function Ld(){return function(b,a){if(!K(b)&&!D(b))return b;a=S(a);if(D(b))return a?0<=a?b.slice(0,a):b.slice(a,b.length):"";var c=[],d,e;a>b.length?a=b.length:a<-b.length&&(a=-b.length);0<a?(d=0,
|
||||
e=a):(d=b.length+a,e=b.length);for(;d<e;d++)c.push(b[d]);return c}}function Fc(b){return function(a,c,d){function e(a,b){return Pa(b)?function(b,c){return a(c,b)}:a}if(!K(a)||!c)return a;c=K(c)?c:[c];c=Rc(c,function(a){var c=!1,d=a||Ba;if(D(a)){if("+"==a.charAt(0)||"-"==a.charAt(0))c="-"==a.charAt(0),a=a.substring(1);d=b(a)}return e(function(a,b){var c;c=d(a);var e=d(b),g=typeof c,f=typeof e;g==f?("string"==g&&(c=c.toLowerCase(),e=e.toLowerCase()),c=c===e?0:c<e?-1:1):c=g<f?-1:1;return c},c)});for(var g=
|
||||
[],f=0;f<a.length;f++)g.push(a[f]);return g.sort(e(function(a,b){for(var d=0;d<c.length;d++){var e=c[d](a,b);if(0!==e)return e}return 0},d))}}function ta(b){L(b)&&(b={link:b});b.restrict=b.restrict||"AC";return $(b)}function Ic(b,a){function c(a,c){c=c?"-"+db(c,"-"):"";b.removeClass((a?mb:nb)+c).addClass((a?nb:mb)+c)}var d=this,e=b.parent().controller("form")||ob,g=0,f=d.$error={},h=[];d.$name=a.name||a.ngForm;d.$dirty=!1;d.$pristine=!0;d.$valid=!0;d.$invalid=!1;e.$addControl(d);b.addClass(Ja);c(!0);
|
||||
d.$addControl=function(a){xa(a.$name,"input");h.push(a);a.$name&&(d[a.$name]=a)};d.$removeControl=function(a){a.$name&&d[a.$name]===a&&delete d[a.$name];q(f,function(b,c){d.$setValidity(c,!0,a)});Na(h,a)};d.$setValidity=function(a,b,h){var n=f[a];if(b)n&&(Na(n,h),n.length||(g--,g||(c(b),d.$valid=!0,d.$invalid=!1),f[a]=!1,c(!0,a),e.$setValidity(a,!0,d)));else{g||c(b);if(n){if(-1!=bb(n,h))return}else f[a]=n=[],g++,c(!1,a),e.$setValidity(a,!1,d);n.push(h);d.$valid=!1;d.$invalid=!0}};d.$setDirty=function(){b.removeClass(Ja).addClass(pb);
|
||||
d.$dirty=!0;d.$pristine=!1;e.$setDirty()};d.$setPristine=function(){b.removeClass(pb).addClass(Ja);d.$dirty=!1;d.$pristine=!0;q(h,function(a){a.$setPristine()})}}function pa(b,a,c,d){b.$setValidity(a,c);return c?d:r}function qb(b,a,c,d,e,g){if(!e.android){var f=!1;a.on("compositionstart",function(a){f=!0});a.on("compositionend",function(){f=!1})}var h=function(){if(!f){var e=a.val();Pa(c.ngTrim||"T")&&(e=ba(e));d.$viewValue!==e&&(b.$$phase?d.$setViewValue(e):b.$apply(function(){d.$setViewValue(e)}))}};
|
||||
if(e.hasEvent("input"))a.on("input",h);else{var m,k=function(){m||(m=g.defer(function(){h();m=null}))};a.on("keydown",function(a){a=a.keyCode;91===a||(15<a&&19>a||37<=a&&40>=a)||k()});if(e.hasEvent("paste"))a.on("paste cut",k)}a.on("change",h);d.$render=function(){a.val(d.$isEmpty(d.$viewValue)?"":d.$viewValue)};var l=c.ngPattern;l&&((e=l.match(/^\/(.*)\/([gim]*)$/))?(l=RegExp(e[1],e[2]),e=function(a){return pa(d,"pattern",d.$isEmpty(a)||l.test(a),a)}):e=function(c){var e=b.$eval(l);if(!e||!e.test)throw F("ngPattern")("noregexp",
|
||||
l,e,ga(a));return pa(d,"pattern",d.$isEmpty(c)||e.test(c),c)},d.$formatters.push(e),d.$parsers.push(e));if(c.ngMinlength){var n=S(c.ngMinlength);e=function(a){return pa(d,"minlength",d.$isEmpty(a)||a.length>=n,a)};d.$parsers.push(e);d.$formatters.push(e)}if(c.ngMaxlength){var p=S(c.ngMaxlength);e=function(a){return pa(d,"maxlength",d.$isEmpty(a)||a.length<=p,a)};d.$parsers.push(e);d.$formatters.push(e)}}function Nb(b,a){b="ngClass"+b;return function(){return{restrict:"AC",link:function(c,d,e){function g(b){if(!0===
|
||||
a||c.$index%2===a){var d=f(b||"");h?ua(b,h)||e.$updateClass(d,f(h)):e.$addClass(d)}h=aa(b)}function f(a){if(K(a))return a.join(" ");if(X(a)){var b=[];q(a,function(a,c){a&&b.push(c)});return b.join(" ")}return a}var h;c.$watch(e[b],g,!0);e.$observe("class",function(a){g(c.$eval(e[b]))});"ngClass"!==b&&c.$watch("$index",function(d,g){var h=d&1;if(h!==g&1){var n=f(c.$eval(e[b]));h===a?e.$addClass(n):e.$removeClass(n)}})}}}}var x=function(b){return D(b)?b.toLowerCase():b},Ia=function(b){return D(b)?b.toUpperCase():
|
||||
b},M,A,Da,va=[].slice,Rd=[].push,Ma=Object.prototype.toString,Oa=F("ng"),Ca=Z.angular||(Z.angular={}),Va,Ha,ka=["0","0","0"];M=S((/msie (\d+)/.exec(x(navigator.userAgent))||[])[1]);isNaN(M)&&(M=S((/trident\/.*; rv:(\d+)/.exec(x(navigator.userAgent))||[])[1]));w.$inject=[];Ba.$inject=[];var ba=function(){return String.prototype.trim?function(b){return D(b)?b.trim():b}:function(b){return D(b)?b.replace(/^\s\s*/,"").replace(/\s\s*$/,""):b}}();Ha=9>M?function(b){b=b.nodeName?b:b[0];return b.scopeName&&
|
||||
"HTML"!=b.scopeName?Ia(b.scopeName+":"+b.nodeName):b.nodeName}:function(b){return b.nodeName?b.nodeName:b[0].nodeName};var Uc=/[A-Z]/g,Sd={full:"1.2.10",major:1,minor:2,dot:10,codeName:"augmented-serendipity"},Sa=O.cache={},eb=O.expando="ng-"+(new Date).getTime(),Yc=1,Jc=Z.document.addEventListener?function(b,a,c){b.addEventListener(a,c,!1)}:function(b,a,c){b.attachEvent("on"+a,c)},Bb=Z.document.removeEventListener?function(b,a,c){b.removeEventListener(a,c,!1)}:function(b,a,c){b.detachEvent("on"+
|
||||
a,c)},Wc=/([\:\-\_]+(.))/g,Xc=/^moz([A-Z])/,yb=F("jqLite"),Ga=O.prototype={ready:function(b){function a(){c||(c=!0,b())}var c=!1;"complete"===Q.readyState?setTimeout(a):(this.on("DOMContentLoaded",a),O(Z).on("load",a))},toString:function(){var b=[];q(this,function(a){b.push(""+a)});return"["+b.join(", ")+"]"},eq:function(b){return 0<=b?A(this[b]):A(this[this.length+b])},length:0,push:Rd,sort:[].sort,splice:[].splice},gb={};q("multiple selected checked disabled readOnly required open".split(" "),function(b){gb[x(b)]=
|
||||
b});var gc={};q("input select option textarea button form details".split(" "),function(b){gc[Ia(b)]=!0});q({data:cc,inheritedData:fb,scope:function(b){return A(b).data("$scope")||fb(b.parentNode||b,["$isolateScope","$scope"])},isolateScope:function(b){return A(b).data("$isolateScope")||A(b).data("$isolateScopeNoTemplate")},controller:dc,injector:function(b){return fb(b,"$injector")},removeAttr:function(b,a){b.removeAttribute(a)},hasClass:Cb,css:function(b,a,c){a=Ra(a);if(B(c))b.style[a]=c;else{var d;
|
||||
8>=M&&(d=b.currentStyle&&b.currentStyle[a],""===d&&(d="auto"));d=d||b.style[a];8>=M&&(d=""===d?r:d);return d}},attr:function(b,a,c){var d=x(a);if(gb[d])if(B(c))c?(b[a]=!0,b.setAttribute(a,d)):(b[a]=!1,b.removeAttribute(d));else return b[a]||(b.attributes.getNamedItem(a)||w).specified?d:r;else if(B(c))b.setAttribute(a,c);else if(b.getAttribute)return b=b.getAttribute(a,2),null===b?r:b},prop:function(b,a,c){if(B(c))b[a]=c;else return b[a]},text:function(){function b(b,d){var e=a[b.nodeType];if(z(d))return e?
|
||||
b[e]:"";b[e]=d}var a=[];9>M?(a[1]="innerText",a[3]="nodeValue"):a[1]=a[3]="textContent";b.$dv="";return b}(),val:function(b,a){if(z(a)){if("SELECT"===Ha(b)&&b.multiple){var c=[];q(b.options,function(a){a.selected&&c.push(a.value||a.text)});return 0===c.length?null:c}return b.value}b.value=a},html:function(b,a){if(z(a))return b.innerHTML;for(var c=0,d=b.childNodes;c<d.length;c++)Ea(d[c]);b.innerHTML=a},empty:ec},function(b,a){O.prototype[a]=function(a,d){var e,g;if(b!==ec&&(2==b.length&&b!==Cb&&b!==
|
||||
dc?a:d)===r){if(X(a)){for(e=0;e<this.length;e++)if(b===cc)b(this[e],a);else for(g in a)b(this[e],g,a[g]);return this}e=b.$dv;g=e===r?Math.min(this.length,1):this.length;for(var f=0;f<g;f++){var h=b(this[f],a,d);e=e?e+h:h}return e}for(e=0;e<this.length;e++)b(this[e],a,d);return this}});q({removeData:ac,dealoc:Ea,on:function a(c,d,e,g){if(B(g))throw yb("onargs");var f=la(c,"events"),h=la(c,"handle");f||la(c,"events",f={});h||la(c,"handle",h=Zc(c,f));q(d.split(" "),function(d){var g=f[d];if(!g){if("mouseenter"==
|
||||
d||"mouseleave"==d){var l=Q.body.contains||Q.body.compareDocumentPosition?function(a,c){var d=9===a.nodeType?a.documentElement:a,e=c&&c.parentNode;return a===e||!!(e&&1===e.nodeType&&(d.contains?d.contains(e):a.compareDocumentPosition&&a.compareDocumentPosition(e)&16))}:function(a,c){if(c)for(;c=c.parentNode;)if(c===a)return!0;return!1};f[d]=[];a(c,{mouseleave:"mouseout",mouseenter:"mouseover"}[d],function(a){var c=a.relatedTarget;c&&(c===this||l(this,c))||h(a,d)})}else Jc(c,d,h),f[d]=[];g=f[d]}g.push(e)})},
|
||||
off:bc,one:function(a,c,d){a=A(a);a.on(c,function g(){a.off(c,d);a.off(c,g)});a.on(c,d)},replaceWith:function(a,c){var d,e=a.parentNode;Ea(a);q(new O(c),function(c){d?e.insertBefore(c,d.nextSibling):e.replaceChild(c,a);d=c})},children:function(a){var c=[];q(a.childNodes,function(a){1===a.nodeType&&c.push(a)});return c},contents:function(a){return a.childNodes||[]},append:function(a,c){q(new O(c),function(c){1!==a.nodeType&&11!==a.nodeType||a.appendChild(c)})},prepend:function(a,c){if(1===a.nodeType){var d=
|
||||
a.firstChild;q(new O(c),function(c){a.insertBefore(c,d)})}},wrap:function(a,c){c=A(c)[0];var d=a.parentNode;d&&d.replaceChild(c,a);c.appendChild(a)},remove:function(a){Ea(a);var c=a.parentNode;c&&c.removeChild(a)},after:function(a,c){var d=a,e=a.parentNode;q(new O(c),function(a){e.insertBefore(a,d.nextSibling);d=a})},addClass:Eb,removeClass:Db,toggleClass:function(a,c,d){z(d)&&(d=!Cb(a,c));(d?Eb:Db)(a,c)},parent:function(a){return(a=a.parentNode)&&11!==a.nodeType?a:null},next:function(a){if(a.nextElementSibling)return a.nextElementSibling;
|
||||
for(a=a.nextSibling;null!=a&&1!==a.nodeType;)a=a.nextSibling;return a},find:function(a,c){return a.getElementsByTagName?a.getElementsByTagName(c):[]},clone:Ab,triggerHandler:function(a,c,d){c=(la(a,"events")||{})[c];d=d||[];var e=[{preventDefault:w,stopPropagation:w}];q(c,function(c){c.apply(a,e.concat(d))})}},function(a,c){O.prototype[c]=function(c,e,g){for(var f,h=0;h<this.length;h++)z(f)?(f=a(this[h],c,e,g),B(f)&&(f=A(f))):zb(f,a(this[h],c,e,g));return B(f)?f:this};O.prototype.bind=O.prototype.on;
|
||||
O.prototype.unbind=O.prototype.off});Ta.prototype={put:function(a,c){this[Fa(a)]=c},get:function(a){return this[Fa(a)]},remove:function(a){var c=this[a=Fa(a)];delete this[a];return c}};var ad=/^function\s*[^\(]*\(\s*([^\)]*)\)/m,bd=/,/,cd=/^\s*(_?)(\S+?)\1\s*$/,$c=/((\/\/.*$)|(\/\*[\s\S]*?\*\/))/mg,Ua=F("$injector"),Td=F("$animate"),Ud=["$provide",function(a){this.$$selectors={};this.register=function(c,d){var e=c+"-animation";if(c&&"."!=c.charAt(0))throw Td("notcsel",c);this.$$selectors[c.substr(1)]=
|
||||
e;a.factory(e,d)};this.classNameFilter=function(a){1===arguments.length&&(this.$$classNameFilter=a instanceof RegExp?a:null);return this.$$classNameFilter};this.$get=["$timeout",function(a){return{enter:function(d,e,g,f){g?g.after(d):(e&&e[0]||(e=g.parent()),e.append(d));f&&a(f,0,!1)},leave:function(d,e){d.remove();e&&a(e,0,!1)},move:function(a,c,g,f){this.enter(a,c,g,f)},addClass:function(d,e,g){e=D(e)?e:K(e)?e.join(" "):"";q(d,function(a){Eb(a,e)});g&&a(g,0,!1)},removeClass:function(d,e,g){e=D(e)?
|
||||
e:K(e)?e.join(" "):"";q(d,function(a){Db(a,e)});g&&a(g,0,!1)},enabled:w}}]}],ja=F("$compile");jc.$inject=["$provide","$$sanitizeUriProvider"];var id=/^(x[\:\-_]|data[\:\-_])/i,pc=F("$interpolate"),Vd=/^([^\?#]*)(\?([^#]*))?(#(.*))?$/,td={http:80,https:443,ftp:21},Ib=F("$location");uc.prototype=Jb.prototype=tc.prototype={$$html5:!1,$$replace:!1,absUrl:jb("$$absUrl"),url:function(a,c){if(z(a))return this.$$url;var d=Vd.exec(a);d[1]&&this.path(decodeURIComponent(d[1]));(d[2]||d[1])&&this.search(d[3]||
|
||||
"");this.hash(d[5]||"",c);return this},protocol:jb("$$protocol"),host:jb("$$host"),port:jb("$$port"),path:vc("$$path",function(a){return"/"==a.charAt(0)?a:"/"+a}),search:function(a,c){switch(arguments.length){case 0:return this.$$search;case 1:if(D(a))this.$$search=Xb(a);else if(X(a))this.$$search=a;else throw Ib("isrcharg");break;default:z(c)||null===c?delete this.$$search[a]:this.$$search[a]=c}this.$$compose();return this},hash:vc("$$hash",Ba),replace:function(){this.$$replace=!0;return this}};
|
||||
var za=F("$parse"),yc={},ra,Ka={"null":function(){return null},"true":function(){return!0},"false":function(){return!1},undefined:w,"+":function(a,c,d,e){d=d(a,c);e=e(a,c);return B(d)?B(e)?d+e:d:B(e)?e:r},"-":function(a,c,d,e){d=d(a,c);e=e(a,c);return(B(d)?d:0)-(B(e)?e:0)},"*":function(a,c,d,e){return d(a,c)*e(a,c)},"/":function(a,c,d,e){return d(a,c)/e(a,c)},"%":function(a,c,d,e){return d(a,c)%e(a,c)},"^":function(a,c,d,e){return d(a,c)^e(a,c)},"=":w,"===":function(a,c,d,e){return d(a,c)===e(a,c)},
|
||||
"!==":function(a,c,d,e){return d(a,c)!==e(a,c)},"==":function(a,c,d,e){return d(a,c)==e(a,c)},"!=":function(a,c,d,e){return d(a,c)!=e(a,c)},"<":function(a,c,d,e){return d(a,c)<e(a,c)},">":function(a,c,d,e){return d(a,c)>e(a,c)},"<=":function(a,c,d,e){return d(a,c)<=e(a,c)},">=":function(a,c,d,e){return d(a,c)>=e(a,c)},"&&":function(a,c,d,e){return d(a,c)&&e(a,c)},"||":function(a,c,d,e){return d(a,c)||e(a,c)},"&":function(a,c,d,e){return d(a,c)&e(a,c)},"|":function(a,c,d,e){return e(a,c)(a,c,d(a,c))},
|
||||
"!":function(a,c,d){return!d(a,c)}},Wd={n:"\n",f:"\f",r:"\r",t:"\t",v:"\v","'":"'",'"':'"'},Lb=function(a){this.options=a};Lb.prototype={constructor:Lb,lex:function(a){this.text=a;this.index=0;this.ch=r;this.lastCh=":";this.tokens=[];var c;for(a=[];this.index<this.text.length;){this.ch=this.text.charAt(this.index);if(this.is("\"'"))this.readString(this.ch);else if(this.isNumber(this.ch)||this.is(".")&&this.isNumber(this.peek()))this.readNumber();else if(this.isIdent(this.ch))this.readIdent(),this.was("{,")&&
|
||||
("{"===a[0]&&(c=this.tokens[this.tokens.length-1]))&&(c.json=-1===c.text.indexOf("."));else if(this.is("(){}[].,;:?"))this.tokens.push({index:this.index,text:this.ch,json:this.was(":[,")&&this.is("{[")||this.is("}]:,")}),this.is("{[")&&a.unshift(this.ch),this.is("}]")&&a.shift(),this.index++;else if(this.isWhitespace(this.ch)){this.index++;continue}else{var d=this.ch+this.peek(),e=d+this.peek(2),g=Ka[this.ch],f=Ka[d],h=Ka[e];h?(this.tokens.push({index:this.index,text:e,fn:h}),this.index+=3):f?(this.tokens.push({index:this.index,
|
||||
text:d,fn:f}),this.index+=2):g?(this.tokens.push({index:this.index,text:this.ch,fn:g,json:this.was("[,:")&&this.is("+-")}),this.index+=1):this.throwError("Unexpected next character ",this.index,this.index+1)}this.lastCh=this.ch}return this.tokens},is:function(a){return-1!==a.indexOf(this.ch)},was:function(a){return-1!==a.indexOf(this.lastCh)},peek:function(a){a=a||1;return this.index+a<this.text.length?this.text.charAt(this.index+a):!1},isNumber:function(a){return"0"<=a&&"9">=a},isWhitespace:function(a){return" "===
|
||||
a||"\r"===a||"\t"===a||"\n"===a||"\v"===a||"\u00a0"===a},isIdent:function(a){return"a"<=a&&"z">=a||"A"<=a&&"Z">=a||"_"===a||"$"===a},isExpOperator:function(a){return"-"===a||"+"===a||this.isNumber(a)},throwError:function(a,c,d){d=d||this.index;c=B(c)?"s "+c+"-"+this.index+" ["+this.text.substring(c,d)+"]":" "+d;throw za("lexerr",a,c,this.text);},readNumber:function(){for(var a="",c=this.index;this.index<this.text.length;){var d=x(this.text.charAt(this.index));if("."==d||this.isNumber(d))a+=d;else{var e=
|
||||
this.peek();if("e"==d&&this.isExpOperator(e))a+=d;else if(this.isExpOperator(d)&&e&&this.isNumber(e)&&"e"==a.charAt(a.length-1))a+=d;else if(!this.isExpOperator(d)||e&&this.isNumber(e)||"e"!=a.charAt(a.length-1))break;else this.throwError("Invalid exponent")}this.index++}a*=1;this.tokens.push({index:c,text:a,json:!0,fn:function(){return a}})},readIdent:function(){for(var a=this,c="",d=this.index,e,g,f,h;this.index<this.text.length;){h=this.text.charAt(this.index);if("."===h||this.isIdent(h)||this.isNumber(h))"."===
|
||||
h&&(e=this.index),c+=h;else break;this.index++}if(e)for(g=this.index;g<this.text.length;){h=this.text.charAt(g);if("("===h){f=c.substr(e-d+1);c=c.substr(0,e-d);this.index=g;break}if(this.isWhitespace(h))g++;else break}d={index:d,text:c};if(Ka.hasOwnProperty(c))d.fn=Ka[c],d.json=Ka[c];else{var m=xc(c,this.options,this.text);d.fn=t(function(a,c){return m(a,c)},{assign:function(d,e){return kb(d,c,e,a.text,a.options)}})}this.tokens.push(d);f&&(this.tokens.push({index:e,text:".",json:!1}),this.tokens.push({index:e+
|
||||
1,text:f,json:!1}))},readString:function(a){var c=this.index;this.index++;for(var d="",e=a,g=!1;this.index<this.text.length;){var f=this.text.charAt(this.index),e=e+f;if(g)"u"===f?(f=this.text.substring(this.index+1,this.index+5),f.match(/[\da-f]{4}/i)||this.throwError("Invalid unicode escape [\\u"+f+"]"),this.index+=4,d+=String.fromCharCode(parseInt(f,16))):d=(g=Wd[f])?d+g:d+f,g=!1;else if("\\"===f)g=!0;else{if(f===a){this.index++;this.tokens.push({index:c,text:e,string:d,json:!0,fn:function(){return d}});
|
||||
return}d+=f}this.index++}this.throwError("Unterminated quote",c)}};var Za=function(a,c,d){this.lexer=a;this.$filter=c;this.options=d};Za.ZERO=function(){return 0};Za.prototype={constructor:Za,parse:function(a,c){this.text=a;this.json=c;this.tokens=this.lexer.lex(a);c&&(this.assignment=this.logicalOR,this.functionCall=this.fieldAccess=this.objectIndex=this.filterChain=function(){this.throwError("is not valid json",{text:a,index:0})});var d=c?this.primary():this.statements();0!==this.tokens.length&&
|
||||
this.throwError("is an unexpected token",this.tokens[0]);d.literal=!!d.literal;d.constant=!!d.constant;return d},primary:function(){var a;if(this.expect("("))a=this.filterChain(),this.consume(")");else if(this.expect("["))a=this.arrayDeclaration();else if(this.expect("{"))a=this.object();else{var c=this.expect();(a=c.fn)||this.throwError("not a primary expression",c);c.json&&(a.constant=!0,a.literal=!0)}for(var d;c=this.expect("(","[",".");)"("===c.text?(a=this.functionCall(a,d),d=null):"["===c.text?
|
||||
(d=a,a=this.objectIndex(a)):"."===c.text?(d=a,a=this.fieldAccess(a)):this.throwError("IMPOSSIBLE");return a},throwError:function(a,c){throw za("syntax",c.text,a,c.index+1,this.text,this.text.substring(c.index));},peekToken:function(){if(0===this.tokens.length)throw za("ueoe",this.text);return this.tokens[0]},peek:function(a,c,d,e){if(0<this.tokens.length){var g=this.tokens[0],f=g.text;if(f===a||f===c||f===d||f===e||!(a||c||d||e))return g}return!1},expect:function(a,c,d,e){return(a=this.peek(a,c,d,
|
||||
e))?(this.json&&!a.json&&this.throwError("is not valid json",a),this.tokens.shift(),a):!1},consume:function(a){this.expect(a)||this.throwError("is unexpected, expecting ["+a+"]",this.peek())},unaryFn:function(a,c){return t(function(d,e){return a(d,e,c)},{constant:c.constant})},ternaryFn:function(a,c,d){return t(function(e,g){return a(e,g)?c(e,g):d(e,g)},{constant:a.constant&&c.constant&&d.constant})},binaryFn:function(a,c,d){return t(function(e,g){return c(e,g,a,d)},{constant:a.constant&&d.constant})},
|
||||
statements:function(){for(var a=[];;)if(0<this.tokens.length&&!this.peek("}",")",";","]")&&a.push(this.filterChain()),!this.expect(";"))return 1===a.length?a[0]:function(c,d){for(var e,g=0;g<a.length;g++){var f=a[g];f&&(e=f(c,d))}return e}},filterChain:function(){for(var a=this.expression(),c;;)if(c=this.expect("|"))a=this.binaryFn(a,c.fn,this.filter());else return a},filter:function(){for(var a=this.expect(),c=this.$filter(a.text),d=[];;)if(a=this.expect(":"))d.push(this.expression());else{var e=
|
||||
function(a,e,h){h=[h];for(var m=0;m<d.length;m++)h.push(d[m](a,e));return c.apply(a,h)};return function(){return e}}},expression:function(){return this.assignment()},assignment:function(){var a=this.ternary(),c,d;return(d=this.expect("="))?(a.assign||this.throwError("implies assignment but ["+this.text.substring(0,d.index)+"] can not be assigned to",d),c=this.ternary(),function(d,g){return a.assign(d,c(d,g),g)}):a},ternary:function(){var a=this.logicalOR(),c,d;if(this.expect("?")){c=this.ternary();
|
||||
if(d=this.expect(":"))return this.ternaryFn(a,c,this.ternary());this.throwError("expected :",d)}else return a},logicalOR:function(){for(var a=this.logicalAND(),c;;)if(c=this.expect("||"))a=this.binaryFn(a,c.fn,this.logicalAND());else return a},logicalAND:function(){var a=this.equality(),c;if(c=this.expect("&&"))a=this.binaryFn(a,c.fn,this.logicalAND());return a},equality:function(){var a=this.relational(),c;if(c=this.expect("==","!=","===","!=="))a=this.binaryFn(a,c.fn,this.equality());return a},
|
||||
relational:function(){var a=this.additive(),c;if(c=this.expect("<",">","<=",">="))a=this.binaryFn(a,c.fn,this.relational());return a},additive:function(){for(var a=this.multiplicative(),c;c=this.expect("+","-");)a=this.binaryFn(a,c.fn,this.multiplicative());return a},multiplicative:function(){for(var a=this.unary(),c;c=this.expect("*","/","%");)a=this.binaryFn(a,c.fn,this.unary());return a},unary:function(){var a;return this.expect("+")?this.primary():(a=this.expect("-"))?this.binaryFn(Za.ZERO,a.fn,
|
||||
this.unary()):(a=this.expect("!"))?this.unaryFn(a.fn,this.unary()):this.primary()},fieldAccess:function(a){var c=this,d=this.expect().text,e=xc(d,this.options,this.text);return t(function(c,d,h){return e(h||a(c,d))},{assign:function(e,f,h){return kb(a(e,h),d,f,c.text,c.options)}})},objectIndex:function(a){var c=this,d=this.expression();this.consume("]");return t(function(e,g){var f=a(e,g),h=d(e,g),m;if(!f)return r;(f=Ya(f[h],c.text))&&(f.then&&c.options.unwrapPromises)&&(m=f,"$$v"in f||(m.$$v=r,m.then(function(a){m.$$v=
|
||||
a})),f=f.$$v);return f},{assign:function(e,g,f){var h=d(e,f);return Ya(a(e,f),c.text)[h]=g}})},functionCall:function(a,c){var d=[];if(")"!==this.peekToken().text){do d.push(this.expression());while(this.expect(","))}this.consume(")");var e=this;return function(g,f){for(var h=[],m=c?c(g,f):g,k=0;k<d.length;k++)h.push(d[k](g,f));k=a(g,f,m)||w;Ya(m,e.text);Ya(k,e.text);h=k.apply?k.apply(m,h):k(h[0],h[1],h[2],h[3],h[4]);return Ya(h,e.text)}},arrayDeclaration:function(){var a=[],c=!0;if("]"!==this.peekToken().text){do{var d=
|
||||
this.expression();a.push(d);d.constant||(c=!1)}while(this.expect(","))}this.consume("]");return t(function(c,d){for(var f=[],h=0;h<a.length;h++)f.push(a[h](c,d));return f},{literal:!0,constant:c})},object:function(){var a=[],c=!0;if("}"!==this.peekToken().text){do{var d=this.expect(),d=d.string||d.text;this.consume(":");var e=this.expression();a.push({key:d,value:e});e.constant||(c=!1)}while(this.expect(","))}this.consume("}");return t(function(c,d){for(var e={},m=0;m<a.length;m++){var k=a[m];e[k.key]=
|
||||
k.value(c,d)}return e},{literal:!0,constant:c})}};var Kb={},sa=F("$sce"),fa={HTML:"html",CSS:"css",URL:"url",RESOURCE_URL:"resourceUrl",JS:"js"},Y=Q.createElement("a"),Ac=ya(Z.location.href,!0);Bc.$inject=["$provide"];Cc.$inject=["$locale"];Ec.$inject=["$locale"];var Hc=".",Qd={yyyy:W("FullYear",4),yy:W("FullYear",2,0,!0),y:W("FullYear",1),MMMM:lb("Month"),MMM:lb("Month",!0),MM:W("Month",2,1),M:W("Month",1,1),dd:W("Date",2),d:W("Date",1),HH:W("Hours",2),H:W("Hours",1),hh:W("Hours",2,-12),h:W("Hours",
|
||||
1,-12),mm:W("Minutes",2),m:W("Minutes",1),ss:W("Seconds",2),s:W("Seconds",1),sss:W("Milliseconds",3),EEEE:lb("Day"),EEE:lb("Day",!0),a:function(a,c){return 12>a.getHours()?c.AMPMS[0]:c.AMPMS[1]},Z:function(a){a=-1*a.getTimezoneOffset();return a=(0<=a?"+":"")+(Mb(Math[0<a?"floor":"ceil"](a/60),2)+Mb(Math.abs(a%60),2))}},Pd=/((?:[^yMdHhmsaZE']+)|(?:'(?:[^']|'')*')|(?:E+|y+|M+|d+|H+|h+|m+|s+|a|Z))(.*)/,Od=/^\-?\d+$/;Dc.$inject=["$locale"];var Md=$(x),Nd=$(Ia);Fc.$inject=["$parse"];var Xd=$({restrict:"E",
|
||||
compile:function(a,c){8>=M&&(c.href||c.name||c.$set("href",""),a.append(Q.createComment("IE fix")));if(!c.href&&!c.xlinkHref&&!c.name)return function(a,c){var g="[object SVGAnimatedString]"===Ma.call(c.prop("href"))?"xlink:href":"href";c.on("click",function(a){c.attr(g)||a.preventDefault()})}}}),Ob={};q(gb,function(a,c){if("multiple"!=a){var d=ma("ng-"+c);Ob[d]=function(){return{priority:100,link:function(a,g,f){a.$watch(f[d],function(a){f.$set(c,!!a)})}}}}});q(["src","srcset","href"],function(a){var c=
|
||||
ma("ng-"+a);Ob[c]=function(){return{priority:99,link:function(d,e,g){g.$observe(c,function(c){c&&(g.$set(a,c),M&&e.prop(a,g[a]))})}}}});var ob={$addControl:w,$removeControl:w,$setValidity:w,$setDirty:w,$setPristine:w};Ic.$inject=["$element","$attrs","$scope"];var Kc=function(a){return["$timeout",function(c){return{name:"form",restrict:a?"EAC":"E",controller:Ic,compile:function(){return{pre:function(a,e,g,f){if(!g.action){var h=function(a){a.preventDefault?a.preventDefault():a.returnValue=!1};Jc(e[0],
|
||||
"submit",h);e.on("$destroy",function(){c(function(){Bb(e[0],"submit",h)},0,!1)})}var m=e.parent().controller("form"),k=g.name||g.ngForm;k&&kb(a,k,f,k);if(m)e.on("$destroy",function(){m.$removeControl(f);k&&kb(a,k,r,k);t(f,ob)})}}}}}]},Yd=Kc(),Zd=Kc(!0),$d=/^(ftp|http|https):\/\/(\w+:{0,1}\w*@)?(\S+)(:[0-9]+)?(\/|\/([\w#!:.?+=&%@!\-\/]))?$/,ae=/^[a-z0-9!#$%&'*+/=?^_`{|}~.-]+@[a-z0-9-]+(\.[a-z0-9-]+)*$/i,be=/^\s*(\-|\+)?(\d+|(\d*(\.\d*)))\s*$/,Lc={text:qb,number:function(a,c,d,e,g,f){qb(a,c,d,e,g,f);
|
||||
e.$parsers.push(function(a){var c=e.$isEmpty(a);if(c||be.test(a))return e.$setValidity("number",!0),""===a?null:c?a:parseFloat(a);e.$setValidity("number",!1);return r});e.$formatters.push(function(a){return e.$isEmpty(a)?"":""+a});d.min&&(a=function(a){var c=parseFloat(d.min);return pa(e,"min",e.$isEmpty(a)||a>=c,a)},e.$parsers.push(a),e.$formatters.push(a));d.max&&(a=function(a){var c=parseFloat(d.max);return pa(e,"max",e.$isEmpty(a)||a<=c,a)},e.$parsers.push(a),e.$formatters.push(a));e.$formatters.push(function(a){return pa(e,
|
||||
"number",e.$isEmpty(a)||sb(a),a)})},url:function(a,c,d,e,g,f){qb(a,c,d,e,g,f);a=function(a){return pa(e,"url",e.$isEmpty(a)||$d.test(a),a)};e.$formatters.push(a);e.$parsers.push(a)},email:function(a,c,d,e,g,f){qb(a,c,d,e,g,f);a=function(a){return pa(e,"email",e.$isEmpty(a)||ae.test(a),a)};e.$formatters.push(a);e.$parsers.push(a)},radio:function(a,c,d,e){z(d.name)&&c.attr("name",$a());c.on("click",function(){c[0].checked&&a.$apply(function(){e.$setViewValue(d.value)})});e.$render=function(){c[0].checked=
|
||||
d.value==e.$viewValue};d.$observe("value",e.$render)},checkbox:function(a,c,d,e){var g=d.ngTrueValue,f=d.ngFalseValue;D(g)||(g=!0);D(f)||(f=!1);c.on("click",function(){a.$apply(function(){e.$setViewValue(c[0].checked)})});e.$render=function(){c[0].checked=e.$viewValue};e.$isEmpty=function(a){return a!==g};e.$formatters.push(function(a){return a===g});e.$parsers.push(function(a){return a?g:f})},hidden:w,button:w,submit:w,reset:w},Mc=["$browser","$sniffer",function(a,c){return{restrict:"E",require:"?ngModel",
|
||||
link:function(d,e,g,f){f&&(Lc[x(g.type)]||Lc.text)(d,e,g,f,c,a)}}}],nb="ng-valid",mb="ng-invalid",Ja="ng-pristine",pb="ng-dirty",ce=["$scope","$exceptionHandler","$attrs","$element","$parse",function(a,c,d,e,g){function f(a,c){c=c?"-"+db(c,"-"):"";e.removeClass((a?mb:nb)+c).addClass((a?nb:mb)+c)}this.$modelValue=this.$viewValue=Number.NaN;this.$parsers=[];this.$formatters=[];this.$viewChangeListeners=[];this.$pristine=!0;this.$dirty=!1;this.$valid=!0;this.$invalid=!1;this.$name=d.name;var h=g(d.ngModel),
|
||||
m=h.assign;if(!m)throw F("ngModel")("nonassign",d.ngModel,ga(e));this.$render=w;this.$isEmpty=function(a){return z(a)||""===a||null===a||a!==a};var k=e.inheritedData("$formController")||ob,l=0,n=this.$error={};e.addClass(Ja);f(!0);this.$setValidity=function(a,c){n[a]!==!c&&(c?(n[a]&&l--,l||(f(!0),this.$valid=!0,this.$invalid=!1)):(f(!1),this.$invalid=!0,this.$valid=!1,l++),n[a]=!c,f(c,a),k.$setValidity(a,c,this))};this.$setPristine=function(){this.$dirty=!1;this.$pristine=!0;e.removeClass(pb).addClass(Ja)};
|
||||
this.$setViewValue=function(d){this.$viewValue=d;this.$pristine&&(this.$dirty=!0,this.$pristine=!1,e.removeClass(Ja).addClass(pb),k.$setDirty());q(this.$parsers,function(a){d=a(d)});this.$modelValue!==d&&(this.$modelValue=d,m(a,d),q(this.$viewChangeListeners,function(a){try{a()}catch(d){c(d)}}))};var p=this;a.$watch(function(){var c=h(a);if(p.$modelValue!==c){var d=p.$formatters,e=d.length;for(p.$modelValue=c;e--;)c=d[e](c);p.$viewValue!==c&&(p.$viewValue=c,p.$render())}return c})}],de=function(){return{require:["ngModel",
|
||||
"^?form"],controller:ce,link:function(a,c,d,e){var g=e[0],f=e[1]||ob;f.$addControl(g);a.$on("$destroy",function(){f.$removeControl(g)})}}},ee=$({require:"ngModel",link:function(a,c,d,e){e.$viewChangeListeners.push(function(){a.$eval(d.ngChange)})}}),Nc=function(){return{require:"?ngModel",link:function(a,c,d,e){if(e){d.required=!0;var g=function(a){if(d.required&&e.$isEmpty(a))e.$setValidity("required",!1);else return e.$setValidity("required",!0),a};e.$formatters.push(g);e.$parsers.unshift(g);d.$observe("required",
|
||||
function(){g(e.$viewValue)})}}}},fe=function(){return{require:"ngModel",link:function(a,c,d,e){var g=(a=/\/(.*)\//.exec(d.ngList))&&RegExp(a[1])||d.ngList||",";e.$parsers.push(function(a){if(!z(a)){var c=[];a&&q(a.split(g),function(a){a&&c.push(ba(a))});return c}});e.$formatters.push(function(a){return K(a)?a.join(", "):r});e.$isEmpty=function(a){return!a||!a.length}}}},ge=/^(true|false|\d+)$/,he=function(){return{priority:100,compile:function(a,c){return ge.test(c.ngValue)?function(a,c,g){g.$set("value",
|
||||
a.$eval(g.ngValue))}:function(a,c,g){a.$watch(g.ngValue,function(a){g.$set("value",a)})}}}},ie=ta(function(a,c,d){c.addClass("ng-binding").data("$binding",d.ngBind);a.$watch(d.ngBind,function(a){c.text(a==r?"":a)})}),je=["$interpolate",function(a){return function(c,d,e){c=a(d.attr(e.$attr.ngBindTemplate));d.addClass("ng-binding").data("$binding",c);e.$observe("ngBindTemplate",function(a){d.text(a)})}}],ke=["$sce","$parse",function(a,c){return function(d,e,g){e.addClass("ng-binding").data("$binding",
|
||||
g.ngBindHtml);var f=c(g.ngBindHtml);d.$watch(function(){return(f(d)||"").toString()},function(c){e.html(a.getTrustedHtml(f(d))||"")})}}],le=Nb("",!0),me=Nb("Odd",0),ne=Nb("Even",1),oe=ta({compile:function(a,c){c.$set("ngCloak",r);a.removeClass("ng-cloak")}}),pe=[function(){return{scope:!0,controller:"@",priority:500}}],Oc={};q("click dblclick mousedown mouseup mouseover mouseout mousemove mouseenter mouseleave keydown keyup keypress submit focus blur copy cut paste".split(" "),function(a){var c=ma("ng-"+
|
||||
a);Oc[c]=["$parse",function(d){return{compile:function(e,g){var f=d(g[c]);return function(c,d,e){d.on(x(a),function(a){c.$apply(function(){f(c,{$event:a})})})}}}}]});var qe=["$animate",function(a){return{transclude:"element",priority:600,terminal:!0,restrict:"A",$$tlb:!0,link:function(c,d,e,g,f){var h,m;c.$watch(e.ngIf,function(g){Pa(g)?m||(m=c.$new(),f(m,function(c){c[c.length++]=Q.createComment(" end ngIf: "+e.ngIf+" ");h={clone:c};a.enter(c,d.parent(),d)})):(m&&(m.$destroy(),m=null),h&&(a.leave(wb(h.clone)),
|
||||
h=null))})}}}],re=["$http","$templateCache","$anchorScroll","$animate","$sce",function(a,c,d,e,g){return{restrict:"ECA",priority:400,terminal:!0,transclude:"element",controller:Ca.noop,compile:function(f,h){var m=h.ngInclude||h.src,k=h.onload||"",l=h.autoscroll;return function(f,h,q,r,y){var A=0,u,t,H=function(){u&&(u.$destroy(),u=null);t&&(e.leave(t),t=null)};f.$watch(g.parseAsResourceUrl(m),function(g){var m=function(){!B(l)||l&&!f.$eval(l)||d()},q=++A;g?(a.get(g,{cache:c}).success(function(a){if(q===
|
||||
A){var c=f.$new();r.template=a;a=y(c,function(a){H();e.enter(a,null,h,m)});u=c;t=a;u.$emit("$includeContentLoaded");f.$eval(k)}}).error(function(){q===A&&H()}),f.$emit("$includeContentRequested")):(H(),r.template=null)})}}}}],se=["$compile",function(a){return{restrict:"ECA",priority:-400,require:"ngInclude",link:function(c,d,e,g){d.html(g.template);a(d.contents())(c)}}}],te=ta({priority:450,compile:function(){return{pre:function(a,c,d){a.$eval(d.ngInit)}}}}),ue=ta({terminal:!0,priority:1E3}),ve=["$locale",
|
||||
"$interpolate",function(a,c){var d=/{}/g;return{restrict:"EA",link:function(e,g,f){var h=f.count,m=f.$attr.when&&g.attr(f.$attr.when),k=f.offset||0,l=e.$eval(m)||{},n={},p=c.startSymbol(),s=c.endSymbol(),r=/^when(Minus)?(.+)$/;q(f,function(a,c){r.test(c)&&(l[x(c.replace("when","").replace("Minus","-"))]=g.attr(f.$attr[c]))});q(l,function(a,e){n[e]=c(a.replace(d,p+h+"-"+k+s))});e.$watch(function(){var c=parseFloat(e.$eval(h));if(isNaN(c))return"";c in l||(c=a.pluralCat(c-k));return n[c](e,g,!0)},function(a){g.text(a)})}}}],
|
||||
we=["$parse","$animate",function(a,c){var d=F("ngRepeat");return{transclude:"element",priority:1E3,terminal:!0,$$tlb:!0,link:function(e,g,f,h,m){var k=f.ngRepeat,l=k.match(/^\s*([\s\S]+?)\s+in\s+([\s\S]+?)(?:\s+track\s+by\s+([\s\S]+?))?\s*$/),n,p,s,r,y,t,u={$id:Fa};if(!l)throw d("iexp",k);f=l[1];h=l[2];(l=l[3])?(n=a(l),p=function(a,c,d){t&&(u[t]=a);u[y]=c;u.$index=d;return n(e,u)}):(s=function(a,c){return Fa(c)},r=function(a){return a});l=f.match(/^(?:([\$\w]+)|\(([\$\w]+)\s*,\s*([\$\w]+)\))$/);if(!l)throw d("iidexp",
|
||||
f);y=l[3]||l[1];t=l[2];var B={};e.$watchCollection(h,function(a){var f,h,l=g[0],n,u={},z,P,D,x,T,w,F=[];if(rb(a))T=a,n=p||s;else{n=p||r;T=[];for(D in a)a.hasOwnProperty(D)&&"$"!=D.charAt(0)&&T.push(D);T.sort()}z=T.length;h=F.length=T.length;for(f=0;f<h;f++)if(D=a===T?f:T[f],x=a[D],x=n(D,x,f),xa(x,"`track by` id"),B.hasOwnProperty(x))w=B[x],delete B[x],u[x]=w,F[f]=w;else{if(u.hasOwnProperty(x))throw q(F,function(a){a&&a.scope&&(B[a.id]=a)}),d("dupes",k,x);F[f]={id:x};u[x]=!1}for(D in B)B.hasOwnProperty(D)&&
|
||||
(w=B[D],f=wb(w.clone),c.leave(f),q(f,function(a){a.$$NG_REMOVED=!0}),w.scope.$destroy());f=0;for(h=T.length;f<h;f++){D=a===T?f:T[f];x=a[D];w=F[f];F[f-1]&&(l=F[f-1].clone[F[f-1].clone.length-1]);if(w.scope){P=w.scope;n=l;do n=n.nextSibling;while(n&&n.$$NG_REMOVED);w.clone[0]!=n&&c.move(wb(w.clone),null,A(l));l=w.clone[w.clone.length-1]}else P=e.$new();P[y]=x;t&&(P[t]=D);P.$index=f;P.$first=0===f;P.$last=f===z-1;P.$middle=!(P.$first||P.$last);P.$odd=!(P.$even=0===(f&1));w.scope||m(P,function(a){a[a.length++]=
|
||||
Q.createComment(" end ngRepeat: "+k+" ");c.enter(a,null,A(l));l=a;w.scope=P;w.clone=a;u[w.id]=w})}B=u})}}}],xe=["$animate",function(a){return function(c,d,e){c.$watch(e.ngShow,function(c){a[Pa(c)?"removeClass":"addClass"](d,"ng-hide")})}}],ye=["$animate",function(a){return function(c,d,e){c.$watch(e.ngHide,function(c){a[Pa(c)?"addClass":"removeClass"](d,"ng-hide")})}}],ze=ta(function(a,c,d){a.$watch(d.ngStyle,function(a,d){d&&a!==d&&q(d,function(a,d){c.css(d,"")});a&&c.css(a)},!0)}),Ae=["$animate",
|
||||
function(a){return{restrict:"EA",require:"ngSwitch",controller:["$scope",function(){this.cases={}}],link:function(c,d,e,g){var f,h,m=[];c.$watch(e.ngSwitch||e.on,function(d){for(var l=0,n=m.length;l<n;l++)m[l].$destroy(),a.leave(h[l]);h=[];m=[];if(f=g.cases["!"+d]||g.cases["?"])c.$eval(e.change),q(f,function(d){var e=c.$new();m.push(e);d.transclude(e,function(c){var e=d.element;h.push(c);a.enter(c,e.parent(),e)})})})}}}],Be=ta({transclude:"element",priority:800,require:"^ngSwitch",link:function(a,
|
||||
c,d,e,g){e.cases["!"+d.ngSwitchWhen]=e.cases["!"+d.ngSwitchWhen]||[];e.cases["!"+d.ngSwitchWhen].push({transclude:g,element:c})}}),Ce=ta({transclude:"element",priority:800,require:"^ngSwitch",link:function(a,c,d,e,g){e.cases["?"]=e.cases["?"]||[];e.cases["?"].push({transclude:g,element:c})}}),De=ta({controller:["$element","$transclude",function(a,c){if(!c)throw F("ngTransclude")("orphan",ga(a));this.$transclude=c}],link:function(a,c,d,e){e.$transclude(function(a){c.empty();c.append(a)})}}),Ee=["$templateCache",
|
||||
function(a){return{restrict:"E",terminal:!0,compile:function(c,d){"text/ng-template"==d.type&&a.put(d.id,c[0].text)}}}],Fe=F("ngOptions"),Ge=$({terminal:!0}),He=["$compile","$parse",function(a,c){var d=/^\s*([\s\S]+?)(?:\s+as\s+([\s\S]+?))?(?:\s+group\s+by\s+([\s\S]+?))?\s+for\s+(?:([\$\w][\$\w]*)|(?:\(\s*([\$\w][\$\w]*)\s*,\s*([\$\w][\$\w]*)\s*\)))\s+in\s+([\s\S]+?)(?:\s+track\s+by\s+([\s\S]+?))?$/,e={$setViewValue:w};return{restrict:"E",require:["select","?ngModel"],controller:["$element","$scope",
|
||||
"$attrs",function(a,c,d){var m=this,k={},l=e,n;m.databound=d.ngModel;m.init=function(a,c,d){l=a;n=d};m.addOption=function(c){xa(c,'"option value"');k[c]=!0;l.$viewValue==c&&(a.val(c),n.parent()&&n.remove())};m.removeOption=function(a){this.hasOption(a)&&(delete k[a],l.$viewValue==a&&this.renderUnknownOption(a))};m.renderUnknownOption=function(c){c="? "+Fa(c)+" ?";n.val(c);a.prepend(n);a.val(c);n.prop("selected",!0)};m.hasOption=function(a){return k.hasOwnProperty(a)};c.$on("$destroy",function(){m.renderUnknownOption=
|
||||
w})}],link:function(e,f,h,m){function k(a,c,d,e){d.$render=function(){var a=d.$viewValue;e.hasOption(a)?(x.parent()&&x.remove(),c.val(a),""===a&&w.prop("selected",!0)):z(a)&&w?c.val(""):e.renderUnknownOption(a)};c.on("change",function(){a.$apply(function(){x.parent()&&x.remove();d.$setViewValue(c.val())})})}function l(a,c,d){var e;d.$render=function(){var a=new Ta(d.$viewValue);q(c.find("option"),function(c){c.selected=B(a.get(c.value))})};a.$watch(function(){ua(e,d.$viewValue)||(e=aa(d.$viewValue),
|
||||
d.$render())});c.on("change",function(){a.$apply(function(){var a=[];q(c.find("option"),function(c){c.selected&&a.push(c.value)});d.$setViewValue(a)})})}function n(e,f,g){function h(){var a={"":[]},c=[""],d,k,r,t,v;t=g.$modelValue;v=A(e)||[];var C=n?Pb(v):v,F,I,z;I={};r=!1;var E,H;if(s)if(w&&K(t))for(r=new Ta([]),z=0;z<t.length;z++)I[m]=t[z],r.put(w(e,I),t[z]);else r=new Ta(t);for(z=0;F=C.length,z<F;z++){k=z;if(n){k=C[z];if("$"===k.charAt(0))continue;I[n]=k}I[m]=v[k];d=p(e,I)||"";(k=a[d])||(k=a[d]=
|
||||
[],c.push(d));s?d=B(r.remove(w?w(e,I):q(e,I))):(w?(d={},d[m]=t,d=w(e,d)===w(e,I)):d=t===q(e,I),r=r||d);E=l(e,I);E=B(E)?E:"";k.push({id:w?w(e,I):n?C[z]:z,label:E,selected:d})}s||(y||null===t?a[""].unshift({id:"",label:"",selected:!r}):r||a[""].unshift({id:"?",label:"",selected:!0}));I=0;for(C=c.length;I<C;I++){d=c[I];k=a[d];x.length<=I?(t={element:D.clone().attr("label",d),label:k.label},v=[t],x.push(v),f.append(t.element)):(v=x[I],t=v[0],t.label!=d&&t.element.attr("label",t.label=d));E=null;z=0;for(F=
|
||||
k.length;z<F;z++)r=k[z],(d=v[z+1])?(E=d.element,d.label!==r.label&&E.text(d.label=r.label),d.id!==r.id&&E.val(d.id=r.id),E[0].selected!==r.selected&&E.prop("selected",d.selected=r.selected)):(""===r.id&&y?H=y:(H=u.clone()).val(r.id).attr("selected",r.selected).text(r.label),v.push({element:H,label:r.label,id:r.id,selected:r.selected}),E?E.after(H):t.element.append(H),E=H);for(z++;v.length>z;)v.pop().element.remove()}for(;x.length>I;)x.pop()[0].element.remove()}var k;if(!(k=t.match(d)))throw Fe("iexp",
|
||||
t,ga(f));var l=c(k[2]||k[1]),m=k[4]||k[6],n=k[5],p=c(k[3]||""),q=c(k[2]?k[1]:m),A=c(k[7]),w=k[8]?c(k[8]):null,x=[[{element:f,label:""}]];y&&(a(y)(e),y.removeClass("ng-scope"),y.remove());f.empty();f.on("change",function(){e.$apply(function(){var a,c=A(e)||[],d={},h,k,l,p,t,u,v;if(s)for(k=[],p=0,u=x.length;p<u;p++)for(a=x[p],l=1,t=a.length;l<t;l++){if((h=a[l].element)[0].selected){h=h.val();n&&(d[n]=h);if(w)for(v=0;v<c.length&&(d[m]=c[v],w(e,d)!=h);v++);else d[m]=c[h];k.push(q(e,d))}}else if(h=f.val(),
|
||||
"?"==h)k=r;else if(""===h)k=null;else if(w)for(v=0;v<c.length;v++){if(d[m]=c[v],w(e,d)==h){k=q(e,d);break}}else d[m]=c[h],n&&(d[n]=h),k=q(e,d);g.$setViewValue(k)})});g.$render=h;e.$watch(h)}if(m[1]){var p=m[0];m=m[1];var s=h.multiple,t=h.ngOptions,y=!1,w,u=A(Q.createElement("option")),D=A(Q.createElement("optgroup")),x=u.clone();h=0;for(var v=f.children(),F=v.length;h<F;h++)if(""===v[h].value){w=y=v.eq(h);break}p.init(m,y,x);s&&(m.$isEmpty=function(a){return!a||0===a.length});t?n(e,f,m):s?l(e,f,m):
|
||||
k(e,f,m,p)}}}}],Ie=["$interpolate",function(a){var c={addOption:w,removeOption:w};return{restrict:"E",priority:100,compile:function(d,e){if(z(e.value)){var g=a(d.text(),!0);g||e.$set("value",d.text())}return function(a,d,e){var k=d.parent(),l=k.data("$selectController")||k.parent().data("$selectController");l&&l.databound?d.prop("selected",!1):l=c;g?a.$watch(g,function(a,c){e.$set("value",a);a!==c&&l.removeOption(c);l.addOption(a)}):l.addOption(e.value);d.on("$destroy",function(){l.removeOption(e.value)})}}}}],
|
||||
Je=$({restrict:"E",terminal:!0});(Da=Z.jQuery)?(A=Da,t(Da.fn,{scope:Ga.scope,isolateScope:Ga.isolateScope,controller:Ga.controller,injector:Ga.injector,inheritedData:Ga.inheritedData}),xb("remove",!0,!0,!1),xb("empty",!1,!1,!1),xb("html",!1,!1,!0)):A=O;Ca.element=A;(function(a){t(a,{bootstrap:Zb,copy:aa,extend:t,equals:ua,element:A,forEach:q,injector:$b,noop:w,bind:cb,toJson:qa,fromJson:Vb,identity:Ba,isUndefined:z,isDefined:B,isString:D,isFunction:L,isObject:X,isNumber:sb,isElement:Qc,isArray:K,
|
||||
version:Sd,isDate:La,lowercase:x,uppercase:Ia,callbacks:{counter:0},$$minErr:F,$$csp:Ub});Va=Vc(Z);try{Va("ngLocale")}catch(c){Va("ngLocale",[]).provider("$locale",sd)}Va("ng",["ngLocale"],["$provide",function(a){a.provider({$$sanitizeUri:Cd});a.provider("$compile",jc).directive({a:Xd,input:Mc,textarea:Mc,form:Yd,script:Ee,select:He,style:Je,option:Ie,ngBind:ie,ngBindHtml:ke,ngBindTemplate:je,ngClass:le,ngClassEven:ne,ngClassOdd:me,ngCloak:oe,ngController:pe,ngForm:Zd,ngHide:ye,ngIf:qe,ngInclude:re,
|
||||
ngInit:te,ngNonBindable:ue,ngPluralize:ve,ngRepeat:we,ngShow:xe,ngStyle:ze,ngSwitch:Ae,ngSwitchWhen:Be,ngSwitchDefault:Ce,ngOptions:Ge,ngTransclude:De,ngModel:de,ngList:fe,ngChange:ee,required:Nc,ngRequired:Nc,ngValue:he}).directive({ngInclude:se}).directive(Ob).directive(Oc);a.provider({$anchorScroll:dd,$animate:Ud,$browser:fd,$cacheFactory:gd,$controller:jd,$document:kd,$exceptionHandler:ld,$filter:Bc,$interpolate:qd,$interval:rd,$http:md,$httpBackend:od,$location:ud,$log:vd,$parse:yd,$rootScope:Bd,
|
||||
$q:zd,$sce:Fd,$sceDelegate:Ed,$sniffer:Gd,$templateCache:hd,$timeout:Hd,$window:Id})}])})(Ca);A(Q).ready(function(){Tc(Q,Zb)})})(window,document);!angular.$$csp()&&angular.element(document).find("head").prepend('<style type="text/css">@charset "UTF-8";[ng\\:cloak],[ng-cloak],[data-ng-cloak],[x-ng-cloak],.ng-cloak,.x-ng-cloak,.ng-hide{display:none !important;}ng\\:form{display:block;}</style>');
|
||||
//# sourceMappingURL=angular.min.js.map
|
BIN
src/bower_components/angular/angular.min.js.gzip
vendored
Normal file
BIN
src/bower_components/angular/angular.min.js.gzip
vendored
Normal file
Binary file not shown.
8
src/bower_components/angular/angular.min.js.map
vendored
Normal file
8
src/bower_components/angular/angular.min.js.map
vendored
Normal file
File diff suppressed because one or more lines are too long
7
src/bower_components/angular/bower.json
vendored
Normal file
7
src/bower_components/angular/bower.json
vendored
Normal file
|
@ -0,0 +1,7 @@
|
|||
{
|
||||
"name": "angular",
|
||||
"version": "1.2.10",
|
||||
"main": "./angular.js",
|
||||
"dependencies": {
|
||||
}
|
||||
}
|
35
src/bower_components/d3/.bower.json
vendored
Normal file
35
src/bower_components/d3/.bower.json
vendored
Normal file
|
@ -0,0 +1,35 @@
|
|||
{
|
||||
"name": "d3",
|
||||
"version": "3.4.1",
|
||||
"main": "d3.js",
|
||||
"scripts": [
|
||||
"d3.js"
|
||||
],
|
||||
"ignore": [
|
||||
".DS_Store",
|
||||
".git",
|
||||
".gitignore",
|
||||
".npmignore",
|
||||
".travis.yml",
|
||||
"Makefile",
|
||||
"bin",
|
||||
"component.json",
|
||||
"index.js",
|
||||
"lib",
|
||||
"node_modules",
|
||||
"package.json",
|
||||
"src",
|
||||
"test"
|
||||
],
|
||||
"homepage": "https://github.com/mbostock/d3",
|
||||
"_release": "3.4.1",
|
||||
"_resolution": {
|
||||
"type": "version",
|
||||
"tag": "v3.4.1",
|
||||
"commit": "3315e73d3a132513461b2a6e8ea2e2aff27de684"
|
||||
},
|
||||
"_source": "git://github.com/mbostock/d3.git",
|
||||
"_target": "~3.4.1",
|
||||
"_originalSource": "d3",
|
||||
"_direct": true
|
||||
}
|
25
src/bower_components/d3/CONTRIBUTING.md
vendored
Normal file
25
src/bower_components/d3/CONTRIBUTING.md
vendored
Normal file
|
@ -0,0 +1,25 @@
|
|||
# Contributing
|
||||
|
||||
If you’re looking for ways to contribute, please [peruse open issues](https://github.com/mbostock/d3/issues?milestone=&page=1&state=open). The icebox is a good place to find ideas that are not currently in development. If you already have an idea, please check past issues to see whether your idea or a similar one was previously discussed.
|
||||
|
||||
Before submitting a pull request, consider implementing a live example first, say using [bl.ocks.org](http://bl.ocks.org). Real-world use cases go a long way to demonstrating the usefulness of a proposed feature. The more complex a feature’s implementation, the more usefulness it should provide. Share your demo using the #d3js tag on Twitter or by sending it to the d3-js Google group.
|
||||
|
||||
If your proposed feature does not involve changing core functionality, consider submitting it instead as a [D3 plugin](https://github.com/d3/d3-plugins). New core features should be for general use, whereas plugins are suitable for more specialized use cases. When in doubt, it’s easier to start with a plugin before “graduating” to core.
|
||||
|
||||
To contribute new documentation or add examples to the gallery, just [edit the Wiki](https://github.com/mbostock/d3/wiki)!
|
||||
|
||||
## How to Submit a Pull Request
|
||||
|
||||
1. Click the “Fork” button to create your personal fork of the D3 repository.
|
||||
|
||||
2. After cloning your fork of the D3 repository in the terminal, run `npm install` to install D3’s dependencies.
|
||||
|
||||
3. Create a new branch for your new feature. For example: `git checkout -b my-awesome-feature`. A dedicated branch for your pull request means you can develop multiple features at the same time, and ensures that your pull request is stable even if you later decide to develop an unrelated feature.
|
||||
|
||||
4. The `d3.js` and `d3.min.js` files are built from source files in the `src` directory. _Do not edit `d3.js` directly._ Instead, edit the source files, and then run `make` to build the generated files.
|
||||
|
||||
5. Use `make test` to run tests and verify your changes. If you are adding a new feature, you should add new tests! If you are changing existing functionality, make sure the existing tests run, or update them as appropriate.
|
||||
|
||||
6. Sign D3’s [Individual Contributor License Agreement](https://docs.google.com/forms/d/1CzjdBKtDuA8WeuFJinadx956xLQ4Xriv7-oDvXnZMaI/viewform). Unless you are submitting a trivial patch (such as fixing a typo), this form is needed to verify that you are able to contribute.
|
||||
|
||||
7. Submit your pull request, and good luck!
|
26
src/bower_components/d3/LICENSE
vendored
Normal file
26
src/bower_components/d3/LICENSE
vendored
Normal file
|
@ -0,0 +1,26 @@
|
|||
Copyright (c) 2013, Michael Bostock
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use 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.
|
||||
|
||||
* The name Michael Bostock may not be used to endorse or promote products
|
||||
derived from this software without specific prior written permission.
|
||||
|
||||
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 MICHAEL BOSTOCK 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.
|
9
src/bower_components/d3/README.md
vendored
Normal file
9
src/bower_components/d3/README.md
vendored
Normal file
|
@ -0,0 +1,9 @@
|
|||
# Data-Driven Documents
|
||||
|
||||
<a href="http://d3js.org"><img src="http://d3js.org/logo.svg" align="left" hspace="10" vspace="6"></a>
|
||||
|
||||
**D3.js** is a JavaScript library for manipulating documents based on data. **D3** helps you bring data to life using HTML, SVG and CSS. D3’s emphasis on web standards gives you the full capabilities of modern browsers without tying yourself to a proprietary framework, combining powerful visualization components and a data-driven approach to DOM manipulation.
|
||||
|
||||
Want to learn more? [See the wiki.](https://github.com/mbostock/d3/wiki)
|
||||
|
||||
For examples, [see the gallery](https://github.com/mbostock/d3/wiki/Gallery) and [mbostock’s bl.ocks](http://bl.ocks.org/mbostock).
|
24
src/bower_components/d3/bower.json
vendored
Normal file
24
src/bower_components/d3/bower.json
vendored
Normal file
|
@ -0,0 +1,24 @@
|
|||
{
|
||||
"name": "d3",
|
||||
"version": "3.4.1",
|
||||
"main": "d3.js",
|
||||
"scripts": [
|
||||
"d3.js"
|
||||
],
|
||||
"ignore": [
|
||||
".DS_Store",
|
||||
".git",
|
||||
".gitignore",
|
||||
".npmignore",
|
||||
".travis.yml",
|
||||
"Makefile",
|
||||
"bin",
|
||||
"component.json",
|
||||
"index.js",
|
||||
"lib",
|
||||
"node_modules",
|
||||
"package.json",
|
||||
"src",
|
||||
"test"
|
||||
]
|
||||
}
|
9274
src/bower_components/d3/d3.js
vendored
Normal file
9274
src/bower_components/d3/d3.js
vendored
Normal file
File diff suppressed because it is too large
Load diff
5
src/bower_components/d3/d3.min.js
vendored
Normal file
5
src/bower_components/d3/d3.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
25
src/bower_components/elasticsearch/.bower.json
vendored
Normal file
25
src/bower_components/elasticsearch/.bower.json
vendored
Normal file
|
@ -0,0 +1,25 @@
|
|||
{
|
||||
"name": "elasticsearch",
|
||||
"version": "1.4.0",
|
||||
"authors": [
|
||||
"Spencer Alger <spencer@spenceralger.com>"
|
||||
],
|
||||
"description": "The official low-level Elasticsearch client, for use in the browser.",
|
||||
"main": "elasticsearch.js",
|
||||
"keywords": [
|
||||
"elasticsearch",
|
||||
"client"
|
||||
],
|
||||
"license": "Apache 2.0",
|
||||
"homepage": "https://github.com/elasticsearch/bower-elasticsearch-js",
|
||||
"_release": "1.4.0",
|
||||
"_resolution": {
|
||||
"type": "version",
|
||||
"tag": "v1.4.0",
|
||||
"commit": "06dd8305a937d996d81a2dccff238f69cd6ce47a"
|
||||
},
|
||||
"_source": "git://github.com/elasticsearch/bower-elasticsearch-js.git",
|
||||
"_target": "~1.4.0",
|
||||
"_originalSource": "elasticsearch",
|
||||
"_direct": true
|
||||
}
|
50
src/bower_components/elasticsearch/README.md
vendored
Normal file
50
src/bower_components/elasticsearch/README.md
vendored
Normal file
|
@ -0,0 +1,50 @@
|
|||
# elasticsearch
|
||||
|
||||
Elasticsearch client builds for bower.
|
||||
|
||||
# Install
|
||||
|
||||
Install with `bower`
|
||||
```
|
||||
bower install elasticsearch
|
||||
```
|
||||
|
||||
Add a `<script>` to your html file and off you go!:
|
||||
```
|
||||
<script src="/bower_components/elasticsearch/elasticsearch.js"></script>
|
||||
<script>
|
||||
var client = elasticsearch.Client({
|
||||
host: 'localhost:9200'
|
||||
});
|
||||
</script>
|
||||
```
|
||||
|
||||
## If you are using Angular
|
||||
Use `elasticsearch.angular.js` instead. This will create an `elasticsearch` module with an `esFactory` that you can use.
|
||||
```
|
||||
/*
|
||||
* create your app module, specify "elasticsearch" as a dependency
|
||||
*/
|
||||
var app = angular.module('myApp', ['elasticsearch']);
|
||||
|
||||
/*
|
||||
* create a service, which provides your elasticsearch client
|
||||
* to other parts of your application
|
||||
*/
|
||||
app.service('es', function (esFactory) {
|
||||
return esFactory({
|
||||
host: 'localhost:9200',
|
||||
// ...
|
||||
});
|
||||
});
|
||||
```
|
||||
|
||||
## If you are using jQuery
|
||||
Use elasticsearch.jquery.js` instead. Rather than a global `elasticsearch` it will create a `jQuery.es` namespace.
|
||||
```
|
||||
var client = new $.es.Client({
|
||||
hosts: 'localhost:9200'
|
||||
});
|
||||
```
|
||||
|
||||
# Submit Issues, Pull Requests, etc to [elasticsearch-js](https://github.com/elasticsearch/elasticsearch-js).
|
14
src/bower_components/elasticsearch/bower.json
vendored
Normal file
14
src/bower_components/elasticsearch/bower.json
vendored
Normal file
|
@ -0,0 +1,14 @@
|
|||
{
|
||||
"name": "elasticsearch",
|
||||
"version": "1.4.0",
|
||||
"authors": [
|
||||
"Spencer Alger <spencer@spenceralger.com>"
|
||||
],
|
||||
"description": "The official low-level Elasticsearch client, for use in the browser.",
|
||||
"main": "elasticsearch.js",
|
||||
"keywords": [
|
||||
"elasticsearch",
|
||||
"client"
|
||||
],
|
||||
"license": "Apache 2.0"
|
||||
}
|
24182
src/bower_components/elasticsearch/elasticsearch.angular.js
vendored
Normal file
24182
src/bower_components/elasticsearch/elasticsearch.angular.js
vendored
Normal file
File diff suppressed because it is too large
Load diff
9
src/bower_components/elasticsearch/elasticsearch.angular.min.js
vendored
Normal file
9
src/bower_components/elasticsearch/elasticsearch.angular.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
24197
src/bower_components/elasticsearch/elasticsearch.jquery.js
vendored
Normal file
24197
src/bower_components/elasticsearch/elasticsearch.jquery.js
vendored
Normal file
File diff suppressed because it is too large
Load diff
9
src/bower_components/elasticsearch/elasticsearch.jquery.min.js
vendored
Normal file
9
src/bower_components/elasticsearch/elasticsearch.jquery.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
25157
src/bower_components/elasticsearch/elasticsearch.js
vendored
Normal file
25157
src/bower_components/elasticsearch/elasticsearch.js
vendored
Normal file
File diff suppressed because it is too large
Load diff
9
src/bower_components/elasticsearch/elasticsearch.min.js
vendored
Normal file
9
src/bower_components/elasticsearch/elasticsearch.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
21
src/bower_components/jquery/.bower.json
vendored
Normal file
21
src/bower_components/jquery/.bower.json
vendored
Normal file
|
@ -0,0 +1,21 @@
|
|||
{
|
||||
"name": "jquery",
|
||||
"version": "2.1.0",
|
||||
"description": "jQuery component",
|
||||
"keywords": [
|
||||
"jquery",
|
||||
"component"
|
||||
],
|
||||
"main": "jquery.js",
|
||||
"license": "MIT",
|
||||
"homepage": "https://github.com/components/jquery",
|
||||
"_release": "2.1.0",
|
||||
"_resolution": {
|
||||
"type": "version",
|
||||
"tag": "2.1.0",
|
||||
"commit": "099ad075783a6189f13c1e742e03f9cc95654a27"
|
||||
},
|
||||
"_source": "git://github.com/components/jquery.git",
|
||||
"_target": ">= 1.9.0",
|
||||
"_originalSource": "jquery"
|
||||
}
|
1
src/bower_components/jquery/.gitignore
vendored
Normal file
1
src/bower_components/jquery/.gitignore
vendored
Normal file
|
@ -0,0 +1 @@
|
|||
build
|
11
src/bower_components/jquery/README.md
vendored
Normal file
11
src/bower_components/jquery/README.md
vendored
Normal file
|
@ -0,0 +1,11 @@
|
|||
jQuery Component
|
||||
================
|
||||
|
||||
Shim [repository](https://github.com/components/jquery) for the [jQuery](http://jquery.com).
|
||||
|
||||
Package Managers
|
||||
----------------
|
||||
|
||||
* [Bower](http://bower.io/): `jquery`
|
||||
* [Component](https://github.com/component/component): `components/jquery`
|
||||
* [Composer](http://packagist.org/packages/components/jquery): `components/jquery`
|
11
src/bower_components/jquery/bower.json
vendored
Normal file
11
src/bower_components/jquery/bower.json
vendored
Normal file
|
@ -0,0 +1,11 @@
|
|||
{
|
||||
"name": "jquery",
|
||||
"version": "2.1.0",
|
||||
"description": "jQuery component",
|
||||
"keywords": [
|
||||
"jquery",
|
||||
"component"
|
||||
],
|
||||
"main": "jquery.js",
|
||||
"license": "MIT"
|
||||
}
|
15
src/bower_components/jquery/component.json
vendored
Normal file
15
src/bower_components/jquery/component.json
vendored
Normal file
|
@ -0,0 +1,15 @@
|
|||
{
|
||||
"name": "jquery",
|
||||
"repo": "components/jquery",
|
||||
"version": "2.1.0",
|
||||
"description": "jQuery component",
|
||||
"keywords": [
|
||||
"jquery",
|
||||
"component"
|
||||
],
|
||||
"main": "jquery.js",
|
||||
"scripts": [
|
||||
"jquery.js"
|
||||
],
|
||||
"license": "MIT"
|
||||
}
|
36
src/bower_components/jquery/composer.json
vendored
Normal file
36
src/bower_components/jquery/composer.json
vendored
Normal file
|
@ -0,0 +1,36 @@
|
|||
{
|
||||
"name": "components/jquery",
|
||||
"description": "jQuery JavaScript Library",
|
||||
"type": "component",
|
||||
"homepage": "http://jquery.com",
|
||||
"license": "MIT",
|
||||
"support": {
|
||||
"irc": "irc://irc.freenode.org/jquery",
|
||||
"issues": "http://bugs.jquery.com",
|
||||
"forum": "http://forum.jquery.com",
|
||||
"wiki": "http://docs.jquery.com/",
|
||||
"source": "https://github.com/jquery/jquery"
|
||||
},
|
||||
"authors": [
|
||||
{
|
||||
"name": "John Resig",
|
||||
"email": "jeresig@gmail.com"
|
||||
}
|
||||
],
|
||||
"require": {
|
||||
"robloach/component-installer": "*"
|
||||
},
|
||||
"extra": {
|
||||
"component": {
|
||||
"scripts": [
|
||||
"jquery.js"
|
||||
],
|
||||
"files": [
|
||||
"jquery.min.js",
|
||||
"jquery.min.map",
|
||||
"jquery-migrate.js",
|
||||
"jquery-migrate.min.js"
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
521
src/bower_components/jquery/jquery-migrate.js
vendored
Normal file
521
src/bower_components/jquery/jquery-migrate.js
vendored
Normal file
|
@ -0,0 +1,521 @@
|
|||
/*!
|
||||
* jQuery Migrate - v1.2.1 - 2013-05-08
|
||||
* https://github.com/jquery/jquery-migrate
|
||||
* Copyright 2005, 2013 jQuery Foundation, Inc. and other contributors; Licensed MIT
|
||||
*/
|
||||
(function( jQuery, window, undefined ) {
|
||||
// See http://bugs.jquery.com/ticket/13335
|
||||
// "use strict";
|
||||
|
||||
|
||||
var warnedAbout = {};
|
||||
|
||||
// List of warnings already given; public read only
|
||||
jQuery.migrateWarnings = [];
|
||||
|
||||
// Set to true to prevent console output; migrateWarnings still maintained
|
||||
// jQuery.migrateMute = false;
|
||||
|
||||
// Show a message on the console so devs know we're active
|
||||
if ( !jQuery.migrateMute && window.console && window.console.log ) {
|
||||
window.console.log("JQMIGRATE: Logging is active");
|
||||
}
|
||||
|
||||
// Set to false to disable traces that appear with warnings
|
||||
if ( jQuery.migrateTrace === undefined ) {
|
||||
jQuery.migrateTrace = true;
|
||||
}
|
||||
|
||||
// Forget any warnings we've already given; public
|
||||
jQuery.migrateReset = function() {
|
||||
warnedAbout = {};
|
||||
jQuery.migrateWarnings.length = 0;
|
||||
};
|
||||
|
||||
function migrateWarn( msg) {
|
||||
var console = window.console;
|
||||
if ( !warnedAbout[ msg ] ) {
|
||||
warnedAbout[ msg ] = true;
|
||||
jQuery.migrateWarnings.push( msg );
|
||||
if ( console && console.warn && !jQuery.migrateMute ) {
|
||||
console.warn( "JQMIGRATE: " + msg );
|
||||
if ( jQuery.migrateTrace && console.trace ) {
|
||||
console.trace();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function migrateWarnProp( obj, prop, value, msg ) {
|
||||
if ( Object.defineProperty ) {
|
||||
// On ES5 browsers (non-oldIE), warn if the code tries to get prop;
|
||||
// allow property to be overwritten in case some other plugin wants it
|
||||
try {
|
||||
Object.defineProperty( obj, prop, {
|
||||
configurable: true,
|
||||
enumerable: true,
|
||||
get: function() {
|
||||
migrateWarn( msg );
|
||||
return value;
|
||||
},
|
||||
set: function( newValue ) {
|
||||
migrateWarn( msg );
|
||||
value = newValue;
|
||||
}
|
||||
});
|
||||
return;
|
||||
} catch( err ) {
|
||||
// IE8 is a dope about Object.defineProperty, can't warn there
|
||||
}
|
||||
}
|
||||
|
||||
// Non-ES5 (or broken) browser; just set the property
|
||||
jQuery._definePropertyBroken = true;
|
||||
obj[ prop ] = value;
|
||||
}
|
||||
|
||||
if ( document.compatMode === "BackCompat" ) {
|
||||
// jQuery has never supported or tested Quirks Mode
|
||||
migrateWarn( "jQuery is not compatible with Quirks Mode" );
|
||||
}
|
||||
|
||||
|
||||
var attrFn = jQuery( "<input/>", { size: 1 } ).attr("size") && jQuery.attrFn,
|
||||
oldAttr = jQuery.attr,
|
||||
valueAttrGet = jQuery.attrHooks.value && jQuery.attrHooks.value.get ||
|
||||
function() { return null; },
|
||||
valueAttrSet = jQuery.attrHooks.value && jQuery.attrHooks.value.set ||
|
||||
function() { return undefined; },
|
||||
rnoType = /^(?:input|button)$/i,
|
||||
rnoAttrNodeType = /^[238]$/,
|
||||
rboolean = /^(?:autofocus|autoplay|async|checked|controls|defer|disabled|hidden|loop|multiple|open|readonly|required|scoped|selected)$/i,
|
||||
ruseDefault = /^(?:checked|selected)$/i;
|
||||
|
||||
// jQuery.attrFn
|
||||
migrateWarnProp( jQuery, "attrFn", attrFn || {}, "jQuery.attrFn is deprecated" );
|
||||
|
||||
jQuery.attr = function( elem, name, value, pass ) {
|
||||
var lowerName = name.toLowerCase(),
|
||||
nType = elem && elem.nodeType;
|
||||
|
||||
if ( pass ) {
|
||||
// Since pass is used internally, we only warn for new jQuery
|
||||
// versions where there isn't a pass arg in the formal params
|
||||
if ( oldAttr.length < 4 ) {
|
||||
migrateWarn("jQuery.fn.attr( props, pass ) is deprecated");
|
||||
}
|
||||
if ( elem && !rnoAttrNodeType.test( nType ) &&
|
||||
(attrFn ? name in attrFn : jQuery.isFunction(jQuery.fn[name])) ) {
|
||||
return jQuery( elem )[ name ]( value );
|
||||
}
|
||||
}
|
||||
|
||||
// Warn if user tries to set `type`, since it breaks on IE 6/7/8; by checking
|
||||
// for disconnected elements we don't warn on $( "<button>", { type: "button" } ).
|
||||
if ( name === "type" && value !== undefined && rnoType.test( elem.nodeName ) && elem.parentNode ) {
|
||||
migrateWarn("Can't change the 'type' of an input or button in IE 6/7/8");
|
||||
}
|
||||
|
||||
// Restore boolHook for boolean property/attribute synchronization
|
||||
if ( !jQuery.attrHooks[ lowerName ] && rboolean.test( lowerName ) ) {
|
||||
jQuery.attrHooks[ lowerName ] = {
|
||||
get: function( elem, name ) {
|
||||
// Align boolean attributes with corresponding properties
|
||||
// Fall back to attribute presence where some booleans are not supported
|
||||
var attrNode,
|
||||
property = jQuery.prop( elem, name );
|
||||
return property === true || typeof property !== "boolean" &&
|
||||
( attrNode = elem.getAttributeNode(name) ) && attrNode.nodeValue !== false ?
|
||||
|
||||
name.toLowerCase() :
|
||||
undefined;
|
||||
},
|
||||
set: function( elem, value, name ) {
|
||||
var propName;
|
||||
if ( value === false ) {
|
||||
// Remove boolean attributes when set to false
|
||||
jQuery.removeAttr( elem, name );
|
||||
} else {
|
||||
// value is true since we know at this point it's type boolean and not false
|
||||
// Set boolean attributes to the same name and set the DOM property
|
||||
propName = jQuery.propFix[ name ] || name;
|
||||
if ( propName in elem ) {
|
||||
// Only set the IDL specifically if it already exists on the element
|
||||
elem[ propName ] = true;
|
||||
}
|
||||
|
||||
elem.setAttribute( name, name.toLowerCase() );
|
||||
}
|
||||
return name;
|
||||
}
|
||||
};
|
||||
|
||||
// Warn only for attributes that can remain distinct from their properties post-1.9
|
||||
if ( ruseDefault.test( lowerName ) ) {
|
||||
migrateWarn( "jQuery.fn.attr('" + lowerName + "') may use property instead of attribute" );
|
||||
}
|
||||
}
|
||||
|
||||
return oldAttr.call( jQuery, elem, name, value );
|
||||
};
|
||||
|
||||
// attrHooks: value
|
||||
jQuery.attrHooks.value = {
|
||||
get: function( elem, name ) {
|
||||
var nodeName = ( elem.nodeName || "" ).toLowerCase();
|
||||
if ( nodeName === "button" ) {
|
||||
return valueAttrGet.apply( this, arguments );
|
||||
}
|
||||
if ( nodeName !== "input" && nodeName !== "option" ) {
|
||||
migrateWarn("jQuery.fn.attr('value') no longer gets properties");
|
||||
}
|
||||
return name in elem ?
|
||||
elem.value :
|
||||
null;
|
||||
},
|
||||
set: function( elem, value ) {
|
||||
var nodeName = ( elem.nodeName || "" ).toLowerCase();
|
||||
if ( nodeName === "button" ) {
|
||||
return valueAttrSet.apply( this, arguments );
|
||||
}
|
||||
if ( nodeName !== "input" && nodeName !== "option" ) {
|
||||
migrateWarn("jQuery.fn.attr('value', val) no longer sets properties");
|
||||
}
|
||||
// Does not return so that setAttribute is also used
|
||||
elem.value = value;
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
var matched, browser,
|
||||
oldInit = jQuery.fn.init,
|
||||
oldParseJSON = jQuery.parseJSON,
|
||||
// Note: XSS check is done below after string is trimmed
|
||||
rquickExpr = /^([^<]*)(<[\w\W]+>)([^>]*)$/;
|
||||
|
||||
// $(html) "looks like html" rule change
|
||||
jQuery.fn.init = function( selector, context, rootjQuery ) {
|
||||
var match;
|
||||
|
||||
if ( selector && typeof selector === "string" && !jQuery.isPlainObject( context ) &&
|
||||
(match = rquickExpr.exec( jQuery.trim( selector ) )) && match[ 0 ] ) {
|
||||
// This is an HTML string according to the "old" rules; is it still?
|
||||
if ( selector.charAt( 0 ) !== "<" ) {
|
||||
migrateWarn("$(html) HTML strings must start with '<' character");
|
||||
}
|
||||
if ( match[ 3 ] ) {
|
||||
migrateWarn("$(html) HTML text after last tag is ignored");
|
||||
}
|
||||
// Consistently reject any HTML-like string starting with a hash (#9521)
|
||||
// Note that this may break jQuery 1.6.x code that otherwise would work.
|
||||
if ( match[ 0 ].charAt( 0 ) === "#" ) {
|
||||
migrateWarn("HTML string cannot start with a '#' character");
|
||||
jQuery.error("JQMIGRATE: Invalid selector string (XSS)");
|
||||
}
|
||||
// Now process using loose rules; let pre-1.8 play too
|
||||
if ( context && context.context ) {
|
||||
// jQuery object as context; parseHTML expects a DOM object
|
||||
context = context.context;
|
||||
}
|
||||
if ( jQuery.parseHTML ) {
|
||||
return oldInit.call( this, jQuery.parseHTML( match[ 2 ], context, true ),
|
||||
context, rootjQuery );
|
||||
}
|
||||
}
|
||||
return oldInit.apply( this, arguments );
|
||||
};
|
||||
jQuery.fn.init.prototype = jQuery.fn;
|
||||
|
||||
// Let $.parseJSON(falsy_value) return null
|
||||
jQuery.parseJSON = function( json ) {
|
||||
if ( !json && json !== null ) {
|
||||
migrateWarn("jQuery.parseJSON requires a valid JSON string");
|
||||
return null;
|
||||
}
|
||||
return oldParseJSON.apply( this, arguments );
|
||||
};
|
||||
|
||||
jQuery.uaMatch = function( ua ) {
|
||||
ua = ua.toLowerCase();
|
||||
|
||||
var match = /(chrome)[ \/]([\w.]+)/.exec( ua ) ||
|
||||
/(webkit)[ \/]([\w.]+)/.exec( ua ) ||
|
||||
/(opera)(?:.*version|)[ \/]([\w.]+)/.exec( ua ) ||
|
||||
/(msie) ([\w.]+)/.exec( ua ) ||
|
||||
ua.indexOf("compatible") < 0 && /(mozilla)(?:.*? rv:([\w.]+)|)/.exec( ua ) ||
|
||||
[];
|
||||
|
||||
return {
|
||||
browser: match[ 1 ] || "",
|
||||
version: match[ 2 ] || "0"
|
||||
};
|
||||
};
|
||||
|
||||
// Don't clobber any existing jQuery.browser in case it's different
|
||||
if ( !jQuery.browser ) {
|
||||
matched = jQuery.uaMatch( navigator.userAgent );
|
||||
browser = {};
|
||||
|
||||
if ( matched.browser ) {
|
||||
browser[ matched.browser ] = true;
|
||||
browser.version = matched.version;
|
||||
}
|
||||
|
||||
// Chrome is Webkit, but Webkit is also Safari.
|
||||
if ( browser.chrome ) {
|
||||
browser.webkit = true;
|
||||
} else if ( browser.webkit ) {
|
||||
browser.safari = true;
|
||||
}
|
||||
|
||||
jQuery.browser = browser;
|
||||
}
|
||||
|
||||
// Warn if the code tries to get jQuery.browser
|
||||
migrateWarnProp( jQuery, "browser", jQuery.browser, "jQuery.browser is deprecated" );
|
||||
|
||||
jQuery.sub = function() {
|
||||
function jQuerySub( selector, context ) {
|
||||
return new jQuerySub.fn.init( selector, context );
|
||||
}
|
||||
jQuery.extend( true, jQuerySub, this );
|
||||
jQuerySub.superclass = this;
|
||||
jQuerySub.fn = jQuerySub.prototype = this();
|
||||
jQuerySub.fn.constructor = jQuerySub;
|
||||
jQuerySub.sub = this.sub;
|
||||
jQuerySub.fn.init = function init( selector, context ) {
|
||||
if ( context && context instanceof jQuery && !(context instanceof jQuerySub) ) {
|
||||
context = jQuerySub( context );
|
||||
}
|
||||
|
||||
return jQuery.fn.init.call( this, selector, context, rootjQuerySub );
|
||||
};
|
||||
jQuerySub.fn.init.prototype = jQuerySub.fn;
|
||||
var rootjQuerySub = jQuerySub(document);
|
||||
migrateWarn( "jQuery.sub() is deprecated" );
|
||||
return jQuerySub;
|
||||
};
|
||||
|
||||
|
||||
// Ensure that $.ajax gets the new parseJSON defined in core.js
|
||||
jQuery.ajaxSetup({
|
||||
converters: {
|
||||
"text json": jQuery.parseJSON
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
var oldFnData = jQuery.fn.data;
|
||||
|
||||
jQuery.fn.data = function( name ) {
|
||||
var ret, evt,
|
||||
elem = this[0];
|
||||
|
||||
// Handles 1.7 which has this behavior and 1.8 which doesn't
|
||||
if ( elem && name === "events" && arguments.length === 1 ) {
|
||||
ret = jQuery.data( elem, name );
|
||||
evt = jQuery._data( elem, name );
|
||||
if ( ( ret === undefined || ret === evt ) && evt !== undefined ) {
|
||||
migrateWarn("Use of jQuery.fn.data('events') is deprecated");
|
||||
return evt;
|
||||
}
|
||||
}
|
||||
return oldFnData.apply( this, arguments );
|
||||
};
|
||||
|
||||
|
||||
var rscriptType = /\/(java|ecma)script/i,
|
||||
oldSelf = jQuery.fn.andSelf || jQuery.fn.addBack;
|
||||
|
||||
jQuery.fn.andSelf = function() {
|
||||
migrateWarn("jQuery.fn.andSelf() replaced by jQuery.fn.addBack()");
|
||||
return oldSelf.apply( this, arguments );
|
||||
};
|
||||
|
||||
// Since jQuery.clean is used internally on older versions, we only shim if it's missing
|
||||
if ( !jQuery.clean ) {
|
||||
jQuery.clean = function( elems, context, fragment, scripts ) {
|
||||
// Set context per 1.8 logic
|
||||
context = context || document;
|
||||
context = !context.nodeType && context[0] || context;
|
||||
context = context.ownerDocument || context;
|
||||
|
||||
migrateWarn("jQuery.clean() is deprecated");
|
||||
|
||||
var i, elem, handleScript, jsTags,
|
||||
ret = [];
|
||||
|
||||
jQuery.merge( ret, jQuery.buildFragment( elems, context ).childNodes );
|
||||
|
||||
// Complex logic lifted directly from jQuery 1.8
|
||||
if ( fragment ) {
|
||||
// Special handling of each script element
|
||||
handleScript = function( elem ) {
|
||||
// Check if we consider it executable
|
||||
if ( !elem.type || rscriptType.test( elem.type ) ) {
|
||||
// Detach the script and store it in the scripts array (if provided) or the fragment
|
||||
// Return truthy to indicate that it has been handled
|
||||
return scripts ?
|
||||
scripts.push( elem.parentNode ? elem.parentNode.removeChild( elem ) : elem ) :
|
||||
fragment.appendChild( elem );
|
||||
}
|
||||
};
|
||||
|
||||
for ( i = 0; (elem = ret[i]) != null; i++ ) {
|
||||
// Check if we're done after handling an executable script
|
||||
if ( !( jQuery.nodeName( elem, "script" ) && handleScript( elem ) ) ) {
|
||||
// Append to fragment and handle embedded scripts
|
||||
fragment.appendChild( elem );
|
||||
if ( typeof elem.getElementsByTagName !== "undefined" ) {
|
||||
// handleScript alters the DOM, so use jQuery.merge to ensure snapshot iteration
|
||||
jsTags = jQuery.grep( jQuery.merge( [], elem.getElementsByTagName("script") ), handleScript );
|
||||
|
||||
// Splice the scripts into ret after their former ancestor and advance our index beyond them
|
||||
ret.splice.apply( ret, [i + 1, 0].concat( jsTags ) );
|
||||
i += jsTags.length;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return ret;
|
||||
};
|
||||
}
|
||||
|
||||
var eventAdd = jQuery.event.add,
|
||||
eventRemove = jQuery.event.remove,
|
||||
eventTrigger = jQuery.event.trigger,
|
||||
oldToggle = jQuery.fn.toggle,
|
||||
oldLive = jQuery.fn.live,
|
||||
oldDie = jQuery.fn.die,
|
||||
ajaxEvents = "ajaxStart|ajaxStop|ajaxSend|ajaxComplete|ajaxError|ajaxSuccess",
|
||||
rajaxEvent = new RegExp( "\\b(?:" + ajaxEvents + ")\\b" ),
|
||||
rhoverHack = /(?:^|\s)hover(\.\S+|)\b/,
|
||||
hoverHack = function( events ) {
|
||||
if ( typeof( events ) !== "string" || jQuery.event.special.hover ) {
|
||||
return events;
|
||||
}
|
||||
if ( rhoverHack.test( events ) ) {
|
||||
migrateWarn("'hover' pseudo-event is deprecated, use 'mouseenter mouseleave'");
|
||||
}
|
||||
return events && events.replace( rhoverHack, "mouseenter$1 mouseleave$1" );
|
||||
};
|
||||
|
||||
// Event props removed in 1.9, put them back if needed; no practical way to warn them
|
||||
if ( jQuery.event.props && jQuery.event.props[ 0 ] !== "attrChange" ) {
|
||||
jQuery.event.props.unshift( "attrChange", "attrName", "relatedNode", "srcElement" );
|
||||
}
|
||||
|
||||
// Undocumented jQuery.event.handle was "deprecated" in jQuery 1.7
|
||||
if ( jQuery.event.dispatch ) {
|
||||
migrateWarnProp( jQuery.event, "handle", jQuery.event.dispatch, "jQuery.event.handle is undocumented and deprecated" );
|
||||
}
|
||||
|
||||
// Support for 'hover' pseudo-event and ajax event warnings
|
||||
jQuery.event.add = function( elem, types, handler, data, selector ){
|
||||
if ( elem !== document && rajaxEvent.test( types ) ) {
|
||||
migrateWarn( "AJAX events should be attached to document: " + types );
|
||||
}
|
||||
eventAdd.call( this, elem, hoverHack( types || "" ), handler, data, selector );
|
||||
};
|
||||
jQuery.event.remove = function( elem, types, handler, selector, mappedTypes ){
|
||||
eventRemove.call( this, elem, hoverHack( types ) || "", handler, selector, mappedTypes );
|
||||
};
|
||||
|
||||
jQuery.fn.error = function() {
|
||||
var args = Array.prototype.slice.call( arguments, 0);
|
||||
migrateWarn("jQuery.fn.error() is deprecated");
|
||||
args.splice( 0, 0, "error" );
|
||||
if ( arguments.length ) {
|
||||
return this.bind.apply( this, args );
|
||||
}
|
||||
// error event should not bubble to window, although it does pre-1.7
|
||||
this.triggerHandler.apply( this, args );
|
||||
return this;
|
||||
};
|
||||
|
||||
jQuery.fn.toggle = function( fn, fn2 ) {
|
||||
|
||||
// Don't mess with animation or css toggles
|
||||
if ( !jQuery.isFunction( fn ) || !jQuery.isFunction( fn2 ) ) {
|
||||
return oldToggle.apply( this, arguments );
|
||||
}
|
||||
migrateWarn("jQuery.fn.toggle(handler, handler...) is deprecated");
|
||||
|
||||
// Save reference to arguments for access in closure
|
||||
var args = arguments,
|
||||
guid = fn.guid || jQuery.guid++,
|
||||
i = 0,
|
||||
toggler = function( event ) {
|
||||
// Figure out which function to execute
|
||||
var lastToggle = ( jQuery._data( this, "lastToggle" + fn.guid ) || 0 ) % i;
|
||||
jQuery._data( this, "lastToggle" + fn.guid, lastToggle + 1 );
|
||||
|
||||
// Make sure that clicks stop
|
||||
event.preventDefault();
|
||||
|
||||
// and execute the function
|
||||
return args[ lastToggle ].apply( this, arguments ) || false;
|
||||
};
|
||||
|
||||
// link all the functions, so any of them can unbind this click handler
|
||||
toggler.guid = guid;
|
||||
while ( i < args.length ) {
|
||||
args[ i++ ].guid = guid;
|
||||
}
|
||||
|
||||
return this.click( toggler );
|
||||
};
|
||||
|
||||
jQuery.fn.live = function( types, data, fn ) {
|
||||
migrateWarn("jQuery.fn.live() is deprecated");
|
||||
if ( oldLive ) {
|
||||
return oldLive.apply( this, arguments );
|
||||
}
|
||||
jQuery( this.context ).on( types, this.selector, data, fn );
|
||||
return this;
|
||||
};
|
||||
|
||||
jQuery.fn.die = function( types, fn ) {
|
||||
migrateWarn("jQuery.fn.die() is deprecated");
|
||||
if ( oldDie ) {
|
||||
return oldDie.apply( this, arguments );
|
||||
}
|
||||
jQuery( this.context ).off( types, this.selector || "**", fn );
|
||||
return this;
|
||||
};
|
||||
|
||||
// Turn global events into document-triggered events
|
||||
jQuery.event.trigger = function( event, data, elem, onlyHandlers ){
|
||||
if ( !elem && !rajaxEvent.test( event ) ) {
|
||||
migrateWarn( "Global events are undocumented and deprecated" );
|
||||
}
|
||||
return eventTrigger.call( this, event, data, elem || document, onlyHandlers );
|
||||
};
|
||||
jQuery.each( ajaxEvents.split("|"),
|
||||
function( _, name ) {
|
||||
jQuery.event.special[ name ] = {
|
||||
setup: function() {
|
||||
var elem = this;
|
||||
|
||||
// The document needs no shimming; must be !== for oldIE
|
||||
if ( elem !== document ) {
|
||||
jQuery.event.add( document, name + "." + jQuery.guid, function() {
|
||||
jQuery.event.trigger( name, null, elem, true );
|
||||
});
|
||||
jQuery._data( this, name, jQuery.guid++ );
|
||||
}
|
||||
return false;
|
||||
},
|
||||
teardown: function() {
|
||||
if ( this !== document ) {
|
||||
jQuery.event.remove( document, name + "." + jQuery._data( this, name ) );
|
||||
}
|
||||
return false;
|
||||
}
|
||||
};
|
||||
}
|
||||
);
|
||||
|
||||
|
||||
})( jQuery, window );
|
2
src/bower_components/jquery/jquery-migrate.min.js
vendored
Normal file
2
src/bower_components/jquery/jquery-migrate.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
9111
src/bower_components/jquery/jquery.js
vendored
Normal file
9111
src/bower_components/jquery/jquery.js
vendored
Normal file
File diff suppressed because it is too large
Load diff
4
src/bower_components/jquery/jquery.min.js
vendored
Normal file
4
src/bower_components/jquery/jquery.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
1
src/bower_components/jquery/jquery.min.map
vendored
Normal file
1
src/bower_components/jquery/jquery.min.map
vendored
Normal file
File diff suppressed because one or more lines are too long
7
src/bower_components/jquery/package.json
vendored
Normal file
7
src/bower_components/jquery/package.json
vendored
Normal file
|
@ -0,0 +1,7 @@
|
|||
{
|
||||
"name": "components-jquery",
|
||||
"version": "2.1.0",
|
||||
"description": "jQuery component",
|
||||
"keywords": ["jquery"],
|
||||
"main": "./jquery.js"
|
||||
}
|
34
src/bower_components/lodash/.bower.json
vendored
Normal file
34
src/bower_components/lodash/.bower.json
vendored
Normal file
|
@ -0,0 +1,34 @@
|
|||
{
|
||||
"name": "lodash",
|
||||
"version": "2.4.1",
|
||||
"main": "dist/lodash.compat.js",
|
||||
"ignore": [
|
||||
".*",
|
||||
"*.custom.*",
|
||||
"*.template.*",
|
||||
"*.map",
|
||||
"*.md",
|
||||
"/*.min.*",
|
||||
"/lodash.js",
|
||||
"index.js",
|
||||
"component.json",
|
||||
"package.json",
|
||||
"doc",
|
||||
"modularize",
|
||||
"node_modules",
|
||||
"perf",
|
||||
"test",
|
||||
"vendor"
|
||||
],
|
||||
"homepage": "https://github.com/lodash/lodash",
|
||||
"_release": "2.4.1",
|
||||
"_resolution": {
|
||||
"type": "version",
|
||||
"tag": "2.4.1",
|
||||
"commit": "c7aa842eded639d6d90a5714d3195a8802c86687"
|
||||
},
|
||||
"_source": "git://github.com/lodash/lodash.git",
|
||||
"_target": "~2.4.1",
|
||||
"_originalSource": "lodash",
|
||||
"_direct": true
|
||||
}
|
22
src/bower_components/lodash/LICENSE.txt
vendored
Normal file
22
src/bower_components/lodash/LICENSE.txt
vendored
Normal file
|
@ -0,0 +1,22 @@
|
|||
Copyright 2012-2013 The Dojo Foundation <http://dojofoundation.org/>
|
||||
Based on Underscore.js 1.5.2, copyright 2009-2013 Jeremy Ashkenas,
|
||||
DocumentCloud and Investigative Reporters & Editors <http://underscorejs.org/>
|
||||
|
||||
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.
|
23
src/bower_components/lodash/bower.json
vendored
Normal file
23
src/bower_components/lodash/bower.json
vendored
Normal file
|
@ -0,0 +1,23 @@
|
|||
{
|
||||
"name": "lodash",
|
||||
"version": "2.4.1",
|
||||
"main": "dist/lodash.compat.js",
|
||||
"ignore": [
|
||||
".*",
|
||||
"*.custom.*",
|
||||
"*.template.*",
|
||||
"*.map",
|
||||
"*.md",
|
||||
"/*.min.*",
|
||||
"/lodash.js",
|
||||
"index.js",
|
||||
"component.json",
|
||||
"package.json",
|
||||
"doc",
|
||||
"modularize",
|
||||
"node_modules",
|
||||
"perf",
|
||||
"test",
|
||||
"vendor"
|
||||
]
|
||||
}
|
7157
src/bower_components/lodash/dist/lodash.compat.js
vendored
Normal file
7157
src/bower_components/lodash/dist/lodash.compat.js
vendored
Normal file
File diff suppressed because it is too large
Load diff
61
src/bower_components/lodash/dist/lodash.compat.min.js
vendored
Normal file
61
src/bower_components/lodash/dist/lodash.compat.min.js
vendored
Normal file
|
@ -0,0 +1,61 @@
|
|||
/**
|
||||
* @license
|
||||
* Lo-Dash 2.4.1 (Custom Build) lodash.com/license | Underscore.js 1.5.2 underscorejs.org/LICENSE
|
||||
* Build: `lodash -o ./dist/lodash.compat.js`
|
||||
*/
|
||||
;(function(){function n(n,t,e){e=(e||0)-1;for(var r=n?n.length:0;++e<r;)if(n[e]===t)return e;return-1}function t(t,e){var r=typeof e;if(t=t.l,"boolean"==r||null==e)return t[e]?0:-1;"number"!=r&&"string"!=r&&(r="object");var u="number"==r?e:b+e;return t=(t=t[r])&&t[u],"object"==r?t&&-1<n(t,e)?0:-1:t?0:-1}function e(n){var t=this.l,e=typeof n;if("boolean"==e||null==n)t[n]=true;else{"number"!=e&&"string"!=e&&(e="object");var r="number"==e?n:b+n,t=t[e]||(t[e]={});"object"==e?(t[r]||(t[r]=[])).push(n):t[r]=true
|
||||
}}function r(n){return n.charCodeAt(0)}function u(n,t){for(var e=n.m,r=t.m,u=-1,o=e.length;++u<o;){var a=e[u],i=r[u];if(a!==i){if(a>i||typeof a=="undefined")return 1;if(a<i||typeof i=="undefined")return-1}}return n.n-t.n}function o(n){var t=-1,r=n.length,u=n[0],o=n[r/2|0],a=n[r-1];if(u&&typeof u=="object"&&o&&typeof o=="object"&&a&&typeof a=="object")return false;for(u=l(),u["false"]=u["null"]=u["true"]=u.undefined=false,o=l(),o.k=n,o.l=u,o.push=e;++t<r;)o.push(n[t]);return o}function a(n){return"\\"+Y[n]
|
||||
}function i(){return v.pop()||[]}function l(){return y.pop()||{k:null,l:null,m:null,"false":false,n:0,"null":false,number:null,object:null,push:null,string:null,"true":false,undefined:false,o:null}}function f(n){return typeof n.toString!="function"&&typeof(n+"")=="string"}function c(n){n.length=0,v.length<w&&v.push(n)}function p(n){var t=n.l;t&&p(t),n.k=n.l=n.m=n.object=n.number=n.string=n.o=null,y.length<w&&y.push(n)}function s(n,t,e){t||(t=0),typeof e=="undefined"&&(e=n?n.length:0);var r=-1;e=e-t||0;for(var u=Array(0>e?0:e);++r<e;)u[r]=n[t+r];
|
||||
return u}function g(e){function v(n){return n&&typeof n=="object"&&!qe(n)&&we.call(n,"__wrapped__")?n:new y(n)}function y(n,t){this.__chain__=!!t,this.__wrapped__=n}function w(n){function t(){if(r){var n=s(r);je.apply(n,arguments)}if(this instanceof t){var o=nt(e.prototype),n=e.apply(o,n||arguments);return xt(n)?n:o}return e.apply(u,n||arguments)}var e=n[0],r=n[2],u=n[4];return ze(t,n),t}function Y(n,t,e,r,u){if(e){var o=e(n);if(typeof o!="undefined")return o}if(!xt(n))return n;var a=he.call(n);if(!V[a]||!Le.nodeClass&&f(n))return n;
|
||||
var l=Te[a];switch(a){case L:case z:return new l(+n);case W:case M:return new l(n);case J:return o=l(n.source,S.exec(n)),o.lastIndex=n.lastIndex,o}if(a=qe(n),t){var p=!r;r||(r=i()),u||(u=i());for(var g=r.length;g--;)if(r[g]==n)return u[g];o=a?l(n.length):{}}else o=a?s(n):Ye({},n);return a&&(we.call(n,"index")&&(o.index=n.index),we.call(n,"input")&&(o.input=n.input)),t?(r.push(n),u.push(o),(a?Xe:tr)(n,function(n,a){o[a]=Y(n,t,e,r,u)}),p&&(c(r),c(u)),o):o}function nt(n){return xt(n)?Se(n):{}}function tt(n,t,e){if(typeof n!="function")return Ht;
|
||||
if(typeof t=="undefined"||!("prototype"in n))return n;var r=n.__bindData__;if(typeof r=="undefined"&&(Le.funcNames&&(r=!n.name),r=r||!Le.funcDecomp,!r)){var u=be.call(n);Le.funcNames||(r=!A.test(u)),r||(r=B.test(u),ze(n,r))}if(false===r||true!==r&&1&r[1])return n;switch(e){case 1:return function(e){return n.call(t,e)};case 2:return function(e,r){return n.call(t,e,r)};case 3:return function(e,r,u){return n.call(t,e,r,u)};case 4:return function(e,r,u,o){return n.call(t,e,r,u,o)}}return Mt(n,t)}function et(n){function t(){var n=l?a:this;
|
||||
if(u){var h=s(u);je.apply(h,arguments)}return(o||c)&&(h||(h=s(arguments)),o&&je.apply(h,o),c&&h.length<i)?(r|=16,et([e,p?r:-4&r,h,null,a,i])):(h||(h=arguments),f&&(e=n[g]),this instanceof t?(n=nt(e.prototype),h=e.apply(n,h),xt(h)?h:n):e.apply(n,h))}var e=n[0],r=n[1],u=n[2],o=n[3],a=n[4],i=n[5],l=1&r,f=2&r,c=4&r,p=8&r,g=e;return ze(t,n),t}function rt(e,r){var u=-1,a=ht(),i=e?e.length:0,l=i>=_&&a===n,f=[];if(l){var c=o(r);c?(a=t,r=c):l=false}for(;++u<i;)c=e[u],0>a(r,c)&&f.push(c);return l&&p(r),f}function ot(n,t,e,r){r=(r||0)-1;
|
||||
for(var u=n?n.length:0,o=[];++r<u;){var a=n[r];if(a&&typeof a=="object"&&typeof a.length=="number"&&(qe(a)||dt(a))){t||(a=ot(a,t,e));var i=-1,l=a.length,f=o.length;for(o.length+=l;++i<l;)o[f++]=a[i]}else e||o.push(a)}return o}function at(n,t,e,r,u,o){if(e){var a=e(n,t);if(typeof a!="undefined")return!!a}if(n===t)return 0!==n||1/n==1/t;if(n===n&&!(n&&X[typeof n]||t&&X[typeof t]))return false;if(null==n||null==t)return n===t;var l=he.call(n),p=he.call(t);if(l==T&&(l=G),p==T&&(p=G),l!=p)return false;switch(l){case L:case z:return+n==+t;
|
||||
case W:return n!=+n?t!=+t:0==n?1/n==1/t:n==+t;case J:case M:return n==ie(t)}if(p=l==$,!p){var s=we.call(n,"__wrapped__"),g=we.call(t,"__wrapped__");if(s||g)return at(s?n.__wrapped__:n,g?t.__wrapped__:t,e,r,u,o);if(l!=G||!Le.nodeClass&&(f(n)||f(t)))return false;if(l=!Le.argsObject&&dt(n)?oe:n.constructor,s=!Le.argsObject&&dt(t)?oe:t.constructor,l!=s&&!(jt(l)&&l instanceof l&&jt(s)&&s instanceof s)&&"constructor"in n&&"constructor"in t)return false}for(l=!u,u||(u=i()),o||(o=i()),s=u.length;s--;)if(u[s]==n)return o[s]==t;
|
||||
var h=0,a=true;if(u.push(n),o.push(t),p){if(s=n.length,h=t.length,(a=h==s)||r)for(;h--;)if(p=s,g=t[h],r)for(;p--&&!(a=at(n[p],g,e,r,u,o)););else if(!(a=at(n[h],g,e,r,u,o)))break}else nr(t,function(t,i,l){return we.call(l,i)?(h++,a=we.call(n,i)&&at(n[i],t,e,r,u,o)):void 0}),a&&!r&&nr(n,function(n,t,e){return we.call(e,t)?a=-1<--h:void 0});return u.pop(),o.pop(),l&&(c(u),c(o)),a}function it(n,t,e,r,u){(qe(t)?Dt:tr)(t,function(t,o){var a,i,l=t,f=n[o];if(t&&((i=qe(t))||er(t))){for(l=r.length;l--;)if(a=r[l]==t){f=u[l];
|
||||
break}if(!a){var c;e&&(l=e(f,t),c=typeof l!="undefined")&&(f=l),c||(f=i?qe(f)?f:[]:er(f)?f:{}),r.push(t),u.push(f),c||it(f,t,e,r,u)}}else e&&(l=e(f,t),typeof l=="undefined"&&(l=t)),typeof l!="undefined"&&(f=l);n[o]=f})}function lt(n,t){return n+de(Fe()*(t-n+1))}function ft(e,r,u){var a=-1,l=ht(),f=e?e.length:0,s=[],g=!r&&f>=_&&l===n,h=u||g?i():s;for(g&&(h=o(h),l=t);++a<f;){var v=e[a],y=u?u(v,a,e):v;(r?!a||h[h.length-1]!==y:0>l(h,y))&&((u||g)&&h.push(y),s.push(v))}return g?(c(h.k),p(h)):u&&c(h),s}function ct(n){return function(t,e,r){var u={};
|
||||
if(e=v.createCallback(e,r,3),qe(t)){r=-1;for(var o=t.length;++r<o;){var a=t[r];n(u,a,e(a,r,t),t)}}else Xe(t,function(t,r,o){n(u,t,e(t,r,o),o)});return u}}function pt(n,t,e,r,u,o){var a=1&t,i=4&t,l=16&t,f=32&t;if(!(2&t||jt(n)))throw new le;l&&!e.length&&(t&=-17,l=e=false),f&&!r.length&&(t&=-33,f=r=false);var c=n&&n.__bindData__;return c&&true!==c?(c=s(c),c[2]&&(c[2]=s(c[2])),c[3]&&(c[3]=s(c[3])),!a||1&c[1]||(c[4]=u),!a&&1&c[1]&&(t|=8),!i||4&c[1]||(c[5]=o),l&&je.apply(c[2]||(c[2]=[]),e),f&&Ee.apply(c[3]||(c[3]=[]),r),c[1]|=t,pt.apply(null,c)):(1==t||17===t?w:et)([n,t,e,r,u,o])
|
||||
}function st(){Q.h=F,Q.b=Q.c=Q.g=Q.i="",Q.e="t",Q.j=true;for(var n,t=0;n=arguments[t];t++)for(var e in n)Q[e]=n[e];t=Q.a,Q.d=/^[^,]+/.exec(t)[0],n=ee,t="return function("+t+"){",e=Q;var r="var n,t="+e.d+",E="+e.e+";if(!t)return E;"+e.i+";";e.b?(r+="var u=t.length;n=-1;if("+e.b+"){",Le.unindexedChars&&(r+="if(s(t)){t=t.split('')}"),r+="while(++n<u){"+e.g+";}}else{"):Le.nonEnumArgs&&(r+="var u=t.length;n=-1;if(u&&p(t)){while(++n<u){n+='';"+e.g+";}}else{"),Le.enumPrototypes&&(r+="var G=typeof t=='function';"),Le.enumErrorProps&&(r+="var F=t===k||t instanceof Error;");
|
||||
var u=[];if(Le.enumPrototypes&&u.push('!(G&&n=="prototype")'),Le.enumErrorProps&&u.push('!(F&&(n=="message"||n=="name"))'),e.j&&e.f)r+="var C=-1,D=B[typeof t]&&v(t),u=D?D.length:0;while(++C<u){n=D[C];",u.length&&(r+="if("+u.join("&&")+"){"),r+=e.g+";",u.length&&(r+="}"),r+="}";else if(r+="for(n in t){",e.j&&u.push("m.call(t, n)"),u.length&&(r+="if("+u.join("&&")+"){"),r+=e.g+";",u.length&&(r+="}"),r+="}",Le.nonEnumShadows){for(r+="if(t!==A){var i=t.constructor,r=t===(i&&i.prototype),f=t===J?I:t===k?j:L.call(t),x=y[f];",k=0;7>k;k++)r+="n='"+e.h[k]+"';if((!(r&&x[n])&&m.call(t,n))",e.j||(r+="||(!x[n]&&t[n]!==A[n])"),r+="){"+e.g+"}";
|
||||
r+="}"}return(e.b||Le.nonEnumArgs)&&(r+="}"),r+=e.c+";return E",n("d,j,k,m,o,p,q,s,v,A,B,y,I,J,L",t+r+"}")(tt,q,ce,we,d,dt,qe,kt,Q.f,pe,X,$e,M,se,he)}function gt(n){return Ve[n]}function ht(){var t=(t=v.indexOf)===zt?n:t;return t}function vt(n){return typeof n=="function"&&ve.test(n)}function yt(n){var t,e;return!n||he.call(n)!=G||(t=n.constructor,jt(t)&&!(t instanceof t))||!Le.argsClass&&dt(n)||!Le.nodeClass&&f(n)?false:Le.ownLast?(nr(n,function(n,t,r){return e=we.call(r,t),false}),false!==e):(nr(n,function(n,t){e=t
|
||||
}),typeof e=="undefined"||we.call(n,e))}function mt(n){return He[n]}function dt(n){return n&&typeof n=="object"&&typeof n.length=="number"&&he.call(n)==T||false}function bt(n,t,e){var r=We(n),u=r.length;for(t=tt(t,e,3);u--&&(e=r[u],false!==t(n[e],e,n)););return n}function _t(n){var t=[];return nr(n,function(n,e){jt(n)&&t.push(e)}),t.sort()}function wt(n){for(var t=-1,e=We(n),r=e.length,u={};++t<r;){var o=e[t];u[n[o]]=o}return u}function jt(n){return typeof n=="function"}function xt(n){return!(!n||!X[typeof n])
|
||||
}function Ct(n){return typeof n=="number"||n&&typeof n=="object"&&he.call(n)==W||false}function kt(n){return typeof n=="string"||n&&typeof n=="object"&&he.call(n)==M||false}function Et(n){for(var t=-1,e=We(n),r=e.length,u=Zt(r);++t<r;)u[t]=n[e[t]];return u}function Ot(n,t,e){var r=-1,u=ht(),o=n?n.length:0,a=false;return e=(0>e?Be(0,o+e):e)||0,qe(n)?a=-1<u(n,t,e):typeof o=="number"?a=-1<(kt(n)?n.indexOf(t,e):u(n,t,e)):Xe(n,function(n){return++r<e?void 0:!(a=n===t)}),a}function St(n,t,e){var r=true;if(t=v.createCallback(t,e,3),qe(n)){e=-1;
|
||||
for(var u=n.length;++e<u&&(r=!!t(n[e],e,n)););}else Xe(n,function(n,e,u){return r=!!t(n,e,u)});return r}function At(n,t,e){var r=[];if(t=v.createCallback(t,e,3),qe(n)){e=-1;for(var u=n.length;++e<u;){var o=n[e];t(o,e,n)&&r.push(o)}}else Xe(n,function(n,e,u){t(n,e,u)&&r.push(n)});return r}function It(n,t,e){if(t=v.createCallback(t,e,3),!qe(n)){var r;return Xe(n,function(n,e,u){return t(n,e,u)?(r=n,false):void 0}),r}e=-1;for(var u=n.length;++e<u;){var o=n[e];if(t(o,e,n))return o}}function Dt(n,t,e){if(t&&typeof e=="undefined"&&qe(n)){e=-1;
|
||||
for(var r=n.length;++e<r&&false!==t(n[e],e,n););}else Xe(n,t,e);return n}function Nt(n,t,e){var r=n,u=n?n.length:0;if(t=t&&typeof e=="undefined"?t:tt(t,e,3),qe(n))for(;u--&&false!==t(n[u],u,n););else{if(typeof u!="number")var o=We(n),u=o.length;else Le.unindexedChars&&kt(n)&&(r=n.split(""));Xe(n,function(n,e,a){return e=o?o[--u]:--u,t(r[e],e,a)})}return n}function Bt(n,t,e){var r=-1,u=n?n.length:0,o=Zt(typeof u=="number"?u:0);if(t=v.createCallback(t,e,3),qe(n))for(;++r<u;)o[r]=t(n[r],r,n);else Xe(n,function(n,e,u){o[++r]=t(n,e,u)
|
||||
});return o}function Pt(n,t,e){var u=-1/0,o=u;if(typeof t!="function"&&e&&e[t]===n&&(t=null),null==t&&qe(n)){e=-1;for(var a=n.length;++e<a;){var i=n[e];i>o&&(o=i)}}else t=null==t&&kt(n)?r:v.createCallback(t,e,3),Xe(n,function(n,e,r){e=t(n,e,r),e>u&&(u=e,o=n)});return o}function Rt(n,t,e,r){var u=3>arguments.length;if(t=v.createCallback(t,r,4),qe(n)){var o=-1,a=n.length;for(u&&(e=n[++o]);++o<a;)e=t(e,n[o],o,n)}else Xe(n,function(n,r,o){e=u?(u=false,n):t(e,n,r,o)});return e}function Ft(n,t,e,r){var u=3>arguments.length;
|
||||
return t=v.createCallback(t,r,4),Nt(n,function(n,r,o){e=u?(u=false,n):t(e,n,r,o)}),e}function Tt(n){var t=-1,e=n?n.length:0,r=Zt(typeof e=="number"?e:0);return Dt(n,function(n){var e=lt(0,++t);r[t]=r[e],r[e]=n}),r}function $t(n,t,e){var r;if(t=v.createCallback(t,e,3),qe(n)){e=-1;for(var u=n.length;++e<u&&!(r=t(n[e],e,n)););}else Xe(n,function(n,e,u){return!(r=t(n,e,u))});return!!r}function Lt(n,t,e){var r=0,u=n?n.length:0;if(typeof t!="number"&&null!=t){var o=-1;for(t=v.createCallback(t,e,3);++o<u&&t(n[o],o,n);)r++
|
||||
}else if(r=t,null==r||e)return n?n[0]:h;return s(n,0,Pe(Be(0,r),u))}function zt(t,e,r){if(typeof r=="number"){var u=t?t.length:0;r=0>r?Be(0,u+r):r||0}else if(r)return r=Kt(t,e),t[r]===e?r:-1;return n(t,e,r)}function qt(n,t,e){if(typeof t!="number"&&null!=t){var r=0,u=-1,o=n?n.length:0;for(t=v.createCallback(t,e,3);++u<o&&t(n[u],u,n);)r++}else r=null==t||e?1:Be(0,t);return s(n,r)}function Kt(n,t,e,r){var u=0,o=n?n.length:u;for(e=e?v.createCallback(e,r,1):Ht,t=e(t);u<o;)r=u+o>>>1,e(n[r])<t?u=r+1:o=r;
|
||||
return u}function Wt(n,t,e,r){return typeof t!="boolean"&&null!=t&&(r=e,e=typeof t!="function"&&r&&r[t]===n?null:t,t=false),null!=e&&(e=v.createCallback(e,r,3)),ft(n,t,e)}function Gt(){for(var n=1<arguments.length?arguments:arguments[0],t=-1,e=n?Pt(ar(n,"length")):0,r=Zt(0>e?0:e);++t<e;)r[t]=ar(n,t);return r}function Jt(n,t){var e=-1,r=n?n.length:0,u={};for(t||!r||qe(n[0])||(t=[]);++e<r;){var o=n[e];t?u[o]=t[e]:o&&(u[o[0]]=o[1])}return u}function Mt(n,t){return 2<arguments.length?pt(n,17,s(arguments,2),null,t):pt(n,1,null,null,t)
|
||||
}function Vt(n,t,e){var r,u,o,a,i,l,f,c=0,p=false,s=true;if(!jt(n))throw new le;if(t=Be(0,t)||0,true===e)var g=true,s=false;else xt(e)&&(g=e.leading,p="maxWait"in e&&(Be(t,e.maxWait)||0),s="trailing"in e?e.trailing:s);var v=function(){var e=t-(ir()-a);0<e?l=Ce(v,e):(u&&me(u),e=f,u=l=f=h,e&&(c=ir(),o=n.apply(i,r),l||u||(r=i=null)))},y=function(){l&&me(l),u=l=f=h,(s||p!==t)&&(c=ir(),o=n.apply(i,r),l||u||(r=i=null))};return function(){if(r=arguments,a=ir(),i=this,f=s&&(l||!g),false===p)var e=g&&!l;else{u||g||(c=a);
|
||||
var h=p-(a-c),m=0>=h;m?(u&&(u=me(u)),c=a,o=n.apply(i,r)):u||(u=Ce(y,h))}return m&&l?l=me(l):l||t===p||(l=Ce(v,t)),e&&(m=true,o=n.apply(i,r)),!m||l||u||(r=i=null),o}}function Ht(n){return n}function Ut(n,t,e){var r=true,u=t&&_t(t);t&&(e||u.length)||(null==e&&(e=t),o=y,t=n,n=v,u=_t(t)),false===e?r=false:xt(e)&&"chain"in e&&(r=e.chain);var o=n,a=jt(o);Dt(u,function(e){var u=n[e]=t[e];a&&(o.prototype[e]=function(){var t=this.__chain__,e=this.__wrapped__,a=[e];if(je.apply(a,arguments),a=u.apply(n,a),r||t){if(e===a&&xt(a))return this;
|
||||
a=new o(a),a.__chain__=t}return a})})}function Qt(){}function Xt(n){return function(t){return t[n]}}function Yt(){return this.__wrapped__}e=e?ut.defaults(Z.Object(),e,ut.pick(Z,R)):Z;var Zt=e.Array,ne=e.Boolean,te=e.Date,ee=e.Function,re=e.Math,ue=e.Number,oe=e.Object,ae=e.RegExp,ie=e.String,le=e.TypeError,fe=[],ce=e.Error.prototype,pe=oe.prototype,se=ie.prototype,ge=e._,he=pe.toString,ve=ae("^"+ie(he).replace(/[.*+?^${}()|[\]\\]/g,"\\$&").replace(/toString| for [^\]]+/g,".*?")+"$"),ye=re.ceil,me=e.clearTimeout,de=re.floor,be=ee.prototype.toString,_e=vt(_e=oe.getPrototypeOf)&&_e,we=pe.hasOwnProperty,je=fe.push,xe=pe.propertyIsEnumerable,Ce=e.setTimeout,ke=fe.splice,Ee=fe.unshift,Oe=function(){try{var n={},t=vt(t=oe.defineProperty)&&t,e=t(n,n,n)&&t
|
||||
}catch(r){}return e}(),Se=vt(Se=oe.create)&&Se,Ae=vt(Ae=Zt.isArray)&&Ae,Ie=e.isFinite,De=e.isNaN,Ne=vt(Ne=oe.keys)&&Ne,Be=re.max,Pe=re.min,Re=e.parseInt,Fe=re.random,Te={};Te[$]=Zt,Te[L]=ne,Te[z]=te,Te[K]=ee,Te[G]=oe,Te[W]=ue,Te[J]=ae,Te[M]=ie;var $e={};$e[$]=$e[z]=$e[W]={constructor:true,toLocaleString:true,toString:true,valueOf:true},$e[L]=$e[M]={constructor:true,toString:true,valueOf:true},$e[q]=$e[K]=$e[J]={constructor:true,toString:true},$e[G]={constructor:true},function(){for(var n=F.length;n--;){var t,e=F[n];
|
||||
for(t in $e)we.call($e,t)&&!we.call($e[t],e)&&($e[t][e]=false)}}(),y.prototype=v.prototype;var Le=v.support={};!function(){var n=function(){this.x=1},t={0:1,length:1},r=[];n.prototype={valueOf:1,y:1};for(var u in new n)r.push(u);for(u in arguments);Le.argsClass=he.call(arguments)==T,Le.argsObject=arguments.constructor==oe&&!(arguments instanceof Zt),Le.enumErrorProps=xe.call(ce,"message")||xe.call(ce,"name"),Le.enumPrototypes=xe.call(n,"prototype"),Le.funcDecomp=!vt(e.WinRTError)&&B.test(g),Le.funcNames=typeof ee.name=="string",Le.nonEnumArgs=0!=u,Le.nonEnumShadows=!/valueOf/.test(r),Le.ownLast="x"!=r[0],Le.spliceObjects=(fe.splice.call(t,0,1),!t[0]),Le.unindexedChars="xx"!="x"[0]+oe("x")[0];
|
||||
try{Le.nodeClass=!(he.call(document)==G&&!({toString:0}+""))}catch(o){Le.nodeClass=true}}(1),v.templateSettings={escape:/<%-([\s\S]+?)%>/g,evaluate:/<%([\s\S]+?)%>/g,interpolate:I,variable:"",imports:{_:v}},Se||(nt=function(){function n(){}return function(t){if(xt(t)){n.prototype=t;var r=new n;n.prototype=null}return r||e.Object()}}());var ze=Oe?function(n,t){U.value=t,Oe(n,"__bindData__",U)}:Qt;Le.argsClass||(dt=function(n){return n&&typeof n=="object"&&typeof n.length=="number"&&we.call(n,"callee")&&!xe.call(n,"callee")||false
|
||||
});var qe=Ae||function(n){return n&&typeof n=="object"&&typeof n.length=="number"&&he.call(n)==$||false},Ke=st({a:"z",e:"[]",i:"if(!(B[typeof z]))return E",g:"E.push(n)"}),We=Ne?function(n){return xt(n)?Le.enumPrototypes&&typeof n=="function"||Le.nonEnumArgs&&n.length&&dt(n)?Ke(n):Ne(n):[]}:Ke,Ge={a:"g,e,K",i:"e=e&&typeof K=='undefined'?e:d(e,K,3)",b:"typeof u=='number'",v:We,g:"if(e(t[n],n,g)===false)return E"},Je={a:"z,H,l",i:"var a=arguments,b=0,c=typeof l=='number'?2:a.length;while(++b<c){t=a[b];if(t&&B[typeof t]){",v:We,g:"if(typeof E[n]=='undefined')E[n]=t[n]",c:"}}"},Me={i:"if(!B[typeof t])return E;"+Ge.i,b:false},Ve={"&":"&","<":"<",">":">",'"':""","'":"'"},He=wt(Ve),Ue=ae("("+We(He).join("|")+")","g"),Qe=ae("["+We(Ve).join("")+"]","g"),Xe=st(Ge),Ye=st(Je,{i:Je.i.replace(";",";if(c>3&&typeof a[c-2]=='function'){var e=d(a[--c-1],a[c--],2)}else if(c>2&&typeof a[c-1]=='function'){e=a[--c]}"),g:"E[n]=e?e(E[n],t[n]):t[n]"}),Ze=st(Je),nr=st(Ge,Me,{j:false}),tr=st(Ge,Me);
|
||||
jt(/x/)&&(jt=function(n){return typeof n=="function"&&he.call(n)==K});var er=_e?function(n){if(!n||he.call(n)!=G||!Le.argsClass&&dt(n))return false;var t=n.valueOf,e=vt(t)&&(e=_e(t))&&_e(e);return e?n==e||_e(n)==e:yt(n)}:yt,rr=ct(function(n,t,e){we.call(n,e)?n[e]++:n[e]=1}),ur=ct(function(n,t,e){(we.call(n,e)?n[e]:n[e]=[]).push(t)}),or=ct(function(n,t,e){n[e]=t}),ar=Bt,ir=vt(ir=te.now)&&ir||function(){return(new te).getTime()},lr=8==Re(j+"08")?Re:function(n,t){return Re(kt(n)?n.replace(D,""):n,t||0)};
|
||||
return v.after=function(n,t){if(!jt(t))throw new le;return function(){return 1>--n?t.apply(this,arguments):void 0}},v.assign=Ye,v.at=function(n){var t=arguments,e=-1,r=ot(t,true,false,1),t=t[2]&&t[2][t[1]]===n?1:r.length,u=Zt(t);for(Le.unindexedChars&&kt(n)&&(n=n.split(""));++e<t;)u[e]=n[r[e]];return u},v.bind=Mt,v.bindAll=function(n){for(var t=1<arguments.length?ot(arguments,true,false,1):_t(n),e=-1,r=t.length;++e<r;){var u=t[e];n[u]=pt(n[u],1,null,null,n)}return n},v.bindKey=function(n,t){return 2<arguments.length?pt(t,19,s(arguments,2),null,n):pt(t,3,null,null,n)
|
||||
},v.chain=function(n){return n=new y(n),n.__chain__=true,n},v.compact=function(n){for(var t=-1,e=n?n.length:0,r=[];++t<e;){var u=n[t];u&&r.push(u)}return r},v.compose=function(){for(var n=arguments,t=n.length;t--;)if(!jt(n[t]))throw new le;return function(){for(var t=arguments,e=n.length;e--;)t=[n[e].apply(this,t)];return t[0]}},v.constant=function(n){return function(){return n}},v.countBy=rr,v.create=function(n,t){var e=nt(n);return t?Ye(e,t):e},v.createCallback=function(n,t,e){var r=typeof n;if(null==n||"function"==r)return tt(n,t,e);
|
||||
if("object"!=r)return Xt(n);var u=We(n),o=u[0],a=n[o];return 1!=u.length||a!==a||xt(a)?function(t){for(var e=u.length,r=false;e--&&(r=at(t[u[e]],n[u[e]],null,true)););return r}:function(n){return n=n[o],a===n&&(0!==a||1/a==1/n)}},v.curry=function(n,t){return t=typeof t=="number"?t:+t||n.length,pt(n,4,null,null,null,t)},v.debounce=Vt,v.defaults=Ze,v.defer=function(n){if(!jt(n))throw new le;var t=s(arguments,1);return Ce(function(){n.apply(h,t)},1)},v.delay=function(n,t){if(!jt(n))throw new le;var e=s(arguments,2);
|
||||
return Ce(function(){n.apply(h,e)},t)},v.difference=function(n){return rt(n,ot(arguments,true,true,1))},v.filter=At,v.flatten=function(n,t,e,r){return typeof t!="boolean"&&null!=t&&(r=e,e=typeof t!="function"&&r&&r[t]===n?null:t,t=false),null!=e&&(n=Bt(n,e,r)),ot(n,t)},v.forEach=Dt,v.forEachRight=Nt,v.forIn=nr,v.forInRight=function(n,t,e){var r=[];nr(n,function(n,t){r.push(t,n)});var u=r.length;for(t=tt(t,e,3);u--&&false!==t(r[u--],r[u],n););return n},v.forOwn=tr,v.forOwnRight=bt,v.functions=_t,v.groupBy=ur,v.indexBy=or,v.initial=function(n,t,e){var r=0,u=n?n.length:0;
|
||||
if(typeof t!="number"&&null!=t){var o=u;for(t=v.createCallback(t,e,3);o--&&t(n[o],o,n);)r++}else r=null==t||e?1:t||r;return s(n,0,Pe(Be(0,u-r),u))},v.intersection=function(){for(var e=[],r=-1,u=arguments.length,a=i(),l=ht(),f=l===n,s=i();++r<u;){var g=arguments[r];(qe(g)||dt(g))&&(e.push(g),a.push(f&&g.length>=_&&o(r?e[r]:s)))}var f=e[0],h=-1,v=f?f.length:0,y=[];n:for(;++h<v;){var m=a[0],g=f[h];if(0>(m?t(m,g):l(s,g))){for(r=u,(m||s).push(g);--r;)if(m=a[r],0>(m?t(m,g):l(e[r],g)))continue n;y.push(g)
|
||||
}}for(;u--;)(m=a[u])&&p(m);return c(a),c(s),y},v.invert=wt,v.invoke=function(n,t){var e=s(arguments,2),r=-1,u=typeof t=="function",o=n?n.length:0,a=Zt(typeof o=="number"?o:0);return Dt(n,function(n){a[++r]=(u?t:n[t]).apply(n,e)}),a},v.keys=We,v.map=Bt,v.mapValues=function(n,t,e){var r={};return t=v.createCallback(t,e,3),tr(n,function(n,e,u){r[e]=t(n,e,u)}),r},v.max=Pt,v.memoize=function(n,t){if(!jt(n))throw new le;var e=function(){var r=e.cache,u=t?t.apply(this,arguments):b+arguments[0];return we.call(r,u)?r[u]:r[u]=n.apply(this,arguments)
|
||||
};return e.cache={},e},v.merge=function(n){var t=arguments,e=2;if(!xt(n))return n;if("number"!=typeof t[2]&&(e=t.length),3<e&&"function"==typeof t[e-2])var r=tt(t[--e-1],t[e--],2);else 2<e&&"function"==typeof t[e-1]&&(r=t[--e]);for(var t=s(arguments,1,e),u=-1,o=i(),a=i();++u<e;)it(n,t[u],r,o,a);return c(o),c(a),n},v.min=function(n,t,e){var u=1/0,o=u;if(typeof t!="function"&&e&&e[t]===n&&(t=null),null==t&&qe(n)){e=-1;for(var a=n.length;++e<a;){var i=n[e];i<o&&(o=i)}}else t=null==t&&kt(n)?r:v.createCallback(t,e,3),Xe(n,function(n,e,r){e=t(n,e,r),e<u&&(u=e,o=n)
|
||||
});return o},v.omit=function(n,t,e){var r={};if(typeof t!="function"){var u=[];nr(n,function(n,t){u.push(t)});for(var u=rt(u,ot(arguments,true,false,1)),o=-1,a=u.length;++o<a;){var i=u[o];r[i]=n[i]}}else t=v.createCallback(t,e,3),nr(n,function(n,e,u){t(n,e,u)||(r[e]=n)});return r},v.once=function(n){var t,e;if(!jt(n))throw new le;return function(){return t?e:(t=true,e=n.apply(this,arguments),n=null,e)}},v.pairs=function(n){for(var t=-1,e=We(n),r=e.length,u=Zt(r);++t<r;){var o=e[t];u[t]=[o,n[o]]}return u
|
||||
},v.partial=function(n){return pt(n,16,s(arguments,1))},v.partialRight=function(n){return pt(n,32,null,s(arguments,1))},v.pick=function(n,t,e){var r={};if(typeof t!="function")for(var u=-1,o=ot(arguments,true,false,1),a=xt(n)?o.length:0;++u<a;){var i=o[u];i in n&&(r[i]=n[i])}else t=v.createCallback(t,e,3),nr(n,function(n,e,u){t(n,e,u)&&(r[e]=n)});return r},v.pluck=ar,v.property=Xt,v.pull=function(n){for(var t=arguments,e=0,r=t.length,u=n?n.length:0;++e<r;)for(var o=-1,a=t[e];++o<u;)n[o]===a&&(ke.call(n,o--,1),u--);
|
||||
return n},v.range=function(n,t,e){n=+n||0,e=typeof e=="number"?e:+e||1,null==t&&(t=n,n=0);var r=-1;t=Be(0,ye((t-n)/(e||1)));for(var u=Zt(t);++r<t;)u[r]=n,n+=e;return u},v.reject=function(n,t,e){return t=v.createCallback(t,e,3),At(n,function(n,e,r){return!t(n,e,r)})},v.remove=function(n,t,e){var r=-1,u=n?n.length:0,o=[];for(t=v.createCallback(t,e,3);++r<u;)e=n[r],t(e,r,n)&&(o.push(e),ke.call(n,r--,1),u--);return o},v.rest=qt,v.shuffle=Tt,v.sortBy=function(n,t,e){var r=-1,o=qe(t),a=n?n.length:0,f=Zt(typeof a=="number"?a:0);
|
||||
for(o||(t=v.createCallback(t,e,3)),Dt(n,function(n,e,u){var a=f[++r]=l();o?a.m=Bt(t,function(t){return n[t]}):(a.m=i())[0]=t(n,e,u),a.n=r,a.o=n}),a=f.length,f.sort(u);a--;)n=f[a],f[a]=n.o,o||c(n.m),p(n);return f},v.tap=function(n,t){return t(n),n},v.throttle=function(n,t,e){var r=true,u=true;if(!jt(n))throw new le;return false===e?r=false:xt(e)&&(r="leading"in e?e.leading:r,u="trailing"in e?e.trailing:u),H.leading=r,H.maxWait=t,H.trailing=u,Vt(n,t,H)},v.times=function(n,t,e){n=-1<(n=+n)?n:0;var r=-1,u=Zt(n);
|
||||
for(t=tt(t,e,1);++r<n;)u[r]=t(r);return u},v.toArray=function(n){return n&&typeof n.length=="number"?Le.unindexedChars&&kt(n)?n.split(""):s(n):Et(n)},v.transform=function(n,t,e,r){var u=qe(n);if(null==e)if(u)e=[];else{var o=n&&n.constructor;e=nt(o&&o.prototype)}return t&&(t=v.createCallback(t,r,4),(u?Xe:tr)(n,function(n,r,u){return t(e,n,r,u)})),e},v.union=function(){return ft(ot(arguments,true,true))},v.uniq=Wt,v.values=Et,v.where=At,v.without=function(n){return rt(n,s(arguments,1))},v.wrap=function(n,t){return pt(t,16,[n])
|
||||
},v.xor=function(){for(var n=-1,t=arguments.length;++n<t;){var e=arguments[n];if(qe(e)||dt(e))var r=r?ft(rt(r,e).concat(rt(e,r))):e}return r||[]},v.zip=Gt,v.zipObject=Jt,v.collect=Bt,v.drop=qt,v.each=Dt,v.eachRight=Nt,v.extend=Ye,v.methods=_t,v.object=Jt,v.select=At,v.tail=qt,v.unique=Wt,v.unzip=Gt,Ut(v),v.clone=function(n,t,e,r){return typeof t!="boolean"&&null!=t&&(r=e,e=t,t=false),Y(n,t,typeof e=="function"&&tt(e,r,1))},v.cloneDeep=function(n,t,e){return Y(n,true,typeof t=="function"&&tt(t,e,1))},v.contains=Ot,v.escape=function(n){return null==n?"":ie(n).replace(Qe,gt)
|
||||
},v.every=St,v.find=It,v.findIndex=function(n,t,e){var r=-1,u=n?n.length:0;for(t=v.createCallback(t,e,3);++r<u;)if(t(n[r],r,n))return r;return-1},v.findKey=function(n,t,e){var r;return t=v.createCallback(t,e,3),tr(n,function(n,e,u){return t(n,e,u)?(r=e,false):void 0}),r},v.findLast=function(n,t,e){var r;return t=v.createCallback(t,e,3),Nt(n,function(n,e,u){return t(n,e,u)?(r=n,false):void 0}),r},v.findLastIndex=function(n,t,e){var r=n?n.length:0;for(t=v.createCallback(t,e,3);r--;)if(t(n[r],r,n))return r;
|
||||
return-1},v.findLastKey=function(n,t,e){var r;return t=v.createCallback(t,e,3),bt(n,function(n,e,u){return t(n,e,u)?(r=e,false):void 0}),r},v.has=function(n,t){return n?we.call(n,t):false},v.identity=Ht,v.indexOf=zt,v.isArguments=dt,v.isArray=qe,v.isBoolean=function(n){return true===n||false===n||n&&typeof n=="object"&&he.call(n)==L||false},v.isDate=function(n){return n&&typeof n=="object"&&he.call(n)==z||false},v.isElement=function(n){return n&&1===n.nodeType||false},v.isEmpty=function(n){var t=true;if(!n)return t;var e=he.call(n),r=n.length;
|
||||
return e==$||e==M||(Le.argsClass?e==T:dt(n))||e==G&&typeof r=="number"&&jt(n.splice)?!r:(tr(n,function(){return t=false}),t)},v.isEqual=function(n,t,e,r){return at(n,t,typeof e=="function"&&tt(e,r,2))},v.isFinite=function(n){return Ie(n)&&!De(parseFloat(n))},v.isFunction=jt,v.isNaN=function(n){return Ct(n)&&n!=+n},v.isNull=function(n){return null===n},v.isNumber=Ct,v.isObject=xt,v.isPlainObject=er,v.isRegExp=function(n){return n&&X[typeof n]&&he.call(n)==J||false},v.isString=kt,v.isUndefined=function(n){return typeof n=="undefined"
|
||||
},v.lastIndexOf=function(n,t,e){var r=n?n.length:0;for(typeof e=="number"&&(r=(0>e?Be(0,r+e):Pe(e,r-1))+1);r--;)if(n[r]===t)return r;return-1},v.mixin=Ut,v.noConflict=function(){return e._=ge,this},v.noop=Qt,v.now=ir,v.parseInt=lr,v.random=function(n,t,e){var r=null==n,u=null==t;return null==e&&(typeof n=="boolean"&&u?(e=n,n=1):u||typeof t!="boolean"||(e=t,u=true)),r&&u&&(t=1),n=+n||0,u?(t=n,n=0):t=+t||0,e||n%1||t%1?(e=Fe(),Pe(n+e*(t-n+parseFloat("1e-"+((e+"").length-1))),t)):lt(n,t)},v.reduce=Rt,v.reduceRight=Ft,v.result=function(n,t){if(n){var e=n[t];
|
||||
return jt(e)?n[t]():e}},v.runInContext=g,v.size=function(n){var t=n?n.length:0;return typeof t=="number"?t:We(n).length},v.some=$t,v.sortedIndex=Kt,v.template=function(n,t,e){var r=v.templateSettings;n=ie(n||""),e=Ze({},e,r);var u,o=Ze({},e.imports,r.imports),r=We(o),o=Et(o),i=0,l=e.interpolate||N,f="__p+='",l=ae((e.escape||N).source+"|"+l.source+"|"+(l===I?O:N).source+"|"+(e.evaluate||N).source+"|$","g");n.replace(l,function(t,e,r,o,l,c){return r||(r=o),f+=n.slice(i,c).replace(P,a),e&&(f+="'+__e("+e+")+'"),l&&(u=true,f+="';"+l+";\n__p+='"),r&&(f+="'+((__t=("+r+"))==null?'':__t)+'"),i=c+t.length,t
|
||||
}),f+="';",l=e=e.variable,l||(e="obj",f="with("+e+"){"+f+"}"),f=(u?f.replace(x,""):f).replace(C,"$1").replace(E,"$1;"),f="function("+e+"){"+(l?"":e+"||("+e+"={});")+"var __t,__p='',__e=_.escape"+(u?",__j=Array.prototype.join;function print(){__p+=__j.call(arguments,'')}":";")+f+"return __p}";try{var c=ee(r,"return "+f).apply(h,o)}catch(p){throw p.source=f,p}return t?c(t):(c.source=f,c)},v.unescape=function(n){return null==n?"":ie(n).replace(Ue,mt)},v.uniqueId=function(n){var t=++m;return ie(null==n?"":n)+t
|
||||
},v.all=St,v.any=$t,v.detect=It,v.findWhere=It,v.foldl=Rt,v.foldr=Ft,v.include=Ot,v.inject=Rt,Ut(function(){var n={};return tr(v,function(t,e){v.prototype[e]||(n[e]=t)}),n}(),false),v.first=Lt,v.last=function(n,t,e){var r=0,u=n?n.length:0;if(typeof t!="number"&&null!=t){var o=u;for(t=v.createCallback(t,e,3);o--&&t(n[o],o,n);)r++}else if(r=t,null==r||e)return n?n[u-1]:h;return s(n,Be(0,u-r))},v.sample=function(n,t,e){return n&&typeof n.length!="number"?n=Et(n):Le.unindexedChars&&kt(n)&&(n=n.split("")),null==t||e?n?n[lt(0,n.length-1)]:h:(n=Tt(n),n.length=Pe(Be(0,t),n.length),n)
|
||||
},v.take=Lt,v.head=Lt,tr(v,function(n,t){var e="sample"!==t;v.prototype[t]||(v.prototype[t]=function(t,r){var u=this.__chain__,o=n(this.__wrapped__,t,r);return u||null!=t&&(!r||e&&typeof t=="function")?new y(o,u):o})}),v.VERSION="2.4.1",v.prototype.chain=function(){return this.__chain__=true,this},v.prototype.toString=function(){return ie(this.__wrapped__)},v.prototype.value=Yt,v.prototype.valueOf=Yt,Xe(["join","pop","shift"],function(n){var t=fe[n];v.prototype[n]=function(){var n=this.__chain__,e=t.apply(this.__wrapped__,arguments);
|
||||
return n?new y(e,n):e}}),Xe(["push","reverse","sort","unshift"],function(n){var t=fe[n];v.prototype[n]=function(){return t.apply(this.__wrapped__,arguments),this}}),Xe(["concat","slice","splice"],function(n){var t=fe[n];v.prototype[n]=function(){return new y(t.apply(this.__wrapped__,arguments),this.__chain__)}}),Le.spliceObjects||Xe(["pop","shift","splice"],function(n){var t=fe[n],e="splice"==n;v.prototype[n]=function(){var n=this.__chain__,r=this.__wrapped__,u=t.apply(r,arguments);return 0===r.length&&delete r[0],n||e?new y(u,n):u
|
||||
}}),v}var h,v=[],y=[],m=0,d={},b=+new Date+"",_=75,w=40,j=" \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",x=/\b__p\+='';/g,C=/\b(__p\+=)''\+/g,E=/(__e\(.*?\)|\b__t\))\+'';/g,O=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,S=/\w*$/,A=/^\s*function[ \n\r\t]+\w/,I=/<%=([\s\S]+?)%>/g,D=RegExp("^["+j+"]*0+(?=.$)"),N=/($^)/,B=/\bthis\b/,P=/['\n\r\t\u2028\u2029\\]/g,R="Array Boolean Date Error Function Math Number Object RegExp String _ attachEvent clearTimeout isFinite isNaN parseInt setTimeout".split(" "),F="constructor hasOwnProperty isPrototypeOf propertyIsEnumerable toLocaleString toString valueOf".split(" "),T="[object Arguments]",$="[object Array]",L="[object Boolean]",z="[object Date]",q="[object Error]",K="[object Function]",W="[object Number]",G="[object Object]",J="[object RegExp]",M="[object String]",V={};
|
||||
V[K]=false,V[T]=V[$]=V[L]=V[z]=V[W]=V[G]=V[J]=V[M]=true;var H={leading:false,maxWait:0,trailing:false},U={configurable:false,enumerable:false,value:null,writable:false},Q={a:"",b:null,c:"",d:"",e:"",v:null,g:"",h:null,support:null,i:"",j:false},X={"boolean":false,"function":true,object:true,number:false,string:false,undefined:false},Y={"\\":"\\","'":"'","\n":"n","\r":"r","\t":"t","\u2028":"u2028","\u2029":"u2029"},Z=X[typeof window]&&window||this,nt=X[typeof exports]&&exports&&!exports.nodeType&&exports,tt=X[typeof module]&&module&&!module.nodeType&&module,et=tt&&tt.exports===nt&&nt,rt=X[typeof global]&&global;
|
||||
!rt||rt.global!==rt&&rt.window!==rt||(Z=rt);var ut=g();typeof define=="function"&&typeof define.amd=="object"&&define.amd?(Z._=ut, define(function(){return ut})):nt&&tt?et?(tt.exports=ut)._=ut:nt._=ut:Z._=ut}).call(this);
|
6785
src/bower_components/lodash/dist/lodash.js
vendored
Normal file
6785
src/bower_components/lodash/dist/lodash.js
vendored
Normal file
File diff suppressed because it is too large
Load diff
56
src/bower_components/lodash/dist/lodash.min.js
vendored
Normal file
56
src/bower_components/lodash/dist/lodash.min.js
vendored
Normal file
|
@ -0,0 +1,56 @@
|
|||
/**
|
||||
* @license
|
||||
* Lo-Dash 2.4.1 (Custom Build) lodash.com/license | Underscore.js 1.5.2 underscorejs.org/LICENSE
|
||||
* Build: `lodash modern -o ./dist/lodash.js`
|
||||
*/
|
||||
;(function(){function n(n,t,e){e=(e||0)-1;for(var r=n?n.length:0;++e<r;)if(n[e]===t)return e;return-1}function t(t,e){var r=typeof e;if(t=t.l,"boolean"==r||null==e)return t[e]?0:-1;"number"!=r&&"string"!=r&&(r="object");var u="number"==r?e:m+e;return t=(t=t[r])&&t[u],"object"==r?t&&-1<n(t,e)?0:-1:t?0:-1}function e(n){var t=this.l,e=typeof n;if("boolean"==e||null==n)t[n]=true;else{"number"!=e&&"string"!=e&&(e="object");var r="number"==e?n:m+n,t=t[e]||(t[e]={});"object"==e?(t[r]||(t[r]=[])).push(n):t[r]=true
|
||||
}}function r(n){return n.charCodeAt(0)}function u(n,t){for(var e=n.m,r=t.m,u=-1,o=e.length;++u<o;){var i=e[u],a=r[u];if(i!==a){if(i>a||typeof i=="undefined")return 1;if(i<a||typeof a=="undefined")return-1}}return n.n-t.n}function o(n){var t=-1,r=n.length,u=n[0],o=n[r/2|0],i=n[r-1];if(u&&typeof u=="object"&&o&&typeof o=="object"&&i&&typeof i=="object")return false;for(u=f(),u["false"]=u["null"]=u["true"]=u.undefined=false,o=f(),o.k=n,o.l=u,o.push=e;++t<r;)o.push(n[t]);return o}function i(n){return"\\"+U[n]
|
||||
}function a(){return h.pop()||[]}function f(){return g.pop()||{k:null,l:null,m:null,"false":false,n:0,"null":false,number:null,object:null,push:null,string:null,"true":false,undefined:false,o:null}}function l(n){n.length=0,h.length<_&&h.push(n)}function c(n){var t=n.l;t&&c(t),n.k=n.l=n.m=n.object=n.number=n.string=n.o=null,g.length<_&&g.push(n)}function p(n,t,e){t||(t=0),typeof e=="undefined"&&(e=n?n.length:0);var r=-1;e=e-t||0;for(var u=Array(0>e?0:e);++r<e;)u[r]=n[t+r];return u}function s(e){function h(n,t,e){if(!n||!V[typeof n])return n;
|
||||
t=t&&typeof e=="undefined"?t:tt(t,e,3);for(var r=-1,u=V[typeof n]&&Fe(n),o=u?u.length:0;++r<o&&(e=u[r],false!==t(n[e],e,n)););return n}function g(n,t,e){var r;if(!n||!V[typeof n])return n;t=t&&typeof e=="undefined"?t:tt(t,e,3);for(r in n)if(false===t(n[r],r,n))break;return n}function _(n,t,e){var r,u=n,o=u;if(!u)return o;for(var i=arguments,a=0,f=typeof e=="number"?2:i.length;++a<f;)if((u=i[a])&&V[typeof u])for(var l=-1,c=V[typeof u]&&Fe(u),p=c?c.length:0;++l<p;)r=c[l],"undefined"==typeof o[r]&&(o[r]=u[r]);
|
||||
return o}function U(n,t,e){var r,u=n,o=u;if(!u)return o;var i=arguments,a=0,f=typeof e=="number"?2:i.length;if(3<f&&"function"==typeof i[f-2])var l=tt(i[--f-1],i[f--],2);else 2<f&&"function"==typeof i[f-1]&&(l=i[--f]);for(;++a<f;)if((u=i[a])&&V[typeof u])for(var c=-1,p=V[typeof u]&&Fe(u),s=p?p.length:0;++c<s;)r=p[c],o[r]=l?l(o[r],u[r]):u[r];return o}function H(n){var t,e=[];if(!n||!V[typeof n])return e;for(t in n)me.call(n,t)&&e.push(t);return e}function J(n){return n&&typeof n=="object"&&!Te(n)&&me.call(n,"__wrapped__")?n:new Q(n)
|
||||
}function Q(n,t){this.__chain__=!!t,this.__wrapped__=n}function X(n){function t(){if(r){var n=p(r);be.apply(n,arguments)}if(this instanceof t){var o=nt(e.prototype),n=e.apply(o,n||arguments);return wt(n)?n:o}return e.apply(u,n||arguments)}var e=n[0],r=n[2],u=n[4];return $e(t,n),t}function Z(n,t,e,r,u){if(e){var o=e(n);if(typeof o!="undefined")return o}if(!wt(n))return n;var i=ce.call(n);if(!K[i])return n;var f=Ae[i];switch(i){case T:case F:return new f(+n);case W:case P:return new f(n);case z:return o=f(n.source,C.exec(n)),o.lastIndex=n.lastIndex,o
|
||||
}if(i=Te(n),t){var c=!r;r||(r=a()),u||(u=a());for(var s=r.length;s--;)if(r[s]==n)return u[s];o=i?f(n.length):{}}else o=i?p(n):U({},n);return i&&(me.call(n,"index")&&(o.index=n.index),me.call(n,"input")&&(o.input=n.input)),t?(r.push(n),u.push(o),(i?St:h)(n,function(n,i){o[i]=Z(n,t,e,r,u)}),c&&(l(r),l(u)),o):o}function nt(n){return wt(n)?ke(n):{}}function tt(n,t,e){if(typeof n!="function")return Ut;if(typeof t=="undefined"||!("prototype"in n))return n;var r=n.__bindData__;if(typeof r=="undefined"&&(De.funcNames&&(r=!n.name),r=r||!De.funcDecomp,!r)){var u=ge.call(n);
|
||||
De.funcNames||(r=!O.test(u)),r||(r=E.test(u),$e(n,r))}if(false===r||true!==r&&1&r[1])return n;switch(e){case 1:return function(e){return n.call(t,e)};case 2:return function(e,r){return n.call(t,e,r)};case 3:return function(e,r,u){return n.call(t,e,r,u)};case 4:return function(e,r,u,o){return n.call(t,e,r,u,o)}}return Mt(n,t)}function et(n){function t(){var n=f?i:this;if(u){var h=p(u);be.apply(h,arguments)}return(o||c)&&(h||(h=p(arguments)),o&&be.apply(h,o),c&&h.length<a)?(r|=16,et([e,s?r:-4&r,h,null,i,a])):(h||(h=arguments),l&&(e=n[v]),this instanceof t?(n=nt(e.prototype),h=e.apply(n,h),wt(h)?h:n):e.apply(n,h))
|
||||
}var e=n[0],r=n[1],u=n[2],o=n[3],i=n[4],a=n[5],f=1&r,l=2&r,c=4&r,s=8&r,v=e;return $e(t,n),t}function rt(e,r){var u=-1,i=st(),a=e?e.length:0,f=a>=b&&i===n,l=[];if(f){var p=o(r);p?(i=t,r=p):f=false}for(;++u<a;)p=e[u],0>i(r,p)&&l.push(p);return f&&c(r),l}function ut(n,t,e,r){r=(r||0)-1;for(var u=n?n.length:0,o=[];++r<u;){var i=n[r];if(i&&typeof i=="object"&&typeof i.length=="number"&&(Te(i)||yt(i))){t||(i=ut(i,t,e));var a=-1,f=i.length,l=o.length;for(o.length+=f;++a<f;)o[l++]=i[a]}else e||o.push(i)}return o
|
||||
}function ot(n,t,e,r,u,o){if(e){var i=e(n,t);if(typeof i!="undefined")return!!i}if(n===t)return 0!==n||1/n==1/t;if(n===n&&!(n&&V[typeof n]||t&&V[typeof t]))return false;if(null==n||null==t)return n===t;var f=ce.call(n),c=ce.call(t);if(f==D&&(f=q),c==D&&(c=q),f!=c)return false;switch(f){case T:case F:return+n==+t;case W:return n!=+n?t!=+t:0==n?1/n==1/t:n==+t;case z:case P:return n==oe(t)}if(c=f==$,!c){var p=me.call(n,"__wrapped__"),s=me.call(t,"__wrapped__");if(p||s)return ot(p?n.__wrapped__:n,s?t.__wrapped__:t,e,r,u,o);
|
||||
if(f!=q)return false;if(f=n.constructor,p=t.constructor,f!=p&&!(dt(f)&&f instanceof f&&dt(p)&&p instanceof p)&&"constructor"in n&&"constructor"in t)return false}for(f=!u,u||(u=a()),o||(o=a()),p=u.length;p--;)if(u[p]==n)return o[p]==t;var v=0,i=true;if(u.push(n),o.push(t),c){if(p=n.length,v=t.length,(i=v==p)||r)for(;v--;)if(c=p,s=t[v],r)for(;c--&&!(i=ot(n[c],s,e,r,u,o)););else if(!(i=ot(n[v],s,e,r,u,o)))break}else g(t,function(t,a,f){return me.call(f,a)?(v++,i=me.call(n,a)&&ot(n[a],t,e,r,u,o)):void 0}),i&&!r&&g(n,function(n,t,e){return me.call(e,t)?i=-1<--v:void 0
|
||||
});return u.pop(),o.pop(),f&&(l(u),l(o)),i}function it(n,t,e,r,u){(Te(t)?St:h)(t,function(t,o){var i,a,f=t,l=n[o];if(t&&((a=Te(t))||Pe(t))){for(f=r.length;f--;)if(i=r[f]==t){l=u[f];break}if(!i){var c;e&&(f=e(l,t),c=typeof f!="undefined")&&(l=f),c||(l=a?Te(l)?l:[]:Pe(l)?l:{}),r.push(t),u.push(l),c||it(l,t,e,r,u)}}else e&&(f=e(l,t),typeof f=="undefined"&&(f=t)),typeof f!="undefined"&&(l=f);n[o]=l})}function at(n,t){return n+he(Re()*(t-n+1))}function ft(e,r,u){var i=-1,f=st(),p=e?e.length:0,s=[],v=!r&&p>=b&&f===n,h=u||v?a():s;
|
||||
for(v&&(h=o(h),f=t);++i<p;){var g=e[i],y=u?u(g,i,e):g;(r?!i||h[h.length-1]!==y:0>f(h,y))&&((u||v)&&h.push(y),s.push(g))}return v?(l(h.k),c(h)):u&&l(h),s}function lt(n){return function(t,e,r){var u={};e=J.createCallback(e,r,3),r=-1;var o=t?t.length:0;if(typeof o=="number")for(;++r<o;){var i=t[r];n(u,i,e(i,r,t),t)}else h(t,function(t,r,o){n(u,t,e(t,r,o),o)});return u}}function ct(n,t,e,r,u,o){var i=1&t,a=4&t,f=16&t,l=32&t;if(!(2&t||dt(n)))throw new ie;f&&!e.length&&(t&=-17,f=e=false),l&&!r.length&&(t&=-33,l=r=false);
|
||||
var c=n&&n.__bindData__;return c&&true!==c?(c=p(c),c[2]&&(c[2]=p(c[2])),c[3]&&(c[3]=p(c[3])),!i||1&c[1]||(c[4]=u),!i&&1&c[1]&&(t|=8),!a||4&c[1]||(c[5]=o),f&&be.apply(c[2]||(c[2]=[]),e),l&&we.apply(c[3]||(c[3]=[]),r),c[1]|=t,ct.apply(null,c)):(1==t||17===t?X:et)([n,t,e,r,u,o])}function pt(n){return Be[n]}function st(){var t=(t=J.indexOf)===Wt?n:t;return t}function vt(n){return typeof n=="function"&&pe.test(n)}function ht(n){var t,e;return n&&ce.call(n)==q&&(t=n.constructor,!dt(t)||t instanceof t)?(g(n,function(n,t){e=t
|
||||
}),typeof e=="undefined"||me.call(n,e)):false}function gt(n){return We[n]}function yt(n){return n&&typeof n=="object"&&typeof n.length=="number"&&ce.call(n)==D||false}function mt(n,t,e){var r=Fe(n),u=r.length;for(t=tt(t,e,3);u--&&(e=r[u],false!==t(n[e],e,n)););return n}function bt(n){var t=[];return g(n,function(n,e){dt(n)&&t.push(e)}),t.sort()}function _t(n){for(var t=-1,e=Fe(n),r=e.length,u={};++t<r;){var o=e[t];u[n[o]]=o}return u}function dt(n){return typeof n=="function"}function wt(n){return!(!n||!V[typeof n])
|
||||
}function jt(n){return typeof n=="number"||n&&typeof n=="object"&&ce.call(n)==W||false}function kt(n){return typeof n=="string"||n&&typeof n=="object"&&ce.call(n)==P||false}function xt(n){for(var t=-1,e=Fe(n),r=e.length,u=Xt(r);++t<r;)u[t]=n[e[t]];return u}function Ct(n,t,e){var r=-1,u=st(),o=n?n.length:0,i=false;return e=(0>e?Ie(0,o+e):e)||0,Te(n)?i=-1<u(n,t,e):typeof o=="number"?i=-1<(kt(n)?n.indexOf(t,e):u(n,t,e)):h(n,function(n){return++r<e?void 0:!(i=n===t)}),i}function Ot(n,t,e){var r=true;t=J.createCallback(t,e,3),e=-1;
|
||||
var u=n?n.length:0;if(typeof u=="number")for(;++e<u&&(r=!!t(n[e],e,n)););else h(n,function(n,e,u){return r=!!t(n,e,u)});return r}function Nt(n,t,e){var r=[];t=J.createCallback(t,e,3),e=-1;var u=n?n.length:0;if(typeof u=="number")for(;++e<u;){var o=n[e];t(o,e,n)&&r.push(o)}else h(n,function(n,e,u){t(n,e,u)&&r.push(n)});return r}function It(n,t,e){t=J.createCallback(t,e,3),e=-1;var r=n?n.length:0;if(typeof r!="number"){var u;return h(n,function(n,e,r){return t(n,e,r)?(u=n,false):void 0}),u}for(;++e<r;){var o=n[e];
|
||||
if(t(o,e,n))return o}}function St(n,t,e){var r=-1,u=n?n.length:0;if(t=t&&typeof e=="undefined"?t:tt(t,e,3),typeof u=="number")for(;++r<u&&false!==t(n[r],r,n););else h(n,t);return n}function Et(n,t,e){var r=n?n.length:0;if(t=t&&typeof e=="undefined"?t:tt(t,e,3),typeof r=="number")for(;r--&&false!==t(n[r],r,n););else{var u=Fe(n),r=u.length;h(n,function(n,e,o){return e=u?u[--r]:--r,t(o[e],e,o)})}return n}function Rt(n,t,e){var r=-1,u=n?n.length:0;if(t=J.createCallback(t,e,3),typeof u=="number")for(var o=Xt(u);++r<u;)o[r]=t(n[r],r,n);
|
||||
else o=[],h(n,function(n,e,u){o[++r]=t(n,e,u)});return o}function At(n,t,e){var u=-1/0,o=u;if(typeof t!="function"&&e&&e[t]===n&&(t=null),null==t&&Te(n)){e=-1;for(var i=n.length;++e<i;){var a=n[e];a>o&&(o=a)}}else t=null==t&&kt(n)?r:J.createCallback(t,e,3),St(n,function(n,e,r){e=t(n,e,r),e>u&&(u=e,o=n)});return o}function Dt(n,t,e,r){if(!n)return e;var u=3>arguments.length;t=J.createCallback(t,r,4);var o=-1,i=n.length;if(typeof i=="number")for(u&&(e=n[++o]);++o<i;)e=t(e,n[o],o,n);else h(n,function(n,r,o){e=u?(u=false,n):t(e,n,r,o)
|
||||
});return e}function $t(n,t,e,r){var u=3>arguments.length;return t=J.createCallback(t,r,4),Et(n,function(n,r,o){e=u?(u=false,n):t(e,n,r,o)}),e}function Tt(n){var t=-1,e=n?n.length:0,r=Xt(typeof e=="number"?e:0);return St(n,function(n){var e=at(0,++t);r[t]=r[e],r[e]=n}),r}function Ft(n,t,e){var r;t=J.createCallback(t,e,3),e=-1;var u=n?n.length:0;if(typeof u=="number")for(;++e<u&&!(r=t(n[e],e,n)););else h(n,function(n,e,u){return!(r=t(n,e,u))});return!!r}function Bt(n,t,e){var r=0,u=n?n.length:0;if(typeof t!="number"&&null!=t){var o=-1;
|
||||
for(t=J.createCallback(t,e,3);++o<u&&t(n[o],o,n);)r++}else if(r=t,null==r||e)return n?n[0]:v;return p(n,0,Se(Ie(0,r),u))}function Wt(t,e,r){if(typeof r=="number"){var u=t?t.length:0;r=0>r?Ie(0,u+r):r||0}else if(r)return r=zt(t,e),t[r]===e?r:-1;return n(t,e,r)}function qt(n,t,e){if(typeof t!="number"&&null!=t){var r=0,u=-1,o=n?n.length:0;for(t=J.createCallback(t,e,3);++u<o&&t(n[u],u,n);)r++}else r=null==t||e?1:Ie(0,t);return p(n,r)}function zt(n,t,e,r){var u=0,o=n?n.length:u;for(e=e?J.createCallback(e,r,1):Ut,t=e(t);u<o;)r=u+o>>>1,e(n[r])<t?u=r+1:o=r;
|
||||
return u}function Pt(n,t,e,r){return typeof t!="boolean"&&null!=t&&(r=e,e=typeof t!="function"&&r&&r[t]===n?null:t,t=false),null!=e&&(e=J.createCallback(e,r,3)),ft(n,t,e)}function Kt(){for(var n=1<arguments.length?arguments:arguments[0],t=-1,e=n?At(Ve(n,"length")):0,r=Xt(0>e?0:e);++t<e;)r[t]=Ve(n,t);return r}function Lt(n,t){var e=-1,r=n?n.length:0,u={};for(t||!r||Te(n[0])||(t=[]);++e<r;){var o=n[e];t?u[o]=t[e]:o&&(u[o[0]]=o[1])}return u}function Mt(n,t){return 2<arguments.length?ct(n,17,p(arguments,2),null,t):ct(n,1,null,null,t)
|
||||
}function Vt(n,t,e){function r(){c&&ve(c),i=c=p=v,(g||h!==t)&&(s=Ue(),a=n.apply(l,o),c||i||(o=l=null))}function u(){var e=t-(Ue()-f);0<e?c=_e(u,e):(i&&ve(i),e=p,i=c=p=v,e&&(s=Ue(),a=n.apply(l,o),c||i||(o=l=null)))}var o,i,a,f,l,c,p,s=0,h=false,g=true;if(!dt(n))throw new ie;if(t=Ie(0,t)||0,true===e)var y=true,g=false;else wt(e)&&(y=e.leading,h="maxWait"in e&&(Ie(t,e.maxWait)||0),g="trailing"in e?e.trailing:g);return function(){if(o=arguments,f=Ue(),l=this,p=g&&(c||!y),false===h)var e=y&&!c;else{i||y||(s=f);var v=h-(f-s),m=0>=v;
|
||||
m?(i&&(i=ve(i)),s=f,a=n.apply(l,o)):i||(i=_e(r,v))}return m&&c?c=ve(c):c||t===h||(c=_e(u,t)),e&&(m=true,a=n.apply(l,o)),!m||c||i||(o=l=null),a}}function Ut(n){return n}function Gt(n,t,e){var r=true,u=t&&bt(t);t&&(e||u.length)||(null==e&&(e=t),o=Q,t=n,n=J,u=bt(t)),false===e?r=false:wt(e)&&"chain"in e&&(r=e.chain);var o=n,i=dt(o);St(u,function(e){var u=n[e]=t[e];i&&(o.prototype[e]=function(){var t=this.__chain__,e=this.__wrapped__,i=[e];if(be.apply(i,arguments),i=u.apply(n,i),r||t){if(e===i&&wt(i))return this;
|
||||
i=new o(i),i.__chain__=t}return i})})}function Ht(){}function Jt(n){return function(t){return t[n]}}function Qt(){return this.__wrapped__}e=e?Y.defaults(G.Object(),e,Y.pick(G,A)):G;var Xt=e.Array,Yt=e.Boolean,Zt=e.Date,ne=e.Function,te=e.Math,ee=e.Number,re=e.Object,ue=e.RegExp,oe=e.String,ie=e.TypeError,ae=[],fe=re.prototype,le=e._,ce=fe.toString,pe=ue("^"+oe(ce).replace(/[.*+?^${}()|[\]\\]/g,"\\$&").replace(/toString| for [^\]]+/g,".*?")+"$"),se=te.ceil,ve=e.clearTimeout,he=te.floor,ge=ne.prototype.toString,ye=vt(ye=re.getPrototypeOf)&&ye,me=fe.hasOwnProperty,be=ae.push,_e=e.setTimeout,de=ae.splice,we=ae.unshift,je=function(){try{var n={},t=vt(t=re.defineProperty)&&t,e=t(n,n,n)&&t
|
||||
}catch(r){}return e}(),ke=vt(ke=re.create)&&ke,xe=vt(xe=Xt.isArray)&&xe,Ce=e.isFinite,Oe=e.isNaN,Ne=vt(Ne=re.keys)&&Ne,Ie=te.max,Se=te.min,Ee=e.parseInt,Re=te.random,Ae={};Ae[$]=Xt,Ae[T]=Yt,Ae[F]=Zt,Ae[B]=ne,Ae[q]=re,Ae[W]=ee,Ae[z]=ue,Ae[P]=oe,Q.prototype=J.prototype;var De=J.support={};De.funcDecomp=!vt(e.a)&&E.test(s),De.funcNames=typeof ne.name=="string",J.templateSettings={escape:/<%-([\s\S]+?)%>/g,evaluate:/<%([\s\S]+?)%>/g,interpolate:N,variable:"",imports:{_:J}},ke||(nt=function(){function n(){}return function(t){if(wt(t)){n.prototype=t;
|
||||
var r=new n;n.prototype=null}return r||e.Object()}}());var $e=je?function(n,t){M.value=t,je(n,"__bindData__",M)}:Ht,Te=xe||function(n){return n&&typeof n=="object"&&typeof n.length=="number"&&ce.call(n)==$||false},Fe=Ne?function(n){return wt(n)?Ne(n):[]}:H,Be={"&":"&","<":"<",">":">",'"':""","'":"'"},We=_t(Be),qe=ue("("+Fe(We).join("|")+")","g"),ze=ue("["+Fe(Be).join("")+"]","g"),Pe=ye?function(n){if(!n||ce.call(n)!=q)return false;var t=n.valueOf,e=vt(t)&&(e=ye(t))&&ye(e);return e?n==e||ye(n)==e:ht(n)
|
||||
}:ht,Ke=lt(function(n,t,e){me.call(n,e)?n[e]++:n[e]=1}),Le=lt(function(n,t,e){(me.call(n,e)?n[e]:n[e]=[]).push(t)}),Me=lt(function(n,t,e){n[e]=t}),Ve=Rt,Ue=vt(Ue=Zt.now)&&Ue||function(){return(new Zt).getTime()},Ge=8==Ee(d+"08")?Ee:function(n,t){return Ee(kt(n)?n.replace(I,""):n,t||0)};return J.after=function(n,t){if(!dt(t))throw new ie;return function(){return 1>--n?t.apply(this,arguments):void 0}},J.assign=U,J.at=function(n){for(var t=arguments,e=-1,r=ut(t,true,false,1),t=t[2]&&t[2][t[1]]===n?1:r.length,u=Xt(t);++e<t;)u[e]=n[r[e]];
|
||||
return u},J.bind=Mt,J.bindAll=function(n){for(var t=1<arguments.length?ut(arguments,true,false,1):bt(n),e=-1,r=t.length;++e<r;){var u=t[e];n[u]=ct(n[u],1,null,null,n)}return n},J.bindKey=function(n,t){return 2<arguments.length?ct(t,19,p(arguments,2),null,n):ct(t,3,null,null,n)},J.chain=function(n){return n=new Q(n),n.__chain__=true,n},J.compact=function(n){for(var t=-1,e=n?n.length:0,r=[];++t<e;){var u=n[t];u&&r.push(u)}return r},J.compose=function(){for(var n=arguments,t=n.length;t--;)if(!dt(n[t]))throw new ie;
|
||||
return function(){for(var t=arguments,e=n.length;e--;)t=[n[e].apply(this,t)];return t[0]}},J.constant=function(n){return function(){return n}},J.countBy=Ke,J.create=function(n,t){var e=nt(n);return t?U(e,t):e},J.createCallback=function(n,t,e){var r=typeof n;if(null==n||"function"==r)return tt(n,t,e);if("object"!=r)return Jt(n);var u=Fe(n),o=u[0],i=n[o];return 1!=u.length||i!==i||wt(i)?function(t){for(var e=u.length,r=false;e--&&(r=ot(t[u[e]],n[u[e]],null,true)););return r}:function(n){return n=n[o],i===n&&(0!==i||1/i==1/n)
|
||||
}},J.curry=function(n,t){return t=typeof t=="number"?t:+t||n.length,ct(n,4,null,null,null,t)},J.debounce=Vt,J.defaults=_,J.defer=function(n){if(!dt(n))throw new ie;var t=p(arguments,1);return _e(function(){n.apply(v,t)},1)},J.delay=function(n,t){if(!dt(n))throw new ie;var e=p(arguments,2);return _e(function(){n.apply(v,e)},t)},J.difference=function(n){return rt(n,ut(arguments,true,true,1))},J.filter=Nt,J.flatten=function(n,t,e,r){return typeof t!="boolean"&&null!=t&&(r=e,e=typeof t!="function"&&r&&r[t]===n?null:t,t=false),null!=e&&(n=Rt(n,e,r)),ut(n,t)
|
||||
},J.forEach=St,J.forEachRight=Et,J.forIn=g,J.forInRight=function(n,t,e){var r=[];g(n,function(n,t){r.push(t,n)});var u=r.length;for(t=tt(t,e,3);u--&&false!==t(r[u--],r[u],n););return n},J.forOwn=h,J.forOwnRight=mt,J.functions=bt,J.groupBy=Le,J.indexBy=Me,J.initial=function(n,t,e){var r=0,u=n?n.length:0;if(typeof t!="number"&&null!=t){var o=u;for(t=J.createCallback(t,e,3);o--&&t(n[o],o,n);)r++}else r=null==t||e?1:t||r;return p(n,0,Se(Ie(0,u-r),u))},J.intersection=function(){for(var e=[],r=-1,u=arguments.length,i=a(),f=st(),p=f===n,s=a();++r<u;){var v=arguments[r];
|
||||
(Te(v)||yt(v))&&(e.push(v),i.push(p&&v.length>=b&&o(r?e[r]:s)))}var p=e[0],h=-1,g=p?p.length:0,y=[];n:for(;++h<g;){var m=i[0],v=p[h];if(0>(m?t(m,v):f(s,v))){for(r=u,(m||s).push(v);--r;)if(m=i[r],0>(m?t(m,v):f(e[r],v)))continue n;y.push(v)}}for(;u--;)(m=i[u])&&c(m);return l(i),l(s),y},J.invert=_t,J.invoke=function(n,t){var e=p(arguments,2),r=-1,u=typeof t=="function",o=n?n.length:0,i=Xt(typeof o=="number"?o:0);return St(n,function(n){i[++r]=(u?t:n[t]).apply(n,e)}),i},J.keys=Fe,J.map=Rt,J.mapValues=function(n,t,e){var r={};
|
||||
return t=J.createCallback(t,e,3),h(n,function(n,e,u){r[e]=t(n,e,u)}),r},J.max=At,J.memoize=function(n,t){function e(){var r=e.cache,u=t?t.apply(this,arguments):m+arguments[0];return me.call(r,u)?r[u]:r[u]=n.apply(this,arguments)}if(!dt(n))throw new ie;return e.cache={},e},J.merge=function(n){var t=arguments,e=2;if(!wt(n))return n;if("number"!=typeof t[2]&&(e=t.length),3<e&&"function"==typeof t[e-2])var r=tt(t[--e-1],t[e--],2);else 2<e&&"function"==typeof t[e-1]&&(r=t[--e]);for(var t=p(arguments,1,e),u=-1,o=a(),i=a();++u<e;)it(n,t[u],r,o,i);
|
||||
return l(o),l(i),n},J.min=function(n,t,e){var u=1/0,o=u;if(typeof t!="function"&&e&&e[t]===n&&(t=null),null==t&&Te(n)){e=-1;for(var i=n.length;++e<i;){var a=n[e];a<o&&(o=a)}}else t=null==t&&kt(n)?r:J.createCallback(t,e,3),St(n,function(n,e,r){e=t(n,e,r),e<u&&(u=e,o=n)});return o},J.omit=function(n,t,e){var r={};if(typeof t!="function"){var u=[];g(n,function(n,t){u.push(t)});for(var u=rt(u,ut(arguments,true,false,1)),o=-1,i=u.length;++o<i;){var a=u[o];r[a]=n[a]}}else t=J.createCallback(t,e,3),g(n,function(n,e,u){t(n,e,u)||(r[e]=n)
|
||||
});return r},J.once=function(n){var t,e;if(!dt(n))throw new ie;return function(){return t?e:(t=true,e=n.apply(this,arguments),n=null,e)}},J.pairs=function(n){for(var t=-1,e=Fe(n),r=e.length,u=Xt(r);++t<r;){var o=e[t];u[t]=[o,n[o]]}return u},J.partial=function(n){return ct(n,16,p(arguments,1))},J.partialRight=function(n){return ct(n,32,null,p(arguments,1))},J.pick=function(n,t,e){var r={};if(typeof t!="function")for(var u=-1,o=ut(arguments,true,false,1),i=wt(n)?o.length:0;++u<i;){var a=o[u];a in n&&(r[a]=n[a])
|
||||
}else t=J.createCallback(t,e,3),g(n,function(n,e,u){t(n,e,u)&&(r[e]=n)});return r},J.pluck=Ve,J.property=Jt,J.pull=function(n){for(var t=arguments,e=0,r=t.length,u=n?n.length:0;++e<r;)for(var o=-1,i=t[e];++o<u;)n[o]===i&&(de.call(n,o--,1),u--);return n},J.range=function(n,t,e){n=+n||0,e=typeof e=="number"?e:+e||1,null==t&&(t=n,n=0);var r=-1;t=Ie(0,se((t-n)/(e||1)));for(var u=Xt(t);++r<t;)u[r]=n,n+=e;return u},J.reject=function(n,t,e){return t=J.createCallback(t,e,3),Nt(n,function(n,e,r){return!t(n,e,r)
|
||||
})},J.remove=function(n,t,e){var r=-1,u=n?n.length:0,o=[];for(t=J.createCallback(t,e,3);++r<u;)e=n[r],t(e,r,n)&&(o.push(e),de.call(n,r--,1),u--);return o},J.rest=qt,J.shuffle=Tt,J.sortBy=function(n,t,e){var r=-1,o=Te(t),i=n?n.length:0,p=Xt(typeof i=="number"?i:0);for(o||(t=J.createCallback(t,e,3)),St(n,function(n,e,u){var i=p[++r]=f();o?i.m=Rt(t,function(t){return n[t]}):(i.m=a())[0]=t(n,e,u),i.n=r,i.o=n}),i=p.length,p.sort(u);i--;)n=p[i],p[i]=n.o,o||l(n.m),c(n);return p},J.tap=function(n,t){return t(n),n
|
||||
},J.throttle=function(n,t,e){var r=true,u=true;if(!dt(n))throw new ie;return false===e?r=false:wt(e)&&(r="leading"in e?e.leading:r,u="trailing"in e?e.trailing:u),L.leading=r,L.maxWait=t,L.trailing=u,Vt(n,t,L)},J.times=function(n,t,e){n=-1<(n=+n)?n:0;var r=-1,u=Xt(n);for(t=tt(t,e,1);++r<n;)u[r]=t(r);return u},J.toArray=function(n){return n&&typeof n.length=="number"?p(n):xt(n)},J.transform=function(n,t,e,r){var u=Te(n);if(null==e)if(u)e=[];else{var o=n&&n.constructor;e=nt(o&&o.prototype)}return t&&(t=J.createCallback(t,r,4),(u?St:h)(n,function(n,r,u){return t(e,n,r,u)
|
||||
})),e},J.union=function(){return ft(ut(arguments,true,true))},J.uniq=Pt,J.values=xt,J.where=Nt,J.without=function(n){return rt(n,p(arguments,1))},J.wrap=function(n,t){return ct(t,16,[n])},J.xor=function(){for(var n=-1,t=arguments.length;++n<t;){var e=arguments[n];if(Te(e)||yt(e))var r=r?ft(rt(r,e).concat(rt(e,r))):e}return r||[]},J.zip=Kt,J.zipObject=Lt,J.collect=Rt,J.drop=qt,J.each=St,J.eachRight=Et,J.extend=U,J.methods=bt,J.object=Lt,J.select=Nt,J.tail=qt,J.unique=Pt,J.unzip=Kt,Gt(J),J.clone=function(n,t,e,r){return typeof t!="boolean"&&null!=t&&(r=e,e=t,t=false),Z(n,t,typeof e=="function"&&tt(e,r,1))
|
||||
},J.cloneDeep=function(n,t,e){return Z(n,true,typeof t=="function"&&tt(t,e,1))},J.contains=Ct,J.escape=function(n){return null==n?"":oe(n).replace(ze,pt)},J.every=Ot,J.find=It,J.findIndex=function(n,t,e){var r=-1,u=n?n.length:0;for(t=J.createCallback(t,e,3);++r<u;)if(t(n[r],r,n))return r;return-1},J.findKey=function(n,t,e){var r;return t=J.createCallback(t,e,3),h(n,function(n,e,u){return t(n,e,u)?(r=e,false):void 0}),r},J.findLast=function(n,t,e){var r;return t=J.createCallback(t,e,3),Et(n,function(n,e,u){return t(n,e,u)?(r=n,false):void 0
|
||||
}),r},J.findLastIndex=function(n,t,e){var r=n?n.length:0;for(t=J.createCallback(t,e,3);r--;)if(t(n[r],r,n))return r;return-1},J.findLastKey=function(n,t,e){var r;return t=J.createCallback(t,e,3),mt(n,function(n,e,u){return t(n,e,u)?(r=e,false):void 0}),r},J.has=function(n,t){return n?me.call(n,t):false},J.identity=Ut,J.indexOf=Wt,J.isArguments=yt,J.isArray=Te,J.isBoolean=function(n){return true===n||false===n||n&&typeof n=="object"&&ce.call(n)==T||false},J.isDate=function(n){return n&&typeof n=="object"&&ce.call(n)==F||false
|
||||
},J.isElement=function(n){return n&&1===n.nodeType||false},J.isEmpty=function(n){var t=true;if(!n)return t;var e=ce.call(n),r=n.length;return e==$||e==P||e==D||e==q&&typeof r=="number"&&dt(n.splice)?!r:(h(n,function(){return t=false}),t)},J.isEqual=function(n,t,e,r){return ot(n,t,typeof e=="function"&&tt(e,r,2))},J.isFinite=function(n){return Ce(n)&&!Oe(parseFloat(n))},J.isFunction=dt,J.isNaN=function(n){return jt(n)&&n!=+n},J.isNull=function(n){return null===n},J.isNumber=jt,J.isObject=wt,J.isPlainObject=Pe,J.isRegExp=function(n){return n&&typeof n=="object"&&ce.call(n)==z||false
|
||||
},J.isString=kt,J.isUndefined=function(n){return typeof n=="undefined"},J.lastIndexOf=function(n,t,e){var r=n?n.length:0;for(typeof e=="number"&&(r=(0>e?Ie(0,r+e):Se(e,r-1))+1);r--;)if(n[r]===t)return r;return-1},J.mixin=Gt,J.noConflict=function(){return e._=le,this},J.noop=Ht,J.now=Ue,J.parseInt=Ge,J.random=function(n,t,e){var r=null==n,u=null==t;return null==e&&(typeof n=="boolean"&&u?(e=n,n=1):u||typeof t!="boolean"||(e=t,u=true)),r&&u&&(t=1),n=+n||0,u?(t=n,n=0):t=+t||0,e||n%1||t%1?(e=Re(),Se(n+e*(t-n+parseFloat("1e-"+((e+"").length-1))),t)):at(n,t)
|
||||
},J.reduce=Dt,J.reduceRight=$t,J.result=function(n,t){if(n){var e=n[t];return dt(e)?n[t]():e}},J.runInContext=s,J.size=function(n){var t=n?n.length:0;return typeof t=="number"?t:Fe(n).length},J.some=Ft,J.sortedIndex=zt,J.template=function(n,t,e){var r=J.templateSettings;n=oe(n||""),e=_({},e,r);var u,o=_({},e.imports,r.imports),r=Fe(o),o=xt(o),a=0,f=e.interpolate||S,l="__p+='",f=ue((e.escape||S).source+"|"+f.source+"|"+(f===N?x:S).source+"|"+(e.evaluate||S).source+"|$","g");n.replace(f,function(t,e,r,o,f,c){return r||(r=o),l+=n.slice(a,c).replace(R,i),e&&(l+="'+__e("+e+")+'"),f&&(u=true,l+="';"+f+";\n__p+='"),r&&(l+="'+((__t=("+r+"))==null?'':__t)+'"),a=c+t.length,t
|
||||
}),l+="';",f=e=e.variable,f||(e="obj",l="with("+e+"){"+l+"}"),l=(u?l.replace(w,""):l).replace(j,"$1").replace(k,"$1;"),l="function("+e+"){"+(f?"":e+"||("+e+"={});")+"var __t,__p='',__e=_.escape"+(u?",__j=Array.prototype.join;function print(){__p+=__j.call(arguments,'')}":";")+l+"return __p}";try{var c=ne(r,"return "+l).apply(v,o)}catch(p){throw p.source=l,p}return t?c(t):(c.source=l,c)},J.unescape=function(n){return null==n?"":oe(n).replace(qe,gt)},J.uniqueId=function(n){var t=++y;return oe(null==n?"":n)+t
|
||||
},J.all=Ot,J.any=Ft,J.detect=It,J.findWhere=It,J.foldl=Dt,J.foldr=$t,J.include=Ct,J.inject=Dt,Gt(function(){var n={};return h(J,function(t,e){J.prototype[e]||(n[e]=t)}),n}(),false),J.first=Bt,J.last=function(n,t,e){var r=0,u=n?n.length:0;if(typeof t!="number"&&null!=t){var o=u;for(t=J.createCallback(t,e,3);o--&&t(n[o],o,n);)r++}else if(r=t,null==r||e)return n?n[u-1]:v;return p(n,Ie(0,u-r))},J.sample=function(n,t,e){return n&&typeof n.length!="number"&&(n=xt(n)),null==t||e?n?n[at(0,n.length-1)]:v:(n=Tt(n),n.length=Se(Ie(0,t),n.length),n)
|
||||
},J.take=Bt,J.head=Bt,h(J,function(n,t){var e="sample"!==t;J.prototype[t]||(J.prototype[t]=function(t,r){var u=this.__chain__,o=n(this.__wrapped__,t,r);return u||null!=t&&(!r||e&&typeof t=="function")?new Q(o,u):o})}),J.VERSION="2.4.1",J.prototype.chain=function(){return this.__chain__=true,this},J.prototype.toString=function(){return oe(this.__wrapped__)},J.prototype.value=Qt,J.prototype.valueOf=Qt,St(["join","pop","shift"],function(n){var t=ae[n];J.prototype[n]=function(){var n=this.__chain__,e=t.apply(this.__wrapped__,arguments);
|
||||
return n?new Q(e,n):e}}),St(["push","reverse","sort","unshift"],function(n){var t=ae[n];J.prototype[n]=function(){return t.apply(this.__wrapped__,arguments),this}}),St(["concat","slice","splice"],function(n){var t=ae[n];J.prototype[n]=function(){return new Q(t.apply(this.__wrapped__,arguments),this.__chain__)}}),J}var v,h=[],g=[],y=0,m=+new Date+"",b=75,_=40,d=" \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",w=/\b__p\+='';/g,j=/\b(__p\+=)''\+/g,k=/(__e\(.*?\)|\b__t\))\+'';/g,x=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,C=/\w*$/,O=/^\s*function[ \n\r\t]+\w/,N=/<%=([\s\S]+?)%>/g,I=RegExp("^["+d+"]*0+(?=.$)"),S=/($^)/,E=/\bthis\b/,R=/['\n\r\t\u2028\u2029\\]/g,A="Array Boolean Date Function Math Number Object RegExp String _ attachEvent clearTimeout isFinite isNaN parseInt setTimeout".split(" "),D="[object Arguments]",$="[object Array]",T="[object Boolean]",F="[object Date]",B="[object Function]",W="[object Number]",q="[object Object]",z="[object RegExp]",P="[object String]",K={};
|
||||
K[B]=false,K[D]=K[$]=K[T]=K[F]=K[W]=K[q]=K[z]=K[P]=true;var L={leading:false,maxWait:0,trailing:false},M={configurable:false,enumerable:false,value:null,writable:false},V={"boolean":false,"function":true,object:true,number:false,string:false,undefined:false},U={"\\":"\\","'":"'","\n":"n","\r":"r","\t":"t","\u2028":"u2028","\u2029":"u2029"},G=V[typeof window]&&window||this,H=V[typeof exports]&&exports&&!exports.nodeType&&exports,J=V[typeof module]&&module&&!module.nodeType&&module,Q=J&&J.exports===H&&H,X=V[typeof global]&&global;!X||X.global!==X&&X.window!==X||(G=X);
|
||||
var Y=s();typeof define=="function"&&typeof define.amd=="object"&&define.amd?(G._=Y, define(function(){return Y})):H&&J?Q?(J.exports=Y)._=Y:H._=Y:G._=Y}).call(this);
|
4979
src/bower_components/lodash/dist/lodash.underscore.js
vendored
Normal file
4979
src/bower_components/lodash/dist/lodash.underscore.js
vendored
Normal file
File diff suppressed because it is too large
Load diff
39
src/bower_components/lodash/dist/lodash.underscore.min.js
vendored
Normal file
39
src/bower_components/lodash/dist/lodash.underscore.min.js
vendored
Normal file
|
@ -0,0 +1,39 @@
|
|||
/**
|
||||
* @license
|
||||
* Lo-Dash 2.4.1 (Custom Build) lodash.com/license | Underscore.js 1.5.2 underscorejs.org/LICENSE
|
||||
* Build: `lodash underscore exports="amd,commonjs,global,node" -o ./dist/lodash.underscore.js`
|
||||
*/
|
||||
;(function(){function n(n,r,t){t=(t||0)-1;for(var e=n?n.length:0;++t<e;)if(n[t]===r)return t;return-1}function r(n,r){for(var t=n.m,e=r.m,u=-1,o=t.length;++u<o;){var i=t[u],f=e[u];if(i!==f){if(i>f||typeof i=="undefined")return 1;if(i<f||typeof f=="undefined")return-1}}return n.n-r.n}function t(n){return"\\"+yr[n]}function e(n,r,t){r||(r=0),typeof t=="undefined"&&(t=n?n.length:0);var e=-1;t=t-r||0;for(var u=Array(0>t?0:t);++e<t;)u[e]=n[r+e];return u}function u(n){return n instanceof u?n:new o(n)}function o(n,r){this.__chain__=!!r,this.__wrapped__=n
|
||||
}function i(n){function r(){if(u){var n=e(u);Rr.apply(n,arguments)}if(this instanceof r){var i=f(t.prototype),n=t.apply(i,n||arguments);return O(n)?n:i}return t.apply(o,n||arguments)}var t=n[0],u=n[2],o=n[4];return r}function f(n){return O(n)?Br(n):{}}function a(n,r,t){if(typeof n!="function")return Y;if(typeof r=="undefined"||!("prototype"in n))return n;switch(t){case 1:return function(t){return n.call(r,t)};case 2:return function(t,e){return n.call(r,t,e)};case 3:return function(t,e,u){return n.call(r,t,e,u)
|
||||
};case 4:return function(t,e,u,o){return n.call(r,t,e,u,o)}}return L(n,r)}function l(n){function r(){var n=p?a:this;if(o){var y=e(o);Rr.apply(y,arguments)}return(i||g)&&(y||(y=e(arguments)),i&&Rr.apply(y,i),g&&y.length<c)?(u|=16,l([t,h?u:-4&u,y,null,a,c])):(y||(y=arguments),s&&(t=n[v]),this instanceof r?(n=f(t.prototype),y=t.apply(n,y),O(y)?y:n):t.apply(n,y))}var t=n[0],u=n[1],o=n[2],i=n[3],a=n[4],c=n[5],p=1&u,s=2&u,g=4&u,h=8&u,v=t;return r}function c(n,r){for(var t=-1,e=m(),u=n?n.length:0,o=[];++t<u;){var i=n[t];
|
||||
0>e(r,i)&&o.push(i)}return o}function p(n,r,t,e){e=(e||0)-1;for(var u=n?n.length:0,o=[];++e<u;){var i=n[e];if(i&&typeof i=="object"&&typeof i.length=="number"&&(Cr(i)||b(i))){r||(i=p(i,r,t));var f=-1,a=i.length,l=o.length;for(o.length+=a;++f<a;)o[l++]=i[f]}else t||o.push(i)}return o}function s(n,r,t,e){if(n===r)return 0!==n||1/n==1/r;if(n===n&&!(n&&vr[typeof n]||r&&vr[typeof r]))return false;if(null==n||null==r)return n===r;var o=Er.call(n),i=Er.call(r);if(o!=i)return false;switch(o){case lr:case cr:return+n==+r;
|
||||
case pr:return n!=+n?r!=+r:0==n?1/n==1/r:n==+r;case gr:case hr:return n==r+""}if(i=o==ar,!i){var f=n instanceof u,a=r instanceof u;if(f||a)return s(f?n.__wrapped__:n,a?r.__wrapped__:r,t,e);if(o!=sr)return false;if(o=n.constructor,f=r.constructor,o!=f&&!(A(o)&&o instanceof o&&A(f)&&f instanceof f)&&"constructor"in n&&"constructor"in r)return false}for(t||(t=[]),e||(e=[]),o=t.length;o--;)if(t[o]==n)return e[o]==r;var l=true,c=0;if(t.push(n),e.push(r),i){if(c=r.length,l=c==n.length)for(;c--&&(l=s(n[c],r[c],t,e)););}else Kr(r,function(r,u,o){return Nr.call(o,u)?(c++,!(l=Nr.call(n,u)&&s(n[u],r,t,e))&&er):void 0
|
||||
}),l&&Kr(n,function(n,r,t){return Nr.call(t,r)?!(l=-1<--c)&&er:void 0});return t.pop(),e.pop(),l}function g(n,r,t){for(var e=-1,u=m(),o=n?n.length:0,i=[],f=t?[]:i;++e<o;){var a=n[e],l=t?t(a,e,n):a;(r?!e||f[f.length-1]!==l:0>u(f,l))&&(t&&f.push(l),i.push(a))}return i}function h(n){return function(r,t,e){var u={};t=X(t,e,3),e=-1;var o=r?r.length:0;if(typeof o=="number")for(;++e<o;){var i=r[e];n(u,i,t(i,e,r),r)}else Lr(r,function(r,e,o){n(u,r,t(r,e,o),o)});return u}}function v(n,r,t,e,u,o){var f=16&r,a=32&r;
|
||||
if(!(2&r||A(n)))throw new TypeError;return f&&!t.length&&(r&=-17,t=false),a&&!e.length&&(r&=-33,e=false),(1==r||17===r?i:l)([n,r,t,e,u,o])}function y(n){return Vr[n]}function m(){var r=(r=u.indexOf)===G?n:r;return r}function _(n){return typeof n=="function"&&Ar.test(n)}function d(n){return Gr[n]}function b(n){return n&&typeof n=="object"&&typeof n.length=="number"&&Er.call(n)==fr||false}function w(n){if(!n)return n;for(var r=1,t=arguments.length;r<t;r++){var e=arguments[r];if(e)for(var u in e)n[u]=e[u]}return n
|
||||
}function j(n){if(!n)return n;for(var r=1,t=arguments.length;r<t;r++){var e=arguments[r];if(e)for(var u in e)"undefined"==typeof n[u]&&(n[u]=e[u])}return n}function x(n){var r=[];return Kr(n,function(n,t){A(n)&&r.push(t)}),r.sort()}function T(n){for(var r=-1,t=Ur(n),e=t.length,u={};++r<e;){var o=t[r];u[n[o]]=o}return u}function E(n){if(!n)return true;if(Cr(n)||N(n))return!n.length;for(var r in n)if(Nr.call(n,r))return false;return true}function A(n){return typeof n=="function"}function O(n){return!(!n||!vr[typeof n])
|
||||
}function S(n){return typeof n=="number"||n&&typeof n=="object"&&Er.call(n)==pr||false}function N(n){return typeof n=="string"||n&&typeof n=="object"&&Er.call(n)==hr||false}function R(n){for(var r=-1,t=Ur(n),e=t.length,u=Array(e);++r<e;)u[r]=n[t[r]];return u}function k(n,r){var t=m(),e=n?n.length:0,u=false;return e&&typeof e=="number"?u=-1<t(n,r):Lr(n,function(n){return(u=n===r)&&er}),u}function B(n,r,t){var e=true;r=X(r,t,3),t=-1;var u=n?n.length:0;if(typeof u=="number")for(;++t<u&&(e=!!r(n[t],t,n)););else Lr(n,function(n,t,u){return!(e=!!r(n,t,u))&&er
|
||||
});return e}function F(n,r,t){var e=[];r=X(r,t,3),t=-1;var u=n?n.length:0;if(typeof u=="number")for(;++t<u;){var o=n[t];r(o,t,n)&&e.push(o)}else Lr(n,function(n,t,u){r(n,t,u)&&e.push(n)});return e}function q(n,r,t){r=X(r,t,3),t=-1;var e=n?n.length:0;if(typeof e!="number"){var u;return Lr(n,function(n,t,e){return r(n,t,e)?(u=n,er):void 0}),u}for(;++t<e;){var o=n[t];if(r(o,t,n))return o}}function D(n,r,t){var e=-1,u=n?n.length:0;if(r=r&&typeof t=="undefined"?r:a(r,t,3),typeof u=="number")for(;++e<u&&r(n[e],e,n)!==er;);else Lr(n,r)
|
||||
}function I(n,r){var t=n?n.length:0;if(typeof t=="number")for(;t--&&false!==r(n[t],t,n););else{var e=Ur(n),t=e.length;Lr(n,function(n,u,o){return u=e?e[--t]:--t,false===r(o[u],u,o)&&er})}}function M(n,r,t){var e=-1,u=n?n.length:0;if(r=X(r,t,3),typeof u=="number")for(var o=Array(u);++e<u;)o[e]=r(n[e],e,n);else o=[],Lr(n,function(n,t,u){o[++e]=r(n,t,u)});return o}function $(n,r,t){var e=-1/0,u=e;typeof r!="function"&&t&&t[r]===n&&(r=null);var o=-1,i=n?n.length:0;if(null==r&&typeof i=="number")for(;++o<i;)t=n[o],t>u&&(u=t);
|
||||
else r=X(r,t,3),D(n,function(n,t,o){t=r(n,t,o),t>e&&(e=t,u=n)});return u}function W(n,r,t,e){if(!n)return t;var u=3>arguments.length;r=X(r,e,4);var o=-1,i=n.length;if(typeof i=="number")for(u&&(t=n[++o]);++o<i;)t=r(t,n[o],o,n);else Lr(n,function(n,e,o){t=u?(u=false,n):r(t,n,e,o)});return t}function z(n,r,t,e){var u=3>arguments.length;return r=X(r,e,4),I(n,function(n,e,o){t=u?(u=false,n):r(t,n,e,o)}),t}function C(n){var r=-1,t=n?n.length:0,e=Array(typeof t=="number"?t:0);return D(n,function(n){var t;t=++r,t=0+Sr(Wr()*(t-0+1)),e[r]=e[t],e[t]=n
|
||||
}),e}function P(n,r,t){var e;r=X(r,t,3),t=-1;var u=n?n.length:0;if(typeof u=="number")for(;++t<u&&!(e=r(n[t],t,n)););else Lr(n,function(n,t,u){return(e=r(n,t,u))&&er});return!!e}function U(n,r,t){return t&&E(r)?rr:(t?q:F)(n,r)}function V(n,r,t){var u=0,o=n?n.length:0;if(typeof r!="number"&&null!=r){var i=-1;for(r=X(r,t,3);++i<o&&r(n[i],i,n);)u++}else if(u=r,null==u||t)return n?n[0]:rr;return e(n,0,$r(Mr(0,u),o))}function G(r,t,e){if(typeof e=="number"){var u=r?r.length:0;e=0>e?Mr(0,u+e):e||0}else if(e)return e=J(r,t),r[e]===t?e:-1;
|
||||
return n(r,t,e)}function H(n,r,t){if(typeof r!="number"&&null!=r){var u=0,o=-1,i=n?n.length:0;for(r=X(r,t,3);++o<i&&r(n[o],o,n);)u++}else u=null==r||t?1:Mr(0,r);return e(n,u)}function J(n,r,t,e){var u=0,o=n?n.length:u;for(t=t?X(t,e,1):Y,r=t(r);u<o;)e=u+o>>>1,t(n[e])<r?u=e+1:o=e;return u}function K(n,r,t,e){return typeof r!="boolean"&&null!=r&&(e=t,t=typeof r!="function"&&e&&e[r]===n?null:r,r=false),null!=t&&(t=X(t,e,3)),g(n,r,t)}function L(n,r){return 2<arguments.length?v(n,17,e(arguments,2),null,r):v(n,1,null,null,r)
|
||||
}function Q(n,r,t){var e,u,o,i,f,a,l,c=0,p=false,s=true;if(!A(n))throw new TypeError;if(r=Mr(0,r)||0,true===t)var g=true,s=false;else O(t)&&(g=t.leading,p="maxWait"in t&&(Mr(r,t.maxWait)||0),s="trailing"in t?t.trailing:s);var h=function(){var t=r-(nt()-i);0<t?a=setTimeout(h,t):(u&&clearTimeout(u),t=l,u=a=l=rr,t&&(c=nt(),o=n.apply(f,e),a||u||(e=f=null)))},v=function(){a&&clearTimeout(a),u=a=l=rr,(s||p!==r)&&(c=nt(),o=n.apply(f,e),a||u||(e=f=null))};return function(){if(e=arguments,i=nt(),f=this,l=s&&(a||!g),false===p)var t=g&&!a;
|
||||
else{u||g||(c=i);var y=p-(i-c),m=0>=y;m?(u&&(u=clearTimeout(u)),c=i,o=n.apply(f,e)):u||(u=setTimeout(v,y))}return m&&a?a=clearTimeout(a):a||r===p||(a=setTimeout(h,r)),t&&(m=true,o=n.apply(f,e)),!m||a||u||(e=f=null),o}}function X(n,r,t){var e=typeof n;if(null==n||"function"==e)return a(n,r,t);if("object"!=e)return nr(n);var u=Ur(n);return function(r){for(var t=u.length,e=false;t--&&(e=r[u[t]]===n[u[t]]););return e}}function Y(n){return n}function Z(n){D(x(n),function(r){var t=u[r]=n[r];u.prototype[r]=function(){var n=[this.__wrapped__];
|
||||
return Rr.apply(n,arguments),n=t.apply(u,n),this.__chain__?new o(n,true):n}})}function nr(n){return function(r){return r[n]}}var rr,tr=0,er={},ur=+new Date+"",or=/($^)/,ir=/['\n\r\t\u2028\u2029\\]/g,fr="[object Arguments]",ar="[object Array]",lr="[object Boolean]",cr="[object Date]",pr="[object Number]",sr="[object Object]",gr="[object RegExp]",hr="[object String]",vr={"boolean":false,"function":true,object:true,number:false,string:false,undefined:false},yr={"\\":"\\","'":"'","\n":"n","\r":"r","\t":"t","\u2028":"u2028","\u2029":"u2029"},mr=vr[typeof window]&&window||this,_r=vr[typeof exports]&&exports&&!exports.nodeType&&exports,dr=vr[typeof module]&&module&&!module.nodeType&&module,br=dr&&dr.exports===_r&&_r,wr=vr[typeof global]&&global;
|
||||
!wr||wr.global!==wr&&wr.window!==wr||(mr=wr);var jr=[],xr=Object.prototype,Tr=mr._,Er=xr.toString,Ar=RegExp("^"+(Er+"").replace(/[.*+?^${}()|[\]\\]/g,"\\$&").replace(/toString| for [^\]]+/g,".*?")+"$"),Or=Math.ceil,Sr=Math.floor,Nr=xr.hasOwnProperty,Rr=jr.push,kr=xr.propertyIsEnumerable,Br=_(Br=Object.create)&&Br,Fr=_(Fr=Array.isArray)&&Fr,qr=mr.isFinite,Dr=mr.isNaN,Ir=_(Ir=Object.keys)&&Ir,Mr=Math.max,$r=Math.min,Wr=Math.random;o.prototype=u.prototype;var zr={};!function(){var n={0:1,length:1};zr.spliceObjects=(jr.splice.call(n,0,1),!n[0])
|
||||
}(1),u.templateSettings={escape:/<%-([\s\S]+?)%>/g,evaluate:/<%([\s\S]+?)%>/g,interpolate:/<%=([\s\S]+?)%>/g,variable:""},Br||(f=function(){function n(){}return function(r){if(O(r)){n.prototype=r;var t=new n;n.prototype=null}return t||mr.Object()}}()),b(arguments)||(b=function(n){return n&&typeof n=="object"&&typeof n.length=="number"&&Nr.call(n,"callee")&&!kr.call(n,"callee")||false});var Cr=Fr||function(n){return n&&typeof n=="object"&&typeof n.length=="number"&&Er.call(n)==ar||false},Pr=function(n){var r,t=[];
|
||||
if(!n||!vr[typeof n])return t;for(r in n)Nr.call(n,r)&&t.push(r);return t},Ur=Ir?function(n){return O(n)?Ir(n):[]}:Pr,Vr={"&":"&","<":"<",">":">",'"':""","'":"'"},Gr=T(Vr),Hr=RegExp("("+Ur(Gr).join("|")+")","g"),Jr=RegExp("["+Ur(Vr).join("")+"]","g"),Kr=function(n,r){var t;if(!n||!vr[typeof n])return n;for(t in n)if(r(n[t],t,n)===er)break;return n},Lr=function(n,r){var t;if(!n||!vr[typeof n])return n;for(t in n)if(Nr.call(n,t)&&r(n[t],t,n)===er)break;return n};A(/x/)&&(A=function(n){return typeof n=="function"&&"[object Function]"==Er.call(n)
|
||||
});var Qr=h(function(n,r,t){Nr.call(n,t)?n[t]++:n[t]=1}),Xr=h(function(n,r,t){(Nr.call(n,t)?n[t]:n[t]=[]).push(r)}),Yr=h(function(n,r,t){n[t]=r}),Zr=M,nt=_(nt=Date.now)&&nt||function(){return(new Date).getTime()};u.after=function(n,r){if(!A(r))throw new TypeError;return function(){return 1>--n?r.apply(this,arguments):void 0}},u.bind=L,u.bindAll=function(n){for(var r=1<arguments.length?p(arguments,true,false,1):x(n),t=-1,e=r.length;++t<e;){var u=r[t];n[u]=v(n[u],1,null,null,n)}return n},u.chain=function(n){return n=new o(n),n.__chain__=true,n
|
||||
},u.compact=function(n){for(var r=-1,t=n?n.length:0,e=[];++r<t;){var u=n[r];u&&e.push(u)}return e},u.compose=function(){for(var n=arguments,r=n.length;r--;)if(!A(n[r]))throw new TypeError;return function(){for(var r=arguments,t=n.length;t--;)r=[n[t].apply(this,r)];return r[0]}},u.countBy=Qr,u.debounce=Q,u.defaults=j,u.defer=function(n){if(!A(n))throw new TypeError;var r=e(arguments,1);return setTimeout(function(){n.apply(rr,r)},1)},u.delay=function(n,r){if(!A(n))throw new TypeError;var t=e(arguments,2);
|
||||
return setTimeout(function(){n.apply(rr,t)},r)},u.difference=function(n){return c(n,p(arguments,true,true,1))},u.filter=F,u.flatten=function(n,r){return p(n,r)},u.forEach=D,u.functions=x,u.groupBy=Xr,u.indexBy=Yr,u.initial=function(n,r,t){var u=0,o=n?n.length:0;if(typeof r!="number"&&null!=r){var i=o;for(r=X(r,t,3);i--&&r(n[i],i,n);)u++}else u=null==r||t?1:r||u;return e(n,0,$r(Mr(0,o-u),o))},u.intersection=function(){for(var n=[],r=-1,t=arguments.length;++r<t;){var e=arguments[r];(Cr(e)||b(e))&&n.push(e)
|
||||
}var u=n[0],o=-1,i=m(),f=u?u.length:0,a=[];n:for(;++o<f;)if(e=u[o],0>i(a,e)){for(r=t;--r;)if(0>i(n[r],e))continue n;a.push(e)}return a},u.invert=T,u.invoke=function(n,r){var t=e(arguments,2),u=-1,o=typeof r=="function",i=n?n.length:0,f=Array(typeof i=="number"?i:0);return D(n,function(n){f[++u]=(o?r:n[r]).apply(n,t)}),f},u.keys=Ur,u.map=M,u.max=$,u.memoize=function(n,r){var t={};return function(){var e=r?r.apply(this,arguments):ur+arguments[0];return Nr.call(t,e)?t[e]:t[e]=n.apply(this,arguments)
|
||||
}},u.min=function(n,r,t){var e=1/0,u=e;typeof r!="function"&&t&&t[r]===n&&(r=null);var o=-1,i=n?n.length:0;if(null==r&&typeof i=="number")for(;++o<i;)t=n[o],t<u&&(u=t);else r=X(r,t,3),D(n,function(n,t,o){t=r(n,t,o),t<e&&(e=t,u=n)});return u},u.omit=function(n){var r=[];Kr(n,function(n,t){r.push(t)});for(var r=c(r,p(arguments,true,false,1)),t=-1,e=r.length,u={};++t<e;){var o=r[t];u[o]=n[o]}return u},u.once=function(n){var r,t;if(!A(n))throw new TypeError;return function(){return r?t:(r=true,t=n.apply(this,arguments),n=null,t)
|
||||
}},u.pairs=function(n){for(var r=-1,t=Ur(n),e=t.length,u=Array(e);++r<e;){var o=t[r];u[r]=[o,n[o]]}return u},u.partial=function(n){return v(n,16,e(arguments,1))},u.pick=function(n){for(var r=-1,t=p(arguments,true,false,1),e=t.length,u={};++r<e;){var o=t[r];o in n&&(u[o]=n[o])}return u},u.pluck=Zr,u.range=function(n,r,t){n=+n||0,t=+t||1,null==r&&(r=n,n=0);var e=-1;r=Mr(0,Or((r-n)/t));for(var u=Array(r);++e<r;)u[e]=n,n+=t;return u},u.reject=function(n,r,t){return r=X(r,t,3),F(n,function(n,t,e){return!r(n,t,e)
|
||||
})},u.rest=H,u.shuffle=C,u.sortBy=function(n,t,e){var u=-1,o=n?n.length:0,i=Array(typeof o=="number"?o:0);for(t=X(t,e,3),D(n,function(n,r,e){i[++u]={m:[t(n,r,e)],n:u,o:n}}),o=i.length,i.sort(r);o--;)i[o]=i[o].o;return i},u.tap=function(n,r){return r(n),n},u.throttle=function(n,r,t){var e=true,u=true;if(!A(n))throw new TypeError;return false===t?e=false:O(t)&&(e="leading"in t?t.leading:e,u="trailing"in t?t.trailing:u),t={},t.leading=e,t.maxWait=r,t.trailing=u,Q(n,r,t)},u.times=function(n,r,t){n=-1<(n=+n)?n:0;
|
||||
var e=-1,u=Array(n);for(r=a(r,t,1);++e<n;)u[e]=r(e);return u},u.toArray=function(n){return Cr(n)?e(n):n&&typeof n.length=="number"?M(n):R(n)},u.union=function(){return g(p(arguments,true,true))},u.uniq=K,u.values=R,u.where=U,u.without=function(n){return c(n,e(arguments,1))},u.wrap=function(n,r){return v(r,16,[n])},u.zip=function(){for(var n=-1,r=$(Zr(arguments,"length")),t=Array(0>r?0:r);++n<r;)t[n]=Zr(arguments,n);return t},u.collect=M,u.drop=H,u.each=D,u.extend=w,u.methods=x,u.object=function(n,r){var t=-1,e=n?n.length:0,u={};
|
||||
for(r||!e||Cr(n[0])||(r=[]);++t<e;){var o=n[t];r?u[o]=r[t]:o&&(u[o[0]]=o[1])}return u},u.select=F,u.tail=H,u.unique=K,u.clone=function(n){return O(n)?Cr(n)?e(n):w({},n):n},u.contains=k,u.escape=function(n){return null==n?"":(n+"").replace(Jr,y)},u.every=B,u.find=q,u.has=function(n,r){return n?Nr.call(n,r):false},u.identity=Y,u.indexOf=G,u.isArguments=b,u.isArray=Cr,u.isBoolean=function(n){return true===n||false===n||n&&typeof n=="object"&&Er.call(n)==lr||false},u.isDate=function(n){return n&&typeof n=="object"&&Er.call(n)==cr||false
|
||||
},u.isElement=function(n){return n&&1===n.nodeType||false},u.isEmpty=E,u.isEqual=function(n,r){return s(n,r)},u.isFinite=function(n){return qr(n)&&!Dr(parseFloat(n))},u.isFunction=A,u.isNaN=function(n){return S(n)&&n!=+n},u.isNull=function(n){return null===n},u.isNumber=S,u.isObject=O,u.isRegExp=function(n){return n&&vr[typeof n]&&Er.call(n)==gr||false},u.isString=N,u.isUndefined=function(n){return typeof n=="undefined"},u.lastIndexOf=function(n,r,t){var e=n?n.length:0;for(typeof t=="number"&&(e=(0>t?Mr(0,e+t):$r(t,e-1))+1);e--;)if(n[e]===r)return e;
|
||||
return-1},u.mixin=Z,u.noConflict=function(){return mr._=Tr,this},u.random=function(n,r){return null==n&&null==r&&(r=1),n=+n||0,null==r?(r=n,n=0):r=+r||0,n+Sr(Wr()*(r-n+1))},u.reduce=W,u.reduceRight=z,u.result=function(n,r){if(n){var t=n[r];return A(t)?n[r]():t}},u.size=function(n){var r=n?n.length:0;return typeof r=="number"?r:Ur(n).length},u.some=P,u.sortedIndex=J,u.template=function(n,r,e){var o=u,i=o.templateSettings;n=(n||"")+"",e=j({},e,i);var f=0,a="__p+='",i=e.variable;n.replace(RegExp((e.escape||or).source+"|"+(e.interpolate||or).source+"|"+(e.evaluate||or).source+"|$","g"),function(r,e,u,o,i){return a+=n.slice(f,i).replace(ir,t),e&&(a+="'+_.escape("+e+")+'"),o&&(a+="';"+o+";\n__p+='"),u&&(a+="'+((__t=("+u+"))==null?'':__t)+'"),f=i+r.length,r
|
||||
}),a+="';",i||(i="obj",a="with("+i+"||{}){"+a+"}"),a="function("+i+"){var __t,__p='',__j=Array.prototype.join;function print(){__p+=__j.call(arguments,'')}"+a+"return __p}";try{var l=Function("_","return "+a)(o)}catch(c){throw c.source=a,c}return r?l(r):(l.source=a,l)},u.unescape=function(n){return null==n?"":(n+"").replace(Hr,d)},u.uniqueId=function(n){var r=++tr+"";return n?n+r:r},u.all=B,u.any=P,u.detect=q,u.findWhere=function(n,r){return U(n,r,true)},u.foldl=W,u.foldr=z,u.include=k,u.inject=W,u.first=V,u.last=function(n,r,t){var u=0,o=n?n.length:0;
|
||||
if(typeof r!="number"&&null!=r){var i=o;for(r=X(r,t,3);i--&&r(n[i],i,n);)u++}else if(u=r,null==u||t)return n?n[o-1]:rr;return e(n,Mr(0,o-u))},u.sample=function(n,r,t){return n&&typeof n.length!="number"&&(n=R(n)),null==r||t?n?n[0+Sr(Wr()*(n.length-1-0+1))]:rr:(n=C(n),n.length=$r(Mr(0,r),n.length),n)},u.take=V,u.head=V,Z(u),u.VERSION="2.4.1",u.prototype.chain=function(){return this.__chain__=true,this},u.prototype.value=function(){return this.__wrapped__},D("pop push reverse shift sort splice unshift".split(" "),function(n){var r=jr[n];
|
||||
u.prototype[n]=function(){var n=this.__wrapped__;return r.apply(n,arguments),zr.spliceObjects||0!==n.length||delete n[0],this}}),D(["concat","join","slice"],function(n){var r=jr[n];u.prototype[n]=function(){var n=r.apply(this.__wrapped__,arguments);return this.__chain__&&(n=new o(n),n.__chain__=true),n}}),typeof define=="function"&&typeof define.amd=="object"&&define.amd?(mr._=u, define(function(){return u})):_r&&dr?br?(dr.exports=u)._=u:_r._=u:mr._=u}).call(this);
|
15
src/bower_components/requirejs/.bower.json
vendored
Normal file
15
src/bower_components/requirejs/.bower.json
vendored
Normal file
|
@ -0,0 +1,15 @@
|
|||
{
|
||||
"name": "requirejs",
|
||||
"homepage": "https://github.com/jrburke/requirejs",
|
||||
"version": "2.1.10",
|
||||
"_release": "2.1.10",
|
||||
"_resolution": {
|
||||
"type": "version",
|
||||
"tag": "2.1.10",
|
||||
"commit": "9177e1a6254237ffa27b05622979d8721b228a49"
|
||||
},
|
||||
"_source": "git://github.com/jrburke/requirejs.git",
|
||||
"_target": "~2.1.10",
|
||||
"_originalSource": "requirejs",
|
||||
"_direct": true
|
||||
}
|
8
src/bower_components/requirejs/.gitignore
vendored
Normal file
8
src/bower_components/requirejs/.gitignore
vendored
Normal file
|
@ -0,0 +1,8 @@
|
|||
.DS_Store
|
||||
docs/jquery-require-sample/webapp-build/
|
||||
docs/jquery-require-sample/dist
|
||||
dist/dist-site/
|
||||
dist/dist-build/
|
||||
shrinktest.sh
|
||||
tests/layers/allplugins-require.js
|
||||
tests/packages/optimizing/built/
|
58
src/bower_components/requirejs/LICENSE
vendored
Normal file
58
src/bower_components/requirejs/LICENSE
vendored
Normal file
|
@ -0,0 +1,58 @@
|
|||
RequireJS is released under two licenses: new BSD, and MIT. You may pick the
|
||||
license that best suits your development needs. The text of both licenses are
|
||||
provided below.
|
||||
|
||||
|
||||
The "New" BSD License:
|
||||
----------------------
|
||||
|
||||
Copyright (c) 2010-2013, The Dojo Foundation
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use 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 the Dojo Foundation nor the names of its contributors
|
||||
may be used to endorse or promote products derived from this software
|
||||
without specific prior written permission.
|
||||
|
||||
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.
|
||||
|
||||
|
||||
|
||||
MIT License
|
||||
-----------
|
||||
|
||||
Copyright (c) 2010-2013, The Dojo Foundation
|
||||
|
||||
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.
|
75
src/bower_components/requirejs/README.md
vendored
Normal file
75
src/bower_components/requirejs/README.md
vendored
Normal file
|
@ -0,0 +1,75 @@
|
|||
# RequireJS
|
||||
|
||||
RequireJS loads plain JavaScript files as well as more defined modules. It is
|
||||
optimized for in-browser use, including in
|
||||
[a Web Worker](http://requirejs.org/docs/api.html#webworker), but it can be used
|
||||
in other JavaScript environments, like Rhino and
|
||||
[Node](http://requirejs.org/docs/node.html). It implements the
|
||||
[Asynchronous Module](https://github.com/amdjs/amdjs-api/wiki/AMD)
|
||||
API.
|
||||
|
||||
RequireJS uses plain script tags to load modules/files, so it should allow for
|
||||
easy debugging. It can be used
|
||||
[simply to load existing JavaScript files](http://requirejs.org/docs/api.html#jsfiles),
|
||||
so you can add it to your existing project without having to re-write your
|
||||
JavaScript files.
|
||||
|
||||
RequireJS includes [an optimization tool](http://requirejs.org/docs/optimization.html)
|
||||
you can run as part of your packaging steps for deploying your code. The
|
||||
optimization tool can combine and minify your JavaScript files to allow for
|
||||
better performance.
|
||||
|
||||
If the JavaScript file defines a JavaScript module via
|
||||
[define()](http://requirejs.org/docs/api.html#define), then there are other benefits
|
||||
RequireJS can offer: [improvements over traditional CommonJS modules](http://requirejs.org/docs/commonjs.html)
|
||||
and [loading multiple versions](http://requirejs.org/docs/api.html#multiversion)
|
||||
of a module in a page. RequireJS also has a plugin system that supports features like
|
||||
[i18n string bundles](http://requirejs.org/docs/api.html#i18n), and
|
||||
[text file dependencies](http://requirejs.org/docs/api.html#text).
|
||||
|
||||
RequireJS does not have any dependencies on a JavaScript framework.
|
||||
It is dual-licensed -- new BSD or MIT.
|
||||
|
||||
The standard require.js file is around 5.5KB when minified via Closure Compiler
|
||||
and gzipped.
|
||||
|
||||
RequireJS works in IE 6+, Firefox 2+, Safari 3.2+, Chrome 3+, and Opera 10+.
|
||||
|
||||
[Latest Release](http://requirejs.org/docs/download.html)
|
||||
|
||||
## Directories
|
||||
|
||||
* **dist**: Scripts and assets to generate the requirejs.org docs, and for
|
||||
generating a require.js release.
|
||||
* **docs**: The raw HTML files for the requirejs.org docs. Only includes the
|
||||
body of each page. Files in **dist** are used to generate a complete HTML page.
|
||||
* **tests**: Tests for require.js.
|
||||
* **testBaseUrl.js**: A file used in the tests inside **tests**. Purposely
|
||||
placed outside the tests directory for testing paths that go outside a baseUrl.
|
||||
* **updatesubs.sh**: Updates projects that depend on require.js Assumes the
|
||||
projects are siblings to this directory and have specific names. Useful to
|
||||
copy require.js to dependent projects easily while in development.
|
||||
|
||||
## Tests
|
||||
|
||||
This repo assumes some other repos are checked out as siblings to this repo:
|
||||
|
||||
git clone https://github.com/requirejs/text.git
|
||||
git clone https://github.com/requirejs/i18n.git
|
||||
git clone https://github.com/requirejs/domReady.git
|
||||
git clone https://github.com/requirejs/requirejs.git
|
||||
|
||||
So when the above clones are done, the directory structure should look like:
|
||||
|
||||
* domReady
|
||||
* i18n
|
||||
* text
|
||||
* requirejs (this repo)
|
||||
|
||||
You will need to be connected to the internet because the JSONP and
|
||||
remoteUrls tests access the internet to complete their tests.
|
||||
|
||||
Serve the directory with these 4 siblings from a web server. It can be a local web server.
|
||||
|
||||
Open requirejs/tests/index.html in all the browsers, click the arrow button to run all
|
||||
the tests.
|
30
src/bower_components/requirejs/dist/Markdown-License.text
vendored
Normal file
30
src/bower_components/requirejs/dist/Markdown-License.text
vendored
Normal file
|
@ -0,0 +1,30 @@
|
|||
Copyright (c) 2004, John Gruber
|
||||
<http://daringfireball.net/>
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use 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 "Markdown" nor the names of its contributors may
|
||||
be used to endorse or promote products derived from this software
|
||||
without specific prior written permission.
|
||||
|
||||
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.
|
1450
src/bower_components/requirejs/dist/Markdown.pl
vendored
Executable file
1450
src/bower_components/requirejs/dist/Markdown.pl
vendored
Executable file
File diff suppressed because it is too large
Load diff
70
src/bower_components/requirejs/dist/README.md
vendored
Normal file
70
src/bower_components/requirejs/dist/README.md
vendored
Normal file
|
@ -0,0 +1,70 @@
|
|||
# RequireJS dist
|
||||
|
||||
This directory contains the tools that are used to build distributions of RequireJS and its web site.
|
||||
|
||||
When doing a release, do the following:
|
||||
|
||||
* Update files to the new version number:
|
||||
* require.js, both places
|
||||
* docs/download.md: check for nested paths too, add new release section
|
||||
* pre.html
|
||||
* post.html
|
||||
* Update version in x.js in the r.js project if necessary.
|
||||
* .updatesubs.sh
|
||||
* Check in changes to r.js project.
|
||||
* Check in changes to sample projects:
|
||||
* requirejs/example-jquery-cdn
|
||||
* requirejs/example-jquery-shim
|
||||
* requirejs/example-multipage
|
||||
* requirejs/example-multipage-shim
|
||||
* requirejs/example-libglobal
|
||||
* volojs/create-template
|
||||
* volojs/create-responsive-template
|
||||
|
||||
* Tag the requirejs and r.js trees:
|
||||
* git tag -am "Release 0.0.0" 0.0.0
|
||||
* git push --tags
|
||||
|
||||
* Commit changes to cajon, test
|
||||
* Rev cajon version
|
||||
* change package.json
|
||||
* tag it
|
||||
* Update the requirejs-npm directory
|
||||
* Update version in package.json
|
||||
* Modify bin/r.js to add: #!/usr/bin/env node
|
||||
* npm uninstall -g requirejs
|
||||
* npm install . -g
|
||||
* r.js -v
|
||||
* node (then use repl to do require("requirejs"))
|
||||
* Try a local install.
|
||||
* npm publish (in the requirejs-npm/requirejs directory)
|
||||
* Update requirejs-bower
|
||||
* tag the repo, with "latest" too.
|
||||
* git push
|
||||
* Update the requirejs-nuget directory (DO ON WINDOWS)
|
||||
* Update the require.js and r.js versions in content/Scripts using `volo add -nostamp -f`
|
||||
* Update Package.nuspec to rev version number.
|
||||
* NuGet.exe Pack Package.nuspec
|
||||
* NuGet.exe Push RequireJS.0.0.0.nupkg
|
||||
|
||||
Now pull down the tagged version to do a distribution, do this in git/ directory:
|
||||
|
||||
* rm -rf ./requirejs-dist ./requirejs-build
|
||||
* git clone git://github.com/jrburke/requirejs.git requirejs-dist
|
||||
* cd requirejs-dist
|
||||
* git checkout 0.0.0
|
||||
* cd dist
|
||||
|
||||
Run the distribution tasks.
|
||||
|
||||
To generate a build
|
||||
|
||||
* ./dist-build.sh 0.0.0
|
||||
|
||||
To generate the web site:
|
||||
|
||||
* node dist-site.js
|
||||
* cd dist-site
|
||||
* zip -r docs.zip ./*
|
||||
* mv docs.zip ../../../requirejs-build/
|
||||
|
42
src/bower_components/requirejs/dist/dist-build.sh
vendored
Executable file
42
src/bower_components/requirejs/dist/dist-build.sh
vendored
Executable file
|
@ -0,0 +1,42 @@
|
|||
#!/bin/bash
|
||||
|
||||
#@license RequireJS Copyright (c) 2010-2011, The Dojo Foundation All Rights Reserved.
|
||||
#Available via the MIT or new BSD license.
|
||||
#see: http://github.com/jrburke/requirejs for details
|
||||
|
||||
#version should be something like 0.9.0beta or 0.9.0
|
||||
version=$1
|
||||
if [ -z $version ]; then
|
||||
echo "Please pass in a version number"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
myDir=`cd \`dirname "$0"\`; pwd`
|
||||
|
||||
# First update the sub-projects with the latest.
|
||||
cd ..
|
||||
./updatesubs.sh
|
||||
cd dist
|
||||
|
||||
# Setup a build directory
|
||||
rm -rf ../../requirejs-build
|
||||
mkdir ../../requirejs-build
|
||||
|
||||
# Create the version output dir
|
||||
cd ../../requirejs-build
|
||||
mkdir $version
|
||||
mkdir $version/minified
|
||||
mkdir $version/comments
|
||||
|
||||
# Copy over the r.js file, and set up that project for a dist checkin.
|
||||
cp ../r.js/r.js $version/r.js
|
||||
cp ../r.js/r.js ../r.js/dist/r-$version.js
|
||||
|
||||
# Copy over basic script deliverables
|
||||
cp $myDir/../require.js $version/comments/require.js
|
||||
|
||||
# Minify any of the browser-based JS files
|
||||
cd $version/comments
|
||||
java -jar ../../../r.js/lib/closure/compiler.jar --js require.js --js_output_file ../minified/require.js
|
||||
|
||||
cd ../../../
|
131
src/bower_components/requirejs/dist/dist-site.js
vendored
Normal file
131
src/bower_components/requirejs/dist/dist-site.js
vendored
Normal file
|
@ -0,0 +1,131 @@
|
|||
/**
|
||||
* @license RequireJS Copyright (c) 2010-2011, The Dojo Foundation All Rights Reserved.
|
||||
* Available via the MIT or new BSD license.
|
||||
* see: http://github.com/jrburke/requirejs for details
|
||||
*/
|
||||
|
||||
/*
|
||||
To run this file:
|
||||
|
||||
> node dist-site.js
|
||||
|
||||
*/
|
||||
|
||||
/*jslint regexp: false, nomen: false, plusplus: false, strict: false */
|
||||
/*global require: false, console: false */
|
||||
|
||||
var files, htmlFile, transFile, fileContents,
|
||||
preContents, postContents, h1, homePath, cssPath,
|
||||
ieCssPath, jsPath, length, j, title,
|
||||
isTopPage = false,
|
||||
fileIndex = 0,
|
||||
h1RegExp = /<h1>([^<]+)<\/h1>/,
|
||||
file = require('./file'),
|
||||
child_process = require('child_process');
|
||||
|
||||
//Copy all the text files to a dist directory
|
||||
//file.deleteFile("./dist-site/");
|
||||
file.copyFile("init.js", "./dist-site/init.js");
|
||||
file.copyDir("fonts", "./dist-site/fonts", /\w/);
|
||||
file.copyFile("../index.html", "./dist-site/index.html");
|
||||
file.copyDir("../docs/", "./dist-site/docs/", /\w/);
|
||||
|
||||
preContents = file.readFile("pre.html");
|
||||
postContents = file.readFile("post.html");
|
||||
|
||||
//Convert each .html file to a full HTML file
|
||||
files = file.getFilteredFileList("./dist-site", /\.html$/, true);
|
||||
|
||||
function processFile() {
|
||||
htmlFile = files[fileIndex];
|
||||
fileIndex += 1;
|
||||
if (!htmlFile) {
|
||||
//Done processing files.
|
||||
return;
|
||||
}
|
||||
|
||||
transFile = htmlFile + '.trans';
|
||||
|
||||
console.log("Creating " + htmlFile);
|
||||
|
||||
//Do Markdown
|
||||
child_process.exec(
|
||||
"./Markdown.pl --html4tags " + htmlFile + " > " + transFile,
|
||||
function (error, stdout, stderr) {
|
||||
if (error) {
|
||||
console.log('Could not markdown ' + htmlFile);
|
||||
processFile();
|
||||
return;
|
||||
}
|
||||
|
||||
//Build up a complete HTML file.
|
||||
fileContents = file.readFile(transFile);
|
||||
|
||||
//Find the page title.
|
||||
title = h1RegExp.exec(fileContents);
|
||||
title = title && title[1];
|
||||
|
||||
fileContents = preContents + fileContents + postContents;
|
||||
|
||||
//Set the title of the HTML page
|
||||
h1 = fileContents.match(/<h1>([^<]+)<\/h1>/);
|
||||
if (h1 && h1[1]) {
|
||||
h1 = h1[1];
|
||||
} else {
|
||||
h1 = "";
|
||||
}
|
||||
|
||||
fileContents = fileContents.replace(/\$\{title\}/, h1);
|
||||
|
||||
//Change any .md references to .html references, and remove tree/master
|
||||
//links
|
||||
fileContents = fileContents
|
||||
.replace(/href="requirejs\/tree\/master\/docs\//g, 'href="docs/')
|
||||
.replace(/href="([^"]+)\.md/g, 'href="$1.html');
|
||||
|
||||
//Adjust the path the home and main.css
|
||||
homePath = htmlFile.replace(/\/[^\/]+$/, "").replace(/^\.\/dist-site\//, "");
|
||||
if (!homePath || homePath === "dist-site") {
|
||||
isTopPage = true;
|
||||
homePath = "./";
|
||||
cssPath = "main.css";
|
||||
ieCssPath = "ie.css";
|
||||
jsPath = "init.js";
|
||||
} else {
|
||||
isTopPage = false;
|
||||
length = homePath.split("/").length;
|
||||
homePath = "";
|
||||
for (j = 0; j < length - 1; j++) {
|
||||
homePath += "../";
|
||||
}
|
||||
cssPath = homePath + "main.css";
|
||||
ieCssPath = homePath + "ie.css";
|
||||
jsPath = homePath + "init.js";
|
||||
}
|
||||
fileContents = fileContents.replace(/HOMEPATH/g, homePath);
|
||||
fileContents = fileContents.replace(/\main\.css/, cssPath);
|
||||
fileContents = fileContents.replace(/\ie\.css/, ieCssPath);
|
||||
fileContents = fileContents.replace(/\init\.js/, jsPath);
|
||||
|
||||
//Set the page title to be the first h1 tag name
|
||||
if (title) {
|
||||
fileContents = fileContents.replace(/<title>[^<]*<\/title>/, '<title>' + title + '</title>');
|
||||
}
|
||||
|
||||
//If it is the top page, adjust the header links
|
||||
if (isTopPage) {
|
||||
fileContents = fileContents
|
||||
.replace(/href="\.\.\/"/g, 'href="./"')
|
||||
.replace(/class="local" href="([^"]+)"/g, 'class="local" href="docs/$1"');
|
||||
}
|
||||
|
||||
file.saveFile(htmlFile, fileContents);
|
||||
|
||||
file.deleteFile(transFile);
|
||||
|
||||
processFile();
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
processFile();
|
227
src/bower_components/requirejs/dist/file.js
vendored
Normal file
227
src/bower_components/requirejs/dist/file.js
vendored
Normal file
|
@ -0,0 +1,227 @@
|
|||
/**
|
||||
* @license Copyright (c) 2010-2011, The Dojo Foundation All Rights Reserved.
|
||||
* Available via the MIT or new BSD license.
|
||||
* see: http://github.com/jrburke/requirejs for details
|
||||
*/
|
||||
|
||||
/*jslint plusplus: false, octal:false, strict: false */
|
||||
/*global require: false, exports: false */
|
||||
|
||||
var fs = require('fs'),
|
||||
path = require('path'),
|
||||
file, prop;
|
||||
|
||||
function mkDir(dir) {
|
||||
if (!fs.existsSync(dir)) {
|
||||
fs.mkdirSync(dir, 0777);
|
||||
}
|
||||
}
|
||||
|
||||
function mkFullDir(dir) {
|
||||
var parts = dir.split('/'),
|
||||
currDir = '',
|
||||
first = true;
|
||||
parts.forEach(function (part) {
|
||||
//First part may be empty string if path starts with a slash.
|
||||
currDir += part + '/';
|
||||
first = false;
|
||||
|
||||
if (part) {
|
||||
mkDir(currDir);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
file = {
|
||||
backSlashRegExp: /\\/g,
|
||||
getLineSeparator: function () {
|
||||
return '/';
|
||||
},
|
||||
|
||||
exists: function (fileName) {
|
||||
return fs.existsSync(fileName);
|
||||
},
|
||||
|
||||
parent: function (fileName) {
|
||||
var parts = fileName.split('/');
|
||||
parts.pop();
|
||||
return parts.join('/');
|
||||
},
|
||||
|
||||
/**
|
||||
* Gets the absolute file path as a string, normalized
|
||||
* to using front slashes for path separators.
|
||||
* @param {String} fileName
|
||||
*/
|
||||
absPath: function (fileName) {
|
||||
return path.normalize(fs.realpathSync(fileName).replace(/\\/g, '/'));
|
||||
},
|
||||
|
||||
normalize: function (fileName) {
|
||||
return path.normalize(fileName);
|
||||
},
|
||||
|
||||
isFile: function (path) {
|
||||
return fs.statSync(path).isFile();
|
||||
},
|
||||
|
||||
isDirectory: function (path) {
|
||||
return fs.statSync(path).isDirectory();
|
||||
},
|
||||
|
||||
getFilteredFileList: function (/*String*/startDir, /*RegExp*/regExpFilters, /*boolean?*/makeUnixPaths) {
|
||||
//summary: Recurses startDir and finds matches to the files that match regExpFilters.include
|
||||
//and do not match regExpFilters.exclude. Or just one regexp can be passed in for regExpFilters,
|
||||
//and it will be treated as the "include" case.
|
||||
//Ignores files/directories that start with a period (.).
|
||||
var files = [], topDir, regExpInclude, regExpExclude, dirFileArray,
|
||||
i, stat, filePath, ok, dirFiles, fileName;
|
||||
|
||||
topDir = startDir;
|
||||
|
||||
regExpInclude = regExpFilters.include || regExpFilters;
|
||||
regExpExclude = regExpFilters.exclude || null;
|
||||
|
||||
if (fs.existsSync(topDir)) {
|
||||
dirFileArray = fs.readdirSync(topDir);
|
||||
for (i = 0; i < dirFileArray.length; i++) {
|
||||
fileName = dirFileArray[i];
|
||||
filePath = path.join(topDir, fileName);
|
||||
stat = fs.statSync(filePath);
|
||||
if (stat.isFile()) {
|
||||
if (makeUnixPaths) {
|
||||
//Make sure we have a JS string.
|
||||
if (filePath.indexOf("/") === -1) {
|
||||
filePath = filePath.replace(/\\/g, "/");
|
||||
}
|
||||
}
|
||||
|
||||
ok = true;
|
||||
if (regExpInclude) {
|
||||
ok = filePath.match(regExpInclude);
|
||||
}
|
||||
if (ok && regExpExclude) {
|
||||
ok = !filePath.match(regExpExclude);
|
||||
}
|
||||
|
||||
if (ok && !fileName.match(/^\./)) {
|
||||
files.push(filePath);
|
||||
}
|
||||
} else if (stat.isDirectory() && !fileName.match(/^\./)) {
|
||||
dirFiles = this.getFilteredFileList(filePath, regExpFilters, makeUnixPaths);
|
||||
files.push.apply(files, dirFiles);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return files; //Array
|
||||
},
|
||||
|
||||
copyDir: function (/*String*/srcDir, /*String*/destDir, /*RegExp?*/regExpFilter, /*boolean?*/onlyCopyNew) {
|
||||
//summary: copies files from srcDir to destDir using the regExpFilter to determine if the
|
||||
//file should be copied. Returns a list file name strings of the destinations that were copied.
|
||||
regExpFilter = regExpFilter || /\w/;
|
||||
|
||||
var fileNames = file.getFilteredFileList(srcDir, regExpFilter, true),
|
||||
copiedFiles = [], i, srcFileName, destFileName;
|
||||
|
||||
for (i = 0; i < fileNames.length; i++) {
|
||||
srcFileName = fileNames[i];
|
||||
destFileName = srcFileName.replace(srcDir, destDir);
|
||||
|
||||
if (file.copyFile(srcFileName, destFileName, onlyCopyNew)) {
|
||||
copiedFiles.push(destFileName);
|
||||
}
|
||||
}
|
||||
|
||||
return copiedFiles.length ? copiedFiles : null; //Array or null
|
||||
},
|
||||
|
||||
copyFile: function (/*String*/srcFileName, /*String*/destFileName, /*boolean?*/onlyCopyNew) {
|
||||
//summary: copies srcFileName to destFileName. If onlyCopyNew is set, it only copies the file if
|
||||
//srcFileName is newer than destFileName. Returns a boolean indicating if the copy occurred.
|
||||
var parentDir;
|
||||
|
||||
//logger.trace("Src filename: " + srcFileName);
|
||||
//logger.trace("Dest filename: " + destFileName);
|
||||
|
||||
//If onlyCopyNew is true, then compare dates and only copy if the src is newer
|
||||
//than dest.
|
||||
if (onlyCopyNew) {
|
||||
if (fs.existsSync(destFileName) && fs.statSync(destFileName).mtime.getTime() >= fs.statSync(srcFileName).mtime.getTime()) {
|
||||
return false; //Boolean
|
||||
}
|
||||
}
|
||||
|
||||
//Make sure destination dir exists.
|
||||
parentDir = path.dirname(destFileName);
|
||||
if (!fs.existsSync(parentDir)) {
|
||||
mkFullDir(parentDir);
|
||||
}
|
||||
|
||||
fs.writeFileSync(destFileName, fs.readFileSync(srcFileName, 'binary'), 'binary');
|
||||
return true; //Boolean
|
||||
},
|
||||
|
||||
/**
|
||||
* Reads a *text* file.
|
||||
*/
|
||||
readFile: function (/*String*/path, /*String?*/encoding) {
|
||||
if (encoding === 'utf-8') {
|
||||
encoding = 'utf8';
|
||||
}
|
||||
if (!encoding) {
|
||||
encoding = 'utf8';
|
||||
}
|
||||
|
||||
return fs.readFileSync(path, encoding);
|
||||
},
|
||||
|
||||
saveUtf8File: function (/*String*/fileName, /*String*/fileContents) {
|
||||
//summary: saves a *text* file using UTF-8 encoding.
|
||||
file.saveFile(fileName, fileContents, "utf8");
|
||||
},
|
||||
|
||||
saveFile: function (/*String*/fileName, /*String*/fileContents, /*String?*/encoding) {
|
||||
//summary: saves a *text* file.
|
||||
var parentDir;
|
||||
|
||||
if (encoding === 'utf-8') {
|
||||
encoding = 'utf8';
|
||||
}
|
||||
if (!encoding) {
|
||||
encoding = 'utf8';
|
||||
}
|
||||
|
||||
//Make sure destination directories exist.
|
||||
parentDir = path.dirname(fileName);
|
||||
if (!fs.existsSync(parentDir)) {
|
||||
mkFullDir(parentDir);
|
||||
}
|
||||
|
||||
fs.writeFileSync(fileName, fileContents, encoding);
|
||||
},
|
||||
|
||||
deleteFile: function (/*String*/fileName) {
|
||||
//summary: deletes a file or directory if it exists.
|
||||
var files, i, stat;
|
||||
if (fs.existsSync(fileName)) {
|
||||
stat = fs.statSync(fileName);
|
||||
if (stat.isDirectory()) {
|
||||
files = fs.readdirSync(fileName);
|
||||
for (i = 0; i < files.length; i++) {
|
||||
this.deleteFile(path.join(fileName, files[i]));
|
||||
}
|
||||
fs.rmdirSync(fileName);
|
||||
} else {
|
||||
fs.unlinkSync(fileName);
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
for (prop in file) {
|
||||
if (file.hasOwnProperty(prop)) {
|
||||
exports[prop] = file[prop];
|
||||
}
|
||||
}
|
BIN
src/bower_components/requirejs/dist/fonts/Inconsolata.ttf
vendored
Normal file
BIN
src/bower_components/requirejs/dist/fonts/Inconsolata.ttf
vendored
Normal file
Binary file not shown.
BIN
src/bower_components/requirejs/dist/fonts/PT-Sans/PT_Sans.ttf
vendored
Normal file
BIN
src/bower_components/requirejs/dist/fonts/PT-Sans/PT_Sans.ttf
vendored
Normal file
Binary file not shown.
BIN
src/bower_components/requirejs/dist/fonts/PT-Sans/PT_Sans_Bold.ttf
vendored
Normal file
BIN
src/bower_components/requirejs/dist/fonts/PT-Sans/PT_Sans_Bold.ttf
vendored
Normal file
Binary file not shown.
BIN
src/bower_components/requirejs/dist/fonts/PT-Sans/PT_Sans_Bold_Italic.ttf
vendored
Normal file
BIN
src/bower_components/requirejs/dist/fonts/PT-Sans/PT_Sans_Bold_Italic.ttf
vendored
Normal file
Binary file not shown.
BIN
src/bower_components/requirejs/dist/fonts/PT-Sans/PT_Sans_Caption.ttf
vendored
Normal file
BIN
src/bower_components/requirejs/dist/fonts/PT-Sans/PT_Sans_Caption.ttf
vendored
Normal file
Binary file not shown.
BIN
src/bower_components/requirejs/dist/fonts/PT-Sans/PT_Sans_Caption_Bold.ttf
vendored
Normal file
BIN
src/bower_components/requirejs/dist/fonts/PT-Sans/PT_Sans_Caption_Bold.ttf
vendored
Normal file
Binary file not shown.
BIN
src/bower_components/requirejs/dist/fonts/PT-Sans/PT_Sans_Italic.ttf
vendored
Normal file
BIN
src/bower_components/requirejs/dist/fonts/PT-Sans/PT_Sans_Italic.ttf
vendored
Normal file
Binary file not shown.
BIN
src/bower_components/requirejs/dist/fonts/PT-Sans/PT_Sans_Narrow.ttf
vendored
Normal file
BIN
src/bower_components/requirejs/dist/fonts/PT-Sans/PT_Sans_Narrow.ttf
vendored
Normal file
Binary file not shown.
BIN
src/bower_components/requirejs/dist/fonts/PT-Sans/PT_Sans_Narrow_Bold.ttf
vendored
Normal file
BIN
src/bower_components/requirejs/dist/fonts/PT-Sans/PT_Sans_Narrow_Bold.ttf
vendored
Normal file
Binary file not shown.
26
src/bower_components/requirejs/dist/fonts/PT-Sans/Paratype PT Sans Free Font License.txt
vendored
Normal file
26
src/bower_components/requirejs/dist/fonts/PT-Sans/Paratype PT Sans Free Font License.txt
vendored
Normal file
|
@ -0,0 +1,26 @@
|
|||
Copyright © 2009 ParaType Ltd.
|
||||
with Reserved Names "PT Sans" and "ParaType".
|
||||
|
||||
FONT LICENSE
|
||||
|
||||
PERMISSION & CONDITIONS
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy of the font software, to use, study, copy, merge, embed, modify, redistribute, and sell modified and unmodified copies of the font software, subject to the following conditions:
|
||||
|
||||
1) Neither the font software nor any of its individual components, in original or modified versions, may be sold by itself.
|
||||
|
||||
2) Original or modified versions of the font software may be bundled, redistributed and/or sold with any software, provided that each copy contains the above copyright notice and this license. These can be included either as stand-alone text files, human-readable headers or in the appropriate machine-readable metadata fields within text or binary files as long as those fields can be easily viewed by the user.
|
||||
|
||||
3) No modified version of the font software may use the Reserved Name(s) or combinations of Reserved Names with other words unless explicit written permission is granted by the ParaType. This restriction only applies to the primary font name as presented to the users.
|
||||
|
||||
4) The name of ParaType or the author(s) of the font software shall not be used to promote, endorse or advertise any modified version, except to acknowledge the contribution(s) of ParaType and the author(s) or with explicit written permission of ParaType.
|
||||
|
||||
5) The font software, modified or unmodified, in part or in whole, must be distributed entirely under this license, and must not be distributed under any other license. The requirement for fonts to remain under this license does not apply to any document created using the Font Software.
|
||||
|
||||
TERMINATION & TERRITORY
|
||||
This license has no limits on time and territory, but it becomes null and void if any of the above conditions are not met.
|
||||
|
||||
DISCLAIMER
|
||||
THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL PARATYPE BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM OTHER DEALINGS IN THE FONT SOFTWARE.
|
||||
|
||||
ParaType Ltd
|
||||
http://www.paratype.ru
|
35
src/bower_components/requirejs/dist/init.js
vendored
Normal file
35
src/bower_components/requirejs/dist/init.js
vendored
Normal file
|
@ -0,0 +1,35 @@
|
|||
$(document).ready(function($) {
|
||||
|
||||
// set panel min-height to full browser height
|
||||
$(window).bind("load resize", function(){
|
||||
var h = $(window).height();
|
||||
$("#wrapper, #grid, #navBg").css({ "min-height" : (h) });
|
||||
$("#content").css({ "min-height" : (h-168) });
|
||||
});
|
||||
|
||||
// toggle grid
|
||||
|
||||
$("#grid").hide();
|
||||
|
||||
$(document.documentElement).keyup(function (event) {
|
||||
if (event.keyCode == 71) {
|
||||
$("#grid").fadeToggle(100);
|
||||
}
|
||||
});
|
||||
|
||||
// if window is larger than #nav then #nav == fixed, if #nav is larger than window #nav == relative
|
||||
$(window).bind("load resize", function(){
|
||||
var w = $(window).height();
|
||||
var h = $("#nav").outerHeight();
|
||||
$("#nav").css("position",(w < h) ? "" : "fixed");
|
||||
});
|
||||
|
||||
// open / close off-canvas navigation
|
||||
$('.off-canvas-button').click(function() {
|
||||
// transform button to close shape
|
||||
$(this).toggleClass('open');
|
||||
// slide in side navigation
|
||||
$('#nav').toggleClass('open');
|
||||
});
|
||||
// done!
|
||||
});
|
10
src/bower_components/requirejs/dist/post.html
vendored
Normal file
10
src/bower_components/requirejs/dist/post.html
vendored
Normal file
|
@ -0,0 +1,10 @@
|
|||
</div>
|
||||
<div id="footer" class="mono">
|
||||
<span class="line">Latest Release: <a href="http://requirejs.org/docs/download.html">2.1.10</a></span>
|
||||
<span class="line">Open source: <a href="https://github.com/jrburke/requirejs/blob/master/LICENSE">new BSD or MIT licensed</a></span>
|
||||
<span class="line">web design by <a href="http://andychung.ca">Andy Chung</a> © 2011-2014</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</body>
|
||||
</html>
|
185
src/bower_components/requirejs/dist/pre.html
vendored
Normal file
185
src/bower_components/requirejs/dist/pre.html
vendored
Normal file
|
@ -0,0 +1,185 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>RequireJS</title>
|
||||
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<meta http-equiv="X-UA-Compatible" content="chrome=1">
|
||||
|
||||
<link rel="stylesheet" type="text/css" href="main.css">
|
||||
<link rel="icon" type="image/x-icon" href="/favicon.png">
|
||||
<!--[if IE]> <link rel="stylesheet" type="text/css" href="ie.css" /> <![endif]-->
|
||||
<link rel="stylesheet" type="text/css" href="http://ajax.googleapis.com/ajax/libs/dojo/1.4/dojox/highlight/resources/highlight.css">
|
||||
|
||||
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.4/jquery.min.js"></script>
|
||||
<script type="text/javascript" src="init.js"></script>
|
||||
<script src="http://ajax.googleapis.com/ajax/libs/dojo/1.4/dojo/dojo.xd.js"></script>
|
||||
<script type="text/javascript">
|
||||
dojo.require("dojox.highlight");
|
||||
dojo.require("dojox.highlight.languages.javascript");
|
||||
dojo.require("dojox.highlight.languages.html");
|
||||
dojo.ready(function() {
|
||||
dojo.query("pre > code")
|
||||
.forEach(function(node) {
|
||||
if (node.innerHTML.indexOf("DOCTYPE") !== -1 || node.innerHTML.indexOf('<script') !== -1) {
|
||||
dojo.addClass(node, "html");
|
||||
} else {
|
||||
dojo.addClass(node, "javascript");
|
||||
}
|
||||
})
|
||||
.forEach(dojox.highlight.init);
|
||||
});
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
<div id="grid"></div>
|
||||
<div id="wrapper">
|
||||
|
||||
<div id="navBg"></div>
|
||||
<button type="button" role="button" aria-label="Toggle Navigation" class="off-canvas-button">
|
||||
<span class="lines">
|
||||
<span class="line"> </span>
|
||||
<span class="line"> </span>
|
||||
<span class="line"> </span>
|
||||
</span>
|
||||
<span class="cross">×</span>
|
||||
</button>
|
||||
<div id="nav" class="mono">
|
||||
<a class="homeImageLink" href="HOMEPATH"></a>
|
||||
<h1>a javascript module loader</h1>
|
||||
|
||||
<ul>
|
||||
<li class="hbox">
|
||||
<a href="HOMEPATH">Home</a>
|
||||
<span class="spacer boxFlex"></span>
|
||||
<span class="icon home"></span>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<ul>
|
||||
<li class="hbox">
|
||||
<a class="local" href="start.html">Start</a>
|
||||
<span class="spacer boxFlex"></span>
|
||||
<span class="icon start"></span>
|
||||
</li>
|
||||
<li class="hbox">
|
||||
<a class="local" href="download.html">Download</a>
|
||||
<span class="spacer boxFlex"></span>
|
||||
<span class="icon download"></span>
|
||||
</li>
|
||||
<li class="hbox">
|
||||
<a class="local" href="api.html">API</a>
|
||||
<span class="spacer boxFlex"></span>
|
||||
<span class="icon api"></span>
|
||||
</li>
|
||||
<li class="hbox">
|
||||
<a class="local" href="optimization.html">Optimization</a>
|
||||
<span class="spacer boxFlex"></span>
|
||||
<span class="icon optimize"></span>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<ul>
|
||||
<li class="hbox">
|
||||
<a class="local" href="jquery.html">Use with jQuery</a>
|
||||
<span class="spacer boxFlex"></span>
|
||||
<span class="icon script"></span>
|
||||
</li>
|
||||
<li class="hbox">
|
||||
<a class="local" href="node.html">Use with Node</a>
|
||||
<span class="spacer boxFlex"></span>
|
||||
<span class="icon script"></span>
|
||||
</li>
|
||||
<li class="hbox">
|
||||
<a class="local" href="dojo.html">Use with Dojo</a>
|
||||
<span class="spacer boxFlex"></span>
|
||||
<span class="icon script"></span>
|
||||
</li>
|
||||
<li class="hbox">
|
||||
<a class="local" href="commonjs.html">CommonJS Notes</a>
|
||||
<span class="spacer boxFlex"></span>
|
||||
<span class="icon script"></span>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<ul>
|
||||
<li class="hbox">
|
||||
<a class="local" href="faq.html">FAQs</a>
|
||||
<span class="spacer boxFlex"></span>
|
||||
<span class="icon question"></span>
|
||||
</li>
|
||||
<li class="hbox">
|
||||
<a class="local" href="errors.html">Common Errors</a>
|
||||
<span class="spacer boxFlex"></span>
|
||||
<span class="icon question"></span>
|
||||
</li>
|
||||
<li class="hbox">
|
||||
<a class="local" href="plugins.html">Writing Plugins</a>
|
||||
<span class="spacer boxFlex"></span>
|
||||
<span class="icon api"></span>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<ul>
|
||||
<li class="hbox">
|
||||
<a class="local" href="why.html">Why Web Modules</a>
|
||||
<span class="spacer boxFlex"></span>
|
||||
<span class="icon question"></span>
|
||||
</li>
|
||||
<li class="hbox">
|
||||
<a class="local" href="whyamd.html">Why AMD</a>
|
||||
<span class="spacer boxFlex"></span>
|
||||
<span class="icon question"></span>
|
||||
</li>
|
||||
<li class="hbox">
|
||||
<a class="local" href="requirements.html">Requirements</a>
|
||||
<span class="spacer boxFlex"></span>
|
||||
<span class="icon requirement"></span>
|
||||
</li>
|
||||
<li class="hbox">
|
||||
<a class="local" href="history.html">History</a>
|
||||
<span class="spacer boxFlex"></span>
|
||||
<span class="icon history"></span>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<ul>
|
||||
<li class="hbox">
|
||||
<a href="http://groups.google.com/group/requirejs">Get Help</a>
|
||||
<span class="spacer boxFlex"></span>
|
||||
<span class="icon help"></span>
|
||||
</li>
|
||||
<li class="hbox">
|
||||
<a href="http://jrburke.com/">Blog</a>
|
||||
<span class="spacer boxFlex"></span>
|
||||
<span class="icon blog"></span>
|
||||
</li>
|
||||
<li class="hbox">
|
||||
<a href="http://twitter.com/jrburke">Twitter</a>
|
||||
<span class="spacer boxFlex"></span>
|
||||
<span class="icon twitter"></span>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<ul>
|
||||
<li class="hbox">
|
||||
<a href="http://github.com/jrburke/requirejs">GitHub</a>
|
||||
<span class="spacer boxFlex"></span>
|
||||
<span class="icon git"></span>
|
||||
</li>
|
||||
<li class="hbox">
|
||||
<a class="local" href="contributing.html">Contributing</a>
|
||||
<span class="spacer boxFlex"></span>
|
||||
<span class="icon fork"></span>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
|
||||
<ul>
|
||||
<li class="version">2.1.10 Docs (<a href="https://github.com/jrburke/requirejs/wiki/Upgrading-to-RequireJS-2.1">upgrade info</a>)</li>
|
||||
<li class="version"><a class="local" href="1.0/">1.0 Doc Link</a></li>
|
||||
</ul>
|
||||
|
||||
</div>
|
||||
|
||||
<div id="content">
|
1323
src/bower_components/requirejs/docs/api.html
vendored
Normal file
1323
src/bower_components/requirejs/docs/api.html
vendored
Normal file
File diff suppressed because it is too large
Load diff
100
src/bower_components/requirejs/docs/commonjs.html
vendored
Normal file
100
src/bower_components/requirejs/docs/commonjs.html
vendored
Normal file
|
@ -0,0 +1,100 @@
|
|||
<div id="directory" class="section">
|
||||
<h1>CommonJS Notes</h1>
|
||||
|
||||
<ul class="index mono">
|
||||
<li class="hbox"><a href="#intro">Introduction</a><span class="spacer boxFlex"></span><span class="sect">§ 1</span></li>
|
||||
<li class="hbox"><a href="#manualconversion">Manual Conversion</a><span class="spacer boxFlex"></span><span class="sect">§ 2</span></li>
|
||||
<li class="hbox"><a href="#autoconversion">Conversion Tool</a><span class="spacer boxFlex"></span><span class="sect">§ 3</span></li>
|
||||
<li class="hbox"><a href="#exports">Setting Exported Value</a><span class="spacer boxFlex"></span><span class="sect">§ 4</span></li>
|
||||
<li class="hbox"><a href="#altsyntax">Alternative Syntax</a><span class="spacer boxFlex"></span><span class="sect">§ 5</span></li>
|
||||
<li class="hbox"><a href="#packages">Loading Modules from CommonJS Packages</a><span class="spacer boxFlex"></span><span class="sect">§ 6</span></li>
|
||||
<li class="hbox"><a href="#optimize">Optimization Tool</a><span class="spacer boxFlex"></span><span class="sect">§ 7</span></li>
|
||||
</ul>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="section">
|
||||
<h2><a name="intro">Introduction</a><span class="sectionMark">§ 1</span></h2>
|
||||
|
||||
<p><a href="http://www.commonjs.org/">CommonJS</a> defines <a href="http://wiki.commonjs.org/wiki/Modules/1.1.1">a module format</a>. Unfortunately, it was defined without giving browsers equal footing to other JavaScript environments. Because of that, there are CommonJS spec proposals for <a href="http://wiki.commonjs.org/wiki/Modules/Transport">Transport formats</a> and an <a href="http://wiki.commonjs.org/wiki/Modules/Async/A">asynchronous require</a>.</p>
|
||||
|
||||
<p>RequireJS tries to keep with the spirit of CommonJS, with using string names to refer to dependencies, and to avoid modules defining global objects, but still allow coding a module format that works well natively in the browser. RequireJS implements the <a href="http://wiki.commonjs.org/wiki/Modules/AsynchronousDefinition">Asynchronous Module Definition</a> (formerly Transport/C) proposal.</p>
|
||||
|
||||
<p>If you have modules that are in the traditional CommonJS module format, then you can easily convert them to work with RequireJS. Not all modules will convert cleanly to the new format. Types of modules that may not convert well:</p>
|
||||
|
||||
<ul>
|
||||
<li>Modules that use conditional code to do a require call, like if(someCondition) require('a1') else require('a2');</li>
|
||||
<li>Some types of circular dependencies.</li>
|
||||
</div>
|
||||
|
||||
<div class="section">
|
||||
<h2><a name="manualconversion">Manual Conversion</a><span class="sectionMark">§ 2</span></h2>
|
||||
|
||||
<p>If you just have a few modules to convert, then all you need to do is wrap the module in this code:</p>
|
||||
|
||||
<pre><code>define(function(require, exports, module) {
|
||||
//Put traditional CommonJS module content here
|
||||
});
|
||||
</code></pre>
|
||||
|
||||
<p><strong>IMPORTANT</strong>: The function arguments should always be listed as <strong>require, exports, module</strong>, with those exact names and in that exact order, otherwise chaos will ensue. You can leave off exports and module from the list, but if they are needed, they need to be specified in the exact order illustrated here.</p>
|
||||
</div>
|
||||
|
||||
<div class="section">
|
||||
<h2><a name="autoconversion">Conversion Tool</a><span class="sectionMark">§ 3</span></h2>
|
||||
|
||||
<p>If you have many modules to convert, the <a href="https://github.com/jrburke/r.js">r.js project</a> has a converter tool built into the r.js file. Give it the path to the directory you want to convert and an output directory:</p>
|
||||
|
||||
<pre><code>node r.js -convert path/to/commonjs/modules/ path/to/output
|
||||
</code></pre>
|
||||
|
||||
<p>There are a small number of CommonJS modules do not work well as
|
||||
define()-wrapped modules. See the <a href="https://github.com/jrburke/r.js">r.js README</p> for more
|
||||
information.</p>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="section">
|
||||
<h2><a name="exports">Setting Exported Value</a><span class="sectionMark">§ 4</span></h2>
|
||||
|
||||
<p>There are some CommonJS systems, mainly Node, that allow setting the exported value by assigning the exported value as module.exports. That idiom is supported by RequireJS, but there is another, easier way -- just return the value from the function passed to <strong>define</strong>:</p>
|
||||
|
||||
<pre><code>define(function (require) {
|
||||
var foo = require('foo');
|
||||
|
||||
//Define this module as exporting a function
|
||||
return function () {
|
||||
foo.doSomething();
|
||||
};
|
||||
});
|
||||
</code></pre>
|
||||
|
||||
<p>With this approach, then you normally do not need the exports and module function arguments, so you can leave them off the module definition.</p>
|
||||
</div>
|
||||
|
||||
<div class="section">
|
||||
<h2><a name="altsyntax">Alternative Syntax</a><span class="sectionMark">§ 5</span></h2>
|
||||
|
||||
<p>Instead of using require() to get dependencies inside the function passed to define(), you can also specify them via a dependency array argument to define(). The order of the names in the dependency array match the order of arguments passed to the definition function passed to define(). So the above example that uses the module <strong>foo</strong>:</p>
|
||||
|
||||
<pre><code>define(['foo'], function (foo) {
|
||||
return function () {
|
||||
foo.doSomething();
|
||||
};
|
||||
});
|
||||
</code></pre>
|
||||
|
||||
<p>See the <a href="api.html">API docs</a> for more information on that syntax.</p>
|
||||
</div>
|
||||
|
||||
<div class="section">
|
||||
<h2><a name="packages">Loading Modules from CommonJS Packages</a><span class="sectionMark">§ 6</span></h2>
|
||||
|
||||
<p>Modules in CommonJS packages can be loaded by RequireJS by setting up the RequireJS configuration to know about the location and package attributes. See the <a href="api.html#packages">packages API section</a> for more information.</p>
|
||||
</div>
|
||||
|
||||
<div class="section">
|
||||
<h2><a name="optimize">Optimization Tool</a><span class="sectionMark">§ 7</span></h2>
|
||||
|
||||
<p>RequireJS has an optimization tool that can combine module definitions together into optimized bundles for browser delivery. It works as a command-line tool that you use as part of code deployment. See the <a href="optimization.html">optimization docs</a> for more information.</p>
|
||||
</div>
|
56
src/bower_components/requirejs/docs/contributing.html
vendored
Normal file
56
src/bower_components/requirejs/docs/contributing.html
vendored
Normal file
|
@ -0,0 +1,56 @@
|
|||
<div id="directory" class="section">
|
||||
<h1>Contributing to RequireJS</h1>
|
||||
|
||||
<ul class="index mono">
|
||||
<li class="hbox"><a href="#whycla">Why a CLA?</a><span class="spacer boxFlex"></span><span class="sect">§ 1</span></li>
|
||||
<li class="hbox"><a href="#codestyle">Code style</a><span class="spacer boxFlex"></span><span class="sect">§ 2</span></li>
|
||||
</ul>
|
||||
|
||||
<span class="note">Note: <a href="http://github.com/jrburke/requirejs">The source for RequireJS is available on GitHub</a></span>
|
||||
|
||||
<p>For something that is bigger than a one or two line fix:</p>
|
||||
|
||||
<ol style="color:#222;">
|
||||
<li><a href="http://help.github.com/forking/">Create your own fork of the code</a></li>
|
||||
<li>Do the changes in your fork</li>
|
||||
<li>If you like the change and think the project could use it:
|
||||
<ol style="color:#222;list-style-type:disc;">
|
||||
<li>Be sure you have followed <a href="#codestyle">the code style for the project</a>.</li>
|
||||
<li>Sign a <a href="http://www.dojofoundation.org/about/cla/">Contributor License Agreement, CLA, with the Dojo Foundation</a> and send it to them.</li>
|
||||
<li>Send a pull request indicating that you have a CLA on file.</li>
|
||||
</ol></li>
|
||||
</ol>
|
||||
|
||||
<p>For one or two line fixes, you can use the <a href="http://github.com/jrburke/requirejs/issues">RequireJS GitHub Issues page</a> to indicate the problem. You can also do the full fork/pull request as mentioned above, but a CLA is not needed for one or two line fixes.</p>
|
||||
|
||||
<p>For discussions on code changes/additions/requests use the <a href="http://groups.google.com/group/requirejs">RequireJS Group</a>.</p>
|
||||
</div>
|
||||
|
||||
<div class="section">
|
||||
<h2><a name="#whycla">Why a CLA?</a><span class="sectionMark">§ 1</span></h2>
|
||||
|
||||
<p>CLAs are common with open source projects, with the Apache projects probably being the most well known. The goal is to allow RequireJS to be used in as many projects as possible, and for some companies, using only CLA-approved code is the best option.</p>
|
||||
|
||||
<p>You still own the copyright on your contribution, the CLA just gives the most flexibility for licensing, and assures the lineage of the intellectual property. You should only submit patches for your own intellectual property, and not the intellectual property of others.</p>
|
||||
|
||||
<p>Additional reading that may be helpful:</p>
|
||||
|
||||
<ul>
|
||||
<li><a href="http://en.wikipedia.org/wiki/Contributor_License_Agreement">Wikipedia on CLAs</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<div class="section">
|
||||
<h2><a name="codestyle">Code Style</a><span class="sectionMark">§ 2</span></h2>
|
||||
|
||||
<p><a href="http://jslint.com/">JSLint</a> is used for checking code style. It is also useful for avoiding some errors. The default settings on JSLint should be fine to use, in particular, 4 spaces for indentation, do not use tabs.</p>
|
||||
|
||||
<p>camelCase should be used for all variables and file names. Avoid the use of underscores as word separators. This extends to things like CSS class names, IDs in test HTML documents, everything.</p>
|
||||
|
||||
<p>Some exceptions to JSLint can be indicated at the top of each JS file, but they should be avoided when possible. Two common exceptions you may see in the source:</p>
|
||||
|
||||
<ul>
|
||||
<li><strong>nomen: false</strong>, allow underscore at the beginning of some property/variable/function names.</li>
|
||||
<li><strong>plusplus: false</strong>, but only to allow for loops with an incrementing ++ value. Other uses of ++ should be avoided.</li>
|
||||
</ul>
|
||||
</div>
|
3
src/bower_components/requirejs/docs/design/packages.md
vendored
Normal file
3
src/bower_components/requirejs/docs/design/packages.md
vendored
Normal file
|
@ -0,0 +1,3 @@
|
|||
# Packages
|
||||
|
||||
Moved to [pkg project](http://github.com/jrburke/pkg/blob/master/docs/design/packages.md)
|
8
src/bower_components/requirejs/docs/dojo.html
vendored
Normal file
8
src/bower_components/requirejs/docs/dojo.html
vendored
Normal file
|
@ -0,0 +1,8 @@
|
|||
<div id="directory" class="section">
|
||||
<h1>How to use RequireJS with Dojo</h1>
|
||||
|
||||
<p>As of Dojo 1.8, Dojo has converted their modules to AMD modules. However, Dojo uses some loader plugins, and the loader plugin APIs are still in draft mode for AMD. So while some modules from Dojo can be used with RequireJS, it will be difficult to use all of Dojo. It is best to use Dojo's AMD loader until <a href="http://bugs.dojotoolkit.org/ticket/15616">ticket 15616</a> has been resolved.</p>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="section"></div>
|
405
src/bower_components/requirejs/docs/download.html
vendored
Normal file
405
src/bower_components/requirejs/docs/download.html
vendored
Normal file
|
@ -0,0 +1,405 @@
|
|||
<div id="directory" class="section">
|
||||
<h1>Download RequireJS</h1>
|
||||
<ul class="index mono">
|
||||
<li class="hbox"><a href="#latest">Latest Release</a><span class="spacer boxFlex"></span><span class="sect">§ 1</span></li>
|
||||
<ul>
|
||||
<li class="hbox"><a href="#requirejs">require.js</a><span class="spacer boxFlex"></span><span class="sect">§ 1.1</span></li>
|
||||
<li class="hbox"><a href="#rjs">r.js: Optimizer and Node/Rhino/xpcshell adapter</a><span class="spacer boxFlex"></span><span class="sect">§ 1.2</span></li>
|
||||
</ul>
|
||||
<li class="hbox"><a href="#plugins">Plugins</a><span class="spacer boxFlex"></span><span class="sect">§ 2</span></li>
|
||||
<ul>
|
||||
<li class="hbox"><a href="#text">text</a><span class="spacer boxFlex"></span><span class="sect">§ 2.1</span></li>
|
||||
<li class="hbox"><a href="#domReady">domReady</a><span class="spacer boxFlex"></span><span class="sect">§ 2.2</span></li>
|
||||
<li class="hbox"><a href="#cs">cs (CoffeeScript)</a><span class="spacer boxFlex"></span><span class="sect">§ 2.3</span></li>
|
||||
<li class="hbox"><a href="#i18n">i18n</a><span class="spacer boxFlex"></span><span class="sect">§ 2.4</span></li>
|
||||
</ul>
|
||||
<li class="hbox"><a href="#releasenotes">Release Notes</a><span class="spacer boxFlex"></span><span class="sect">§ 3</span></li>
|
||||
</ul>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="section">
|
||||
<h2><a name="latest">Latest Release</a><span class="sectionMark">§ 1</span></h2>
|
||||
|
||||
<span class="note">If you want 1.0: <a href="1.0/">Link to 1.0</a>.</span>
|
||||
|
||||
<div class="subSection">
|
||||
<h4 class="hbox">
|
||||
<a name="requirejs">require.js 2.1.10</a>
|
||||
<span class="boxFlex"></span>
|
||||
<a class="download" href="http://requirejs.org/docs/release/2.1.10/minified/require.js">Minified</a>
|
||||
<a class="download" href="http://requirejs.org/docs/release/2.1.10/comments/require.js">With Comments</a>
|
||||
</h4>
|
||||
|
||||
<p>All you need to start using require.js in the browser.</p>
|
||||
</div>
|
||||
|
||||
<div class="subSection">
|
||||
<h4 class="hbox">
|
||||
<a name="rjs">r.js: Optimizer and Node/Rhino/xpcshell adapter</a>
|
||||
<span class="boxFlex"></span>
|
||||
<a class="download" href="http://requirejs.org/docs/release/2.1.10/r.js">Download</a>
|
||||
</h4>
|
||||
|
||||
<p>The r.js file allows you to run the optimizer as well as run modules in Node, Rhino or xpcshell.</p>
|
||||
|
||||
<p>If you are running in Node, and want to use npm to install this file via npm, see the <a href="node.html">Use with Node</a> page for more information.</p>
|
||||
|
||||
<p>For information on its use, as well as how to get the JAR files to run it under Rhino, see the <a href="https://github.com/jrburke/r.js">r.js README</a>.</p>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="section">
|
||||
<h2><a name="plugins">Plugins</a><span class="sectionMark">§ 2</span></h2>
|
||||
|
||||
<p>These are useful loader plugins that have the same license terms as require.js itself. Download the plugin file and place it as a sibling to your "data-main" main.js script.</p>
|
||||
|
||||
<div class="subSection">
|
||||
<h4 class="hbox">
|
||||
<a name="text">text</a>
|
||||
<span class="boxFlex"></span>
|
||||
<a class="download" href="https://raw.github.com/requirejs/text/latest/text.js">Download</a>
|
||||
</h4>
|
||||
<p><a href="api.html#text">Load text files and treat them as dependencies</a>. Great for loading templates. The text strings can be inlined in an optimized build when the optimizer is used.</p>
|
||||
</div>
|
||||
|
||||
<div class="subSection">
|
||||
<h4 class="hbox">
|
||||
<a name="domReady">domReady</a>
|
||||
<span class="boxFlex"></span>
|
||||
<a class="download" href="https://raw.github.com/requirejs/domReady/latest/domReady.js">Download</a>
|
||||
</h4>
|
||||
<p><a href="api.html#pageload">Wait for the DOM is ready</a>. Useful for pausing execution of top level application
|
||||
logic until the DOM is ready for querying/modification.</p>
|
||||
</div>
|
||||
|
||||
<div class="subSection">
|
||||
<h4 class="hbox">
|
||||
<a name="cs">cs (CoffeeScript)</a>
|
||||
<span class="boxFlex"></span>
|
||||
<a class="download" href="https://github.com/jrburke/require-cs/raw/latest/cs.js">Download</a>
|
||||
</h4>
|
||||
<p>Load files written in CoffeeScript. With this plugin, it is easy to code in CoffeeScript in the browser, it can participate in the optimizer optimizations, and it works in Node and Rhino via the <a href="#rjs">RequireJS adapter</a>. This is the best way to do cross-environment, modular CoffeeScript. <a href="https://github.com/jrburke/require-cs">The project home</a> has more information on how to install and use it.</p>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="subSection">
|
||||
<h4 class="hbox">
|
||||
<a name="i18n">i18n</a>
|
||||
<span class="boxFlex"></span>
|
||||
<a class="download" href="https://raw.github.com/requirejs/i18n/latest/i18n.js">Download</a>
|
||||
</h4>
|
||||
<p><a href="api.html#i18n">Load string bundles</a> used in internationalization (i18n) that are made up of separate country/language/locale-specific bundles.</p>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="section">
|
||||
<h2><a name="releasenotes">Release Notes</a><span class="sectionMark">§ 3</span></h2>
|
||||
|
||||
|
||||
<h3 id="2-1-10">2.1.10</h3>
|
||||
|
||||
<p>Mainly a maintenance release, and improves some cases when reusing code that was installed via npm. There are two new config options for the loader too:</p>
|
||||
|
||||
<ul>
|
||||
<li><a href="api.html#config-nodeIdCompat">nodeIdCompat</a>: some node modules installed by npm use module IDs like <code>example.js</code> and <code>example</code> interchangeably. Setting this config option to true will accommodate that style.</li>
|
||||
<li><a href="api.html#config-bundles">bundles</a>: a more compact way to list a set of module IDs belonging to a bundle ID, and supports loader plugin resource IDs.</li>
|
||||
</ul>
|
||||
|
||||
<p>And for the optimizer, the <a href="optimization.html#mainConfigFile">mainConfigFile</a> option can now take an array of file paths that have configs in them. Later values take precedent over earlier values.</p>
|
||||
|
||||
<p>Full list of changes:</p>
|
||||
|
||||
<ul>
|
||||
<li><a href="https://github.com/jrburke/requirejs/issues?milestone=32&page=1&state=closed">Fixed require.js issues</a></li>
|
||||
<li><a href="https://github.com/jrburke/r.js/issues?milestone=29&page=1&state=closed">Fixed r.js optimizer issues</a></li>
|
||||
</ul>
|
||||
|
||||
<h3 id="2-1-9">2.1.9</h3>
|
||||
|
||||
<p>Full list of changes:</p>
|
||||
|
||||
<p>Mainly a maintenance release to fix bugs. There is a new <a href="api.html#config-skipDataMain">skipDataMain</a> option in require.js to avoid the data-main work, which can be useful for browser extensions that should let the main content page's requirejs handle the data-main.</p>
|
||||
|
||||
<ul>
|
||||
<li><a href="https://github.com/jrburke/requirejs/issues?milestone=31&page=1&state=closed">Fixed require.js issues</a></li>
|
||||
<li><a href="https://github.com/jrburke/r.js/issues?milestone=28&page=1&state=closed">Fixed r.js optimizer issues</a></li>
|
||||
</ul>
|
||||
|
||||
|
||||
<h3 id="2-1-8">2.1.8</h3>
|
||||
|
||||
<p>A small release to fix an optimizer issue with <a href="https://github.com/jrburke/r.js/issues/476">parsing config calls for modifications</a>.</p>
|
||||
|
||||
<h3 id="2-1-7">2.1.7</h3>
|
||||
|
||||
<p>The main changes for this release:</p>
|
||||
|
||||
<ul>
|
||||
<li>For xpcshell, the optimizer uses the built in Reflect parser API instead of Esprima. xpcshell, on Linux and Windows in particular, has a constrained stack, and normal Esprima use was not possible. To accommodate this change, some of the parsing approaches used internally by r.js moved away from token scanning to tree walking. The only visible output change you may see is different use of space characters in transformed code.</li>
|
||||
<li>The source map support was updated to use the new //# syntax as specified by the spec. This change is still making its way through the browsers, so if you need source map or sourceURL support with 2.1.7, you may need to use Firefox Aurora or Chrome Canary channels. The browser support levels should get better in around six weeks time.</li>
|
||||
</ul>
|
||||
|
||||
<p>Full list of changes:</p>
|
||||
|
||||
<ul>
|
||||
<li><a href="https://github.com/jrburke/requirejs/issues?direction=desc&milestone=28&page=1&sort=created&state=closed">Fixed require.js issues</a></li>
|
||||
<li><a href="https://github.com/jrburke/r.js/issues?milestone=26&page=1&state=closed">Fixed r.js optimizer issues</a></li>
|
||||
</ul>
|
||||
|
||||
<h3 id="2-1-6">2.1.6</h3>
|
||||
|
||||
<p><a href="optimization.html#sourcemaps">Source map support</a> has been expanded. Previously, it was just supported for going from minified, bundled code to the unminified, bundled code. If <code>optimize: 'uglify2'</code> is used, it will now go back to the separated, unbundled files.</p>
|
||||
|
||||
<p>Source map support is still considered experimental though, so you may find bugs. If you find one, file an <a href="https://github.com/jrburke/r.js/issues">r.js issue</a>, ideally with a test case.</p>
|
||||
|
||||
<p>Full list of changes:</p>
|
||||
|
||||
<ul>
|
||||
<li><a href="https://github.com/jrburke/requirejs/issues?direction=desc&milestone=27&page=1&sort=created&state=closed">Fixed require.js issues</a></li>
|
||||
<li><a href="https://github.com/jrburke/r.js/issues?milestone=25&page=1&state=closed">Fixed r.js optimizer issues</a></li>
|
||||
</ul>
|
||||
|
||||
|
||||
<h3 id="2-1-5">2.1.5</h3>
|
||||
|
||||
<p>Biggest change is support for running the optimizer and loading AMD modules in
|
||||
<a href="https://developer.mozilla.org/en-US/docs/XPConnect/xpcshell">xpcshell</a>. Other than that,
|
||||
just a maintenance release.</p>
|
||||
|
||||
<p>Full list of changes:</p>
|
||||
|
||||
<ul>
|
||||
<li><a href="https://github.com/jrburke/requirejs/issues?direction=desc&milestone=26&sort=created&state=closed">Fixed require.js issues</a></li>
|
||||
<li><a href="https://github.com/jrburke/r.js/issues?milestone=23&state=closed">Fixed r.js optimizer issues</a></li>
|
||||
</ul>
|
||||
|
||||
|
||||
<h3 id="2-1-4">2.1.4</h3>
|
||||
|
||||
<p>Quick release for a bug that slipped in the 2.1.3 release in the r.js optimizer.
|
||||
So even though require.js now has a 2.1.4 version, it is the same as 2.1.3,
|
||||
and the optimizer is the same as 2.1.3 except for this one fix:</p>
|
||||
|
||||
<ul>
|
||||
<li><a href="https://github.com/jrburke/r.js/issues/356">Bug 356</a>: cssPrefix normalization always needs to happen</li>
|
||||
</ul>
|
||||
|
||||
<p>Without this fix, in some cases 2.1.3 would insert "undefined" in some
|
||||
optimized CSS files, making them unusable.</p>
|
||||
|
||||
<h3 id="2-1-3">2.1.3</h3>
|
||||
|
||||
<p>Maintenance release. A change that may be noticeable:</p>
|
||||
|
||||
<p><a href="http://requirejs.org/docs/api.html#modulenotes-urls">require.toUrl()</a>
|
||||
now correctly generates URLs for string values passed to it without an
|
||||
extension. Previous versions of toUrl() would append a
|
||||
".js" extension automatically. If you relied on that behavior, when you
|
||||
update to 2.1.3, then you may need to do a code change to append the .js
|
||||
extension yourself:</p>
|
||||
|
||||
<pre><code>require.toUrl('some/value') + '.js'</code></pre>
|
||||
|
||||
<p>The text plugin has been updated to also work with this change, so if you want
|
||||
to generate non-extension paths for text resources, be sure to upgrade to
|
||||
to the <a href="https://raw.github.com/requirejs/text/latest/text.js">2.0.4 version of text.js</a>.</p>
|
||||
|
||||
<p>Normal use of toUrl with a value that has an extension continues to work the same.</p>
|
||||
|
||||
<p>Full list of changes:</p>
|
||||
|
||||
<ul>
|
||||
<li><a href="https://github.com/jrburke/requirejs/issues?direction=desc&milestone=24&page=1&sort=created&state=closed">Fixed require.js issues</a></li>
|
||||
<li><a href="https://github.com/jrburke/r.js/issues?sort=created&direction=desc&state=closed&page=1&milestone=21">Fixed r.js optimizer issues</a></li>
|
||||
</ul>
|
||||
|
||||
<h3 id="2-1-2">2.1.2</h3>
|
||||
|
||||
<p>The big changes for this release are in the optimizer:</p>
|
||||
|
||||
<ul>
|
||||
<li>The optimizer can now <a href="optimization.html#requirements">run in the browser</a>, to enable web-based custom builds of your library.</li>
|
||||
<li>"uglify2" is an allowed "optimize" value now, using UglifyJS 2.1.11.</li>
|
||||
<li>Experimental support for <a href="optimization.html#sourcemaps">source maps</a>.</li>
|
||||
<li>The optimizer runs faster now, and has some <a href="optimization.html#turbo">speed options</a>.</li>
|
||||
</ul>
|
||||
|
||||
<p>Full list of changes:</p>
|
||||
|
||||
<ul>
|
||||
<li><a href="https://github.com/jrburke/requirejs/issues?milestone=22&sort=created&direction=desc&state=closed">Fixed require.js issues</a></li>
|
||||
<li><a href="https://github.com/jrburke/r.js/issues?sort=created&direction=desc&state=closed&page=1&milestone=20">Fixed r.js optimizer issues</a></li>
|
||||
</ul>
|
||||
|
||||
<h3 id="2-1-1">2.1.1</h3>
|
||||
|
||||
<ul>
|
||||
<li><a href="https://github.com/jrburke/requirejs/issues?milestone=21&sort=created&direction=desc&state=closed">Fixed require.js issues</a></li>
|
||||
<li><a href="https://github.com/jrburke/r.js/issues?sort=created&direction=desc&state=closed&page=1&milestone=19">Fixed r.js optimizer issues</a></li>
|
||||
</ul>
|
||||
|
||||
<h3 id="2-1-0">2.1.0</h3>
|
||||
|
||||
<p>See the <a href="https://github.com/jrburke/requirejs/wiki/Upgrading-to-RequireJS-2.1">Upgrading to 2.1 page</a>.
|
||||
|
||||
<h3 id="2-0-6">2.0.6</h3>
|
||||
|
||||
<p>The main focus of this release was cleaning up some rough edges after switching to esprima for all module parsing. Most notably, findNestedDependencies should work correctly again. The bundled UglifyJS was updated to 1.3.3 too.</p>
|
||||
|
||||
<p>Complete list of fixes:</p>
|
||||
|
||||
<ul>
|
||||
<li><a href="https://github.com/jrburke/requirejs/issues?milestone=20&sort=created&direction=desc&state=closed">Fixed require.js issues</a></li>
|
||||
<li><a href="https://github.com/jrburke/r.js/issues?sort=created&direction=desc&state=closed&page=1&milestone=18">Fixed r.js optimizer issues</a></li>
|
||||
</ul>
|
||||
|
||||
<h3 id="2-0-5">2.0.5</h3>
|
||||
|
||||
<p>Probably the most notable changes:</p>
|
||||
|
||||
<ul>
|
||||
<li>require.js: fix for <a href="https://github.com/jrburke/requirejs/issues/392">a 'use strict' issue in Safari 6</a>: should only show up in certain non-optimized scenarios.</li>
|
||||
<li>r.js optimizer: changed over to <a href="http://esprima.org/">esprima</a> for all dependency tracing. This set the stage for allowing some forms of <a href="https://github.com/jrburke/r.js/issues/72">JavaScript 1.8 to be optimized</a>, with the
|
||||
help of some regexps.</li>
|
||||
</ul>
|
||||
|
||||
<p>Complete list of fixes:</p>
|
||||
|
||||
<ul>
|
||||
<li><a href="https://github.com/jrburke/requirejs/issues?milestone=19&sort=created&direction=desc&state=closed">Fixed require.js issues</a></li>
|
||||
<li><a href="https://github.com/jrburke/r.js/issues?sort=created&direction=desc&state=closed&page=1&milestone=17">Fixed r.js optimizer issues</a></li>
|
||||
</ul>
|
||||
|
||||
<h3 id="2-0-4">2.0.4</h3>
|
||||
|
||||
<p>Same as 2.0.3, but rolled back a change in r.js that caused a logging error.</p>
|
||||
|
||||
<ul>
|
||||
<li><a href="https://github.com/jrburke/r.js/issues/225">Fixed r.js logging rollback</a></li>
|
||||
</ul>
|
||||
|
||||
<h3 id="2-0-3">2.0.3</h3>
|
||||
|
||||
<ul>
|
||||
<li><a href="https://github.com/jrburke/requirejs/issues?milestone=17&sort=created&direction=desc&state=closed">Fixed require.js issues</a></li>
|
||||
<li><a href="https://github.com/jrburke/r.js/issues?sort=created&direction=desc&state=closed&page=1&milestone=15">Fixed r.js optimizer issues</a></li>
|
||||
</ul>
|
||||
|
||||
<h3 id="2-0-2">2.0.2</h3>
|
||||
|
||||
<ul>
|
||||
<li><a href="https://github.com/jrburke/requirejs/issues?milestone=16&sort=created&direction=desc&state=closed">Fixed require.js issues</a></li>
|
||||
<li><a href="https://github.com/jrburke/r.js/issues?sort=created&direction=desc&state=closed&page=1&milestone=14">Fixed r.js optimizer issues</a></li>
|
||||
</ul>
|
||||
|
||||
<h3 id="2-0-1">2.0.1</h3>
|
||||
|
||||
<ul>
|
||||
<li><a href="https://github.com/jrburke/requirejs/issues?milestone=15&sort=created&direction=desc&state=closed">Fixed require.js issues</a></li>
|
||||
<li><a href="https://github.com/jrburke/r.js/issues?sort=created&direction=desc&state=closed&page=1&milestone=13">Fixed r.js optimizer issues</a></li>
|
||||
</ul>
|
||||
|
||||
|
||||
<h3 id="2-0-0">2.0.0</h3>
|
||||
|
||||
<ul>
|
||||
<li><a href="https://github.com/jrburke/requirejs/wiki/Upgrading-to-RequireJS-2.0">2.0 changes</a></li>
|
||||
<li><a href="https://github.com/jrburke/requirejs/issues?milestone=13&sort=created&direction=desc&state=closed">Fixed require.js issues</a></li>
|
||||
<li><a href="https://github.com/jrburke/r.js/issues?sort=created&direction=desc&state=closed&page=1&milestone=10">Fixed r.js optimizer issues</a></li>
|
||||
</ul>
|
||||
|
||||
|
||||
<h3 id="1-0-8">1.0.8</h3>
|
||||
|
||||
<p>Small bug fixes to:</p>
|
||||
|
||||
<ul>
|
||||
<li><a href="https://github.com/jrburke/requirejs/issues?milestone=12&sort=created&direction=desc&state=closed">require.js</a></li>
|
||||
<li><a href="https://github.com/jrburke/r.js/issues?sort=created&direction=desc&state=closed&page=1&milestone=9">r.js optimizer</a></li>
|
||||
</ul>
|
||||
|
||||
<h3 id="1-0-7">1.0.7</h3>
|
||||
|
||||
<p>Small bug fixes to:</p>
|
||||
|
||||
<ul>
|
||||
<li><a href="https://github.com/jrburke/requirejs/issues?milestone=11&sort=created&direction=desc&state=closed">require.js</a></li>
|
||||
<li><a href="https://github.com/jrburke/r.js/issues?sort=created&direction=desc&state=closed&page=1&milestone=8">r.js optimizer</a></li>
|
||||
</ul>
|
||||
|
||||
<h3 id="1-0-6">1.0.6</h3>
|
||||
|
||||
<p>Main purpose of the release is to fix a regression in 1.0.5 where the
|
||||
optimizer's "dir" config option was not applied correctly when passed on the
|
||||
command line.</p>
|
||||
|
||||
<p>The other notable change: the optimizer now supports
|
||||
<a href="https://github.com/jrburke/r.js/blob/master/build/example.build.js#L320">onBuildRead
|
||||
and onBuildWrite</a> functions that are called when JS modules are read or written
|
||||
for an optimized build layer. This allows doing some regexp work to modify their
|
||||
contents.</p>
|
||||
|
||||
<p>Small bug fixes to:</p>
|
||||
|
||||
<ul>
|
||||
<li><a href="https://github.com/jrburke/requirejs/issues?milestone=10&sort=created&direction=desc&state=closed">require.js</a></li>
|
||||
<li><a href="https://github.com/jrburke/r.js/issues?sort=created&direction=desc&state=closed&page=1&milestone=7">r.js optimizer</a></li>
|
||||
</ul>
|
||||
|
||||
<h3 id="1-0-5">1.0.5</h3>
|
||||
|
||||
<p>Small bug fixes to:</p>
|
||||
|
||||
<ul>
|
||||
<li><a href="https://github.com/jrburke/requirejs/issues?milestone=8&sort=created&direction=desc&state=closed">require.js</a></li>
|
||||
<li><a href="https://github.com/jrburke/r.js/issues?sort=created&direction=desc&state=closed&page=1&milestone=6">r.js optimizer</a></li>
|
||||
</ul>
|
||||
|
||||
<h3 id="1-0-4">1.0.4</h3>
|
||||
|
||||
<p>Small bug fixes to:</p>
|
||||
|
||||
<ul>
|
||||
<li><a href="https://github.com/jrburke/requirejs/issues?milestone=7&sort=created&direction=desc&state=closed">require.js</a></li>
|
||||
<li><a href="https://github.com/jrburke/r.js/issues?milestone=5&sort=created&direction=desc&state=closed">r.js optimizer</a></li>
|
||||
</ul>
|
||||
|
||||
<h3 id="1-0-3">1.0.3</h3>
|
||||
|
||||
<p>Small bug fixes to:</p>
|
||||
|
||||
<ul>
|
||||
<li><a href="https://github.com/jrburke/requirejs/issues?sort=created&direction=desc&state=closed&page=1&milestone=6">require.js</a></li>
|
||||
<li><a href="https://github.com/jrburke/r.js/issues?sort=created&direction=desc&state=closed&page=1&milestone=4">r.js optimizer</a></li>
|
||||
</ul>
|
||||
|
||||
<h3 id="1-0-2">1.0.2</h3>
|
||||
|
||||
<p>Small bug fixes to:</p>
|
||||
|
||||
<ul>
|
||||
<li><a href="https://github.com/jrburke/requirejs/issues?sort=created&direction=desc&state=closed&page=1&milestone=5">require.js</a></li>
|
||||
<li><a href="https://github.com/jrburke/r.js/issues?sort=created&direction=desc&state=closed&page=1&milestone=3">r.js optimizer</a></li>
|
||||
</ul>
|
||||
|
||||
<h3 id="1-0-1">1.0.1</h3>
|
||||
|
||||
<p>Just small bug fixes related to:</p>
|
||||
|
||||
<ul>
|
||||
<li>allowing full URLs for simplified CommonJS wrapped modules</li>
|
||||
<li>AST parsing of dependencies for modules that use a variable for the factory function</li>
|
||||
<li>catching more cases that should have the "namespace" optimizer option applied</li>
|
||||
</ul>
|
||||
|
||||
<p>Detailed list of changes for require.js and the r.js optimizer:</p>
|
||||
|
||||
<ul>
|
||||
<li><a href="https://github.com/jrburke/requirejs/issues?milestone=4&state=closed">require.js 1.0.1 changes</a></li>
|
||||
<li><a href="https://github.com/jrburke/r.js/issues?milestone=2&state=closed">r.js 1.0.1 changes</a></li>
|
||||
</ul>
|
||||
|
||||
</div>
|
255
src/bower_components/requirejs/docs/errors.html
vendored
Normal file
255
src/bower_components/requirejs/docs/errors.html
vendored
Normal file
|
@ -0,0 +1,255 @@
|
|||
<div id="directory" class="section">
|
||||
<h1>Common Errors</h1>
|
||||
|
||||
<ul class="index mono">
|
||||
<li class="hbox"><a href="#mismatch">Mismatched anonymous define() modules ...</a><span class="spacer boxFlex"></span><span class="sect">§ 1</span></li>
|
||||
<li class="hbox"><a href="#timeout">Load timeout for modules: ...</a><span class="spacer boxFlex"></span><span class="sect">§ 2</span></li>
|
||||
<li class="hbox"><a href="#defineerror">Error evaluating module ...</a><span class="spacer boxFlex"></span><span class="sect">§ 3</span></li>
|
||||
<li class="hbox"><a href="#notloaded">Module name ... has not been loaded yet for context: ...</a><span class="spacer boxFlex"></span><span class="sect">§ 4</span></li>
|
||||
<li class="hbox"><a href="#requireargs">Invalid require call</a><span class="spacer boxFlex"></span><span class="sect">§ 5</span></li>
|
||||
<li class="hbox"><a href="#nodefine">No define call for ...</a><span class="spacer boxFlex"></span><span class="sect">§ 6</span></li>
|
||||
<li class="hbox"><a href="#scripterror">Script error</a><span class="spacer boxFlex"></span><span class="sect">§ 7</span></li>
|
||||
<li class="hbox"><a href="#interactive">No matching script interactive for ...</a><span class="spacer boxFlex"></span><span class="sect">§ 8</span></li>
|
||||
<li class="hbox"><a href="#pathnotsupported">Path is not supported: ...</a><span class="spacer boxFlex"></span><span class="sect">§ 9</span></li>
|
||||
<li class="hbox"><a href="#sourcemapcomments">Cannot use preserveLicenseComments and generateSourceMaps together</a><span class="spacer boxFlex"></span><span class="sect">§ 10</span></li>
|
||||
<li class="hbox"><a href="#importscripts">importScripts failed for ...</a><span class="spacer boxFlex"></span><span class="sect">§ 11</span></li>
|
||||
</ul>
|
||||
|
||||
<p>This page lists errors that are generated by RequireJS. If the following information does not fix the problem, you can ask on the <a href="https://groups.google.com/group/requirejs">RequireJS list</a> or <a href="https://github.com/jrburke/requirejs/issues">open an issue</a>. In either case it is best to have an example or detailed explanation of the problem, hopefully with steps to reproduce.</p>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="section">
|
||||
<h2><a name="mismatch">Mismatched anonymous define() modules ...</a><span class="sectionMark">§ 1</span></h2>
|
||||
|
||||
<p>If you manually code a script tag in HTML to load a script with an anonymous define() call, this error can occur.</p>
|
||||
|
||||
<p>Also seen if you manually code a script tag in HTML to load a script that has a few named modules, but then try to load an anonymous module that ends up having the same name as one of the named modules in the script loaded by the manually coded script tag.</p>
|
||||
|
||||
<p>Finally, if you use the loader plugins or anonymous modules (modules that call define() with no string ID) but do not use the RequireJS optimizer to combine files together, this error can occur. The optimizer knows how to name anonymous modules correctly so that they can be combined with other modules in an optimized file.</p>
|
||||
|
||||
<p>To avoid the error:</p>
|
||||
|
||||
<ul>
|
||||
<li>Be sure to load all scripts that call define() via the RequireJS API. Do not manually code script tags in HTML to load scripts that have define() calls in them.</li>
|
||||
<li>If you manually code an HTML script tag, be sure it only includes named modules, and that an anonymous module that will have the same name as one of the modules in that file is not loaded.</li>
|
||||
<li>If the problem is the use of loader plugins or anonymous modules but the RequireJS optimizer is not used for file bundling, use the RequireJS optimizer.</li>
|
||||
</ul>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div class="section">
|
||||
<h2><a name="timeout">Load timeout for modules: ...</a><span class="sectionMark">§ 2</span></h2>
|
||||
|
||||
<p>Likely causes and fixes:</p>
|
||||
|
||||
<ul>
|
||||
<li>There was a script error in one of the listed modules. If there is no script error in the browser's error console, and if you are using Firebug, try loading the page in another browser like Chrome or Safari. Sometimes script errors do not show up in Firebug.</li>
|
||||
<li>The path configuration for a module is incorrect. Check the "Net" or "Network" tab in the browser's developer tools to see if there was a 404 for an URL that would map to the module name. Make sure the script file is in the right place. In some cases you may need to use the <a href="api.html#config">paths configuration</a> to fix the URL resolution for the script.</li>
|
||||
<li>The paths config was used to set two module IDs to the same file, and that file only has one anonymous module in it. If module IDs "something" and "lib/something" are both configured to point to the same "scripts/libs/something.js" file, and something.js only has
|
||||
one anonymous module in it, this kind of timeout error can occur. The fix is to make sure all module ID references use the same ID (either choose "something" or "lib/something" for all references), or use <a href="api.html#config-map">map config</a>.</li>
|
||||
</ul>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div class="section">
|
||||
<h2><a name="defineerror">Error evaluating module ...</a><span class="sectionMark">§ 3</span></h2>
|
||||
|
||||
<p>An error occured when the define() function was called for the module given in the error message. It is an error with the code logic inside the define function. The error could happen inside a require callback.</p>
|
||||
|
||||
<p>In Firefox and WebKit browsers, a line number and file name will be indicated in the error. It can be used to locate
|
||||
the source of the problem. Better isolation of the error can be done by using a debugger to place a
|
||||
breakpoint in the file that contains the error.</p>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="section">
|
||||
<h2><a name="notloaded">Module name ... has not been loaded yet for context: ...</a><span class="sectionMark">§ 4</span></h2>
|
||||
|
||||
<p>This occurs when there is a require('name') call, but the 'name' module has not been loaded yet.</p>
|
||||
|
||||
<p>If the error message includes <strong>Use require([])</strong>, then
|
||||
it was a top-level require call (not a require call inside a define() call) that should be using the async, callback version of require to load the code:</p>
|
||||
|
||||
<pre><code>//If this code is not in a define call,
|
||||
//DO NOT use require('foo'), but use the async
|
||||
//callback version:
|
||||
require(['foo'], function (foo) {
|
||||
//foo is now loaded.
|
||||
});
|
||||
</code></pre>
|
||||
|
||||
<p>If you are using the simplified define wrapper, make sure you have <strong>require</strong> as the first argument to the definition function:</p>
|
||||
|
||||
<pre><code>define(function (require) {
|
||||
var namedModule = require('name');
|
||||
});
|
||||
</code></pre>
|
||||
|
||||
<p>If you are listing dependencies in the dependency array, make sure that <strong>require</strong> and <strong>name</strong> are in the dependency array:</p>
|
||||
|
||||
<pre><code>define(['require', 'name'], function (require) {
|
||||
var namedModule = require('name');
|
||||
});
|
||||
</code></pre>
|
||||
|
||||
<p>In particular, <strong>the following will not work</strong>:</p>
|
||||
|
||||
<pre><code>//THIS WILL FAIL
|
||||
define(['require'], function (require) {
|
||||
var namedModule = require('name');
|
||||
});
|
||||
</code></pre>
|
||||
|
||||
<p>This fails because requirejs needs to be sure to load and execute all dependencies
|
||||
before calling the factory function above. If a dependency array is given to define(),
|
||||
then requirejs assumes that all dependencies are listed in that array, and it will
|
||||
not scan the factory function for other dependencies. So, either do not pass in the dependency array, or if using the dependency array, list all the dependencies in it.</p>
|
||||
|
||||
<p>If part of a require() callback, all the dependencies need to be listed in the array:</p>
|
||||
|
||||
<pre><code>require(['require', 'name'], function (require) {
|
||||
var namedModule = require('name');
|
||||
});
|
||||
</code></pre>
|
||||
|
||||
<p>Be sure that <strong>require('name')</strong> only occurs inside a define() definition function or a require() callback function, never in the global space by its own.</p>
|
||||
|
||||
<p><strong>In the RequreJS 1.0.x releases</strong>, there <a href="https://github.com/jrburke/requirejs/issues/265">is a bug</a> with having a space between the require and parens in WebKit browsers when using the simplified CommonJS wrapping (no dependency array):</p>
|
||||
|
||||
<pre><code>define(function (require) {
|
||||
//Notice the space between require and the arguments.
|
||||
var namedModule = require ('name');
|
||||
});
|
||||
</code></pre>
|
||||
|
||||
<p>The workaround is to just remove the space. This is fixed in the 2.0 code, and may be backported to the 1.0.x series if a 1.0.9 release is done.</p>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div class="section">
|
||||
<h2><a name="requireargs">Invalid require call</a><span class="sectionMark">§ 5</span></h2>
|
||||
|
||||
<p>This occurs when there is a call like:</p>
|
||||
|
||||
<pre><code>require('dependency', function (dependency) {});
|
||||
</code></pre>
|
||||
|
||||
<p>Asynchronously loading dependencies should use an array to list the dependencies:</p>
|
||||
|
||||
<pre><code>require(['dependency'], function (dependency) {});
|
||||
</code></pre>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div class="section">
|
||||
<h2><a name="nodefine">No define call for ...</a><span class="sectionMark">§ 6</span></h2>
|
||||
|
||||
<p>This occurs when <a href="api.html##config-enforceDefine">enforceDefine is set to true</a>, and a script that is loaded either:</p>
|
||||
|
||||
<ul>
|
||||
<li>Did not call define() to declare a module.</li>
|
||||
<li>Or was part of a <a href="api.html#config-shim">shim config</a> that specified
|
||||
a string <code>exports</code> property that can be checked to verify loading, and that check failed.</li>
|
||||
<li>Or was part of a <a href="api.html#config-shim">shim config</a> that did not set a string value for the <code>exports</code> config option.</li>
|
||||
</ul>
|
||||
|
||||
<p>Or, if the error shows up only in IE and not in other browsers (which may generate a <a href="#scripterror">Script error</a>, the script probably:</p>
|
||||
|
||||
<ul>
|
||||
<li>Threw a JavaScript syntax/evaluation error.</li>
|
||||
<li>Or there was a 404 error in IE where the script failed to load.</li>
|
||||
</ul>
|
||||
|
||||
<p>Those IE behaviors result in <a href="api.html#ieloadfail">IE's quirks in detecting script errors</a>.</p>
|
||||
|
||||
<p>To fix it:</p>
|
||||
|
||||
<ul>
|
||||
<li>If the module calls define(), make sure the define call was reached by debugging in a script debugger.</li>
|
||||
<li>If part of a shim config, make sure the shim config's exports check is correct.</li>
|
||||
<li>If in IE, check for an HTTP 404 error or a JavaScript sytnax error by using a script debugger.</li>
|
||||
</ul>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="section">
|
||||
<h2><a name="scripterror">Script error</a><span class="sectionMark">§ 7</span></h2>
|
||||
|
||||
<p>This occurs when the script.onerror function is triggered in a browser. This usually means there is a JavaScript syntax error or other execution problem running the script. To fix it, examine the script that generated the error in a script debugger.</p>
|
||||
|
||||
<p>This error may not show up in IE, just other browsers, and instead, in IE you may see the <a href="#nodefine">No define call for ...</a> error when you see "Script error". This is due to <a href="api.html#ieloadfail">IE's quirks in detecting script errors</a>.</p>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div class="section">
|
||||
<h2><a name="interactive">No matching script interactive for ...</a><span class="sectionMark">§ 8</span></h2>
|
||||
|
||||
<p>This error only shows up in some IE browsers. Most likely caused by loading a script that calls define() but was loaded in a plain script tag or via some other call, like an eval() of a JavaScript string.</p>
|
||||
|
||||
<p>To avoid the error, be sure to load all scripts that call define via the RequireJS API.</p>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="section">
|
||||
<h2><a name="pathnotsupported">Path is not supported: ...</a><span class="sectionMark">§ 9</span></h2>
|
||||
|
||||
<p>This error occurs when the optimizer encounters a path to a module or script which is a network path. The optimizer only allows
|
||||
building with local resources. To fix it:</p>
|
||||
|
||||
<p>Make sure you reference the network dependency as a module name, not as a full URL, so that it can be mapped to a different
|
||||
during the build:</p>
|
||||
|
||||
|
||||
<pre><code>//DO NOT DO THIS
|
||||
require(['http://some.domain.dom/path/to/dependency.js'],
|
||||
function (dependency) {});
|
||||
|
||||
//Rather, do this:
|
||||
require.config({
|
||||
paths: {
|
||||
'dependency': 'http://some.domain.dom/path/to/dependency'
|
||||
}
|
||||
});
|
||||
|
||||
require(['dependency'], function (dependency) {});
|
||||
</code></pre>
|
||||
|
||||
<p>If you want to include this dependency in the built/optimized file, download the JS file and in the
|
||||
build profile for the optimizer, put in a paths config that points to that local file.</p>
|
||||
|
||||
<p>If you want to <b>exclude</b> that file from being included, and just need to map "dependency"
|
||||
for the build (otherwise it will not build), then use the special "empty:" paths config:</p>
|
||||
|
||||
<pre><code>//Inside the build profile
|
||||
{
|
||||
paths: {
|
||||
'dependency': 'empty:'
|
||||
}
|
||||
}
|
||||
</code></pre>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="section">
|
||||
<h2><a name="sourcemapcomments">Cannot use preserveLicenseComments and generateSourceMaps together</a><span class="sectionMark">§ 10</span></h2>
|
||||
|
||||
<p>In the r.js optimizer, <strong>preserveLicenseComments</strong> works as a pre- and post-processing step on a JS file. Various kinds of license comments are found, pulled out of the JS source, then that modified source is passed to the minifier. When the minifier is done, the comments are added to the top of the file by the r.js optimizer.</p>
|
||||
|
||||
<p>However, for the minifier to accurately construct a source map, the minified source cannot be modified in any way, so <strong>preserveLicenseComments</strong> is incompatible with <strong>generateSourceMaps</strong>. generateSourceMaps was introduced in version 2.1.2 of the optimizer.</p>
|
||||
|
||||
<p>The default for the optimizer is for <strong>preserveLicenseComments</strong> to be true. So if using <strong>generateSourceMaps</strong>, then explicitly set <strong>preserveLicenseComments</strong> to false. If you want to preserve some license comments, you can manually modify the license comments in the JS source to use the JSDoc-style <code>@license</code> comment. See "<a href="https://developers.google.com/closure/compiler/docs/js-for-compiler#tag-license">Annotating JavaScript for the Closure Compiler</a>" for more information. That same format works for UglifyJS2.</p>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="section">
|
||||
<h2><a name="importscripts">importScripts failed for ...</a><span class="sectionMark">§ 11</span></h2>
|
||||
|
||||
<p>When RequireJS is used in a <a href="https://developer.mozilla.org/en-US/docs/DOM/Using_web_workers">Web Worker</a>, <a href="https://developer.mozilla.org/en-US/docs/DOM/Using_web_workers#Importing_scripts_and_libraries">importScripts</a> is used to load modules. If that call failed for some reason, this error is generated.</p>
|
||||
|
||||
</div>
|
136
src/bower_components/requirejs/docs/faq-advanced.html
vendored
Normal file
136
src/bower_components/requirejs/docs/faq-advanced.html
vendored
Normal file
|
@ -0,0 +1,136 @@
|
|||
<div id="directory" class="section">
|
||||
<h1>FAQ: RequireJS Advanced Usage</h1>
|
||||
|
||||
<ul class="index mono">
|
||||
<li class="hbox"><a href="#rename">How can I rename require?</a><span class="spacer boxFlex"></span><span class="sect">§ 1</span></li>
|
||||
<li class="hbox"><a href="#css">What about loading CSS?</a><span class="spacer boxFlex"></span><span class="sect">§ 2</span></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<div class="section">
|
||||
<h2><a name="rename">How can I rename require/define/requirejs?</a><span class="sectionMark">§ 1</span></h2>
|
||||
|
||||
<p>RequireJS and its optimization tool need to be version 0.26.0 or higher for this to work.</p>
|
||||
|
||||
<p>Why would you want to do this? You may have very strict global namespace requirements
|
||||
or you may be using code that already defines require/define and you want to avoid interference.</p>
|
||||
|
||||
<p>Some notes on this capability:</p>
|
||||
|
||||
<ul>
|
||||
<li>Make sure to use a source version of require.js, not a minified version.</li>
|
||||
<li>Make sure that version of require.js is included in the optimization because the require.js
|
||||
file contents are altered for the namespacing to work.</li>
|
||||
<li>Code your modules using require/define as normal, then do a build to namespace the values.
|
||||
Do not code your modules using the namespaced require/define. It will make your code less
|
||||
portable and usable by others.</li>
|
||||
<li>This transformation/optimization only works once. Do not use the output of this optimization as
|
||||
input to another optimization/build stage.</li>
|
||||
</ul>
|
||||
|
||||
<p>The following example optimization config is based on the directory structure
|
||||
used in the example on the <a href="optimization.html"> optimization page</a>. This config combines
|
||||
require.js with main.js into a new <strong>foo.js</strong>. file. define() is renamed to <strong>foo.define()</strong>
|
||||
and require() is renamed to <strong>foo.require()</strong>:</p>
|
||||
|
||||
<pre><code>
|
||||
{
|
||||
appDir: "../",
|
||||
baseUrl: "scripts",
|
||||
dir: "../../appdirectory-build",
|
||||
|
||||
//Put in a mapping so that 'requireLib' in the
|
||||
//modules section below will refer to the require.js
|
||||
//contents.
|
||||
paths: {
|
||||
requireLib: 'require'
|
||||
},
|
||||
|
||||
//Indicates the namespace to use for require/requirejs/define.
|
||||
namespace: "foo",
|
||||
|
||||
modules: [
|
||||
{
|
||||
name: "foo",
|
||||
include: ["requireLib", "main"],
|
||||
//True tells the optimizer it is OK to create
|
||||
//a new file foo.js. Normally the optimizer
|
||||
//wants foo.js to exist in the source directory.
|
||||
create: true
|
||||
}
|
||||
]
|
||||
}
|
||||
</code></pre>
|
||||
|
||||
|
||||
<p>Once this optimization is done, the HTML that used to refer to require.js would
|
||||
need to be modified to refer to foo.js.</p>
|
||||
|
||||
<p>Thanks to <a href="http://ryanflorence.com">Ryan Florence</a> for help on the namespace design.</p>
|
||||
|
||||
<hr>
|
||||
|
||||
<p>Another approach to renaming, if you prefer to have more direct control of the content, and
|
||||
want to commit source code with the modifications. This approach <strong>should not be used</strong>
|
||||
with the "namespace" optimization demonstrated above.</p>
|
||||
|
||||
<div class="subSection">
|
||||
<h4>1) Modify the source of require.js</h4>
|
||||
|
||||
<p>There needs to be a wrapper around the require.js code so you can set the require function to the name of your choosing:</p>
|
||||
|
||||
<pre><code>var myGlobalRequire = (function () {
|
||||
//Define a require object here that has any
|
||||
//default configuration you want for RequireJS. If
|
||||
//you do not have any config options you want to set,
|
||||
//just use an simple object literal, {}. You may need
|
||||
//to at least set baseUrl.
|
||||
var require = {
|
||||
baseUrl: '..'
|
||||
};
|
||||
|
||||
//INSERT require.js CONTENTS HERE
|
||||
|
||||
return require;
|
||||
}());
|
||||
</code></pre>
|
||||
</div>
|
||||
|
||||
<div class="subSection">
|
||||
<h4>2) Modify loaded files</h4>
|
||||
|
||||
<p>For any files you load with this new function, if those files reference require in any way, you will want to wrap them in an anonymous function to set the value of require to be your new function name that you set up in step 1:</p>
|
||||
|
||||
<pre><code>(function (require) {
|
||||
|
||||
//Regular require references now work correctly in here.
|
||||
|
||||
}(myGlobalRequire));
|
||||
</code></pre>
|
||||
|
||||
<p>Following the steps above should allow you to use the optimization tool to combine scripts together effectively. If you want your renamed require definition in the optimized script, reference your modified require.js directly in the <strong>include</strong> optimization option, or as the <strong>name</strong> option if you want to optimize that file directly.</p>
|
||||
|
||||
<p>Thanks to <a href="http://alexsexton.com/">Alex Sexton</a> and <a href="http://tobielangel.com/">Tobie Langel</a> for suggesting parts of this solution.</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="section">
|
||||
<h2><a name="css">What about loading CSS?</a><span class="sectionMark">§ 2</span></h2>
|
||||
|
||||
<p>Ideally RequireJS could load CSS files as dependencies. However, there are issues knowing when a CSS file has been loaded, particularly in Gecko/Firefox when the file is loaded from another domain. Some history can be found in <a href="http://bugs.dojotoolkit.org/ticket/5402">this Dojo ticket</a>.</p>
|
||||
|
||||
<p>Knowing when the file is loaded is important because you may only want to grab the dimensions of a DOM element once the style sheet has loaded.</p>
|
||||
|
||||
<p>Some people have implemented an approach where they look for a well known style to be applied to a specific HTML element to know if a style sheet is loaded. Due to the specificity of that solution, it is not something that would fit well with RequireJS. Knowing when the link element has loaded the referenced file would be the most robust solution.</p>
|
||||
|
||||
<p>Since knowing when the file has loaded is not reliable, it does not make sense to explicitly support CSS files in RequireJS loading, since it will lead to bug reports due to browser behavior. If you do not care when the file is loaded, you can easily write your own function to load CSS on demand by doing the following:</p>
|
||||
|
||||
<pre><code>function loadCss(url) {
|
||||
var link = document.createElement("link");
|
||||
link.type = "text/css";
|
||||
link.rel = "stylesheet";
|
||||
link.href = url;
|
||||
document.getElementsByTagName("head")[0].appendChild(link);
|
||||
}
|
||||
</code></pre>
|
||||
</div>
|
55
src/bower_components/requirejs/docs/faq-optimization.html
vendored
Normal file
55
src/bower_components/requirejs/docs/faq-optimization.html
vendored
Normal file
|
@ -0,0 +1,55 @@
|
|||
<div id="directory" class="section">
|
||||
<h1>FAQ: RequireJS Optimizations</h1>
|
||||
<ul class="index mono">
|
||||
<li class="hbox"><a href="#usage">How do I use the Optimization Tool?</a><span class="spacer boxFlex"></span><span class="sect">§ 1</span></li>
|
||||
<li class="hbox"><a href="#wrap">How can I provide a library to others that does not depend on RequireJS?</a><span class="spacer boxFlex"></span><span class="sect">§ 2</span></li>
|
||||
<li class="hbox"><a href="#namespace">How can I namespace my code to play well in other people's pages?</a><span class="spacer boxFlex"></span><span class="sect">§ 3</span></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<div class="section">
|
||||
<h2><a name="usage">How do I use the Optimization Tool?</a><span class="sectionMark">§ 1</span></h2>
|
||||
|
||||
<p>See the <a href="optimization.html">general optimization page</a> for basic set-up. Also see the <a href="jquery.html">jQuery doc page</a> for a good way to set up your project, even if you are not using jQuery.</p>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="section">
|
||||
<h2><a name="wrap">How can I provide a library to others that does not depend on RequireJS?</a><span class="sectionMark">§ 2</span></h2>
|
||||
|
||||
<p>If you are building a library for use on web pages that may not use RequireJS or an AMD loader, you can use the optimizer to combine
|
||||
all your modules into one file, then wrap them in a function and use an AMD API shim. This allows you to ship code that does not ship with all
|
||||
of RequireJS, and allows you to export any kind of API that works on a plain web page without an AMD loader.</p>
|
||||
|
||||
<p><a href="https://github.com/jrburke/almond">almond</a> is an AMD API shim that is very small, so it can be used in place of require.js
|
||||
when all of your modules are built into one file using the RequireJS optimizer. The
|
||||
<a href="https://github.com/jrburke/r.js/blob/master/build/example.build.js#L429">wrap</a> build config option will put a function
|
||||
wrapper around the code, or you can provide your own wrapper if you need to do extra logic.</p>
|
||||
|
||||
<p>See the almond project for details on how to build with the API shim and with wrap.</p>
|
||||
|
||||
<p>If you need to dynamically load code after a build, then using almond+wrap will not be sufficient as almond cannot dynamically
|
||||
load code. Instead, you may want to namespace your use of require/define. See next section.</p>
|
||||
</div>
|
||||
|
||||
<div class="section">
|
||||
<h2><a name="namespace">How can I namespace my code to play well in other people's pages?</a><span class="sectionMark">§ 3</span></h2>
|
||||
|
||||
<p>If you want to provide your code to web sites that may not use an AMD loader, and you need to dynamically load code,
|
||||
doing a simple <a href="#wrap">one file build with a wrapper</a> is not enough. You also may want isolate your loading needs from
|
||||
the page's AMD loader.</p>
|
||||
|
||||
<p>There is a <a href="https://github.com/jrburke/r.js/blob/master/build/example.build.js#L276">namespace</a> build option that
|
||||
does the following:</p>
|
||||
|
||||
<ul>
|
||||
<li>Renames requirejs, require and define uses to have "namespace." in front of them.</li>
|
||||
<li>If the file does an existence check for define, in the following form <code>typeof define === 'function' && define.amd</code>,
|
||||
then it will prefix the define references with "namespace.".</li>
|
||||
<li>If require.js is included in the built file, it will make sure it exposes the "namespace." versions of the API.</li>
|
||||
</ul>
|
||||
|
||||
<p>Do not code your source with namespace.require()/namespace.define() calls, but rather use require()/define() as you
|
||||
normally would, then use the optimizer to do the renaming.</p>
|
||||
|
||||
</div>
|
8
src/bower_components/requirejs/docs/faq.html
vendored
Normal file
8
src/bower_components/requirejs/docs/faq.html
vendored
Normal file
|
@ -0,0 +1,8 @@
|
|||
<div id="directory" class="section">
|
||||
<h1>RequireJS FAQs (Frequently Asked Questions)</h1>
|
||||
|
||||
<ul class="index mono">
|
||||
<li class="hbox"><a href="faq-optimization.html">Optimization Tool</a><span class="spacer boxFlex"></span><span class="sect">page 1</span></li>
|
||||
<li class="hbox"><a href="faq-advanced.html">Advanced Use</a><span class="spacer boxFlex"></span><span class="sect">page 2</span></li>
|
||||
</ul>
|
||||
</div>
|
28
src/bower_components/requirejs/docs/history.html
vendored
Normal file
28
src/bower_components/requirejs/docs/history.html
vendored
Normal file
|
@ -0,0 +1,28 @@
|
|||
<div id="directory" class="section">
|
||||
<h1>RequireJS History</h1>
|
||||
</div>
|
||||
|
||||
<div class="section">
|
||||
<p><a href="https://github.com/jrburke">I</a> worked a lot on the Dojo Loader. The normal dojo loader used to use synchronous XMLHttpRequest (XHR) calls. However, the XHR loader couldn't load Dojo modules from other domains because of the same-origin restrictions. So I created the xdomain loader that required a build step to inject function wrappers similar to what RequireJS uses, but more complex, due to i18n bundle loading and dojo.requireIf behavior. Because of the more complex i18n and requireIf requirements and the existence of many dojo modules already out in the world, I did not feel like the Dojo community would consider writing modules with function wrappers manually.</p>
|
||||
|
||||
<p>However, the sync XHR loader has other issues, like making debugging harder. In 2009, David Mark suggested that Dojo use document.write() to load modules before the page loads to help with that issue, but it meant required dependencies would not load until after the current module executes. This can cause errors if the module references a dependency as part of the module's definition. So a function wrapper was needed. The Dojo community seemed more amenable to considering a function wrapper, particularly since we are considering a Dojo 2.0 that can break some APIs. I fleshed out some of the details for RequireJS (then called RunJS) on the dojo-contributors list, and Mike Wilson originally pushed for a more generic loader that could load plain files as well as allow for different contexts.</p>
|
||||
|
||||
<p>YUI 3's use() function is also very similar to require, and use()'s API (but not code) also informed RequireJS' structure. I believe RequireJS is more generic, since YUI seems to use labels for their modules that do not directly correspond to file paths. I also liked explicitly passing the dependent modules as arguments to the function definition, since it allowed linting tools like JSLint to be more effective.</p>
|
||||
|
||||
<p>I originally wanted something that would work with CommonJS modules, but those modules seemed to be structured assuming a synchronous module loader, which is possible in server-side JavaScript environments. However, I was mostly concerned with something that worked well in the browser, and that meant needing a function wrapper so we could use script tags. Using synchronous XHR is not very friendly for new developers or people who want ease of debugging across browsers. It can also be slower than plain script tag loading. Some environments, like Adobe AIR do not allow eval() and most developers are taught that eval() is evil and should be avoided.</p>
|
||||
|
||||
<p>I created the seeds of RequireJS as RunJS. As I tried to get more in sync with CommonJS modules to allow more code reuse, I proposed <a href="http://wiki.commonjs.org/wiki/Modules/Transport/C">CommonJS Transport/C proposal</a>. The transport format allows mapping traditional CommonJS modules to a format that works best in the browser. I then converted the RunJS code to RequireJS to match the API in the Transport/C proposal.</p>
|
||||
|
||||
<p>In the process of implementing the transport format, it became clearer that CommonJS modules allowed an imperative require() usage, which is awkward on the web. Many cases would not work in a web context, and a better solution was to allow for a callback-based require for those cases. However, some of the participants on the CommonJS list wanted to keep the imperative use even in a callback-style require, which made that API more wordy than it should have been.</p>
|
||||
|
||||
<p>There was some tuning of the Transport/C proposal, and Kris Zyp figured out how to get anonymous modules to work within that format. At that point, Kris felt like it could function as a module API proposal instead of just a transport format, and he created a proposal on the CommonJS wiki for an Asynchronous Module Definition (AMD) API. During the discussion of that API, Tom Robinson suggested the use of Function.prototype.toString() to scan a factory function for dependencies, although Tom did not care for the AMD API in general. The toString() scanning was incorporated in the AMD API as a simplified CommonJS wrapping, since not all JS environments supported usable toString() values.</p>
|
||||
|
||||
<p>Some participants on the CommonJS list that felt the AMD API proposal was not in line with the original CommonJS module goals since it did not keep the full imperative require() style in CommonJS modules. They also felt that proposal was sprung on the list and implemented and evangelized improperly, although from my perspective it was marked as a proposal, and there were other people talking about their implementations of other CommonJS proposals.</p>
|
||||
|
||||
<p>There was enough break down in communication that it made it difficult to continue discussing AMD on the CommonJS list. However, there were enough of us web developers that still saw value in it, and there was still some API work to be done around loader plugins and callback-require that the amd-implement email list and amdjs Github group were formed to continue those discussions.</p>
|
||||
|
||||
<p>Through the amd-implement list, the callback-require and loader plugin APIs got more definition and a set of unit tests. More AMD implementations were made. Dojo was already in a code conversion process to use AMD, and other people like MooTools and EmbedJS picked it up. AMD loaders gained traction in the jQuery community among those that wanted modular JS loading capabilities.</p>
|
||||
|
||||
<p>AMD has a healthy ecosystem around it now. I continue to help push AMD forward by providing a solid implementation in RequireJS, and making sure it fits well with the web.</p>
|
||||
|
||||
</div>
|
164
src/bower_components/requirejs/docs/jquery.html
vendored
Normal file
164
src/bower_components/requirejs/docs/jquery.html
vendored
Normal file
|
@ -0,0 +1,164 @@
|
|||
<div id="directory" class="section">
|
||||
<h1>How to use RequireJS with jQuery</h1>
|
||||
|
||||
<ul class="index mono">
|
||||
<li class="hbox">
|
||||
<a href="#intro">Introduction</a><span class="spacer boxFlex"></span><span class="sect">§ 1</span>
|
||||
</li>
|
||||
<li class="hbox">
|
||||
<a href="#globalvars">Global Functions</a><span class="spacer boxFlex"></span><span class="sect">§ 2</span>
|
||||
</li>
|
||||
<li class="hbox">
|
||||
<a href="#modulename">Module Name</a><span class="spacer boxFlex"></span><span class="sect">§ 3</span>
|
||||
</li>
|
||||
<li class="hbox">
|
||||
<a href="#shimconfig">Example using shim config</a><span class="spacer boxFlex"></span><span class="sect">§ 4</span>
|
||||
</li>
|
||||
<li class="hbox">
|
||||
<a href="#cdnconfig">Example loading jquery from a CDN</a><span class="spacer boxflex"></span><span class="sect">§ 5</span>
|
||||
</li>
|
||||
<li class="hbox">
|
||||
<a href="#noconflictmap">Mapping Modules to use noConflict</a><span class="spacer boxflex"></span><span class="sect">§ 6</span>
|
||||
</li>
|
||||
<li class="hbox">
|
||||
<a href="#oldexample">The previous example with a concatenated require-jquery file</a><span class="spacer boxflex"></span><span class="sect">§ 7</span>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<div class="section">
|
||||
<h2>
|
||||
<a name="intro" href="#intro">Introduction</a>
|
||||
<span class="sectionMark">§ 1</span>
|
||||
</h2>
|
||||
|
||||
<p>While RequireJS loads jQuery just like any other dependency, jQuery's wide use and extensive plugin ecosystem mean you'll likely have other scripts in your project that also depend on jQuery. You might approach your jQuery RequireJS configuration differently depending on whether you are starting a new project or whether you are adapting existing code.</p>
|
||||
|
||||
<div class="section">
|
||||
<h2>
|
||||
<a name="globalvars" href="#globalvars">Global Functions</a>
|
||||
<span class="sectionMark">§ 2</span>
|
||||
</h2>
|
||||
<p>jQuery registers itself as the global variables "$" and "jQuery", even when it detects AMD/RequireJS. The AMD approach advises against the use of global functions, but the decision to turn off these jQuery globals hinges on whether you have non-AMD code that depends on them. jQuery has a <a href="http://api.jquery.com/jQuery.noConflict/">noConflict function</a> that supports releasing control of the global variables and this can be automated in your require.config, as we will see <a href="#noconflictmap">later</a>.</p>
|
||||
</div>
|
||||
|
||||
<div class="section">
|
||||
<h2>
|
||||
<a name="modulename" href="#modulename">Module Name</a>
|
||||
<span class="sectionMark">§ 3</span>
|
||||
</h2>
|
||||
|
||||
<p>jQuery defines <a href="api.html#modulename">named AMD module</a> 'jquery' (all lower case) when it detects AMD/RequireJS. To reduce confusion, we recommend using 'jquery' as the module name in your require.config.
|
||||
|
||||
<p>Example:</p>
|
||||
|
||||
<pre><code>require.config({
|
||||
baseUrl: 'js/lib',
|
||||
paths: {
|
||||
// the left side is the module ID,
|
||||
// the right side is the path to
|
||||
// the jQuery file, relative to baseUrl.
|
||||
// Also, the path should NOT include
|
||||
// the '.js' file extension. This example
|
||||
// is using jQuery 1.9.0 located at
|
||||
// js/lib/jquery-1.9.0.js, relative to
|
||||
// the HTML page.
|
||||
jquery: 'jquery-1.9.0'
|
||||
}
|
||||
});
|
||||
</code></pre>
|
||||
|
||||
<p>The other (recommended) solution is to just name the file 'jquery.js' and
|
||||
place it in the baseUrl directory. Then the above paths entry is not needed.</p>
|
||||
|
||||
<p>You can avoid lots of configuration lines by placing the files according to
|
||||
the default ID-to-path convention of
|
||||
<code>baseUrl + moduleID + '.js'</code>. The examples below show how to
|
||||
set baseUrl to be the directory for third-party, library code, and use
|
||||
one extra paths config for your app code.</p>
|
||||
</div>
|
||||
|
||||
<div class="section">
|
||||
<h2>
|
||||
<a name="shimconfig" href="#shimconfig">Example using shim config</a>
|
||||
<span class="sectionMark">§ 4</span>
|
||||
</h2>
|
||||
|
||||
<p>This example shows how to use the <a href="api.html#config-shim">shim config</a> to specify dependencies for jQuery plugins that do not call <a href="api.html#define">define()</a>. This example is useful if you have an existing jQuery project you want to convert and do not want to modify the sources of the jQuery plugins to call define().</p>
|
||||
|
||||
<h4><a class="download" href="http://github.com/requirejs/example-jquery-shim">Example using jQuery with shim config</a></h4>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="section">
|
||||
<h2>
|
||||
<a name="cdnconfig" href="#cdnconfig">Example loading jquery from a CDN</a>
|
||||
<span class="sectionMark">§ 5</span>
|
||||
</h2>
|
||||
|
||||
<p>This is an example on how to load an optimize your code while loading jQuery from a <a href="http://en.wikipedia.org/wiki/Content_delivery_network">Content Delivery Network</a> (CDN). This example requires all your jQuery plugins to call <a href="api.html#define">define()</a> to properly express their dependencies. <a href="api.html#config-shim">Shim config</a> does not work after optimization builds with CDN resources.</p>
|
||||
|
||||
<h4><a class="download" href="http://github.com/requirejs/example-jquery-cdn">Example using jQuery from a CDN</a></h4>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="section">
|
||||
<h2>
|
||||
<a name="noconflictmap" href="#cdnconfig">Mapping Modules to use noConflict</a>
|
||||
<span class="sectionMark">§ 6</span>
|
||||
</h2>
|
||||
|
||||
<p>If <strong>all of your modules</strong> (including any third party jQuery plugins or library code that depend on jQuery) are AMD compatible and you want to avoid having $ or jQuery in the global namespace when they call <code>require(['jquery'])</code>, you can use the <a href="api.html#config-map">map config</a> to map the use of jQuery to a module that calls noConflict and returns that value of jQuery for the 'jquery' module ID.</p>
|
||||
|
||||
<p>You can use this example with the CDN example above -- the shim example will not work since shimmed libraries need a global jQuery.</p>
|
||||
|
||||
<pre><code>require.config({
|
||||
// Add this map config in addition to any baseUrl or
|
||||
// paths config you may already have in the project.
|
||||
map: {
|
||||
// '*' means all modules will get 'jquery-private'
|
||||
// for their 'jquery' dependency.
|
||||
'*': { 'jquery': 'jquery-private' },
|
||||
|
||||
// 'jquery-private' wants the real jQuery module
|
||||
// though. If this line was not here, there would
|
||||
// be an unresolvable cyclic dependency.
|
||||
'jquery-private': { 'jquery': 'jquery' }
|
||||
}
|
||||
});
|
||||
|
||||
// and the 'jquery-private' module, in the
|
||||
// jquery-private.js file:
|
||||
define(['jquery'], function (jq) {
|
||||
return jq.noConflict( true );
|
||||
});
|
||||
</code></pre>
|
||||
|
||||
|
||||
<p>This means that any module which uses jQuery will need to use the AMD return value rather than depending on the global $:</p>
|
||||
|
||||
<pre><code>
|
||||
require(['jquery'], function( $ ) {
|
||||
console.log( $ ) // OK
|
||||
});
|
||||
|
||||
require(['jquery'], function( jq ) {
|
||||
console.log( jq ) // OK
|
||||
});
|
||||
|
||||
require(['jquery'], function( ) {
|
||||
console.log( $ ) // UNDEFINED!
|
||||
});
|
||||
</code></pre>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="section">
|
||||
<h2>
|
||||
<a name="oldexample">The previous example with a concatenated require-jquery file</a>
|
||||
<span class="sectionMark">§ 7</span>
|
||||
</h2>
|
||||
<p>
|
||||
Previously, we've been pointing to an example using a special require-jquery file, which consisted of require.js and jQuery concatenated. This is no longer the recommended way to use jQuery with require.js, but if you're looking for the (no longer maintained) example, <a href="https://github.com/jrburke/require-jquery">you can find require-jquery here</a>.
|
||||
</p>
|
||||
</div>
|
189
src/bower_components/requirejs/docs/node.html
vendored
Normal file
189
src/bower_components/requirejs/docs/node.html
vendored
Normal file
|
@ -0,0 +1,189 @@
|
|||
<div id="directory" class="section">
|
||||
<h1>RequireJS in Node</h1>
|
||||
|
||||
<ul class="index mono">
|
||||
<li class="hbox">
|
||||
<a href="#1">Doesn't Node already have a module loader?</a><span class="spacer boxFlex"></span><span class="sect">§ 1</span>
|
||||
</li>
|
||||
<li class="hbox">
|
||||
<a href="#2">Can I use server modules written in the CommonJS module format?</a><span class="spacer boxFlex"></span><span class="sect">§ 2</span>
|
||||
</li>
|
||||
<li class="hbox">
|
||||
<a href="#3">How do I use it?</a><span class="spacer boxFlex"></span><span class="sect">§ 3</span>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="section">
|
||||
<h2>
|
||||
<a name="1">Doesn't Node already have a module loader?</a>
|
||||
<span class="sectionMark">§ 1</span>
|
||||
</h2>
|
||||
|
||||
<p>Yes <a href="http://nodejs.org">Node</a> does. That loader uses the CommonJS module format. The CommonJS module format is <a href="why.html">non-optimal for the browser</a>, and I do not agree with <a href="http://tagneto.blogspot.com/2010/03/commonjs-module-trade-offs.html">some of the trade-offs made in the CommonJS module format</a>. By using RequireJS on the server, you can use one format for all your modules, whether they are running server side or in the browser. That way you can preserve the speed benefits and easy debugging you get with RequireJS in the browser, and not have to worry about extra translation costs for moving between two formats.</p>
|
||||
|
||||
<p>If you want to use define() for your modules but still run them in Node without needing to run RequireJS on the server, see <a href="#nodeModules">the section below</a> about using <a href="https://github.com/jrburke/amdefine">amdefine</a>.</p>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="section">
|
||||
<h2>
|
||||
<a name="2">Can I use Node modules already written in the CommonJS module format?</a>
|
||||
<span class="sectionMark">§ 2</span></h2>
|
||||
|
||||
<p>Yes! The Node adapter for RequireJS, called r.js, will use Node's implementation of require and Node's search paths if the module is not found with the configuration used by RequireJS, so you can continue to use your existing Node-based modules without having to do changes to them.</p>
|
||||
|
||||
<p>RequireJS will use its <a href="api.html#config">Configuration Options</a> first to find modules. If RequireJS cannot find the module with its configuration, it is assumed to be a module that uses Node's type of modules and configuration. So, only configure module locations with RequireJS if they use the RequireJS API. For modules that expect Node's APIs and configuration/paths, just install them with a Node package manager, like <a href="http://npmjs.org/">npm</a>, and do not configure their locations with RequireJS.</p>
|
||||
|
||||
<p><strong>Best practice</strong>: Use npm to install Node-only packages/modules into the projects <strong>node_modules</strong> directory, but do not configure RequireJS to look inside the node_modules directory. Also avoid using relative module IDs to reference modules that are Node-only modules. So, <strong>do not</strong> do something like <strong>require("./node_modules/foo/foo")</strong>.</p>
|
||||
|
||||
<p>Finally, RequireJS in Node can only load modules that are on the local disk -- fetching modules across http, for instance, is not supported at this time.</p>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="section">
|
||||
<h2>
|
||||
<a name="3">How do I use it?</a>
|
||||
<span class="sectionMark">§ 3</span>
|
||||
</h2>
|
||||
|
||||
<p>There are two ways to get the Node adapter:</p>
|
||||
|
||||
<h3 id="npm">npm</h3>
|
||||
<p>Use <a href="http://npmjs.org">npm</a> to install it:</p>
|
||||
|
||||
<pre><code>npm install requirejs
|
||||
</code></pre>
|
||||
|
||||
<p>This option will install the latest release.</p>
|
||||
|
||||
<h3 id="rjs">Download r.js</h3>
|
||||
|
||||
<p>If you prefer to not use npm, you can get r.js directly:</p>
|
||||
|
||||
<ul>
|
||||
<li>Download r.js from the <a href="download.html#rjs">the download page</a> and place it in your project.</li>
|
||||
<li>Get the source from the <a href="https://github.com/jrburke/r.js">r.js repo</a> and either generate the r.js via "node dist.js", or grab a snapshot from the <strong>dist</strong> directory.</li>
|
||||
</ul>
|
||||
|
||||
<h3 id="usage">Usage<h3>
|
||||
|
||||
<p>These instructions assume an npm installation of 'requirejs'. If you are using the r.js file directly, replace require('requirejs') with require('./path/to/r.js'). Basic usage is:</p>
|
||||
|
||||
<ul>
|
||||
<li>require('requirejs')</li>
|
||||
<li>Pass the main js file's "require" function in the configuration to requirejs.</li>
|
||||
</ul>
|
||||
|
||||
<p>Example:</p>
|
||||
|
||||
<pre><code>var requirejs = require('requirejs');
|
||||
|
||||
requirejs.config({
|
||||
//Pass the top-level main.js/index.js require
|
||||
//function to requirejs so that node modules
|
||||
//are loaded relative to the top-level JS file.
|
||||
nodeRequire: require
|
||||
});
|
||||
|
||||
requirejs(['foo', 'bar'],
|
||||
function (foo, bar) {
|
||||
//foo and bar are loaded according to requirejs
|
||||
//config, but if not found, then node's require
|
||||
//is used to load the module.
|
||||
});
|
||||
</code></pre>
|
||||
|
||||
<p>Be sure to read the <a href="#2">notes in section 2</a> about configuring RequireJS so that it can load node-only modules installed via npm.</p>
|
||||
|
||||
<p>To see a more complete example that loads a module via RequireJS but uses Node-native modules for other things, see the <a href="https://github.com/jrburke/r.js/tree/master/tests/node/embedded">embedded test</a> in the r.js repo.</p>
|
||||
|
||||
<p><strong>Note:</strong> <code>requirejs([], function() {})</code> will call the function callback asynchronously in RequireJS 2.1+ (for earlier versions it was synchronously called). However, when running in Node, module loading will be loaded using sync IO calls, and loader plugins should resolve calls to their load method synchronously. This allows sync uses of the requirejs module in node to work via requirejs('stringValue') calls:
|
||||
|
||||
<pre><code>//Retrieves the module value for 'a' synchronously
|
||||
var a = requirejs('a')</code></pre>
|
||||
|
||||
<h3 id="nodeModules">Building node modules with AMD or RequireJS</h3>
|
||||
|
||||
<p>If you want to code a module so that it works with RequireJS and in Node, without requiring users of your library in Node to use RequireJS, then you can use the <a href="https://github.com/jrburke/amdefine">amdefine</a> package to do this:</p>
|
||||
|
||||
<pre><code>if (typeof define !== 'function') {
|
||||
var define = require('amdefine')(module);
|
||||
}
|
||||
|
||||
define(function(require) {
|
||||
var dep = require('dependency');
|
||||
|
||||
//The value returned from the function is
|
||||
//used as the module export visible to Node.
|
||||
return function () {};
|
||||
});
|
||||
</code></pre>
|
||||
|
||||
<p>The RequireJS optimizer, as of version 1.0.3, will strip out the use of 'amdefine' above, so it is safe to use this module for your web-based projects too. Just be sure to use <strong>the exact 'amdefine' if() test and contents as shown above</strong>. Differences in spaces/line breaks are allowed. See the <a href="https://github.com/jrburke/amdefine">amdefine project</a> for more information.</p>
|
||||
|
||||
<p>If you want to use RequireJS directly to code your module, and then export a module value to node so that it can be used in other Node programs without requiring that app to use RequireJS, you can use the approach listed in the next example.</p>
|
||||
|
||||
<p>It is best to set the baseUrl specifically to the directory containing the module, so that it works properly when nested inside a node_modules heirarchy. Use the synchronous <code>requirejs('moduleId')</code> to fetch the module using the config and rules in requirejs, then use Node's module.exports to export your module value:</p>
|
||||
|
||||
<pre><code>var requirejs = require('requirejs');
|
||||
|
||||
requirejs.config({
|
||||
//Use node's special variable __dirname to
|
||||
//get the directory containing this file.
|
||||
//Useful if building a library that will
|
||||
//be used in node but does not require the
|
||||
//use of node outside
|
||||
baseUrl: __dirname,
|
||||
|
||||
//Pass the top-level main.js/index.js require
|
||||
//function to requirejs so that node modules
|
||||
//are loaded relative to the top-level JS file.
|
||||
nodeRequire: require
|
||||
});
|
||||
|
||||
//foo and bar are loaded according to requirejs
|
||||
//config, and if found, assumed to be an AMD module.
|
||||
//If they are not found via the requirejs config,
|
||||
//then node's require is used to load the module,
|
||||
//and if found, the module is assumed to be a
|
||||
//node-formatted module. Note: this synchronous
|
||||
//style of loading a module only works in Node.
|
||||
var foo = requirejs('foo');
|
||||
var bar = requirejs('bar');
|
||||
|
||||
//Now export a value visible to Node.
|
||||
module.exports = function () {};
|
||||
</code></pre>
|
||||
|
||||
<h3 id="optimizer">Using the optimizer as a node module</h3>
|
||||
|
||||
<p>The node module also exposes the RequireJS Optimizer as an <strong>optimize</strong> method for using the <a href="optimization.html">RequireJS optimizer</a> via a function call instead of a command line tool:</p>
|
||||
|
||||
<pre><code>var requirejs = require('requirejs');
|
||||
|
||||
var config = {
|
||||
baseUrl: '../appDir/scripts',
|
||||
name: 'main',
|
||||
out: '../build/main-built.js'
|
||||
};
|
||||
|
||||
requirejs.optimize(config, function (buildResponse) {
|
||||
//buildResponse is just a text output of the modules
|
||||
//included. Load the built file for the contents.
|
||||
//Use config.out to get the optimized file contents.
|
||||
var contents = fs.readFileSync(config.out, 'utf8');
|
||||
}, function(err) {
|
||||
//optimization err callback
|
||||
});
|
||||
</code></pre>
|
||||
|
||||
<p>This allows you to build other optimization workflows, like <a href="https://github.com/jrburke/r.js/tree/master/build/tests/http">a web builder</a> that can be used if you prefer to always develop with the "one script file included before the </body> tag" approach. The optimizer running in Node if fairly fast, but for larger projects that do not want to regenerate the build for every browser request, but just if you modify a script that is part of the build. You could use Node's fs.watchFile() to watch files and then trigger the build when a file changes.</p>
|
||||
|
||||
<h3 id="feedback">Feedback</h3>
|
||||
|
||||
<p>If you find you have a problem, and want to report it, use the <a href="http://github.com/jrburke/r.js/issues">r.js GitHub Issues page</a>.</p>
|
||||
|
||||
<p>If you want to discuss the RequireJS-Node integration, you can use the <a href="http://groups.google.com/group/requirejs">RequireJS Group</a>.</p>
|
||||
</div>
|
514
src/bower_components/requirejs/docs/optimization.html
vendored
Normal file
514
src/bower_components/requirejs/docs/optimization.html
vendored
Normal file
|
@ -0,0 +1,514 @@
|
|||
<div id="directory" class="section">
|
||||
<h1>RequireJS Optimizer</h1>
|
||||
|
||||
<ul class="index mono">
|
||||
<li class="hbox"><a href="#requirements">Requirements</a><span class="spacer boxFlex"></span><span class="sect">§ 1</span></li>
|
||||
<li class="hbox"><a href="#download">Download</a><span class="spacer boxFlex"></span><span class="sect">§ 2</span></li>
|
||||
<li class="hbox"><a href="#setup">Example setup</a><span class="spacer boxFlex"></span><span class="sect">§ 3</span></li>
|
||||
<li class="hbox"><a href="#basics">Basics</a><span class="spacer boxFlex"></span><span class="sect">§ 4</span></li>
|
||||
<li class="hbox"><a href="#onejs">Optimizing one JavaScript file</a><span class="spacer boxFlex"></span><span class="sect">§ 5</span></li>
|
||||
<li class="hbox"><a href="#shallow">Shallow exclusions for fast development</a><span class="spacer boxFlex"></span><span class="sect">§ 6</span></li>
|
||||
<li class="hbox"><a href="#empty">empty: paths for network/CDN resources</a><span class="spacer boxFlex"></span><span class="sect">§ 7</span></li>
|
||||
<li class="hbox"><a href="#onecss">Optimizing one CSS file</a><span class="spacer boxFlex"></span><span class="sect">§ 8</span></li>
|
||||
<li class="hbox"><a href="#wholeproject">Optimizing a whole project</a><span class="spacer boxFlex"></span><span class="sect">§ 9</span></li>
|
||||
<li class="hbox"><a href="#wholemultipage">Optimizing a multi-page project</a><span class="spacer boxFlex"></span><span class="sect">§ 10</span></li>
|
||||
<li class="hbox"><a href="#turbo">Turbo options</a><span class="spacer boxFlex"></span><span class="sect">§ 11</span></li>
|
||||
<li class="hbox"><a href="#hasjs">Integration with has.js</a><span class="spacer boxFlex"></span><span class="sect">§ 12</span></li>
|
||||
<li class="hbox"><a href="#sourcemaps">Source maps</a><span class="spacer boxFlex"></span><span class="sect">§ 13</span></li>
|
||||
<li class="hbox"><a href="#options">All configuration options</a><span class="spacer boxFlex"></span><span class="sect">§ 14</span></li>
|
||||
<li class="hbox"><a href="#deployment">Deployment techniques</a><span class="spacer boxFlex"></span><span class="sect">§ 15</span></li>
|
||||
<li class="hbox"><a href="#pitfalls">Common pitfalls</a><span class="spacer boxFlex"></span><span class="sect">§ 16</span></li>
|
||||
</ul>
|
||||
|
||||
<p>RequireJS has an optimization tool that does the following</p>
|
||||
|
||||
<ul class="serif">
|
||||
<li>Combines related scripts together into build layers and minifies them via <a href="https://github.com/mishoo/UglifyJS">UglifyJS</a> (the default) or <a href="http://code.google.com/closure/compiler/">Closure Compiler</a> (an option when using Java).</li>
|
||||
<li>Optimizes CSS by inlining CSS files referenced by @import and removing comments.</li>
|
||||
</ul>
|
||||
|
||||
<p>The optimizer is part of the <a href="https://github.com/jrburke/r.js">r.js adapter for Node and Rhino</a>, and it is designed to be run as part of a build or packaging step after you are done with development and are ready to deploy the code for your users.</p>
|
||||
|
||||
<p>The optimizer will only combine modules that are specified in arrays of string literals that are passed to top-level require and define calls, or the require('name') string literal calls in a <a href="whyamd.html#sugar">simplified CommonJS wrapping</a>. So, it will not find modules that are loaded via a variable name:</p>
|
||||
|
||||
<pre><code>var mods = someCondition ? ['a', 'b'] : ['c', 'd'];
|
||||
require(mods);</code></pre>
|
||||
|
||||
<p>but 'a' and 'b' will be included if specified like so:</p>
|
||||
|
||||
<pre><code>require(['a', 'b']);</code></pre>
|
||||
|
||||
<p>or:</p>
|
||||
|
||||
<pre><code>define(['a', 'b'], function (a, b) {});</code></pre>
|
||||
|
||||
<p>This behavior allows dynamic loading of modules even after optimization. You can always explicitly add modules that are not found via the optimizer's static analysis by using the <strong>include</strong> option.</p>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="section">
|
||||
<h2>
|
||||
<a href="#requirements" name="requirements">Requirements</a>
|
||||
<span class="sectionMark">§ 1</span>
|
||||
</h2>
|
||||
|
||||
<p>The optimizer can be run using Node, Java with Rhino, or in the browser. The requirements for each option:<p>
|
||||
|
||||
<ul>
|
||||
<li><strong>Node:</strong> (preferred) <a href="http://nodejs.org">Node</a> 0.4.0 or later.</li>
|
||||
<li><strong>Java:</strong> <a href="http://java.com/">Java 1.6</a> or later.</li>
|
||||
<li><strong>Browser:</strong> as of 2.1.2, the optimizer can run in a web browser that has <a href="http://dev.opera.com/articles/view/javascript-array-extras-in-detail/">array extras</a>. While the optimizer options are the same as shown below, it is called via JavaScript instead of command line options. It is also only good for generating optimized single files, not a directory optimization. See <a href="https://github.com/jrburke/r.js/blob/master/tests/browser/r.html">the browser example</a>. This option is really only useful for providing web-based custom builds of your library.</li>
|
||||
</ul>
|
||||
|
||||
<p>For command line use, Node is the preferred execution environment. The optimizer runs <strong>much faster</strong> with Node.</p>
|
||||
|
||||
<p>All the example commands in this page assume Node usage, and running on a Linux/OS X command line. See the <a href="https://github.com/jrburke/r.js">r.js README</a> for how to run it in Java.</p>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="section">
|
||||
<h2><a href="#download" name="download">Download</a><span class="sectionMark">§ 2</span></h2>
|
||||
|
||||
<p>1) You can download the tool on <a href="download.html#rjs">the download page</a>.</p>
|
||||
|
||||
<p>2) If you are using Node with NPM, you can install r.js globally as part of the "requirejs" package in NPM:</p>
|
||||
|
||||
<pre><code>> npm install -g requirejs
|
||||
> r.js -o app.build.js
|
||||
</code></pre>
|
||||
|
||||
<p>If on Windows, you may need to type <code>r.js.cmd</code> instead of <code>r.js</code>. Or, you can
|
||||
use <a href="http://www.microsoft.com/resources/documentation/windows/xp/all/proddocs/en-us/doskey.mspx?mfr=true">DOSKEY</a>:</p>
|
||||
|
||||
<pre><code>DOSKEY r.js=r.js.cmd $*</code></pre>
|
||||
|
||||
<p>If you want to install requirejs locally in a project as an npm package, instead of globally:</p>
|
||||
|
||||
<pre><code>> npm install requirejs
|
||||
</code></pre>
|
||||
|
||||
<p>With this local install, you can run the optimizer by running the <code>r.js</code> or <code>r.js.cmd</code> file found in the project's <code>node_modules/.bin</code> directory.
|
||||
|
||||
<p>With the local install, you can also <a href="node.html#optimizer">use the optimizer via a function call</a> inside a node program.</p>
|
||||
|
||||
<p>The rest of this page assumes that r.js is just downloaded manually from the download page. It is normally the clearest, most portable way to use the optimizer.</p>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="section">
|
||||
<h2><a href="#setup" name="setup">Example setup</a><span class="sectionMark">§ 3</span></h2>
|
||||
|
||||
<p>The examples in this page will assume you downloaded and saved r.js in a directory that is a sibling to your project directory. The optimizer that is part of r.js can live anywhere you want, but you will likely need to adjust the paths accordingly in these examples.</p>
|
||||
|
||||
<p>Example setup:</p>
|
||||
|
||||
<ul>
|
||||
<li>appdirectory
|
||||
<ul>
|
||||
<li>main.html</li>
|
||||
<li>css
|
||||
<ul>
|
||||
<li>common.css</li>
|
||||
<li>main.css</li>
|
||||
</ul></li>
|
||||
<li>scripts
|
||||
<ul>
|
||||
<li>require.js</li>
|
||||
<li>main.js</li>
|
||||
<li>one.js</li>
|
||||
<li>two.js</li>
|
||||
<li>three.js</li>
|
||||
</ul></li>
|
||||
</ul></li>
|
||||
<li>r.js (The r.js optimizer from <a href="download.html#rjs">download page</a>)</li>
|
||||
</ul>
|
||||
|
||||
<p>main.html has script tags for require.js and loads main.js via a require call, like so:</p>
|
||||
|
||||
<pre><code><!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>My App</title>
|
||||
<link rel="stylesheet" type="text/css" href="css/main.css">
|
||||
<script data-main="scripts/main" src="scripts/require.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<h1>My App</h1>
|
||||
</body>
|
||||
</html>
|
||||
</code></pre>
|
||||
|
||||
<p>main.js loads one.js, two.js and three.js via a require call:</p>
|
||||
|
||||
<pre><code>require(["one", "two", "three"], function (one, two, three) {
|
||||
});
|
||||
</code></pre>
|
||||
|
||||
<p>main.css has content like the following:</p>
|
||||
|
||||
<pre><code>@import url("common.css");
|
||||
|
||||
.app {
|
||||
background: transparent url(../../img/app.png);
|
||||
}
|
||||
</code></pre>
|
||||
</div>
|
||||
|
||||
<div class="section">
|
||||
<h2>
|
||||
<a href="#basics" name="basics">Basics</a>
|
||||
<span class="sectionMark">§ 4</span>
|
||||
</h2>
|
||||
|
||||
<p><strong id="commandargs">Command line arguments are interchangeable with a build profile properties</strong></p>
|
||||
|
||||
<p>You can either specify options on the command line:</p>
|
||||
|
||||
<pre><code>node r.js -o baseUrl=. paths.jquery=some/other/jquery name=main out=main-built.js
|
||||
</code></pre>
|
||||
|
||||
<p>or in a build profile. In a <strong>build.js</strong>, the same command line arguments can be specified like so:</p>
|
||||
|
||||
<pre><code>({
|
||||
baseUrl: ".",
|
||||
paths: {
|
||||
jquery: "some/other/jquery"
|
||||
},
|
||||
name: "main",
|
||||
out: "main-built.js"
|
||||
})
|
||||
</code></pre>
|
||||
|
||||
<p>then just pass the build profile's file name to the optimizer:</p>
|
||||
|
||||
<pre><code>node r.js -o build.js
|
||||
</code></pre>
|
||||
|
||||
<p>Command line arguments take precedence over build profile settings, and you can mix them together:</p>
|
||||
|
||||
<pre><code>node r.js -o build.js optimize=none
|
||||
</code></pre>
|
||||
|
||||
<p>There is a <strong>limitation</strong> on the command line argument syntax. Dots are viewed as object property separators, to allow something like <code>paths.jquery=lib/jquery</code> to be transformed to the following in the optimizer:</p>
|
||||
|
||||
<pre><code>paths: {
|
||||
jquery: 'lib/jquery'
|
||||
}
|
||||
</code></pre>
|
||||
|
||||
<p>but this means you cannot set the value for a paths property of "core/jquery.tabs" to a value. This would not work: <code>paths.core/jquery.tabs=empty:</code>, since it would result in this incorrect structure:</p>
|
||||
|
||||
<pre><code>paths: {
|
||||
'core/jquery': {
|
||||
tabs: 'empty:'
|
||||
}
|
||||
}
|
||||
</code></pre>
|
||||
|
||||
<p>If you need to set a path like the "core/jquery.tabs" one, use a build.js file with the build options specified as a JavaScript object instead of using command line arguments.</p>
|
||||
|
||||
<p>For a list of all options, see <a href="#options">all configuration options</a>.</p>
|
||||
|
||||
<p><strong id="optionpaths">Relative path resolution rules:</strong>:</p>
|
||||
|
||||
<p>In general, if it is a path, it is relative to the build.js file used to hold the build options, or if just using command line arguments, relative to the current working directory. Example of properties that are file paths: <strong>appDir</strong>, <strong>dir</strong>, <strong>mainConfigFile</strong>, <strong>out</strong>, <strong>wrap.startFile</strong>, <strong>wrap.endFile</strong>.</p>
|
||||
|
||||
<p>For <strong>baseUrl</strong>, it is relative to <strong>appDir</strong>. If no appDir, then baseUrl is relative to the build.js file, or if just using command line arguments, the current working directory.</p>
|
||||
|
||||
<p>For <strong>paths</strong> and <strong>packages</strong>, they are relative to <strong>baseUrl</strong>, just as they are for require.js.</p>
|
||||
|
||||
<p>For properties that are module IDs, they should be module IDs, and not file paths. Examples are
|
||||
<strong>name</strong>, <strong>include</strong>, <strong>exclude</strong>, <strong>excludeShallow</strong>, <strong>deps</strong>.
|
||||
|
||||
<p><strong id="mainConfigFile">Config settings in your main JS module that is loaded in the browser at runtime <strong>are not read by default</strong> by the optimizer</strong></p>
|
||||
|
||||
<p>This is because the config settings for a build can be very different, with multiple optimization targets. So a separate set of config options need to be specified for the optimizer.</p>
|
||||
|
||||
<p>In version 1.0.5+ of the optimizer, the <strong><a href="https://github.com/jrburke/r.js/blob/master/build/example.build.js#L27">mainConfigFile</a></strong> option can be used to specify the location of the runtime config. If specified with the path to your main JS file, the first <code>requirejs({}), requirejs.config({}), require({}), or require.config({})</code> found in that file will be parsed out and used as part of the configuration options passed to the optimizer:</p>
|
||||
|
||||
<pre><code>mainConfigFile: 'path/to/main.js'
|
||||
</code></pre>
|
||||
|
||||
<p>The precedence for config: command line, build profile, mainConfigFile. In other words, the mainConfigFile configuration has the lowest priority.</p>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="section">
|
||||
<h2>
|
||||
<a href="#onejs" name="onejs">Optimizing one JavaScript file</a>
|
||||
<span class="sectionMark">§ 5</span>
|
||||
</h2>
|
||||
|
||||
<p>Use the above example setup, if you just wanted to optimize main.js, you could use this command, from inside the <strong>appdirectory/scripts</strong> directory:</p>
|
||||
|
||||
<pre><code>node ../../r.js -o name=main out=main-built.js baseUrl=.
|
||||
</code></pre>
|
||||
|
||||
<p>This will create a file called <strong>appdirectory/scripts/main-built.js</strong> that will include the contents of main.js, one.js, two.js and three.js.</p>
|
||||
|
||||
<p>Normally you should <strong>not</strong> save optimized files with your pristine project source. Normally you would save them to a copy of your project, but to make this example easier it is saved with the source. Change the <strong>out=</strong> option to any directory you like, that has a copy of your source. Then, you can change the main-built.js file name to just main.js so the HTML page will load the optimized version of the file.</p>
|
||||
|
||||
<p>If you want to include require.js with the main.js source, you can use this kind of command:</p>
|
||||
|
||||
<pre><code>node ../../r.js -o baseUrl=. paths.requireLib=../../require name=main include=requireLib out=main-built.js
|
||||
</code></pre>
|
||||
|
||||
<p>Since "require" is a reserved dependency name, you create a "requireLib" dependency and map it to the require.js file.</p>
|
||||
|
||||
<p>Once that optimization is done, you can change the script tag to reference "main-built.js" instead of "require.js", and your optimized project will only need to make one script request.</p>
|
||||
|
||||
<p>If you want to wrap your built file so it can be used in pages that do not have an AMD loader like RequireJS, see the <a href="faq-optimization.html">Optimization FAQ</a>.</p>
|
||||
</div>
|
||||
|
||||
<div class="section">
|
||||
<h2><a href="#shallow" name="shallow">Shallow exclusions for fast development</a><span class="sectionMark">§ 6</span> </h2>
|
||||
|
||||
<p>You can use the <a href="#onejs">one JavaScript file optimization</a> approach to make your development experience faster. By optimizing all the modules in your project into one file, except the one you are currently developing, you can reload your project quickly in the browser, but still give you the option of fine grained debugging in a module.</p>
|
||||
|
||||
<p>You can do this by using the <strong>excludeShallow</strong> option. Using the <a href="#example">example setup</a> above, assume you are currently building out or debugging two.js. You could use this optimization command:</p>
|
||||
|
||||
<pre><code>node ../../r.js -o name=main excludeShallow=two out=main-built.js baseUrl=.
|
||||
</code></pre>
|
||||
|
||||
<p>If you do not want the main-build.js file minified, pass <strong>optimize=none</strong> in the command above.</p>
|
||||
|
||||
<p>Then configure the HTML page to load the main-built.js file instead of main.js by configuring the path used for "main" to be "main-built":</p>
|
||||
|
||||
<pre><code><!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>My App</title>
|
||||
<link rel="stylesheet" type="text/css" href="css/main.css">
|
||||
<script src="scripts/require.js"></script>
|
||||
<script>
|
||||
require.config({
|
||||
paths: {
|
||||
//Comment out this line to go back to loading
|
||||
//the non-optimized main.js source file.
|
||||
"main": "main-built"
|
||||
}
|
||||
});
|
||||
require(["main"]);
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
<h1>My App</h1>
|
||||
</body>
|
||||
</html>
|
||||
</code></pre>
|
||||
|
||||
<p>Now, when this page is loaded, the require() for "main" will load the main-built.js file. Since excludeShallow told it just to exclude two.js, two.js will still be loaded as a separate file, allowing you to see it as a separate file in the browser's debugger, so you can set breakpoints and better track its individual changes.</p>
|
||||
</div>
|
||||
|
||||
<div class="section">
|
||||
<h2><a href="#empty" name="empty">empty: paths for network/CDN resources</a><span class="sectionMark">§ 7</span></h2>
|
||||
|
||||
<p>You may have a script you want to load from a <a href="http://en.wikipedia.org/wiki/Content_delivery_network">Content Delivery Network (CDN)</a> or any other server on a different domain.</p>
|
||||
|
||||
<p>The optimizer cannot load network resources, so if you want it included in the build, be sure to create a <a href="api.html#config-paths">paths config</a> to map the file to a module name. Then, for running the optimizer, download the CDN script and pass a paths config to the optimizer that maps the module name to the local file path.</p>
|
||||
|
||||
<p>However, it is more likely that you do not want to include that resource in the build. If the script does not have any dependencies, or you do not want to include its dependencies or will be including them in another way, then you can use the special <strong>'empty:' scheme</strong> in the paths config to just skip the file when doing an optimization.</p>
|
||||
|
||||
<p>In your main.js file, create a paths config that gives the script a module name. This can be done even if the script does not define a module via a call to define(). paths config are just used to map short module/script IDs to an URL. This allows you to use a a different paths config for the optimization. In main.js:</p>
|
||||
|
||||
<pre><code>requirejs.config({
|
||||
paths: {
|
||||
'jquery': 'https://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min'
|
||||
}
|
||||
});
|
||||
|
||||
require(['jquery'], function ($) {
|
||||
});
|
||||
</code></pre>
|
||||
|
||||
<p>Then, when running the optimizer, use 'empty:' for the paths config:</p>
|
||||
|
||||
<pre><code>node ../../r.js -o name=main out=main-built.js baseUrl=. paths.jquery=empty:
|
||||
</code></pre>
|
||||
|
||||
<p>Or, in a <a href="#wholeproject">build profile</a>:</p>
|
||||
|
||||
<pre><code>({
|
||||
baseUrl: ".",
|
||||
name: "main",
|
||||
out: "main-built.js",
|
||||
paths: {
|
||||
jquery: "empty:"
|
||||
}
|
||||
})
|
||||
</code></pre>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div class="section">
|
||||
<h2><a href="#onecss" name="onecss">Optimizing one CSS file</a><span class="sectionMark">§ 8</span></h2>
|
||||
|
||||
<p>Use the above example setup, if you just wanted to optimize main.css, you could use this command, from inside the <strong>appdirectory/css</strong> directory:</p>
|
||||
|
||||
<pre><code>node ../../r.js -o cssIn=main.css out=main-built.css
|
||||
</code></pre>
|
||||
|
||||
<p>This will create a file called <strong>appdirectory/css/main-build.css</strong> that will include the contents of main.css, have the url() paths properly adjusted, and have comments removed.</p>
|
||||
|
||||
<p>See the notes for the <a href="#onejs">Optimizing one JavaScript file</a> about avoiding saving optimized files in your pristine source tree. It is only done here to make the example simpler.</p>
|
||||
|
||||
<span class="note">Note: The url() path fixing will always fix the paths relative to the <strong>cssIn</strong> build option path, not the <strong>out</strong> build option.</span>
|
||||
</div>
|
||||
|
||||
<div class="section">
|
||||
<h2><a href="#wholeproject" name="wholeproject">Optimizing a whole project</a><span class="sectionMark">§ 9</span></h2>
|
||||
|
||||
<p>The optimizer can take care of optimizing all the CSS and JS files in your project by using a build profile.</p>
|
||||
|
||||
<p>Create a build profile, call it app.build.js, and put it in the <strong>scripts</strong> directory. The app.build.js file can live anywhere, but just be sure to adjust the paths accordingly in the example below -- all paths will be relative to where the app.build.js is located. Example app.build.js:</p>
|
||||
|
||||
<pre><code>({
|
||||
appDir: "../",
|
||||
baseUrl: "scripts",
|
||||
dir: "../../appdirectory-build",
|
||||
modules: [
|
||||
{
|
||||
name: "main"
|
||||
}
|
||||
]
|
||||
})
|
||||
</code></pre>
|
||||
|
||||
<p>This build profile tells RequireJS to copy all of <strong>appdirectory</strong> to a sibling directory called <strong>appdirectory-build</strong> and apply all the optimizations in the <strong>appdirectory-build</strong> directory. It is strongly suggested you use a different output directory than the source directory -- otherwise bad things will likely happen as the optimizer overwrites your source.</p>
|
||||
|
||||
<p>RequireJS will use <strong>baseUrl</strong> to resolve the paths for any module names. The <strong>baseUrl</strong> should be relative to <strong>appDir</strong>.</p>
|
||||
|
||||
<p>In the <strong>modules</strong> array, specify the module names that you want to optimize, in the example, "main". "main" will be mapped to <strong>appdirectory/scripts/main.js</strong> in your project. The build system will then trace the dependencies for main.js and inject them into the <strong>appdirectory-build/scripts/main.js</strong> file.</p>
|
||||
|
||||
<p>It will also optimize any CSS files it finds inside <strong>appdirectory-build</strong>.</p>
|
||||
|
||||
<p>To run the build, run this command from inside the <strong>appdirectory/scripts</strong> directory:</p>
|
||||
|
||||
<pre><code>node ../../r.js -o app.build.js
|
||||
</code></pre>
|
||||
|
||||
<p>Once the build is done, you can use <strong>appdirectory-build</strong> as your optimized project, ready for deployment.</p>
|
||||
</div>
|
||||
|
||||
<div class="section">
|
||||
<h2><a href="#wholemultipage" name="wholemultipage">Optimizing a multi-page project</a><span class="sectionMark">§ 10</span></h2>
|
||||
|
||||
<p><a href="https://github.com/requirejs/example-multipage">requirejs/example-multipage</a> is an example of a project that has multiple pages, but shares a common configuration and a common optimized build layer.</p>
|
||||
</div>
|
||||
|
||||
<div class="section">
|
||||
<h2><a href="#turbo" name="turbo">Turbo options</a><span class="sectionMark">§ 11</span></h2>
|
||||
|
||||
<p>The default for the optimizer is to do the safest, most robust set of actions that avoid surprises after a build. However, depending on your project setup, you may want to turn off some of these features to get faster builds:</p>
|
||||
|
||||
<ul>
|
||||
<li>The biggest time drain is minification. If you are just doing builds as part of a dev workflow, then set <strong>optimize</strong> to <code>"none"</code>.</li>
|
||||
<li>If doing a whole project optimization, but only want to minify the build layers specified in <strong>modules</strong> options and not the rest of the JS files in the build output directory, you can set <strong>skipDirOptimize</strong> to <code>true</code>.</li>
|
||||
<li>Normally each run of a whole project optimization will delete the output build directory specified by <strong>dir</strong> for cleanliness. Some build options, like <strong>onBuildWrite</strong>, will modify the output directory in a way that is hazardous to do twice over the same files. However, if you are doing simple builds with no extra file transforms besides build layer minification, then you can set <strong>keepBuildDir</strong> to <code>true</code> to keep the build directory between runs. Then, only files that have changed between build runs will be copied.</li>
|
||||
</ul>
|
||||
|
||||
<p>As of version 2.1.2, there are some speed shortcuts the optimizer will take by default if <strong>optimize</strong> is set to <code>"none"</code>. However, if you are using <code>"none"</code> for <strong>optimize</strong> and you are planning to minify the built files after the optimizer runs, then you should turn set <strong>normalizeDirDefines</strong> to <code>"all"</code> so that define() calls are normalized correctly to withstand minification. If you are doing minification via the <strong>optimize</strong> option, then you do not need to worry about setting this option.</p>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="section">
|
||||
<h2><a href="#hasjs" name="hasjs">Integration with has.js</a><span class="sectionMark">§ 12</span></h2>
|
||||
|
||||
<p><a href="https://github.com/phiggins42/has.js">has.js</a> is a great tool to that adds easy feature detection for your project. There is some optimizer support for optimizing code paths for has.js tests.</p>
|
||||
|
||||
<p>If your code uses tests like the following:</p>
|
||||
|
||||
<pre><code>
|
||||
if (has("someThing")) {
|
||||
//use native someThing
|
||||
} else {
|
||||
//do some workaround
|
||||
}
|
||||
</code></pre>
|
||||
|
||||
<p>You can define a <b>has</b> object in the build config with true or false values for some has() tests, and the optimizer will replace the has() test with the true or false value.</p>
|
||||
|
||||
<p>If your build profile looked like so:</p>
|
||||
|
||||
<pre><code>
|
||||
({
|
||||
baseUrl: ".",
|
||||
name: "hasTestModule",
|
||||
out: "builds/hasTestModule.js",
|
||||
has: {
|
||||
someThing: true
|
||||
}
|
||||
})
|
||||
</code></pre>
|
||||
|
||||
<p>Then the optimizer will transform the above code sample to:</p>
|
||||
|
||||
<pre><code>
|
||||
if (true) {
|
||||
//use native someThing
|
||||
} else {
|
||||
//do some workaround
|
||||
}
|
||||
</code></pre>
|
||||
|
||||
<p>Then, if you use the default optimize setting of "uglify" in r.js 0.26.0 or later, or if the <b>optimize</b> setting is set to "closure" (when <a href="https://github.com/jrburke/r.js">run under Java</a>), the minifier will optimize out the dead code branch! So you can do custom builds of your code that are optimized for a set of has() tests.</p>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div class="section">
|
||||
<h2><a href="#sourcemaps" name="sourcemaps">Source maps</a><span class="sectionMark">§ 13</span></h2>
|
||||
|
||||
<p>Version 2.1.6 and higher have experimental support for <a href="http://www.html5rocks.com/en/tutorials/developertools/sourcemaps/">source maps</a>. It works for mapping minified, bundled code to unminified, separate modules and only when <strong>optimize</strong> is set to <code>"uglify2"</code>. optimize set to <code>"closure"</code> allows only mapping minified, bundled code to unminified bundled code (closure only available when running under Java with Rhino). The unminified files will show up in the developer tools with a ".src.js" file extension.</p>
|
||||
|
||||
<p>To enable the source map generation, set <strong>generateSourceMaps</strong> to <code>true</code>. Since the minifier needs to have full control over the minified file to generate the source map, the <strong>preserveLicenseComments</strong> should be explicitly set to <code>false</code>. <a href="errors.html#sourcemapcomments">There is is a way to get some license comments in the minified source though</a>.</p>
|
||||
|
||||
<p>The optimizer has supported <a href="https://blog.getfirebug.com/2009/08/11/give-your-eval-a-name-with-sourceurl/">sourceURL</a> (by setting <strong>useSourceUrl</strong> to <code>true</code>), for debugging combined modules as individual files. However, that only works with non-minified code. Source maps translate a minified file to a non-minified version. It does not make sense to use useSourceUrl with generateSourceMaps since useSourceUrl needs the source values as strings, which prohibits the useful minification done in combination with generateSourceMaps.</p>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="section">
|
||||
<h2><a href="#options" name="options">All configuration options</a><span class="sectionMark">§ 14</span></h2>
|
||||
|
||||
<p>There is an <a href="https://github.com/jrburke/r.js/blob/master/build/example.build.js">example.build.js</a> file in the requirejs/build directory that details all of the allowed optimizer configuration options.</p>
|
||||
</div>
|
||||
|
||||
<div class="section">
|
||||
<h2><a href="#deployment" name="deployment">Deployment techniques</a><span class="sectionMark">§ 15</span></h2>
|
||||
|
||||
<p>The r.js optimizer is designed to offer some primitives that can be used for different deployment scenarios by adding other code on top of it. See the <a href="https://github.com/jrburke/r.js/wiki/Deployment-Techniques">deployment techniques wiki page</a> for ideas on how to use the optimizer in that fashion.</p>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="section">
|
||||
<h2><a href="#pitfalls" name="pitfalls">Common pitfalls</a><span class="sectionMark">§ 16</span></h2>
|
||||
|
||||
<p>If you are having trouble with the examples below, here are some common pitfalls that might be the source of the problem:</p>
|
||||
|
||||
<p><strong>Do not specify the output directory to within the source area for your JavaScript</strong></p>
|
||||
|
||||
<p>For instance, if your baseUrl is 'js' and your build output goes into 'js/build', there will likely be problems with extra, nested files generated on each optimization run. This guidance is only for optimizations that are not single file optimizations.</p>
|
||||
|
||||
<p><strong>Avoid optimization names that are outside the baseUrl</strong></p>
|
||||
|
||||
<p>For instance, if your baseUrl is 'js', and your optimization targets:</p>
|
||||
|
||||
<pre><code>name: '../main'</code></pre>
|
||||
|
||||
<p>the optimization could overwrite or place files outside the output directory. For those cases, create a <strong>paths</strong> config to map that file to a local name, like:</p>
|
||||
|
||||
<pre><code>paths: {
|
||||
main: '../main'
|
||||
}
|
||||
</code></pre>
|
||||
|
||||
<p>then use name:</p>
|
||||
|
||||
<pre><code>name: 'main'</code></pre>
|
||||
|
||||
<p>for the optimization target.</p>
|
||||
|
||||
<p><strong>Note the build limitations of shim config.</strong> In particular, you cannot load dependencies for shimmed libraries from a CDN. See the <a href="api.html#config-shim">shim config section</a> for more information.</p>
|
||||
|
||||
</div>
|
350
src/bower_components/requirejs/docs/plugins.html
vendored
Normal file
350
src/bower_components/requirejs/docs/plugins.html
vendored
Normal file
|
@ -0,0 +1,350 @@
|
|||
<div id="directory" class="section">
|
||||
<h1>Plugins</h1>
|
||||
|
||||
<ul class="index mono">
|
||||
<li class="hbox"><a href="#intro">Intro</a><span class="spacer boxFlex"></span><span class="sect">§ 1</span></li>
|
||||
<li class="hbox"><a href="#names">Plugin Names</a><span class="spacer boxFlex"></span><span class="sect">§ 2</span></li>
|
||||
<li class="hbox"><a href="#api">API</a><span class="spacer boxFlex"></span><span class="sect">§ 3</span></li>
|
||||
<ul>
|
||||
<li class="hbox"><a href="#apiload">load</a><span class="spacer boxFlex"></span><span class="sect">§ 3.1</span></li>
|
||||
<li class="hbox"><a href="#apinormalize">normalize</a><span class="spacer boxFlex"></span><span class="sect">§ 3.2</span></li>
|
||||
<li class="hbox"><a href="#apiwrite">write</a><span class="spacer boxFlex"></span><span class="sect">§ 3.3</span></li>
|
||||
<li class="hbox"><a href="#apionlayerend">onLayerEnd</a><span class="spacer boxFlex"></span><span class="sect">§ 3.4</span></li>
|
||||
<li class="hbox"><a href="#apiwritefile">writeFile</a><span class="spacer boxFlex"></span><span class="sect">§ 3.5</span></li>
|
||||
<li class="hbox"><a href="#apipluginbuilder">pluginBuilder</a><span class="spacer boxFlex"></span><span class="sect">§ 3.6</span></li>
|
||||
</ul>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<div class="section">
|
||||
<h2 id="intro">
|
||||
Intro
|
||||
<span class="sectionMark">§ 1</span>
|
||||
</h2>
|
||||
|
||||
<p>RequireJS allows you to write loader plugins that can load different types of resources as dependencies, and even include the dependencies in optimized builds.</p>
|
||||
|
||||
<p>Examples of existing loader plugins are the <a href="api.html#text">text!</a> and <a href="api.html#i18n">i18n!</a> plugins. The text! plugin handles loading text, and the i18n plugin handles loading a JavaScript object that is made up from objects from a few different modules. The object contains localized strings.</p>
|
||||
|
||||
<p>The RequireJS wiki has a longer <a href="https://github.com/jrburke/requirejs/wiki/Plugins">list of plugins on the RequireJS</a>.</p>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="section">
|
||||
<h2 id="names">
|
||||
Plugin Names
|
||||
<span class="sectionMark">§ 2</span>
|
||||
</h2>
|
||||
|
||||
<p>Loader plugins are just another module, but they implement a specific API. Loader plugins can also participate in the optimizer optimizations, allowing the resources they load to be inlined in an optimized build.</p>
|
||||
|
||||
<p><b>Note</b>: the plugin and its dependencies should be able to run in non-browser environments like Node and Rhino. If they cannot, you should use an alternate <a href="#apipluginbuilder">plugin builder</a> module that can run in those environments
|
||||
so that they can participate in optimization builds.</p>
|
||||
|
||||
<p>You can reference your plugin by putting its module name before a ! in the dependency. For instance, if you create a plugin with the name "foo.js", you would use it like so:</p>
|
||||
|
||||
<pre><code>
|
||||
require(['foo!something/for/foo'], function (something) {
|
||||
//something is a reference to the resource
|
||||
//'something/for/foo' that was loaded by foo.js.
|
||||
});
|
||||
</code></pre>
|
||||
|
||||
<p>So, the plugin's module name comes before the ! separator. The part after the ! separator is called the <b>resource name</b>. The resource name may look like a normal module name. The plugin's module name can be any valid module name, so for instance, you could use a relative indicator:</p>
|
||||
|
||||
<pre><code>
|
||||
require(['./foo!something/for/foo'], function (something) {
|
||||
});
|
||||
</code></pre>
|
||||
|
||||
<p>Or, if it was inside a package or directory, say bar/foo.js:</p>
|
||||
|
||||
<pre><code>
|
||||
require(['bar/foo!something/for/foo'], function (something) {
|
||||
});
|
||||
</code></pre>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="section">
|
||||
<h2 id="api">
|
||||
API
|
||||
<span class="sectionMark">§ 3</span>
|
||||
</h2>
|
||||
|
||||
<p>RequireJS will load the plugin module first, then pass the rest of the dependency name to a load() method on the plugin. There are also some methods to help with module name normalization and for making use of the plugin as part of the <a href="optimization.html">optimizer</a>.</p>
|
||||
|
||||
<p>The complete Plugin API:</p>
|
||||
|
||||
<ul>
|
||||
<li><b><a href="#apiload">load</a></b>: A function that is called to load a resource. This is the only mandatory API method that needs to be implemented for the plugin to be useful.</li>
|
||||
<li><b><a href="#apinormalize">normalize</a></b>: A function to normalize the resource name. This is useful in providing optimal caching and optimization, but only needed if the resource name is not a module name.</li>
|
||||
<li><b><a href="#apiwrite">write</a></b>: used by the optimizer to indicate when the plugin should write out a representation of the the resource in the optimized file.</li>
|
||||
<li><b><a href="#apipluginbuilder">pluginBuilder</a></b>: A module name string for a module that should be used in the optimizer to do optimization work. That module is used instead of the plugin module when the optimizer runs.</li>
|
||||
</ul>
|
||||
|
||||
<h3>
|
||||
<a name="apiload">load: function (name, parentRequire, onload, config)</a>
|
||||
<span class="sectionMark">§ 3.1</span>
|
||||
</h3>
|
||||
|
||||
<p>load is a function, and it will be called with the following arguments:</p>
|
||||
|
||||
<ul>
|
||||
<li><b>name</b>: String. The name of the resource to load. This is the part after the ! separator in the name. So, if a module asks for 'foo!something/for/foo', the foo module's load function will receive 'something/for/foo' as the name.</li>
|
||||
<li><b>parentRequire</b>: Function. A local "require" function to use to load other modules. This require function has some utilities on it:
|
||||
<ul>
|
||||
<li><b>parentRequire.toUrl(moduleResource)</b>:where moduleResource is a module name plus an extension. For instance "view/templates/main.html". It will return a full path to the resource, obeying any RequireJS configuration.</li>
|
||||
<li><b>parentRequire.defined(moduleName)</b>: Returns true if the module has already been loaded and defined. Used to be called require.isDefined before RequireJS 0.25.0.</li>
|
||||
<li><b>parentRequire.specified(moduleName)</b>: Returns true if the module has already been requested or is in the process of loading and should be available at some point.</li>
|
||||
</ul></li>
|
||||
<li><b>onload</b>: Function. A function to call with the value for name. This tells the loader that the plugin is done loading the resource. <b>onload.error()</b> can be called, passing an error object to it, if the plugin detects an error condition that means the resource will fail to load correctly.</li>
|
||||
<li><b>config</b>: Object. A configuration object. This is a way for the optimizer and the web app to pass configuration information to the plugin. The i18n! plugin uses this to get the current current locale, if the web app wants to force a specific locale. The optimizer will set an <b>isBuild</b> property in the config to true if this plugin (or pluginBuilder) is being called as part of an optimizer build.</li>
|
||||
</ul>
|
||||
|
||||
<p>An example plugin that does not do anything interesting, just does a normal require to load a JS module:</p>
|
||||
|
||||
<pre><code>
|
||||
define({
|
||||
load: function (name, req, onload, config) {
|
||||
//req has the same API as require().
|
||||
req([name], function (value) {
|
||||
onload(value);
|
||||
});
|
||||
}
|
||||
});
|
||||
</code></pre>
|
||||
|
||||
<p>Some plugins may need to evaluate some JavaScript that was retrieved as text, and use that
|
||||
evaluated JavaScript as the value for the resource. There is a function off the onload() argument, <strong>onload.fromText()</strong>, that can be used to evaluate the JavaScript. eval() is used by RequireJS to evaluate that JavaScript, and RequireJS will do the right work for any anonymous define() call in the evaluated text, and use that define() module as the value for the resource.</p>
|
||||
|
||||
<p>Arguments for onload.fromText() (RequireJS 2.1.0 and later):</p>
|
||||
|
||||
<ul>
|
||||
<li><b>text</b>: String. The string of JavaScript to evaluate.</li>
|
||||
</ul>
|
||||
|
||||
<p>An example plugin's load function that uses onload.fromText():</p>
|
||||
|
||||
<pre><code>
|
||||
define({
|
||||
load: function (name, req, onload, config) {
|
||||
var url = req.toUrl(name + '.customFileExtension'),
|
||||
text;
|
||||
|
||||
//Use a method to load the text (provide elsewhere)
|
||||
//by the plugin
|
||||
fetchText(url, function (text) {
|
||||
//Transform the text as appropriate for
|
||||
//the plugin by using a transform()
|
||||
//method provided elsewhere in the plugin.
|
||||
text = transform(text);
|
||||
|
||||
//Have RequireJS execute the JavaScript within
|
||||
//the correct environment/context, and trigger the load
|
||||
//call for this resource.
|
||||
onload.fromText(text);
|
||||
});
|
||||
}
|
||||
});
|
||||
</code></pre>
|
||||
|
||||
<p>Before RequireJS 2.1.0, onload.fromText accepted a moduleName as the first
|
||||
argument: <code>onload.fromText(moduleName, text)</code>, and the loader
|
||||
plugin had to manually call <code>require([moduleName], onload)</code>
|
||||
after the onload.fromText() call.</p>
|
||||
|
||||
<p><b id="loadBuildInfo">Build considerations</b>: The optimizer traces
|
||||
dependencies <b>synchronously</b> to simplify the optimization logic. This is
|
||||
different from how require.js in the browser works, and it means that only
|
||||
plugins that can satisfy their dependencies synchronously should participate
|
||||
in the optimization steps that allow inlining of loader plugin values. Otherwise,
|
||||
the plugin should just call load() immediately if <code>config.isBuild</code>
|
||||
is true:</p>
|
||||
|
||||
<pre><code>
|
||||
define({
|
||||
load: function (name, req, onload, config) {
|
||||
if (config.isBuild) {
|
||||
//Indicate that the optimizer should not wait
|
||||
//for this resource any more and complete optimization.
|
||||
//This resource will be resolved dynamically during
|
||||
//run time in the web browser.
|
||||
onload();
|
||||
} else {
|
||||
//Do something else that can be async.
|
||||
}
|
||||
}
|
||||
});
|
||||
</code></pre>
|
||||
|
||||
<p>Some plugins may do an async operation in the browser, but opt to complete
|
||||
the resource load synchronously when run in Node/Rhino. This is what the text
|
||||
plugin does. If you just want to run AMD modules and load plugin
|
||||
dependencies using <a href="http://github.com/jrburke/amdefine">amdefine</a> in Node, those also need to complete
|
||||
synchronously to match Node's synchronous module system.</p>
|
||||
|
||||
<h3>
|
||||
<a name="apinormalize">normalize: function (name, normalize)</a>
|
||||
<span class="sectionMark">§ 3.2</span>
|
||||
</h3>
|
||||
|
||||
<p><b>normalize</b> is called to normalize the name used to identify a resource. Some resources could use relative paths, and need to be normalized to the full path. normalize is called with the following arguments:</p>
|
||||
|
||||
<ul>
|
||||
<li><b>name</b>: String. The resource name to normalize.</li>
|
||||
<li><b>normalize</b>: Function. A function that can be called to normalize a regular module name.</li>
|
||||
</ul>
|
||||
|
||||
<p>An example: suppose there is an <b>index!</b> plugin that will load a module name given an index. This is a contrived example, just to illustrate the concept. A module may reference an index! resource like so:</p>
|
||||
|
||||
<pre><code>
|
||||
define(['index!2?./a:./b:./c'], function (indexResource) {
|
||||
//indexResource will be the module that corresponds to './c'.
|
||||
});
|
||||
</code></pre>
|
||||
|
||||
<p>In this case, the normalized names the './a', './b', and './c' will be determined relative to the module asking for this resource. Since RequireJS does not know how to inspect the 'index!2?./a:./b:./c' to normalize the names for './a', './b', and './c', it needs to ask the plugin. This is the purpose of the normalize call.</p>
|
||||
|
||||
<p>By properly normalizing the resource name, it allows the loader to cache the value effectively, and to properly build an optimized build layer in the optimizer.</p>
|
||||
|
||||
<p>The <b>index!</b> plugin could be written like so:</p>
|
||||
|
||||
<pre><code>
|
||||
(function () {
|
||||
|
||||
//Helper function to parse the 'N?value:value:value'
|
||||
//format used in the resource name.
|
||||
function parse(name) {
|
||||
var parts = name.split('?'),
|
||||
index = parseInt(parts[0], 10),
|
||||
choices = parts[1].split(':'),
|
||||
choice = choices[index];
|
||||
|
||||
return {
|
||||
index: index,
|
||||
choices: choices,
|
||||
choice: choice
|
||||
};
|
||||
}
|
||||
|
||||
//Main module definition.
|
||||
define({
|
||||
normalize: function (name, normalize) {
|
||||
var parsed = parse(name),
|
||||
choices = parsed.choices;
|
||||
|
||||
//Normalize each path choice.
|
||||
for (i = 0; i < choices.length; i++) {
|
||||
//Call the normalize() method passed in
|
||||
//to this function to normalize each
|
||||
//module name.
|
||||
choices[i] = normalize(choices[i]);
|
||||
}
|
||||
|
||||
return parsed.index + '?' + choices.join(':');
|
||||
},
|
||||
|
||||
load: function (name, req, onload, config) {
|
||||
req([parse(name).choice], function (value) {
|
||||
onload(value);
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
}());
|
||||
</code></pre>
|
||||
|
||||
<p>You do not need to implement normalize if the resource name is just a regular module name. For instance, the text! plugin does not implement normalize because the dependency names look like 'text!./some/path.html'.</p>
|
||||
|
||||
<p>If a plugin does not implement normalize, then the loader will try to normalize the resource name using the normal module name rules.</p>
|
||||
|
||||
<h3>
|
||||
<a name="apiwrite">write: function (pluginName, moduleName, write)</a>
|
||||
<span class="sectionMark">§ 3.3</span>
|
||||
</h3>
|
||||
|
||||
<p><b>write</b> is only used by the optimizer, and it only needs to be implemented if the plugin can output something that would belong in an optimized layer. It is called with the following arguments:</p>
|
||||
|
||||
<ul>
|
||||
<li><b>pluginName</b>: String. The <b>normalized</b> name for the plugin. Most plugins will not be authored with a name (they will be anonymous plugins) so it is useful to know the normalized name for the plugin module for use in the optimized file.</li>
|
||||
<li><b>name</b>: String. The <b>normalized</b> resource name.</li>
|
||||
<li><b>write</b>: Function. A function to be called with a string of output to write to the optimized file. This function also contains a property function, <b>write.asModule(moduleName, text)</b>. asModule can be used to write out a module that may have an anonymous define call in there that needs name insertion or/and contains implicit require("") dependencies that need to be pulled out for the optimized file. asModule is useful for text transform plugins, like a CoffeeScript plugin.</li>
|
||||
</ul>
|
||||
|
||||
<p>The text! plugin implements write, to write out a string value for the text file that it loaded. A snippet from that file:</p>
|
||||
|
||||
<pre><code>
|
||||
write: function (pluginName, moduleName, write) {
|
||||
//The text plugin keeps a map of strings it fetched
|
||||
//during the build process, in a buildMap object.
|
||||
if (moduleName in buildMap) {
|
||||
//jsEscape is an internal method for the text plugin
|
||||
//that is used to make the string safe
|
||||
//for embedding in a JS string.
|
||||
var text = jsEscape(buildMap[moduleName]);
|
||||
write("define('" + pluginName + "!" + moduleName +
|
||||
"', function () { return '" + text + "';});\n");
|
||||
}
|
||||
}
|
||||
</code></pre>
|
||||
|
||||
<h3>
|
||||
<a name="apionlayerend">onLayerEnd: function (write, data)</a>
|
||||
<span class="sectionMark">§ 3.4</span>
|
||||
</h3>
|
||||
|
||||
<p><b>onLayerEnd</b> is only used by the optimizer, and is only supported in 2.1.0 or later of the optimizer. It is called after the modules for the layer have been written to the layer. It is useful to use if you need some code that should go at the end of the layer, or if the plugin needs to reset some internal state.</p>
|
||||
|
||||
<p>One example: a plugin that needs to write out some utility functions at the beginning of a layer, as part of the first <a href="#apiwrite">write</a> call, and the plugin needs to know when to reset the internal state to know when to write out the utilities for the next layer. If the plugin implements onLayerEnd, it can get notified when to reset its internal state.</p>
|
||||
|
||||
<p>onLayerEnd is called with the following arguments:</p>
|
||||
|
||||
<ul>
|
||||
<li><b>write</b>: Function. A function to be called with a string of output to write to the optimized layer. <b>Modules should not be written out</b> in this call. They will not be normalized correctly for coexistence with other define() calls already in the file. It is useful only for writing out non-define() code.</li>
|
||||
<li><b>data</b>: Object. Information about the layer. Only has two properties:
|
||||
<ul>
|
||||
<li><b>name</b>: the module name of the layer. May be undefined.</li>
|
||||
<li><b>path</b>: the file path of the layer. May be undefined, particularly if the output is just to a string that is consumed by another script.</li>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
|
||||
<h3>
|
||||
<a name="apiwritefile">writeFile: function (pluginName, name, write)</a>
|
||||
<span class="sectionMark">§ 3.5</span>
|
||||
</h3>
|
||||
|
||||
<p><b>writeFile</b> is only used by the optimizer, and it only needs to be implemented if the plugin needs to write out an alternate version of a dependency that is handled by the plugin. It is a bit expensive to scan all modules in a project to look for all plugin dependencies, so this writeFile method will only be called if <b>optimizeAllPluginResources: true</b> is in the build profile for the RequireJS optimizer. writeFile is called with the following arguments:</p>
|
||||
|
||||
<ul>
|
||||
<li><b>pluginName</b>: String. The <b>normalized</b> name for the plugin. Most plugins will not be authored with a name (they will be anonymous plugins) so it is useful to know the normalized name for the plugin module for use in the optimized file.</li>
|
||||
<li><b>name</b>: String. The <b>normalized</b> resource name.</li>
|
||||
<li><b>parentRequire</b>: Function. A local "require" function. The main use of this in writeFile is for calling parentRequire.toUrl() to generate file paths that are inside the build directory.</li>
|
||||
<li><b>write</b>: Function. A function to be called with two arguments:
|
||||
<ul>
|
||||
<li><b>fileName</b>: String. The name of the file to write. You can use parentRequire.toUrl() with a relative path to generate a file name that will be inside the build output directory.</li>
|
||||
<li><b>text</b>: String. The contents of the file. Must be UTF-8 encoded.</li>
|
||||
</ul>
|
||||
This function also contains a property function, <b>write.asModule(moduleName, fileName, text)</b>. asModule can be used to write out a module that may have an anonymous define call in there that needs name insertion or/and contains implicit require("") dependencies that need to be pulled out for the optimized file.</li>
|
||||
</ul>
|
||||
|
||||
<p>See the <a href="https://github.com/jrburke/requirejs/blob/master/text.js">text! plugin</a> for an example of writeFile.</p>
|
||||
|
||||
<h3>
|
||||
<a name="apipluginbuilder">pluginBuilder</a>
|
||||
<span class="sectionMark">§ 3.6</span>
|
||||
</h3>
|
||||
|
||||
<p><b>pluginBuilder</b> can be a string that points to another module to use instead of the current plugin when the plugin is used as part of an optimizer build.</p>
|
||||
|
||||
<p>A plugin could have very specific logic that depends on a certain environment, like the browser. However, when run inside the optimizer, the environment is very different, and the plugin may have a <b>write</b> plugin API implementation that it does not want to deliver as part of the normal plugin that is loaded in the browser. In those cases, specifying a pluginBuilder is useful.</p>
|
||||
|
||||
<p>Some notes about using a pluginBuilder:</p>
|
||||
|
||||
<ul>
|
||||
<li>Do not use named modules for the plugin or the pluginBuilder. The pluginBuilder text contents are used instead of the contents of the plugin file, but that will only work if the files do not call define() with a name.</li>
|
||||
<li>Plugins and pluginBuilders that run as part of the build process have a very limited environment. Right now the optimizer runs on top of Rhino, but it may in the future run also on Node. Be careful of the environment assumptions if you want the plugin to run as part of the optimizer.</li>
|
||||
</ul>
|
||||
|
||||
</div>
|
116
src/bower_components/requirejs/docs/requirements.html
vendored
Normal file
116
src/bower_components/requirejs/docs/requirements.html
vendored
Normal file
|
@ -0,0 +1,116 @@
|
|||
<div id="directory" class="section">
|
||||
<h1>RequireJS Requirements</h1>
|
||||
|
||||
<ul class="index mono">
|
||||
<li class="hbox">
|
||||
<a href="#1">Get RequireJS</a><span class="spacer boxFlex"></span><span class="sect">§ 1</span>
|
||||
</li>
|
||||
<li class="hbox">
|
||||
<a href="#2">Go with the grain of the browser</a><span class="spacer boxFlex"></span><span class="sect">§ 2</span>
|
||||
</li>
|
||||
<li class="hbox">
|
||||
<a href="#3">Load code before and after page load</a><span class="spacer boxFlex"></span><span class="sect">§ 3</span>
|
||||
</li>
|
||||
<li class="hbox">
|
||||
<a href="#4">The loader should be able to load nested dependencies</a><span class="spacer boxFlex"></span><span class="sect">§ 4</span>
|
||||
</li>
|
||||
<li class="hbox">
|
||||
<a href="#5">Modules need to be evaluated according to dependencies</a><span class="spacer boxFlex"></span><span class="sect">§ 5</span>
|
||||
</li>
|
||||
<li class="hbox">
|
||||
<a href="#6">The module format should be compact</a><span class="spacer boxFlex"></span><span class="sect">§ 6</span>
|
||||
</li>
|
||||
<li class="hbox">
|
||||
<a href="#7">Have a streamlined core loader, but allow for the future</a><span class="spacer boxFlex"></span><span class="sect">§ 7</span>
|
||||
</li>
|
||||
<li class="hbox">
|
||||
<a href="#8">Allow modules to keep a clean global namespace</a><span class="spacer boxFlex"></span><span class="sect">§ 8</span>
|
||||
</li>
|
||||
<li class="hbox">
|
||||
<a href="#9">Load any script</a><span class="spacer boxFlex"></span><span class="sect">§ 9</span>
|
||||
</li>
|
||||
<li class="hbox">
|
||||
<a href="#10">Allow for performance upgrades</a><span class="spacer boxFlex"></span><span class="sect">§ 10</span>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<span class="note">Note: RequireJS is designed to meet the following requirements:</span>
|
||||
</div>
|
||||
|
||||
<div class="section">
|
||||
<h2><a name="1">Go with the grain of the browser</a><span class="sectionMark">§ 1</span></h2>
|
||||
|
||||
<p>XMLHttpRequest(XHR) loaders are limited to the same domain as the page, and make debugging harder. Certain browsers allow cross-domain XHR calls and better conventions for debugging when eval is used, but support is inconsistent across browsers.</p>
|
||||
|
||||
<p>Eval-based loaders should be avoided since eval is not a JavaScript best practice and it is not allowed in some environments. There is a time and place for eval, but a module loader can do better than to use it.</p>
|
||||
|
||||
<p>A server process that transforms scripts on the fly should also not be needed. Getting everyone to use the same server process or even making specs for a common format they can all emit is more overhead, more stuff to write. Front-end developers have a long established practice of being able to author plain text files and having them load in the browser without a bunch of server hardware.</p>
|
||||
|
||||
<p>Scripts loaded via script tags work everywhere and work across domains. It is a much simpler loading style that uses the natural way browsers load scripts.</p>
|
||||
</div>
|
||||
|
||||
<div class="section">
|
||||
<h2><a name="2">Load code before and after page load</a><span class="sectionMark">§ 2</span></h2>
|
||||
|
||||
<p>The same system should be usable before and after page load. Delaying loading of code until a later page action is a key performance benefit.</p>
|
||||
</div>
|
||||
|
||||
<div class="section">
|
||||
<h2><a name="3">Scripts should be able to specify dependencies</a><span class="sectionMark">§ 3</span></h2>
|
||||
|
||||
<p>It is very easy for a project to go beyond needing a couple of scripts. It is hard to manually track all the dependencies and the correct loading order. A script should be able to specify its immediate dependencies. The developer should not have to worry about what those dependencies need to load and work out the correct loading order.</p>
|
||||
</div>
|
||||
|
||||
<div class="section">
|
||||
<h2><a name="4">The loader should be able to load nested dependencies</a><span class="sectionMark">§ 4</span></h2>
|
||||
|
||||
<p>If each module specifies its own direct dependencies, the loader should be able to work out the correct dependencies across the whole system, even nested dependencies, for dependencies of dependencies.</p>
|
||||
</div>
|
||||
|
||||
<div class="section">
|
||||
<h2><a name="5">Scripts can be evaluated out of order, but modules need to be evaluated according to dependencies</a><span class="sectionMark">§ 5</span></h2>
|
||||
|
||||
<p>Using the browser-native script loading that has nested dependency resolution and works after page load means that scripts will need to be loaded at least part of the time via using appendChild for script elements.</p>
|
||||
|
||||
<p>IE and WebKit will execute scripts added via appendChild out of DOM order, they
|
||||
execute them in network receive order. Even if they executed scripts in the order
|
||||
they were added to the DOM, dependencies for a module are discovered after
|
||||
the module script has been loaded, so scripts for the dependencies will always be added
|
||||
after the script that needs them.</p>
|
||||
|
||||
<p>This leads to constructing a module format for a script, one that puts the bulk of the script in a function, with its dependencies specified outside of that function wrapper. This allows scripts to be evaluated out of order by the browser, but gives the chance to properly work out the dependencies, then call the function wrappers in the right sequence to bring the scripts into being.</p>
|
||||
</div>
|
||||
|
||||
<div class="section">
|
||||
<h2><a name="6">The module format should be compact</a><span class="sectionMark">§ 6</span></h2>
|
||||
|
||||
<p>Boilerplate code is a pain. However a function wrapper is needed as part of the boilerplate. Prefer making the boilerplate as terse as possible, to allow easy hand-coding by developers. Avoid overly-explicit module formats that use a name/value pair for each property, since developer will have to code these by hand.</p>
|
||||
</div>
|
||||
|
||||
<div class="section">
|
||||
<h2><a name="7">Have a streamlined core loader, but allow for the future</a><span class="sectionMark">§ 7</span></h2>
|
||||
|
||||
<p>The core of the loader, module format support with nested dependency resolution, should be compact, but allow for plugins to expand the concept of dependencies and what it means to load them.</p>
|
||||
|
||||
<p>In Dojo, it is common to need i18n string bundles and text strings of HTML for widget constructions. Allow the loader to be able to load these things, but as plugins, so the core stays lightweight.</p>
|
||||
</div>
|
||||
|
||||
<div class="section">
|
||||
<h2><a name="8">Allow modules to keep a clean global namespace</a><span class="sectionMark">§ 8</span></h2>
|
||||
|
||||
<p>As projects get bigger, it is more common to need to load two versions of a module in a page. This should be possible by allowing a module system that does not define modules in the global namespace.</p>
|
||||
|
||||
<p>If a module wants to work with the global namespace, that is normally easy to allow in a module spec. The harder part is constructing a format that works well to avoid the global namespace.</p>
|
||||
</div>
|
||||
|
||||
<div class="section">
|
||||
<h2><a name="9">Load any script</a><span class="sectionMark">§ 9</span></h2>
|
||||
|
||||
<p>Not all scripts will be using the module format. Allow existing scripts to be loaded and treated as dependencies.</p>
|
||||
</div>
|
||||
|
||||
<div class="section">
|
||||
<h2><a name="10">Allow for performance upgrades</a><span class="sectionMark">§ 10</span></h2>
|
||||
|
||||
<p>This mainly means having a build system that can combine and optimize modules. It also means the loader should allow loading a script with multiple modules defined in it and only fetch dependencies that are not already included in that script file.</p>
|
||||
</div>
|
110
src/bower_components/requirejs/docs/start.html
vendored
Normal file
110
src/bower_components/requirejs/docs/start.html
vendored
Normal file
|
@ -0,0 +1,110 @@
|
|||
<div id="directory" class="section">
|
||||
<h1>How to get started with RequireJS</h1>
|
||||
|
||||
<ul class="index mono">
|
||||
<li class="hbox">
|
||||
<a href="#get">Get RequireJS</a><span class="spacer boxFlex"></span><span class="sect">§ 1</span>
|
||||
</li>
|
||||
<li class="hbox">
|
||||
<a href="#add">Add RequireJS</a><span class="spacer boxFlex"></span><span class="sect">§ 2</span>
|
||||
</li>
|
||||
<li class="hbox">
|
||||
<a href="#optimize">Optimize</a><span class="spacer boxFlex"></span><span class="sect">§ 3</span>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<span class="note">Note: If you are using jQuery, there is a <a href="jquery.md">targeted jQuery tutorial</a></span>
|
||||
</div>
|
||||
|
||||
<div class="section">
|
||||
<h2>
|
||||
<a name="get">Get RequireJS</a>
|
||||
<span class="sectionMark">§ 1</span>
|
||||
</h2>
|
||||
|
||||
<p>Go to the <a href="download.md">download</a> page and get the file.</p>
|
||||
</div>
|
||||
|
||||
<div class="section">
|
||||
<h2>
|
||||
<a name="add">Add RequireJS</a>
|
||||
<span class="sectionMark">§ 2</span>
|
||||
</h2>
|
||||
|
||||
<span class="note">Note: For jQuery-specific advice, see the <a href="jquery.html">jQuery integration page</a></span>
|
||||
|
||||
<p>This setup assumes you keep all your JavaScript files in a "scripts" directory in your project. For example, if you have a project that has an project.html page, with some scripts, the directory layout might look like so:</p>
|
||||
|
||||
<ul>
|
||||
<li>project-directory/
|
||||
<ul>
|
||||
<li>project.html</li>
|
||||
<li>scripts/
|
||||
<ul>
|
||||
<li>main.js</li>
|
||||
<li>helper/
|
||||
<ul>
|
||||
<li>util.js</li>
|
||||
</ul></li>
|
||||
</ul></li>
|
||||
</ul></li>
|
||||
</ul>
|
||||
|
||||
<p>Add require.js to the scripts directory, so it looks like so:</p>
|
||||
|
||||
<ul>
|
||||
<li>project-directory/
|
||||
<ul>
|
||||
<li>project.html</li>
|
||||
<li>scripts/
|
||||
<ul>
|
||||
<li>main.js</li>
|
||||
<li>require.js</li>
|
||||
<li>helper/
|
||||
<ul>
|
||||
<li>util.js</li>
|
||||
</ul></li>
|
||||
</ul></li>
|
||||
</ul></li>
|
||||
</ul>
|
||||
|
||||
<p>To take full advantage of the optimization tool, it is suggested that you keep all inline script out of the HTML, and only reference require.js with a require call like so to load your script:</p>
|
||||
|
||||
<pre><code><!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>My Sample Project</title>
|
||||
<!-- data-main attribute tells require.js to load
|
||||
scripts/main.js after require.js loads. -->
|
||||
<script data-main="scripts/main" src="scripts/require.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<h1>My Sample Project</h1>
|
||||
</body>
|
||||
</html>
|
||||
</code></pre>
|
||||
|
||||
<p>Inside of main.js, you can use require() to load any other scripts you need to run. This ensures a single entry point, since <a href="api.html#data-main">the data-main script you specify is loaded asynchronously</a>.</p>
|
||||
|
||||
<pre><code>require(["helper/util"], function(util) {
|
||||
//This function is called when scripts/helper/util.js is loaded.
|
||||
//If util.js calls define(), then this function is not fired until
|
||||
//util's dependencies have loaded, and the util argument will hold
|
||||
//the module value for "helper/util".
|
||||
});
|
||||
</code></pre>
|
||||
|
||||
<p>That will load the helper/util.js script. To get full advantage of RequireJS,
|
||||
see the <a href="api.html">API docs</a> to learn more about defining and using
|
||||
modules.</p>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="section">
|
||||
<h2>
|
||||
<a name="optimize">Optimize</a>
|
||||
<span class="sectionMark">§ 3</span>
|
||||
</h2>
|
||||
|
||||
<p>Once you are finished doing development and want to deploy your code for your end users, you can use the <a href="optimization.md">optimizer</a> to combine the JavaScript files together and minify it. In the example above, it can combine main.js and helper/util.js into one file and minify the result.</p>
|
||||
</div>
|
219
src/bower_components/requirejs/docs/why.html
vendored
Normal file
219
src/bower_components/requirejs/docs/why.html
vendored
Normal file
|
@ -0,0 +1,219 @@
|
|||
<div id="directory" class="section">
|
||||
<h1>Why Web Modules?</h1>
|
||||
|
||||
<ul class="index mono">
|
||||
<li class="hbox">
|
||||
<a href="#1">The Problem</a><span class="spacer boxFlex"></span><span class="sect">§ 1</span>
|
||||
</li>
|
||||
<li class="hbox">
|
||||
<a href="#2">Solution</a><span class="spacer boxFlex"></span><span class="sect">§ 2</span>
|
||||
</li>
|
||||
<li class="hbox">
|
||||
<a href="#3">Script loading APIs</a><span class="spacer boxFlex"></span><span class="sect">§ 3</span>
|
||||
</li>
|
||||
<li class="hbox">
|
||||
<a href="#4">Async vs Sync</a><span class="spacer boxFlex"></span><span class="sect">§ 4</span>
|
||||
</li>
|
||||
<li class="hbox">
|
||||
<a href="#5">Script loading: XHR</a><span class="spacer boxFlex"></span><span class="sect">§ 5</span>
|
||||
</li>
|
||||
<li class="hbox">
|
||||
<a href="#6">Script loading: Web Workers</a><span class="spacer boxFlex"></span><span class="sect">§ 6</span>
|
||||
</li>
|
||||
<li class="hbox">
|
||||
<a href="#7">Script loading: document.write()</a><span class="spacer boxFlex"></span><span class="sect">§ 7</span>
|
||||
</li>
|
||||
<li class="hbox">
|
||||
<a href="#8">Script loading: head.appendchild(script)</a><span class="spacer boxFlex"></span><span class="sect">§ 8</span>
|
||||
</li>
|
||||
<li class="hbox">
|
||||
<a href="#9">Function wrapping</a><span class="spacer boxFlex"></span><span class="sect">§ 9</span>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<p>This page discusses why modules on the web are useful and the mechanisms that can be used on the web today to enable them.
|
||||
There is a separate page that talks about <a href="whyamd.html">the design forces</a> for the particular function wrapped format
|
||||
used by RequireJS.</p>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="section">
|
||||
<h2>
|
||||
<a name="1">The Problem</a>
|
||||
<span class="sectionMark">§ 1</span>
|
||||
</h2>
|
||||
<ul>
|
||||
<li>Web sites are turning into Web apps</li>
|
||||
<li>Code complexity grows as the site gets bigger</li>
|
||||
<li>Assembly gets harder</li>
|
||||
<li>Developer wants discrete JS files/modules</li>
|
||||
<li>Deployment wants optimized code in just one or a few HTTP calls</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<div class="section">
|
||||
<h2><a name="2">Solution</a><span class="sectionMark">§ 2</span></h2>
|
||||
|
||||
<p>Front-end developers need a solution with:</p>
|
||||
|
||||
<ul>
|
||||
<li>Some sort of #include/import/require</li>
|
||||
<li>ability to load nested dependencies</li>
|
||||
<li>ease of use for developer but then backed by an optimization tool that helps deployment</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<div class="section">
|
||||
<h2><a name="3">Script Loading APIs</a><span class="sectionMark">§ 3</span></h2>
|
||||
|
||||
<p>First thing to sort out is a script loading API. Here are some candidates:</p>
|
||||
|
||||
<ul>
|
||||
<li>Dojo: dojo.require("some.module")</li>
|
||||
<li>LABjs: $LAB.script("some/module.js")</li>
|
||||
<li>CommonJS: require("some/module")</li>
|
||||
</ul>
|
||||
|
||||
<p>All of them map to loading some/path/some/module.js. Ideally we could choose the CommonJS syntax, since it is likely to get more common over time, and we want to reuse code.</p>
|
||||
|
||||
<p>We also want some sort of syntax that will allow loading plain JavaScript files that exist today -- a developer should not have to rewrite all of their JavaScript to get the benefits of script loading.</p>
|
||||
|
||||
<p>However, we need something that works well in the browser. The CommonJS require() is a synchronous call, it is expected to return the module immediately. This does not work well in the browser.</p>
|
||||
</div>
|
||||
|
||||
<div class="section">
|
||||
<h2><a name="4">Async vs Sync</a><span class="sectionMark">§ 4</span></h2>
|
||||
|
||||
<p>This example should illustrate the basic problem for the browser. Suppose we have an Employee object and we want a Manager object to derive from the Employee object. <a href="https://developer.mozilla.org/en-US/docs/JavaScript/Guide/Details_of_the_Object_Model#Creating_the_hierarchy">Taking this example</a>, we might code it up like this using our script loading API:</p>
|
||||
|
||||
<pre><code>var Employee = require("types/Employee");
|
||||
|
||||
function Manager () {
|
||||
this.reports = [];
|
||||
}
|
||||
|
||||
//Error if require call is async
|
||||
Manager.prototype = new Employee();
|
||||
</code></pre>
|
||||
|
||||
<p>As the comment indicates above, if require() is async, this code will not work. However, loading scripts synchronously in the browser kills performance. So, what to do?</p>
|
||||
</div>
|
||||
|
||||
<div class="section">
|
||||
<h2><a name="5">Script Loading: XHR</a><span class="sectionMark">§ 5</span></h2>
|
||||
|
||||
<p>It is tempting to use XMLHttpRequest (XHR) to load the scripts. If XHR is used, then we can massage the text above -- we can do a regexp to find require() calls, make sure we load those scripts, then use eval() or script elements that have their body text set to the text of the script loaded via XHR.</p>
|
||||
|
||||
<p>Using eval() to evaluate the modules is bad:</p>
|
||||
|
||||
<ul>
|
||||
<li>Developers have been taught that eval() is bad.</li>
|
||||
<li>Some environments do not allow eval().</li>
|
||||
<li>It is harder to debug. Firebug and WebKit's inspector have an //@ sourceURL= convention, which helps give a name to evaled text, but this support is not universal across browsers.</li>
|
||||
<li>eval context is different across browsers. You might be able to use execScript in IE to help this, but it means more moving parts.</li>
|
||||
</ul>
|
||||
|
||||
<p>Using script tags with body text set to file text is bad:</p>
|
||||
|
||||
<ul>
|
||||
<li>While debugging, the line number you get for an error does not map to the original source file.</li>
|
||||
</ul>
|
||||
|
||||
<p>XHR also has issues with cross-domain requests. Some browsers now have cross-domain XHR support, but it is not universal, and IE decided to create a different API object for cross-domain calls, XDomainRequest. More moving parts and more things to get wrong. In particular, you need to be sure to not send any non-standard HTTP headers or there may be another "preflight" request done to make sure the cross-domain access is allowed.</p>
|
||||
|
||||
<p>Dojo has used an XHR-based loader with eval() and, while it works, it has been a source of frustration for developers. Dojo has an xdomain loader but it requires the modules to be modified via a build step to use a function wrapper, so that script src="" tags can be used to load the modules. There are many edge cases and moving parts that create a tax on the developer.</p>
|
||||
|
||||
<p>If we are creating a new script loader, we can do better.</p>
|
||||
</div>
|
||||
|
||||
<div class="section">
|
||||
<h2><a name="6">Script Loading: Web Workers</a><span class="sectionMark">§ 6</span></h2>
|
||||
|
||||
<p>Web Workers might be another way to load scripts, but:</p>
|
||||
|
||||
<ul>
|
||||
<li>It does not have strong cross browser support</li>
|
||||
<li>It is a message-passing API, and the scripts likely want to interact with the DOM, so it means just using the worker to fetch the script text, but pass the text back to the main window then use eval/script with text body to execute the script. This has all of the problems as XHR mentioned above.</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<div class="section">
|
||||
<h2><a name="7">Script Loading: document.write()</a><span class="sectionMark">§ 7</span></h2>
|
||||
|
||||
<p>document.write() can be used to load scripts -- it can load scripts from other domains and it maps to how browsers normally consume scripts, so it allows for easy debugging.</p>
|
||||
|
||||
<p>However, in the <a href="#4">Async vs Sync example</a> we cannot just execute that script directly. Ideally we could know the require() dependencies before we execute the script, and make sure those dependencies are loaded first. But we do not have access to the script before it is executed.</p>
|
||||
|
||||
<p>Also, document.write() does not work after page load. A great way to get perceived performance for your site is loading code on demand, as the user needs it for their next action.</p>
|
||||
|
||||
<p>Finally, scripts loaded via document.write() will block page rendering. When looking at reaching the very best performance for your site, this is undesirable.</p>
|
||||
</div>
|
||||
|
||||
<div class="section">
|
||||
<h2><a name="8">Script Loading: head.appendChild(script)</a><span class="sectionMark">§ 8</span></h2>
|
||||
|
||||
<p>We can create scripts on demand and add them to the head:</p>
|
||||
|
||||
<pre><code>var head = document.getElementsByTagName('head')[0],
|
||||
script = document.createElement('script');
|
||||
|
||||
script.src = url;
|
||||
head.appendChild(script);
|
||||
</code></pre>
|
||||
|
||||
<p>There is a bit more involved than just the above snippet, but that is the basic idea. This approach has the advantage over document.write in that it will not block page rendering and it works after page load.</p>
|
||||
|
||||
<p>However, it still has the <a href="#4">Async vs Sync example</a> problem: ideally we could know the require() dependencies before we execute the script, and make sure those dependencies are loaded first.</p>
|
||||
</div>
|
||||
|
||||
<div class="section">
|
||||
<h2><a name="9">Function Wrapping</a><span class="sectionMark">§ 9</span></h2>
|
||||
|
||||
<p>So we need to know the dependencies and make sure we load them before executing our script. The best way to do that is construct our module loading API with function wrappers. Like so:</p>
|
||||
|
||||
<pre><code>define(
|
||||
//The name of this module
|
||||
"types/Manager",
|
||||
|
||||
//The array of dependencies
|
||||
["types/Employee"],
|
||||
|
||||
//The function to execute when all dependencies have loaded. The
|
||||
//arguments to this function are the array of dependencies mentioned
|
||||
//above.
|
||||
function (Employee) {
|
||||
function Manager () {
|
||||
this.reports = [];
|
||||
}
|
||||
|
||||
//This will now work
|
||||
Manager.prototype = new Employee();
|
||||
|
||||
//return the Manager constructor function so it can be used by
|
||||
//other modules.
|
||||
return Manager;
|
||||
}
|
||||
);
|
||||
</code></pre>
|
||||
|
||||
<p>And this is the syntax used by RequireJS. There is also a simplified syntax if you just want to load some plain JavaScript files that do not define modules:</p>
|
||||
|
||||
<pre><code>require(["some/script.js"], function() {
|
||||
//This function is called after some/script.js has loaded.
|
||||
});
|
||||
</code></pre>
|
||||
|
||||
<p>This type of syntax was chosen because it is terse and allows the loader to use head.appendChild(script) type of loading.</p>
|
||||
|
||||
<p>It differs from the normal CommonJS syntax out of necessity to work well in the browser. There have been suggestions that the normal CommonJS syntax could be used with head.appendChild(script) type of loading if a server process transforms the modules to a transport format that has a function wrapper.</p>
|
||||
|
||||
<p>I believe it is important to not force the use of a runtime server process to transform code:</p>
|
||||
|
||||
<ul>
|
||||
<li>It makes debugging weird, line numbers will be off vs. the source file since the server is injecting a function wrapper.</li>
|
||||
<li>It requires more gear. Front-end development should be possible with static files.</li>
|
||||
</ul>
|
||||
|
||||
<p>More details on the design forces and use cases for this function wrapping format, called Asynchronous Module Definition (AMD), can be found on the
|
||||
<a href="whyamd.html">Why AMD?</a> page.
|
||||
</div>
|
385
src/bower_components/requirejs/docs/whyamd.html
vendored
Normal file
385
src/bower_components/requirejs/docs/whyamd.html
vendored
Normal file
|
@ -0,0 +1,385 @@
|
|||
<div id="directory" class="section">
|
||||
<h1>Why AMD?</h1>
|
||||
|
||||
<ul class="index mono">
|
||||
<li class="hbox">
|
||||
<a href="#purposes">Module Purposes</a><span class="spacer boxFlex"></span><span class="sect">§ 1</span>
|
||||
</li>
|
||||
<li class="hbox">
|
||||
<a href="#today">The Web Today</a><span class="spacer boxFlex"></span><span class="sect">§ 2</span>
|
||||
</li>
|
||||
<li class="hbox">
|
||||
<a href="#commonjs">CommonJS</a><span class="spacer boxFlex"></span><span class="sect">§ 3</span>
|
||||
</li>
|
||||
<li class="hbox">
|
||||
<a href="#amd">AMD</a><span class="spacer boxFlex"></span><span class="sect">§ 4</span>
|
||||
</li>
|
||||
<li class="hbox">
|
||||
<a href="#definition">Module Definition</a><span class="spacer boxFlex"></span><span class="sect">§ 5</span>
|
||||
</li>
|
||||
<li class="hbox">
|
||||
<a href="#namedmodules">Named Modules</a><span class="spacer boxFlex"></span><span class="sect">§ 6</span>
|
||||
</li>
|
||||
<li class="hbox">
|
||||
<a href="#sugar">Sugar</a><span class="spacer boxFlex"></span><span class="sect">§ 7</span>
|
||||
</li>
|
||||
<li class="hbox">
|
||||
<a href="#commonjscompat">CommonJS Compatibility</a><span class="spacer boxFlex"></span><span class="sect">§ 8</span>
|
||||
</li>
|
||||
<li class="hbox">
|
||||
<a href="#amdtoday">AMD Used Today</a><span class="spacer boxFlex"></span><span class="sect">§ 9</span>
|
||||
</li>
|
||||
<li class="hbox">
|
||||
<a href="#youcando">What You Can Do</a><span class="spacer boxFlex"></span><span class="sect">§ 10</span>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<p>This page talks about the design forces and use of the
|
||||
<a href="https://github.com/amdjs/amdjs-api/wiki/AMD">Asynchronous Module Definition (AMD) API</a> for JavaScript modules, the module API supported by RequireJS.
|
||||
There is a different page that talks about <a href="why.html">general approach to modules on the web</a>.</p>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div class="section">
|
||||
<h2>
|
||||
<a href="#purposes" name="purposes">Module Purposes</a>
|
||||
<span class="sectionMark">§ 1</span>
|
||||
</h2>
|
||||
|
||||
<p>What are JavaScript modules? What is their purpose?</p>
|
||||
|
||||
<ul>
|
||||
<li><strong>Definition</strong>: how to encapsulate a piece of code into a useful unit, and how to register its capability/export a value for the module.</li>
|
||||
<li><strong>Dependency References</strong>: how to refer to other units of code.</li>
|
||||
</ul>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div class="section">
|
||||
<h2>
|
||||
<a href="#today" name="today">The Web Today</a>
|
||||
<span class="sectionMark">§ 2</span>
|
||||
</h2>
|
||||
|
||||
<pre><code>(function () {
|
||||
var $ = this.jQuery;
|
||||
|
||||
this.myExample = function () {};
|
||||
}());
|
||||
</code></pre>
|
||||
|
||||
<p>How are pieces of JavaScript code defined today?</p>
|
||||
|
||||
<ul>
|
||||
<li>Defined via an immediately executed factory function.</li>
|
||||
<li>References to dependencies are done via global variable names that were loaded via an HTML script tag.</li>
|
||||
<li>The dependencies are very weakly stated: the developer needs to know the right dependency order. For instance, The file containing Backbone cannot come before the jQuery tag.</li>
|
||||
<li>It requires extra tooling to substitute a set of script tags into one tag for optimized deployment.</li>
|
||||
</ul>
|
||||
|
||||
<p>This can be difficult to manage on large projects, particularly as scripts start to have many dependencies in a way that may overlap and nest. Hand-writing script tags is not very scalable, and it leaves out the capability to load scripts on demand.</p>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="section">
|
||||
<h2>
|
||||
<a href="#commonjs" name="commonjs">CommonJS</a>
|
||||
<span class="sectionMark">§ 3</span>
|
||||
</h2>
|
||||
|
||||
<pre><code>var $ = require('jquery');
|
||||
exports.myExample = function () {};
|
||||
</code></pre>
|
||||
|
||||
<p>The original <a href="http://groups.google.com/group/commonjs">CommonJS (CJS) list</a> participants decided to work out a module format that worked with today's JavaScript language, but was not necessarily bound to the limitations of the browser JS environment. The hope was to use some stop-gap measures in the browser and hopefully influence the browser makers to build solutions that would enable their module format to work better natively. The stop-gap measures:</p>
|
||||
|
||||
<ul>
|
||||
<li>Either use a server to translate CJS modules to something usable in the browser.</li>
|
||||
<li>Or use XMLHttpRequest (XHR) to load the text of modules and do text transforms/parsing in browser.</li>
|
||||
</ul>
|
||||
|
||||
<p>The CJS module format only allowed one module per file, so a "transport format" would be used for bundling more than one module in a file for optimization/bundling purposes.</p>
|
||||
|
||||
<p>With this approach, the CommonJS group was able to work out dependency references and how to deal with circular dependencies, and how to get some properties about the current module. However, they did not fully embrace some things in the browser environment that cannot change but still affect module design:</p>
|
||||
|
||||
<ul>
|
||||
<li>network loading</li>
|
||||
<li>inherent asynchronicity</li>
|
||||
</ul>
|
||||
|
||||
<p>It also meant they placed more of a burden on web developers to implement the format, and the stop-gap measures meant debugging was worse. eval-based debugging or debugging multiple files that are concatenated into one file have practical weaknesses. Those weaknesses may be addressed in browser tooling some day, but the end result: using CommonJS modules in the most common of JS environments, the browser, is non-optimal today.</p>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="section">
|
||||
<h2>
|
||||
<a href="#amd" name="amd">AMD</a>
|
||||
<span class="sectionMark">§ 4</span>
|
||||
</h2>
|
||||
|
||||
<pre><code>define(['jquery'] , function ($) {
|
||||
return function () {};
|
||||
});
|
||||
</code></pre>
|
||||
|
||||
<p>The AMD format comes from wanting a module format that was better than today's "write a bunch of script tags with implicit dependencies that you have to manually order" and something that was easy to use directly in the browser. Something with good debugging characteristics that did not require server-specific tooling to get started. It grew out of Dojo's real world experience with using XHR+eval and wanting to avoid its weaknesses for the future.</p>
|
||||
|
||||
<p>It is an improvement over the web's current "globals and script tags" because:</p>
|
||||
|
||||
<ul>
|
||||
<li>Uses the CommonJS practice of string IDs for dependencies. Clear declaration of dependencies and avoids the use of globals.</li>
|
||||
<li>IDs can be mapped to different paths. This allows swapping out implementation. This is great for creating mocks for unit testing. For the above code sample, the code just expects something that implements the jQuery API and behavior. It does not have to be jQuery.</li>
|
||||
<li>Encapsulates the module definition. Gives you the tools to avoid polluting the global namespace.</li>
|
||||
<li>Clear path to defining the module value. Either use "return value;" or the CommonJS "exports" idiom, which can be useful for circular dependencies.</li>
|
||||
</ul>
|
||||
|
||||
<p>It is an improvement over CommonJS modules because:</p>
|
||||
|
||||
<ul>
|
||||
<li>It works better in the browser, it has the least amount of gotchas. Other approaches have problems with debugging, cross-domain/CDN usage, file:// usage and the need for server-specific tooling.</li>
|
||||
<li>Defines a way to include multiple modules in one file. In CommonJS terms, the term for this is a "transport format", and that group has not agreed on a transport format.</li>
|
||||
<li>Allows setting a function as the return value. This is really useful for constructor functions. In CommonJS this is more awkward, always having to set a property on the exports object. Node supports module.exports = function () {}, but that is not part of a CommonJS spec.</li>
|
||||
</ul>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="section">
|
||||
<h2>
|
||||
<a href="#definition" name="definition">Module Definition</a>
|
||||
<span class="sectionMark">§ 5</span>
|
||||
</h2>
|
||||
|
||||
<p>Using JavaScript functions for encapsulation has been documented as the <a href="http://www.adequatelygood.com/2010/3/JavaScript-Module-Pattern-In-Depth">module pattern</a>:</p>
|
||||
|
||||
<pre><code>(function () {
|
||||
this.myGlobal = function () {};
|
||||
}());
|
||||
</code></pre>
|
||||
|
||||
<p>That type of module relies on attaching properties to the global object to export the module value, and it is difficult to declare dependencies with this model. The dependencies are assumed to be immediately available when this function executes. This limits the loading strategies for the dependencies.</p>
|
||||
|
||||
<p>AMD addresses these issues by:</p>
|
||||
|
||||
<ul>
|
||||
<li>Register the factory function by calling define(), instead of immediately executing it.</li>
|
||||
<li>Pass dependencies as an array of string values, do not grab globals.</li>
|
||||
<li>Only execute the factory function once all the dependencies have been loaded and executed.</li>
|
||||
<li>Pass the dependent modules as arguments to the factory function.</li>
|
||||
</ul>
|
||||
|
||||
<pre><code>//Calling define with a dependency array and a factory function
|
||||
define(['dep1', 'dep2'], function (dep1, dep2) {
|
||||
|
||||
//Define the module value by returning a value.
|
||||
return function () {};
|
||||
});
|
||||
</code></pre>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="section">
|
||||
<h2>
|
||||
<a href="#namedmodules" name="namedmodules">Named Modules</a>
|
||||
<span class="sectionMark">§ 6</span>
|
||||
</h2>
|
||||
|
||||
<p>Notice that the above module does not declare a name for itself. This is what makes the module very portable. It allows a developer to place the module in a different path to give it a different ID/name. The AMD loader will give the module an ID based on how it is referenced by other scripts.</p>
|
||||
|
||||
<p>However, tools that combine multiple modules together for performance need a way to give names to each module in the optimized file. For that, AMD allows a string as the first argument to define():</p>
|
||||
|
||||
<pre><code>//Calling define with module ID, dependency array, and factory function
|
||||
define('myModule', ['dep1', 'dep2'], function (dep1, dep2) {
|
||||
|
||||
//Define the module value by returning a value.
|
||||
return function () {};
|
||||
});
|
||||
</code></pre>
|
||||
|
||||
<p>You should avoid naming modules yourself, and only place one module in a file while developing. However, for tooling and performance, a module solution needs a way to identify modules in built resources.</p>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="section">
|
||||
<h2>
|
||||
<a href="#sugar" name="sugar">Sugar</a>
|
||||
<span class="sectionMark">§ 7</span>
|
||||
</h2>
|
||||
|
||||
<p>The above AMD example works in all browsers. However, there is a risk of mismatched dependency names with named function arguments, and it can start to look a bit strange if your module has many dependencies:</p>
|
||||
|
||||
<pre><code>define([ "require", "jquery", "blade/object", "blade/fn", "rdapi",
|
||||
"oauth", "blade/jig", "blade/url", "dispatch", "accounts",
|
||||
"storage", "services", "widgets/AccountPanel", "widgets/TabButton",
|
||||
"widgets/AddAccount", "less", "osTheme", "jquery-ui-1.8.7.min",
|
||||
"jquery.textOverflow"],
|
||||
function (require, $, object, fn, rdapi,
|
||||
oauth, jig, url, dispatch, accounts,
|
||||
storage, services, AccountPanel, TabButton,
|
||||
AddAccount, less, osTheme) {
|
||||
|
||||
});
|
||||
</code></pre>
|
||||
|
||||
<p>To make this easier, and to make it easy to do a simple wrapping around CommonJS modules, this form of define is supported, sometimes referred to as "simplified CommonJS wrapping":</p>
|
||||
|
||||
<pre><code>define(function (require) {
|
||||
var dependency1 = require('dependency1'),
|
||||
dependency2 = require('dependency2');
|
||||
|
||||
return function () {};
|
||||
});
|
||||
</code></pre>
|
||||
|
||||
<p>The AMD loader will parse out the require('') calls by using Function.prototype.toString(), then internally convert the above define call into this:</p>
|
||||
|
||||
<pre><code>define(['require', 'dependency1', 'dependency2'], function (require) {
|
||||
var dependency1 = require('dependency1'),
|
||||
dependency2 = require('dependency2');
|
||||
|
||||
return function () {};
|
||||
});
|
||||
</code></pre>
|
||||
|
||||
<p>This allows the loader to load dependency1 and dependency2 asynchronously, execute those dependencies, then execute this function.</p>
|
||||
|
||||
<p>Not all browsers give a usable Function.prototype.toString() results. As of October 2011, the PS 3 and older Opera Mobile browsers do not. Those browsers are more likely to need an optimized build of the modules for network/device limitations, so just do a build with an optimizer that knows how to convert these files to the normalized dependency array form, like the <a href="optimization.html">RequireJS optimizer</a>.</p>
|
||||
|
||||
<p>Since the number of browsers that cannot support this toString() scanning is very small, it is safe to use this sugared forms for all your modules, particularly if you like to line up the dependency names with the variables that will hold their module values.</p>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="section">
|
||||
<h2>
|
||||
<a href="#commonjscompat" name="commonjscompat">CommonJS Compatibility</a>
|
||||
<span class="sectionMark">§ 8</span>
|
||||
</h2>
|
||||
|
||||
<p>Even though this sugared form is referred to as the "simplified CommonJS wrapping", it is not 100% compatible with CommonJS modules. However, the cases that are not supported would likely break in the browser anyway, since they generally assume synchronous loading of dependencies.</p>
|
||||
|
||||
<p>Most CJS modules, around 95% based on my (thoroughly unscientific) personal experience, are perfectly compatible with the simplified CommonJS wrapping.</p>
|
||||
|
||||
<p>The modules that break are ones that do a dynamic calculation of a dependency, anything that does not use a string literal for the require() call, and anything that does not look like a declarative require() call. So things like this fail:</p>
|
||||
|
||||
<pre><code>//BAD
|
||||
var mod = require(someCondition ? 'a' : 'b');
|
||||
|
||||
//BAD
|
||||
if (someCondition) {
|
||||
var a = require('a');
|
||||
} else {
|
||||
var a = require('a1');
|
||||
}
|
||||
</code></pre>
|
||||
|
||||
<p>These cases are handled by the <a href="https://github.com/amdjs/amdjs-api/wiki/require">callback-require</a>, <code>require([moduleName], function (){})</code> normally present in AMD loaders.</p>
|
||||
|
||||
<p>The AMD execution model is better aligned with how ECMAScript Harmony modules are being specified. The CommonJS modules that would not work in an AMD wrapper will also not work as a Harmony module. AMD's code execution behavior is more future compatible.</p>
|
||||
|
||||
<h2>Verbosity vs. Usefulness</h2>
|
||||
|
||||
<p>One of the criticisms of AMD, at least compared to CJS modules, is that it requires a level of indent and a function wrapping.</p>
|
||||
|
||||
<p>But here is the plain truth: the perceived extra typing and a level of indent to use AMD does not matter. Here is where your time goes when coding:</p>
|
||||
|
||||
<ul>
|
||||
<li>Thinking about the problem.</li>
|
||||
<li>Reading code.</li>
|
||||
</ul>
|
||||
|
||||
<p>Your time coding is mostly spent thinking, not typing. While fewer words are generally preferable, there is a limit to that approach paying off, and the extra typing in AMD is not that much more.</p>
|
||||
|
||||
<p>Most web developers use a function wrapper anyway, to avoid polluting the page with globals. Seeing a function wrapped around functionality is a very common sight and does not add to the reading cost of a module.</p>
|
||||
|
||||
<p>There are also hidden costs with the CommonJS format:</p>
|
||||
|
||||
<ul>
|
||||
<li>the tooling dependency cost</li>
|
||||
<li>edge cases that break in browsers, like cross domain access</li>
|
||||
<li>worse debugging, a cost that continues to add up over time</li>
|
||||
</ul>
|
||||
|
||||
<p>AMD modules require less tooling, there are fewer edge case issues, and better debugging support.</p>
|
||||
|
||||
<p>What is important: being able to actually share code with others. AMD is the lowest energy pathway to that goal.</p>
|
||||
|
||||
<p>Having a working, easy to debug module system that works in today's browsers means getting real world experience in making the best module system for JavaScript in the future.</p>
|
||||
|
||||
<p>AMD and its related APIs, have helped show the following for any future JS module system:</p>
|
||||
|
||||
<ul>
|
||||
<li><strong>Returning a function as the module value</strong>, particularly a constructor function, leads to better API design. Node has module.exports to allow this, but being able to use "return function (){}" is much cleaner. It means not having to get a handle on "module" to do module.exports, and it is a clearer code expression.</li>
|
||||
<li><strong>Dynamic code loading</strong> (done in AMD systems via <a href="https://github.com/amdjs/amdjs-api/wiki/require">require([], function (){}))</a> is a basic requirement. CJS talked about it, had some proposals, but it was not fully embraced. Node does not have any support for this need, instead relying on the synchronous behavior of require(''), which is not portable to the web.</li>
|
||||
<li><strong><a href="http://requirejs.org/docs/plugins.html">Loader plugins</a></strong> are incredibly useful. It helps avoid the nested brace indenting common in callback-based programming.</li>
|
||||
<li><strong>Selectively mapping one module</strong> to load from another location makes it easy to provide mock objects for testing.</li>
|
||||
<li>There should only be at most <strong>one IO action for each module</strong>, and it should be straightforward. Web browsers are not tolerant of multiple IO lookups to find a module. This argues against the multiple path lookups that Node does now, and avoiding the use of a package.json "main" property. Just use module names that map easily to one location based on the project's location, using a reasonable default convention that does not require verbose configuration, but allow for simple configuration when needed.</li>
|
||||
<li>It is best if there is an <strong>"opt-in" call</strong> that can be done so that older JS code can partcipate in the new system.</li>
|
||||
</ul>
|
||||
|
||||
<p>If a JS module system cannot deliver on the above features, it is at a significant disadvantage when compared to AMD and its related APIs around <a href="https://github.com/amdjs/amdjs-api/wiki/require">callback-require</a>, <a href="https://github.com/amdjs/amdjs-api/wiki/Loader-Plugins">loader plugins</a>, and paths-based module IDs.</p>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="section">
|
||||
<h2>
|
||||
<a href="#amdtoday" name="amdtoday">AMD Used Today</a>
|
||||
<span class="sectionMark">§ 9</span>
|
||||
</h2>
|
||||
|
||||
<p>As of mid October 2011, AMD already has good adoption on the web:</p>
|
||||
|
||||
<ul>
|
||||
<li><a href="http://jquery.com/">jQuery</a> 1.7</li>
|
||||
<li><a href="http://dojotoolkit.org/">Dojo</a> 1.7</li>
|
||||
<li><a href="http://uxebu.github.com/embedjs/">EmbedJS</a></li>
|
||||
<li><a href="http://ender.no.de/">Ender</a>-associated modules like <a href="https://github.com/ded/bonzo">bonzo</a>, <a href="https://github.com/ded/qwery">qwery</a>, <a href="https://github.com/fat/bean">bean</a> and <a href="https://github.com/ded/domready">domready</a></li>
|
||||
<li>Used by <a href="http://getfirebug.com/">Firebug</a> 1.8+</li>
|
||||
<li>The simplified CommonJS wrapper can be used in <a href="https://addons.mozilla.org/en-US/developers/docs/sdk/1.1/">Jetpack/Add-on SDK</a> for Firefox</li>
|
||||
<li>Used for parts of sites on <a href="http://www.bbc.co.uk/">the BBC</a> (observed by looking at the source, not an official recommendation of AMD/RequireJS)</li>
|
||||
</ul>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="section">
|
||||
<h2>
|
||||
<a href="#youcando" name="youcando">What You Can Do</a>
|
||||
<span class="sectionMark">§ 10</span>
|
||||
</h2>
|
||||
|
||||
<p id="doapp"><strong>If you write applications:</strong></p>
|
||||
|
||||
<ul>
|
||||
<li>Give an AMD loader a try. You have some choices:
|
||||
<ul>
|
||||
<li><a href="http://requirejs.org">RequireJS</a></li>
|
||||
<li><a href="https://github.com/cujojs/curl">curl</a></li>
|
||||
<li><a href="https://github.com/zazl/lsjs">lsjs</a></li>
|
||||
<li><a href="http://dojotoolkit.org/">Dojo</a> 1.7+</li>
|
||||
</ul></li>
|
||||
<li>If you want to use AMD but still use the <strong>load one script at the bottom of the HTML page</strong> approach:
|
||||
<ul>
|
||||
<li>Use the <a href="http://requirejs.org/docs/optimization.html">RequireJS optimizer</a> either in command line mode or as an <a href="https://github.com/jrburke/r.js/blob/master/build/tests/http/httpBuild.js">HTTP service</a> with the <a href="https://github.com/jrburke/almond">almond AMD shim</a>.</li>
|
||||
</ul></li>
|
||||
</ul>
|
||||
|
||||
<p id="dolib"><strong>If you are a script/library author</strong>:</p>
|
||||
|
||||
<ul>
|
||||
<li><a href="https://github.com/umdjs/umd">Optionally call define()</a> if it is available. The nice thing is you can still code your library without relying on AMD, just participate if it is available. This allows consumers of your modules to:
|
||||
<ul>
|
||||
<li>avoid dumping global variables in the page</li>
|
||||
<li>use more options for code loading, delayed loading</li>
|
||||
<li>use existing AMD tooling to optimize their project</li>
|
||||
<li>participate in a workable module system for JS in the browser today.</li>
|
||||
</ul></li>
|
||||
</ul>
|
||||
|
||||
<p id="doenv"><strong>If you write code loaders/engines/environments for JavaScript:</strong></p>
|
||||
|
||||
<ul>
|
||||
<li>Implement <a href="https://github.com/amdjs/amdjs-api/wiki/AMD">the AMD API</a>. There is <a href="https://groups.google.com/group/amd-implement">a discussion list</a> and <a href="https://github.com/amdjs/amdjs-tests">compatibility tests</a>. By implementing AMD, you will reduce multi-module system boilerplate and help prove out a workable JavaScript module system on the web. This can be fed back into the ECMAScript process to build better native module support.</li>
|
||||
<li>Also support <a href="https://github.com/amdjs/amdjs-api/wiki/require">callback-require</a> and <a href="https://github.com/amdjs/amdjs-api/wiki/Loader-Plugins">loader plugins</a>. Loader plugins are a great way to reduce the nested callback syndrome that can be common in callback/async-style code.</li>
|
||||
</ul>
|
||||
|
||||
</div>
|
21
src/bower_components/requirejs/index.html
vendored
Normal file
21
src/bower_components/requirejs/index.html
vendored
Normal file
|
@ -0,0 +1,21 @@
|
|||
<div id="intro" class="mono">
|
||||
<p>/* ---</p>
|
||||
|
||||
<p>RequireJS is a JavaScript file and module loader. It is optimized for
|
||||
in-browser use, but it can be used in other JavaScript environments,
|
||||
like Rhino and <a href="requirejs/tree/master/docs/node.md">Node</a>. Using
|
||||
a modular script loader like RequireJS will improve the speed and
|
||||
quality of your code.</p>
|
||||
|
||||
<p>
|
||||
IE 6+ .......... compatible ✔<br>
|
||||
Firefox 2+ ..... compatible ✔<br>
|
||||
Safari 3.2+ .... compatible ✔<br>
|
||||
Chrome 3+ ...... compatible ✔<br>
|
||||
Opera 10+ ...... compatible ✔
|
||||
</p>
|
||||
|
||||
<p><a href="requirejs/tree/master/docs/start.md">Get started</a> then check out the <a href="requirejs/tree/master/docs/api.md">API</a>.</p>
|
||||
|
||||
<p>--- */</p>
|
||||
</div>
|
6
src/bower_components/requirejs/package.json
vendored
Normal file
6
src/bower_components/requirejs/package.json
vendored
Normal file
|
@ -0,0 +1,6 @@
|
|||
{
|
||||
"volo": {
|
||||
"url": "https://raw.github.com/jrburke/requirejs/{version}/require.js"
|
||||
},
|
||||
"main": "require.js"
|
||||
}
|
2068
src/bower_components/requirejs/require.js
vendored
Normal file
2068
src/bower_components/requirejs/require.js
vendored
Normal file
File diff suppressed because it is too large
Load diff
42
src/bower_components/requirejs/tasks.txt
vendored
Normal file
42
src/bower_components/requirejs/tasks.txt
vendored
Normal file
|
@ -0,0 +1,42 @@
|
|||
Release Notes
|
||||
-------------------
|
||||
|
||||
After merge/release:
|
||||
|
||||
|
||||
Implementation notes
|
||||
--------
|
||||
* Cannot get rid of interactive stuff for IE because requirejs supports loading
|
||||
plain JS files that may not call define(). Since they do not call define, if
|
||||
they are loaded in between anon define call scripts, since onload on scripts
|
||||
do not fire immediately after script execution, the wrong names can be associated
|
||||
with scripts.
|
||||
|
||||
|
||||
- robust handling for anon modules loaded outside loader.
|
||||
- Just remove packages config altogether, suggest volojs for making adapter modules.
|
||||
-> Allow 'module': '' and 'module/': '' config instead of packages config.
|
||||
|
||||
Tests to write:
|
||||
- mapConfig test for packages.
|
||||
|
||||
Next release
|
||||
--------------
|
||||
|
||||
- ie 10, order plugin not working?
|
||||
|
||||
https://github.com/jrburke/requirejs/issues/185
|
||||
|
||||
- add pluginBuilder to the load api
|
||||
|
||||
- require-cs circular ref: https://github.com/jrburke/require-cs/issues/13
|
||||
|
||||
- make a decision matrix of when to use what. Mention lowercase names for file name convention.
|
||||
|
||||
- paths entry for socket.io to remote domain/port, but then do a require.toUrl('socket.io') and it returns
|
||||
a local path instead of the remote path?
|
||||
|
||||
|
||||
- has() source trimming, needs brace matching?
|
||||
|
||||
- Update the coffeescript plugin to use the writeFile API?
|
11
src/bower_components/requirejs/testBaseUrl.js
vendored
Normal file
11
src/bower_components/requirejs/testBaseUrl.js
vendored
Normal file
|
@ -0,0 +1,11 @@
|
|||
define([], function() {
|
||||
doh.register(
|
||||
"testBaseUrl",
|
||||
[
|
||||
function testBaseUrl(t){
|
||||
t.is(true, true);
|
||||
}
|
||||
]
|
||||
);
|
||||
doh.run();
|
||||
});
|
32
src/bower_components/requirejs/tests/NAMESPACE.html
vendored
Normal file
32
src/bower_components/requirejs/tests/NAMESPACE.html
vendored
Normal file
|
@ -0,0 +1,32 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>require.js: NAMESPACE Test</title>
|
||||
<script type="text/javascript" src="NAMESPACE.js"></script>
|
||||
<script type="text/javascript" src="doh/runner.js"></script>
|
||||
<script type="text/javascript" src="doh/_browserRunner.js"></script>
|
||||
<script type="text/javascript">
|
||||
NAMESPACE.require(['one', 'dimple'], function(one, dimple) {
|
||||
doh.register(
|
||||
"namespaceTest",
|
||||
[
|
||||
function namespaceTest(t){
|
||||
t.is("large", one.size);
|
||||
t.is("dimple-blue", dimple.color);
|
||||
}
|
||||
]
|
||||
);
|
||||
doh.run();
|
||||
|
||||
});
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
<h1>require.js: NAMESPACE Test</h1>
|
||||
|
||||
<p>Only works after doing a build using the simpleNamespace.build.js file
|
||||
in the r.js project.</p>
|
||||
|
||||
<p>Check console for messages</p>
|
||||
</body>
|
||||
</html>
|
96
src/bower_components/requirejs/tests/afterload.html
vendored
Normal file
96
src/bower_components/requirejs/tests/afterload.html
vendored
Normal file
|
@ -0,0 +1,96 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>require.js: After Load</title>
|
||||
<script type="text/javascript" src="doh/runner.js"></script>
|
||||
<script type="text/javascript" src="doh/_browserRunner.js"></script>
|
||||
<script type="text/javascript">
|
||||
var d, s, head;
|
||||
|
||||
function goRequire() {
|
||||
//Need a hack to trigger require.pageLoaded() for pre Firefox 3.6 browsers.
|
||||
var ff = parseFloat(navigator.userAgent.split("Firefox/")[1]) || null;
|
||||
if (ff && ff < 3.6) {
|
||||
require.pageLoaded();
|
||||
}
|
||||
|
||||
require({
|
||||
paths: {
|
||||
domReady: "../../domReady/domReady"
|
||||
}
|
||||
},
|
||||
["require", "simple", "domReady"],
|
||||
function (require, simple, domReady) {
|
||||
domReady(function() {
|
||||
doh.is("blue", simple.color);
|
||||
|
||||
//Now test another script getting loaded will see
|
||||
//document.readyState === "complete".
|
||||
var s = document.createElement("script");
|
||||
s.src = "afterloadreadystate.js";
|
||||
s.charset = "utf-8";
|
||||
head.appendChild(s);
|
||||
});
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
function loadRequire() {
|
||||
var readyRegExp = /complete|loaded/;
|
||||
function onScriptLoad(evt) {
|
||||
var node = evt.target || evt.srcElement;
|
||||
if (evt.type === "load" || readyRegExp.test(node.readyState)) {
|
||||
//Clean up script binding, otherwise, Opera in particular
|
||||
//may trigger it again.
|
||||
if (node.removeEventListener) {
|
||||
node.removeEventListener("load", onScriptLoad, false);
|
||||
} else {
|
||||
//Probably IE.
|
||||
node.detachEvent("onreadystatechange", onScriptLoad);
|
||||
}
|
||||
goRequire();
|
||||
}
|
||||
};
|
||||
|
||||
//Create script tag for require.js
|
||||
s = document.createElement("script");
|
||||
s.src = "../require.js";
|
||||
s.charset = "utf-8";
|
||||
|
||||
//Set up load listener.
|
||||
if (s.addEventListener) {
|
||||
s.addEventListener("load", onScriptLoad, false);
|
||||
} else {
|
||||
//Probably IE.
|
||||
s.attachEvent("onreadystatechange", onScriptLoad);
|
||||
}
|
||||
|
||||
head = (document.getElementsByTagName("head")[0] ||
|
||||
document.getElementsByTagName("html")[0]);
|
||||
head.appendChild(s);
|
||||
}
|
||||
|
||||
doh.register(
|
||||
"afterload",
|
||||
[
|
||||
{
|
||||
name: "afterload",
|
||||
timeout: 5000,
|
||||
runTest: function() {
|
||||
d = new doh.Deferred();
|
||||
return d;
|
||||
}
|
||||
}
|
||||
]
|
||||
);
|
||||
doh.run();
|
||||
|
||||
</script>
|
||||
</head>
|
||||
<body onload="loadRequire()">
|
||||
<h1>require.js: After Load Test</h1>
|
||||
<p>Tests adding require after the page loads, and tests that require.js patches
|
||||
up document.readyState for Firefox less than 3.6.</p>
|
||||
<p>Check console for messages</p>
|
||||
</body>
|
||||
</html>
|
2
src/bower_components/requirejs/tests/afterloadreadystate.js
vendored
Normal file
2
src/bower_components/requirejs/tests/afterloadreadystate.js
vendored
Normal file
|
@ -0,0 +1,2 @@
|
|||
doh.is("complete", document.readyState);
|
||||
d.callback(true);
|
195
src/bower_components/requirejs/tests/all.js
vendored
Normal file
195
src/bower_components/requirejs/tests/all.js
vendored
Normal file
|
@ -0,0 +1,195 @@
|
|||
//PS3 does not have a usable Function.prototype.toString,
|
||||
//so avoid those tests.
|
||||
var hasToString = (function () {
|
||||
var test = 'hello world';
|
||||
}).toString().indexOf('hello world') !== -1;
|
||||
|
||||
doh.registerUrl("simple", "../simple.html");
|
||||
|
||||
//PS3 does not like this test
|
||||
doh.registerUrl("baseUrl", "../baseUrl.html");
|
||||
|
||||
doh.registerUrl("toUrl", "../toUrl/toUrl.html");
|
||||
doh.registerUrl("urlArgsToUrl", "../urlArgsToUrl.html");
|
||||
|
||||
doh.registerUrl("config", "../config.html");
|
||||
doh.registerUrl("configRequirejs", "../configRequirejs.html");
|
||||
doh.registerUrl("dataMain", "../dataMain/dataMain.html");
|
||||
doh.registerUrl("skipDataMain", "../dataMain/skipDataMain/skipDataMain.html");
|
||||
doh.registerUrl("dataMainIndex", "../dataMain/dataMainIndex/dataMainIndex.html");
|
||||
doh.registerUrl("dataMainBaseUrl", "../dataMain/baseUrl/dataMainBaseUrl.html");
|
||||
|
||||
doh.registerUrl("moduleExports", "../moduleExports/moduleExports.html");
|
||||
|
||||
if (hasToString) {
|
||||
doh.registerUrl("anonSimple", "../anon/anonSimple.html");
|
||||
doh.registerUrl("cjsSpace", "../cjsSpace/cjsSpace.html");
|
||||
doh.registerUrl("cjsDotRequire", "../cjsSpace/cjsDotRequire.html");
|
||||
doh.registerUrl("packages", "../packages/packages.html");
|
||||
doh.registerUrl("packagesConfig", "../packages/config/config.html");
|
||||
doh.registerUrl("packagesNestedMain", "../packagesNestedMain/packagesNestedMain.html");
|
||||
doh.registerUrl("packagesNode", "../packagesNode/packagesNode.html");
|
||||
doh.registerUrl("packagesNodeAdapter", "../packagesNodeAdapter/packagesNodeAdapter.html");
|
||||
doh.registerUrl("specialDeps", "../specialDeps/specialDeps.html");
|
||||
}
|
||||
|
||||
doh.registerUrl("simple-nohead", "../simple-nohead.html");
|
||||
|
||||
doh.registerUrl("hasOwnPropertyTests", "../hasOwnProperty/hasOwnProperty.html");
|
||||
|
||||
//Only do the base test if the urls work out.
|
||||
if (location.href.indexOf('http://127.0.0.1/requirejs/') === 0) {
|
||||
doh.registerUrl("simple-badbase", "../simple-badbase.html");
|
||||
}
|
||||
|
||||
|
||||
doh.registerUrl("circular", "../circular.html");
|
||||
doh.registerUrl("circularDupe", "../circular/dupe/dupe.html");
|
||||
doh.registerUrl("circularPlugin", "../circular/circularPlugin.html");
|
||||
doh.registerUrl("circularComplexPlugin", "../circular/complexPlugin/complexPlugin.html");
|
||||
doh.registerUrl("circular414", "../circular/414/414.html");
|
||||
doh.registerUrl("circularTranspiler", "../circular/transpiler/transpiler.html");
|
||||
|
||||
doh.registerUrl("nestedRequire", "../nestedRequire/nestedRequire.html");
|
||||
|
||||
doh.registerUrl("depEmpty", "../depEmpty.html");
|
||||
doh.registerUrl("depoverlap", "../depoverlap.html");
|
||||
doh.registerUrl("urlfetch", "../urlfetch/urlfetch.html");
|
||||
doh.registerUrl("uniques", "../uniques/uniques.html");
|
||||
doh.registerUrl("multiversion", "../multiversion.html", 10000);
|
||||
|
||||
doh.registerUrl("isBrowser", "../isBrowser/isBrowser.html");
|
||||
doh.registerUrl("onResourceLoadNestedRequire", "../onResourceLoad/nestedRequire.html", 5000);
|
||||
|
||||
doh.registerUrl("jquery", "../jquery/jquery.html");
|
||||
|
||||
//Next three tests fail in PS3
|
||||
doh.registerUrl("jqueryDynamic", "../jquery/jqueryDynamic.html");
|
||||
doh.registerUrl("jqueryDynamic2", "../jquery/jqueryDynamic2.html");
|
||||
|
||||
doh.registerUrl("i18nlocaleunknown", "../i18n/i18n.html?bundle=i18n!nls/fr-fr/colors");
|
||||
|
||||
doh.registerUrl("i18n", "../i18n/i18n.html");
|
||||
//Fail in PS3
|
||||
doh.registerUrl("i18nlocale", "../i18n/i18n.html?locale=en-us-surfer");
|
||||
//Fail in PS3
|
||||
doh.registerUrl("i18nbundle", "../i18n/i18n.html?bundle=i18n!nls/en-us-surfer/colors");
|
||||
|
||||
//Probably fail in PS3
|
||||
doh.registerUrl("i18ncommon", "../i18n/common.html");
|
||||
doh.registerUrl("i18ncommonlocale", "../i18n/common.html?locale=en-us-surfer");
|
||||
|
||||
|
||||
doh.registerUrl("shimBasic", "../shim/basic.html");
|
||||
doh.registerUrl("shimBasicBuilt", "../shim/built/basic-built.html");
|
||||
|
||||
doh.registerUrl("paths", "../paths/paths.html");
|
||||
doh.registerUrl("pathsRelativeNormalize", "../paths/relativeNormalize/relativeNormalize.html");
|
||||
|
||||
doh.registerUrl("moduleConfig", "../moduleConfig/moduleConfig.html");
|
||||
|
||||
doh.registerUrl("mapConfig", "../mapConfig/mapConfig.html");
|
||||
doh.registerUrl("mapConfigBuilt", "../mapConfig/built/mapConfigBuilt.html");
|
||||
doh.registerUrl("mapConfigStar", "../mapConfig/mapConfigStar.html");
|
||||
doh.registerUrl("mapConfigStarBuilt", "../mapConfig/built/mapConfigStarBuilt.html");
|
||||
doh.registerUrl("mapConfigStarAdapter", "../mapConfig/mapConfigStarAdapter.html");
|
||||
doh.registerUrl("mapConfigStarAdapterBuilt", "../mapConfig/built/mapConfigStarAdapterBuilt.html");
|
||||
doh.registerUrl("mapConfigMulti", "../mapConfig/mapConfigMulti.html");
|
||||
doh.registerUrl("mapConfigDelayed", "../mapConfig/mapConfigDelayed.html");
|
||||
doh.registerUrl("mapConfigRelative", "../mapConfig/mapConfigRelative.html");
|
||||
doh.registerUrl("mapConfigSpecificity", "../mapConfig/mapConfigSpecificity.html");
|
||||
doh.registerUrl("mapConfigPlugin", "../mapConfig/mapConfigPlugin.html");
|
||||
doh.registerUrl("mapConfigPluginBuilt", "../mapConfig/built/mapConfigPluginBuilt.html");
|
||||
|
||||
doh.registerUrl("layers", "../layers/layers.html", 10000);
|
||||
|
||||
doh.registerUrl("bundles", "../bundles/bundles.html");
|
||||
|
||||
doh.registerUrl("afterload", "../afterload.html", 10000);
|
||||
|
||||
doh.registerUrl("universal", "../universal/universal.html");
|
||||
doh.registerUrl("universalBuilt", "../universal/universal-built.html");
|
||||
|
||||
doh.registerUrl("defineDouble", "../defineDouble/defineDouble.html");
|
||||
doh.registerUrl("definedSpecified", "../definedSpecified/definedSpecified.html");
|
||||
doh.registerUrl("delayedDefine", "../delayedDefine/delayedDefine.html");
|
||||
doh.registerUrl("nestedDefine", "../nestedDefine/nestedDefine.html");
|
||||
doh.registerUrl("nestedDefine2", "../nestedDefine/nestedDefine2.html");
|
||||
doh.registerUrl("nestedRelativeRequire", "../nestedRelativeRequire/nestedRelativeRequire.html");
|
||||
doh.registerUrl("nestedRequireConfig", "../nestedRequireConfig/nestedRequireConfig.html");
|
||||
|
||||
doh.registerUrl("pluginBundles", "../plugins/pluginBundles/pluginBundles.html");
|
||||
doh.registerUrl("pluginBundlesSeparateText", "../plugins/pluginBundlesSeparateText/pluginBundlesSeparateText.html");
|
||||
|
||||
doh.registerUrl("pluginsSync", "../plugins/sync.html");
|
||||
doh.registerUrl("pluginsOnError", "../plugins/onerror/onerror.html");
|
||||
doh.registerUrl("doublePluginCall", "../plugins/double.html");
|
||||
doh.registerUrl("pluginsNameOnly", "../plugins/nameOnly.html");
|
||||
doh.registerUrl("pluginsDelegated", "../plugins/delegated/delegated.html");
|
||||
doh.registerUrl("pluginsFromText", "../plugins/fromText/fromText.html");
|
||||
doh.registerUrl("pluginsFromTextEvalError", "../plugins/fromTextEvalError/fromTextEvalError.html");
|
||||
doh.registerUrl("pluginsFromTextConfig", "../plugins/fromText/fromTextConfig.html");
|
||||
doh.registerUrl("pluginsFromTextNoDefine", "../plugins/fromTextNoDefine/fromTextNoDefine.html");
|
||||
doh.registerUrl("pluginsTextDepend", "../plugins/textDepend/textDepend.html");
|
||||
doh.registerUrl("pluginLast", "../plugins/pluginLast/pluginLast.html");
|
||||
doh.registerUrl("pluginShim", "../plugins/pluginShim/pluginShim.html");
|
||||
doh.registerUrl("pluginMap", "../plugins/pluginMap/pluginMap.html");
|
||||
doh.registerUrl("pluginMapSameName", "../plugins/pluginMapSameName/pluginMapSameName.html");
|
||||
doh.registerUrl("pluginMapDynamic", "../plugins/pluginMap/dynamic/pluginMapDynamic.html");
|
||||
|
||||
doh.registerUrl("requirePluginLoad", "../requirePluginLoad/requirePluginLoad.html");
|
||||
|
||||
doh.registerUrl("requireAsync", "../requireAsync/requireAsync.html");
|
||||
|
||||
doh.registerUrl("issue379", "../issue379/issue379.html");
|
||||
|
||||
doh.registerUrl("text", "../text/text.html");
|
||||
doh.registerUrl("textOnly", "../text/textOnly.html");
|
||||
doh.registerUrl("textBuilt", "../text/textBuilt.html");
|
||||
doh.registerUrl("textOnError", "../text/textOnError.html");
|
||||
doh.registerUrl("textOnXhr", "../text/textOnXhr.html");
|
||||
doh.registerUrl("jsonp", "../jsonp/jsonp.html");
|
||||
doh.registerUrl("domReady", "../domReady/domReady.html");
|
||||
doh.registerUrl("domReadyExtraConfig", "../domReady/domReadyExtraConfig.html");
|
||||
|
||||
doh.registerUrl("relative", "../relative/relative.html");
|
||||
doh.registerUrl("relativeBaseUrl", "../relative/relativeBaseUrl.html");
|
||||
doh.registerUrl("relativeOutsideBaseUrl", "../relative/outsideBaseUrl/a/outsideBaseUrl.html");
|
||||
|
||||
doh.registerUrl("remoteUrls", "../remoteUrls/remoteUrls.html");
|
||||
|
||||
// IE does not support data URIs for scripts. This is a crude exclusion test
|
||||
// but is good enough that the test is run in enough browsers to prove it works.
|
||||
if (!document.attachEvent) {
|
||||
doh.registerUrl("datauri", "../datauri/datauri.html");
|
||||
}
|
||||
|
||||
doh.registerUrl("queryPath", "../queryPath.html");
|
||||
|
||||
doh.registerUrl("trailingComma", "../trailingComma/trailingComma.html");
|
||||
|
||||
//Hmm, PS3 does not like exports test? assign2 is undefined?
|
||||
doh.registerUrl("exports", "../exports/exports.html");
|
||||
|
||||
doh.registerUrl("moduleAndExports", "../exports/moduleAndExports.html");
|
||||
|
||||
if (typeof Worker !== "undefined") {
|
||||
doh.registerUrl("workers", "../workers.html");
|
||||
}
|
||||
|
||||
doh.registerUrl("undef", "../undef/undef.html", 8000);
|
||||
doh.registerUrl("undefNoRequire", "../undef/undefNoRequire.html", 3000);
|
||||
doh.registerUrl("undefNoRequire2", "../undef/undefNoRequire2.html", 3000);
|
||||
doh.registerUrl("undefEnforceShim", "../undef/undefEnforceShim.html", 8000);
|
||||
doh.registerUrl("undefLocal", "../undef/undefLocal.html", 8000);
|
||||
doh.registerUrl("errorContinue", "../error/errorContinue.html", 8000);
|
||||
doh.registerUrl("errorContinueLocal", "../error/errorContinueLocal.html", 8000);
|
||||
doh.registerUrl("errorDoubleRequire", "../error/doubleRequire/doubleRequire.html", 8000);
|
||||
doh.registerUrl("errorRequireErrback", "../error/requireErrback.html", 2000);
|
||||
doh.registerUrl("errorGlobalOnError", "../error/globalOnError.html", 2000);
|
||||
doh.registerUrl("pluginErrorContinue", "../error/pluginErrorContinue.html", 8000);
|
||||
doh.registerUrl("pluginErrorContinueLocal", "../error/pluginErrorContinueLocal.html", 8000);
|
||||
doh.registerUrl("defineErrorLocal", "../error/defineErrorLocal.html");
|
||||
|
||||
doh.registerUrl("pathArray", "../pathArray/pathArray.html", 8000);
|
||||
doh.registerUrl("pathArrayFail", "../pathArray/pathArrayFail.html", 10000);
|
7
src/bower_components/requirejs/tests/anon/a.js
vendored
Normal file
7
src/bower_components/requirejs/tests/anon/a.js
vendored
Normal file
|
@ -0,0 +1,7 @@
|
|||
define(function (require) {
|
||||
var b = require("sub/b");
|
||||
return {
|
||||
name: "a",
|
||||
bName: b.f()
|
||||
};
|
||||
});
|
52
src/bower_components/requirejs/tests/anon/anon-tests.js
vendored
Normal file
52
src/bower_components/requirejs/tests/anon/anon-tests.js
vendored
Normal file
|
@ -0,0 +1,52 @@
|
|||
require({
|
||||
baseUrl: requirejs.isBrowser ? "./" : "anon/",
|
||||
paths: {
|
||||
text: "../../../text/text",
|
||||
i18n: "../../../i18n/i18n"
|
||||
}
|
||||
},
|
||||
["require", "magenta", "red", "blue", "green", "yellow", "a", "c"],
|
||||
function(require, magenta, red, blue, green, yellow, a, c) {
|
||||
|
||||
doh.register(
|
||||
"anonSimple",
|
||||
[
|
||||
function colors(t){
|
||||
t.is("redblue", magenta.name);
|
||||
t.is((requirejs.isBrowser ? "./foo.html" : "anon/foo.html"), magenta.path);
|
||||
t.is("red", red.name);
|
||||
t.is("blue", blue.name);
|
||||
t.is("green", green.name);
|
||||
t.is("yellow", yellow.name);
|
||||
t.is("a", a.name);
|
||||
t.is("sub/b", a.bName);
|
||||
t.is("c", c.name);
|
||||
t.is("a", c.aName);
|
||||
|
||||
//Also try a require call after initial
|
||||
//load that uses already loaded modules,
|
||||
//to be sure the require callback is called.
|
||||
if (requirejs.isBrowser) {
|
||||
setTimeout(function () {
|
||||
require(["blue", "red", "magenta"], function (blue, red) {
|
||||
doh.register(
|
||||
"anonSimpleCached",
|
||||
[
|
||||
function colorsCached(t){
|
||||
t.is("red", red.name);
|
||||
t.is("blue", blue.name);
|
||||
t.is("redblue", magenta.name);
|
||||
t.is("hello world", magenta.message);
|
||||
}
|
||||
]
|
||||
);
|
||||
doh.run();
|
||||
});
|
||||
}, 300);
|
||||
}
|
||||
}
|
||||
]
|
||||
);
|
||||
doh.run();
|
||||
}
|
||||
);
|
14
src/bower_components/requirejs/tests/anon/anonSimple.html
vendored
Normal file
14
src/bower_components/requirejs/tests/anon/anonSimple.html
vendored
Normal file
|
@ -0,0 +1,14 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>require.js: Simple Anonymous Module Test</title>
|
||||
<script type="text/javascript" src="../../require.js"></script>
|
||||
<script type="text/javascript" src="../doh/runner.js"></script>
|
||||
<script type="text/javascript" src="../doh/_browserRunner.js"></script>
|
||||
<script type="text/javascript" src="anon-tests.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<h1>require.js: Simple Anonymous Module Test</h1>
|
||||
<p>Check console for messages</p>
|
||||
</body>
|
||||
</html>
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Add a link
Reference in a new issue